From d1bf360aac5a2be297f6154606c2c995f51e4d0e Mon Sep 17 00:00:00 2001 From: Lai Power Date: Thu, 8 Apr 2021 18:46:38 +0000 Subject: [PATCH] deleted plugin `WP-Matomo Integration` version 1.0.24 --- wp-content/plugins/wp-piwik/.gitignore | 2 - wp-content/plugins/wp-piwik/LICENSE | 675 ---- wp-content/plugins/wp-piwik/README.md | 9 - wp-content/plugins/wp-piwik/bitcoin.png | Bin 2020 -> 0 bytes .../plugins/wp-piwik/classes/WP_Piwik.php | 1328 ------- .../wp-piwik/classes/WP_Piwik/Admin.php | 26 - .../classes/WP_Piwik/Admin/Network.php | 25 - .../classes/WP_Piwik/Admin/Settings.php | 720 ---- .../classes/WP_Piwik/Admin/Sitebrowser.php | 112 - .../classes/WP_Piwik/Admin/Statistics.php | 54 - .../wp-piwik/classes/WP_Piwik/Logger.php | 47 - .../classes/WP_Piwik/Logger/Dummy.php | 9 - .../wp-piwik/classes/WP_Piwik/Logger/File.php | 48 - .../classes/WP_Piwik/Logger/Screen.php | 27 - .../wp-piwik/classes/WP_Piwik/Request.php | 95 - .../wp-piwik/classes/WP_Piwik/Request/Php.php | 55 - .../classes/WP_Piwik/Request/Rest.php | 81 - .../wp-piwik/classes/WP_Piwik/Settings.php | 408 --- .../wp-piwik/classes/WP_Piwik/Shortcode.php | 28 - .../wp-piwik/classes/WP_Piwik/Template.php | 31 - .../WP_Piwik/Template/MetaBoxCustomVars.php | 63 - .../classes/WP_Piwik/TrackingCode.php | 154 - .../wp-piwik/classes/WP_Piwik/Widget.php | 376 -- .../WP_Piwik/Widget/BrowserDetails.php | 77 - .../classes/WP_Piwik/Widget/Browsers.php | 80 - .../classes/WP_Piwik/Widget/Chart.php | 78 - .../wp-piwik/classes/WP_Piwik/Widget/City.php | 80 - .../classes/WP_Piwik/Widget/Country.php | 80 - .../classes/WP_Piwik/Widget/Ecommerce.php | 45 - .../classes/WP_Piwik/Widget/Items.php | 52 - .../classes/WP_Piwik/Widget/ItemsCategory.php | 52 - .../classes/WP_Piwik/Widget/Keywords.php | 21 - .../classes/WP_Piwik/Widget/Models.php | 80 - .../classes/WP_Piwik/Widget/Noresult.php | 38 - .../classes/WP_Piwik/Widget/OptOut.php | 31 - .../classes/WP_Piwik/Widget/Overview.php | 63 - .../classes/WP_Piwik/Widget/Pages.php | 21 - .../classes/WP_Piwik/Widget/Plugins.php | 38 - .../wp-piwik/classes/WP_Piwik/Widget/Post.php | 51 - .../classes/WP_Piwik/Widget/Referrers.php | 21 - .../classes/WP_Piwik/Widget/Screens.php | 75 - .../classes/WP_Piwik/Widget/Search.php | 38 - .../wp-piwik/classes/WP_Piwik/Widget/Seo.php | 31 - .../classes/WP_Piwik/Widget/SystemDetails.php | 73 - .../classes/WP_Piwik/Widget/Systems.php | 73 - .../classes/WP_Piwik/Widget/Types.php | 80 - .../classes/WP_Piwik/Widget/Visitors.php | 68 - wp-content/plugins/wp-piwik/config.php | 9 - wp-content/plugins/wp-piwik/css/index.php | 2 - .../plugins/wp-piwik/css/wp-piwik-spark.css | 3 - wp-content/plugins/wp-piwik/css/wp-piwik.css | 57 - wp-content/plugins/wp-piwik/gpl-3.0.html | 692 ---- wp-content/plugins/wp-piwik/index.php | 2 - wp-content/plugins/wp-piwik/js/index.php | 2 - .../wp-piwik/js/jqplot/IMPORTANT_NOTICE.txt | 1 - .../wp-piwik/js/jqplot/MIT-LICENSE.txt | 21 - .../plugins/wp-piwik/js/jqplot/README.txt | 77 - .../plugins/wp-piwik/js/jqplot/changes.txt | 458 --- .../plugins/wp-piwik/js/jqplot/copyright.txt | 56 - .../wp-piwik/js/jqplot/excanvas.min.js | 3 - .../plugins/wp-piwik/js/jqplot/gpl-2.0.txt | 280 -- .../plugins/wp-piwik/js/jqplot/index.php | 2 - .../wp-piwik/js/jqplot/jquery.jqplot.min.css | 1 - .../wp-piwik/js/jqplot/jquery.jqplot.min.js | 3 - .../jqplot/plugins/jqplot.pieRenderer.min.js | 3 - .../js/jqplot/plugins/jqplot.trendline.min.js | 3 - .../plugins/wp-piwik/js/jqplot/usage.txt | 126 - .../wp-piwik/js/jqplot/wp-piwik.jqplot.js | 10 - .../plugins/wp-piwik/js/sparkline/index.php | 2 - .../wp-piwik/js/sparkline/jquery.sparkline.js | 3054 ----------------- .../js/sparkline/jquery.sparkline.min.js | 5 - wp-content/plugins/wp-piwik/js/wp-piwik.js | 4 - .../plugins/wp-piwik/languages/.tx/config | 9 - .../plugins/wp-piwik/languages/update.sh | 5 - .../wp-piwik/languages/wp-piwik-az_AZ.mo | Bin 1418 -> 0 bytes .../wp-piwik/languages/wp-piwik-az_AZ.po | 1530 --------- .../wp-piwik/languages/wp-piwik-be_BY.mo | Bin 1798 -> 0 bytes .../wp-piwik/languages/wp-piwik-be_BY.po | 1530 --------- .../wp-piwik/languages/wp-piwik-cs_CZ.mo | Bin 474 -> 0 bytes .../wp-piwik/languages/wp-piwik-cs_CZ.po | 1528 --------- .../wp-piwik/languages/wp-piwik-de_CH.mo | Bin 445 -> 0 bytes .../wp-piwik/languages/wp-piwik-de_CH.po | 1528 --------- .../wp-piwik/languages/wp-piwik-de_DE.mo | Bin 34143 -> 0 bytes .../wp-piwik/languages/wp-piwik-de_DE.po | 1530 --------- .../plugins/wp-piwik/languages/wp-piwik-el.mo | Bin 38932 -> 0 bytes .../plugins/wp-piwik/languages/wp-piwik-el.po | 1531 --------- .../wp-piwik/languages/wp-piwik-el_GR.mo | Bin 13103 -> 0 bytes .../wp-piwik/languages/wp-piwik-el_GR.po | 407 --- .../wp-piwik/languages/wp-piwik-es_ES.mo | Bin 7734 -> 0 bytes .../wp-piwik/languages/wp-piwik-es_ES.po | 1530 --------- .../wp-piwik/languages/wp-piwik-fa_IR.mo | Bin 9852 -> 0 bytes .../wp-piwik/languages/wp-piwik-fa_IR.po | 1532 --------- .../wp-piwik/languages/wp-piwik-fr_FR.mo | Bin 28250 -> 0 bytes .../wp-piwik/languages/wp-piwik-fr_FR.po | 1532 --------- .../plugins/wp-piwik/languages/wp-piwik-hi.mo | Bin 7471 -> 0 bytes .../plugins/wp-piwik/languages/wp-piwik-hi.po | 1529 --------- .../wp-piwik/languages/wp-piwik-hu_HU.mo | Bin 27582 -> 0 bytes .../wp-piwik/languages/wp-piwik-hu_HU.po | 1530 --------- .../plugins/wp-piwik/languages/wp-piwik-id.mo | Bin 880 -> 0 bytes .../plugins/wp-piwik/languages/wp-piwik-id.po | 1528 --------- .../wp-piwik/languages/wp-piwik-it_IT.mo | Bin 26692 -> 0 bytes .../wp-piwik/languages/wp-piwik-it_IT.po | 1532 --------- .../plugins/wp-piwik/languages/wp-piwik-lb.mo | Bin 5705 -> 0 bytes .../plugins/wp-piwik/languages/wp-piwik-lb.po | 1529 --------- .../wp-piwik/languages/wp-piwik-lt_LT.mo | Bin 3031 -> 0 bytes .../wp-piwik/languages/wp-piwik-lt_LT.po | 1531 --------- .../wp-piwik/languages/wp-piwik-nb_NO.mo | Bin 5756 -> 0 bytes .../wp-piwik/languages/wp-piwik-nb_NO.po | 1529 --------- .../wp-piwik/languages/wp-piwik-nl_NL.mo | Bin 21847 -> 0 bytes .../wp-piwik/languages/wp-piwik-nl_NL.po | 1532 --------- .../wp-piwik/languages/wp-piwik-pl_PL.mo | Bin 26626 -> 0 bytes .../wp-piwik/languages/wp-piwik-pl_PL.po | 1530 --------- .../wp-piwik/languages/wp-piwik-pt_BR.mo | Bin 26913 -> 0 bytes .../wp-piwik/languages/wp-piwik-pt_BR.po | 1530 --------- .../wp-piwik/languages/wp-piwik-ro_RO.mo | Bin 1440 -> 0 bytes .../wp-piwik/languages/wp-piwik-ro_RO.po | 1530 --------- .../wp-piwik/languages/wp-piwik-ru_RU.mo | Bin 4820 -> 0 bytes .../wp-piwik/languages/wp-piwik-ru_RU.po | 1529 --------- .../wp-piwik/languages/wp-piwik-sl_SI.mo | Bin 1860 -> 0 bytes .../wp-piwik/languages/wp-piwik-sl_SI.po | 1529 --------- .../plugins/wp-piwik/languages/wp-piwik-sq.mo | Bin 27537 -> 0 bytes .../plugins/wp-piwik/languages/wp-piwik-sq.po | 1532 --------- .../wp-piwik/languages/wp-piwik-sv_SE.mo | Bin 1731 -> 0 bytes .../wp-piwik/languages/wp-piwik-sv_SE.po | 1530 --------- .../wp-piwik/languages/wp-piwik-tr_TR.mo | Bin 13468 -> 0 bytes .../wp-piwik/languages/wp-piwik-tr_TR.po | 1530 --------- .../wp-piwik/languages/wp-piwik-ua_UA.mo | Bin 4907 -> 0 bytes .../wp-piwik/languages/wp-piwik-ua_UA.po | 186 - .../wp-piwik/languages/wp-piwik-uk_UA.mo | Bin 1725 -> 0 bytes .../wp-piwik/languages/wp-piwik-uk_UA.po | 1530 --------- .../wp-piwik/languages/wp-piwik-zh_CN.mo | Bin 22777 -> 0 bytes .../wp-piwik/languages/wp-piwik-zh_CN.po | 1529 --------- .../plugins/wp-piwik/languages/wp-piwik.pot | 1533 --------- wp-content/plugins/wp-piwik/proxy/config.php | 39 - wp-content/plugins/wp-piwik/proxy/index.php | 2 - wp-content/plugins/wp-piwik/proxy/matomo.php | 137 - wp-content/plugins/wp-piwik/proxy/piwik.php | 2 - wp-content/plugins/wp-piwik/readme.txt | 650 ---- wp-content/plugins/wp-piwik/screenshot-1.gif | Bin 47554 -> 0 bytes wp-content/plugins/wp-piwik/screenshot-2.gif | Bin 52962 -> 0 bytes wp-content/plugins/wp-piwik/screenshot-3.gif | Bin 97175 -> 0 bytes wp-content/plugins/wp-piwik/screenshot-4.gif | Bin 12691 -> 0 bytes wp-content/plugins/wp-piwik/screenshot-5.gif | Bin 27708 -> 0 bytes wp-content/plugins/wp-piwik/uninstall.php | 108 - .../plugins/wp-piwik/update/2015051101.php | 41 - .../plugins/wp-piwik/update/2017080701.php | 13 - wp-content/plugins/wp-piwik/update/90001.php | 9 - wp-content/plugins/wp-piwik/update/90801.php | 5 - wp-content/plugins/wp-piwik/update/91006.php | 10 - wp-content/plugins/wp-piwik/wp-piwik.php | 83 - wp-content/plugins/wp-piwik/wpml-config.xml | 5 - 151 files changed, 55149 deletions(-) delete mode 100644 wp-content/plugins/wp-piwik/.gitignore delete mode 100644 wp-content/plugins/wp-piwik/LICENSE delete mode 100644 wp-content/plugins/wp-piwik/README.md delete mode 100644 wp-content/plugins/wp-piwik/bitcoin.png delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Admin.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Admin/Network.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Admin/Settings.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Admin/Sitebrowser.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Admin/Statistics.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Logger.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Logger/Dummy.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Logger/File.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Logger/Screen.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Request.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Request/Php.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Request/Rest.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Settings.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Shortcode.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Template.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Template/MetaBoxCustomVars.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/TrackingCode.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/BrowserDetails.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Browsers.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Chart.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/City.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Country.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Ecommerce.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Items.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/ItemsCategory.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Keywords.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Models.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Noresult.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/OptOut.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Overview.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Pages.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Plugins.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Post.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Referrers.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Screens.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Search.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Seo.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/SystemDetails.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Systems.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Types.php delete mode 100644 wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Visitors.php delete mode 100644 wp-content/plugins/wp-piwik/config.php delete mode 100644 wp-content/plugins/wp-piwik/css/index.php delete mode 100644 wp-content/plugins/wp-piwik/css/wp-piwik-spark.css delete mode 100644 wp-content/plugins/wp-piwik/css/wp-piwik.css delete mode 100644 wp-content/plugins/wp-piwik/gpl-3.0.html delete mode 100644 wp-content/plugins/wp-piwik/index.php delete mode 100644 wp-content/plugins/wp-piwik/js/index.php delete mode 100644 wp-content/plugins/wp-piwik/js/jqplot/IMPORTANT_NOTICE.txt delete mode 100644 wp-content/plugins/wp-piwik/js/jqplot/MIT-LICENSE.txt delete mode 100644 wp-content/plugins/wp-piwik/js/jqplot/README.txt delete mode 100644 wp-content/plugins/wp-piwik/js/jqplot/changes.txt delete mode 100644 wp-content/plugins/wp-piwik/js/jqplot/copyright.txt delete mode 100644 wp-content/plugins/wp-piwik/js/jqplot/excanvas.min.js delete mode 100644 wp-content/plugins/wp-piwik/js/jqplot/gpl-2.0.txt delete mode 100644 wp-content/plugins/wp-piwik/js/jqplot/index.php delete mode 100644 wp-content/plugins/wp-piwik/js/jqplot/jquery.jqplot.min.css delete mode 100644 wp-content/plugins/wp-piwik/js/jqplot/jquery.jqplot.min.js delete mode 100644 wp-content/plugins/wp-piwik/js/jqplot/plugins/jqplot.pieRenderer.min.js delete mode 100644 wp-content/plugins/wp-piwik/js/jqplot/plugins/jqplot.trendline.min.js delete mode 100644 wp-content/plugins/wp-piwik/js/jqplot/usage.txt delete mode 100644 wp-content/plugins/wp-piwik/js/jqplot/wp-piwik.jqplot.js delete mode 100644 wp-content/plugins/wp-piwik/js/sparkline/index.php delete mode 100644 wp-content/plugins/wp-piwik/js/sparkline/jquery.sparkline.js delete mode 100644 wp-content/plugins/wp-piwik/js/sparkline/jquery.sparkline.min.js delete mode 100644 wp-content/plugins/wp-piwik/js/wp-piwik.js delete mode 100644 wp-content/plugins/wp-piwik/languages/.tx/config delete mode 100644 wp-content/plugins/wp-piwik/languages/update.sh delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-az_AZ.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-az_AZ.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-be_BY.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-be_BY.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-cs_CZ.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-cs_CZ.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-de_CH.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-de_CH.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-de_DE.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-de_DE.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-el.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-el.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-el_GR.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-el_GR.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-es_ES.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-es_ES.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-fa_IR.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-fa_IR.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-fr_FR.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-fr_FR.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-hi.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-hi.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-hu_HU.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-hu_HU.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-id.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-id.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-it_IT.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-it_IT.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-lb.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-lb.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-lt_LT.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-lt_LT.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-nb_NO.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-nb_NO.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-nl_NL.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-nl_NL.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-pl_PL.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-pl_PL.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-pt_BR.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-pt_BR.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-ro_RO.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-ro_RO.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-ru_RU.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-ru_RU.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-sl_SI.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-sl_SI.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-sq.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-sq.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-sv_SE.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-sv_SE.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-tr_TR.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-tr_TR.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-ua_UA.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-ua_UA.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-uk_UA.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-uk_UA.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-zh_CN.mo delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik-zh_CN.po delete mode 100644 wp-content/plugins/wp-piwik/languages/wp-piwik.pot delete mode 100644 wp-content/plugins/wp-piwik/proxy/config.php delete mode 100644 wp-content/plugins/wp-piwik/proxy/index.php delete mode 100644 wp-content/plugins/wp-piwik/proxy/matomo.php delete mode 100644 wp-content/plugins/wp-piwik/proxy/piwik.php delete mode 100644 wp-content/plugins/wp-piwik/readme.txt delete mode 100644 wp-content/plugins/wp-piwik/screenshot-1.gif delete mode 100644 wp-content/plugins/wp-piwik/screenshot-2.gif delete mode 100644 wp-content/plugins/wp-piwik/screenshot-3.gif delete mode 100644 wp-content/plugins/wp-piwik/screenshot-4.gif delete mode 100644 wp-content/plugins/wp-piwik/screenshot-5.gif delete mode 100644 wp-content/plugins/wp-piwik/uninstall.php delete mode 100644 wp-content/plugins/wp-piwik/update/2015051101.php delete mode 100644 wp-content/plugins/wp-piwik/update/2017080701.php delete mode 100644 wp-content/plugins/wp-piwik/update/90001.php delete mode 100644 wp-content/plugins/wp-piwik/update/90801.php delete mode 100644 wp-content/plugins/wp-piwik/update/91006.php delete mode 100644 wp-content/plugins/wp-piwik/wp-piwik.php delete mode 100644 wp-content/plugins/wp-piwik/wpml-config.xml diff --git a/wp-content/plugins/wp-piwik/.gitignore b/wp-content/plugins/wp-piwik/.gitignore deleted file mode 100644 index df30947..0000000 --- a/wp-content/plugins/wp-piwik/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ - -.idea/ diff --git a/wp-content/plugins/wp-piwik/LICENSE b/wp-content/plugins/wp-piwik/LICENSE deleted file mode 100644 index 733c072..0000000 --- a/wp-content/plugins/wp-piwik/LICENSE +++ /dev/null @@ -1,675 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - 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 . - -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: - - {project} Copyright (C) {year} {fullname} - 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 -. - - 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 -. - diff --git a/wp-content/plugins/wp-piwik/README.md b/wp-content/plugins/wp-piwik/README.md deleted file mode 100644 index 6fdc77b..0000000 --- a/wp-content/plugins/wp-piwik/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# WP-Matomo (former WP-Piwik) - -This [WordPress](https://wordpress.org) plugin adds a [Matomo](http://matomo.org) stats site to your blog's dashboard. It's also able to add the Matomo tracking code to your blog. - -## How to use this plugin - -To use this plugin you will need your own Matomo instance. If you do not already have a Matomo setup, you have two simple options: use either [self-hosted](http://matomo.org/) or [cloud-hosted](http://matomo.org/hosting/). - -This repository was created to develop and maintain WP-Matomo (WP-Piwik). Please see the WordPress plugin directory if you like to use this plugin: https://wordpress.org/plugins/wp-piwik/ diff --git a/wp-content/plugins/wp-piwik/bitcoin.png b/wp-content/plugins/wp-piwik/bitcoin.png deleted file mode 100644 index e565fabb08a97a2f30e82db9b8919fd77dc13480..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2020 zcmaJ?dpr|*8`nn~#fa*aX-02(3#m@A*350SMAMl|Dc5c;3!69@rqGct*vYBnmXO)z zQld?<$fcCYYO~W~W5zCWNn6;Av-k79=X3sg-#?z;_n+VId4AvL@_lX`N283^TCCO4 z(J}Hmg2ZU?+`mnKjrPQe?)qzC)g=tdL#MvqQl_H=DDy(P`zNoODsDS^G05cC{7(HW z^9L$@W)>wp{GW)d5oAyGnV8)ppqvb-RM))Fu)3#u-oOVLVL9KTQ4Y7kxoSxXV#>{+ zF(sgm+Ll^M9ZYqkM=!nKf&&b#y4?OhA!98daA%B1FY4Ivn>QaC@811qXk1_bfcuW?SG5=0Gi*5)~)5;N>IIk@s#w z(s>3#(x-i&*qES{Cf*^qb_D=X08?^a@{W(>rd_BR(4Dc5IYpr$%)w~Rp6GXV^YOA~ zM7OL#lY?#R8NH=-afrdMjO1qT4sz*_^?radE{Lz9YDYVCgToLAFd835;gLfRfWP*917LyR4}hf-V~!bCWi zSNrOf+lKy=%K%V?nVy8{vjIo?v}GK(fQP`%L5OedQ1`Q#)(3Xw z)=>B)js|1q0p|1`RiYYTs`V%`ehvZ~=ln*8CKcI+W-_g}#pRaQ@lCL2YSnUaRNKU8 ziv|N@eR`N071|;nrGhfm*@mN{t1eWhYX(oZ--gfomrk%BlVGYHyp+T)_UT~dI|>h~ z$<}7jI@t0F>YK3Hr@w6RWi4|)LR8q!)YR~p@7Uuu%6p+RD-_2cbotizF9uo{Cc}z< zlDRG~?di0ZNF*$chUh&rJ+1#?L?8&ggvYZl#`XUwS+9gVy0XyNKf{IvomyJ$`R0RH zlyjHG)ntsqU7D-tsOp1Qsq9}rxwAZ|&KI10`f8nK^PLp)QPF`SsgV;Fi**=}Sgm{3 z>})IxtIFK(qT=`y&&kd`S#Oc=xGCO4=9!}o4hiYrx2RI7UVIh`S1M8ogy=yYuekmo z4`G-#@}yoMwzm(ZcvU`JaW=A932+FmeXp23?qPY`v0Hbt=*J(BIqRNDhVd!8$ZnZC zf@>?~&gKCyU*ox`Kqz#1g4O3~2zc34xIV$$G}H{>X}=7E!D1GG-%kERH6#!`*Pzkp z>hmEQa&Pag*>!8eLQ>#vy4iro#{4V*+PFmx|5E$UEWbb zCX=6EV?u}`zR4%ykLPsyZ@Ua>>Df4t;9o-?&uvCtxh^l-Y+c#L-dcX)ep6$N6&TES zdinCD!`!m6axI!E{`za|k&6kf8{@CcM8I8G1wkaigzLoH&Fe;Ni;RZ z+Ic#vRh}Uh=s$BHo>%TgOy?tP#+vE~_6Ql4cuF-Y4b_k+)ByTdf3 zFYE&BxKd(*wJC(o4XvstKx$a6ZI%NP}d(cpR*BPnk}ri%ffjAOtdKvlMw zv9IF7fKkNW!VQA!33h0g#b6F>60Ul5qBKDPA!t7^shx4+&}p|R2z4oWz#Hg)`)OF{Us@Ar3?Y|(106{}O05AMsQHbz3pXT|ZzTH)TgyDdM7T*yZpTIn zFCE8~;DjX0`-eG(jn>2&nwefhshgZ}Vh1@dwOv+;p9`-C5^poDpMr!VN{lnomQ`dg zTF@hhwrnJa{yaGfQ4KNwt`o4)8s_zQzFMHYbT1DssmQWBMGz^TCC9mP$Nw8g!8h3+ zU89yGKZcEMl7KlK?9PpB8hQ*@XLUy_bF%9Bg#W)ES6vPd0xkhOY>|4#Pdco$Yg@ - * @package WP_Piwik - */ -class WP_Piwik { - - /** - * - * @var Runtime environment variables - */ - private static $revisionId = 2019110501, $version = '1.0.23', $blog_id, $pluginBasename = NULL, $logger, $settings, $request, $optionsPageId; - - /** - * Constructor class to configure and register all WP-Piwik components - */ - public function __construct() { - global $blog_id; - self::$blog_id = (isset ( $blog_id ) ? $blog_id : 'n/a'); - $this->openLogger (); - $this->openSettings (); - $this->setup (); - $this->addFilters (); - $this->addActions (); - $this->addShortcodes (); - } - - /** - * Destructor class to finish logging - */ - public function __destruct() { - $this->closeLogger (); - } - - /** - * Setup class to prepare settings and check for installation and update - */ - private function setup() { - self::$pluginBasename = plugin_basename ( __FILE__ ); - if (! $this->isInstalled ()) - $this->installPlugin (); - elseif ($this->isUpdated ()) - $this->updatePlugin (); - if ($this->isConfigSubmitted ()) - $this->applySettings (); - self::$settings->save (); - } - - /** - * Register WordPress actions - */ - private function addActions() { - if ( is_admin () ) { - add_action ( 'admin_menu', array ( - $this, - 'buildAdminMenu' - ) ); - add_action ( 'admin_post_save_wp-piwik_stats', array ( - $this, - 'onStatsPageSaveChanges' - ) ); - add_action ( 'load-post.php', array ( - $this, - 'addPostMetaboxes' - ) ); - add_action ( 'load-post-new.php', array ( - $this, - 'addPostMetaboxes' - ) ); - if ($this->isNetworkMode ()) { - add_action ( 'network_admin_notices', array ( - $this, - 'showNotices' - ) ); - add_action ( 'network_admin_menu', array ( - $this, - 'buildNetworkAdminMenu' - ) ); - add_action ( 'update_site_option_blogname', array ( - $this, - 'onBlogNameChange' - ) ); - add_action ( 'update_site_option_siteurl', array ( - $this, - 'onSiteUrlChange' - ) ); - } else { - add_action ( 'admin_notices', array ( - $this, - 'showNotices' - ) ); - add_action ( 'update_option_blogname', array ( - $this, - 'onBlogNameChange' - ) ); - add_action ( 'update_option_siteurl', array ( - $this, - 'onSiteUrlChange' - ) ); - } - if ($this->isDashboardActive ()) - add_action ( 'wp_dashboard_setup', array ( - $this, - 'extendWordPressDashboard' - ) ); - } - if ($this->isToolbarActive ()) { - add_action ( is_admin () ? 'admin_head' : 'wp_head', array ( - $this, - 'loadToolbarRequirements' - ) ); - add_action ( 'admin_bar_menu', array ( - $this, - 'extendWordPressToolbar' - ), 1000 ); - } - if ($this->isTrackingActive ()) { - if ( !is_admin () || $this->isAdminTrackingActive ()) { - $prefix = is_admin ()?'admin':'wp'; - add_action ( self::$settings->getGlobalOption ( 'track_codeposition' ) == 'footer' ? $prefix.'_footer' : $prefix.'_head', array ( - $this, - 'addJavascriptCode' - ) ); - if (self::$settings->getGlobalOption ( 'dnsprefetch' )) - add_action ( $prefix.'_head', array ( - $this, - 'addDNSPrefetchTag' - ) ); - if ($this->isAddNoScriptCode ()) - add_action ( $prefix.'_footer', array ( - $this, - 'addNoscriptCode' - ) ); - } - if (self::$settings->getGlobalOption ( 'add_post_annotations' )) - add_action ( 'transition_post_status', array ( - $this, - 'addPiwikAnnotation' - ), 10, 3 ); - } - - } - - /** - * Register WordPress filters - */ - private function addFilters() { - if (is_admin()) { - add_filter ( 'plugin_row_meta', array ( - $this, - 'setPluginMeta' - ), 10, 2 ); - add_filter ( 'screen_layout_columns', array ( - $this, - 'onScreenLayoutColumns' - ), 10, 2 ); - } elseif ($this->isTrackingActive ()) { - if ($this->isTrackFeed ()) { - add_filter ( 'the_excerpt_rss', array ( - $this, - 'addFeedTracking' - ) ); - add_filter ( 'the_content', array ( - $this, - 'addFeedTracking' - ) ); - } - if ($this->isAddFeedCampaign ()) { - add_filter ( 'post_link', array ( - $this, - 'addFeedCampaign' - ) ); - } - if ($this->isCrossDomainLinkingEnabled ()) { - add_filter ( 'wp_redirect', array ( - $this, - 'forwardCrossDomainVisitorId' - ) ); - } - } - } - - /** - * Register WordPress shortcodes - */ - private function addShortcodes() { - if ($this->isAddShortcode ()) - add_shortcode ( 'wp-piwik', array ( - $this, - 'shortcode' - ) ); - } - - /** - * Install WP-Piwik for the first time - */ - private function installPlugin($isUpdate = false) { - self::$logger->log ( 'Running WP-Piwik installation' ); - if (! $isUpdate) - $this->addNotice ( 'install', sprintf ( __ ( '%s %s installed.', 'wp-piwik' ), self::$settings->getGlobalOption ( 'plugin_display_name' ), self::$version ), __ ( 'Next you should connect to Piwik', 'wp-piwik' ) ); - self::$settings->setGlobalOption ( 'revision', self::$revisionId ); - self::$settings->setGlobalOption ( 'last_settings_update', time () ); - } - - /** - * Uninstall WP-Piwik - */ - public function uninstallPlugin() { - self::$logger->log ( 'Running WP-Piwik uninstallation' ); - if (! defined ( 'WP_UNINSTALL_PLUGIN' )) - exit (); - self::deleteWordPressOption ( 'wp-piwik-notices' ); - self::$settings->resetSettings ( true ); - } - - /** - * Update WP-Piwik - */ - private function updatePlugin() { - self::$logger->log ( 'Upgrade WP-Piwik to ' . self::$version ); - $patches = glob ( dirname ( __FILE__ ) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'update' . DIRECTORY_SEPARATOR . '*.php' ); - $isPatched = false; - if (is_array ( $patches )) { - sort ( $patches ); - foreach ( $patches as $patch ) { - $patchVersion = ( int ) pathinfo ( $patch, PATHINFO_FILENAME ); - if ($patchVersion && self::$settings->getGlobalOption ( 'revision' ) < $patchVersion) { - self::includeFile ( 'update' . DIRECTORY_SEPARATOR . $patchVersion ); - $isPatched = true; - } - } - } - if ((self::$settings->getGlobalOption('update_notice') == 'enabled') || ((self::$settings->getGlobalOption('update_notice') == 'script') && $isPatched)) - $this->addNotice ( 'update', sprintf ( __ ( '%s updated to %s.', 'wp-piwik' ), self::$settings->getGlobalOption ( 'plugin_display_name' ), self::$version ), __ ( 'Please validate your configuration', 'wp-piwik' ) ); - $this->installPlugin ( true ); - } - - /** - * Define a notice - * - * @param string $type - * identifier - * @param string $subject - * notice headline - * @param string $text - * notice content - * @param boolean $stay - * set to true if the message should persist (default: false) - */ - private function addNotice($type, $subject, $text, $stay = false) { - $notices = $this->getWordPressOption ( 'wp-piwik-notices', array () ); - $notices [$type] = array ( - 'subject' => $subject, - 'text' => $text, - 'stay' => $stay - ); - $this->updateWordPressOption ( 'wp-piwik-notices', $notices ); - } - - /** - * Show all notices defined previously - * - * @see addNotice() - */ - public function showNotices() { - $link = sprintf ( '%s', __ ( 'Settings', 'wp-piwik' ) ); - if ($notices = $this->getWordPressOption ( 'wp-piwik-notices' )) { - foreach ( $notices as $type => $notice ) { - printf ( '

%s %s: %s: %s

', $notice ['subject'], __ ( 'Important', 'wp-piwik' ), $notice ['text'], $link ); - if (! $notice ['stay']) - unset ( $notices [$type] ); - } - } - $this->updateWordPressOption ( 'wp-piwik-notices', $notices ); - } - - /** - * Get the settings page URL - * - * @return string settings page URL - */ - private function getSettingsURL() { - return (self::$settings->checkNetworkActivation () ? 'settings' : 'options-general') . '.php?page=' . self::$pluginBasename; - } - - /** - * Echo javascript tracking code - */ - public function addJavascriptCode() { - if ($this->isHiddenUser ()) { - self::$logger->log ( 'Do not add tracking code to site (user should not be tracked) Blog ID: ' . self::$blog_id . ' Site ID: ' . self::$settings->getOption ( 'site_id' ) ); - return; - } - $trackingCode = new WP_Piwik\TrackingCode ( $this ); - $trackingCode->is404 = (is_404 () && self::$settings->getGlobalOption ( 'track_404' )); - $trackingCode->isUsertracking = self::$settings->getGlobalOption ( 'track_user_id' ) != 'disabled'; - $trackingCode->isSearch = (is_search () && self::$settings->getGlobalOption ( 'track_search' )); - self::$logger->log ( 'Add tracking code. Blog ID: ' . self::$blog_id . ' Site ID: ' . self::$settings->getOption ( 'site_id' ) ); - if ($this->isNetworkMode () && self::$settings->getGlobalOption ( 'track_mode' ) == 'manually') { - $siteId = $this->getPiwikSiteId (); - if ($siteId != 'n/a') - echo str_replace ( '{ID}', $siteId, $trackingCode->getTrackingCode () ); - else - echo ''; - } else - echo $trackingCode->getTrackingCode (); - } - - /** - * Echo DNS prefetch tag - */ - public function addDNSPrefetchTag() { - echo ''; - } - - /** - * Get Piwik Domain - */ - public function getPiwikDomain() { - switch (self::$settings->getGlobalOption ( 'piwik_mode' )) { - case 'php' : - return '//' . parse_url(self::$settings->getGlobalOption ( 'proxy_url' ), PHP_URL_HOST); - case 'cloud' : - return '//' . self::$settings->getGlobalOption ( 'piwik_user' ) . '.innocraft.cloud'; - case 'cloud-matomo' : - return '//' . self::$settings->getGlobalOption ( 'matomo_user' ) . '.matomo.cloud'; - default : - return '//' . parse_url(self::$settings->getGlobalOption ( 'piwik_url' ), PHP_URL_HOST); - } - } - - /** - * Echo noscript tracking code - */ - public function addNoscriptCode() { - if (self::$settings->getGlobalOption ( 'track_mode' ) == 'proxy') - return; - if ($this->isHiddenUser ()) { - self::$logger->log ( 'Do not add noscript code to site (user should not be tracked) Blog ID: ' . self::$blog_id . ' Site ID: ' . self::$settings->getOption ( 'site_id' ) ); - return; - } - self::$logger->log ( 'Add noscript code. Blog ID: ' . self::$blog_id . ' Site ID: ' . self::$settings->getOption ( 'site_id' ) ); - echo self::$settings->getOption ( 'noscript_code' ) . "\n"; - } - - /** - * Register post view meta boxes - */ - public function addPostMetaboxes() { - if (self::$settings->getGlobalOption ( 'add_customvars_box' )) { - add_action ( 'add_meta_boxes', array ( - new WP_Piwik\Template\MetaBoxCustomVars ( $this, self::$settings ), - 'addMetabox' - ) ); - add_action ( 'save_post', array ( - new WP_Piwik\Template\MetaBoxCustomVars ( $this, self::$settings ), - 'saveCustomVars' - ), 10, 2 ); - } - if (self::$settings->getGlobalOption ( 'perpost_stats' )) { - add_action ( 'add_meta_boxes', array ( - $this, - 'onloadPostPage' - ) ); - } - } - - /** - * Register admin menu components - */ - public function buildAdminMenu() { - if (self::isConfigured ()) { - $cap = 'wp-piwik_read_stats'; - if (self::$settings->checkNetworkActivation ()) { - global $current_user; - $userRoles = $current_user->roles; - $allowed = self::$settings->getGlobalOption ( 'capability_read_stats' ); - if (is_array($userRoles) && is_array($allowed)) - foreach ($userRoles as $userRole) - if (isset( $allowed[$userRole] ) && $allowed[$userRole]) { - $cap = 'read'; - break; - } - } - $statsPage = new WP_Piwik\Admin\Statistics ( $this, self::$settings ); - $this->statsPageId = add_dashboard_page ( __ ( 'Piwik Statistics', 'wp-piwik' ), self::$settings->getGlobalOption ( 'plugin_display_name' ), $cap, 'wp-piwik_stats', array ( - $statsPage, - 'show' - ) ); - $this->loadAdminStatsHeader ( $this->statsPageId, $statsPage ); - } - if (! self::$settings->checkNetworkActivation ()) { - $optionsPage = new WP_Piwik\Admin\Settings ( $this, self::$settings ); - self::$optionsPageId = add_options_page ( self::$settings->getGlobalOption ( 'plugin_display_name' ), self::$settings->getGlobalOption ( 'plugin_display_name' ), 'activate_plugins', __FILE__, array ( - $optionsPage, - 'show' - ) ); - $this->loadAdminSettingsHeader ( self::$optionsPageId, $optionsPage ); - } - } - - /** - * Register network admin menu components - */ - public function buildNetworkAdminMenu() { - if (self::isConfigured ()) { - $statsPage = new WP_Piwik\Admin\Network ( $this, self::$settings ); - $this->statsPageId = add_dashboard_page ( __ ( 'Piwik Statistics', 'wp-piwik' ), self::$settings->getGlobalOption ( 'plugin_display_name' ), 'manage_sites', 'wp-piwik_stats', array ( - $statsPage, - 'show' - ) ); - $this->loadAdminStatsHeader ( $this->statsPageId, $statsPage ); - } - $optionsPage = new WP_Piwik\Admin\Settings ( $this, self::$settings ); - self::$optionsPageId = add_submenu_page ( 'settings.php', self::$settings->getGlobalOption ( 'plugin_display_name' ), self::$settings->getGlobalOption ( 'plugin_display_name' ), 'manage_sites', __FILE__, array ( - $optionsPage, - 'show' - ) ); - $this->loadAdminSettingsHeader ( self::$optionsPageId, $optionsPage ); - } - - /** - * Register admin header extensions for stats page - * - * @param $optionsPageId options - * page id - * @param $optionsPage options - * page object - */ - public function loadAdminStatsHeader($statsPageId, $statsPage) { - add_action ( 'admin_print_scripts-' . $statsPageId, array ( - $statsPage, - 'printAdminScripts' - ) ); - add_action ( 'admin_print_styles-' . $statsPageId, array ( - $statsPage, - 'printAdminStyles' - ) ); - add_action ( 'admin_head-' . $statsPageId, array ( - $statsPage, - 'extendAdminHeader' - ) ); - add_action ( 'load-' . $statsPageId, array ( - $this, - 'onloadStatsPage' - ) ); - } - - /** - * Register admin header extensions for settings page - * - * @param $optionsPageId options - * page id - * @param $optionsPage options - * page object - */ - public function loadAdminSettingsHeader($optionsPageId, $optionsPage) { - add_action ( 'admin_head-' . $optionsPageId, array ( - $optionsPage, - 'extendAdminHeader' - ) ); - add_action ( 'admin_print_styles-' . $optionsPageId, array ( - $optionsPage, - 'printAdminStyles' - ) ); - } - - /** - * Register WordPress dashboard widgets - */ - public function extendWordPressDashboard() { - if (current_user_can ( 'wp-piwik_read_stats' )) { - if (self::$settings->getGlobalOption ( 'dashboard_widget' ) != 'disabled') - new WP_Piwik\Widget\Overview ( $this, self::$settings, 'dashboard', 'side', 'default', array ( - 'date' => self::$settings->getGlobalOption ( 'dashboard_widget' ), - 'period' => 'day' - ) ); - if (self::$settings->getGlobalOption ( 'dashboard_chart' )) - new WP_Piwik\Widget\Chart ( $this, self::$settings ); - if (self::$settings->getGlobalOption ( 'dashboard_ecommerce' )) - new WP_Piwik\Widget\Ecommerce ( $this, self::$settings ); - if (self::$settings->getGlobalOption ( 'dashboard_seo' )) - new WP_Piwik\Widget\Seo ( $this, self::$settings ); - } - } - - /** - * Register WordPress toolbar components - */ - public function extendWordPressToolbar($toolbar) { - if (current_user_can ( 'wp-piwik_read_stats' ) && is_admin_bar_showing ()) { - $id = WP_Piwik\Request::register ( 'VisitsSummary.getUniqueVisitors', array ( - 'period' => 'day', - 'date' => 'last30' - ) ); - $unique = $this->request ( $id ); - $url = is_network_admin () ? $this->getSettingsURL () : false; - $content = is_network_admin () ? __('Configure WP-Piwik', 'wp-piwik') : ''; - // Leave if result array does contain a message instead of valid data - if (isset($unique['result'])) - $content .= ''; - elseif (is_array ( $unique ) ) { - $content = "Loading..."; - $url = $this->getStatsURL (); - } - $toolbar->add_menu ( array ( - 'id' => 'wp-piwik_stats', - 'title' => $content, - 'href' => $url - ) ); - } - } - - /** - * Add plugin meta data - * - * @param array $links - * list of already defined plugin meta data - * @param string $file - * handled file - * @return array complete list of plugin meta data - */ - public function setPluginMeta($links, $file) { - if ($file == 'wp-piwik/wp-piwik.php' && (!$this->isNetworkMode () || is_network_admin()) ) - return array_merge ( $links, array ( - sprintf ( '%s', self::getSettingsURL (), __ ( 'Settings', 'wp-piwik' ) ) - ) ); - return $links; - } - - /** - * Prepare toolbar widget requirements - */ - public function loadToolbarRequirements() { - if (is_admin_bar_showing ()) { - wp_enqueue_script ( 'wp-piwik-sparkline', $this->getPluginURL () . 'js/sparkline/jquery.sparkline.min.js', array ( - 'jquery' - ), self::$version ); - wp_enqueue_style ( 'wp-piwik', $this->getPluginURL () . 'css/wp-piwik-spark.css', array (), $this->getPluginVersion () ); - } - } - - /** - * Add tracking pixels to feed content - * - * @param string $content - * post content - * @return string post content extended by tracking pixel - */ - public function addFeedTracking($content) { - global $post; - if (is_feed ()) { - self::$logger->log ( 'Add tracking image to feed entry.' ); - if (! self::$settings->getOption ( 'site_id' )) { - $siteId = $this->requestPiwikSiteId (); - if ($siteId != 'n/a') - self::$settings->setOption ( 'site_id', $siteId ); - else - return false; - } - $title = the_title ( null, null, false ); - $posturl = get_permalink ( $post->ID ); - $urlref = get_bloginfo ( 'rss2_url' ); - if (self::$settings->getGlobalOption ( 'track_mode' ) == 'proxy') - $url = plugins_url ( 'wp-piwik' ) . '/proxy/piwik.php'; - else { - $url = self::$settings->getGlobalOption ( 'piwik_url' ); - if (substr($url, -10, 10) == '/index.php') - $url = str_replace('/index.php', '/piwik.php', $url); - else - $url .= 'piwik.php'; - } - $trackingImage = $url . '?idsite=' . self::$settings->getOption ( 'site_id' ) . '&rec=1&url=' . urlencode ( $posturl ) . '&action_name=' . urlencode ( $title ) . '&urlref=' . urlencode ( $urlref ); - $content .= ''; - } - return $content; - } - - /** - * Add a campaign parameter to feed permalink - * - * @param string $permalink - * permalink - * @return string permalink extended by campaign parameter - */ - public function addFeedCampaign($permalink) { - global $post; - if (is_feed ()) { - self::$logger->log ( 'Add campaign to feed permalink.' ); - $sep = (strpos ( $permalink, '?' ) === false ? '?' : '&'); - $permalink .= $sep . 'pk_campaign=' . urlencode ( self::$settings->getGlobalOption ( 'track_feed_campaign' ) ) . '&pk_kwd=' . urlencode ( $post->post_name ); - } - return $permalink; - } - - /** - * Forwards the cross domain parameter pk_vid if the URL parameter is set and a user is about to be redirected. - * When another website links to WooCommerce with a pk_vid parameter, and WooCommerce redirects the user to another - * URL, the pk_vid parameter would get lost and the visitorId would later not be applied by the tracking code - * due to the lost pk_vid URL parameter. If the URL parameter is set, we make sure to forward this parameter. - * - * @param string $location - * - * @return string location extended by pk_vid URL parameter if the URL parameter is set - */ - public function forwardCrossDomainVisitorId($location) { - - if (!empty($_GET['pk_vid']) - && preg_match('/^[a-zA-Z0-9]{24,48}$/', $_GET['pk_vid'])) { - // currently, the pk_vid parameter is 32 characters long, but it may vary over time. - $location = add_query_arg( 'pk_vid', $_GET['pk_vid'], $location ); - } - - return $location; - } - - /** - * Apply settings update - * - * @return boolean settings update applied - */ - private function applySettings() { - self::$settings->applyChanges ( $_POST ['wp-piwik'] ); - if (self::$settings->getGlobalOption ( 'auto_site_config' ) && self::isConfigured ()) { - if ($this->isPHPMode () && ! defined ( 'PIWIK_INCLUDE_PATH' )) - self::definePiwikConstants (); - $siteId = $this->getPiwikSiteId (); - $trackingCode = $this->updateTrackingCode ( $siteId ); - self::$settings->setOption ( 'site_id', $siteId ); - } - self::$settings->setGlobalOption ( 'revision', self::$revisionId ); - self::$settings->setGlobalOption ( 'last_settings_update', time () ); - return true; - } - - /** - * Check if WP-Piwik is configured - * - * @return boolean Is WP-Piwik configured? - */ - public static function isConfigured() { - return (self::$settings->getGlobalOption ( 'piwik_token' ) && (self::$settings->getGlobalOption ( 'piwik_mode' ) != 'disabled') && (((self::$settings->getGlobalOption ( 'piwik_mode' ) == 'http') && (self::$settings->getGlobalOption ( 'piwik_url' ))) || ((self::$settings->getGlobalOption ( 'piwik_mode' ) == 'php') && (self::$settings->getGlobalOption ( 'piwik_path' ))) || ((self::$settings->getGlobalOption ( 'piwik_mode' ) == 'cloud') && (self::$settings->getGlobalOption ( 'piwik_user' ))) || ((self::$settings->getGlobalOption ( 'piwik_mode' ) == 'cloud-matomo') && (self::$settings->getGlobalOption ( 'matomo_user' ))))); - } - - /** - * Check if WP-Piwik was updated - * - * @return boolean Was WP-Piwik updated? - */ - private function isUpdated() { - return self::$settings->getGlobalOption ( 'revision' ) && self::$settings->getGlobalOption ( 'revision' ) < self::$revisionId; - } - - /** - * Check if WP-Piwik is already installed - * - * @return boolean Is WP-Piwik installed? - */ - private function isInstalled() { - $oldSettings = $this->getWordPressOption ( 'wp-piwik_global-settings', false ); - if ($oldSettings && isset( $oldSettings['revision'] )) { - self::log('Save old settings'); - self::$settings->setGlobalOption ( 'revision', $oldSettings['revision'] ); - } else self::log( 'Current revision '.self::$settings->getGlobalOption ( 'revision' ) ); - return self::$settings->getGlobalOption ( 'revision' ) > 0; - } - - /** - * Check if new settings were submitted - * - * @return boolean Are new settings submitted? - */ - public static function isConfigSubmitted() { - return isset ( $_POST ) && isset ( $_POST ['wp-piwik'] ) && self::isValidOptionsPost(); - } - - /** - * Check if PHP mode is chosen - * - * @return Is PHP mode chosen? - */ - public function isPHPMode() { - return self::$settings->getGlobalOption ( 'piwik_mode' ) && self::$settings->getGlobalOption ( 'piwik_mode' ) == 'php'; - } - - /** - * Check if WordPress is running in network mode - * - * @return boolean Is WordPress running in network mode? - */ - public function isNetworkMode() { - return self::$settings->checkNetworkActivation (); - } - - /** - * Check if a WP-Piwik dashboard widget is enabled - * - * @return boolean Is a dashboard widget enabled? - */ - private function isDashboardActive() { - return self::$settings->getGlobalOption ( 'dashboard_widget' ) || self::$settings->getGlobalOption ( 'dashboard_chart' ) || self::$settings->getGlobalOption ( 'dashboard_seo' ); - } - - /** - * Check if a WP-Piwik toolbar widget is enabled - * - * @return boolean Is a toolbar widget enabled? - */ - private function isToolbarActive() { - return self::$settings->getGlobalOption ( 'toolbar' ); - } - - /** - * Check if WP-Piwik tracking code insertion is enabled - * - * @return boolean Insert tracking code? - */ - private function isTrackingActive() { - return self::$settings->getGlobalOption ( 'track_mode' ) != 'disabled'; - } - - /** - * Check if admin tracking is enabled - * - * @return boolean Is admin tracking enabled? - */ - private function isAdminTrackingActive() { - return self::$settings->getGlobalOption ( 'track_admin' ) && is_admin (); - } - - /** - * Check if WP-Piwik noscript code insertion is enabled - * - * @return boolean Insert noscript code? - */ - private function isAddNoScriptCode() { - return self::$settings->getGlobalOption ( 'track_noscript' ); - } - - /** - * Check if feed tracking is enabled - * - * @return boolean Is feed tracking enabled? - */ - private function isTrackFeed() { - return self::$settings->getGlobalOption ( 'track_feed' ); - } - - /** - * Check if feed permalinks get a campaign parameter - * - * @return boolean Add campaign parameter to feed permalinks? - */ - private function isAddFeedCampaign() { - return self::$settings->getGlobalOption ( 'track_feed_addcampaign' ); - } - - /** - * Check if feed permalinks get a campaign parameter - * - * @return boolean Add campaign parameter to feed permalinks? - */ - private function isCrossDomainLinkingEnabled() { - return self::$settings->getGlobalOption ( 'track_crossdomain_linking' ); - } - - /** - * Check if WP-Piwik shortcodes are enabled - * - * @return boolean Are shortcodes enabled? - */ - private function isAddShortcode() { - return self::$settings->getGlobalOption ( 'shortcodes' ); - } - - /** - * Define Piwik constants for PHP reporting API - */ - public static function definePiwikConstants() { - if (! defined ( 'PIWIK_INCLUDE_PATH' )) { - //@header('Content-type: text/html'); - define ( 'PIWIK_INCLUDE_PATH', self::$settings->getGlobalOption ( 'piwik_path' ) ); - define ( 'PIWIK_USER_PATH', self::$settings->getGlobalOption ( 'piwik_path' ) ); - define ( 'PIWIK_ENABLE_DISPATCH', false ); - define ( 'PIWIK_ENABLE_ERROR_HANDLER', false ); - define ( 'PIWIK_ENABLE_SESSION_START', false ); - } - } - - /** - * Start chosen logging method - */ - private function openLogger() { - switch (WP_PIWIK_ACTIVATE_LOGGER) { - case 1 : - self::$logger = new WP_Piwik\Logger\Screen ( __CLASS__ ); - break; - case 2 : - self::$logger = new WP_Piwik\Logger\File ( __CLASS__ ); - break; - default : - self::$logger = new WP_Piwik\Logger\Dummy ( __CLASS__ ); - } - } - - /** - * Log a message - * - * @param string $message - * logger message - */ - public static function log($message) { - self::$logger->log ( $message ); - } - - /** - * End logging - */ - private function closeLogger() { - self::$logger = null; - } - - /** - * Load WP-Piwik settings - */ - private function openSettings() { - self::$settings = new WP_Piwik\Settings ( $this, self::$logger ); - if (! $this->isConfigSubmitted () && $this->isPHPMode () && ! defined ( 'PIWIK_INCLUDE_PATH' )) - self::definePiwikConstants (); - } - - /** - * Include a WP-Piwik file - */ - private function includeFile($strFile) { - self::$logger->log ( 'Include ' . $strFile . '.php' ); - if (WP_PIWIK_PATH . $strFile . '.php') - include (WP_PIWIK_PATH . $strFile . '.php'); - } - - /** - * Check if user should not be tracked - * - * @return boolean Do not track user? - */ - private function isHiddenUser() { - if (is_multisite ()) - foreach ( self::$settings->getGlobalOption ( 'capability_stealth' ) as $key => $val ) - if ($val && current_user_can ( $key )) - return true; - return current_user_can ( 'wp-piwik_stealth' ); - } - - /** - * Check if tracking code is up to date - * - * @return boolean Is tracking code up to date? - */ - public function isCurrentTrackingCode() { - return (self::$settings->getOption ( 'last_tracking_code_update' ) && self::$settings->getOption ( 'last_tracking_code_update' ) > self::$settings->getGlobalOption ( 'last_settings_update' )); - } - - /** - * DEPRECTAED Add javascript code to site header - * - * @deprecated - * - */ - public function site_header() { - self::$logger->log ( 'Using deprecated function site_header' ); - $this->addJavascriptCode (); - } - - /** - * DEPRECTAED Add javascript code to site footer - * - * @deprecated - * - */ - public function site_footer() { - self::$logger->log ( 'Using deprecated function site_footer' ); - $this->addNoscriptCode (); - } - - /** - * Identify new posts if an annotation is required - * and create Piwik annotation - * - * @param string $newStatus - * new post status - * @param strint $oldStatus - * new post status - * @param object $post - * current post object - */ - public function addPiwikAnnotation($newStatus, $oldStatus, $post) { - $enabledPostTypes = self::$settings->getGlobalOption ( 'add_post_annotations' ); - if (isset($enabledPostTypes[$post->post_type]) && $enabledPostTypes[$post->post_type] && $newStatus == 'publish' && $oldStatus != 'publish') { - $note = 'Published: ' . $post->post_title . ' - URL: ' . get_permalink ( $post->ID ); - $id = WP_Piwik\Request::register ( 'Annotations.add', array ( - 'idSite' => $this->getPiwikSiteId (), - 'date' => date ( 'Y-m-d' ), - 'note' => $note - ) ); - $result = $this->request ( $id ); - self::$logger->log ( 'Add post annotation. ' . $note . ' - ' . serialize ( $result ) ); - } - } - - /** - * Get WP-Piwik's URL - */ - public function getPluginURL() { - return trailingslashit ( plugins_url () . '/wp-piwik/' ); - } - - /** - * Get WP-Piwik's version - */ - public function getPluginVersion() { - return self::$version; - } - - /** - * Enable three columns for WP-Piwik stats screen - * - * @param - * array full list of column settings - * @param - * mixed current screen id - * @return array updated list of column settings - */ - public function onScreenLayoutColumns($columns, $screen) { - if (isset( $this->statsPageId ) && $screen == $this->statsPageId) - $columns [$this->statsPageId] = 3; - return $columns; - } - - /** - * Add tracking code to admin header - */ - function addAdminHeaderTracking() { - $this->addJavascriptCode (); - } - - /** - * Get option value - * - * @param string $key - * option key - * @return mixed option value - */ - public function getOption($key) { - return self::$settings->getOption ( $key ); - } - - /** - * Get global option value - * - * @param string $key - * global option key - * @return mixed global option value - */ - public function getGlobalOption($key) { - return self::$settings->getGlobalOption ( $key ); - } - - /** - * Get stats page URL - * - * @return string stats page URL - */ - public function getStatsURL() { - return admin_url () . '?page=wp-piwik_stats'; - } - - /** - * Execute WP-Piwik test script - */ - private function loadTestscript() { - $this->includeFile ( 'debug' . DIRECTORY_SEPARATOR . 'testscript' ); - } - - /** - * Echo an error message - * - * @param string $message - * message content - */ - private static function showErrorMessage($message) { - echo '' . __ ( 'An error occured', 'wp-piwik' ) . ': ' . $message . ' [' . __ ( 'Support', 'wp-piwik' ) . ']'; - } - - /** - * Perform a Piwik request - * - * @param string $id - * request ID - * @return mixed request result - */ - public function request($id, $debug = false) { - if ( self::$settings->getGlobalOption ( 'piwik_mode' ) == 'disabled' ) - return 'n/a'; - if (! isset ( self::$request ) || empty ( self::$request )) - self::$request = (self::$settings->getGlobalOption ( 'piwik_mode' ) == 'http' || self::$settings->getGlobalOption ( 'piwik_mode' ) == 'cloud' || self::$settings->getGlobalOption ( 'piwik_mode' ) == 'cloud-matomo' ? new WP_Piwik\Request\Rest ( $this, self::$settings ) : new WP_Piwik\Request\Php ( $this, self::$settings )); - if ($debug) - return self::$request->getDebug ( $id ); - return self::$request->perform ( $id ); - } - - /** - * Reset request object - */ - public function resetRequest() { - if (is_object(self::$request)) - self::$request->reset(); - self::$request = NULL; - } - - /** - * Execute WP-Piwik shortcode - * - * @param array $attributes - * attribute list - */ - public function shortcode($attributes) { - shortcode_atts ( array ( - 'title' => '', - 'module' => 'overview', - 'period' => 'day', - 'date' => 'yesterday', - 'limit' => 10, - 'width' => '100%', - 'height' => '200px', - 'idsite' => '', - 'language' => 'en', - 'range' => false, - 'key' => 'sum_daily_nb_uniq_visitors' - ), $attributes ); - $shortcodeObject = new \WP_Piwik\Shortcode ( $attributes, $this, self::$settings ); - return $shortcodeObject->get(); - } - - /** - * Get Piwik site ID by blog ID - * - * @param int $blogId - * which blog's Piwik site ID to get, default is the current blog - * @return mixed Piwik site ID or n/a - */ - public function getPiwikSiteId($blogId = null) { - if (! $blogId && $this->isNetworkMode ()) - $blogId = get_current_blog_id (); - $result = self::$settings->getOption ( 'site_id', $blogId ); - self::$logger->log ( 'Database result: ' . $result ); - return (! empty ( $result ) ? $result : $this->requestPiwikSiteId ( $blogId )); - } - - /** - * Get a detailed list of all Piwik sites - * - * @return array Piwik sites - */ - public function getPiwikSiteDetails() { - $id = WP_Piwik\Request::register ( 'SitesManager.getSitesWithAtLeastViewAccess', array () ); - $piwikSiteDetails = $this->request ( $id ); - return $piwikSiteDetails; - } - - /** - * Estimate a Piwik site ID by blog ID - * - * @param int $blogId - * which blog's Piwik site ID to estimate, default is the current blog - * @return mixed Piwik site ID or n/a - */ - private function requestPiwikSiteId($blogId = null) { - $isCurrent = ! self::$settings->checkNetworkActivation () || empty ( $blogId ); - if (self::$settings->getGlobalOption ( 'auto_site_config' )) { - $id = WP_Piwik\Request::register ( 'SitesManager.getSitesIdFromSiteUrl', array ( - 'url' => $isCurrent ? get_bloginfo ( 'url' ) : get_blog_details ( $blogId )->siteurl - ) ); - $result = $this->request ( $id ); - $this->log ( 'Tried to identify current site, result: ' . serialize ( $result ) ); - if (is_array( $result ) && empty( $result )) - $result = $this->addPiwikSite ( $blogId ); - elseif ( $result != 'n/a' && isset($result [0]) ) - $result = $result [0] ['idsite']; - else $result = null; - } else $result = null; - self::$logger->log ( 'Get Piwik ID: WordPress site ' . ($isCurrent ? get_bloginfo ( 'url' ) : get_blog_details ( $blogId )->siteurl) . ' = Piwik ID ' . $result ); - if ($result !== null) { - self::$settings->setOption ( 'site_id', $result, $blogId ); - if (self::$settings->getGlobalOption ( 'track_mode' ) != 'disabled' && self::$settings->getGlobalOption ( 'track_mode' ) != 'manually') { - $code = $this->updateTrackingCode ( $result, $blogId ); - } - $this::$settings->save (); - return $result; - } - return 'n/a'; - } - - /** - * Add a new Piwik - * - * @param int $blogId - * which blog's Piwik site to create, default is the current blog - * @return int Piwik site ID - */ - public function addPiwikSite($blogId = null) { - $isCurrent = ! self::$settings->checkNetworkActivation () || empty ( $blogId ); - // Do not add site if Piwik connection is unreliable - if (! $this->request ( 'global.getPiwikVersion' )) - return null; - $id = WP_Piwik\Request::register ( 'SitesManager.addSite', array ( - 'urls' => $isCurrent ? get_bloginfo ( 'url' ) : get_blog_details ( $blogId )->siteurl, - 'siteName' => urlencode( $isCurrent ? get_bloginfo ( 'name' ) : get_blog_details ( $blogId )->blogname ) - ) ); - $result = (int) $this->request ( $id ); - self::$logger->log ( 'Create Piwik ID: WordPress site ' . ($isCurrent ? get_bloginfo ( 'url' ) : get_blog_details ( $blogId )->siteurl) . ' = Piwik ID ' . $result ); - if (empty ( $result )) - return null; - else { - do_action('wp-piwik_site_created', $result); - return $result; - } - } - - /** - * Update a Piwik site's detail information - * - * @param int $siteId - * which Piwik site to updated - * @param int $blogId - * which blog's Piwik site ID to get, default is the current blog - */ - private function updatePiwikSite($siteId, $blogId = null) { - $isCurrent = ! self::$settings->checkNetworkActivation () || empty ( $blogId ); - $id = WP_Piwik\Request::register ( 'SitesManager.updateSite', array ( - 'idSite' => $siteId, - 'urls' => $isCurrent ? get_bloginfo ( 'url' ) : get_blog_details ( $blogId )->siteurl, - 'siteName' => $isCurrent ? get_bloginfo ( 'name' ) : get_blog_details ( $blogId )->blogname - ) ); - $this->request ( $id ); - self::$logger->log ( 'Update Piwik site: WordPress site ' . ($isCurrent ? get_bloginfo ( 'url' ) : get_blog_details ( $blogId )->siteurl) ); - } - - /** - * Update a site's tracking code - * - * @param int $siteId - * which Piwik site to updated - * @param int $blogId - * which blog's Piwik site ID to get, default is the current blog - * @return string tracking code - */ - public function updateTrackingCode($siteId = false, $blogId = null) { - if (!$siteId) - $siteId = $this->getPiwikSiteId (); - if (self::$settings->getGlobalOption ( 'track_mode' ) == 'disabled' || self::$settings->getGlobalOption ( 'track_mode' ) == 'manually') - return false; - $id = WP_Piwik\Request::register ( 'SitesManager.getJavascriptTag', array ( - 'idSite' => $siteId, - 'mergeSubdomains' => self::$settings->getGlobalOption ( 'track_across' ) ? 1 : 0, - 'mergeAliasUrls' => self::$settings->getGlobalOption ( 'track_across_alias' ) ? 1 : 0, - 'disableCookies' => self::$settings->getGlobalOption ( 'disable_cookies' ) ? 1 : 0, - 'crossDomain' => self::$settings->getGlobalOption ( 'track_crossdomain_linking' ) ? 1 : 0, - 'trackNoScript' => 1 - ) ); - $code = $this->request ( $id ); - if (is_array($code) && isset($code['value'])) - $code = $code['value']; - $result = !is_array ( $code ) ? html_entity_decode ( $code ) : ''; - self::$logger->log ( 'Delivered tracking code: ' . $result ); - $result = WP_Piwik\TrackingCode::prepareTrackingCode ( $result, self::$settings, self::$logger, true ); - if (isset ( $result ['script'] ) && ! empty ( $result ['script'] )) { - self::$settings->setOption ( 'tracking_code', $result ['script'], $blogId ); - self::$settings->setOption ( 'noscript_code', $result ['noscript'], $blogId ); - self::$settings->setGlobalOption ( 'proxy_url', $result ['proxy'], $blogId ); - } - return $result; - } - - /** - * Update Piwik site if blog name changes - * - * @param string $oldValue - * old blog name - * @param string $newValue - * new blog name - */ - public function onBlogNameChange($oldValue, $newValue = null) { - $this->updatePiwikSite ( self::$settings->getOption ( 'site_id' ) ); - } - - /** - * Update Piwik site if blog URL changes - * - * @param string $oldValue - * old blog URL - * @param string $newValue - * new blog URL - */ - public function onSiteUrlChange($oldValue, $newValue = null) { - $this->updatePiwikSite ( self::$settings->getOption ( 'site_id' ) ); - } - - /** - * Register stats page meta boxes - * - * @param mixed $statsPageId - * WordPress stats page ID - */ - public function onloadStatsPage($statsPageId) { - if (self::$settings->getGlobalOption ( 'disable_timelimit' )) - set_time_limit ( 0 ); - wp_enqueue_script ( 'common' ); - wp_enqueue_script ( 'wp-lists' ); - wp_enqueue_script ( 'postbox' ); - wp_enqueue_script ( 'wp-piwik', $this->getPluginURL () . 'js/wp-piwik.js', array (), self::$version, true ); - wp_enqueue_script ( 'wp-piwik-jqplot', $this->getPluginURL () . 'js/jqplot/wp-piwik.jqplot.js', array ( - 'jquery' - ), self::$version ); - new \WP_Piwik\Widget\Chart ( $this, self::$settings, $this->statsPageId ); - new \WP_Piwik\Widget\Visitors ( $this, self::$settings, $this->statsPageId ); - new \WP_Piwik\Widget\Overview ( $this, self::$settings, $this->statsPageId ); - if (self::$settings->getGlobalOption ( 'stats_ecommerce' )) { - new \WP_Piwik\Widget\Ecommerce ($this, self::$settings, $this->statsPageId); - new \WP_Piwik\Widget\Items ($this, self::$settings, $this->statsPageId); - new \WP_Piwik\Widget\ItemsCategory ($this, self::$settings, $this->statsPageId); - } - if (self::$settings->getGlobalOption ( 'stats_seo' )) - new \WP_Piwik\Widget\Seo ( $this, self::$settings, $this->statsPageId ); - new \WP_Piwik\Widget\Pages ( $this, self::$settings, $this->statsPageId ); - new \WP_Piwik\Widget\Keywords ( $this, self::$settings, $this->statsPageId ); - new \WP_Piwik\Widget\Referrers ( $this, self::$settings, $this->statsPageId ); - new \WP_Piwik\Widget\Plugins ( $this, self::$settings, $this->statsPageId ); - new \WP_Piwik\Widget\Search ( $this, self::$settings, $this->statsPageId ); - new \WP_Piwik\Widget\Noresult ( $this, self::$settings, $this->statsPageId ); - new \WP_Piwik\Widget\Browsers ( $this, self::$settings, $this->statsPageId ); - new \WP_Piwik\Widget\BrowserDetails ( $this, self::$settings, $this->statsPageId ); - new \WP_Piwik\Widget\Screens ( $this, self::$settings, $this->statsPageId ); - new \WP_Piwik\Widget\Types ( $this, self::$settings, $this->statsPageId ); - new \WP_Piwik\Widget\Models ( $this, self::$settings, $this->statsPageId ); - new \WP_Piwik\Widget\Systems ( $this, self::$settings, $this->statsPageId ); - new \WP_Piwik\Widget\SystemDetails ( $this, self::$settings, $this->statsPageId ); - new \WP_Piwik\Widget\City ( $this, self::$settings, $this->statsPageId ); - new \WP_Piwik\Widget\Country ( $this, self::$settings, $this->statsPageId ); - } - - /** - * Add per post statistics to a post's page - * - * @param mixed $postPageId - * WordPress post page ID - */ - public function onloadPostPage($postPageId) { - global $post; - $postUrl = get_permalink ( $post->ID ); - $this->log ( 'Load per post statistics: ' . $postUrl ); - $locations = apply_filters( 'wp-piwik_meta_boxes_locations', array( 'post', 'page', 'custom_post_type' ) ); - array ( - new \WP_Piwik\Widget\Post ( $this, self::$settings, $locations, 'side', 'default', array ( - 'url' => $postUrl - ) ), - 'show' - ); - } - - /** - * Stats page changes by POST submit - * - * @see http://tinyurl.com/5r5vnzs - */ - function onStatsPageSaveChanges() { - if (! current_user_can ( 'manage_options' )) - wp_die ( __ ( 'Cheatin’ uh?' ) ); - check_admin_referer ( 'wp-piwik_stats' ); - wp_redirect ( $_POST ['_wp_http_referer'] ); - } - - /** - * Get option value, choose method depending on network mode - * - * @param string $option option key - * @return string option value - */ - private function getWordPressOption($option, $default = null) { - return ($this->isNetworkMode () ? get_site_option ( $option, $default ) : get_option ( $option, $default )); - } - - /** - * Delete option, choose method depending on network mode - * - * @param string $option option key - */ - private function deleteWordPressOption($option) { - if ( $this->isNetworkMode () ) - delete_site_option ( $option ); - else - delete_option ( $option ); - } - - /** - * Set option value, choose method depending on network mode - * - * @param string $option option key - * @param mixed $value option value - */ - private function updateWordPressOption($option, $value) { - if ( $this->isNetworkMode () ) - update_site_option ( $option, $value ); - else - update_option ( $option, $value ); - } - - /** - * Check if WP-Piwik options page - * - * @return boolean True if current page is WP-Piwik's option page - */ - public static function isValidOptionsPost() { - return is_admin() && check_admin_referer( 'wp-piwik_settings' ) && current_user_can( 'manage_options' ) ; - } -} diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Admin.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Admin.php deleted file mode 100644 index 23d83db..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Admin.php +++ /dev/null @@ -1,26 +0,0 @@ -getPluginURL().'css/wp-piwik.css', array(), self::$wpPiwik->getPluginVersion()); - } - - public function onLoad() {} - - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Admin/Network.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Admin/Network.php deleted file mode 100644 index b60575e..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Admin/Network.php +++ /dev/null @@ -1,25 +0,0 @@ -getPluginURL().'js/wp-piwik.js', array(), self::$wpPiwik->getPluginVersion(), true); - wp_enqueue_script('wp-piwik-jqplot', self::$wpPiwik->getPluginURL().'js/jqplot/wp-piwik.jqplot.js',array('jquery'), self::$wpPiwik->getPluginVersion()); - } - - public function extendAdminHeader() { - echo ''; - echo ''; - echo ''; - } - - public function onLoad() { - self::$wpPiwik->onloadStatsPage(self::$pageID); - } - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Admin/Settings.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Admin/Settings.php deleted file mode 100644 index 4f9f33f..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Admin/Settings.php +++ /dev/null @@ -1,720 +0,0 @@ - - */ -class Settings extends \WP_Piwik\Admin { - - /** - * Builds and displays the settings page - */ - public function show() { - if (isset($_GET['sitebrowser']) && $_GET['sitebrowser']) { - new \WP_Piwik\Admin\Sitebrowser(self::$wpPiwik); - return; - } - if (isset($_GET['clear']) && $_GET['clear']) { - $this->clear($_GET['clear'] == 2); - self::$wpPiwik->resetRequest(); - echo '
'; - return; - } elseif (self::$wpPiwik->isConfigSubmitted()) { - $this->showBox ( 'updated', 'yes', __ ( 'Changes saved.' ) ); - self::$wpPiwik->resetRequest(); - self::$wpPiwik->updateTrackingCode(); - } - global $wp_roles; - ?> -
- getHeadline ( 1, 'admin-generic', 'Settings', true ); - if (isset($_GET['testscript']) && $_GET['testscript']) - $this->runTestscript(); - ?> - isConfigured ()) { - $piwikVersion = self::$wpPiwik->request ( 'global.getPiwikVersion' ); - if (is_array ( $piwikVersion ) && isset( $piwikVersion['value'] )) - $piwikVersion = $piwikVersion['value']; - if (! empty ( $piwikVersion ) && !is_array( $piwikVersion )) - $this->showDonation(); - } - ?> -
- - - - - '; - printf ( '', __ ( 'Thanks for using WP-Matomo!', 'wp-piwik' ) ); - if (self::$wpPiwik->isConfigured ()) { - if (! empty ( $piwikVersion ) && !is_array( $piwikVersion )) { - $this->showText ( sprintf ( __ ( 'WP-Matomo %s is successfully connected to Matomo %s.', 'wp-piwik' ), self::$wpPiwik->getPluginVersion (), $piwikVersion ) . ' ' . (! self::$wpPiwik->isNetworkMode () ? sprintf ( __ ( 'You are running WordPress %s.', 'wp-piwik' ), get_bloginfo ( 'version' ) ) : sprintf ( __ ( 'You are running a WordPress %s blog network (WPMU). WP-Matomo will handle your sites as different websites.', 'wp-piwik' ), get_bloginfo ( 'version' ) )) ); - } else { - $errorMessage = \WP_Piwik\Request::getLastError(); - if ( empty( $errorMessage ) ) - $this->showBox ( 'error', 'no', sprintf ( __ ( 'WP-Matomo %s was not able to connect to Matomo using your configuration. Check the »Connect to Matomo« section below.', 'wp-piwik' ), self::$wpPiwik->getPluginVersion () ) ); - else - $this->showBox ( 'error', 'no', sprintf ( __ ( 'WP-Matomo %s was not able to connect to Matomo using your configuration. During connection the following error occured:
%s', 'wp-piwik' ), self::$wpPiwik->getPluginVersion (), $errorMessage ) ); - } - } else - $this->showBox ( 'error', 'no', sprintf ( __ ( 'WP-Matomo %s has to be connected to Matomo first. Check the »Connect to Matomo« section below.', 'wp-piwik' ), self::$wpPiwik->getPluginVersion () ) ); - - $tabs ['connect'] = array ( - 'icon' => 'admin-plugins', - 'name' => __('Connect to Matomo', 'wp-piwik') - ); - if (self::$wpPiwik->isConfigured ()) { - $tabs ['statistics'] = array ( - 'icon' => 'chart-pie', - 'name' => __('Show Statistics', 'wp-piwik') - ); - $tabs ['tracking'] = array ( - 'icon' => 'location-alt', - 'name' => __('Enable Tracking', 'wp-piwik') - ); - } - $tabs ['expert'] = array ( - 'icon' => 'shield', - 'name' => __('Expert Settings', 'wp-piwik') - ); - $tabs ['support'] = array ( - 'icon' => 'lightbulb', - 'name' => __('Support', 'wp-piwik') - ); - $tabs ['credits'] = array ( - 'icon' => 'groups', - 'name' => __('Credits', 'wp-piwik') - ); - - echo '

%s
'; - - if (! self::$wpPiwik->isConfigured ()) - $this->showBox ( 'updated', 'info', sprintf ( '%s %s %s %s.', __ ( 'WP-Matomo is a WordPress plugin to show a selection of Matomo stats in your WordPress admin dashboard and to add and configure your Matomo tracking code. To use this you will need your own Matomo instance. If you do not already have a Matomo setup, you have two simple options: use either', 'wp-piwik' ), 'http://piwik.org/', __ ( 'a self-hosted Matomo', 'wp-piwik' ), __ ( 'or', 'wp-piwik' ), 'https://www.innocraft.cloud/?pk_campaign=WP-Matomo', __ ( 'a cloud-hosted Matomo by InnoCraft', 'wp-piwik' ) ) ); - - if (! function_exists ( 'curl_init' ) && ! ini_get ( 'allow_url_fopen' )) - $this->showBox ( 'error', 'no', __ ( 'Neither cURL nor fopen are available. So WP-Matomo can not use the HTTP API and not connect to InnoCraft Cloud.' ) . ' ' . sprintf ( '%s.', 'https://wordpress.org/plugins/wp-piwik/faq/', __ ( 'More information', 'wp-piwik' ) ) ); - - $description = sprintf ( '%s
%s: %s
%s: %s
%s: %s', __ ( 'You can choose between three connection methods:', 'wp-piwik' ), __ ( 'Self-hosted (HTTP API, default)', 'wp-piwik' ), __ ( 'This is the default option for a self-hosted Matomo and should work for most configurations. WP-Matomo will connect to Matomo using http(s).', 'wp-piwik' ), __ ( 'Self-hosted (PHP API)', 'wp-piwik' ), __ ( 'Choose this, if your self-hosted Matomo and WordPress are running on the same machine and you know the full server path to your Matomo instance.', 'wp-piwik' ), __ ( 'Cloud-hosted', 'wp-piwik' ), __ ( 'If you are using a cloud-hosted Matomo by InnoCraft, you can simply use this option. Be carefull to choose the option which fits to your cloud domain (matomo.cloud or innocraft.cloud).', 'wp-piwik' ) ); - $this->showSelect ( 'piwik_mode', __ ( 'Matomo Mode', 'wp-piwik' ), array ( - 'disabled' => __ ( 'Disabled (WP-Matomo will not connect to Matomo)', 'wp-piwik' ), - 'http' => __ ( 'Self-hosted (HTTP API, default)', 'wp-piwik' ), - 'php' => __ ( 'Self-hosted (PHP API)', 'wp-piwik' ), - 'cloud-matomo' => __('Cloud-hosted (Innocraft Cloud, *.matomo.cloud)', 'wp-piwik'), - 'cloud' => __ ( 'Cloud-hosted (InnoCraft Cloud, *.innocraft.cloud)', 'wp-piwik' ) - ), $description, '$j(\'tr.wp-piwik-mode-option\').addClass(\'hidden\'); $j(\'#wp-piwik-mode-option-\' + $j(\'#piwik_mode\').val()).removeClass(\'hidden\');', false, '', self::$wpPiwik->isConfigured () ); - - $this->showInput ( 'piwik_url', __ ( 'Matomo URL', 'wp-piwik' ), __( 'Enter your Matomo URL. This is the same URL you use to access your Matomo instance, e.g. http://www.example.com/matomo/.', 'wp-piwik' ), self::$settings->getGlobalOption ( 'piwik_mode' ) != 'http', 'wp-piwik-mode-option', 'http', self::$wpPiwik->isConfigured (), true ); - $this->showInput ( 'piwik_path', __ ( 'Matomo path', 'wp-piwik' ), __( 'Enter the file path to your Matomo instance, e.g. /var/www/matomo/.', 'wp-piwik' ), self::$settings->getGlobalOption ( 'piwik_mode' ) != 'php', 'wp-piwik-mode-option', 'php', self::$wpPiwik->isConfigured (), true ); - $this->showInput ( 'piwik_user', __ ( 'Innocraft subdomain', 'wp-piwik' ), __( 'Enter your InnoCraft Cloud subdomain. It is also part of your URL: https://SUBDOMAIN.innocraft.cloud.', 'wp-piwik' ), self::$settings->getGlobalOption ( 'piwik_mode' ) != 'cloud', 'wp-piwik-mode-option', 'cloud', self::$wpPiwik->isConfigured () ); - $this->showInput ( 'matomo_user', __ ( 'Matomo subdomain', 'wp-piwik' ), __( 'Enter your Matomo Cloud subdomain. It is also part of your URL: https://SUBDOMAIN.matomo.cloud.', 'wp-piwik' ), self::$settings->getGlobalOption ( 'piwik_mode' ) != 'cloud-matomo', 'wp-piwik-mode-option', 'cloud-matomo', self::$wpPiwik->isConfigured () ); - $this->showInput ( 'piwik_token', __ ( 'Auth token', 'wp-piwik' ), __( 'Enter your Matomo auth token here. It is an alphanumerical code like 0a1b2c34d56e78901fa2bc3d45678efa.', 'wp-piwik' ).' '.sprintf ( __ ( 'See %sWP-Matomo FAQ%s.', 'wp-piwik' ), '', '' ), false, '', '', self::$wpPiwik->isConfigured (), true ); - - // Site configuration - $piwikSiteId = self::$wpPiwik->isConfigured () ? self::$wpPiwik->getPiwikSiteId () : false; - if (! self::$wpPiwik->isNetworkMode() ) { - $this->showCheckbox ( 'auto_site_config', __ ( 'Auto config', 'wp-piwik' ), __ ( 'Check this to automatically choose your blog from your Matomo sites by URL. If your blog is not added to Matomo yet, WP-Matomo will add a new site.', 'wp-piwik' ), false, '$j(\'tr.wp-piwik-auto-option\').toggle(\'hidden\');' . ($piwikSiteId ? '$j(\'#site_id\').val(' . $piwikSiteId . ');' : '') ); - if (self::$wpPiwik->isConfigured ()) { - $piwikSiteList = self::$wpPiwik->getPiwikSiteDetails (); - if (isset($piwikSiteList['result']) && $piwikSiteList['result'] == 'error') { - $this->showBox ( 'error', 'no', sprintf ( __ ( 'WP-Matomo %s was not able to get sites with at least view access:
%s', 'wp-piwik' ), self::$wpPiwik->getPluginVersion (), $errorMessage ) ); - } else { - if (is_array($piwikSiteList)) - foreach ($piwikSiteList as $details) - $piwikSiteDetails[$details['idsite']] = $details; - unset($piwikSiteList); - if ($piwikSiteId != 'n/a' && isset($piwikSiteDetails) && is_array($piwikSiteDetails)) - $piwikSiteDescription = $piwikSiteDetails [$piwikSiteId] ['name'] . ' (' . $piwikSiteDetails [$piwikSiteId] ['main_url'] . ')'; - else - $piwikSiteDescription = 'n/a'; - echo ''; - if (isset ($piwikSiteDetails) && is_array($piwikSiteDetails)) - foreach ($piwikSiteDetails as $key => $siteData) - $siteList [$siteData['idsite']] = $siteData ['name'] . ' (' . $siteData ['main_url'] . ')'; - if (isset($siteList)) - $this->showSelect('site_id', __('Select site', 'wp-piwik'), $siteList, 'Choose the Matomo site corresponding to this blog.', '', self::$settings->getGlobalOption('auto_site_config'), 'wp-piwik-auto-option', true, false); - } - } - } else echo ''; - - echo $submitButton; - - echo '
' . __('Determined site', 'wp-piwik') . ':' . $piwikSiteDescription . '
'; - // Stats configuration - $this->showSelect ( 'default_date', __ ( 'Matomo default date', 'wp-piwik' ), array ( - 'today' => __ ( 'Today', 'wp-piwik' ), - 'yesterday' => __ ( 'Yesterday', 'wp-piwik' ), - 'current_month' => __ ( 'Current month', 'wp-piwik' ), - 'last_month' => __ ( 'Last month', 'wp-piwik' ), - 'current_week' => __ ( 'Current week', 'wp-piwik' ), - 'last_week' => __ ( 'Last week', 'wp-piwik' ) - ), __ ( 'Default date shown on statistics page.', 'wp-piwik' ) ); - - $this->showCheckbox ( 'stats_seo', __ ( 'Show SEO data', 'wp-piwik' ), __ ( 'Display SEO ranking data on statistics page.', 'wp-piwik' ) . ' (' . __ ( 'Slow!', 'wp-piwik' ) . ')' ); - $this->showCheckbox ( 'stats_ecommerce', __ ( 'Show e-commerce data', 'wp-piwik' ), __ ( 'Display e-commerce data on statistics page.', 'wp-piwik' ) ); - - $this->showSelect ( 'dashboard_widget', __ ( 'Dashboard overview', 'wp-piwik' ), array ( - 'disabled' => __ ( 'Disabled', 'wp-piwik' ), - 'yesterday' => __ ( 'Yesterday', 'wp-piwik' ), - 'today' => __ ( 'Today', 'wp-piwik' ), - 'last30' => __ ( 'Last 30 days', 'wp-piwik' ) - ), __ ( 'Enable WP-Matomo dashboard widget "Overview".', 'wp-piwik' ) ); - - $this->showCheckbox ( 'dashboard_chart', __ ( 'Dashboard graph', 'wp-piwik' ), __ ( 'Enable WP-Matomo dashboard widget "Graph".', 'wp-piwik' ) ); - - $this->showCheckbox ( 'dashboard_seo', __ ( 'Dashboard SEO', 'wp-piwik' ), __ ( 'Enable WP-Matomo dashboard widget "SEO".', 'wp-piwik' ) . ' (' . __ ( 'Slow!', 'wp-piwik' ) . ')' ); - - $this->showCheckbox ( 'dashboard_ecommerce', __ ( 'Dashboard e-commerce', 'wp-piwik' ), __ ( 'Enable WP-Matomo dashboard widget "E-commerce".', 'wp-piwik' ) ); - - $this->showCheckbox ( 'toolbar', __ ( 'Show graph on WordPress Toolbar', 'wp-piwik' ), __ ( 'Display a last 30 days visitor graph on WordPress\' toolbar.', 'wp-piwik' ) ); - - echo ''; - - $this->showCheckbox ( 'perpost_stats', __ ( 'Show per post stats', 'wp-piwik' ), __ ( 'Show stats about single posts at the post edit admin page.', 'wp-piwik' ) ); - - $this->showCheckbox ( 'piwik_shortcut', __ ( 'Matomo shortcut', 'wp-piwik' ), __ ( 'Display a shortcut to Matomo itself.', 'wp-piwik' ) ); - - $this->showInput ( 'plugin_display_name', __ ( 'WP-Matomo display name', 'wp-piwik' ), __ ( 'Plugin name shown in WordPress.', 'wp-piwik' ) ); - - $this->showCheckbox ( 'shortcodes', __ ( 'Enable shortcodes', 'wp-piwik' ), __ ( 'Enable shortcodes in post or page content.', 'wp-piwik' ) ); - - echo $submitButton; - - echo ''; - - // Tracking Configuration - $isNotTracking = self::$settings->getGlobalOption ( 'track_mode' ) == 'disabled'; - $isNotGeneratedTracking = $isNotTracking || self::$settings->getGlobalOption ( 'track_mode' ) == 'manually'; - $fullGeneratedTrackingGroup = 'wp-piwik-track-option wp-piwik-track-option-default wp-piwik-track-option-js wp-piwik-track-option-proxy'; - - $description = sprintf ( '%s
%s: %s
%s: %s
%s: %s
%s: %s
%s: %s', __ ( 'You can choose between four tracking code modes:', 'wp-piwik' ), __ ( 'Disabled', 'wp-piwik' ), __ ( 'WP-Matomo will not add the tracking code. Use this, if you want to add the tracking code to your template files or you use another plugin to add the tracking code.', 'wp-piwik' ), __ ( 'Default tracking', 'wp-piwik' ), __ ( 'WP-Matomo will use Matomo\'s standard tracking code.', 'wp-piwik' ), __ ( 'Use js/index.php', 'wp-piwik' ), __ ( 'You can choose this tracking code, to deliver a minified proxy code and to avoid using the files called piwik.js or piwik.php.', 'wp-piwik' ).' '.sprintf( __( 'See %sreadme file%s.', 'wp-piwik' ), '', ''), __ ( 'Use proxy script', 'wp-piwik' ), __ ( 'Use this tracking code to not reveal the Matomo server URL.', 'wp-piwik' ) . ' ' . sprintf ( __ ( 'See %sMatomo FAQ%s.', 'wp-piwik' ), '', '' ) , __ ( 'Enter manually', 'wp-piwik' ), __ ( 'Enter your own tracking code manually. You can choose one of the prior options, pre-configure your tracking code and switch to manually editing at last.', 'wp-piwik' ).( self::$wpPiwik->isNetworkMode() ? ' '.__ ( 'Use the placeholder {ID} to add the Matomo site ID.', 'wp-piwik' ) : '' ) ); - $this->showSelect ( 'track_mode', __ ( 'Add tracking code', 'wp-piwik' ), array ( - 'disabled' => __ ( 'Disabled', 'wp-piwik' ), - 'default' => __ ( 'Default tracking', 'wp-piwik' ), - 'js' => __ ( 'Use js/index.php', 'wp-piwik' ), - 'proxy' => __ ( 'Use proxy script', 'wp-piwik' ), - 'manually' => __ ( 'Enter manually', 'wp-piwik' ) - ), $description, '$j(\'tr.wp-piwik-track-option\').addClass(\'hidden\'); $j(\'tr.wp-piwik-track-option-\' + $j(\'#track_mode\').val()).removeClass(\'hidden\'); $j(\'#tracking_code, #noscript_code\').prop(\'readonly\', $j(\'#track_mode\').val() != \'manually\');' ); - - $this->showTextarea ( 'tracking_code', __ ( 'Tracking code', 'wp-piwik' ), 15, 'This is a preview of your current tracking code. If you choose to enter your tracking code manually, you can change it here.', $isNotTracking, 'wp-piwik-track-option wp-piwik-track-option-default wp-piwik-track-option-js wp-piwik-track-option-proxy wp-piwik-track-option-manually', true, '', (self::$settings->getGlobalOption ( 'track_mode' ) != 'manually'), false ); - - $this->showSelect ( 'track_codeposition', __ ( 'JavaScript code position', 'wp-piwik' ), array ( - 'footer' => __ ( 'Footer', 'wp-piwik' ), - 'header' => __ ( 'Header', 'wp-piwik' ) - ), __ ( 'Choose whether the JavaScript code is added to the footer or the header.', 'wp-piwik' ), '', $isNotTracking, 'wp-piwik-track-option wp-piwik-track-option-default wp-piwik-track-option-js wp-piwik-track-option-proxy wp-piwik-track-option-manually' ); - - $this->showTextarea ( 'noscript_code', __ ( 'Noscript code', 'wp-piwik' ), 2, 'This is a preview of your <noscript> code which is part of your tracking code.', self::$settings->getGlobalOption ( 'track_mode' ) == 'proxy', 'wp-piwik-track-option wp-piwik-track-option-default wp-piwik-track-option-js wp-piwik-track-option-manually', true, '', (self::$settings->getGlobalOption ( 'track_mode' ) != 'manually'), false ); - - $this->showCheckbox ( 'track_noscript', __ ( 'Add <noscript>', 'wp-piwik' ), __ ( 'Adds the <noscript> code to your footer.', 'wp-piwik' ) . ' ' . __ ( 'Disabled in proxy mode.', 'wp-piwik' ), self::$settings->getGlobalOption ( 'track_mode' ) == 'proxy', 'wp-piwik-track-option wp-piwik-track-option-default wp-piwik-track-option-js wp-piwik-track-option-manually' ); - - $this->showCheckbox ( 'track_nojavascript', __ ( 'Add rec parameter to noscript code', 'wp-piwik' ), __ ( 'Enable tracking for visitors without JavaScript (not recommended).', 'wp-piwik' ) . ' ' . sprintf ( __ ( 'See %sMatomo FAQ%s.', 'wp-piwik' ), '', '' ) . ' ' . __ ( 'Disabled in proxy mode.', 'wp-piwik' ), self::$settings->getGlobalOption ( 'track_mode' ) == 'proxy', 'wp-piwik-track-option wp-piwik-track-option-default wp-piwik-track-option-js wp-piwik-track-option-manually' ); - - $this->showSelect ( 'track_content', __ ( 'Enable content tracking', 'wp-piwik' ), array ( - 'disabled' => __ ( 'Disabled', 'wp-piwik' ), - 'all' => __ ( 'Track all content blocks', 'wp-piwik' ), - 'visible' => __ ( 'Track only visible content blocks', 'wp-piwik' ) - ), __ ( 'Content tracking allows you to track interaction with the content of a web page or application.' ) . ' ' . sprintf ( __ ( 'See %sMatomo documentation%s.', 'wp-piwik' ), '', '' ), '', $isNotTracking, $fullGeneratedTrackingGroup . ' wp-piwik-track-option-manually' ); - - $this->showCheckbox ( 'track_search', __ ( 'Track search', 'wp-piwik' ), __ ( 'Use Matomo\'s advanced Site Search Analytics feature.' ) . ' ' . sprintf ( __ ( 'See %sMatomo documentation%s.', 'wp-piwik' ), '', '' ), $isNotTracking, $fullGeneratedTrackingGroup . ' wp-piwik-track-option-manually' ); - - $this->showCheckbox ( 'track_404', __ ( 'Track 404', 'wp-piwik' ), __ ( 'WP-Matomo can automatically add a 404-category to track 404-page-visits.', 'wp-piwik' ) . ' ' . sprintf ( __ ( 'See %sMatomo FAQ%s.', 'wp-piwik' ), '', '' ), $isNotTracking, $fullGeneratedTrackingGroup . ' wp-piwik-track-option-manually' ); - - echo ''; - echo ''; - - $this->showCheckbox ( 'add_customvars_box', __ ( 'Show custom variables box', 'wp-piwik' ), __ ( ' Show a "custom variables" edit box on post edit page.', 'wp-piwik' ) . ' ' . sprintf ( __ ( 'See %sMatomo documentation%s.', 'wp-piwik' ), '', '' ), $isNotGeneratedTracking, $fullGeneratedTrackingGroup . ' wp-piwik-track-option-manually' ); - - $this->showInput ( 'add_download_extensions', __ ( 'Add new file types for download tracking', 'wp-piwik' ), __ ( 'Add file extensions for download tracking, divided by a vertical bar (|).', 'wp-piwik' ) . ' ' . sprintf ( __ ( 'See %sMatomo documentation%s.', 'wp-piwik' ), '', '' ), $isNotGeneratedTracking, $fullGeneratedTrackingGroup ); - - $this->showCheckbox ( 'disable_cookies', __ ( 'Disable cookies', 'wp-piwik' ), __ ( 'Disable all tracking cookies for a visitor.', 'wp-piwik' ), $isNotGeneratedTracking, $fullGeneratedTrackingGroup ); - - $this->showCheckbox ( 'limit_cookies', __ ( 'Limit cookie lifetime', 'wp-piwik' ), __ ( 'You can limit the cookie lifetime to avoid tracking your users over a longer period as necessary.', 'wp-piwik' ), $isNotGeneratedTracking, $fullGeneratedTrackingGroup, true, '$j(\'tr.wp-piwik-cookielifetime-option\').toggleClass(\'wp-piwik-hidden\');' ); - - $this->showInput ( 'limit_cookies_visitor', __ ( 'Visitor timeout (seconds)', 'wp-piwik' ), false, $isNotGeneratedTracking || ! self::$settings->getGlobalOption ( 'limit_cookies' ), $fullGeneratedTrackingGroup.' wp-piwik-cookielifetime-option'. (self::$settings->getGlobalOption ( 'limit_cookies' )? '': ' wp-piwik-hidden') ); - - $this->showInput ( 'limit_cookies_session', __ ( 'Session timeout (seconds)', 'wp-piwik' ), false, $isNotGeneratedTracking || ! self::$settings->getGlobalOption ( 'limit_cookies' ), $fullGeneratedTrackingGroup .' wp-piwik-cookielifetime-option'. (self::$settings->getGlobalOption ( 'limit_cookies' )? '': ' wp-piwik-hidden') ); - - $this->showInput ( 'limit_cookies_referral', __ ( 'Referral timeout (seconds)', 'wp-piwik' ), false, $isNotGeneratedTracking || ! self::$settings->getGlobalOption ( 'limit_cookies' ), $fullGeneratedTrackingGroup .' wp-piwik-cookielifetime-option'. (self::$settings->getGlobalOption ( 'limit_cookies' )? '': ' wp-piwik-hidden') ); - - $this->showCheckbox ( 'track_admin', __ ( 'Track admin pages', 'wp-piwik' ), __ ( 'Enable to track users on admin pages (remember to configure the tracking filter appropriately).', 'wp-piwik' ), $isNotTracking, $fullGeneratedTrackingGroup . ' wp-piwik-track-option-manually' ); - - echo ''; - echo ''; - - $this->showCheckbox ( 'track_across', __ ( 'Track subdomains in the same website', 'wp-piwik' ), __ ( 'Adds *.-prefix to cookie domain.', 'wp-piwik' ) . ' ' . sprintf ( __ ( 'See %sMatomo documentation%s.', 'wp-piwik' ), '', '' ), $isNotGeneratedTracking, $fullGeneratedTrackingGroup ); - - $this->showCheckbox ( 'track_across_alias', __ ( 'Do not count subdomains as outlink', 'wp-piwik' ), __ ( 'Adds *.-prefix to tracked domain.', 'wp-piwik' ) . ' ' . sprintf ( __ ( 'See %sMatomo documentation%s.', 'wp-piwik' ), '', '' ), $isNotGeneratedTracking, $fullGeneratedTrackingGroup ); - - $this->showCheckbox ( 'track_crossdomain_linking', __ ( 'Enable cross domain linking', 'wp-piwik' ), __ ( 'When enabled, it will make sure to use the same visitor ID for the same visitor across several domains. This works only when this feature is enabled because the visitor ID is stored in a cookie and cannot be read on the other domain by default. When this feature is enabled, it will append a URL parameter "pk_vid" that contains the visitor ID when a user clicks on a URL that belongs to one of your domains. For this feature to work, you also have to configure which domains should be treated as local in your Matomo website settings. This feature requires Matomo 3.0.2.', 'wp-piwik' ), self::$settings->getGlobalOption ( 'track_mode' ) == 'proxy', 'wp-piwik-track-option wp-piwik-track-option-default wp-piwik-track-option-js wp-piwik-track-option-manually'); - - $this->showCheckbox ( 'track_feed', __ ( 'Track RSS feeds', 'wp-piwik' ), __ ( 'Enable to track posts in feeds via tracking pixel.', 'wp-piwik' ), $isNotTracking, $fullGeneratedTrackingGroup . ' wp-piwik-track-option-manually' ); - - $this->showCheckbox ( 'track_feed_addcampaign', __ ( 'Track RSS feed links as campaign', 'wp-piwik' ), __ ( 'This will add Matomo campaign parameters to the RSS feed links.' . ' ' . sprintf ( __ ( 'See %sMatomo documentation%s.', 'wp-piwik' ), '', '' ), 'wp-piwik' ), $isNotTracking, $fullGeneratedTrackingGroup . ' wp-piwik-track-option-manually', true, '$j(\'tr.wp-piwik-feed_campaign-option\').toggle(\'hidden\');' ); - - $this->showInput ( 'track_feed_campaign', __ ( 'RSS feed campaign', 'wp-piwik' ), __ ( 'Keyword: post name.', 'wp-piwik' ), $isNotGeneratedTracking || ! self::$settings->getGlobalOption ( 'track_feed_addcampaign' ), $fullGeneratedTrackingGroup . ' wp-piwik-feed_campaign-option' ); - - $this->showInput ( 'track_heartbeat', __ ( 'Enable heartbeat timer', 'wp-piwik' ), __ ( 'Enable a heartbeat timer to get more accurate visit lengths by sending periodical HTTP ping requests as long as the site is opened. Enter the time between the pings in seconds (Matomo default: 15) to enable or 0 to disable this feature. Note: This will cause a lot of additional HTTP requests on your site.', 'wp-piwik' ), $isNotGeneratedTracking, $fullGeneratedTrackingGroup ); - - $this->showSelect ( 'track_user_id', __ ( 'User ID Tracking', 'wp-piwik' ), array ( - 'disabled' => __ ( 'Disabled', 'wp-piwik' ), - 'uid' => __ ( 'WP User ID', 'wp-piwik' ), - 'email' => __ ( 'Email Address', 'wp-piwik' ), - 'username' => __ ( 'Username', 'wp-piwik' ), - 'displayname' => __ ( 'Display Name (Not Recommended!)', 'wp-piwik' ) - ), __ ( 'When a user is logged in to WordPress, track their "User ID". You can select which field from the User\'s profile is tracked as the "User ID". When enabled, Tracking based on Email Address is recommended.', 'wp-piwik' ), '', $isNotTracking, $fullGeneratedTrackingGroup ); - - echo $submitButton; - echo ''; - - $this->showText ( __ ( 'Usually, you do not need to change these settings. If you want to do so, you should know what you do or you got an expert\'s advice.', 'wp-piwik' ) ); - - $this->showCheckbox ( 'cache', __ ( 'Enable cache', 'wp-piwik' ), __ ( 'Cache API calls, which not contain today\'s values, for a week.', 'wp-piwik' ) ); - - if (function_exists('curl_init') && ini_get('allow_url_fopen')) - $this->showSelect ( 'http_connection', __ ( 'HTTP connection via', 'wp-piwik' ), array ( - 'curl' => __ ( 'cURL', 'wp-piwik' ), - 'fopen' => __ ( 'fopen', 'wp-piwik' ) - ), __('Choose whether WP-Matomo should use cURL or fopen to connect to Matomo in HTTP or Cloud mode.', 'wp-piwik' ) ); - - $this->showSelect ( 'http_method', __ ( 'HTTP method', 'wp-piwik' ), array ( - 'post' => __ ( 'POST', 'wp-piwik' ), - 'get' => __ ( 'GET', 'wp-piwik' ) - ), __('Choose whether WP-Matomo should use POST or GET in HTTP or Cloud mode.', 'wp-piwik' ) ); - - $this->showCheckbox ( 'disable_timelimit', __ ( 'Disable time limit', 'wp-piwik' ), __ ( 'Use set_time_limit(0) if stats page causes a time out.', 'wp-piwik' ) ); - - $this->showInput ( 'filter_limit', __ ( 'Filter limit', 'wp-piwik' ), __ ( 'Use filter_limit if you need to get more than 100 results per page.', 'wp-piwik' ) ); - - $this->showInput ( 'connection_timeout', __ ( 'Connection timeout', 'wp-piwik' ), 'Define a connection timeout for all HTTP requests done by WP-Matomo in seconds.' ); - - $this->showCheckbox ( 'disable_ssl_verify', __ ( 'Disable SSL peer verification', 'wp-piwik' ), '(' . __ ( 'not recommended', 'wp-piwik' ) . ')' ); - $this->showCheckbox ( 'disable_ssl_verify_host', __ ( 'Disable SSL host verification', 'wp-piwik' ), '(' . __ ( 'not recommended', 'wp-piwik' ) . ')' ); - - $this->showSelect ( 'piwik_useragent', __ ( 'User agent', 'wp-piwik' ), array ( - 'php' => __ ( 'Use the PHP default user agent', 'wp-piwik' ) . (ini_get ( 'user_agent' ) ? '(' . ini_get ( 'user_agent' ) . ')' : ' (' . __ ( 'empty', 'wp-piwik' ) . ')'), - 'own' => __ ( 'Define a specific user agent', 'wp-piwik' ) - ), 'WP-Matomo can send the default user agent defined by your PHP settings or use a specific user agent below. The user agent is send by WP-Matomo if HTTP requests are performed.', '$j(\'tr.wp-piwik-useragent-option\').toggleClass(\'hidden\');' ); - $this->showInput ( 'piwik_useragent_string', __ ( 'Specific user agent', 'wp-piwik' ), 'Define a user agent description which is send by WP-Matomo if HTTP requests are performed.', self::$settings->getGlobalOption ( 'piwik_useragent' ) != 'own', 'wp-piwik-useragent-option' ); - - $this->showCheckbox ( 'dnsprefetch', __ ( 'Enable DNS prefetch', 'wp-piwik' ), __ ( 'Add a DNS prefetch tag.' . ' ' . sprintf ( __ ( 'See %sMatomo Blog%s.', 'wp-piwik' ), '', '' ), 'wp-piwik' ) ); - - $this->showCheckbox ( 'track_datacfasync', __ ( 'Add data-cfasync=false', 'wp-piwik' ), __ ( 'Adds data-cfasync=false to the script tag, e.g., to ask Rocket Loader to ignore the script.' . ' ' . sprintf ( __ ( 'See %sCloudFlare Knowledge Base%s.', 'wp-piwik' ), '', '' ), 'wp-piwik' ) ); - - $this->showInput ( 'track_cdnurl', __ ( 'CDN URL', 'wp-piwik' ).' http://', 'Enter URL if you want to load the tracking code via CDN.' ); - - $this->showInput ( 'track_cdnurlssl', __ ( 'CDN URL (SSL)', 'wp-piwik' ).' https://', 'Enter URL if you want to load the tracking code via a separate SSL CDN.' ); - - $this->showSelect ( 'force_protocol', __ ( 'Force Matomo to use a specific protocol', 'wp-piwik' ), array ( - 'disabled' => __ ( 'Disabled (default)', 'wp-piwik' ), - 'http' => __ ( 'http', 'wp-piwik' ), - 'https' => __ ( 'https (SSL)', 'wp-piwik' ) - ), __ ( 'Choose if you want to explicitly force Matomo to use HTTP or HTTPS. Does not work with a CDN URL.', 'wp-piwik' ) ); - - $this->showSelect ( 'update_notice', __ ( 'Update notice', 'wp-piwik' ), array ( - 'enabled' => __ ( 'Show always if WP-Matomo is updated', 'wp-piwik' ), - 'script' => __ ( 'Show only if WP-Matomo is updated and settings were changed', 'wp-piwik' ), - 'disabled' => __ ( 'Disabled', 'wp-piwik' ) - ), __ ( 'Choose if you want to get an update notice if WP-Matomo is updated.', 'wp-piwik' ) ); - - $this->showInput ( 'set_download_extensions', __ ( 'Define all file types for download tracking', 'wp-piwik' ), __ ( 'Replace Matomo\'s default file extensions for download tracking, divided by a vertical bar (|). Leave blank to keep Matomo\'s default settings.', 'wp-piwik' ) . ' ' . sprintf ( __ ( 'See %sMatomo documentation%s.', 'wp-piwik' ), '', '' ) ); - - $this->showInput ( 'set_download_classes', __ ( 'Set classes to be treated as downloads', 'wp-piwik' ), __ ( 'Set classes to be treated as downloads (in addition to piwik_download), divided by a vertical bar (|). Leave blank to keep Matomo\'s default settings.', 'wp-piwik' ) . ' ' . sprintf ( __ ( 'See %sMatomo JavaScript Tracking Client reference%s.', 'wp-piwik' ), '', '' ) ); - - $this->showInput ( 'set_link_classes', __ ( 'Set classes to be treated as outlinks', 'wp-piwik' ), __ ( 'Set classes to be treated as outlinks (in addition to piwik_link), divided by a vertical bar (|). Leave blank to keep Matomo\'s default settings.', 'wp-piwik' ) . ' ' . sprintf ( __ ( 'See %sMatomo JavaScript Tracking Client reference%s.', 'wp-piwik' ), '', '' ) ); - - echo $submitButton; - ?> - - - - - - - - - - - - - -
-
-

%s

', $id, $description ); - } - - /** - * Show a checkbox option - * - * @param string $id option id - * @param string $name descriptive option name - * @param string $description option description - * @param boolean $isHidden set to true to initially hide the option (default: false) - * @param string $groupName define a class name to access a group of option rows by javascript (default: empty) - * @param boolean $hideDescription $hideDescription set to false to show description initially (default: true) - * @param string $onChange javascript for onchange event (default: empty) - */ - private function showCheckbox($id, $name, $description, $isHidden = false, $groupName = '', $hideDescription = true, $onChange = '') { - printf ( ':getGlobalOption ( $id ) ? ' checked="checked"' : '') . ' onchange="$j(\'#%s\').val(this.checked?1:0);%s" /> %s', $name, $id, $onChange, $this->getDescription ( $id, $description, $hideDescription ) ); - } - - /** - * Show a textarea option - * - * @param string $id option id - * @param string $name descriptive option name - * @param int $rows number of rows to show - * @param string $description option description - * @param boolean $isHidden set to true to initially hide the option (default: false) - * @param string $groupName define a class name to access a group of option rows by javascript (default: empty) - * @param boolean $hideDescription $hideDescription set to false to show description initially (default: true) - * @param string $onChange javascript for onchange event (default: empty) - * @param boolean $isReadonly set textarea to read only (default: false) - * @param boolean $global set to false if the textarea shows a site-specific option (default: true) - */ - private function showTextarea($id, $name, $rows, $description, $isHidden, $groupName, $hideDescription = true, $onChange = '', $isReadonly = false, $global = true) { - printf ( - ': %s', $name, $id, $onChange, ($global ? self::$settings->getGlobalOption ( $id ) : self::$settings->getOption ( $id )), $this->getDescription ( $id, $description, $hideDescription ) ); - } - - /** - * Show a simple text - * - * @param string $text Text to show - */ - private function showText($text) { - printf ( '

%s

', $text ); - } - - /** - * Show an input option - * - * @param string $id option id - * @param string $name descriptive option name - * @param string $description option description - * @param boolean $isHidden set to true to initially hide the option (default: false) - * @param string $groupName define a class name to access a group of option rows by javascript (default: empty) - * @param string $rowName define a class name to access the specific option row by javascript (default: empty) - * @param boolean $hideDescription $hideDescription set to false to show description initially (default: true) - * @param boolean $wide Create a wide box (default: false) - */ - private function showInput($id, $name, $description, $isHidden = false, $groupName = '', $rowName = false, $hideDescription = true, $wide = false) { - printf ( ' %s', $isHidden ? 'hidden ' : '', $groupName ? $groupName : '', $rowName ? ' id="' . $groupName . '-' . $rowName . '"' : '', $name, $id, htmlentities(self::$settings->getGlobalOption( $id ), ENT_QUOTES, 'UTF-8', false), !empty($description) ? $this->getDescription ( $id, $description, $hideDescription ) : '' ); - } - - /** - * Show a select box option - * - * @param string $id option id - * @param string $name descriptive option name - * @param array $options list of options to show array[](option id => descriptive name) - * @param string $description option description - * @param string $onChange javascript for onchange event (default: empty) - * @param boolean $isHidden set to true to initially hide the option (default: false) - * @param string $groupName define a class name to access a group of option rows by javascript (default: empty) - * @param boolean $hideDescription $hideDescription set to false to show description initially (default: true) - * @param boolean $global set to false if the textarea shows a site-specific option (default: true) - */ - private function showSelect($id, $name, $options = array(), $description = '', $onChange = '', $isHidden = false, $groupName = '', $hideDescription = true, $global = true) { - $optionList = ''; - $default = $global ? self::$settings->getGlobalOption ( $id ) : self::$settings->getOption ( $id ); - if (is_array ( $options )) - foreach ( $options as $key => $value ) - $optionList .= sprintf ( '', $key, $value ); - printf ( ' %s', $name, $id, $onChange, $optionList, $this->getDescription ( $id, $description, $hideDescription ) ); - } - - /** - * Show an info box - * - * @param string $type box style (e.g., updated, error) - * @param string $icon box icon, see https://developer.wordpress.org/resource/dashicons/ - * @param string $content box message - */ - private function showBox($type, $icon, $content) { - printf ( '

%s

', $type, $icon, $content ); - } - - /** - * Show headline - * @param int $order headline order (h?-tag), set to 0 to avoid headline-tagging - * @param string $icon headline icon, see https://developer.wordpress.org/resource/dashicons/ - * @param string $headline headline text - * @param string $addPluginName set to true to add the plugin name to the headline (default: false) - */ - private function showHeadline($order, $icon, $headline, $addPluginName = false) { - echo $this->getHeadline ( $order, $icon, $headline, $addPluginName = false ); - } - - /** - * Get headline HTML - * - * @param int $order headline order (h?-tag), set to 0 to avoid headline-tagging - * @param string $icon headline icon, see https://developer.wordpress.org/resource/dashicons/ - * @param string $headline headline text - * @param string $addPluginName set to true to add the plugin name to the headline (default: false) - */ - private function getHeadline($order, $icon, $headline, $addPluginName = false) { - echo ($order > 0 ? "" : '') . sprintf ( ' %s%s', $icon, ($addPluginName ? self::$settings->getGlobalOption ( 'plugin_display_name' ) . ' ' : ''), __ ( $headline, 'wp-piwik' ) ) . ($order > 0 ? "" : ''); - } - - /** - * Show donation info - */ - private function showDonation() { - ?> -
-

- -

-

- -

-
- -
-
- Paypal -
- - - - -
-
- -
- -
- -
var $j = jQuery.noConflict();'; - } - - /** - * Show credits - */ - public function showCredits() { - ?> -

: Marco L., Rolf W., Tobias U., Lars K., Donna F., Kevin D., Ramos S., Thomas M., John C., Andreas G., Ben M., Myra R. I., Carlos U. R.-S., Oleg I., M. N., Daniel K., James L., Jochen K., Cyril P., Thomas K., Patrik K., Zach, Sebastian W., Peakkom, Patrik K., Kati K., Helmut O., Valerie S., Jochen D., Atlas R., Harald W., Jan M., Addy K., Hans-Georg E.-B., Yvonne K., Andrew D., Nicolas, J., Andre M., Steve J., Jakub P., ditho.berlin, Robert R., Simon B., Grzegorz O., Bjarne O., Georg H., Tino S., Carola H., Bo K. C., Timothy T., Heinz L., !

-

jqPlot (License: GPL 2.0 and MIT) and jQuery Sparklines (License: New BSD License).','wp-piwik'); ?>

-

, !

-

-

you for using my plugin. It is the best commendation if my piece of code is really used!','wp-piwik'); ?>

- -

-

or cURL has to be available:', 'wp-piwik'); ?>

-
    -
  1. '.(function_exists('curl_init')?'':__('not','wp-piwik')).' '; - _e('available','wp-piwik'); - ?>.
  2. -
  3. '.(ini_get('allow_url_fopen')?'':__('not','wp-piwik')).' '; - _e('enabled','wp-piwik'); - ?>.
  4. -
  5. getGlobalOption('http_connection') == 'curl') || (function_exists('curl_init') && !ini_get('allow_url_fopen')))?__('cURL', 'wp-piwik'):__('fopen', 'wp-piwik')).' ('.(self::$settings->getGlobalOption('http_method')=='post'?__('POST','wp-piwik'):__('GET','wp-piwik')).') '.__('is used.', 'wp-piwik'); ?>
  6. - getGlobalOption('piwik_mode') == 'php') { ?>
  7. '.(self::$settings->getGlobalOption('proxy_url')).''; - ?>
  8. -
-

:

-
    -
  1. -
  2. -
  3. -
  4. -
-

readRSSFeed('http://wordpress.org/support/rss/plugin/wp-piwik'); - if (!empty($supportThreads)) { - echo '
    '; - foreach ($supportThreads as $supportThread) - echo '
  1. '.$supportThread['title'].'
  2. '; - echo '
'; - } - } - - /** - * Read RSS feed - * - * @param string $feed - * feed URL - * @param int $cnt - * item limit - * @return array feed items array[](title, url) - * - */ - private function readRSSFeed($feed, $cnt = 5) { - $result = array (); - if (function_exists ( 'simplexml_load_file' ) && ! empty ( $feed )) { - $xml = @simplexml_load_file ( $feed ); - if (! $xml || ! isset ( $xml->channel [0]->item )) - return array ( - array ( - 'title' => 'Can\'t read RSS feed.', - 'url' => $xml - ) - ); - foreach ( $xml->channel [0]->item as $item ) { - if ($cnt -- == 0) - break; - $result [] = array ( - 'title' => $item->title [0], - 'url' => $item->link [0] - ); - } - } - return $result; - } - - /** - * Clear cache and reset settings - * - * @param boolean $clearSettings set to true to reset settings (default: false) - */ - private function clear($clearSettings = false) { - if ($clearSettings) { - self::$settings->resetSettings(); - $this->showBox ( 'updated', 'yes', __ ( 'Settings cleared (except connection settings).' ) ); - } - global $wpdb; - if (self::$settings->checkNetworkActivation()) { - $aryBlogs = \WP_Piwik\Settings::getBlogList(); - if (is_array($aryBlogs)) - foreach ($aryBlogs as $aryBlog) { - switch_to_blog($aryBlog['blog_id']); - $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_wp-piwik_%'"); - $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_timeout_wp-piwik_%'"); - restore_current_blog(); - } - } else { - $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_wp-piwik_%'"); - $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_timeout_wp-piwik_%'"); - } - $this->showBox ( 'updated', 'yes', __ ( 'Cache cleared.' ) ); - } - - /** - * Execute test script and display results - */ - private function runTestscript() { ?> -
-

Testscript Result

- isConfigured()) { - if (isset($_GET['testscript_id']) && $_GET['testscript_id']) - switch_to_blog((int) $_GET['testscript_id']); - ?> - - Please configure WP-Matomo first.

'; - ?> -
- wpPiwik = $wpPiwik; - if( isset($_POST['s']) ){ - $cnt = $this->prepare_items ($_POST['s']); - } else { - $cnt = $this->prepare_items (); - } - global $status, $page; - $this->showSearchForm(); - parent::__construct ( array ( - 'singular' => __ ( 'site', 'wp-piwik' ), - 'plural' => __ ( 'sites', 'wp-piwik' ), - 'ajax' => false - ) ); - if ($cnt > 0) - $this->display (); - else - echo '

' . __ ( 'No site configured yet.', 'wp-piwik' ) . '

'; - } - - public function get_columns() { - $columns = array ( - 'id' => __ ( 'Blog ID', 'wp-piwik' ), - 'name' => __ ( 'Title', 'wp-piwik' ), - 'siteurl' => __ ( 'URL', 'wp-piwik' ), - 'piwikid' => __ ( 'Site ID (Piwik)', 'wp-piwik' ) - ); - return $columns; - } - - public function prepare_items($search = '') { - $current_page = $this->get_pagenum (); - $per_page = 10; - global $blog_id; - global $wpdb; - global $pagenow; - if (is_plugin_active_for_network ( 'wp-piwik/wp-piwik.php' )) { - $total_items = $wpdb->get_var ( $wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->blogs . ' WHERE CONCAT(domain, path) LIKE "%%%s%%" AND spam = 0 AND deleted = 0', $search)); - $blogs = \WP_Piwik\Settings::getBlogList($per_page, $current_page, $search); - foreach ( $blogs as $blog ) { - $blogDetails = get_blog_details ( $blog['blog_id'], true ); - $this->data [] = array ( - 'name' => $blogDetails->blogname, - 'id' => $blogDetails->blog_id, - 'siteurl' => $blogDetails->siteurl, - 'piwikid' => $this->wpPiwik->getPiwikSiteId ( $blogDetails->blog_id ) - ); - } - } else { - $blogDetails = get_bloginfo (); - $this->data [] = array ( - 'name' => get_bloginfo ( 'name' ), - 'id' => '-', - 'siteurl' => get_bloginfo ( 'url' ), - 'piwikid' => $this->wpPiwik->getPiwikSiteId () - ); - $total_items = 1; - } - $columns = $this->get_columns (); - $hidden = array (); - $sortable = array (); - $this->_column_headers = array ( - $columns, - $hidden, - $sortable - ); - $this->set_pagination_args ( array ( - 'total_items' => $total_items, - 'per_page' => $per_page - ) ); - foreach ( $this->data as $key => $dataset ) { - if (empty ( $dataset ['piwikid'] ) || $dataset ['piwikid'] == 'n/a') - $this->data [$key] ['piwikid'] = __ ( 'Site not created yet.', 'wp-piwik' ); - if ($this->wpPiwik->isNetworkMode ()) - $this->data [$key] ['name'] = '' . $dataset ['name'] . ''; - } - $this->items = $this->data; - return count ( $this->items ); - } - - public function column_default($item, $column_name) { - switch ($column_name) { - case 'id' : - case 'name' : - case 'siteurl' : - case 'piwikid' : - return $item [$column_name]; - default : - return print_r ( $item, true ); - } - } - - private function showSearchForm() { - ?> -
- - search_box('Search domain and path', 'wpPiwikSiteSearch'); ?> -
- getGlobalOption('disable_timelimit')) set_time_limit(0); - echo '
'; - echo '

'.(self::$settings->getGlobalOption('plugin_display_name') == 'WP-Piwik'?'Piwik '.__('Statistics', 'wp-piwik'):self::$settings->getGlobalOption('plugin_display_name')).'

'; - if (self::$settings->checkNetworkActivation() && function_exists('is_super_admin') && is_super_admin()) { - - if (isset($_GET['wpmu_show_stats'])) { - switch_to_blog((int) $_GET['wpmu_show_stats']); - } elseif ((isset($_GET['overview']) && $_GET['overview']) || (function_exists('is_network_admin') && is_network_admin())) { - new \WP_Piwik\Admin\Sitebrowser(self::$wpPiwik); - return; - } - echo '

'.__('Currently shown stats:').' '.get_bloginfo('name').'.'.' Show site overview.

'; - echo ''."\n"; - } - echo '
'; - wp_nonce_field('wp-piwik_stats-general'); - wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false); - wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false); - $columns = array('normal', 'side', 'column3'); - for ($i = 0; $i < 3; $i++) { - echo '
'; - do_meta_boxes(self::$wpPiwik->statsPageId, $columns[$i], null); - echo '
'; - } - echo '
'; - echo ''."\n"; - if (self::$settings->checkNetworkActivation() && function_exists('is_super_admin') && is_super_admin()) { - restore_current_blog(); - } - } - - public function printAdminScripts() { - wp_enqueue_script('wp-piwik', self::$wpPiwik->getPluginURL().'js/wp-piwik.js', array(), self::$wpPiwik->getPluginVersion(), true); - wp_enqueue_script('wp-piwik-jqplot', self::$wpPiwik->getPluginURL().'js/jqplot/wp-piwik.jqplot.js',array('jquery'), self::$wpPiwik->getPluginVersion()); - } - - public function extendAdminHeader() { - echo ''; - echo ''; - echo ''; - } - - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Logger.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Logger.php deleted file mode 100644 index d016661..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Logger.php +++ /dev/null @@ -1,47 +0,0 @@ -setName($loggerName); - $this->setStartMicrotime(microtime(true)); - $this->log('Logging started -------------------------------'); - } - - public function __destruct() { - $this->log('Logging finished ------------------------------'); - } - - public function log($loggerMessage) { - $this->loggerOutput($this->getElapsedMicrotime(), $loggerMessage); - } - - private function setName($loggerName) { - $this->loggerName = $loggerName; - } - - public function getName() { - return $this->loggerName; - } - - private function setStartMicrotime($startMicrotime) { - $this->startMicrotime = $startMicrotime; - } - - public function getStartMicrotime() { - return $this->startMicrotime; - } - - public function getElapsedMicrotime() { - return microtime(true) - $this->getStartMicrotime(); - } - - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Logger/Dummy.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Logger/Dummy.php deleted file mode 100644 index 211c871..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Logger/Dummy.php +++ /dev/null @@ -1,9 +0,0 @@ -loggerFile = WP_PIWIK_PATH.'logs'.DIRECTORY_SEPARATOR. - date('Ymd').'_'.$this->encodeFilename($this->getName()).'.log'; - } - - private function getFilename() { - return $this->loggerFile; - } - - private function openFile() { - if (!$this->loggerFile) - $this->setFilename(); - return fopen($this->getFilename(), 'a'); - } - - private function closeFile($fileHandle) { - fclose($fileHandle); - } - - private function writeFile($fileHandle, $fileContent) { - fwrite($fileHandle, $fileContent."\n"); - } - - private function formatMicrotime($loggerTime) { - return sprintf('[%6s sec]',number_format($loggerTime,3)); - } - - public function loggerOutput($loggerTime, $loggerMessage) { - if ($fileHandle = $this->openFile()) { - $this->writeFile($fileHandle, $this->formatMicrotime($loggerTime).' '.$loggerMessage); - $this->closeFile($fileHandle); - } - } - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Logger/Screen.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Logger/Screen.php deleted file mode 100644 index 88afa23..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Logger/Screen.php +++ /dev/null @@ -1,27 +0,0 @@ -logs[] = $this->formatMicrotime($loggerTime).' '.$loggerMessage; - } - - public function echoResults() { - echo '
';
-			print_r($this->logs);
-			echo '
'; - } - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Request.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Request.php deleted file mode 100644 index c26e229..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Request.php +++ /dev/null @@ -1,95 +0,0 @@ - $method, 'parameter' => $parameter); - return $id; - } - - private static function parameterToString($parameter) { - $return = ''; - if (is_array($parameter)) - foreach ($parameter as $key => $value) - $return .= '&'.$key.'='.$value; - return $return; - } - - public function perform($id) { - if ( self::$settings->getGlobalOption('cache') && false !== ( $cached = get_transient( 'wp-piwik_c_'.md5(self::$isCacheable[$id] ) ) ) ) { - if (!empty ( $cached ) && !(! empty ( $cached['result'] ) && $cached['result'] == 'error') ) { - self::$wpPiwik->log("Deliver cached data: ".$id); - return $cached; - } - } - self::$wpPiwik->log("Perform request: ".$id); - if (!isset(self::$requests[$id])) - return array('result' => 'error', 'message' => 'Request '.$id.' was not registered.'); - elseif (!isset(self::$results[$id])) { - $this->request($id); - } - if ( isset ( self::$results[$id] ) ) { - if ( self::$settings->getGlobalOption('cache') && self::$isCacheable[$id] ) { - set_transient( 'wp-piwik_c_'.md5(self::$isCacheable[$id]) , self::$results[$id], WEEK_IN_SECONDS ); - } - return self::$results[$id]; - } else return false; - } - - public function getDebug($id) { - return isset( self::$debug[$id] )? self::$debug[$id] : false; - } - - protected function buildURL($config, $urlDecode = false) { - $url = 'method='.($config['method']).'&idSite='.self::$settings->getOption('site_id'); - foreach ($config['parameter'] as $key => $value) - $url .= '&'.$key.'='.($urlDecode?urldecode($value):$value); - return $url; - } - - protected function unserialize($str) { - self::$wpPiwik->log("Result string: ".$str); - return ($str == json_decode(false, true) || @json_decode($str, true) !== false)?json_decode($str, true):array(); - } - - public static function getLastError() { - return self::$lastError; - } - - abstract protected function request($id); - - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Request/Php.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Request/Php.php deleted file mode 100644 index bbd4d38..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Request/Php.php +++ /dev/null @@ -1,55 +0,0 @@ -getGlobalOption('piwik_url'); - foreach (self::$requests as $requestID => $config) { - if (!isset(self::$results[$requestID])) { - if (self::$settings->getGlobalOption('filter_limit') != "" && self::$settings->getGlobalOption('filter_limit') == (int) self::$settings->getGlobalOption('filter_limit')) - $config['parameter']['filter_limit'] = self::$settings->getGlobalOption('filter_limit'); - $params = 'module=API&format=json&'.$this->buildURL($config, true); - $map[$count] = $requestID; - $result = $this->call($id, $url, $params); - self::$results[$map[$count]] = $result; - $count++; - } - } - } - - private function call($id, $url, $params) { - if (!defined('PIWIK_INCLUDE_PATH')) - return false; - if (PIWIK_INCLUDE_PATH === FALSE) - return array('result' => 'error', 'message' => __('Could not resolve','wp-piwik').' "'.htmlentities(self::$settings->getGlobalOption('piwik_path')).'": '.__('realpath() returns false','wp-piwik').'.'); - if (file_exists(PIWIK_INCLUDE_PATH . "/index.php")) - require_once PIWIK_INCLUDE_PATH . "/index.php"; - if (file_exists(PIWIK_INCLUDE_PATH . "/core/API/Request.php")) - require_once PIWIK_INCLUDE_PATH . "/core/API/Request.php"; - if (class_exists('\Piwik\Application\Environment') && !self::$piwikEnvironment) { - // Piwik 2.14.* compatibility fix - self::$piwikEnvironment = new \Piwik\Application\Environment(null); - self::$piwikEnvironment->init(); - } - if (class_exists('Piwik\FrontController')) - \Piwik\FrontController::getInstance()->init(); - else return array('result' => 'error', 'message' => __('Class Piwik\FrontController does not exists.','wp-piwik')); - if (class_exists('Piwik\API\Request')) - $request = new \Piwik\API\Request($params.'&token_auth='.self::$settings->getGlobalOption('piwik_token')); - else return array('result' => 'error', 'message' => __('Class Piwik\API\Request does not exists.','wp-piwik')); - if (isset($request)) - $result = $request->process(); - else $result = null; - if (!headers_sent()) - header("Content-Type: text/html", true); - $result = $this->unserialize($result); - if ($GLOBALS ['wp-piwik_debug']) - self::$debug[$id] = array ( $params.'&token_auth=...' ); - return $result; - } - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Request/Rest.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Request/Rest.php deleted file mode 100644 index 198ad84..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Request/Rest.php +++ /dev/null @@ -1,81 +0,0 @@ -getGlobalOption('piwik_mode') == 'http') - $url = self::$settings->getGlobalOption('piwik_url'); - else if (self::$settings->getGlobalOption('piwik_mode') == 'cloud') - $url = 'https://'.self::$settings->getGlobalOption('piwik_user').'.innocraft.cloud/'; - else $url = 'https://'.self::$settings->getGlobalOption('matomo_user').'.matomo.cloud/'; - $params = 'module=API&method=API.getBulkRequest&format=json'; - if (self::$settings->getGlobalOption('filter_limit') != "" && self::$settings->getGlobalOption('filter_limit') == (int) self::$settings->getGlobalOption('filter_limit')) - $params .= '&filter_limit='.self::$settings->getGlobalOption('filter_limit'); - foreach (self::$requests as $requestID => $config) { - if (!isset(self::$results[$requestID])) { - $params .= '&urls['.$count.']='.urlencode($this->buildURL($config)); - $map[$count] = $requestID; - $count++; - } - } - $results = ((function_exists('curl_init') && ini_get('allow_url_fopen') && self::$settings->getGlobalOption('http_connection') == 'curl') || (function_exists('curl_init') && !ini_get('allow_url_fopen')))?$this->curl($id, $url, $params):$this->fopen($id, $url, $params); - if (is_array($results)) - foreach ($results as $num => $result) - if (isset($map[$num])) - self::$results[$map[$num]] = $result; - } - - private function curl($id, $url, $params) { - if (self::$settings->getGlobalOption('http_method')=='post') { - $c = curl_init($url); - curl_setopt($c, CURLOPT_POST, 1); - curl_setopt($c, CURLOPT_POSTFIELDS, $params.'&token_auth='.self::$settings->getGlobalOption('piwik_token')); - } else $c = curl_init($url.'?'.$params.'&token_auth='.self::$settings->getGlobalOption('piwik_token')); - curl_setopt($c, CURLOPT_SSL_VERIFYPEER, !self::$settings->getGlobalOption('disable_ssl_verify')); - curl_setopt($c, CURLOPT_SSL_VERIFYHOST, !self::$settings->getGlobalOption('disable_ssl_verify_host')?2:0); - curl_setopt($c, CURLOPT_USERAGENT, self::$settings->getGlobalOption('piwik_useragent')=='php'?ini_get('user_agent'):self::$settings->getGlobalOption('piwik_useragent_string')); - curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($c, CURLOPT_HEADER, $GLOBALS ['wp-piwik_debug'] ); - curl_setopt($c, CURLOPT_TIMEOUT, self::$settings->getGlobalOption('connection_timeout')); - $httpProxyClass = new \WP_HTTP_Proxy(); - if ($httpProxyClass->is_enabled() && $httpProxyClass->send_through_proxy($url)) { - curl_setopt($c, CURLOPT_PROXY, $httpProxyClass->host()); - curl_setopt($c, CURLOPT_PROXYPORT, $httpProxyClass->port()); - if ($httpProxyClass->use_authentication()) - curl_setopt($c, CURLOPT_PROXYUSERPWD, $httpProxyClass->username().':'.$httpProxyClass->password()); - } - $result = curl_exec($c); - self::$lastError = curl_error($c); - if ($GLOBALS ['wp-piwik_debug']) { - $header_size = curl_getinfo($c, CURLINFO_HEADER_SIZE); - $header = substr($result, 0, $header_size); - $body = substr($result, $header_size); - $result = $this->unserialize($body); - self::$debug[$id] = array ( $header, $url.'?'.$params.'&token_auth=...' ); - } else $result = $this->unserialize($result); - curl_close($c); - return $result; - } - - private function fopen($id, $url, $params) { - $contextDefinition = array('http'=>array('timeout' => self::$settings->getGlobalOption('connection_timeout'), 'header' => "Content-type: application/x-www-form-urlencoded\r\n") ); - $contextDefinition['ssl'] = array(); - if (self::$settings->getGlobalOption('disable_ssl_verify')) - $contextDefinition['ssl'] = array('allow_self_signed' => true, 'verify_peer' => false ); - if (self::$settings->getGlobalOption('disable_ssl_verify_host')) - $contextDefinition['ssl']['verify_peer_name'] = false; - if (self::$settings->getGlobalOption('http_method')=='post') { - $fullUrl = $url; - $contextDefinition['http']['method'] = 'POST'; - $contextDefinition['http']['content'] = $params.'&token_auth='.self::$settings->getGlobalOption('piwik_token'); - } else $fullUrl = $url.'?'.$params.'&token_auth='.self::$settings->getGlobalOption('piwik_token'); - $context = stream_context_create($contextDefinition); - $result = $this->unserialize(@file_get_contents($fullUrl, false, $context)); - if ($GLOBALS ['wp-piwik_debug']) - self::$debug[$id] = array ( get_headers($fullUrl, 1), $url.'?'.$params.'&token_auth=...' ); - return $result; - } - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Settings.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Settings.php deleted file mode 100644 index 89a6c68..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Settings.php +++ /dev/null @@ -1,408 +0,0 @@ - 'checkPiwikUrl', - 'piwik_token' => 'checkPiwikToken', - 'site_id' => 'requestPiwikSiteID', - 'tracking_code' => 'prepareTrackingCode', - 'noscript_code' => 'prepareNocscriptCode' - ); - - /** - * - * @var Register default configuration set - */ - private $globalSettings = array ( - // Plugin settings - 'revision' => 0, - 'last_settings_update' => 0, - // User settings: Piwik configuration - 'piwik_mode' => 'http', - 'piwik_url' => '', - 'piwik_path' => '', - 'piwik_user' => '', - 'matomo_user' => '', - 'piwik_token' => '', - 'auto_site_config' => true, - // User settings: Stats configuration - 'default_date' => 'yesterday', - 'stats_seo' => false, - 'stats_ecommerce' => false, - 'dashboard_widget' => false, - 'dashboard_ecommerce' => false, - 'dashboard_chart' => false, - 'dashboard_seo' => false, - 'toolbar' => false, - 'capability_read_stats' => array ( - 'administrator' => true - ), - 'perpost_stats' => false, - 'plugin_display_name' => 'WP-Piwik', - 'piwik_shortcut' => false, - 'shortcodes' => false, - // User settings: Tracking configuration - 'track_mode' => 'disabled', - 'track_codeposition' => 'footer', - 'track_noscript' => false, - 'track_nojavascript' => false, - 'proxy_url' => '', - 'track_content' => 'disabled', - 'track_search' => false, - 'track_404' => false, - 'add_post_annotations' => array(), - 'add_customvars_box' => false, - 'add_download_extensions' => '', - 'set_download_extensions' => '', - 'set_link_classes' => '', - 'set_download_classes' => '', - 'disable_cookies' => false, - 'limit_cookies' => false, - 'limit_cookies_visitor' => 34186669, // Piwik default 13 months - 'limit_cookies_session' => 1800, // Piwik default 30 minutes - 'limit_cookies_referral' => 15778463, // Piwik default 6 months - 'track_admin' => false, - 'capability_stealth' => array (), - 'track_across' => false, - 'track_across_alias' => false, - 'track_crossdomain_linking' => false, - 'track_feed' => false, - 'track_feed_addcampaign' => false, - 'track_feed_campaign' => 'feed', - 'track_heartbeat' => 0, - 'track_user_id' => 'disabled', - // User settings: Expert configuration - 'cache' => true, - 'http_connection' => 'curl', - 'http_method' => 'post', - 'disable_timelimit' => false, - 'filter_limit' => '', - 'connection_timeout' => 5, - 'disable_ssl_verify' => false, - 'disable_ssl_verify_host' => false, - 'piwik_useragent' => 'php', - 'piwik_useragent_string' => 'WP-Piwik', - 'dnsprefetch' => false, - 'track_datacfasync' => false, - 'track_cdnurl' => '', - 'track_cdnurlssl' => '', - 'force_protocol' => 'disabled', - 'update_notice' => 'enabled' - ), $settings = array ( - 'name' => '', - 'site_id' => NULL, - 'noscript_code' => '', - 'tracking_code' => '', - 'last_tracking_code_update' => 0, - 'dashboard_revision' => 0 - ), $settingsChanged = false; - - /** - * Constructor class to prepare settings manager - * - * @param WP_Piwik $wpPiwik - * active WP-Piwik instance - */ - public function __construct($wpPiwik) { - self::$wpPiwik = $wpPiwik; - self::$wpPiwik->log ( 'Store default settings' ); - self::$defaultSettings = array ( - 'globalSettings' => $this->globalSettings, - 'settings' => $this->settings - ); - self::$wpPiwik->log ( 'Load settings' ); - foreach ( $this->globalSettings as $key => $default ) { - $this->globalSettings [$key] = ($this->checkNetworkActivation () ? get_site_option ( 'wp-piwik_global-' . $key, $default ) : get_option ( 'wp-piwik_global-' . $key, $default )); - } - foreach ( $this->settings as $key => $default ) - $this->settings [$key] = get_option ( 'wp-piwik-' . $key, $default ); - } - - /** - * Save all settings as WordPress options - */ - public function save() { - if (! $this->settingsChanged) { - self::$wpPiwik->log ( 'No settings changed yet' ); - return; - } - self::$wpPiwik->log ( 'Save settings' ); - foreach ( $this->globalSettings as $key => $value ) { - if ( $this->checkNetworkActivation() ) - update_site_option ( 'wp-piwik_global-' . $key, $value ); - else - update_option ( 'wp-piwik_global-' . $key, $value ); - } - foreach ( $this->settings as $key => $value ) { - update_option ( 'wp-piwik-' . $key, $value ); - } - global $wp_roles; - if (! is_object ( $wp_roles )) - $wp_roles = new \WP_Roles (); - if (! is_object ( $wp_roles )) - die ( "STILL NO OBJECT" ); - foreach ( $wp_roles->role_names as $strKey => $strName ) { - $objRole = get_role ( $strKey ); - foreach ( array ( - 'stealth', - 'read_stats' - ) as $strCap ) { - $aryCaps = $this->getGlobalOption ( 'capability_' . $strCap ); - if (isset ( $aryCaps [$strKey] ) && $aryCaps [$strKey]) - $wp_roles->add_cap ( $strKey, 'wp-piwik_' . $strCap ); - else $wp_roles->remove_cap ( $strKey, 'wp-piwik_' . $strCap ); - } - } - $this->settingsChanged = false; - } - - /** - * Get a global option's value - * - * @param string $key - * option key - * @return string option value - */ - public function getGlobalOption($key) { - return isset ( $this->globalSettings [$key] ) ? $this->globalSettings [$key] : self::$defaultSettings ['globalSettings'] [$key]; - } - - /** - * Get an option's value related to a specific blog - * - * @param string $key - * option key - * @param int $blogID - * blog ID (default: current blog) - * @return \WP_Piwik\Register - */ - public function getOption($key, $blogID = null) { - if ($this->checkNetworkActivation () && ! empty ( $blogID )) { - return get_blog_option ( $blogID, 'wp-piwik-'.$key ); - } - return isset ( $this->settings [$key] ) ? $this->settings [$key] : self::$defaultSettings ['settings'] [$key]; - } - - /** - * Set a global option's value - * - * @param string $key - * option key - * @param string $value - * new option value - */ - public function setGlobalOption($key, $value) { - $this->settingsChanged = true; - self::$wpPiwik->log ( 'Changed global option ' . $key . ': ' . (is_array ( $value ) ? serialize ( $value ) : $value) ); - $this->globalSettings [$key] = $value; - } - - /** - * Set an option's value related to a specific blog - * - * @param string $key - * option key - * @param int $blogID - * blog ID (default: current blog) - * @param string $value - * new option value - */ - public function setOption($key, $value, $blogID = null) { - $this->settingsChanged = true; - self::$wpPiwik->log ( 'Changed option ' . $key . ': ' . $value ); - if ($this->checkNetworkActivation () && ! empty ( $blogID )) { - add_blog_option ( $blogID, 'wp-piwik-'.$key, $value ); - } else - $this->settings [$key] = $value; - } - - /** - * Reset settings to default - */ - public function resetSettings() { - self::$wpPiwik->log ( 'Reset WP-Piwik settings' ); - global $wpdb; - if ( $this->checkNetworkActivation() ) { - $aryBlogs = self::getBlogList(); - if (is_array($aryBlogs)) - foreach ($aryBlogs as $aryBlog) { - switch_to_blog($aryBlog['blog_id']); - $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE 'wp-piwik-%'"); - restore_current_blog(); - } - $wpdb->query("DELETE FROM $wpdb->sitemeta WHERE meta_key LIKE 'wp-piwik_global-%'"); - } - else $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE 'wp-piwik_global-%'"); - } - - /** - * Get blog list - */ - public static function getBlogList($limit = null, $page = null, $search = '') { - if ($limit && $page) - $queryLimit = ' LIMIT '.(int) (($page - 1) * $limit).','.(int) $limit; - global $wpdb; - return $wpdb->get_results($wpdb->prepare('SELECT blog_id FROM '.$wpdb->blogs.' WHERE CONCAT(domain, path) LIKE "%%%s%%" AND spam = 0 AND deleted = 0 ORDER BY blog_id'.$queryLimit, $search), ARRAY_A); - } - - /** - * Check if plugin is network activated - * - * @return boolean Is network activated? - */ - public function checkNetworkActivation() { - if (! function_exists ( "is_plugin_active_for_network" )) - require_once (ABSPATH . 'wp-admin/includes/plugin.php'); - return is_plugin_active_for_network ( 'wp-piwik/wp-piwik.php' ); - } - - /** - * Apply new configuration - * - * @param array $in - * new configuration set - */ - public function applyChanges($in) { - if (!self::$wpPiwik->isValidOptionsPost()) - die("Invalid config changes."); - $in = $this->checkSettings ( $in ); - self::$wpPiwik->log ( 'Apply changed settings:' ); - foreach ( self::$defaultSettings ['globalSettings'] as $key => $val ) - $this->setGlobalOption ( $key, isset ( $in [$key] ) ? $in [$key] : $val ); - foreach ( self::$defaultSettings ['settings'] as $key => $val ) - $this->setOption ( $key, isset ( $in [$key] ) ? $in [$key] : $val ); - $this->setGlobalOption ( 'last_settings_update', time () ); - $this->save (); - } - - /** - * Apply callback function on new settings - * - * @param array $in - * new configuration set - * @return array configuration set after callback functions were applied - */ - private function checkSettings($in) { - foreach ( $this->checkSettings as $key => $value ) - if (isset ( $in [$key] )) - $in [$key] = call_user_func_array ( array ( - $this, - $value - ), array ( - $in [$key], - $in - ) ); - return $in; - } - - /** - * Add slash to Piwik URL if necessary - * - * @param string $value - * Piwik URL - * @param array $in - * configuration set - * @return string Piwik URL - */ - private function checkPiwikUrl($value, $in) { - return substr ( $value, - 1, 1 ) != '/' ? $value . '/' : $value; - } - - /** - * Remove &token_auth= from auth token - * - * @param string $value - * Piwik auth token - * @param array $in - * configuration set - * @return string Piwik auth token - */ - private function checkPiwikToken($value, $in) { - return str_replace ( '&token_auth=', '', $value ); - } - - /** - * Request the site ID (if not set before) - * - * @param string $value - * tracking code - * @param array $in - * configuration set - * @return int Piwik site ID - */ - private function requestPiwikSiteID($value, $in) { - if ($in ['auto_site_config'] && ! $value) - return self::$wpPiwik->getPiwikSiteId(); - return $value; - } - - /** - * Prepare the tracking code - * - * @param string $value - * tracking code - * @param array $in - * configuration set - * @return string tracking code - */ - private function prepareTrackingCode($value, $in) { - if ($in ['track_mode'] == 'manually' || $in ['track_mode'] == 'disabled') { - $value = stripslashes ( $value ); - if ($this->checkNetworkActivation ()) - add_site_option ( 'wp-piwik-manually', $value ); - return $value; - } - /*$result = self::$wpPiwik->updateTrackingCode (); - echo '
'; print_r($result); echo '
'; - $this->setOption ( 'noscript_code', $result ['noscript'] );*/ - return; // $result ['script']; - } - - /** - * Prepare the nocscript code - * - * @param string $value - * noscript code - * @param array $in - * configuration set - * @return string noscript code - */ - private function prepareNocscriptCode($value, $in) { - if ($in ['track_mode'] == 'manually') - return stripslashes ( $value ); - return $this->getOption ( 'noscript_code' ); - } - - /** - * Get debug data - * - * @return array WP-Piwik settings for debug output - */ - public function getDebugData() { - $debug = array( - 'global_settings' => $this->globalSettings, - 'settings' => $this->settings - ); - $debug['global_settings']['piwik_token'] = !empty($debug['global_settings']['piwik_token'])?'set':'not set'; - return $debug; - } -} diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Shortcode.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Shortcode.php deleted file mode 100644 index c2c9ee5..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Shortcode.php +++ /dev/null @@ -1,28 +0,0 @@ - 'OptOut', - 'post' => 'Post', - 'overview' => 'Overview' - ), $content; - - public function __construct($attributes, $wpPiwik, $settings) { - $wpPiwik->log('Check requested shortcode widget '.$attributes['module']); - if (isset($attributes['module']) && isset($this->available[$attributes['module']])) { - $wpPiwik->log('Add shortcode widget '.$this->available[$attributes['module']]); - $class = '\\WP_Piwik\\Widget\\'.$this->available[$attributes['module']]; - $widget = new $class($wpPiwik, $settings, null, null, null, $attributes, true); - $widget->show(); - $this->content = $widget->get(); - } - } - - public function get() { - return $this->content; - } - - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Template.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Template.php deleted file mode 100644 index 8342a10..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Template.php +++ /dev/null @@ -1,31 +0,0 @@ -'.$name.''.$value.''; - } - - public function getRangeLast30() { - $diff = (self::$settings->getGlobalOption('default_date') == 'yesterday') ? -86400 : 0; - $end = time() + $diff; - $start = time() - 2592000 + $diff; - return date('Y-m-d', $start).','.date('Y-m-d', $end); - } - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Template/MetaBoxCustomVars.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Template/MetaBoxCustomVars.php deleted file mode 100644 index 9f8b5ce..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Template/MetaBoxCustomVars.php +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - -
-

. (.)

- post_type); - // Check if the current user has permission to edit the post. - if (!current_user_can($objPostType->cap->edit_post, $intID)) - return $intID; - $aryNames = array('cat', 'val'); - for ($i = 1; $i <= 5; $i++) - for ($j = 0; $j <= 1; $j++) { - // Get data - $strMetaVal = (isset($_POST['wp-piwik_custom_'.$aryNames[$j].$i])?htmlentities($_POST['wp-piwik_custom_'.$aryNames[$j].$i]):''); - // Create key - $strMetaKey = 'wp-piwik_custom_'.$aryNames[$j].$i; - // Get the meta value of the custom field key - $strCurVal = get_post_meta($intID, $strMetaKey, true); - // Add meta val: - if ($strMetaVal && '' == $strCurVal) - add_post_meta($intID, $strMetaKey, $strMetaVal, true); - // Update meta val: - elseif ($strMetaVal && $strMetaVal != $strCurVal) - update_post_meta($intID, $strMetaKey, $strMetaVal); - // Delete meta val: - elseif (''==$strMetaVal && $strCurVal) - delete_post_meta($intID, $strMetaKey, $strCurVal); - } - } - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/TrackingCode.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/TrackingCode.php deleted file mode 100644 index 21d3fe3..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/TrackingCode.php +++ /dev/null @@ -1,154 +0,0 @@ -isCurrentTrackingCode () || ! self::$wpPiwik->getOption ( 'tracking_code' ) || strpos( self::$wpPiwik->getOption ( 'tracking_code' ), '{"result":"error",' ) !== false ) - self::$wpPiwik->updateTrackingCode (); - $this->trackingCode = (self::$wpPiwik->isNetworkMode () && self::$wpPiwik->getGlobalOption ( 'track_mode' ) == 'manually') ? get_site_option ( 'wp-piwik-manually' ) : self::$wpPiwik->getOption ( 'tracking_code' ); - } - - public function getTrackingCode() { - if ($this->isUsertracking) - $this->applyUserTracking (); - if ($this->is404) - $this->apply404Changes (); - if ($this->isSearch) - $this->applySearchChanges (); - if (is_single () || is_page()) - $this->addCustomValues (); - $this->trackingCode = apply_filters('wp-piwik_tracking_code', $this->trackingCode); - return $this->trackingCode; - } - - public static function prepareTrackingCode($code, $settings, $logger) { - global $current_user; - $logger->log ( 'Apply tracking code changes:' ); - $settings->setOption ( 'last_tracking_code_update', time () ); - if (preg_match ( '/var u="([^"]*)";/', $code, $hits )) { - $fetchedProxyUrl = $hits [1]; - } else $fetchedProxyUrl = ''; - if ($settings->getGlobalOption ( 'track_mode' ) == 'js') - $code = str_replace ( array ( - 'piwik.js', - 'piwik.php', - 'matomo.js', - 'matomo.php' - ), 'js/index.php', $code ); - elseif ($settings->getGlobalOption ( 'track_mode' ) == 'proxy') { - $code = str_replace ( 'piwik.js', 'piwik.php', $code ); - $code = str_replace ( 'matomo.js', 'matomo.php', $code ); - $proxy = str_replace ( array ( - 'https://', - 'http://' - ), '//', plugins_url ( 'wp-piwik' ) . '/proxy' ) . '/'; - $code = preg_replace ( '/var u="([^"]*)";/', 'var u="' . $proxy . '"', $code ); - $code = preg_replace ( '/img src="([^"]*)piwik.php/', 'img src="' . $proxy . 'piwik.php', $code ); - $code = preg_replace ( '/img src="([^"]*)matomo.php/', 'img src="' . $proxy . 'matomo.php', $code ); - } - if ($settings->getGlobalOption ( 'track_cdnurl' ) || $settings->getGlobalOption ( 'track_cdnurlssl' )) - $code = str_replace ( array ( - "var d=doc", - "g.src=u+" - ), array ( - "var ucdn=(('https:' == document.location.protocol) ? 'https://" . ($settings->getGlobalOption ( 'track_cdnurlssl' ) ? $settings->getGlobalOption ( 'track_cdnurlssl' ) : $settings->getGlobalOption ( 'track_cdnurl' )) . "/' : 'http://" . ($settings->getGlobalOption ( 'track_cdnurl' ) ? $settings->getGlobalOption ( 'track_cdnurl' ) : $settings->getGlobalOption ( 'track_cdnurlssl' )) . "/');\nvar d=doc", - "g.src=ucdn+" - ), $code ); - - if ($settings->getGlobalOption ( 'track_datacfasync' )) - $code = str_replace ( '' ); - } - - /** - * Return an array value by key, return '-' if not set - * - * @param array $array - * array to get a value from - * @param string $key - * key of the value to get from array - * @return string found value or '-' as a placeholder - */ - protected function value($array, $key) { - return (isset ( $array [$key] ) ? $array [$key] : '-'); - } -} \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/BrowserDetails.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/BrowserDetails.php deleted file mode 100644 index a065e1c..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/BrowserDetails.php +++ /dev/null @@ -1,77 +0,0 @@ -getTimeSettings(); - $this->parameter = array( - 'idSite' => self::$wpPiwik->getPiwikSiteId($this->blogId), - 'period' => $timeSettings['period'], - 'date' => $timeSettings['date'] - ); - $this->title = $prefix.__('Browser Details', 'wp-piwik').' ('.__($timeSettings['description'],'wp-piwik').')'; - $this->method = 'DevicesDetection.getBrowserVersions'; - $this->context = 'normal'; - wp_enqueue_script('wp-piwik', self::$wpPiwik->getPluginURL().'js/wp-piwik.js', array(), self::$wpPiwik->getPluginVersion(), true); - wp_enqueue_script('wp-piwik-jqplot',self::$wpPiwik->getPluginURL().'js/jqplot/wp-piwik.jqplot.js',array('jquery')); - wp_enqueue_style('wp-piwik', self::$wpPiwik->getPluginURL().'css/wp-piwik.css',array(),self::$wpPiwik->getPluginVersion()); - add_action('admin_head-index.php', array($this, 'addHeaderLines')); - } - - public function addHeaderLines() { - echo ''; - echo ''; - echo ''; - } - - public function show() { - $response = self::$wpPiwik->request($this->apiID[$this->method]); - $tableBody = array(); - if (!empty($response['result']) && $response['result'] ='error') - echo ''.__('Piwik error', 'wp-piwik').': '.htmlentities($response['message'], ENT_QUOTES, 'utf-8'); - else { - $tableHead = array(__('Browser', 'wp-piwik'), __('Unique', 'wp-piwik'), __('Percent', 'wp-piwik')); - if (isset($response[0]['nb_uniq_visitors'])) $unique = 'nb_uniq_visitors'; - else $unique = 'sum_daily_nb_uniq_visitors'; - $count = 0; - $sum = 0; - $js = array(); - $class = array(); - if (is_array($response)) - foreach ($response as $row) { - $count++; - $sum += isset($row[$unique])?$row[$unique]:0; - if ($count < $this->limit) - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - elseif (!isset($tableBody['Others'])) { - $tableBody['Others'] = array($row['label'], $row[$unique], 0); - $class['Others'] = 'wp-piwik-hideDetails'; - $js['Others'] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - $class[$row['label']] = 'wp-piwik-hideDetails hidden'; - $js[$row['label']] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - } else { - $tableBody['Others'][1] += $row[$unique]; - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - $class[$row['label']] = 'wp-piwik-hideDetails hidden'; - $js[$row['label']] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - } - } - if ($count > $this->limit) - $tableBody['Others'][0] = __('Others', 'wp-piwik'); - - foreach ($tableBody as $key => $row) - $tableBody[$key][2] = number_format($row[1]/$sum*100, 2).'%'; - - if (!empty($tableBody)) $this->pieChart($tableBody); - $this->table($tableHead, $tableBody, null, false, $js, $class); - } - } - - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Browsers.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Browsers.php deleted file mode 100644 index f974685..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Browsers.php +++ /dev/null @@ -1,80 +0,0 @@ -getTimeSettings(); - $this->parameter = array( - 'idSite' => self::$wpPiwik->getPiwikSiteId($this->blogId), - 'period' => $timeSettings['period'], - 'date' => $timeSettings['date'] - ); - $this->title = $prefix.__('Browsers', 'wp-piwik').' ('.__($timeSettings['description'],'wp-piwik').')'; - $this->method = 'DevicesDetection.getBrowsers'; - $this->context = 'normal'; - wp_enqueue_script('wp-piwik', self::$wpPiwik->getPluginURL().'js/wp-piwik.js', array(), self::$wpPiwik->getPluginVersion(), true); - wp_enqueue_script('wp-piwik-jqplot',self::$wpPiwik->getPluginURL().'js/jqplot/wp-piwik.jqplot.js',array('jquery')); - wp_enqueue_style('wp-piwik', self::$wpPiwik->getPluginURL().'css/wp-piwik.css',array(),self::$wpPiwik->getPluginVersion()); - add_action('admin_head-index.php', array($this, 'addHeaderLines')); - } - - public function addHeaderLines() { - echo ''; - echo ''; - echo ''; - } - - public function show() { - $response = self::$wpPiwik->request($this->apiID[$this->method]); - $tableBody = array(); - if (!empty($response['result']) && $response['result'] ='error') - echo ''.__('Piwik error', 'wp-piwik').': '.htmlentities($response['message'], ENT_QUOTES, 'utf-8'); - else { - $tableHead = array(__('Browser', 'wp-piwik'), __('Unique', 'wp-piwik'), __('Percent', 'wp-piwik')); - if (isset($response[0]['nb_uniq_visitors'])) $unique = 'nb_uniq_visitors'; - else $unique = 'sum_daily_nb_uniq_visitors'; - $count = 0; - $sum = 0; - $js = array(); - $class = array(); - if (is_array($response)) - foreach ($response as $row) { - $count++; - $sum += isset($row[$unique])?$row[$unique]:0; - if ($count < $this->limit) - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - elseif (!isset($tableBody['Others'])) { - $tableBody['Others'] = array($row['label'], $row[$unique], 0); - $class['Others'] = 'wp-piwik-hideDetails'; - $js['Others'] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - $class[$row['label']] = 'wp-piwik-hideDetails hidden'; - $js[$row['label']] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - } else { - $tableBody['Others'][1] += $row[$unique]; - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - $class[$row['label']] = 'wp-piwik-hideDetails hidden'; - $js[$row['label']] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - } - } - if ($count > $this->limit) - $tableBody['Others'][0] = __('Others', 'wp-piwik'); - elseif ($count == $this->limit) { - $class['Others'] = $js['Others'] = ''; - } - - foreach ($tableBody as $key => $row) - $tableBody[$key][2] = number_format($row[1]/$sum*100, 2).'%'; - - if (!empty($tableBody)) $this->pieChart($tableBody); - $this->table($tableHead, $tableBody, null, false, $js, $class); - } - } - - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Chart.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Chart.php deleted file mode 100644 index 62d4c70..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Chart.php +++ /dev/null @@ -1,78 +0,0 @@ -getTimeSettings(); - $this->parameter = array( - 'idSite' => self::$wpPiwik->getPiwikSiteId($this->blogId), - 'period' => isset($params['period'])?$params['period']:$timeSettings['period'], - 'date' => 'last'.($timeSettings['period']=='day'?'30':'12'), - 'limit' => null - ); - $this->title = $prefix.__('Visitors', 'wp-piwik').' ('.__($this->rangeName(),'wp-piwik').')'; - $this->method = array('VisitsSummary.getVisits', 'VisitsSummary.getUniqueVisitors', 'VisitsSummary.getBounceCount', 'VisitsSummary.getActions'); - $this->context = 'normal'; - wp_enqueue_script('wp-piwik', self::$wpPiwik->getPluginURL().'js/wp-piwik.js', array(), self::$wpPiwik->getPluginVersion(), true); - wp_enqueue_script('wp-piwik-jqplot',self::$wpPiwik->getPluginURL().'js/jqplot/wp-piwik.jqplot.js',array('jquery')); - wp_enqueue_style('wp-piwik', self::$wpPiwik->getPluginURL().'css/wp-piwik.css',array(),self::$wpPiwik->getPluginVersion()); - add_action('admin_head-index.php', array($this, 'addHeaderLines')); - } - - public function addHeaderLines() { - echo ''; - echo ''; - echo ''; - } - - public function show() { - $response = array(); - $success = true; - foreach ($this->method as $method) { - $response[$method] = self::$wpPiwik->request($this->apiID[$method]); - if (!empty($response[$method]['result']) && $response[$method]['result'] ='error') - $success = false; - } - if (!$success) - echo ''.__('Piwik error', 'wp-piwik').': '.htmlentities($response[$method]['message'], ENT_QUOTES, 'utf-8'); - else { - $values = $labels = $bounced = $unique = ''; - $count = $uniqueSum = 0; - if (is_array($response['VisitsSummary.getVisits'])) - foreach ($response['VisitsSummary.getVisits'] as $date => $value) { - $count++; - $values .= $value.','; - $unique .= $response['VisitsSummary.getUniqueVisitors'][$date].','; - $bounced .= $response['VisitsSummary.getBounceCount'][$date].','; - if ($this->parameter['period'] == 'week') { - preg_match("/[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/", $date, $dateList); - $textKey = $this->dateFormat($dateList[0], 'short_week'); - } else $textKey = substr($date, -2); - $labels .= '['.$count.',"'.$textKey.'"],'; - $uniqueSum += $response['VisitsSummary.getActions'][$date]; - } - else { - $values = '0,'; - $labels = '[0,"-"],'; - $unique = '0,'; - $bounced = '0,'; - } - $average = round($uniqueSum/30,0); - $values = substr($values, 0, -1); - $unique = substr($unique, 0, -1); - $labels = substr($labels, 0, -1); - $bounced = substr($bounced, 0, -1); - echo '
'; - echo ''; - } - } - - } diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/City.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/City.php deleted file mode 100644 index d041ed8..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/City.php +++ /dev/null @@ -1,80 +0,0 @@ -getTimeSettings(); - $this->parameter = array( - 'idSite' => self::$wpPiwik->getPiwikSiteId($this->blogId), - 'period' => $timeSettings['period'], - 'date' => $timeSettings['date'] - ); - $this->title = $prefix.__('Countries', 'wp-piwik').' ('.__($timeSettings['description'],'wp-piwik').')'; - $this->method = 'UserCountry.getCity'; - $this->context = 'normal'; - wp_enqueue_script('wp-piwik', self::$wpPiwik->getPluginURL().'js/wp-piwik.js', array(), self::$wpPiwik->getPluginVersion(), true); - wp_enqueue_script('wp-piwik-jqplot',self::$wpPiwik->getPluginURL().'js/jqplot/wp-piwik.jqplot.js',array('jquery')); - wp_enqueue_style('wp-piwik', self::$wpPiwik->getPluginURL().'css/wp-piwik.css',array(),self::$wpPiwik->getPluginVersion()); - add_action('admin_head-index.php', array($this, 'addHeaderLines')); - } - - public function addHeaderLines() { - echo ''; - echo ''; - echo ''; - } - - public function show() { - $response = self::$wpPiwik->request($this->apiID[$this->method]); - $tableBody = array(); - if (!empty($response['result']) && $response['result'] ='error') - echo ''.__('Piwik error', 'wp-piwik').': '.htmlentities($response['message'], ENT_QUOTES, 'utf-8'); - else { - $tableHead = array(__('City', 'wp-piwik'), __('Unique', 'wp-piwik'), __('Percent', 'wp-piwik')); - if (isset($response[0]['nb_uniq_visitors'])) $unique = 'nb_uniq_visitors'; - else $unique = 'sum_daily_nb_uniq_visitors'; - $count = 0; - $sum = 0; - $js = array(); - $class = array(); - if (is_array($response)) - foreach ($response as $row) { - $count++; - $sum += isset($row[$unique])?$row[$unique]:0; - if ($count < $this->limit) - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - elseif (!isset($tableBody['Others'])) { - $tableBody['Others'] = array($row['label'], $row[$unique], 0); - $class['Others'] = 'wp-piwik-hideDetails'; - $js['Others'] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - $class[$row['label']] = 'wp-piwik-hideDetails hidden'; - $js[$row['label']] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - } else { - $tableBody['Others'][1] += $row[$unique]; - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - $class[$row['label']] = 'wp-piwik-hideDetails hidden'; - $js[$row['label']] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - } - } - if ($count > $this->limit) - $tableBody['Others'][0] = __('Others', 'wp-piwik'); - elseif ($count == $this->limit) { - $class['Others'] = $js['Others'] = ''; - } - - foreach ($tableBody as $key => $row) - $tableBody[$key][2] = number_format($row[1]/$sum*100, 2).'%'; - - if (!empty($tableBody)) $this->pieChart($tableBody); - $this->table($tableHead, $tableBody, null, false, $js, $class); - } - } - - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Country.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Country.php deleted file mode 100644 index 90108f5..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Country.php +++ /dev/null @@ -1,80 +0,0 @@ -getTimeSettings(); - $this->parameter = array( - 'idSite' => self::$wpPiwik->getPiwikSiteId($this->blogId), - 'period' => $timeSettings['period'], - 'date' => $timeSettings['date'] - ); - $this->title = $prefix.__('Countries', 'wp-piwik').' ('.__($timeSettings['description'],'wp-piwik').')'; - $this->method = 'UserCountry.getCountry '; - $this->context = 'normal'; - wp_enqueue_script('wp-piwik', self::$wpPiwik->getPluginURL().'js/wp-piwik.js', array(), self::$wpPiwik->getPluginVersion(), true); - wp_enqueue_script('wp-piwik-jqplot',self::$wpPiwik->getPluginURL().'js/jqplot/wp-piwik.jqplot.js',array('jquery')); - wp_enqueue_style('wp-piwik', self::$wpPiwik->getPluginURL().'css/wp-piwik.css',array(),self::$wpPiwik->getPluginVersion()); - add_action('admin_head-index.php', array($this, 'addHeaderLines')); - } - - public function addHeaderLines() { - echo ''; - echo ''; - echo ''; - } - - public function show() { - $response = self::$wpPiwik->request($this->apiID[$this->method]); - $tableBody = array(); - if (!empty($response['result']) && $response['result'] ='error') - echo ''.__('Piwik error', 'wp-piwik').': '.htmlentities($response['message'], ENT_QUOTES, 'utf-8'); - else { - $tableHead = array(__('Country', 'wp-piwik'), __('Unique', 'wp-piwik'), __('Percent', 'wp-piwik')); - if (isset($response[0]['nb_uniq_visitors'])) $unique = 'nb_uniq_visitors'; - else $unique = 'sum_daily_nb_uniq_visitors'; - $count = 0; - $sum = 0; - $js = array(); - $class = array(); - if (is_array($response)) - foreach ($response as $row) { - $count++; - $sum += isset($row[$unique])?$row[$unique]:0; - if ($count < $this->limit) - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - elseif (!isset($tableBody['Others'])) { - $tableBody['Others'] = array($row['label'], $row[$unique], 0); - $class['Others'] = 'wp-piwik-hideDetails'; - $js['Others'] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - $class[$row['label']] = 'wp-piwik-hideDetails hidden'; - $js[$row['label']] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - } else { - $tableBody['Others'][1] += $row[$unique]; - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - $class[$row['label']] = 'wp-piwik-hideDetails hidden'; - $js[$row['label']] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - } - } - if ($count > $this->limit) - $tableBody['Others'][0] = __('Others', 'wp-piwik'); - elseif ($count == $this->limit) { - $class['Others'] = $js['Others'] = ''; - } - - foreach ($tableBody as $key => $row) - $tableBody[$key][2] = number_format($row[1]/$sum*100, 2).'%'; - - if (!empty($tableBody)) $this->pieChart($tableBody); - $this->table($tableHead, $tableBody, null, false, $js, $class); - } - } - - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Ecommerce.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Ecommerce.php deleted file mode 100644 index af0dafa..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Ecommerce.php +++ /dev/null @@ -1,45 +0,0 @@ -getTimeSettings(); - $this->title = $prefix.__('E-Commerce', 'wp-piwik'); - $this->method = 'Goals.get'; - $this->parameter = array( - 'idSite' => self::$wpPiwik->getPiwikSiteId($this->blogId), - 'period' => $timeSettings['period'], - 'date' => $timeSettings['date'] - ); - } - - public function show() { - $response = self::$wpPiwik->request($this->apiID[$this->method]); - if (!empty($response['result']) && $response['result'] ='error') - echo ''.__('Piwik error', 'wp-piwik').': '.htmlentities($response['message'], ENT_QUOTES, 'utf-8'); - else { - $tableHead = null; - $tableBody = array( - array(__('Conversions', 'wp-piwik').':', $this->value($response, 'nb_conversions')), - array(__('Visits converted', 'wp-piwik').':', $this->value($response, 'nb_visits_converted')), - array(__('Revenue', 'wp-piwik').':', number_format($this->value($response, 'revenue'),2)), - array(__('Conversion rate', 'wp-piwik').':', $this->value($response, 'conversion_rate')), - array(__('Conversions (new visitor)', 'wp-piwik').':', $this->value($response, 'nb_conversions_new_visit')), - array(__('Visits converted (new visitor)', 'wp-piwik').':', $this->value($response, 'nb_visits_converted_new_visit')), - array(__('Revenue (new visitor)', 'wp-piwik').':', number_format($this->value($response, 'revenue_new_visit'),2)), - array(__('Conversion rate (new visitor)', 'wp-piwik').':', $this->value($response, 'conversion_rate_new_visit')), - array(__('Conversions (returning visitor)', 'wp-piwik').':', $this->value($response, 'nb_conversions_returning_visit')), - array(__('Visits converted (returning visitor)', 'wp-piwik').':', $this->value($response, 'nb_visits_converted_returning_visit')), - array(__('Revenue (returning visitor)', 'wp-piwik').':', number_format($this->value($response, 'revenue_returning_visit'),2)), - array(__('Conversion rate (returning visitor)', 'wp-piwik').':', $this->value($response, 'conversion_rate_returning_visit')), - ); - $tableFoot = (self::$settings->getGlobalOption('piwik_shortcut')?array(__('Shortcut', 'wp-piwik').':', 'Piwik'.(isset($aryConf['inline']) && $aryConf['inline']?' - WP-Piwik':'')):null); - $this->table($tableHead, $tableBody, $tableFoot); - } - } - - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Items.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Items.php deleted file mode 100644 index e339cac..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Items.php +++ /dev/null @@ -1,52 +0,0 @@ -getTimeSettings(); - $this->title = $prefix.__('E-Commerce Items', 'wp-piwik'); - $this->method = 'Goals.getItemsName'; - $this->parameter = array( - 'idSite' => self::$wpPiwik->getPiwikSiteId($this->blogId), - 'period' => $timeSettings['period'], - 'date' => $timeSettings['date'] - ); - } - - public function show() { - $response = self::$wpPiwik->request($this->apiID[$this->method]); - if (!empty($response['result']) && $response['result'] ='error') - echo ''.__('Piwik error', 'wp-piwik').': '.htmlentities($response['message'], ENT_QUOTES, 'utf-8'); - else { - $tableHead = array( - __('Label', 'wp-piwik'), - __('Revenue', 'wp-piwik'), - __('Quantity', 'wp-piwik'), - __('Orders', 'wp-piwik'), - __('Avg. price', 'wp-piwik'), - __('Avg. quantity', 'wp-piwik'), - __('Conversion rate', 'wp-piwik'), - ); - $tableBody = array(); - if (is_array($response)) - foreach ($response as $data) { - array_push($tableBody, array( - $data['label'], - number_format($data['revenue'],2), - $data['quantity'], - $data['orders'], - number_format($data['avg_price'],2), - $data['avg_quantity'], - $data['conversion_rate'] - )); - } - $tableFoot = array(); - $this->table($tableHead, $tableBody, $tableFoot); - } - } - - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/ItemsCategory.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/ItemsCategory.php deleted file mode 100644 index 2ed58ae..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/ItemsCategory.php +++ /dev/null @@ -1,52 +0,0 @@ -getTimeSettings(); - $this->title = $prefix.__('E-Commerce Item Categories', 'wp-piwik'); - $this->method = 'Goals.getItemsCategory'; - $this->parameter = array( - 'idSite' => self::$wpPiwik->getPiwikSiteId($this->blogId), - 'period' => $timeSettings['period'], - 'date' => $timeSettings['date'] - ); - } - - public function show() { - $response = self::$wpPiwik->request($this->apiID[$this->method]); - if (!empty($response['result']) && $response['result'] ='error') - echo ''.__('Piwik error', 'wp-piwik').': '.htmlentities($response['message'], ENT_QUOTES, 'utf-8'); - else { - $tableHead = array( - __('Label', 'wp-piwik'), - __('Revenue', 'wp-piwik'), - __('Quantity', 'wp-piwik'), - __('Orders', 'wp-piwik'), - __('Avg. price', 'wp-piwik'), - __('Avg. quantity', 'wp-piwik'), - __('Conversion rate', 'wp-piwik'), - ); - $tableBody = array(); - if (is_array($response)) - foreach ($response as $data) { - array_push($tableBody, array( - $data['label'], - isset($data['revenue'])?number_format($data['revenue'],2):"-.--", - isset($data['quantity'])?$data['quantity']:'-', - isset($data['orders'])?$data['orders']:'-', - number_format($data['avg_price'],2), - $data['avg_quantity'], - $data['conversion_rate'] - )); - } - $tableFoot = array(); - $this->table($tableHead, $tableBody, $tableFoot); - } - } - -} \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Keywords.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Keywords.php deleted file mode 100644 index bb50c0c..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Keywords.php +++ /dev/null @@ -1,21 +0,0 @@ -getTimeSettings(); - $this->parameter = array( - 'idSite' => self::$wpPiwik->getPiwikSiteId($this->blogId), - 'period' => $timeSettings['period'], - 'date' => $timeSettings['date'] - ); - $this->title = $prefix.__('Keywords', 'wp-piwik').' ('.__($timeSettings['description'],'wp-piwik').')'; - $this->method = 'Referrers.getKeywords'; - $this->name = 'Keyword'; - } - - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Models.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Models.php deleted file mode 100644 index 089b506..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Models.php +++ /dev/null @@ -1,80 +0,0 @@ -getTimeSettings(); - $this->parameter = array( - 'idSite' => self::$wpPiwik->getPiwikSiteId($this->blogId), - 'period' => $timeSettings['period'], - 'date' => $timeSettings['date'] - ); - $this->title = $prefix.__('Models', 'wp-piwik').' ('.__($timeSettings['description'],'wp-piwik').')'; - $this->method = 'DevicesDetection.getModel'; - $this->context = 'normal'; - wp_enqueue_script('wp-piwik', self::$wpPiwik->getPluginURL().'js/wp-piwik.js', array(), self::$wpPiwik->getPluginVersion(), true); - wp_enqueue_script('wp-piwik-jqplot',self::$wpPiwik->getPluginURL().'js/jqplot/wp-piwik.jqplot.js',array('jquery')); - wp_enqueue_style('wp-piwik', self::$wpPiwik->getPluginURL().'css/wp-piwik.css',array(),self::$wpPiwik->getPluginVersion()); - add_action('admin_head-index.php', array($this, 'addHeaderLines')); - } - - public function addHeaderLines() { - echo ''; - echo ''; - echo ''; - } - - public function show() { - $response = self::$wpPiwik->request($this->apiID[$this->method]); - $tableBody = array(); - if (!empty($response['result']) && $response['result'] ='error') - echo ''.__('Piwik error', 'wp-piwik').': '.htmlentities($response['message'], ENT_QUOTES, 'utf-8'); - else { - $tableHead = array(__('Model', 'wp-piwik'), __('Unique', 'wp-piwik'), __('Percent', 'wp-piwik')); - if (isset($response[0]['nb_uniq_visitors'])) $unique = 'nb_uniq_visitors'; - else $unique = 'sum_daily_nb_uniq_visitors'; - $count = 0; - $sum = 0; - $js = array(); - $class = array(); - if (is_array($response)) - foreach ($response as $row) { - $count++; - $sum += isset($row[$unique])?$row[$unique]:0; - if ($count < $this->limit) - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - elseif (!isset($tableBody['Others'])) { - $tableBody['Others'] = array($row['label'], $row[$unique], 0); - $class['Others'] = 'wp-piwik-hideDetails'; - $js['Others'] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - $class[$row['label']] = 'wp-piwik-hideDetails hidden'; - $js[$row['label']] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - } else { - $tableBody['Others'][1] += $row[$unique]; - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - $class[$row['label']] = 'wp-piwik-hideDetails hidden'; - $js[$row['label']] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - } - } - if ($count > $this->limit) - $tableBody['Others'][0] = __('Others', 'wp-piwik'); - elseif ($count == $this->limit) { - $class['Others'] = $js['Others'] = ''; - } - - foreach ($tableBody as $key => $row) - $tableBody[$key][2] = number_format($row[1]/$sum*100, 2).'%'; - - if (!empty($tableBody)) $this->pieChart($tableBody); - $this->table($tableHead, $tableBody, null, false, $js, $class); - } - } - - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Noresult.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Noresult.php deleted file mode 100644 index 11b7c31..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Noresult.php +++ /dev/null @@ -1,38 +0,0 @@ -getTimeSettings(); - $this->parameter = array( - 'idSite' => self::$wpPiwik->getPiwikSiteId($this->blogId), - 'period' => $timeSettings['period'], - 'date' => $timeSettings['date'] - ); - $this->title = $prefix.__('Site Search', 'wp-piwik').' ('.__($timeSettings['description'],'wp-piwik').')'; - $this->method = 'Actions.getSiteSearchNoResultKeywords'; - } - - public function show() { - $response = self::$wpPiwik->request($this->apiID[$this->method]); - if (!empty($response['result']) && $response['result'] ='error') - echo ''.__('Piwik error', 'wp-piwik').': '.htmlentities($response['message'], ENT_QUOTES, 'utf-8'); - else { - $tableHead = array(__('Keyword', 'wp-piwik'), __('Requests', 'wp-piwik'), __('Bounced', 'wp-piwik')); - $tableBody = array(); - $count = 0; - if (is_array($response)) - foreach ($response as $row) { - $count++; - $tableBody[] = array($row['label'], $row['nb_visits'], $row['bounce_rate']); - if ($count == 10) break; - } - $this->table($tableHead, $tableBody, null); - } - } - - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/OptOut.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/OptOut.php deleted file mode 100644 index deaf018..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/OptOut.php +++ /dev/null @@ -1,31 +0,0 @@ -parameter = $params; - } - - public function show() { - $protocol = (isset ( $_SERVER ['HTTPS'] ) && $_SERVER ['HTTPS'] != 'off') ? 'https' : 'http'; - switch (self::$settings->getGlobalOption ( 'piwik_mode' )) { - case 'php' : - $PIWIK_URL = $protocol . ':' . self::$settings->getGlobalOption ( 'proxy_url' ); - break; - case 'cloud' : - $PIWIK_URL = 'https://' . self::$settings->getGlobalOption ( 'piwik_user' ) . '.innocraft.cloud/'; - break; - case 'cloud-matomo': - $PIWIK_URL = 'https://' . self::$settings->getGlobalOption ( 'matomo_user' ) . '.matomo.cloud/'; - break; - default : - $PIWIK_URL = self::$settings->getGlobalOption ( 'piwik_url' ); - } - $this->out ( '' ); - } - - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Overview.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Overview.php deleted file mode 100644 index e47e9f3..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Overview.php +++ /dev/null @@ -1,63 +0,0 @@ -getTimeSettings(); - $this->parameter = array( - 'idSite' => self::$wpPiwik->getPiwikSiteId($this->blogId), - 'period' => isset($params['period'])?$params['period']:$timeSettings['period'], - 'date' => isset($params['date'])?$params['date']: $timeSettings['date'], - 'description' => $timeSettings['description'] - ); - $this->title = !$this->isShortcode?$prefix.__('Overview', 'wp-piwik').' ('.__($this->pageId == 'dashboard'?$this->rangeName():$timeSettings['description'],'wp-piwik').')':($params['title']?$params['title']:''); - $this->method = 'VisitsSummary.get'; - } - - public function show() { - $response = self::$wpPiwik->request($this->apiID[$this->method]); - if (!empty($response['result']) && $response['result'] ='error') - echo ''.__('Piwik error', 'wp-piwik').': '.htmlentities($response['message'], ENT_QUOTES, 'utf-8'); - else { - if ($this->parameter['date'] == 'last30') { - $result = array(); - if (is_array($response)) { - foreach ($response as $data) - foreach ($data as $key => $value) - if (isset($result[$key]) && is_numeric($value)) - $result[$key] += $value; - elseif (is_numeric($value)) - $result[$key] = $value; - else - $result[$key] = 0; - if (isset($result['nb_visits']) && $result['nb_visits'] > 0) { - $result['nb_actions_per_visit'] = round($result['nb_actions'] / $result['nb_visits'], 1); - $result['bounce_rate'] = round($result['bounce_count'] / $result['nb_visits'] * 100, 1) . '%'; - $result['avg_time_on_site'] = round($result['sum_visit_length'] / $result['nb_visits'], 0); - } else $result['nb_actions_per_visit'] = $result['bounce_rate'] = $result['avg_time_on_site'] = 0; - } - $response = $result; - } - $time = isset($response['sum_visit_length'])?$this->timeFormat($response['sum_visit_length']):'-'; - $avgTime = isset($response['avg_time_on_site'])?$this->timeFormat($response['avg_time_on_site']):'-'; - $tableHead = null; - $tableBody = array(array(__('Visitors', 'wp-piwik').':', $this->value($response, 'nb_visits'))); - if ($this->value($response, 'nb_uniq_visitors') != '-') - array_push($tableBody, array(__('Unique visitors', 'wp-piwik').':', $this->value($response, 'nb_uniq_visitors'))); - array_push($tableBody, - array(__('Page views', 'wp-piwik').':', $this->value($response, 'nb_actions').' (Ø '.$this->value($response, 'nb_actions_per_visit').')'), - array(__('Total time spent', 'wp-piwik').':', $time.' (Ø '.$avgTime.')'), - array(__('Bounce count', 'wp-piwik').':', $this->value($response, 'bounce_count').' ('.$this->value($response, 'bounce_rate').')') - ); - if ($this->parameter['date'] != 'last30') - array_push($tableBody, array(__('Time/visit', 'wp-piwik').':', $avgTime), array(__('Max. page views in one visit', 'wp-piwik').':', $this->value($response, 'max_actions'))); - $tableFoot = (self::$settings->getGlobalOption('piwik_shortcut')?array(__('Shortcut', 'wp-piwik').':', 'Piwik'.(isset($aryConf['inline']) && $aryConf['inline']?' - WP-Piwik':'')):null); - $this->table($tableHead, $tableBody, $tableFoot); - } - } - - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Pages.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Pages.php deleted file mode 100644 index 0b16ea5..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Pages.php +++ /dev/null @@ -1,21 +0,0 @@ -getTimeSettings(); - $this->parameter = array( - 'idSite' => self::$wpPiwik->getPiwikSiteId($this->blogId), - 'period' => $timeSettings['period'], - 'date' => $timeSettings['date'] - ); - $this->title = $prefix.__('Pages', 'wp-piwik').' ('.__($timeSettings['description'],'wp-piwik').')'; - $this->method = 'Actions.getPageTitles'; - $this->name = __('Page', 'wp-piwik' ); - } - - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Plugins.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Plugins.php deleted file mode 100644 index a5c7b92..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Plugins.php +++ /dev/null @@ -1,38 +0,0 @@ -getTimeSettings(); - $this->parameter = array( - 'idSite' => self::$wpPiwik->getPiwikSiteId($this->blogId), - 'period' => $timeSettings['period'], - 'date' => $timeSettings['date'] - ); - $this->title = $prefix.__('Plugins', 'wp-piwik').' ('.__($timeSettings['description'],'wp-piwik').')'; - $this->method = 'DevicePlugins.getPlugin'; - } - - public function show() { - $response = self::$wpPiwik->request($this->apiID[$this->method]); - if (!empty($response['result']) && $response['result'] ='error') - echo ''.__('Piwik error', 'wp-piwik').': '.htmlentities($response['message'], ENT_QUOTES, 'utf-8'); - else { - $tableHead = array(__('Plugin', 'wp-piwik'), __('Visits', 'wp-piwik'), __('Percent', 'wp-piwik')); - $tableBody = array(); - $count = 0; - if (is_array($response)) - foreach ($response as $row) { - $count++; - $tableBody[] = array($row['label'], $row['nb_visits'], $row['nb_visits_percentage']); - if ($count == 10) break; - } - $this->table($tableHead, $tableBody, null); - } - } - - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Post.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Post.php deleted file mode 100644 index 1ec86a2..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Post.php +++ /dev/null @@ -1,51 +0,0 @@ -parameter = array( - 'idSite' => self::$wpPiwik->getPiwikSiteId($this->blogId), - 'period' => 'range', - 'date' => isset($params['range'])?$params['range']:'last30', - 'key' => isset($params['key'])?$params['key']:null, - 'pageUrl' => isset($params['url'])?$params['url']:urlencode(get_permalink($post->ID)), - ); - $this->title = $prefix.__('Overview', 'wp-piwik').' ('.__($this->parameter['date'],'wp-piwik').')'; - $this->method = 'Actions.getPageUrl'; - } - - public function show() { - $response = self::$wpPiwik->request($this->apiID[$this->method]); - if (!empty($response['result']) && $response['result'] ='error') - echo ''.__('Piwik error', 'wp-piwik').': '.htmlentities($response['message'], ENT_QUOTES, 'utf-8'); - else { - if (isset($response[0])) - $response = $response[0]; - if ($this->parameter['key']) { - $this->out(isset($response[$this->parameter['key']])?$response[$this->parameter['key']]:'not defined'); - return; - } - $time = isset($response['entry_sum_visit_length'])?$this->timeFormat($response['entry_sum_visit_length']):'-'; - $avgTime = isset($response['avg_time_on_page'])?$this->timeFormat($response['avg_time_on_page']):'-'; - $tableHead = null; - $tableBody = array( - array(__('Visitors', 'wp-piwik').':', $this->value($response, 'nb_visits')), - array(__('Unique visitors', 'wp-piwik').':', $this->value($response, 'sum_daily_nb_uniq_visitors')), - array(__('Page views', 'wp-piwik').':', $this->value($response, 'nb_hits').' (Ø '.$this->value($response, 'entry_nb_actions').')'), - array(__('Total time spent', 'wp-piwik').':', $time), - array(__('Time/visit', 'wp-piwik').':', $avgTime), - array(__('Bounce count', 'wp-piwik').':', $this->value($response, 'entry_bounce_count').' ('.$this->value($response, 'bounce_rate').')'), - array(__('Min. generation time', 'wp-piwik').':', $this->value($response, 'min_time_generation')), - array(__('Max. generation time', 'wp-piwik').':', $this->value($response, 'max_time_generation')) - ); - $tableFoot = (self::$settings->getGlobalOption('piwik_shortcut')?array(__('Shortcut', 'wp-piwik').':', 'Piwik'.(isset($aryConf['inline']) && $aryConf['inline']?' - WP-Piwik':'')):null); - $this->table($tableHead, $tableBody, $tableFoot); - } - } - - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Referrers.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Referrers.php deleted file mode 100644 index 51c8882..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Referrers.php +++ /dev/null @@ -1,21 +0,0 @@ -getTimeSettings(); - $this->parameter = array( - 'idSite' => self::$wpPiwik->getPiwikSiteId($this->blogId), - 'period' => $timeSettings['period'], - 'date' => $timeSettings['date'] - ); - $this->title = $prefix.__('Referrers', 'wp-piwik').' ('.__($timeSettings['description'],'wp-piwik').')'; - $this->method = 'Referrers.getWebsites'; - $this->name = 'Referrer'; - } - - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Screens.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Screens.php deleted file mode 100644 index d6cd460..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Screens.php +++ /dev/null @@ -1,75 +0,0 @@ -getTimeSettings(); - $this->parameter = array( - 'idSite' => self::$wpPiwik->getPiwikSiteId($this->blogId), - 'period' => $timeSettings['period'], - 'date' => $timeSettings['date'] - ); - $this->title = $prefix.__('Resolutions', 'wp-piwik').' ('.__($timeSettings['description'],'wp-piwik').')'; - $this->method = 'Resolution.getResolution'; - $this->context = 'normal'; - wp_enqueue_script('wp-piwik', self::$wpPiwik->getPluginURL().'js/wp-piwik.js', array(), self::$wpPiwik->getPluginVersion(), true); - wp_enqueue_script('wp-piwik-jqplot',self::$wpPiwik->getPluginURL().'js/jqplot/wp-piwik.jqplot.js',array('jquery')); - wp_enqueue_style('wp-piwik', self::$wpPiwik->getPluginURL().'css/wp-piwik.css',array(),self::$wpPiwik->getPluginVersion()); - add_action('admin_head-index.php', array($this, 'addHeaderLines')); - } - - public function addHeaderLines() { - echo ''; - echo ''; - echo ''; - } - - public function show() { - $response = self::$wpPiwik->request($this->apiID[$this->method]); - $tableBody = array(); - if (!empty($response['result']) && $response['result'] ='error') - echo ''.__('Piwik error', 'wp-piwik').': '.htmlentities($response['message'], ENT_QUOTES, 'utf-8'); - else { - $tableHead = array(__('Resolution', 'wp-piwik'), __('Unique', 'wp-piwik'), __('Percent', 'wp-piwik')); - if (isset($response[0]['nb_uniq_visitors'])) $unique = 'nb_uniq_visitors'; - else $unique = 'sum_daily_nb_uniq_visitors'; - $count = 0; - $sum = 0; - $js = array(); - $class = array(); - if (is_array($response)) - foreach ($response as $row) { - $count++; - $sum += isset($row[$unique])?$row[$unique]:0; - if ($count < $this->limit) - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - elseif (!isset($tableBody['Others'])) { - $tableBody['Others'] = array($row['label'], $row[$unique], 0); - $class['Others'] = 'wp-piwik-hideDetails'; - $js['Others'] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - $class[$row['label']] = 'wp-piwik-hideDetails hidden'; - $js[$row['label']] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - } else { - $tableBody['Others'][1] += $row[$unique]; - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - $class[$row['label']] = 'wp-piwik-hideDetails hidden'; - $js[$row['label']] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - } - } - if ($count > $this->limit) - $tableBody['Others'][0] = __('Others', 'wp-piwik'); - - foreach ($tableBody as $key => $row) - $tableBody[$key][2] = number_format($row[1]/$sum*100, 2).'%'; - - if (!empty($tableBody)) $this->pieChart($tableBody); - $this->table($tableHead, $tableBody, null, false, $js, $class); - } - } - - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Search.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Search.php deleted file mode 100644 index 2cddf7e..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Search.php +++ /dev/null @@ -1,38 +0,0 @@ -getTimeSettings(); - $this->parameter = array( - 'idSite' => self::$wpPiwik->getPiwikSiteId($this->blogId), - 'period' => $timeSettings['period'], - 'date' => $timeSettings['date'] - ); - $this->title = $prefix.__('Site Search', 'wp-piwik').' ('.__($timeSettings['description'],'wp-piwik').')'; - $this->method = 'Actions.getSiteSearchKeywords'; - } - - public function show() { - $response = self::$wpPiwik->request($this->apiID[$this->method]); - if (!empty($response['result']) && $response['result'] ='error') - echo ''.__('Piwik error', 'wp-piwik').': '.htmlentities($response['message'], ENT_QUOTES, 'utf-8'); - else { - $tableHead = array(__('Keyword', 'wp-piwik'), __('Requests', 'wp-piwik'), __('Bounced', 'wp-piwik')); - $tableBody = array(); - $count = 0; - if (is_array($response)) - foreach ($response as $row) { - $count++; - $tableBody[] = array(htmlentities($row['label']), $row['nb_visits'], $row['bounce_rate']); - if ($count == 10) break; - } - $this->table($tableHead, $tableBody, null); - } - } - - } diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Seo.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Seo.php deleted file mode 100644 index a552225..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Seo.php +++ /dev/null @@ -1,31 +0,0 @@ -parameter = array( - 'url' => get_bloginfo('url') - ); - $this->title = $prefix.__('SEO', 'wp-piwik'); - $this->method = 'SEO.getRank'; - } - - public function show() { - $response = self::$wpPiwik->request($this->apiID[$this->method]); - if (!empty($response['result']) && $response['result'] ='error') - echo ''.__('Piwik error', 'wp-piwik').': '.htmlentities($response['message'], ENT_QUOTES, 'utf-8'); - else { - echo '
'; - if (is_array($response)) - foreach ($response as $val) - echo ''; - else echo ''; - echo '
'.(isset($val['logo_link']) && !empty($val['logo_link'])?''.$val['label'].'':$val['label']).''.$val['rank'].'
SEO module currently not available.
'; - } - } - - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/SystemDetails.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/SystemDetails.php deleted file mode 100644 index c5f48bc..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/SystemDetails.php +++ /dev/null @@ -1,73 +0,0 @@ -getTimeSettings(); - $this->parameter = array( - 'idSite' => self::$wpPiwik->getPiwikSiteId($this->blogId), - 'period' => $timeSettings['period'], - 'date' => $timeSettings['date'] - ); - $this->title = $prefix.__('Operation System Details', 'wp-piwik').' ('.__($timeSettings['description'],'wp-piwik').')'; - $this->method = 'DevicesDetection.getOsVersions'; - $this->context = 'normal'; - wp_enqueue_script('wp-piwik', self::$wpPiwik->getPluginURL().'js/wp-piwik.js', array(), self::$wpPiwik->getPluginVersion(), true); - wp_enqueue_script('wp-piwik-jqplot',self::$wpPiwik->getPluginURL().'js/jqplot/wp-piwik.jqplot.js',array('jquery')); - wp_enqueue_style('wp-piwik', self::$wpPiwik->getPluginURL().'css/wp-piwik.css',array(),self::$wpPiwik->getPluginVersion()); - add_action('admin_head-index.php', array($this, 'addHeaderLines')); - } - - public function addHeaderLines() { - echo ''; - echo ''; - echo ''; - } - - public function show() { - $response = self::$wpPiwik->request($this->apiID[$this->method]); - $tableBody = array(); - if (!empty($response['result']) && $response['result'] ='error') - echo ''.__('Piwik error', 'wp-piwik').': '.htmlentities($response['message'], ENT_QUOTES, 'utf-8'); - else { - $tableHead = array(__('Operation System', 'wp-piwik'), __('Unique', 'wp-piwik'), __('Percent', 'wp-piwik')); - if (isset($response[0]['nb_uniq_visitors'])) $unique = 'nb_uniq_visitors'; - else $unique = 'sum_daily_nb_uniq_visitors'; - $count = 0; - $sum = 0; - $js = array(); - $class = array(); - if (is_array($response)) - foreach ($response as $row) { - $count++; - $sum += isset($row[$unique])?$row[$unique]:0; - if ($count < $this->limit) - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - elseif (!isset($tableBody['Others'])) { - $tableBody['Others'] = array($row['label'], $row[$unique], 0); - $class['Others'] = 'wp-piwik-hideDetails'; - $js['Others'] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - $class[$row['label']] = 'wp-piwik-hideDetails hidden'; - $js[$row['label']] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - } else { - $tableBody['Others'][1] += $row[$unique]; - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - $class[$row['label']] = 'wp-piwik-hideDetails hidden'; - $js[$row['label']] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - } - } - if ($count > $this->limit) - $tableBody['Others'][0] = __('Others', 'wp-piwik'); - - foreach ($tableBody as $key => $row) - $tableBody[$key][2] = number_format($row[1]/$sum*100, 2).'%'; - - if (!empty($tableBody)) $this->pieChart($tableBody); - $this->table($tableHead, $tableBody, null, false, $js, $class); - } - } - - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Systems.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Systems.php deleted file mode 100644 index aae05ec..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Systems.php +++ /dev/null @@ -1,73 +0,0 @@ -getTimeSettings(); - $this->parameter = array( - 'idSite' => self::$wpPiwik->getPiwikSiteId($this->blogId), - 'period' => $timeSettings['period'], - 'date' => $timeSettings['date'] - ); - $this->title = $prefix.__('Operation Systems', 'wp-piwik').' ('.__($timeSettings['description'],'wp-piwik').')'; - $this->method = 'DevicesDetection.getOsFamilies'; - $this->context = 'normal'; - wp_enqueue_script('wp-piwik', self::$wpPiwik->getPluginURL().'js/wp-piwik.js', array(), self::$wpPiwik->getPluginVersion(), true); - wp_enqueue_script('wp-piwik-jqplot',self::$wpPiwik->getPluginURL().'js/jqplot/wp-piwik.jqplot.js',array('jquery')); - wp_enqueue_style('wp-piwik', self::$wpPiwik->getPluginURL().'css/wp-piwik.css',array(),self::$wpPiwik->getPluginVersion()); - add_action('admin_head-index.php', array($this, 'addHeaderLines')); - } - - public function addHeaderLines() { - echo ''; - echo ''; - echo ''; - } - - public function show() { - $response = self::$wpPiwik->request($this->apiID[$this->method]); - $tableBody = array(); - if (!empty($response['result']) && $response['result'] ='error') - echo ''.__('Piwik error', 'wp-piwik').': '.htmlentities($response['message'], ENT_QUOTES, 'utf-8'); - else { - $tableHead = array(__('Operation System', 'wp-piwik'), __('Unique', 'wp-piwik'), __('Percent', 'wp-piwik')); - if (isset($response[0]['nb_uniq_visitors'])) $unique = 'nb_uniq_visitors'; - else $unique = 'sum_daily_nb_uniq_visitors'; - $count = 0; - $sum = 0; - $js = array(); - $class = array(); - if (is_array($response)) - foreach ($response as $row) { - $count++; - $sum += isset($row[$unique])?$row[$unique]:0; - if ($count < $this->limit) - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - elseif (!isset($tableBody['Others'])) { - $tableBody['Others'] = array($row['label'], $row[$unique], 0); - $class['Others'] = 'wp-piwik-hideDetails'; - $js['Others'] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - $class[$row['label']] = 'wp-piwik-hideDetails hidden'; - $js[$row['label']] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - } else { - $tableBody['Others'][1] += $row[$unique]; - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - $class[$row['label']] = 'wp-piwik-hideDetails hidden'; - $js[$row['label']] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - } - } - if ($count > $this->limit) - $tableBody['Others'][0] = __('Others', 'wp-piwik'); - - foreach ($tableBody as $key => $row) - $tableBody[$key][2] = number_format($row[1]/$sum*100, 2).'%'; - - if (!empty($tableBody)) $this->pieChart($tableBody); - $this->table($tableHead, $tableBody, null, false, $js, $class); - } - } - - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Types.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Types.php deleted file mode 100644 index 8aea5d0..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Types.php +++ /dev/null @@ -1,80 +0,0 @@ -getTimeSettings(); - $this->parameter = array( - 'idSite' => self::$wpPiwik->getPiwikSiteId($this->blogId), - 'period' => $timeSettings['period'], - 'date' => $timeSettings['date'] - ); - $this->title = $prefix.__('Types', 'wp-piwik').' ('.__($timeSettings['description'],'wp-piwik').')'; - $this->method = 'DevicesDetection.getType'; - $this->context = 'normal'; - wp_enqueue_script('wp-piwik', self::$wpPiwik->getPluginURL().'js/wp-piwik.js', array(), self::$wpPiwik->getPluginVersion(), true); - wp_enqueue_script('wp-piwik-jqplot',self::$wpPiwik->getPluginURL().'js/jqplot/wp-piwik.jqplot.js',array('jquery')); - wp_enqueue_style('wp-piwik', self::$wpPiwik->getPluginURL().'css/wp-piwik.css',array(),self::$wpPiwik->getPluginVersion()); - add_action('admin_head-index.php', array($this, 'addHeaderLines')); - } - - public function addHeaderLines() { - echo ''; - echo ''; - echo ''; - } - - public function show() { - $response = self::$wpPiwik->request($this->apiID[$this->method]); - $tableBody = array(); - if (!empty($response['result']) && $response['result'] ='error') - echo ''.__('Piwik error', 'wp-piwik').': '.htmlentities($response['message'], ENT_QUOTES, 'utf-8'); - else { - $tableHead = array(__('Type', 'wp-piwik'), __('Unique', 'wp-piwik'), __('Percent', 'wp-piwik')); - if (isset($response[0]['nb_uniq_visitors'])) $unique = 'nb_uniq_visitors'; - else $unique = 'sum_daily_nb_uniq_visitors'; - $count = 0; - $sum = 0; - $js = array(); - $class = array(); - if (is_array($response)) - foreach ($response as $row) { - $count++; - $sum += isset($row[$unique])?$row[$unique]:0; - if ($count < $this->limit) - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - elseif (!isset($tableBody['Others'])) { - $tableBody['Others'] = array($row['label'], $row[$unique], 0); - $class['Others'] = 'wp-piwik-hideDetails'; - $js['Others'] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - $class[$row['label']] = 'wp-piwik-hideDetails hidden'; - $js[$row['label']] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - } else { - $tableBody['Others'][1] += $row[$unique]; - $tableBody[$row['label']] = array($row['label'], $row[$unique], 0); - $class[$row['label']] = 'wp-piwik-hideDetails hidden'; - $js[$row['label']] = '$j'."( '.wp-piwik-hideDetails' ).toggle( 'hidden' );"; - } - } - if ($count > $this->limit) - $tableBody['Others'][0] = __('Others', 'wp-piwik'); - elseif ($count == $this->limit) { - $class['Others'] = $js['Others'] = ''; - } - - foreach ($tableBody as $key => $row) - $tableBody[$key][2] = number_format($row[1]/$sum*100, 2).'%'; - - if (!empty($tableBody)) $this->pieChart($tableBody); - $this->table($tableHead, $tableBody, null, false, $js, $class); - } - } - - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Visitors.php b/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Visitors.php deleted file mode 100644 index e54cd35..0000000 --- a/wp-content/plugins/wp-piwik/classes/WP_Piwik/Widget/Visitors.php +++ /dev/null @@ -1,68 +0,0 @@ -getTimeSettings(); - $this->parameter = array( - 'idSite' => self::$wpPiwik->getPiwikSiteId($this->blogId), - 'period' => isset($params['period'])?$params['period']:$timeSettings['period'], - 'date' => 'last'.($timeSettings['period']=='day'?'30':'12'), - 'limit' => null - ); - $this->title = $prefix.__('Visitors', 'wp-piwik').' ('.__($this->rangeName(),'wp-piwik').')'; - $this->method = array('VisitsSummary.getVisits', 'VisitsSummary.getUniqueVisitors', 'VisitsSummary.getBounceCount', 'VisitsSummary.getActions'); - $this->context = 'normal'; - wp_enqueue_script('wp-piwik', self::$wpPiwik->getPluginURL().'js/wp-piwik.js', array(), self::$wpPiwik->getPluginVersion(), true); - wp_enqueue_script('wp-piwik-jqplot',self::$wpPiwik->getPluginURL().'js/jqplot/wp-piwik.jqplot.js',array('jquery')); - wp_enqueue_style('wp-piwik', self::$wpPiwik->getPluginURL().'css/wp-piwik.css',array(),self::$wpPiwik->getPluginVersion()); - add_action('admin_head-index.php', array($this, 'addHeaderLines')); - } - - public function show() { - $response = array(); - $success = true; - foreach ($this->method as $method) { - $response[$method] = self::$wpPiwik->request($this->apiID[$method]); - if (!empty($response[$method]['result']) && $response[$method]['result'] ='error') - $success = false; - } - if (!$success) - echo ''.__('Piwik error', 'wp-piwik').': '.htmlentities($response[$method]['message'], ENT_QUOTES, 'utf-8'); - else { - $data = array(); - if (is_array($response) && is_array($response['VisitsSummary.getVisits'])) - foreach ($response['VisitsSummary.getVisits'] as $key => $value) { - if ($this->parameter['period'] == 'week') { - preg_match("/[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/", $key, $dateList); - $jsKey = $dateList[0]; - $textKey = $this->dateFormat($jsKey, 'week'); - } elseif ($this->parameter['period'] == 'month') { - $jsKey = $key.'-01'; - $textKey = $key; - } else $jsKey = $textKey = $key; - $data[] = array( - $textKey, - $value, - $response['VisitsSummary.getUniqueVisitors'][$key]?$response['VisitsSummary.getUniqueVisitors'][$key]:'-', - $response['VisitsSummary.getBounceCount'][$key]?$response['VisitsSummary.getBounceCount'][$key]:'-', - $response['VisitsSummary.getActions'][$key]?$response['VisitsSummary.getActions'][$key]:'-' - ); - $javaScript[] = 'javascript:wp_piwik_datelink(\''.urlencode('wp-piwik_stats').'\',\''.str_replace('-', '', $jsKey).'\',\''.(isset($_GET['wpmu_show_stats'])?(int) $_GET['wpmu_show_stats']:'').'\');'; - } - $this->table( - array(__('Date', 'wp-piwik'), __('Visits', 'wp-piwik'), __('Unique', 'wp-piwik'), __('Bounced', 'wp-piwik'), __('Page Views', 'wp-piwik')), - array_reverse($data), - array(), - 'clickable', - array_reverse(isset($javaScript)?$javaScript:[]) - ); - } - - } - - } \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/config.php b/wp-content/plugins/wp-piwik/config.php deleted file mode 100644 index 7e46031..0000000 --- a/wp-content/plugins/wp-piwik/config.php +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - GNU General Public License - GNU Project - Free Software Foundation (FSF) - -

GNU GENERAL PUBLIC LICENSE

-

Version 3, 29 June 2007

- -

Copyright © 2007 Free Software Foundation, Inc. <http://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 <http://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 -<http://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 -<http://www.gnu.org/philosophy/why-not-lgpl.html>.

- - - \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/index.php b/wp-content/plugins/wp-piwik/index.php deleted file mode 100644 index 1f95b2e..0000000 --- a/wp-content/plugins/wp-piwik/index.php +++ /dev/null @@ -1,2 +0,0 @@ -. - -Downloads can be found at . - -The mailing list is at . - -Examples and unit tests are at . - -Documentation is at . - -The project page and source code are at . - -Bugs, issues, feature requests: . - -Basic Usage Instructions: - -jqPlot requires jQuery (1.4+ required for certain features). jQuery 1.9.1 is included in -the distribution. To use jqPlot include jQuery, the jqPlot jQuery plugin, the jqPlot css file and -optionally the excanvas script to support IE version prior to IE 9 in your web page: - -> -> -> -> - -For usage instructions, see in usage.txt. For available options, see - in jqPlotOptions.txt. - -Building from source: - -If you've cloned the repository, you can build a distribution from source. -You need to have ant installed. You can simply -type "ant" from the jqplot directory to build the default "all" target. -There are 6 pertinent targets: clean, dist, min, docs, compress and all. Use: - -> ant -p - -to get a description of the various build targets. - -Legal Notices: - -Copyright (c) 2009-2013 Chris Leonello -jqPlot is currently available for use in all personal or commercial projects -under both the MIT and GPL version 2.0 licenses. This means that you can -choose the license that best suits your project and use it accordingly. - -Although not required, the author would appreciate an email letting him -know of any substantial use of jqPlot. You can reach the author at: -chris at jqplot or see http://www.jqplot.com/info.php . - -If you are feeling kind and generous, consider supporting the project by -making a donation at: http://www.jqplot.com/donate.php . - -jqPlot includes date instance methods and printf/sprintf functions by other authors: - -Date instance methods: - - author Ken Snyder (ken d snyder at gmail dot com) - date 2008-09-10 - version 2.0.2 (http://kendsnyder.com/sandbox/date/) - license Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) - -JavaScript printf/sprintf functions. - - version 2007.04.27 - author Ash Searle - http://hexmen.com/blog/2007/03/printf-sprintf/ - http://hexmen.com/js/sprintf.js - The author (Ash Searle) has placed this code in the public domain: - "This code is unrestricted: you are free to use it however you like." diff --git a/wp-content/plugins/wp-piwik/js/jqplot/changes.txt b/wp-content/plugins/wp-piwik/js/jqplot/changes.txt deleted file mode 100644 index ce990ea..0000000 --- a/wp-content/plugins/wp-piwik/js/jqplot/changes.txt +++ /dev/null @@ -1,458 +0,0 @@ -Title: Change Log - -1.0.8: -* Issue #375: sortMergedLabels does not sort string labels -* Issue #279: Groups > 3 Causes Alignment Issues -* Issue #439: IE can't display a customized legend in Quirks mode -* Issue #482: "Undefined" error message when plotting a chart with no data -* Issue #116: Don't mix spaces and tabs for indentation -* Issue #564: Metergauge renderer not resizable when replotting -* Issue #409: MeterGaugeRenderer replot/redraw offsets center -* Issue #523: Adding rectangles to Canvas Overlay plugin -* Issue #756: jqplot.min files contain non-UTF-8 characters -* Issue #223: fillToZero does not color negative values when crossover point is 0 -* Pull Request #23: Adding rectangles to Canvas Overlay plugin -* Pull Request #28: Cross-over points of 0 will actually change colors -* Pull Request #35: Don't highlight hidden bars or show tooltips for them -* Pull Request #41: Add dutch(nl) and svenska(sv) translations for dates -* Add tooltip support for Pie Charts -* Update to latest YUI compressor - -1.0.7: -* Issue #726: Bug in sprintf %p, sometimes it outputs exponential form rather than decimal -* Issue #717: Plot's preDrawHooks not called -* Issue #707: Browser hangs with LogAxisRenderer when value is 0 -* Issue #695: Horizontal Bar Chart Negative Series Colors Not Working -* Issue #670: Examples IE7, IE8 and IE9 multipleBarColors.html failure and fix -* Issue #636: X Axis Date Renderer Single Day Not plotting -* Issue #607: Integration issue -* Issue #571: Decimal numbers not properly formatted -* Issue #552: jqPlot crashes when interval too small -* Issue #536: DateAxisRenderer invalid scaling -* Issue #534: "decimalMark" in the "jqplot.sprintf.js" -* Issue #529: Scientific notation on label values ending in 0 -* Issue #521: invalid JS in meterGaugeRenderer.js -* Issue #516: Including BezierCurveRenderer plugin and initializing jqplot with no options give error -* Issue #500: DateAxisRenderer has timezone related issues -* Issue #452: Including ALL jqPlot plugins causes an Error -* Issue #494: No point when use LogAxisRenderer and a point has a zero value -* Issue #430: getIsoWeek: invalid method call -* Issue #280: jqplot Options -* Issue #179: Spelling/grammar -* Pull Request #18: Implement getTop in CanvasAxisTickRenderer -* Pull Request #21: Performance issue when drawing pointlabels with zeros/null values -* Pull Request #24: Added suggested fix in comment #8 for issue #536 -* Pull Request #29: Removed unbalanced addition of UTC offset -* Pull Request #33: Documentation fixes (issue #179, other changes) -* Pull Request #34: Start of updating jqPlotOptions.txt -* Pull Request #37: Example and suggested fix for issues #552 and issue #536 -* Pull Request #39: Fixed trailing comma which caused issues with IE7 - -1.0.6: -* Add left sidebar navigation to examples -* Update examples for jquery 1.9.1 and jquery ui 1.10.0 -* Add colorpicker.js to distribution -* Fix some problems with examples when viewing with local file system -* Add "minified" copyright notice for minified files, similar to jquery's notice. -* Pull Request #25: jqplot.sprintf.js is no longer the last file in the concatenated jquery.jqplot.js -* Pull Request #17: Fixed bug causing custom pointLabels passed with plot data to be ignored for horizontal bar graphs. -* Pull Request #10: Build error by invalid encoding. -* Issue #714: handle tickColor in meterGaugeRenderer -* Issue #519: jsDate Polish Localization - -1.0.5: -* Updated to jQuery 1.9 - -1.0.0b2: -* Major improvements in memory usage: -** Merged in changes from Timo Besenruether to reuse canvas elements and improve - memory performance. -** Fixed all identifiable DOM leaks. -** Mergged in changes from cguillot for memory improvements in IE < 9. -* Added vertical and dashed vertical line support for canvas overlay. -* Fixed bug where initially hidden plots would not display. -* Fixed bug with point labels and null data points. -* Updated to jQuery 1.6.1. -* Improved pie slice margin calculation and fixed slice margin and pie positioning - with small slices. -* Improved bar renderer so bars always start at 0 if: -** The axis is a linear axis (not log/date). -** There are no other line types besides bars attached to the axis. -** The data on the axis is all >= 0. -** The user has not specified a pad, padMin or forceTickAt0 = true option. -* Modified tick prefix behavious so prefix no added to all ticks, even if format - string is specified. -* Fix to ensure original tick formats are applied when zooming and resetting - zoom. -* Updated auto tick format string so format adjusted when zooming. -* Modified auto tick computation to put less ticks on small plots and more - ticks on large plots. -* Update bubble render to support gradients in IE 9. - -1.0.0b1: -* Much improved tick generation algorithm to get precise rounded - tick values (Thanks Scott Prahl!). -* Auto compute tick format string if none is provided. -* Much better "slicing" of pie charts when using "sliceMargin" option to set - a gap between the slices. -* Expanded canvasOverlay plugin to create arbitrary dashed and solid - horizontal and vertical lines on top of plot. -* Added defaultColors and defaultNegativeColors options to $.jqplot.config. -* Fixed issue #318, highlighter & bar renderer incompatability. -* Improve highlighter tooltip positioning with negative bars. -* Fixed #305, mispelling of jqlotDragStart and jqlotDragStop. MUST NOW BIND - TO jqplotDragStart and jqplotDragStop. -* Fixed #290, some variables left in global scope. -* Fixed #289, OHLC line widths hard coded at 1.5. Now set by lineWidth option. -* Fixed #296 for determining databounds on log axes. -* Updated to jQuery 1.5.1 -* Fixed waterfall plot to ensure first and last bars always fill to zero. -* Added lineJoin and lineCap option to series lines. -* Bar widths now based on width of grid, not plot target for better scaling. -* Added looseZoom option to cursor so zooming can produce well rounded ticks. -* Added forceTickAt0 and forceTickAt100 options to ensure there will always - be a tick at 0 or 100 in the plot. -* Fixed bug where cursor legend didn't honor series showLabel option. - - -1.0.0a: - -* Series can now be moved forward or backward in stack to e.g. bring a line - forward when mousing over a point. -* Can now move outside of grid area while zooming. Can have zoom - constrained to grid area or allow zooming outside. -* Fixed issue #142 with tooltip drawn on top of event canvas, hiding - mouse events. -* Fixed #147 where pie slices with 0 value not rendering properly in IE. -* Fixed #130 where stack data not sorted properly. -* Fixed bug with null values not handled properly in category axes. -* Fixed #156 where pie charts not rendering on QTWebKit. -* Now using feature detection for canvas and canvas text capability - rather than browser version. -* Added enahncedLegendRenderer plugin to allow multi row/column legends - and clickable labels to show/hide series. -* Added fillToValue option to allow filled line plot to fill to an - arbitrary value. -* Added block plot plugin. -* Added funnel type charts. -* Added meter gauge type charts. -* Added plot theming support. -* $.jqplot.config.enablePlugins now false by default. -* Implemented highlighting on bar, pie, donut, funnel, etc. charts. -* Fix to pointlabels plugin to align labels properly on multi series plots. -* Added custom error handling to display error message in plot area. -* Fixed issue where would call to draw grid border of 0 width would - result in a default border being drawn. -* Added options to place legend outside of grid and shrink grid so everything - stays within plot div. -* Fixed bug in color generator so now calls to get() continually cycle - through colors just like next(). -* Added defaultAxisStart option. -* Added gradient fills to bubbles. -* Added bubble charts. -* Added showLabels option to bubble charts. -* Pass bubble radius to event callback in bubble charts. -* Fixed #207, typo in docs. -* Fixed #206 where "value" pie slice data labels were displaying wrong - value. -* Fixed #147 with 0 value slices in IE6. -* Fixed issue #241, disabled varyBarColor option in stacked charts. -* Added dataRenderer option to allow custom processors for JSON, AJAX - and anywhere else you might want to get data. -* Fixed null value handling so plot now properly skip or join over nulls. -* Fixed showTicks and showTickMarks option conflicts. -* Fixed issue #185 where pointLabels plugin incompatibility could crash - pie, donut and other plots. -* Fixed #23 and #143 to obey gridPadding option. -* Fixed #233 with highlighter tooltip separator. -* Fixed #224 where type checking failing on GWT. -* Fixed #272 with pie highlighting not working on replot. -* Memory performance improvements. -* Changes to build script so everything should build when pulled from repo. -* Fixed issue #275, IE 6/7 don't support array indexing of strings. -* Added event listener hooks for mouseUp, mouseDown, etc. to all line plots. -* Fixed bug with highlighter not working when null in data. -* Updated to jQuery 1.4.4 -* Fixed bug where donut plots showed value of radians of slice instead - of actual data. -* Reverted to excanvas r3 so IE8 no longer has to emulate IE7. -* Added tooltipContentEditor option to highlighter, allowing callback - to manipulate tooltip content at run time (thanks Tim Bunce!). -* Fixed bug where axes scale not resetting. -* Fixed bug with date axes where data bounds not properly set. -* Fixed issue where tick marks disappear if grid lines turned off. -* Updated replot method to allow passing in axes options for more control. -* Added experimental support for "broken" axes. -* Fixed bug with pies where pies with 0 valued slices did not draw correctly. -* Added canvasOverlay plugin to allow drawing of arbitrary shapes on a canvas - over the plot. -* Added option to display arbitrary text/html (message, animated gif, etc.) if - plot is constructed without data. Allow a "data loading" indicator to be shown. -* Added resetAxisValues method to manually update axis ticks without - redrawing the plot. -* Fix to labels on negative bars so label postiion of 'n' will be below a negative bar, - just as it is above a positive bar (thanks guigod!). -* Added thousands separator character (') to sprintf formatting (thanks yuichi1004!). -* Re-factored date parsing/formatting to use new jsDate module which does not - extend the Date prototype. - - -0.9.7: - -* Added Mekko chart plot type with enhanced legend and axes support. -* Implemented vertical waterfall charts. Can create waterfall plot as - option to bar chart. See examples folder of distribution. -* Enhanced plot labels for waterfall style. -* Enhanced bar plots so you can now color each bar of a series - independently with the "varyBarColor" option. -* Re-factored series drawing so that each series and series shadow drawn - on its own canvas. Allows series to be redrawn independently of each other. -* Added additional default series colors. -* Added useNegativeColors option to turn off negative color array and use - only seriesColors array to define all bar/filled line colors. -* Fix css for cursor legend. -* Modified shape renderer so rectangles can be stroked and filled. -* Re-factored date methods out of dateAxisRenderer so that date formatter - and methods can be accesses outside of dateAxisRenderer plugin. -* Fixed #132, now trigger series change event on plot target instead of drag canvas. -* Fixes issue #116 where some source files had mix of tabs and spaces - for indentation. Should have been all spaces. -* Fixed issue #126, some links broken in docs section of web site. -* Fixed issue #90, trendline plugin incompatibility with pie renderer. -* Updated samples in examples folder of distribution to include navigation - links if web server is set up to process .html files with php. - - -0.9.6: - -* New, easier to use, replot() method for placing plots in tabs, accordions, - resizable containers or for changing plot parameters programmatically. -* Updated legend renderer for pie charts to draw swatches which will - print correctly. -* Fixed issue #118 with patch from taum so autoscale option will - honor tickInterval and numberTicks options -* Fix to plot diameter calculation for initially hidden plots. -* Added examples for making plots in jQuery UI tabs and accordions. -* Fixed issue #120 where pie chart with single slice not displaying - correctly in IE and Chrome - - -0.9.5.2: - -* Fixed #102 where double clicking on plot that has zoom enabled, but - has not been zoomed resulted in error. -* Fixed bug where candlestick coloring options not working. -* Added option to turn individual series labels off in the legend. - - -0.9.5.1: - -* Fixed bug where tooltip not working with OHLC and candlestick charts. -* Added additional marker styles: plus, X and dash. - - -0.9.5: - -* Implemented "zoomProxy". zoomProxy allows zooming one plot from another - such as an overview plot. -* Zooming can now be constrained to just x or y axis. -* Enhanced cursor plugin with vertical "dataTracking" line. This is a line - at the cursor location with a readout of data points at the line location - which are displayed in the chart legend. -* Changed cursor tooltip format string. Now one format string is used for - entire tooltip. -* Added mechanisms to specify plot size when plot target is hidden or plot - height/width otherwise cannot be determined from markup. -* Added $.jqplot.config object to specify jqplot wide configuration options. - These include enablePlugins to globally set the default plugin state on/off - and defaultHeight/defaultWidth to specify default plot height/width. -* Added fillToZero option which forces filled charts to fill to zero as opposed - to axis minimum. Thus negative filled bar/line values will fill upwards to - zero axis value. -* Added option to disable stacking on individual lines. -* Changed targetId property of the plot object so it now includes a "#" before - the id string. -* Improved tick and body sizing of Open Hi Low Close and candlestick charts. -* Removed lots of web site related files from the repository. This means that, - if working from the sources, user's won't be able to build the jqplot web - site and the docs/tests that are hosted on that site. The minified and - compressed distribution packages will build fine. -* Lots of examples were added to a separate examples directory to better show - functionality of jqPlot for local testing with the distribution. -* Many various bug fixes and other minor enhancements. - - -0.9.4: - -* Implemented axis labels. Labels can be rendered in div tags or as canvas - elements supporting rotated text. -* Improved rotated axis label positioning so labels will start or end at a - tick position. -* Fixed bug where an empty data series would hang plot rendering. -* completed issue #66 for misc. improvements to documentation. -* Fixed issue #64 where the same ID's were assigned to cursor and highlighter - elements. -* Added option to legend to encode special HTML characters. -* Fixed undesirable behavior where point labels for points off the plot - were being rendered. -* Added edgeTolerance option to point label renderer to control rendering of - labels near plot edges. - - -0.9.3: - -* Preliminary support for axis labels. Currently rendered into DIV tags, - so no rotated label support. This feature is currently experimental. -* Fixed bug #52, needed space in tick div tag between style and class declarations - or plot failed in certain application doctypes. -* Fixed issue #54, miter style line join for chart lines causing spikes at steep - changes in slope. Changed miter style to round. -* Added examples for new autoscaling algorithm. -* Fixed bug #57, category axis labels disappear on redraw() -* Improved algorithm which controlled maximum number of labels that would display - on a category axis. -* Fixed bug #45 where null values causing errors in plotData and gridData. -* Fixed issue #60 where seriesColors option was not working. - - -0.9.2: - -* Fixed bug #45 where a plot could crash if series had different numbers of points. -* Fixed issue #50, added option to turn off sorting of series data. -* Fixed issue #31, implemented a better axis autoscaling algorithm and added an autoscale option. - -0.9.1: - -* Fixed bug #40, when axis pad, padMax, padMin set to 0, graph would fail to render. -* Fixed bug #41 where pie and bar charts not rendered correctly on redraw(). -* Fixed bug #11, filled stacked line plots not rendering correctly in IE. -* Fixed bug #42 where stacked charts not rendering with string date axis ticks. -* Fixed bug in redraw() method where axes ticks were not reset. -* Fixed "jqplotPreRedrawEvent" that should have been named "jqplotPostRedraw" event. - -0.9.0: - -* Added Open Hi Low Close charts, Candlestick charts and Hi Low Close charts. -* Added support for arbitrary labels on the data points. -* Enhanced highlighter plugin to allow custom formatting control of entire tooltip. -* Enhanced highlighter to support multiple y values in a data point. -* Fixed bug #38 where series with a single point with a negative value would fail. -* Improvements to examples to show what plugins to include. -* Expanded documentation for some of the plugins. - -0.8.5: - -* Added zooming ability with double click or single click options to reset zoom. -* Modified default tick spacing algorithm for date axes to give more space to ticks. -* Fixed bug #2 where tickInterval wasn't working properly. -* Added neighborThreshold option to control how close mouse must be to - point to trigger neighbor detection. -* Added double click event handler on plot. - -0.8.0: - -* Support for up to 9 y axes. -* Added option to control padding at max/min bounds of axes separately. -* Closed issue #21, added options to control grid line color and width. -* Closed issue #20, added options to filled line charts to stoke above - fill and customize fill color and transparency. -* Improved structure of on line documentation to make usage and options - docs default. -* Added much documentation on options and css styling. - -0.7.1: - -* Bug fix release -* Fixed bug #6, missing semi-colons messing up some javascript compressors. -* Fixed bug #13 where 2D ticks array of [values, labels] would fail to - renderer with DateAxisRenderer. -* Fixes bug #16 where pie renderer overwriting options for all plot types - and crashing non pie plots. -* Fixes bug #17 constrainTo dragable option mispelled as "contstrainTo". - Fixed dragable color issue when used with trend lines. - -0.7.0: - -* Pie chart support -* Enabled tooltipLocation option in highlighter. -* Highlighter Tooltip will account for mark size and highlight size when - positioning itself. -* Added ability to show just x, y or both axes in highlighter tooltip. -* Added customization of separator between axes values in highlighter tooltip. -* Modified how shadows are drawn for lines, bars and markers. Now drawn first, - so they are always behind the object. -* Adjustments to shadow parameters on lines to account for new shadow positioning. -* Added a ColorGenerator class to robustly return next available color - for a plot with wrap around to first color at end. -* Udates to docs about css file. -* Fixed bug with String x values in series and IE error on sorting (Category Axis). -* Added cursor changes in dragable plugin when cursor near dragable point. - -0.6.6b: - -* Added excanvas.js and excanvas.min.js to compressed distributions. -* Added example/test html pages I had locally into repository and to - compressed distributions. - -0.6.6a: - -* Removed absolute positioning from dom element and put back into css file. -* Duplicate of 0.6.6 with a suffix to unambiguously differentiate between - previously posted 0.6.6 release. - -0.6.6: - -* Fixed bug #5, trend line plugin failing when no trend line options specified. -* Added absolute position css spec to axis tick dom element. -* Enhancement to category axes, more intuitive handling of series with - missing data values. - -0.6.5: - -* Fixed bug #4, series of unequal data length not rendering correctly. - This is a bugfix release only. - -0.6.4: - -* Fixed bug (issue #1 in tracker) where flat line data series (all x and/or y - values are euqal) or single value data series would crash. - -0.6.3: - -* Support for stacked line (a.k.a. area) and stacked bar (horizontal and - vertical) charts. -* Refactored barRenderer to use default shape and shadow renderers. -* Added info (contacts & support information) page to web site. - -0.6.2: - -* This is a minor upgrade to docs and build only. No functionality has changed. -* Ant build script generates entire site, examples, tests and distribution. -* Improvements to documentation. - -0.6.1: - -* New sprintf implementation from Ash Searle that implements %g. -* Fix to sprintf e/f formats. -* Created new format specifier, %p and %P to preserve significance. -* Modified p/P format to better display larger numbers. -* Fixed and simplified significant digits calculation for sprintf. -* Added option to have cursor tooltip follow the mouse or not. -* Added options to change size of highlight. -* Updates to handle dates like '6-May-09'. -* Mods to improve look of web site. -* Updates to documentation. -* Added license and copyright statement to source files. - -0.6.0: - -* Added rotated text support. Uses native canvas text functionality in - browsers that support it or draws text on canvas with Hershey font -* metrics for non-supporting browsers. -* Removed lots of lint in js code. -* Moved tick css from js code into css file. -* Fix to tick positioning css. y axis ticks were positioned to wrong side of axis div. -* Re-factored axis tick renderer instantiation into the axes renderers themselves. - - -For changes prior to 0.6.0 release, please see change log at http://bitbucket.org/cleonello/jqplot/changesets/ diff --git a/wp-content/plugins/wp-piwik/js/jqplot/copyright.txt b/wp-content/plugins/wp-piwik/js/jqplot/copyright.txt deleted file mode 100644 index 86d4c40..0000000 --- a/wp-content/plugins/wp-piwik/js/jqplot/copyright.txt +++ /dev/null @@ -1,56 +0,0 @@ -/** - * jqPlot - * Pure JavaScript plotting plugin using jQuery - * - * Version: @VERSION - * - * Copyright (c) 2009-2013 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. - * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: - * chris at jqplot dot com or see http://www.jqplot.com/info.php . - * - * If you are feeling kind and generous, consider supporting the project by - * making a donation at: http://www.jqplot.com/donate.php . - * - * sprintf functions contained in jqplot.sprintf.js by Ash Searle: - * - * version 2007.04.27 - * author Ash Searle - * http://hexmen.com/blog/2007/03/printf-sprintf/ - * http://hexmen.com/js/sprintf.js - * The author (Ash Searle) has placed this code in the public domain: - * "This code is unrestricted: you are free to use it however you like." - * - * included jsDate library by Chris Leonello: - * - * Copyright (c) 2010-2013 Chris Leonello - * - * jsDate is currently available for use in all personal or commercial projects - * under both the MIT and GPL version 2.0 licenses. This means that you can - * choose the license that best suits your project and use it accordingly. - * - * jsDate borrows many concepts and ideas from the Date Instance - * Methods by Ken Snyder along with some parts of Ken's actual code. - * - * Ken's origianl Date Instance Methods and copyright notice: - * - * Ken Snyder (ken d snyder at gmail dot com) - * 2008-09-10 - * version 2.0.2 (http://kendsnyder.com/sandbox/date/) - * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/) - * - * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js. - * Larry has generously given permission to adapt his code for inclusion - * into jqPlot. - * - * Larry's original code can be found here: - * - * https://github.com/lsiden/export-jqplot-to-png - * - * - */ diff --git a/wp-content/plugins/wp-piwik/js/jqplot/excanvas.min.js b/wp-content/plugins/wp-piwik/js/jqplot/excanvas.min.js deleted file mode 100644 index e699a26..0000000 --- a/wp-content/plugins/wp-piwik/js/jqplot/excanvas.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* jqPlot @VERSION | (c) 2009-2013 Chris Leonello | jplot.com - jsDate | (c) 2010-2013 Chris Leonello - */if(!document.createElement("canvas").getContext){(function(){var ab=Math;var n=ab.round;var l=ab.sin;var A=ab.cos;var H=ab.abs;var N=ab.sqrt;var d=10;var f=d/2;var z=+navigator.userAgent.match(/MSIE ([\d.]+)?/)[1];function y(){return this.context_||(this.context_=new D(this))}var t=Array.prototype.slice;function g(j,m,p){var i=t.call(arguments,2);return function(){return j.apply(m,i.concat(t.call(arguments)))}}function af(i){return String(i).replace(/&/g,"&").replace(/"/g,""")}function Y(m,j,i){if(!m.namespaces[j]){m.namespaces.add(j,i,"#default#VML")}}function R(j){Y(j,"g_vml_","urn:schemas-microsoft-com:vml");Y(j,"g_o_","urn:schemas-microsoft-com:office:office");if(!j.styleSheets.ex_canvas_){var i=j.createStyleSheet();i.owningElement.id="ex_canvas_";i.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}"}}R(document);var e={init:function(i){var j=i||document;j.createElement("canvas");j.attachEvent("onreadystatechange",g(this.init_,this,j))},init_:function(p){var m=p.getElementsByTagName("canvas");for(var j=0;j1){m--}if(6*m<1){return j+(i-j)*6*m}else{if(2*m<1){return i}else{if(3*m<2){return j+(i-j)*(2/3-m)*6}else{return j}}}}var C={};function F(j){if(j in C){return C[j]}var ag,Z=1;j=String(j);if(j.charAt(0)=="#"){ag=j}else{if(/^rgb/.test(j)){var p=M(j);var ag="#",ah;for(var m=0;m<3;m++){if(p[m].indexOf("%")!=-1){ah=Math.floor(c(p[m])*255)}else{ah=+p[m]}ag+=k[r(ah,0,255)]}Z=+p[3]}else{if(/^hsl/.test(j)){var p=M(j);ag=I(p);Z=p[3]}else{ag=b[j]||j}}}return C[j]={color:ag,alpha:Z}}var o={style:"normal",variant:"normal",weight:"normal",size:10,family:"sans-serif"};var L={};function E(i){if(L[i]){return L[i]}var p=document.createElement("div");var m=p.style;try{m.font=i}catch(j){}return L[i]={style:m.fontStyle||o.style,variant:m.fontVariant||o.variant,weight:m.fontWeight||o.weight,size:m.fontSize||o.size,family:m.fontFamily||o.family}}function u(m,j){var i={};for(var ah in m){i[ah]=m[ah]}var ag=parseFloat(j.currentStyle.fontSize),Z=parseFloat(m.size);if(typeof m.size=="number"){i.size=m.size}else{if(m.size.indexOf("px")!=-1){i.size=Z}else{if(m.size.indexOf("em")!=-1){i.size=ag*Z}else{if(m.size.indexOf("%")!=-1){i.size=(ag/100)*Z}else{if(m.size.indexOf("pt")!=-1){i.size=Z/0.75}else{i.size=ag}}}}}i.size*=0.981;i.family="'"+i.family.replace(/(\'|\")/g,"").replace(/\s*,\s*/g,"', '")+"'";return i}function ac(i){return i.style+" "+i.variant+" "+i.weight+" "+i.size+"px "+i.family}var s={butt:"flat",round:"round"};function S(i){return s[i]||"square"}function D(i){this.m_=B();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=d*1;this.globalAlpha=1;this.font="10px sans-serif";this.textAlign="left";this.textBaseline="alphabetic";this.canvas=i;var m="width:"+i.clientWidth+"px;height:"+i.clientHeight+"px;overflow:hidden;position:absolute";var j=i.ownerDocument.createElement("div");j.style.cssText=m;i.appendChild(j);var p=j.cloneNode(false);p.style.backgroundColor="red";p.style.filter="alpha(opacity=0)";i.appendChild(p);this.element_=j;this.arcScaleX_=1;this.arcScaleY_=1;this.lineScale_=1}var q=D.prototype;q.clearRect=function(){if(this.textMeasureEl_){this.textMeasureEl_.removeNode(true);this.textMeasureEl_=null}this.element_.innerHTML=""};q.beginPath=function(){this.currentPath_=[]};q.moveTo=function(j,i){var m=V(this,j,i);this.currentPath_.push({type:"moveTo",x:m.x,y:m.y});this.currentX_=m.x;this.currentY_=m.y};q.lineTo=function(j,i){var m=V(this,j,i);this.currentPath_.push({type:"lineTo",x:m.x,y:m.y});this.currentX_=m.x;this.currentY_=m.y};q.bezierCurveTo=function(m,j,ak,aj,ai,ag){var i=V(this,ai,ag);var ah=V(this,m,j);var Z=V(this,ak,aj);K(this,ah,Z,i)};function K(i,Z,m,j){i.currentPath_.push({type:"bezierCurveTo",cp1x:Z.x,cp1y:Z.y,cp2x:m.x,cp2y:m.y,x:j.x,y:j.y});i.currentX_=j.x;i.currentY_=j.y}q.quadraticCurveTo=function(ai,m,j,i){var ah=V(this,ai,m);var ag=V(this,j,i);var aj={x:this.currentX_+2/3*(ah.x-this.currentX_),y:this.currentY_+2/3*(ah.y-this.currentY_)};var Z={x:aj.x+(ag.x-this.currentX_)/3,y:aj.y+(ag.y-this.currentY_)/3};K(this,aj,Z,ag)};q.arc=function(al,aj,ak,ag,j,m){ak*=d;var ap=m?"at":"wa";var am=al+A(ag)*ak-f;var ao=aj+l(ag)*ak-f;var i=al+A(j)*ak-f;var an=aj+l(j)*ak-f;if(am==i&&!m){am+=0.125}var Z=V(this,al,aj);var ai=V(this,am,ao);var ah=V(this,i,an);this.currentPath_.push({type:ap,x:Z.x,y:Z.y,radius:ak,xStart:ai.x,yStart:ai.y,xEnd:ah.x,yEnd:ah.y})};q.rect=function(m,j,i,p){this.moveTo(m,j);this.lineTo(m+i,j);this.lineTo(m+i,j+p);this.lineTo(m,j+p);this.closePath()};q.strokeRect=function(m,j,i,p){var Z=this.currentPath_;this.beginPath();this.moveTo(m,j);this.lineTo(m+i,j);this.lineTo(m+i,j+p);this.lineTo(m,j+p);this.closePath();this.stroke();this.currentPath_=Z};q.fillRect=function(m,j,i,p){var Z=this.currentPath_;this.beginPath();this.moveTo(m,j);this.lineTo(m+i,j);this.lineTo(m+i,j+p);this.lineTo(m,j+p);this.closePath();this.fill();this.currentPath_=Z};q.createLinearGradient=function(j,p,i,m){var Z=new U("gradient");Z.x0_=j;Z.y0_=p;Z.x1_=i;Z.y1_=m;return Z};q.createRadialGradient=function(p,ag,m,j,Z,i){var ah=new U("gradientradial");ah.x0_=p;ah.y0_=ag;ah.r0_=m;ah.x1_=j;ah.y1_=Z;ah.r1_=i;return ah};q.drawImage=function(aq,m){var aj,ah,al,ay,ao,am,at,aA;var ak=aq.runtimeStyle.width;var ap=aq.runtimeStyle.height;aq.runtimeStyle.width="auto";aq.runtimeStyle.height="auto";var ai=aq.width;var aw=aq.height;aq.runtimeStyle.width=ak;aq.runtimeStyle.height=ap;if(arguments.length==3){aj=arguments[1];ah=arguments[2];ao=am=0;at=al=ai;aA=ay=aw}else{if(arguments.length==5){aj=arguments[1];ah=arguments[2];al=arguments[3];ay=arguments[4];ao=am=0;at=ai;aA=aw}else{if(arguments.length==9){ao=arguments[1];am=arguments[2];at=arguments[3];aA=arguments[4];aj=arguments[5];ah=arguments[6];al=arguments[7];ay=arguments[8]}else{throw Error("Invalid number of arguments")}}}var az=V(this,aj,ah);var p=at/2;var j=aA/2;var ax=[];var i=10;var ag=10;ax.push(" ','","");this.element_.insertAdjacentHTML("BeforeEnd",ax.join(""))};q.stroke=function(al){var aj=[];var Z=false;var m=10;var am=10;aj.push("ak.x){ak.x=j.x}if(ag.y==null||j.yak.y){ak.y=j.y}}}aj.push(' ">');if(!al){w(this,aj)}else{G(this,aj,ag,ak)}aj.push("");this.element_.insertAdjacentHTML("beforeEnd",aj.join(""))};function w(m,ag){var j=F(m.strokeStyle);var p=j.color;var Z=j.alpha*m.globalAlpha;var i=m.lineScale_*m.lineWidth;if(i<1){Z*=i}ag.push("')}function G(aq,ai,aK,ar){var aj=aq.fillStyle;var aB=aq.arcScaleX_;var aA=aq.arcScaleY_;var j=ar.x-aK.x;var p=ar.y-aK.y;if(aj instanceof U){var an=0;var aF={x:0,y:0};var ax=0;var am=1;if(aj.type_=="gradient"){var al=aj.x0_/aB;var m=aj.y0_/aA;var ak=aj.x1_/aB;var aM=aj.y1_/aA;var aJ=V(aq,al,m);var aI=V(aq,ak,aM);var ag=aI.x-aJ.x;var Z=aI.y-aJ.y;an=Math.atan2(ag,Z)*180/Math.PI;if(an<0){an+=360}if(an<0.000001){an=0}}else{var aJ=V(aq,aj.x0_,aj.y0_);aF={x:(aJ.x-aK.x)/j,y:(aJ.y-aK.y)/p};j/=aB*d;p/=aA*d;var aD=ab.max(j,p);ax=2*aj.r0_/aD;am=2*aj.r1_/aD-ax}var av=aj.colors_;av.sort(function(aN,i){return aN.offset-i.offset});var ap=av.length;var au=av[0].color;var at=av[ap-1].color;var az=av[0].alpha*aq.globalAlpha;var ay=av[ap-1].alpha*aq.globalAlpha;var aE=[];for(var aH=0;aH')}else{if(aj instanceof T){if(j&&p){var ah=-aK.x;var aC=-aK.y;ai.push("')}}else{var aL=F(aq.fillStyle);var aw=aL.color;var aG=aL.alpha*aq.globalAlpha;ai.push('')}}}q.fill=function(){this.stroke(true)};q.closePath=function(){this.currentPath_.push({type:"close"})};function V(j,Z,p){var i=j.m_;return{x:d*(Z*i[0][0]+p*i[1][0]+i[2][0])-f,y:d*(Z*i[0][1]+p*i[1][1]+i[2][1])-f}}q.save=function(){var i={};v(this,i);this.aStack_.push(i);this.mStack_.push(this.m_);this.m_=J(B(),this.m_)};q.restore=function(){if(this.aStack_.length){v(this.aStack_.pop(),this);this.m_=this.mStack_.pop()}};function h(i){return isFinite(i[0][0])&&isFinite(i[0][1])&&isFinite(i[1][0])&&isFinite(i[1][1])&&isFinite(i[2][0])&&isFinite(i[2][1])}function aa(j,i,p){if(!h(i)){return}j.m_=i;if(p){var Z=i[0][0]*i[1][1]-i[0][1]*i[1][0];j.lineScale_=N(H(Z))}}q.translate=function(m,j){var i=[[1,0,0],[0,1,0],[m,j,1]];aa(this,J(i,this.m_),false)};q.rotate=function(j){var p=A(j);var m=l(j);var i=[[p,m,0],[-m,p,0],[0,0,1]];aa(this,J(i,this.m_),false)};q.scale=function(m,j){this.arcScaleX_*=m;this.arcScaleY_*=j;var i=[[m,0,0],[0,j,0],[0,0,1]];aa(this,J(i,this.m_),true)};q.transform=function(Z,p,ah,ag,j,i){var m=[[Z,p,0],[ah,ag,0],[j,i,1]];aa(this,J(m,this.m_),true)};q.setTransform=function(ag,Z,ai,ah,p,j){var i=[[ag,Z,0],[ai,ah,0],[p,j,1]];aa(this,i,true)};q.drawText_=function(am,ak,aj,ap,ai){var ao=this.m_,at=1000,j=0,ar=at,ah={x:0,y:0},ag=[];var i=u(E(this.font),this.element_);var p=ac(i);var au=this.element_.currentStyle;var Z=this.textAlign.toLowerCase();switch(Z){case"left":case"center":case"right":break;case"end":Z=au.direction=="ltr"?"right":"left";break;case"start":Z=au.direction=="rtl"?"right":"left";break;default:Z="left"}switch(this.textBaseline){case"hanging":case"top":ah.y=i.size/1.75;break;case"middle":break;default:case null:case"alphabetic":case"ideographic":case"bottom":ah.y=-i.size/2.25;break}switch(Z){case"right":j=at;ar=0.05;break;case"center":j=ar=at/2;break}var aq=V(this,ak+ah.x,aj+ah.y);ag.push('');if(ai){w(this,ag)}else{G(this,ag,{x:-j,y:0},{x:ar,y:i.size})}var an=ao[0][0].toFixed(3)+","+ao[1][0].toFixed(3)+","+ao[0][1].toFixed(3)+","+ao[1][1].toFixed(3)+",0,0";var al=n(aq.x/d+1-ao[0][0])+","+n(aq.y/d-2*ao[1][0]);ag.push('','','');this.element_.insertAdjacentHTML("beforeEnd",ag.join(""))};q.fillText=function(m,i,p,j){this.drawText_(m,i,p,j,false)};q.strokeText=function(m,i,p,j){this.drawText_(m,i,p,j,true)};q.measureText=function(m){if(!this.textMeasureEl_){var i='';this.element_.insertAdjacentHTML("beforeEnd",i);this.textMeasureEl_=this.element_.lastChild}var j=this.element_.ownerDocument;this.textMeasureEl_.innerHTML="";this.textMeasureEl_.style.font=this.font;this.textMeasureEl_.appendChild(j.createTextNode(m));return{width:this.textMeasureEl_.offsetWidth}};q.clip=function(){};q.arcTo=function(){};q.createPattern=function(j,i){return new T(j,i)};function U(i){this.type_=i;this.x0_=0;this.y0_=0;this.r0_=0;this.x1_=0;this.y1_=0;this.r1_=0;this.colors_=[]}U.prototype.addColorStop=function(j,i){i=F(i);this.colors_.push({offset:j,color:i.color,alpha:i.alpha})};function T(j,i){Q(j);switch(i){case"repeat":case null:case"":this.repetition_="repeat";break;case"repeat-x":case"repeat-y":case"no-repeat":this.repetition_=i;break;default:O("SYNTAX_ERR")}this.src_=j.src;this.width_=j.width;this.height_=j.height}function O(i){throw new P(i)}function Q(i){if(!i||i.nodeType!=1||i.tagName!="IMG"){O("TYPE_MISMATCH_ERR")}if(i.readyState!="complete"){O("INVALID_STATE_ERR")}}function P(i){this.code=this[i];this.message=i+": DOM Exception "+this.code}var X=P.prototype=new Error;X.INDEX_SIZE_ERR=1;X.DOMSTRING_SIZE_ERR=2;X.HIERARCHY_REQUEST_ERR=3;X.WRONG_DOCUMENT_ERR=4;X.INVALID_CHARACTER_ERR=5;X.NO_DATA_ALLOWED_ERR=6;X.NO_MODIFICATION_ALLOWED_ERR=7;X.NOT_FOUND_ERR=8;X.NOT_SUPPORTED_ERR=9;X.INUSE_ATTRIBUTE_ERR=10;X.INVALID_STATE_ERR=11;X.SYNTAX_ERR=12;X.INVALID_MODIFICATION_ERR=13;X.NAMESPACE_ERR=14;X.INVALID_ACCESS_ERR=15;X.VALIDATION_ERR=16;X.TYPE_MISMATCH_ERR=17;G_vmlCanvasManager=e;CanvasRenderingContext2D=D;CanvasGradient=U;CanvasPattern=T;DOMException=P;G_vmlCanvasManager._version=888})()}; \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/js/jqplot/gpl-2.0.txt b/wp-content/plugins/wp-piwik/js/jqplot/gpl-2.0.txt deleted file mode 100644 index 864c6b8..0000000 --- a/wp-content/plugins/wp-piwik/js/jqplot/gpl-2.0.txt +++ /dev/null @@ -1,280 +0,0 @@ -Title: GPL Version 2 - - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) 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 -this service 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 make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. 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. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -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 -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the 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 a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE 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. \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/js/jqplot/index.php b/wp-content/plugins/wp-piwik/js/jqplot/index.php deleted file mode 100644 index 1f95b2e..0000000 --- a/wp-content/plugins/wp-piwik/js/jqplot/index.php +++ /dev/null @@ -1,2 +0,0 @@ -'+ao+"");L("#"+an).addClass("jqplot-error");document.getElementById(an).style.background=L.jqplot.config.errorBackground;document.getElementById(an).style.border=L.jqplot.config.errorBorder;document.getElementById(an).style.fontFamily=L.jqplot.config.errorFontFamily;document.getElementById(an).style.fontSize=L.jqplot.config.errorFontSize;document.getElementById(an).style.fontStyle=L.jqplot.config.errorFontStyle;document.getElementById(an).style.fontWeight=L.jqplot.config.errorFontWeight}}else{am.init(an,aj,ah);am.draw();am.themeEngine.init.call(am);return am}};L.jqplot.version="1.0.8";L.jqplot.revision="1250";L.jqplot.targetCounter=1;L.jqplot.CanvasManager=function(){if(typeof L.jqplot.CanvasManager.canvases=="undefined"){L.jqplot.CanvasManager.canvases=[];L.jqplot.CanvasManager.free=[]}var ah=[];this.getCanvas=function(){var ak;var aj=true;if(!L.jqplot.use_excanvas){for(var al=0,ai=L.jqplot.CanvasManager.canvases.length;al887){L.jqplot.support_canvas_text.result=true}else{L.jqplot.support_canvas_text.result=!!(document.createElement("canvas").getContext&&typeof document.createElement("canvas").getContext("2d").fillText=="function")}}return L.jqplot.support_canvas_text.result};L.jqplot.use_excanvas=((!L.support.boxModel||!L.support.objectAll||!$support.leadingWhitespace)&&!L.jqplot.support_canvas())?true:false;L.jqplot.preInitHooks=[];L.jqplot.postInitHooks=[];L.jqplot.preParseOptionsHooks=[];L.jqplot.postParseOptionsHooks=[];L.jqplot.preDrawHooks=[];L.jqplot.postDrawHooks=[];L.jqplot.preDrawSeriesHooks=[];L.jqplot.postDrawSeriesHooks=[];L.jqplot.preDrawLegendHooks=[];L.jqplot.addLegendRowHooks=[];L.jqplot.preSeriesInitHooks=[];L.jqplot.postSeriesInitHooks=[];L.jqplot.preParseSeriesOptionsHooks=[];L.jqplot.postParseSeriesOptionsHooks=[];L.jqplot.eventListenerHooks=[];L.jqplot.preDrawSeriesShadowHooks=[];L.jqplot.postDrawSeriesShadowHooks=[];L.jqplot.ElemContainer=function(){this._elem;this._plotWidth;this._plotHeight;this._plotDimensions={height:null,width:null}};L.jqplot.ElemContainer.prototype.createElement=function(ak,am,ai,aj,an){this._offsets=am;var ah=ai||"jqplot";var al=document.createElement(ak);this._elem=L(al);this._elem.addClass(ah);this._elem.css(aj);this._elem.attr(an);al=null;return this._elem};L.jqplot.ElemContainer.prototype.getWidth=function(){if(this._elem){return this._elem.outerWidth(true)}else{return null}};L.jqplot.ElemContainer.prototype.getHeight=function(){if(this._elem){return this._elem.outerHeight(true)}else{return null}};L.jqplot.ElemContainer.prototype.getPosition=function(){if(this._elem){return this._elem.position()}else{return{top:null,left:null,bottom:null,right:null}}};L.jqplot.ElemContainer.prototype.getTop=function(){return this.getPosition().top};L.jqplot.ElemContainer.prototype.getLeft=function(){return this.getPosition().left};L.jqplot.ElemContainer.prototype.getBottom=function(){return this._elem.css("bottom")};L.jqplot.ElemContainer.prototype.getRight=function(){return this._elem.css("right")};function w(ah){L.jqplot.ElemContainer.call(this);this.name=ah;this._series=[];this.show=false;this.tickRenderer=L.jqplot.AxisTickRenderer;this.tickOptions={};this.labelRenderer=L.jqplot.AxisLabelRenderer;this.labelOptions={};this.label=null;this.showLabel=true;this.min=null;this.max=null;this.autoscale=false;this.pad=1.2;this.padMax=null;this.padMin=null;this.ticks=[];this.numberTicks;this.tickInterval;this.renderer=L.jqplot.LinearAxisRenderer;this.rendererOptions={};this.showTicks=true;this.showTickMarks=true;this.showMinorTicks=true;this.drawMajorGridlines=true;this.drawMinorGridlines=false;this.drawMajorTickMarks=true;this.drawMinorTickMarks=true;this.useSeriesColor=false;this.borderWidth=null;this.borderColor=null;this.scaleToHiddenSeries=false;this._dataBounds={min:null,max:null};this._intervalStats=[];this._offsets={min:null,max:null};this._ticks=[];this._label=null;this.syncTicks=null;this.tickSpacing=75;this._min=null;this._max=null;this._tickInterval=null;this._numberTicks=null;this.__ticks=null;this._options={}}w.prototype=new L.jqplot.ElemContainer();w.prototype.constructor=w;w.prototype.init=function(){if(L.isFunction(this.renderer)){this.renderer=new this.renderer()}this.tickOptions.axis=this.name;if(this.tickOptions.showMark==null){this.tickOptions.showMark=this.showTicks}if(this.tickOptions.showMark==null){this.tickOptions.showMark=this.showTickMarks}if(this.tickOptions.showLabel==null){this.tickOptions.showLabel=this.showTicks}if(this.label==null||this.label==""){this.showLabel=false}else{this.labelOptions.label=this.label}if(this.showLabel==false){this.labelOptions.show=false}if(this.pad==0){this.pad=1}if(this.padMax==0){this.padMax=1}if(this.padMin==0){this.padMin=1}if(this.padMax==null){this.padMax=(this.pad-1)/2+1}if(this.padMin==null){this.padMin=(this.pad-1)/2+1}this.pad=this.padMax+this.padMin-1;if(this.min!=null||this.max!=null){this.autoscale=false}if(this.syncTicks==null&&this.name.indexOf("y")>-1){this.syncTicks=true}else{if(this.syncTicks==null){this.syncTicks=false}}this.renderer.init.call(this,this.rendererOptions)};w.prototype.draw=function(ah,ai){if(this.__ticks){this.__ticks=null}return this.renderer.draw.call(this,ah,ai)};w.prototype.set=function(){this.renderer.set.call(this)};w.prototype.pack=function(ai,ah){if(this.show){this.renderer.pack.call(this,ai,ah)}if(this._min==null){this._min=this.min;this._max=this.max;this._tickInterval=this.tickInterval;this._numberTicks=this.numberTicks;this.__ticks=this._ticks}};w.prototype.reset=function(){this.renderer.reset.call(this)};w.prototype.resetScale=function(ah){L.extend(true,this,{min:null,max:null,numberTicks:null,tickInterval:null,_ticks:[],ticks:[]},ah);this.resetDataBounds()};w.prototype.resetDataBounds=function(){var ao=this._dataBounds;ao.min=null;ao.max=null;var ai,ap,am;var aj=(this.show)?true:false;for(var al=0;alao.max)||ao.max==null){ao.max=am[ak][0]}}else{if((am[ak][ah]!=null&&am[ak][ah]ao.max)||ao.max==null){ao.max=am[ak][an]}}}if(aj&&ap.renderer.constructor!==L.jqplot.BarRenderer){aj=false}else{if(aj&&this._options.hasOwnProperty("forceTickAt0")&&this._options.forceTickAt0==false){aj=false}else{if(aj&&ap.renderer.constructor===L.jqplot.BarRenderer){if(ap.barDirection=="vertical"&&this.name!="xaxis"&&this.name!="x2axis"){if(this._options.pad!=null||this._options.padMin!=null){aj=false}}else{if(ap.barDirection=="horizontal"&&(this.name=="xaxis"||this.name=="x2axis")){if(this._options.pad!=null||this._options.padMin!=null){aj=false}}}}}}}}if(aj&&this.renderer.constructor===L.jqplot.LinearAxisRenderer&&ao.min>=0){this.padMin=1;this.forceTickAt0=true}};function q(ah){L.jqplot.ElemContainer.call(this);this.show=false;this.location="ne";this.labels=[];this.showLabels=true;this.showSwatches=true;this.placement="insideGrid";this.xoffset=0;this.yoffset=0;this.border;this.background;this.textColor;this.fontFamily;this.fontSize;this.rowSpacing="0.5em";this.renderer=L.jqplot.TableLegendRenderer;this.rendererOptions={};this.preDraw=false;this.marginTop=null;this.marginRight=null;this.marginBottom=null;this.marginLeft=null;this.escapeHtml=false;this._series=[];L.extend(true,this,ah)}q.prototype=new L.jqplot.ElemContainer();q.prototype.constructor=q;q.prototype.setOptions=function(ah){L.extend(true,this,ah);if(this.placement=="inside"){this.placement="insideGrid"}if(this.xoffset>0){if(this.placement=="insideGrid"){switch(this.location){case"nw":case"w":case"sw":if(this.marginLeft==null){this.marginLeft=this.xoffset+"px"}this.marginRight="0px";break;case"ne":case"e":case"se":default:if(this.marginRight==null){this.marginRight=this.xoffset+"px"}this.marginLeft="0px";break}}else{if(this.placement=="outside"){switch(this.location){case"nw":case"w":case"sw":if(this.marginRight==null){this.marginRight=this.xoffset+"px"}this.marginLeft="0px";break;case"ne":case"e":case"se":default:if(this.marginLeft==null){this.marginLeft=this.xoffset+"px"}this.marginRight="0px";break}}}this.xoffset=0}if(this.yoffset>0){if(this.placement=="outside"){switch(this.location){case"sw":case"s":case"se":if(this.marginTop==null){this.marginTop=this.yoffset+"px"}this.marginBottom="0px";break;case"ne":case"n":case"nw":default:if(this.marginBottom==null){this.marginBottom=this.yoffset+"px"}this.marginTop="0px";break}}else{if(this.placement=="insideGrid"){switch(this.location){case"sw":case"s":case"se":if(this.marginBottom==null){this.marginBottom=this.yoffset+"px"}this.marginTop="0px";break;case"ne":case"n":case"nw":default:if(this.marginTop==null){this.marginTop=this.yoffset+"px"}this.marginBottom="0px";break}}}this.yoffset=0}};q.prototype.init=function(){if(L.isFunction(this.renderer)){this.renderer=new this.renderer()}this.renderer.init.call(this,this.rendererOptions)};q.prototype.draw=function(ai,aj){for(var ah=0;ah');this.target.append(az);az.height(aD);az.width(aA);az.css("top",this.eventCanvas._offsets.top);az.css("left",this.eventCanvas._offsets.left);var aC=L('
');az.append(aC);aC.html(this.noDataIndicator.indicator);var aB=aC.height();var ax=aC.width();aC.height(aB);aC.width(ax);aC.css("top",(aD-aB)/2+"px")})}}this.data=L.extend(true,[],ar);this.parseOptions(ay);if(this.textColor){this.target.css("color",this.textColor)}if(this.fontFamily){this.target.css("font-family",this.fontFamily)}if(this.fontSize){this.target.css("font-size",this.fontSize)}this.title.init();this.legend.init();this._sumy=0;this._sumx=0;this.computePlotData();for(var at=0;at0){for(var aq=au;aq--;){var an=this._plotData[aq][ap][av];if(aw*an>=0){this._plotData[au][ap][av]+=an;this._stackData[au][ap][av]+=an;break}}}}}else{for(var ar=0;ar0){at._prevPlotData=this.series[au-1]._plotData}at._sumy=0;at._sumx=0;for(ar=at.data.length-1;ar>-1;ar--){at._sumy+=at.data[ar][1];at._sumx+=at.data[ar][0]}}};this.populatePlotData=function(au,av){this._plotData=[];this._stackData=[];au._stackData=[];au._plotData=[];var ay={x:[],y:[]};if(this.stackSeries&&!au.disableStack){au._stack=true;var ax=(au._stackAxis==="x")?0:1;var az=L.extend(true,[],au.data);var aA=L.extend(true,[],au.data);var an,am,ao,aw,al;for(var ar=0;ar=0){aA[aq][ax]+=aw}}}for(var at=0;at0){au._prevPlotData=this.series[av-1]._plotData}au._sumy=0;au._sumx=0;for(at=au.data.length-1;at>-1;at--){au._sumy+=au.data[at][1];au._sumx+=au.data[at][0]}};this.getNextSeriesColor=(function(am){var al=0;var an=am.seriesColors;return function(){if(al=0&&an>=0){al.top+=aK;al.bottom+=aK;al.left+=an;al.right+=an}}var am=["top","bottom","left","right"];for(var aB in am){if(this._gridPadding[am[aB]]==null&&al[am[aB]]>0){this._gridPadding[am[aB]]=al[am[aB]]}else{if(this._gridPadding[am[aB]]==null){this._gridPadding[am[aB]]=this._defaultGridPadding[am[aB]]}}}var aA=this._gridPadding;if(this.legend.placement==="outsideGrid"){aA={top:this.title.getHeight(),left:0,right:0,bottom:0};if(this.legend.location==="s"){aA.left=this._gridPadding.left;aA.right=this._gridPadding.right}}ar.xaxis.pack({position:"absolute",bottom:this._gridPadding.bottom-ar.xaxis.getHeight(),left:0,width:this._width},{min:this._gridPadding.left,max:this._width-this._gridPadding.right});ar.yaxis.pack({position:"absolute",top:0,left:this._gridPadding.left-ar.yaxis.getWidth(),height:this._height},{min:this._height-this._gridPadding.bottom,max:this._gridPadding.top});ar.x2axis.pack({position:"absolute",top:this._gridPadding.top-ar.x2axis.getHeight(),left:0,width:this._width},{min:this._gridPadding.left,max:this._width-this._gridPadding.right});for(aH=8;aH>0;aH--){ar[aG[aH-1]].pack({position:"absolute",top:0,right:this._gridPadding.right-az[aH-1]},{min:this._height-this._gridPadding.bottom,max:this._gridPadding.top})}var au=(this._width-this._gridPadding.left-this._gridPadding.right)/2+this._gridPadding.left-ar.yMidAxis.getWidth()/2;ar.yMidAxis.pack({position:"absolute",top:0,left:au,zIndex:9,textAlign:"center"},{min:this._height-this._gridPadding.bottom,max:this._gridPadding.top});this.target.append(this.grid.createElement(this._gridPadding,this));this.grid.draw();var aq=this.series;var aJ=aq.length;for(aH=0,aE=aJ;aHax)?av:ax;var ar=this.series[aw];var aq=this.series[au];if(aq.renderer.smooth){var ap=aq.renderer._smoothedData.slice(0).reverse()}else{var ap=aq.gridData.slice(0).reverse()}if(ar.renderer.smooth){var at=ar.renderer._smoothedData.concat(ap)}else{var at=ar.gridData.concat(ap)}var ao=(an.color!==null)?an.color:this.series[ax].fillColor;var ay=(an.baseSeries!==null)?an.baseSeries:aw;var am=this.series[ay].renderer.shapeRenderer;var al={fillStyle:ao,fill:true,closePath:true};am.draw(ar.shadowCanvas._ctx,at,al)};this.bindCustomEvents=function(){this.eventCanvas._elem.bind("click",{plot:this},this.onClick);this.eventCanvas._elem.bind("dblclick",{plot:this},this.onDblClick);this.eventCanvas._elem.bind("mousedown",{plot:this},this.onMouseDown);this.eventCanvas._elem.bind("mousemove",{plot:this},this.onMouseMove);this.eventCanvas._elem.bind("mouseenter",{plot:this},this.onMouseEnter);this.eventCanvas._elem.bind("mouseleave",{plot:this},this.onMouseLeave);if(this.captureRightClick){this.eventCanvas._elem.bind("mouseup",{plot:this},this.onRightClick);this.eventCanvas._elem.get(0).oncontextmenu=function(){return false}}else{this.eventCanvas._elem.bind("mouseup",{plot:this},this.onMouseUp)}};function ai(av){var au=av.data.plot;var ap=au.eventCanvas._elem.offset();var at={x:av.pageX-ap.left,y:av.pageY-ap.top};var aq={xaxis:null,yaxis:null,x2axis:null,y2axis:null,y3axis:null,y4axis:null,y5axis:null,y6axis:null,y7axis:null,y8axis:null,y9axis:null,yMidAxis:null};var ar=["xaxis","yaxis","x2axis","y2axis","y3axis","y4axis","y5axis","y6axis","y7axis","y8axis","y9axis","yMidAxis"];var al=au.axes;var am,ao;for(am=11;am>0;am--){ao=ar[am-1];if(al[ao].show){aq[ao]=al[ao].series_p2u(at[ao.charAt(0)])}}return{offsets:ap,gridPos:at,dataPos:aq}}function ak(al,am){var aq=am.series;var aW,aU,aT,aO,aP,aJ,aI,aw,au,az,aA,aK;var aS,aX,aQ,ar,aH,aM,aV;var an,aN;for(aT=am.seriesStack.length-1;aT>=0;aT--){aW=am.seriesStack[aT];aO=aq[aW];aV=aO._highlightThreshold;switch(aO.renderer.constructor){case L.jqplot.BarRenderer:aJ=al.x;aI=al.y;for(aU=0;aUaH[0][0]&&aJaH[2][1]&&aIaH[0][0]+aV[0][0]&&aJaH[2][1]&&aI0&&-aI>=0){aw=2*Math.PI-Math.atan(-aI/aJ)}else{if(aJ>0&&-aI<0){aw=-Math.atan(-aI/aJ)}else{if(aJ<0){aw=Math.PI-Math.atan(-aI/aJ)}else{if(aJ==0&&-aI>0){aw=3*Math.PI/2}else{if(aJ==0&&-aI<0){aw=Math.PI/2}else{if(aJ==0&&aI==0){aw=0}}}}}}if(az){aw-=az;if(aw<0){aw+=2*Math.PI}else{if(aw>2*Math.PI){aw-=2*Math.PI}}}au=aO.sliceMargin/180*Math.PI;if(aPaO._innerRadius){for(aU=0;aU0)?aO.gridData[aU-1][1]+au:au;aK=aO.gridData[aU][1];if(aw>aA&&aw0&&-aI>=0){aw=2*Math.PI-Math.atan(-aI/aJ)}else{if(aJ>0&&-aI<0){aw=-Math.atan(-aI/aJ)}else{if(aJ<0){aw=Math.PI-Math.atan(-aI/aJ)}else{if(aJ==0&&-aI>0){aw=3*Math.PI/2}else{if(aJ==0&&-aI<0){aw=Math.PI/2}else{if(aJ==0&&aI==0){aw=0}}}}}}if(az){aw-=az;if(aw<0){aw+=2*Math.PI}else{if(aw>2*Math.PI){aw-=2*Math.PI}}}au=aO.sliceMargin/180*Math.PI;if(aP0)?aO.gridData[aU-1][1]+au:au;aK=aO.gridData[aU][1];if(aw>aA&&aw=ay[0][1]&&aI<=ay[3][1]&&aJ>=at[0]&&aJ<=aE[0]){return{seriesIndex:aO.index,pointIndex:aU,gridData:null,data:aO.data[aU]}}}break;case L.jqplot.LineRenderer:aJ=al.x;aI=al.y;aP=aO.renderer;if(aO.show){if((aO.fill||(aO.renderer.bands.show&&aO.renderer.bands.fill))&&(!am.plugins.highlighter||!am.plugins.highlighter.show)){var ax=false;if(aJ>aO._boundingBox[0][0]&&aJaO._boundingBox[1][1]&&aI=aI||aB[1]=aI){if(aC[0]+(aI-aC[1])/(aB[1]-aC[1])*(aB[0]-aC[0])0)?aN:0;for(var aU=0;aU=aQ[0]-aP._bodyWidth/2&&aJ<=aQ[0]+aP._bodyWidth/2&&aI>=av(aO.data[aU][2])&&aI<=av(aO.data[aU][3])){return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}else{if(!aP.hlc){var av=aO._yaxis.series_u2p;if(aJ>=aQ[0]-aP._tickLength&&aJ<=aQ[0]+aP._tickLength&&aI>=av(aO.data[aU][2])&&aI<=av(aO.data[aU][3])){return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}else{var av=aO._yaxis.series_u2p;if(aJ>=aQ[0]-aP._tickLength&&aJ<=aQ[0]+aP._tickLength&&aI>=av(aO.data[aU][1])&&aI<=av(aO.data[aU][2])){return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}}}else{if(aQ[0]!=null&&aQ[1]!=null){aX=Math.sqrt((aJ-aQ[0])*(aJ-aQ[0])+(aI-aQ[1])*(aI-aQ[1]));if(aX<=an&&(aX<=aS||aS==null)){aS=aX;return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}}}}}break;default:aJ=al.x;aI=al.y;aP=aO.renderer;if(aO.show){aN=aO.markerRenderer.size/2+aO.neighborThreshold;an=(aN>0)?aN:0;for(var aU=0;aU=aQ[0]-aP._bodyWidth/2&&aJ<=aQ[0]+aP._bodyWidth/2&&aI>=av(aO.data[aU][2])&&aI<=av(aO.data[aU][3])){return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}else{if(!aP.hlc){var av=aO._yaxis.series_u2p;if(aJ>=aQ[0]-aP._tickLength&&aJ<=aQ[0]+aP._tickLength&&aI>=av(aO.data[aU][2])&&aI<=av(aO.data[aU][3])){return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}else{var av=aO._yaxis.series_u2p;if(aJ>=aQ[0]-aP._tickLength&&aJ<=aQ[0]+aP._tickLength&&aI>=av(aO.data[aU][1])&&aI<=av(aO.data[aU][2])){return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}}}else{aX=Math.sqrt((aJ-aQ[0])*(aJ-aQ[0])+(aI-aQ[1])*(aI-aQ[1]));if(aX<=an&&(aX<=aS||aS==null)){aS=aX;return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}}}break}}return null}this.onClick=function(an){var am=ai(an);var ap=an.data.plot;var ao=ak(am.gridPos,ap);var al=L.Event("jqplotClick");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,ao,ap])};this.onDblClick=function(an){var am=ai(an);var ap=an.data.plot;var ao=ak(am.gridPos,ap);var al=L.Event("jqplotDblClick");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,ao,ap])};this.onMouseDown=function(an){var am=ai(an);var ap=an.data.plot;var ao=ak(am.gridPos,ap);var al=L.Event("jqplotMouseDown");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,ao,ap])};this.onMouseUp=function(an){var am=ai(an);var al=L.Event("jqplotMouseUp");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,null,an.data.plot])};this.onRightClick=function(an){var am=ai(an);var ap=an.data.plot;var ao=ak(am.gridPos,ap);if(ap.captureRightClick){if(an.which==3){var al=L.Event("jqplotRightClick");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,ao,ap])}else{var al=L.Event("jqplotMouseUp");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,ao,ap])}}};this.onMouseMove=function(an){var am=ai(an);var ap=an.data.plot;var ao=ak(am.gridPos,ap);var al=L.Event("jqplotMouseMove");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,ao,ap])};this.onMouseEnter=function(an){var am=ai(an);var ao=an.data.plot;var al=L.Event("jqplotMouseEnter");al.pageX=an.pageX;al.pageY=an.pageY;al.relatedTarget=an.relatedTarget;L(this).trigger(al,[am.gridPos,am.dataPos,null,ao])};this.onMouseLeave=function(an){var am=ai(an);var ao=an.data.plot;var al=L.Event("jqplotMouseLeave");al.pageX=an.pageX;al.pageY=an.pageY;al.relatedTarget=an.relatedTarget;L(this).trigger(al,[am.gridPos,am.dataPos,null,ao])};this.drawSeries=function(an,al){var ap,ao,am;al=(typeof(an)==="number"&&al==null)?an:al;an=(typeof(an)==="object")?an:{};if(al!=u){ao=this.series[al];am=ao.shadowCanvas._ctx;am.clearRect(0,0,am.canvas.width,am.canvas.height);ao.drawShadow(am,an,this);am=ao.canvas._ctx;am.clearRect(0,0,am.canvas.width,am.canvas.height);ao.draw(am,an,this);if(ao.renderer.constructor==L.jqplot.BezierCurveRenderer){if(al660)?ah[aj]*0.85:0.73*ah[aj]+90;ah[aj]=parseInt(ah[aj],10);(ah[aj]>255)?255:ah[aj]}ah[3]=0.3+0.35*al[3];ak.push("rgba("+ah[0]+","+ah[1]+","+ah[2]+","+ah[3]+")")}}else{var al=L.jqplot.getColorComponents(ai);var ah=[al[0],al[1],al[2]];var an=ah[0]+ah[1]+ah[2];for(var aj=0;aj<3;aj++){ah[aj]=(an>660)?ah[aj]*0.85:0.73*ah[aj]+90;ah[aj]=parseInt(ah[aj],10);(ah[aj]>255)?255:ah[aj]}ah[3]=0.3+0.35*al[3];ak="rgba("+ah[0]+","+ah[1]+","+ah[2]+","+ah[3]+")"}return ak};L.jqplot.ColorGenerator=function(ai){ai=ai||L.jqplot.config.defaultColors;var ah=0;this.next=function(){if(ah0){return ai[ah--]}else{ah=ai.length-1;return ai[ah]}};this.get=function(ak){var aj=ak-ai.length*Math.floor(ak/ai.length);return ai[aj]};this.setColors=function(aj){ai=aj};this.reset=function(){ah=0};this.getIndex=function(){return ah};this.setIndex=function(aj){ah=aj}};L.jqplot.hex2rgb=function(aj,ah){aj=aj.replace("#","");if(aj.length==3){aj=aj.charAt(0)+aj.charAt(0)+aj.charAt(1)+aj.charAt(1)+aj.charAt(2)+aj.charAt(2)}var ai;ai="rgba("+parseInt(aj.slice(0,2),16)+", "+parseInt(aj.slice(2,4),16)+", "+parseInt(aj.slice(4,6),16);if(ah){ai+=", "+ah}ai+=")";return ai};L.jqplot.rgb2hex=function(am){var aj=/rgba?\( *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *(?:, *[0-9.]*)?\)/;var ah=am.match(aj);var al="#";for(var ak=1;ak<4;ak++){var ai;if(ah[ak].search(/%/)!=-1){ai=parseInt(255*ah[ak]/100,10).toString(16);if(ai.length==1){ai="0"+ai}}else{ai=parseInt(ah[ak],10).toString(16);if(ai.length==1){ai="0"+ai}}al+=ai}return al};L.jqplot.normalize2rgb=function(ai,ah){if(ai.search(/^ *rgba?\(/)!=-1){return ai}else{if(ai.search(/^ *#?[0-9a-fA-F]?[0-9a-fA-F]/)!=-1){return L.jqplot.hex2rgb(ai,ah)}else{throw new Error("Invalid color spec")}}};L.jqplot.getColorComponents=function(am){am=L.jqplot.colorKeywordMap[am]||am;var ak=L.jqplot.normalize2rgb(am);var aj=/rgba?\( *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *,? *([0-9.]* *)?\)/;var ah=ak.match(aj);var ai=[];for(var al=1;al<4;al++){if(ah[al].search(/%/)!=-1){ai[al-1]=parseInt(255*ah[al]/100,10)}else{ai[al-1]=parseInt(ah[al],10)}}ai[3]=parseFloat(ah[4])?parseFloat(ah[4]):1;return ai};L.jqplot.colorKeywordMap={aliceblue:"rgb(240, 248, 255)",antiquewhite:"rgb(250, 235, 215)",aqua:"rgb( 0, 255, 255)",aquamarine:"rgb(127, 255, 212)",azure:"rgb(240, 255, 255)",beige:"rgb(245, 245, 220)",bisque:"rgb(255, 228, 196)",black:"rgb( 0, 0, 0)",blanchedalmond:"rgb(255, 235, 205)",blue:"rgb( 0, 0, 255)",blueviolet:"rgb(138, 43, 226)",brown:"rgb(165, 42, 42)",burlywood:"rgb(222, 184, 135)",cadetblue:"rgb( 95, 158, 160)",chartreuse:"rgb(127, 255, 0)",chocolate:"rgb(210, 105, 30)",coral:"rgb(255, 127, 80)",cornflowerblue:"rgb(100, 149, 237)",cornsilk:"rgb(255, 248, 220)",crimson:"rgb(220, 20, 60)",cyan:"rgb( 0, 255, 255)",darkblue:"rgb( 0, 0, 139)",darkcyan:"rgb( 0, 139, 139)",darkgoldenrod:"rgb(184, 134, 11)",darkgray:"rgb(169, 169, 169)",darkgreen:"rgb( 0, 100, 0)",darkgrey:"rgb(169, 169, 169)",darkkhaki:"rgb(189, 183, 107)",darkmagenta:"rgb(139, 0, 139)",darkolivegreen:"rgb( 85, 107, 47)",darkorange:"rgb(255, 140, 0)",darkorchid:"rgb(153, 50, 204)",darkred:"rgb(139, 0, 0)",darksalmon:"rgb(233, 150, 122)",darkseagreen:"rgb(143, 188, 143)",darkslateblue:"rgb( 72, 61, 139)",darkslategray:"rgb( 47, 79, 79)",darkslategrey:"rgb( 47, 79, 79)",darkturquoise:"rgb( 0, 206, 209)",darkviolet:"rgb(148, 0, 211)",deeppink:"rgb(255, 20, 147)",deepskyblue:"rgb( 0, 191, 255)",dimgray:"rgb(105, 105, 105)",dimgrey:"rgb(105, 105, 105)",dodgerblue:"rgb( 30, 144, 255)",firebrick:"rgb(178, 34, 34)",floralwhite:"rgb(255, 250, 240)",forestgreen:"rgb( 34, 139, 34)",fuchsia:"rgb(255, 0, 255)",gainsboro:"rgb(220, 220, 220)",ghostwhite:"rgb(248, 248, 255)",gold:"rgb(255, 215, 0)",goldenrod:"rgb(218, 165, 32)",gray:"rgb(128, 128, 128)",grey:"rgb(128, 128, 128)",green:"rgb( 0, 128, 0)",greenyellow:"rgb(173, 255, 47)",honeydew:"rgb(240, 255, 240)",hotpink:"rgb(255, 105, 180)",indianred:"rgb(205, 92, 92)",indigo:"rgb( 75, 0, 130)",ivory:"rgb(255, 255, 240)",khaki:"rgb(240, 230, 140)",lavender:"rgb(230, 230, 250)",lavenderblush:"rgb(255, 240, 245)",lawngreen:"rgb(124, 252, 0)",lemonchiffon:"rgb(255, 250, 205)",lightblue:"rgb(173, 216, 230)",lightcoral:"rgb(240, 128, 128)",lightcyan:"rgb(224, 255, 255)",lightgoldenrodyellow:"rgb(250, 250, 210)",lightgray:"rgb(211, 211, 211)",lightgreen:"rgb(144, 238, 144)",lightgrey:"rgb(211, 211, 211)",lightpink:"rgb(255, 182, 193)",lightsalmon:"rgb(255, 160, 122)",lightseagreen:"rgb( 32, 178, 170)",lightskyblue:"rgb(135, 206, 250)",lightslategray:"rgb(119, 136, 153)",lightslategrey:"rgb(119, 136, 153)",lightsteelblue:"rgb(176, 196, 222)",lightyellow:"rgb(255, 255, 224)",lime:"rgb( 0, 255, 0)",limegreen:"rgb( 50, 205, 50)",linen:"rgb(250, 240, 230)",magenta:"rgb(255, 0, 255)",maroon:"rgb(128, 0, 0)",mediumaquamarine:"rgb(102, 205, 170)",mediumblue:"rgb( 0, 0, 205)",mediumorchid:"rgb(186, 85, 211)",mediumpurple:"rgb(147, 112, 219)",mediumseagreen:"rgb( 60, 179, 113)",mediumslateblue:"rgb(123, 104, 238)",mediumspringgreen:"rgb( 0, 250, 154)",mediumturquoise:"rgb( 72, 209, 204)",mediumvioletred:"rgb(199, 21, 133)",midnightblue:"rgb( 25, 25, 112)",mintcream:"rgb(245, 255, 250)",mistyrose:"rgb(255, 228, 225)",moccasin:"rgb(255, 228, 181)",navajowhite:"rgb(255, 222, 173)",navy:"rgb( 0, 0, 128)",oldlace:"rgb(253, 245, 230)",olive:"rgb(128, 128, 0)",olivedrab:"rgb(107, 142, 35)",orange:"rgb(255, 165, 0)",orangered:"rgb(255, 69, 0)",orchid:"rgb(218, 112, 214)",palegoldenrod:"rgb(238, 232, 170)",palegreen:"rgb(152, 251, 152)",paleturquoise:"rgb(175, 238, 238)",palevioletred:"rgb(219, 112, 147)",papayawhip:"rgb(255, 239, 213)",peachpuff:"rgb(255, 218, 185)",peru:"rgb(205, 133, 63)",pink:"rgb(255, 192, 203)",plum:"rgb(221, 160, 221)",powderblue:"rgb(176, 224, 230)",purple:"rgb(128, 0, 128)",red:"rgb(255, 0, 0)",rosybrown:"rgb(188, 143, 143)",royalblue:"rgb( 65, 105, 225)",saddlebrown:"rgb(139, 69, 19)",salmon:"rgb(250, 128, 114)",sandybrown:"rgb(244, 164, 96)",seagreen:"rgb( 46, 139, 87)",seashell:"rgb(255, 245, 238)",sienna:"rgb(160, 82, 45)",silver:"rgb(192, 192, 192)",skyblue:"rgb(135, 206, 235)",slateblue:"rgb(106, 90, 205)",slategray:"rgb(112, 128, 144)",slategrey:"rgb(112, 128, 144)",snow:"rgb(255, 250, 250)",springgreen:"rgb( 0, 255, 127)",steelblue:"rgb( 70, 130, 180)",tan:"rgb(210, 180, 140)",teal:"rgb( 0, 128, 128)",thistle:"rgb(216, 191, 216)",tomato:"rgb(255, 99, 71)",turquoise:"rgb( 64, 224, 208)",violet:"rgb(238, 130, 238)",wheat:"rgb(245, 222, 179)",white:"rgb(255, 255, 255)",whitesmoke:"rgb(245, 245, 245)",yellow:"rgb(255, 255, 0)",yellowgreen:"rgb(154, 205, 50)"};L.jqplot.AxisLabelRenderer=function(ah){L.jqplot.ElemContainer.call(this);this.axis;this.show=true;this.label="";this.fontFamily=null;this.fontSize=null;this.textColor=null;this._elem;this.escapeHTML=false;L.extend(true,this,ah)};L.jqplot.AxisLabelRenderer.prototype=new L.jqplot.ElemContainer();L.jqplot.AxisLabelRenderer.prototype.constructor=L.jqplot.AxisLabelRenderer;L.jqplot.AxisLabelRenderer.prototype.init=function(ah){L.extend(true,this,ah)};L.jqplot.AxisLabelRenderer.prototype.draw=function(ah,ai){if(this._elem){this._elem.emptyForce();this._elem=null}this._elem=L('
');if(Number(this.label)){this._elem.css("white-space","nowrap")}if(!this.escapeHTML){this._elem.html(this.label)}else{this._elem.text(this.label)}if(this.fontFamily){this._elem.css("font-family",this.fontFamily)}if(this.fontSize){this._elem.css("font-size",this.fontSize)}if(this.textColor){this._elem.css("color",this.textColor)}return this._elem};L.jqplot.AxisLabelRenderer.prototype.pack=function(){};L.jqplot.AxisTickRenderer=function(ah){L.jqplot.ElemContainer.call(this);this.mark="outside";this.axis;this.showMark=true;this.showGridline=true;this.isMinorTick=false;this.size=4;this.markSize=6;this.show=true;this.showLabel=true;this.label=null;this.value=null;this._styles={};this.formatter=L.jqplot.DefaultTickFormatter;this.prefix="";this.suffix="";this.formatString="";this.fontFamily;this.fontSize;this.textColor;this.escapeHTML=false;this._elem;this._breakTick=false;L.extend(true,this,ah)};L.jqplot.AxisTickRenderer.prototype.init=function(ah){L.extend(true,this,ah)};L.jqplot.AxisTickRenderer.prototype=new L.jqplot.ElemContainer();L.jqplot.AxisTickRenderer.prototype.constructor=L.jqplot.AxisTickRenderer;L.jqplot.AxisTickRenderer.prototype.setTick=function(ah,aj,ai){this.value=ah;this.axis=aj;if(ai){this.isMinorTick=true}return this};L.jqplot.AxisTickRenderer.prototype.draw=function(){if(this.label===null){this.label=this.prefix+this.formatter(this.formatString,this.value)+this.suffix}var ai={position:"absolute"};if(Number(this.label)){ai.whitSpace="nowrap"}if(this._elem){this._elem.emptyForce();this._elem=null}this._elem=L(document.createElement("div"));this._elem.addClass("jqplot-"+this.axis+"-tick");if(!this.escapeHTML){this._elem.html(this.label)}else{this._elem.text(this.label)}this._elem.css(ai);for(var ah in this._styles){this._elem.css(ah,this._styles[ah])}if(this.fontFamily){this._elem.css("font-family",this.fontFamily)}if(this.fontSize){this._elem.css("font-size",this.fontSize)}if(this.textColor){this._elem.css("color",this.textColor)}if(this._breakTick){this._elem.addClass("jqplot-breakTick")}return this._elem};L.jqplot.DefaultTickFormatter=function(ah,ai){if(typeof ai=="number"){if(!ah){ah=L.jqplot.config.defaultTickFormatString}return L.jqplot.sprintf(ah,ai)}else{return String(ai)}};L.jqplot.PercentTickFormatter=function(ah,ai){if(typeof ai=="number"){ai=100*ai;if(!ah){ah=L.jqplot.config.defaultTickFormatString}return L.jqplot.sprintf(ah,ai)}else{return String(ai)}};L.jqplot.AxisTickRenderer.prototype.pack=function(){};L.jqplot.CanvasGridRenderer=function(){this.shadowRenderer=new L.jqplot.ShadowRenderer()};L.jqplot.CanvasGridRenderer.prototype.init=function(ai){this._ctx;L.extend(true,this,ai);var ah={lineJoin:"miter",lineCap:"round",fill:false,isarc:false,angle:this.shadowAngle,offset:this.shadowOffset,alpha:this.shadowAlpha,depth:this.shadowDepth,lineWidth:this.shadowWidth,closePath:false,strokeStyle:this.shadowColor};this.renderer.shadowRenderer.init(ah)};L.jqplot.CanvasGridRenderer.prototype.createElement=function(ak){var aj;if(this._elem){if(L.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==u){aj=this._elem.get(0);window.G_vmlCanvasManager.uninitElement(aj);aj=null}this._elem.emptyForce();this._elem=null}aj=ak.canvasManager.getCanvas();var ah=this._plotDimensions.width;var ai=this._plotDimensions.height;aj.width=ah;aj.height=ai;this._elem=L(aj);this._elem.addClass("jqplot-grid-canvas");this._elem.css({position:"absolute",left:0,top:0});aj=ak.canvasManager.initCanvas(aj);this._top=this._offsets.top;this._bottom=ai-this._offsets.bottom;this._left=this._offsets.left;this._right=ah-this._offsets.right;this._width=this._right-this._left;this._height=this._bottom-this._top;aj=null;return this._elem};L.jqplot.CanvasGridRenderer.prototype.draw=function(){this._ctx=this._elem.get(0).getContext("2d");var at=this._ctx;var aw=this._axes;at.save();at.clearRect(0,0,this._plotDimensions.width,this._plotDimensions.height);at.fillStyle=this.backgroundColor||this.background;at.fillRect(this._left,this._top,this._width,this._height);at.save();at.lineJoin="miter";at.lineCap="butt";at.lineWidth=this.gridLineWidth;at.strokeStyle=this.gridLineColor;var aA,az,ap,aq;var am=["xaxis","yaxis","x2axis","y2axis"];for(var ay=4;ay>0;ay--){var aD=am[ay-1];var ah=aw[aD];var aB=ah._ticks;var ar=aB.length;if(ah.show){if(ah.drawBaseline){var aC={};if(ah.baselineWidth!==null){aC.lineWidth=ah.baselineWidth}if(ah.baselineColor!==null){aC.strokeStyle=ah.baselineColor}switch(aD){case"xaxis":ao(this._left,this._bottom,this._right,this._bottom,aC);break;case"yaxis":ao(this._left,this._bottom,this._left,this._top,aC);break;case"x2axis":ao(this._left,this._bottom,this._right,this._bottom,aC);break;case"y2axis":ao(this._right,this._bottom,this._right,this._top,aC);break}}for(var au=ar;au>0;au--){var an=aB[au-1];if(an.show){var ak=Math.round(ah.u2p(an.value))+0.5;switch(aD){case"xaxis":if(an.showGridline&&this.drawGridlines&&((!an.isMinorTick&&ah.drawMajorGridlines)||(an.isMinorTick&&ah.drawMinorGridlines))){ao(ak,this._top,ak,this._bottom)}if(an.showMark&&an.mark&&((!an.isMinorTick&&ah.drawMajorTickMarks)||(an.isMinorTick&&ah.drawMinorTickMarks))){ap=an.markSize;aq=an.mark;var ak=Math.round(ah.u2p(an.value))+0.5;switch(aq){case"outside":aA=this._bottom;az=this._bottom+ap;break;case"inside":aA=this._bottom-ap;az=this._bottom;break;case"cross":aA=this._bottom-ap;az=this._bottom+ap;break;default:aA=this._bottom;az=this._bottom+ap;break}if(this.shadow){this.renderer.shadowRenderer.draw(at,[[ak,aA],[ak,az]],{lineCap:"butt",lineWidth:this.gridLineWidth,offset:this.gridLineWidth*0.75,depth:2,fill:false,closePath:false})}ao(ak,aA,ak,az)}break;case"yaxis":if(an.showGridline&&this.drawGridlines&&((!an.isMinorTick&&ah.drawMajorGridlines)||(an.isMinorTick&&ah.drawMinorGridlines))){ao(this._right,ak,this._left,ak)}if(an.showMark&&an.mark&&((!an.isMinorTick&&ah.drawMajorTickMarks)||(an.isMinorTick&&ah.drawMinorTickMarks))){ap=an.markSize;aq=an.mark;var ak=Math.round(ah.u2p(an.value))+0.5;switch(aq){case"outside":aA=this._left-ap;az=this._left;break;case"inside":aA=this._left;az=this._left+ap;break;case"cross":aA=this._left-ap;az=this._left+ap;break;default:aA=this._left-ap;az=this._left;break}if(this.shadow){this.renderer.shadowRenderer.draw(at,[[aA,ak],[az,ak]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}ao(aA,ak,az,ak,{strokeStyle:ah.borderColor})}break;case"x2axis":if(an.showGridline&&this.drawGridlines&&((!an.isMinorTick&&ah.drawMajorGridlines)||(an.isMinorTick&&ah.drawMinorGridlines))){ao(ak,this._bottom,ak,this._top)}if(an.showMark&&an.mark&&((!an.isMinorTick&&ah.drawMajorTickMarks)||(an.isMinorTick&&ah.drawMinorTickMarks))){ap=an.markSize;aq=an.mark;var ak=Math.round(ah.u2p(an.value))+0.5;switch(aq){case"outside":aA=this._top-ap;az=this._top;break;case"inside":aA=this._top;az=this._top+ap;break;case"cross":aA=this._top-ap;az=this._top+ap;break;default:aA=this._top-ap;az=this._top;break}if(this.shadow){this.renderer.shadowRenderer.draw(at,[[ak,aA],[ak,az]],{lineCap:"butt",lineWidth:this.gridLineWidth,offset:this.gridLineWidth*0.75,depth:2,fill:false,closePath:false})}ao(ak,aA,ak,az)}break;case"y2axis":if(an.showGridline&&this.drawGridlines&&((!an.isMinorTick&&ah.drawMajorGridlines)||(an.isMinorTick&&ah.drawMinorGridlines))){ao(this._left,ak,this._right,ak)}if(an.showMark&&an.mark&&((!an.isMinorTick&&ah.drawMajorTickMarks)||(an.isMinorTick&&ah.drawMinorTickMarks))){ap=an.markSize;aq=an.mark;var ak=Math.round(ah.u2p(an.value))+0.5;switch(aq){case"outside":aA=this._right;az=this._right+ap;break;case"inside":aA=this._right-ap;az=this._right;break;case"cross":aA=this._right-ap;az=this._right+ap;break;default:aA=this._right;az=this._right+ap;break}if(this.shadow){this.renderer.shadowRenderer.draw(at,[[aA,ak],[az,ak]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}ao(aA,ak,az,ak,{strokeStyle:ah.borderColor})}break;default:break}}}an=null}ah=null;aB=null}am=["y3axis","y4axis","y5axis","y6axis","y7axis","y8axis","y9axis","yMidAxis"];for(var ay=7;ay>0;ay--){var ah=aw[am[ay-1]];var aB=ah._ticks;if(ah.show){var ai=aB[ah.numberTicks-1];var al=aB[0];var aj=ah.getLeft();var av=[[aj,ai.getTop()+ai.getHeight()/2],[aj,al.getTop()+al.getHeight()/2+1]];if(this.shadow){this.renderer.shadowRenderer.draw(at,av,{lineCap:"butt",fill:false,closePath:false})}ao(av[0][0],av[0][1],av[1][0],av[1][1],{lineCap:"butt",strokeStyle:ah.borderColor,lineWidth:ah.borderWidth});for(var au=aB.length;au>0;au--){var an=aB[au-1];ap=an.markSize;aq=an.mark;var ak=Math.round(ah.u2p(an.value))+0.5;if(an.showMark&&an.mark){switch(aq){case"outside":aA=aj;az=aj+ap;break;case"inside":aA=aj-ap;az=aj;break;case"cross":aA=aj-ap;az=aj+ap;break;default:aA=aj;az=aj+ap;break}av=[[aA,ak],[az,ak]];if(this.shadow){this.renderer.shadowRenderer.draw(at,av,{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}ao(aA,ak,az,ak,{strokeStyle:ah.borderColor})}an=null}al=null}ah=null;aB=null}at.restore();function ao(aH,aG,aE,ax,aF){at.save();aF=aF||{};if(aF.lineWidth==null||aF.lineWidth!=0){L.extend(true,at,aF);at.beginPath();at.moveTo(aH,aG);at.lineTo(aE,ax);at.stroke();at.restore()}}if(this.shadow){var av=[[this._left,this._bottom],[this._right,this._bottom],[this._right,this._top]];this.renderer.shadowRenderer.draw(at,av)}if(this.borderWidth!=0&&this.drawBorder){ao(this._left,this._top,this._right,this._top,{lineCap:"round",strokeStyle:aw.x2axis.borderColor,lineWidth:aw.x2axis.borderWidth});ao(this._right,this._top,this._right,this._bottom,{lineCap:"round",strokeStyle:aw.y2axis.borderColor,lineWidth:aw.y2axis.borderWidth});ao(this._right,this._bottom,this._left,this._bottom,{lineCap:"round",strokeStyle:aw.xaxis.borderColor,lineWidth:aw.xaxis.borderWidth});ao(this._left,this._bottom,this._left,this._top,{lineCap:"round",strokeStyle:aw.yaxis.borderColor,lineWidth:aw.yaxis.borderWidth})}at.restore();at=null;aw=null};L.jqplot.DivTitleRenderer=function(){};L.jqplot.DivTitleRenderer.prototype.init=function(ah){L.extend(true,this,ah)};L.jqplot.DivTitleRenderer.prototype.draw=function(){if(this._elem){this._elem.emptyForce();this._elem=null}var ak=this.renderer;var aj=document.createElement("div");this._elem=L(aj);this._elem.addClass("jqplot-title");if(!this.text){this.show=false;this._elem.height(0);this._elem.width(0)}else{if(this.text){var ah;if(this.color){ah=this.color}else{if(this.textColor){ah=this.textColor}}var ai={position:"absolute",top:"0px",left:"0px"};if(this._plotWidth){ai.width=this._plotWidth+"px"}if(this.fontSize){ai.fontSize=this.fontSize}if(typeof this.textAlign==="string"){ai.textAlign=this.textAlign}else{ai.textAlign="center"}if(ah){ai.color=ah}if(this.paddingBottom){ai.paddingBottom=this.paddingBottom}if(this.fontFamily){ai.fontFamily=this.fontFamily}this._elem.css(ai);if(this.escapeHtml){this._elem.text(this.text)}else{this._elem.html(this.text)}}}aj=null;return this._elem};L.jqplot.DivTitleRenderer.prototype.pack=function(){};var r=0.1;L.jqplot.LinePattern=function(aw,aq){var ap={dotted:[r,L.jqplot.config.dotGapLength],dashed:[L.jqplot.config.dashLength,L.jqplot.config.gapLength],solid:null};if(typeof aq==="string"){if(aq[0]==="."||aq[0]==="-"){var ax=aq;aq=[];for(var ao=0,al=ax.length;ao0)&&(aC>0)){aA/=aB;az/=aB;while(true){var aD=aC*ar;if(aD=aq.length){ak=0}ar=aq[ak]}else{au=ay;at=aE;if((ak&1)==0){aw.lineTo(au,at)}else{aw.moveTo(au,at)}ar-=aB/aC;break}}}};var ai=function(){aw.beginPath()};var am=function(){aj(an,ah)};return{moveTo:av,lineTo:aj,beginPath:ai,closePath:am}};L.jqplot.LineRenderer=function(){this.shapeRenderer=new L.jqplot.ShapeRenderer();this.shadowRenderer=new L.jqplot.ShadowRenderer()};L.jqplot.LineRenderer.prototype.init=function(ai,an){ai=ai||{};this._type="line";this.renderer.animation={show:false,direction:"left",speed:2500,_supported:true};this.renderer.smooth=false;this.renderer.tension=null;this.renderer.constrainSmoothing=true;this.renderer._smoothedData=[];this.renderer._smoothedPlotData=[];this.renderer._hiBandGridData=[];this.renderer._lowBandGridData=[];this.renderer._hiBandSmoothedData=[];this.renderer._lowBandSmoothedData=[];this.renderer.bandData=[];this.renderer.bands={show:false,hiData:[],lowData:[],color:this.color,showLines:false,fill:true,fillColor:null,_min:null,_max:null,interval:"3%"};var al={highlightMouseOver:ai.highlightMouseOver,highlightMouseDown:ai.highlightMouseDown,highlightColor:ai.highlightColor};delete (ai.highlightMouseOver);delete (ai.highlightMouseDown);delete (ai.highlightColor);L.extend(true,this.renderer,ai);this.renderer.options=ai;if(this.renderer.bandData.length>1&&(!ai.bands||ai.bands.show==null)){this.renderer.bands.show=true}else{if(ai.bands&&ai.bands.show==null&&ai.bands.interval!=null){this.renderer.bands.show=true}}if(this.fill){this.renderer.bands.show=false}if(this.renderer.bands.show){this.renderer.initBands.call(this,this.renderer.options,an)}if(this._stack){this.renderer.smooth=false}var am={lineJoin:this.lineJoin,lineCap:this.lineCap,fill:this.fill,isarc:false,strokeStyle:this.color,fillStyle:this.fillColor,lineWidth:this.lineWidth,linePattern:this.linePattern,closePath:this.fill};this.renderer.shapeRenderer.init(am);var aj=ai.shadowOffset;if(aj==null){if(this.lineWidth>2.5){aj=1.25*(1+(Math.atan((this.lineWidth/2.5))/0.785398163-1)*0.6)}else{aj=1.25*Math.atan((this.lineWidth/2.5))/0.785398163}}var ah={lineJoin:this.lineJoin,lineCap:this.lineCap,fill:this.fill,isarc:false,angle:this.shadowAngle,offset:aj,alpha:this.shadowAlpha,depth:this.shadowDepth,lineWidth:this.lineWidth,linePattern:this.linePattern,closePath:this.fill};this.renderer.shadowRenderer.init(ah);this._areaPoints=[];this._boundingBox=[[],[]];if(!this.isTrendline&&this.fill||this.renderer.bands.show){this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColor=null;if(al.highlightMouseDown&&al.highlightMouseOver==null){al.highlightMouseOver=false}L.extend(true,this,{highlightMouseOver:al.highlightMouseOver,highlightMouseDown:al.highlightMouseDown,highlightColor:al.highlightColor});if(!this.highlightColor){var ak=(this.renderer.bands.show)?this.renderer.bands.fillColor:this.fillColor;this.highlightColor=L.jqplot.computeHighlightColors(ak)}if(this.highlighter){this.highlighter.show=false}}if(!this.isTrendline&&an){an.plugins.lineRenderer={};an.postInitHooks.addOnce(z);an.postDrawHooks.addOnce(af);an.eventListenerHooks.addOnce("jqplotMouseMove",h);an.eventListenerHooks.addOnce("jqplotMouseDown",e);an.eventListenerHooks.addOnce("jqplotMouseUp",ad);an.eventListenerHooks.addOnce("jqplotClick",g);an.eventListenerHooks.addOnce("jqplotRightClick",s)}};L.jqplot.LineRenderer.prototype.initBands=function(ak,av){var al=ak.bandData||[];var an=this.renderer.bands;an.hiData=[];an.lowData=[];var aB=this.data;an._max=null;an._min=null;if(al.length==2){if(L.isArray(al[0][0])){var ao;var ah=0,ar=0;for(var aw=0,at=al[0].length;awan._max)||an._max==null){an._max=ao[1]}if((ao[1]!=null&&ao[1]an._max)||an._max==null){an._max=ao[1];ar=1}if((ao[1]!=null&&ao[1]al[1][0])?0:1;var aC=(aj)?0:1;for(var aw=0,at=aB.length;aw2&&!L.isArray(al[0][0])){var aj=(al[0][0]>al[0][1])?0:1;var aC=(aj)?0:1;for(var aw=0,at=al.length;awan._max)||an._max==null){an._max=am[aw][1]}}for(var aw=0,at=ap.length;aw0){aR=Math.abs((ap[aQ][1]-ap[aQ-1][1])/(ap[aQ][0]-ap[aQ-1][0]))}am=aR/aG+aE;aM=aF*A(am)-aF*A(aE)+aS;aT=(aO+aM)/2}else{aT=aU}for(aK=0;aK2){var ao;if(this.renderer.constrainSmoothing){ao=J.call(this,this.gridData);this.renderer._smoothedData=ao[0];this.renderer._smoothedPlotData=ao[1];if(ak.show){ao=J.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=ao[0];ao=J.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=ao[0]}ao=null}else{ao=F.call(this,this.gridData);this.renderer._smoothedData=ao[0];this.renderer._smoothedPlotData=ao[1];if(ak.show){ao=F.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=ao[0];ao=F.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=ao[0]}ao=null}}};L.jqplot.LineRenderer.prototype.makeGridData=function(ao,aq){var am=this._xaxis.series_u2p;var ah=this._yaxis.series_u2p;var ar=[];var aj=[];this.renderer._smoothedData=[];this.renderer._smoothedPlotData=[];this.renderer._hiBandGridData=[];this.renderer._lowBandGridData=[];this.renderer._hiBandSmoothedData=[];this.renderer._lowBandSmoothedData=[];var al=this.renderer.bands;var ai=false;for(var an=0;an2){var ap;if(this.renderer.constrainSmoothing){ap=J.call(this,ar);this.renderer._smoothedData=ap[0];this.renderer._smoothedPlotData=ap[1];if(al.show){ap=J.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=ap[0];ap=J.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=ap[0]}ap=null}else{ap=F.call(this,ar);this.renderer._smoothedData=ap[0];this.renderer._smoothedPlotData=ap[1];if(al.show){ap=F.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=ap[0];ap=F.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=ap[0]}ap=null}}return ar};L.jqplot.LineRenderer.prototype.draw=function(ax,aI,ai,aB){var aC;var aq=L.extend(true,{},ai);var ak=(aq.shadow!=u)?aq.shadow:this.shadow;var aJ=(aq.showLine!=u)?aq.showLine:this.showLine;var aA=(aq.fill!=u)?aq.fill:this.fill;var ah=(aq.fillAndStroke!=u)?aq.fillAndStroke:this.fillAndStroke;var ar,ay,av,aE;ax.save();if(aI.length){if(aJ){if(aA){if(this.fillToZero){var aF=this.negativeColor;if(!this.useNegativeColors){aF=aq.fillStyle}var ao=false;var ap=aq.fillStyle;if(ah){var aH=aI.slice(0)}if(this.index==0||!this._stack){var aw=[];var aL=(this.renderer.smooth)?this.renderer._smoothedPlotData:this._plotData;this._areaPoints=[];var aG=this._yaxis.series_u2p(this.fillToValue);var aj=this._xaxis.series_u2p(this.fillToValue);aq.closePath=true;if(this.fillAxis=="y"){aw.push([aI[0][0],aG]);this._areaPoints.push([aI[0][0],aG]);for(var aC=0;aC0;aC--){aI.push(au[aC-1])}if(ak){this.renderer.shadowRenderer.draw(ax,aI,aq)}this._areaPoints=aI;this.renderer.shapeRenderer.draw(ax,aI,aq)}}else{if(ah){var aH=aI.slice(0)}if(this.index==0||!this._stack){var al=ax.canvas.height;aI.unshift([aI[0][0],al]);var aD=aI.length;aI.push([aI[aD-1][0],al])}else{var au=this._prevGridData;for(var aC=au.length;aC>0;aC--){aI.push(au[aC-1])}}this._areaPoints=aI;if(ak){this.renderer.shadowRenderer.draw(ax,aI,aq)}this.renderer.shapeRenderer.draw(ax,aI,aq)}if(ah){var az=L.extend(true,{},aq,{fill:false,closePath:false});this.renderer.shapeRenderer.draw(ax,aH,az);if(this.markerRenderer.show){if(this.renderer.smooth){aH=this.gridData}for(aC=0;aCat[0]||ar==null){ar=at[0]}if(aEat[1]||ay==null){ay=at[1]}}if(this.type==="line"&&this.renderer.bands.show){aE=this._yaxis.series_u2p(this.renderer.bands._min);ay=this._yaxis.series_u2p(this.renderer.bands._max)}this._boundingBox=[[ar,aE],[av,ay]];if(this.markerRenderer.show&&!aA){if(this.renderer.smooth){aI=this.gridData}for(aC=0;aCao){ao=aj}}}al=null;am=null;if(ah){ai=this._label._elem.outerWidth(true);an=this._label._elem.outerHeight(true)}if(this.name=="xaxis"){ao=ao+an;this._elem.css({height:ao+"px",left:"0px",bottom:"0px"})}else{if(this.name=="x2axis"){ao=ao+an;this._elem.css({height:ao+"px",left:"0px",top:"0px"})}else{if(this.name=="yaxis"){ao=ao+ai;this._elem.css({width:ao+"px",left:"0px",top:"0px"});if(ah&&this._label.constructor==L.jqplot.AxisLabelRenderer){this._label._elem.css("width",ai+"px")}}else{ao=ao+ai;this._elem.css({width:ao+"px",right:"0px",top:"0px"});if(ah&&this._label.constructor==L.jqplot.AxisLabelRenderer){this._label._elem.css("width",ai+"px")}}}}}};L.jqplot.LinearAxisRenderer.prototype.createTicks=function(aj){var aT=this._ticks;var aK=this.ticks;var az=this.name;var aB=this._dataBounds;var ah=(this.name.charAt(0)==="x")?this._plotDimensions.width:this._plotDimensions.height;var an;var a6,aI;var ap,ao;var a4,a0;var aH=this.min;var a5=this.max;var aW=this.numberTicks;var ba=this.tickInterval;var am=30;this._scalefact=(Math.max(ah,am+1)-am)/300;if(aK.length){for(a0=0;a0this.breakPoints[0]&&aO[0]<=this.breakPoints[1]){aU.show=false;aU.showGridline=false;aU.label=aO[1]}else{aU.label=aO[1]}}}else{aU.label=aO[1]}aU.setTick(aO[0],this.name);this._ticks.push(aU)}else{if(L.isPlainObject(aO)){L.extend(true,aU,aO);aU.axis=this.name;this._ticks.push(aU)}else{aU.value=aO;if(this.breakPoints){if(aO==this.breakPoints[0]){aU.label=this.breakTickLabel;aU._breakTick=true;aU.showGridline=false;aU.showMark=false}else{if(aO>this.breakPoints[0]&&aO<=this.breakPoints[1]){aU.show=false;aU.showGridline=false}}}aU.setTick(aO,this.name);this._ticks.push(aU)}}}this.numberTicks=aK.length;this.min=this._ticks[0].value;this.max=this._ticks[this.numberTicks-1].value;this.tickInterval=(this.max-this.min)/(this.numberTicks-1)}else{if(az=="xaxis"||az=="x2axis"){ah=this._plotDimensions.width}else{ah=this._plotDimensions.height}var ax=this.numberTicks;if(this.alignTicks){if(this.name==="x2axis"&&aj.axes.xaxis.show){ax=aj.axes.xaxis.numberTicks}else{if(this.name.charAt(0)==="y"&&this.name!=="yaxis"&&this.name!=="yMidAxis"&&aj.axes.yaxis.show){ax=aj.axes.yaxis.numberTicks}}}a6=((this.min!=null)?this.min:aB.min);aI=((this.max!=null)?this.max:aB.max);var av=aI-a6;var aS,ay;var at;if(this.tickOptions==null||!this.tickOptions.formatString){this._overrideFormatString=true}if(this.min==null||this.max==null&&this.tickInterval==null&&!this.autoscale){if(this.forceTickAt0){if(a6>0){a6=0}if(aI<0){aI=0}}if(this.forceTickAt100){if(a6>100){a6=100}if(aI<100){aI=100}}var aE=false,a1=false;if(this.min!=null){aE=true}else{if(this.max!=null){a1=true}}var aP=L.jqplot.LinearTickGenerator(a6,aI,this._scalefact,ax,aE,a1);var aw=(this.min!=null)?a6:a6+av*(this.padMin-1);var aQ=(this.max!=null)?aI:aI-av*(this.padMax-1);if(a6aQ){aw=(this.min!=null)?a6:a6-av*(this.padMin-1);aQ=(this.max!=null)?aI:aI+av*(this.padMax-1);aP=L.jqplot.LinearTickGenerator(aw,aQ,this._scalefact,ax,aE,a1)}this.min=aP[0];this.max=aP[1];this.numberTicks=aP[2];this._autoFormatString=aP[3];this.tickInterval=aP[4]}else{if(a6==aI){var ai=0.05;if(a6>0){ai=Math.max(Math.log(a6)/Math.LN10,0.05)}a6-=ai;aI+=ai}if(this.autoscale&&this.min==null&&this.max==null){var ak,al,ar;var aC=false;var aN=false;var aA={min:null,max:null,average:null,stddev:null};for(var a0=0;a0a2){a2=aR[aZ]}}}var au=(a2-aG)/a2;if(aV.renderer.constructor==L.jqplot.BarRenderer){if(aG>=0&&(aV.fillToZero||au>0.1)){aC=true}else{aC=false;if(aV.fill&&aV.fillToZero&&aG<0&&a2>0){aN=true}else{aN=false}}}else{if(aV.fill){if(aG>=0&&(aV.fillToZero||au>0.1)){aC=true}else{if(aG<0&&a2>0&&aV.fillToZero){aC=false;aN=true}else{aC=false;aN=false}}}else{if(aG<0){aC=false}}}}}if(aC){this.numberTicks=2+Math.ceil((ah-(this.tickSpacing-1))/this.tickSpacing);this.min=0;aH=0;al=aI/(this.numberTicks-1);at=Math.pow(10,Math.abs(Math.floor(Math.log(al)/Math.LN10)));if(al/at==parseInt(al/at,10)){al+=at}this.tickInterval=Math.ceil(al/at)*at;this.max=this.tickInterval*(this.numberTicks-1)}else{if(aN){this.numberTicks=2+Math.ceil((ah-(this.tickSpacing-1))/this.tickSpacing);var aJ=Math.ceil(Math.abs(a6)/av*(this.numberTicks-1));var a9=this.numberTicks-1-aJ;al=Math.max(Math.abs(a6/aJ),Math.abs(aI/a9));at=Math.pow(10,Math.abs(Math.floor(Math.log(al)/Math.LN10)));this.tickInterval=Math.ceil(al/at)*at;this.max=this.tickInterval*a9;this.min=-this.tickInterval*aJ}else{if(this.numberTicks==null){if(this.tickInterval){this.numberTicks=3+Math.ceil(av/this.tickInterval)}else{this.numberTicks=2+Math.ceil((ah-(this.tickSpacing-1))/this.tickSpacing)}}if(this.tickInterval==null){al=av/(this.numberTicks-1);if(al<1){at=Math.pow(10,Math.abs(Math.floor(Math.log(al)/Math.LN10)))}else{at=1}this.tickInterval=Math.ceil(al*at*this.pad)/at}else{at=1/this.tickInterval}ak=this.tickInterval*(this.numberTicks-1);ar=(ak-av)/2;if(this.min==null){this.min=Math.floor(at*(a6-ar))/at}if(this.max==null){this.max=this.min+ak}}}var aF=L.jqplot.getSignificantFigures(this.tickInterval);var aM;if(aF.digitsLeft>=aF.significantDigits){aM="%d"}else{var at=Math.max(0,5-aF.digitsLeft);at=Math.min(at,aF.digitsRight);aM="%."+at+"f"}this._autoFormatString=aM}else{aS=(this.min!=null)?this.min:a6-av*(this.padMin-1);ay=(this.max!=null)?this.max:aI+av*(this.padMax-1);av=ay-aS;if(this.numberTicks==null){if(this.tickInterval!=null){this.numberTicks=Math.ceil((ay-aS)/this.tickInterval)+1}else{if(ah>100){this.numberTicks=parseInt(3+(ah-100)/75,10)}else{this.numberTicks=2}}}if(this.tickInterval==null){this.tickInterval=av/(this.numberTicks-1)}if(this.max==null){ay=aS+this.tickInterval*(this.numberTicks-1)}if(this.min==null){aS=ay-this.tickInterval*(this.numberTicks-1)}var aF=L.jqplot.getSignificantFigures(this.tickInterval);var aM;if(aF.digitsLeft>=aF.significantDigits){aM="%d"}else{var at=Math.max(0,5-aF.digitsLeft);at=Math.min(at,aF.digitsRight);aM="%."+at+"f"}this._autoFormatString=aM;this.min=aS;this.max=ay}if(this.renderer.constructor==L.jqplot.LinearAxisRenderer&&this._autoFormatString==""){av=this.max-this.min;var a7=new this.tickRenderer(this.tickOptions);var aL=a7.formatString||L.jqplot.config.defaultTickFormatString;var aL=aL.match(L.jqplot.sprintf.regex)[0];var a3=0;if(aL){if(aL.search(/[fFeEgGpP]/)>-1){var aY=aL.match(/\%\.(\d{0,})?[eEfFgGpP]/);if(aY){a3=parseInt(aY[1],10)}else{a3=6}}else{if(aL.search(/[di]/)>-1){a3=0}}var aq=Math.pow(10,-a3);if(this.tickIntervalthis.breakPoints[0]&&aAthis.breakPoints[0]&&aAthis.breakPoints[0]&&aA=this.breakPoints[1]){return(aA-au)*ak/al}else{return(aA+this.breakPoints[1]-this.breakPoints[0]-au)*ak/al}};this.series_p2u=function(aA){return aA*al/ak+au}}}else{this.p2u=function(aA){return(aA-am)*al/ak+at};this.u2p=function(aA){return(aA-at)*ak/al+am};if(this.name=="xaxis"||this.name=="x2axis"){this.series_u2p=function(aA){return(aA-at)*ak/al};this.series_p2u=function(aA){return aA*al/ak+at}}else{this.series_u2p=function(aA){return(aA-au)*ak/al};this.series_p2u=function(aA){return aA*al/ak+au}}}if(this.show){if(this.name=="xaxis"||this.name=="x2axis"){for(var av=0;av0){ah=-ap._textRenderer.height*Math.cos(-ap._textRenderer.angle)/2}else{ah=-ap.getHeight()+ap._textRenderer.height*Math.cos(ap._textRenderer.angle)/2}break;case"middle":ah=-ap.getHeight()/2;break;default:ah=-ap.getHeight()/2;break}}else{ah=-ap.getHeight()/2}var az=this.u2p(ap.value)+ah+"px";ap._elem.css("top",az);ap.pack()}}if(aq){var aw=this._label._elem.outerHeight(true);this._label._elem.css("top",ao-ak/2-aw/2+"px");if(this.name=="yaxis"){this._label._elem.css("left","0px")}else{this._label._elem.css("right","0px")}this._label.pack()}}}ay=null};function i(ai){var ah;ai=Math.abs(ai);if(ai>=10){ah="%d"}else{if(ai>1){if(ai===parseInt(ai,10)){ah="%d"}else{ah="%.1f"}}else{var aj=-Math.floor(Math.log(ai)/Math.LN10);ah="%."+aj+"f"}}return ah}var b=[0.1,0.2,0.3,0.4,0.5,0.8,1,2,3,4,5];var c=function(ai){var ah=b.indexOf(ai);if(ah>0){return b[ah-1]}else{return b[b.length-1]/100}};var k=function(ai){var ah=b.indexOf(ai);if(ah5){ah=10*aj}else{if(am>2){ah=5*aj}else{if(am>1){ah=2*aj}else{ah=aj}}}}else{if(am>5){ah=10*aj}else{if(am>4){ah=5*aj}else{if(am>3){ah=4*aj}else{if(am>2){ah=3*aj}else{if(am>1){ah=2*aj}else{ah=aj}}}}}}return ah}function Q(ai,ah){ah=ah||1;var ak=Math.floor(Math.log(ai)/Math.LN10);var am=Math.pow(10,ak);var al=ai/am;var aj;al=al/ah;if(al<=0.38){aj=0.1}else{if(al<=1.6){aj=0.2}else{if(al<=4){aj=0.5}else{if(al<=8){aj=1}else{if(al<=16){aj=2}else{aj=5}}}}}return aj*am}function x(aj,ai){var al=Math.floor(Math.log(aj)/Math.LN10);var an=Math.pow(10,al);var am=aj/an;var ah;var ak;am=am/ai;if(am<=0.38){ak=0.1}else{if(am<=1.6){ak=0.2}else{if(am<=4){ak=0.5}else{if(am<=8){ak=1}else{if(am<=16){ak=2}else{ak=5}}}}}ah=ak*an;return[ah,ak,an]}L.jqplot.LinearTickGenerator=function(an,aq,aj,ak,ao,ar){ao=(ao===null)?false:ao;ar=(ar===null||ao)?false:ar;if(an===aq){aq=(aq)?0:1}aj=aj||1;if(aqat){at=aB}if(ai>aA){aA=ai}})}an.width=at+Number(av);an.height=aA+Number(ax);var ak=an.getContext("2d");ak.save();ak.fillStyle=al;ak.fillRect(0,0,an.width,an.height);ak.restore();ak.translate(au,ar);ak.textAlign="left";ak.textBaseline="top";function aC(aE){var aF=parseInt(L(aE).css("line-height"),10);if(isNaN(aF)){aF=parseInt(L(aE).css("font-size"),10)*1.2}return aF}function aD(aF,aE,aS,aG,aO,aH){var aQ=aC(aF);var aK=L(aF).innerWidth();var aL=L(aF).innerHeight();var aN=aS.split(/\s+/);var aR=aN.length;var aP="";var aM=[];var aU=aO;var aT=aG;for(var aJ=0;aJaK){aM.push(aJ);aP="";aJ--}}if(aM.length===0){if(L(aF).css("textAlign")==="center"){aT=aG+(aH-aE.measureText(aP).width)/2-au}aE.fillText(aS,aT,aO)}else{aP=aN.slice(0,aM[0]).join(" ");if(L(aF).css("textAlign")==="center"){aT=aG+(aH-aE.measureText(aP).width)/2-au}aE.fillText(aP,aT,aU);aU+=aQ;for(var aJ=1,aI=aM.length;aJ0){ak.strokeRect(aI,aL,L(aG).innerWidth(),L(aG).innerHeight())}L(aG).find("div.jqplot-table-legend-swatch-outline").each(function(){var aU=L(this);ak.strokeStyle=aU.css("border-top-color");var aQ=aI+aU.position().left;var aR=aL+aU.position().top;ak.strokeRect(aQ,aR,aU.innerWidth(),aU.innerHeight());aQ+=parseInt(aU.css("padding-left"),10);aR+=parseInt(aU.css("padding-top"),10);var aT=aU.innerHeight()-2*parseInt(aU.css("padding-top"),10);var aP=aU.innerWidth()-2*parseInt(aU.css("padding-left"),10);var aS=aU.children("div.jqplot-table-legend-swatch");ak.fillStyle=aS.css("background-color");ak.fillRect(aQ,aR,aP,aT)});L(aG).find("td.jqplot-table-legend-label").each(function(){var aR=L(this);var aP=aI+aR.position().left;var aQ=aL+aR.position().top+parseInt(aR.css("padding-top"),10);ak.font=aR.jqplotGetComputedFontStyle();ak.fillStyle=aR.css("color");aD(aR,ak,aR.text(),aP,aQ,aM)});var aH=null}else{if(aN=="canvas"){ak.drawImage(aG,aI,aL)}}}}L(this).children().each(function(){aw(this,av,ax)});return an};L.fn.jqplotToImageStr=function(ai){var ah=L(this).jqplotToImageCanvas(ai);if(ah){return ah.toDataURL("image/png")}else{return null}};L.fn.jqplotToImageElem=function(ah){var ai=document.createElement("img");var aj=L(this).jqplotToImageStr(ah);ai.src=aj;return ai};L.fn.jqplotToImageElemStr=function(ah){var ai="";return ai};L.fn.jqplotSaveImage=function(){var ah=L(this).jqplotToImageStr({});if(ah){window.location.href=ah.replace("image/png","image/octet-stream")}};L.fn.jqplotViewImage=function(){var ai=L(this).jqplotToImageElemStr({});var aj=L(this).jqplotToImageStr({});if(ai){var ah=window.open("");ah.document.open("image/png");ah.document.write(ai);ah.document.close();ah=null}};var ag=function(){this.syntax=ag.config.syntax;this._type="jsDate";this.proxy=new Date();this.options={};this.locale=ag.regional.getLocale();this.formatString="";this.defaultCentury=ag.config.defaultCentury;switch(arguments.length){case 0:break;case 1:if(l(arguments[0])=="[object Object]"&&arguments[0]._type!="jsDate"){var aj=this.options=arguments[0];this.syntax=aj.syntax||this.syntax;this.defaultCentury=aj.defaultCentury||this.defaultCentury;this.proxy=ag.createDate(aj.date)}else{this.proxy=ag.createDate(arguments[0])}break;default:var ah=[];for(var ai=0;ai0?"floor":"ceil"](ak))};ag.prototype.getAbbrDayName=function(){return ag.regional[this.locale]["dayNamesShort"][this.proxy.getDay()]};ag.prototype.getAbbrMonthName=function(){return ag.regional[this.locale]["monthNamesShort"][this.proxy.getMonth()]};ag.prototype.getAMPM=function(){return this.proxy.getHours()>=12?"PM":"AM"};ag.prototype.getAmPm=function(){return this.proxy.getHours()>=12?"pm":"am"};ag.prototype.getCentury=function(){return parseInt(this.proxy.getFullYear()/100,10)};ag.prototype.getDate=function(){return this.proxy.getDate()};ag.prototype.getDay=function(){return this.proxy.getDay()};ag.prototype.getDayOfWeek=function(){var ah=this.proxy.getDay();return ah===0?7:ah};ag.prototype.getDayOfYear=function(){var ai=this.proxy;var ah=ai-new Date(""+ai.getFullYear()+"/1/1 GMT");ah+=ai.getTimezoneOffset()*60000;ai=null;return parseInt(ah/60000/60/24,10)+1};ag.prototype.getDayName=function(){return ag.regional[this.locale]["dayNames"][this.proxy.getDay()]};ag.prototype.getFullWeekOfYear=function(){var ak=this.proxy;var ah=this.getDayOfYear();var aj=6-ak.getDay();var ai=parseInt((ah+aj)/7,10);return ai};ag.prototype.getFullYear=function(){return this.proxy.getFullYear()};ag.prototype.getGmtOffset=function(){var ah=this.proxy.getTimezoneOffset()/60;var ai=ah<0?"+":"-";ah=Math.abs(ah);return ai+N(Math.floor(ah),2)+":"+N((ah%1)*60,2)};ag.prototype.getHours=function(){return this.proxy.getHours()};ag.prototype.getHours12=function(){var ah=this.proxy.getHours();return ah>12?ah-12:(ah==0?12:ah)};ag.prototype.getIsoWeek=function(){var ak=this.proxy;var aj=this.getWeekOfYear();var ah=(new Date(""+ak.getFullYear()+"/1/1")).getDay();var ai=aj+(ah>4||ah<=1?0:1);if(ai==53&&(new Date(""+ak.getFullYear()+"/12/31")).getDay()<4){ai=1}else{if(ai===0){ak=new ag(new Date(""+(ak.getFullYear()-1)+"/12/31"));ai=ak.getIsoWeek()}}ak=null;return ai};ag.prototype.getMilliseconds=function(){return this.proxy.getMilliseconds()};ag.prototype.getMinutes=function(){return this.proxy.getMinutes()};ag.prototype.getMonth=function(){return this.proxy.getMonth()};ag.prototype.getMonthName=function(){return ag.regional[this.locale]["monthNames"][this.proxy.getMonth()]};ag.prototype.getMonthNumber=function(){return this.proxy.getMonth()+1};ag.prototype.getSeconds=function(){return this.proxy.getSeconds()};ag.prototype.getShortYear=function(){return this.proxy.getYear()%100};ag.prototype.getTime=function(){return this.proxy.getTime()};ag.prototype.getTimezoneAbbr=function(){return this.proxy.toString().replace(/^.*\(([^)]+)\)$/,"$1")};ag.prototype.getTimezoneName=function(){var ah=/(?:\((.+)\)$| ([A-Z]{3}) )/.exec(this.toString());return ah[1]||ah[2]||"GMT"+this.getGmtOffset()};ag.prototype.getTimezoneOffset=function(){return this.proxy.getTimezoneOffset()};ag.prototype.getWeekOfYear=function(){var ah=this.getDayOfYear();var aj=7-this.getDayOfWeek();var ai=parseInt((ah+aj)/7,10);return ai};ag.prototype.getUnix=function(){return Math.round(this.proxy.getTime()/1000,0)};ag.prototype.getYear=function(){return this.proxy.getYear()};ag.prototype.next=function(ah){ah=ah||"day";return this.clone().add(1,ah)};ag.prototype.set=function(){switch(arguments.length){case 0:this.proxy=new Date();break;case 1:if(l(arguments[0])=="[object Object]"&&arguments[0]._type!="jsDate"){var aj=this.options=arguments[0];this.syntax=aj.syntax||this.syntax;this.defaultCentury=aj.defaultCentury||this.defaultCentury;this.proxy=ag.createDate(aj.date)}else{this.proxy=ag.createDate(arguments[0])}break;default:var ah=[];for(var ai=0;ai0?"floor":"ceil"](ah/12));var ai=aj.getMonth()+(ah%12);if(ai==12){ai=0;aj.setYear(aj.getFullYear()+1)}else{if(ai==-1){ai=11;aj.setYear(aj.getFullYear()-1)}}aj.setMonth(ai)},diff:function(al,aj){var ah=al.getFullYear()-aj.getFullYear();var ai=al.getMonth()-aj.getMonth()+(ah*12);var ak=al.getDate()-aj.getDate();return ai+(ak/30)}},year:{add:function(ai,ah){ai.setYear(ai.getFullYear()+Math[ah>0?"floor":"ceil"](ah))},diff:function(ai,ah){return E.month.diff(ai,ah)/12}}};for(var Y in E){if(Y.substring(Y.length-1)!="s"){E[Y+"s"]=E[Y]}}var H=function(al,ak,ai){if(ag.formats[ai]["shortcuts"][ak]){return ag.strftime(al,ag.formats[ai]["shortcuts"][ak],ai)}else{var ah=(ag.formats[ai]["codes"][ak]||"").split(".");var aj=al["get"+ah[0]]?al["get"+ah[0]]():"";if(ah[1]){aj=N(aj,ah[1])}return aj}};ag.strftime=function(an,ak,aj,ao){var ai="perl";var am=ag.regional.getLocale();if(aj&&ag.formats.hasOwnProperty(aj)){ai=aj}else{if(aj&&ag.regional.hasOwnProperty(aj)){am=aj}}if(ao&&ag.formats.hasOwnProperty(ao)){ai=ao}else{if(ao&&ag.regional.hasOwnProperty(ao)){am=ao}}if(l(an)!="[object Object]"||an._type!="jsDate"){an=new ag(an);an.locale=am}if(!ak){ak=an.formatString||ag.regional[am]["formatString"]}var ah=ak||"%Y-%m-%d",ap="",al;while(ah.length>0){if(al=ah.match(ag.formats[ai].codes.matcher)){ap+=ah.slice(0,al.index);ap+=(al[1]||"")+H(an,al[2],ai);ah=ah.slice(al.index+al[0].length)}else{ap+=ah;ah=""}}return ap};ag.formats={ISO:"%Y-%m-%dT%H:%M:%S.%N%G",SQL:"%Y-%m-%d %H:%M:%S"};ag.formats.perl={codes:{matcher:/()%(#?(%|[a-z]))/i,Y:"FullYear",y:"ShortYear.2",m:"MonthNumber.2","#m":"MonthNumber",B:"MonthName",b:"AbbrMonthName",d:"Date.2","#d":"Date",e:"Date",A:"DayName",a:"AbbrDayName",w:"Day",H:"Hours.2","#H":"Hours",I:"Hours12.2","#I":"Hours12",p:"AMPM",M:"Minutes.2","#M":"Minutes",S:"Seconds.2","#S":"Seconds",s:"Unix",N:"Milliseconds.3","#N":"Milliseconds",O:"TimezoneOffset",Z:"TimezoneName",G:"GmtOffset"},shortcuts:{F:"%Y-%m-%d",T:"%H:%M:%S",X:"%H:%M:%S",x:"%m/%d/%y",D:"%m/%d/%y","#c":"%a %b %e %H:%M:%S %Y",v:"%e-%b-%Y",R:"%H:%M",r:"%I:%M:%S %p",t:"\t",n:"\n","%":"%"}};ag.formats.php={codes:{matcher:/()%((%|[a-z]))/i,a:"AbbrDayName",A:"DayName",d:"Date.2",e:"Date",j:"DayOfYear.3",u:"DayOfWeek",w:"Day",U:"FullWeekOfYear.2",V:"IsoWeek.2",W:"WeekOfYear.2",b:"AbbrMonthName",B:"MonthName",m:"MonthNumber.2",h:"AbbrMonthName",C:"Century.2",y:"ShortYear.2",Y:"FullYear",H:"Hours.2",I:"Hours12.2",l:"Hours12",p:"AMPM",P:"AmPm",M:"Minutes.2",S:"Seconds.2",s:"Unix",O:"TimezoneOffset",z:"GmtOffset",Z:"TimezoneAbbr"},shortcuts:{D:"%m/%d/%y",F:"%Y-%m-%d",T:"%H:%M:%S",X:"%H:%M:%S",x:"%m/%d/%y",R:"%H:%M",r:"%I:%M:%S %p",t:"\t",n:"\n","%":"%"}};ag.createDate=function(aj){if(aj==null){return new Date()}if(aj instanceof Date){return aj}if(typeof aj=="number"){return new Date(aj)}var ao=String(aj).replace(/^\s*(.+)\s*$/g,"$1");ao=ao.replace(/^([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,4})/,"$1/$2/$3");ao=ao.replace(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{4})/i,"$1 $2 $3");var an=ao.match(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{2})\D*/i);if(an&&an.length>3){var at=parseFloat(an[3]);var am=ag.config.defaultCentury+at;am=String(am);ao=ao.replace(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{2})\D*/i,an[1]+" "+an[2]+" "+am)}an=ao.match(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})[^0-9]/);function ar(ax,aw){var aC=parseFloat(aw[1]);var aB=parseFloat(aw[2]);var aA=parseFloat(aw[3]);var az=ag.config.defaultCentury;var av,au,aD,ay;if(aC>31){au=aA;aD=aB;av=az+aC}else{au=aB;aD=aC;av=az+aA}ay=aD+"/"+au+"/"+av;return ax.replace(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})/,ay)}if(an&&an.length>3){ao=ar(ao,an)}var an=ao.match(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})$/);if(an&&an.length>3){ao=ar(ao,an)}var al=0;var ai=ag.matchers.length;var aq,ah,ap=ao,ak;while(al31){ah=an;ai=am+ao}else{ah=ao;ai=am+an}var ap=ab(aj[2],ag.regional[ag.regional.getLocale()]["monthNamesShort"]);if(ap==-1){ap=ab(aj[2],ag.regional[ag.regional.getLocale()]["monthNames"])}ak.setFullYear(ai,ap,ah);ak.setHours(0,0,0,0);return ak}else{return al}}];function ab(aj,ak){if(ak.indexOf){return ak.indexOf(aj)}for(var ah=0,ai=ak.length;ah=ap)?"":Array(1+ap-au.length>>>0).join(aq);return at?au+ar:ar+au}function ak(ar){var aq=new String(ar);for(var ap=10;ap>0;ap--){if(aq==(aq=aq.replace(/^(\d+)(\d{3})/,"$1"+L.jqplot.sprintf.thousandsSeparator+"$2"))){break}}return aq}function aj(av,au,ax,ar,at,aq){var aw=ar-av.length;if(aw>0){var ap=" ";if(aq){ap=" "}if(ax||!at){av=an(av,ar,ap,ax)}else{av=av.slice(0,au.length)+an("",aw,"0",true)+av.slice(au.length)}}return av}function ao(ay,aq,aw,ar,ap,av,ax,au){var at=ay>>>0;aw=aw&&at&&{"2":"0b","8":"0","16":"0x"}[aq]||"";ay=aw+an(at.toString(aq),av||0,"0",false);return aj(ay,aw,ar,ap,ax,au)}function ah(au,av,ar,ap,at,aq){if(ap!=null){au=au.slice(0,ap)}return aj(au,"",av,ar,at,aq)}var ai=arguments,al=0,am=ai[al++];return am.replace(L.jqplot.sprintf.regex,function(aM,ax,ay,aB,aO,aJ,av){if(aM=="%%"){return"%"}var aD=false,az="",aA=false,aL=false,aw=false,au=false;for(var aI=0;ay&&aI-1?6:(av=="d")?0:void (0)}else{if(aJ=="*"){aJ=+ai[al++]}else{if(aJ.charAt(0)=="*"){aJ=+ai[aJ.slice(1,-1)]}else{aJ=+aJ}}}var aF=ax?ai[ax.slice(0,-1)]:ai[al++];switch(av){case"s":if(aF==null){return""}return ah(String(aF),aD,aB,aJ,aA,aw);case"c":return ah(String.fromCharCode(+aF),aD,aB,aJ,aA,aw);case"b":return ao(aF,2,aL,aD,aB,aJ,aA,aw);case"o":return ao(aF,8,aL,aD,aB,aJ,aA,aw);case"x":return ao(aF,16,aL,aD,aB,aJ,aA,aw);case"X":return ao(aF,16,aL,aD,aB,aJ,aA,aw).toUpperCase();case"u":return ao(aF,10,aL,aD,aB,aJ,aA,aw);case"i":var ar=parseInt(+aF,10);if(isNaN(ar)){return""}var aH=ar<0?"-":az;var aK=au?ak(String(Math.abs(ar))):String(Math.abs(ar));aF=aH+an(aK,aJ,"0",false);return aj(aF,aH,aD,aB,aA,aw);case"d":var ar=Math.round(+aF);if(isNaN(ar)){return""}var aH=ar<0?"-":az;var aK=au?ak(String(Math.abs(ar))):String(Math.abs(ar));aF=aH+an(aK,aJ,"0",false);return aj(aF,aH,aD,aB,aA,aw);case"e":case"E":case"f":case"F":case"g":case"G":var ar=+aF;if(isNaN(ar)){return""}var aH=ar<0?"-":az;var at=["toExponential","toFixed","toPrecision"]["efg".indexOf(av.toLowerCase())];var aN=["toString","toUpperCase"]["eEfFgG".indexOf(av)%2];var aK=Math.abs(ar)[at](aJ);var aE=aK.toString().split(".");aE[0]=au?ak(aE[0]):aE[0];aK=aE.join(L.jqplot.sprintf.decimalMark);aF=aH+aK;var aC=aj(aF,aH,aD,aB,aA,aw)[aN]();return aC;case"p":case"P":var ar=+aF;if(isNaN(ar)){return""}var aH=ar<0?"-":az;var aE=String(Number(Math.abs(ar)).toExponential()).split(/e|E/);var aq=(aE[0].indexOf(".")!=-1)?aE[0].length-1:String(ar).length;var aG=(aE[1]<0)?-aE[1]-1:0;if(Math.abs(ar)<1){if(aq+aG<=aJ){aF=aH+Math.abs(ar).toPrecision(aq)}else{if(aq<=aJ-1){aF=aH+Math.abs(ar).toExponential(aq-1)}else{aF=aH+Math.abs(ar).toExponential(aJ-1)}}}else{var ap=(aq<=aJ)?aq:aJ;aF=aH+Math.abs(ar).toPrecision(ap)}var aN=["toString","toUpperCase"]["pP".indexOf(av)%2];return aj(aF,aH,aD,aB,aA,aw)[aN]();case"n":return"";default:return aM}})};L.jqplot.sprintf.thousandsSeparator=",";L.jqplot.sprintf.decimalMark=".";L.jqplot.sprintf.regex=/%%|%(\d+\$)?([-+#0&\' ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([nAscboxXuidfegpEGP])/g;L.jqplot.getSignificantFigures=function(al){var an=String(Number(Math.abs(al)).toExponential()).split(/e|E/);var am=(an[0].indexOf(".")!=-1)?an[0].length-1:an[0].length;var ai=(an[1]<0)?-an[1]-1:0;var ah=parseInt(an[1],10);var aj=(ah+1>0)?ah+1:0;var ak=(am<=aj)?0:am-ah-1;return{significantDigits:am,digitsLeft:aj,digitsRight:ak,zeros:ai,exponent:ah}};L.jqplot.getPrecision=function(ah){return L.jqplot.getSignificantFigures(ah).digitsRight};var X=L.uiBackCompat!==false;L.jqplot.effects={effect:{}};var m="jqplot.storage.";L.extend(L.jqplot.effects,{version:"1.9pre",save:function(ai,aj){for(var ah=0;ah").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),ah={width:ai.width(),height:ai.height()},ak=document.activeElement;ai.wrap(al);if(ai[0]===ak||L.contains(ai[0],ak)){L(ak).focus()}al=ai.parent();if(ai.css("position")==="static"){al.css({position:"relative"});ai.css({position:"relative"})}else{L.extend(aj,{position:ai.css("position"),zIndex:ai.css("z-index")});L.each(["top","left","bottom","right"],function(am,an){aj[an]=ai.css(an);if(isNaN(parseInt(aj[an],10))){aj[an]="auto"}});ai.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}ai.css(ah);return al.css(aj).show()},removeWrapper:function(ah){var ai=document.activeElement;if(ah.parent().is(".ui-effects-wrapper")){ah.parent().replaceWith(ah);if(ah[0]===ai||L.contains(ah[0],ai)){L(ai).focus()}}return ah}});function j(ai,ah,aj,ak){if(L.isPlainObject(ai)){return ai}ai={effect:ai};if(ah===u){ah={}}if(L.isFunction(ah)){ak=ah;aj=null;ah={}}if(L.type(ah)==="number"||L.fx.speeds[ah]){ak=aj;aj=ah;ah={}}if(L.isFunction(aj)){ak=aj;aj=null}if(ah){L.extend(ai,ah)}aj=aj||ah.duration;ai.duration=L.fx.off?0:typeof aj==="number"?aj:aj in L.fx.speeds?L.fx.speeds[aj]:L.fx.speeds._default;ai.complete=ak||ah.complete;return ai}function ae(ah){if(!ah||typeof ah==="number"||L.fx.speeds[ah]){return true}if(typeof ah==="string"&&!L.jqplot.effects.effect[ah]){if(X&&L.jqplot.effects[ah]){return false}return true}return false}L.fn.extend({jqplotEffect:function(ap,aq,ai,ao){var an=j.apply(this,arguments),ak=an.mode,al=an.queue,am=L.jqplot.effects.effect[an.effect],ah=!am&&X&&L.jqplot.effects[an.effect];if(L.fx.off||!(am||ah)){if(ak){return this[ak](an.duration,an.complete)}else{return this.each(function(){if(an.complete){an.complete.call(this)}})}}function aj(au){var av=L(this),at=an.complete,aw=an.mode;function ar(){if(L.isFunction(at)){at.call(av[0])}if(L.isFunction(au)){au()}}if(av.is(":hidden")?aw==="hide":aw==="show"){ar()}else{am.call(av[0],an,ar)}}if(am){return al===false?this.each(aj):this.queue(al||"fx",aj)}else{return ah.call(this,{options:an,duration:an.duration,callback:an.complete,mode:an.mode})}}});var a=/up|down|vertical/,v=/up|left|vertical|horizontal/;L.jqplot.effects.effect.blind=function(aj,ao){var ak=L(this),ar=["position","top","bottom","left","right","height","width"],ap=L.jqplot.effects.setMode(ak,aj.mode||"hide"),au=aj.direction||"up",am=a.test(au),al=am?"height":"width",aq=am?"top":"left",aw=v.test(au),an={},av=ap==="show",ai,ah,at;if(ak.parent().is(".ui-effects-wrapper")){L.jqplot.effects.save(ak.parent(),ar)}else{L.jqplot.effects.save(ak,ar)}ak.show();at=parseInt(ak.css("top"),10);ai=L.jqplot.effects.createWrapper(ak).css({overflow:"hidden"});ah=am?ai[al]()+at:ai[al]();an[al]=av?String(ah):"0";if(!aw){ak.css(am?"bottom":"right",0).css(am?"top":"left","").css({position:"absolute"});an[aq]=av?"0":String(ah)}if(av){ai.css(al,0);if(!aw){ai.css(aq,ah)}}ai.animate(an,{duration:aj.duration,easing:aj.easing,queue:false,complete:function(){if(ap==="hide"){ak.hide()}L.jqplot.effects.restore(ak,ar);L.jqplot.effects.removeWrapper(ak);ao()}})}})(jQuery); \ No newline at end of file diff --git a/wp-content/plugins/wp-piwik/js/jqplot/plugins/jqplot.pieRenderer.min.js b/wp-content/plugins/wp-piwik/js/jqplot/plugins/jqplot.pieRenderer.min.js deleted file mode 100644 index 5f08e61..0000000 --- a/wp-content/plugins/wp-piwik/js/jqplot/plugins/jqplot.pieRenderer.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com - jsDate | (c) 2010-2013 Chris Leonello - */(function(e){e.jqplot.PieRenderer=function(){e.jqplot.LineRenderer.call(this)};e.jqplot.PieRenderer.prototype=new e.jqplot.LineRenderer();e.jqplot.PieRenderer.prototype.constructor=e.jqplot.PieRenderer;e.jqplot.PieRenderer.prototype.init=function(q,u){this.diameter=null;this.padding=20;this.sliceMargin=0;this.fill=true;this.shadowOffset=2;this.shadowAlpha=0.07;this.shadowDepth=5;this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColors=[];this.dataLabels="percent";this.showDataLabels=false;this.dataLabelFormatString=null;this.dataLabelThreshold=3;this.dataLabelPositionFactor=0.52;this.dataLabelNudge=2;this.dataLabelCenterOn=true;this.startAngle=0;this.tickRenderer=e.jqplot.PieTickRenderer;this._drawData=true;this._type="pie";if(q.highlightMouseDown&&q.highlightMouseOver==null){q.highlightMouseOver=false}e.extend(true,this,q);if(this.sliceMargin<0){this.sliceMargin=0}this._diameter=null;this._radius=null;this._sliceAngles=[];this._highlightedPoint=null;if(this.highlightColors.length==0){for(var s=0;s570)?o[p]*0.8:o[p]+0.3*(255-o[p]);o[p]=parseInt(o[p],10)}this.highlightColors.push("rgb("+o[0]+","+o[1]+","+o[2]+")")}}this.highlightColorGenerator=new e.jqplot.ColorGenerator(this.highlightColors);u.postParseOptionsHooks.addOnce(m);u.postInitHooks.addOnce(g);u.eventListenerHooks.addOnce("jqplotMouseMove",b);u.eventListenerHooks.addOnce("jqplotMouseDown",a);u.eventListenerHooks.addOnce("jqplotMouseUp",l);u.eventListenerHooks.addOnce("jqplotClick",f);u.eventListenerHooks.addOnce("jqplotRightClick",n);u.postDrawHooks.addOnce(i)};e.jqplot.PieRenderer.prototype.setGridData=function(t){var p=[];var u=[];var o=this.startAngle/180*Math.PI;var s=0;this._drawData=false;for(var r=0;r0){p[r]+=p[r-1]}s+=this.data[r][1]}var q=Math.PI*2/p[p.length-1];for(var r=0;r0){p[r]+=p[r-1]}s+=t[r][1]}var q=Math.PI*2/p[p.length-1];for(var r=0;r0&&s>0.01&&s<6.282){w=parseFloat(p)/2/h(q)}return w}e.jqplot.PieRenderer.prototype.drawSlice=function(B,z,y,u,w){if(this._drawData){var p=this._radius;var A=this.fill;var x=this.lineWidth;var s=this.sliceMargin;if(this.fill==false){s+=this.lineWidth}B.save();B.translate(this._center[0],this._center[1]);var D=j(z,y,this.sliceMargin,this.fill,this.lineWidth);var o=D*Math.cos((z+y)/2);var C=D*Math.sin((z+y)/2);if((y-z)<=Math.PI){p-=D}else{p+=D}B.translate(o,C);if(w){for(var v=0,t=this.shadowDepth;v6.282+this.startAngle){y=6.282+this.startAngle;if(z>y){z=6.281+this.startAngle}}if(z>=y){return}B.beginPath();B.fillStyle=u;B.strokeStyle=u;B.lineWidth=x;B.arc(0,0,r,z,y,false);B.lineTo(0,0);B.closePath();if(A){B.fill()}else{B.stroke()}}};e.jqplot.PieRenderer.prototype.draw=function(B,z,E,o){var W;var H=(E!=undefined)?E:{};var t=0;var s=0;var N=1;var L=new e.jqplot.ColorGenerator(this.seriesColors);if(E.legendInfo&&E.legendInfo.placement=="insideGrid"){var J=E.legendInfo;switch(J.location){case"nw":t=J.width+J.xoffset;break;case"w":t=J.width+J.xoffset;break;case"sw":t=J.width+J.xoffset;break;case"ne":t=J.width+J.xoffset;N=-1;break;case"e":t=J.width+J.xoffset;N=-1;break;case"se":t=J.width+J.xoffset;N=-1;break;case"n":s=J.height+J.yoffset;break;case"s":s=J.height+J.yoffset;N=-1;break;default:break}}var K=(H.shadow!=undefined)?H.shadow:this.shadow;var A=(H.fill!=undefined)?H.fill:this.fill;var C=B.canvas.width;var I=B.canvas.height;var Q=C-t-2*this.padding;var X=I-s-2*this.padding;var M=Math.min(Q,X);var Y=M;this._sliceAngles=[];var v=this.sliceMargin;if(this.fill==false){v+=this.lineWidth}var q;var G=0;var R,aa,Z,ab;var D=this.startAngle/180*Math.PI;for(var W=0,V=z.length;WMath.PI){G=Math.max(q,G)}}if(this.diameter!=null&&this.diameter>0){this._diameter=this.diameter-2*G}else{this._diameter=Y-2*G}if(this._diameter<6){e.jqplot.log("Diameter of pie too small, not rendering.");return}var S=this._radius=this._diameter/2;this._center=[(C-N*t)/2+N*t+G*Math.cos(D),(I-N*s)/2+N*s+G*Math.sin(D)];if(this.shadow){for(var W=0,V=z.length;W=this.dataLabelThreshold){var F,U=(this._sliceAngles[W][0]+this._sliceAngles[W][1])/2,T;if(this.dataLabels=="label"){F=this.dataLabelFormatString||"%s";T=e.jqplot.sprintf(F,z[W][0])}else{if(this.dataLabels=="value"){F=this.dataLabelFormatString||"%d";T=e.jqplot.sprintf(F,this.data[W][1])}else{if(this.dataLabels=="percent"){F=this.dataLabelFormatString||"%d%%";T=e.jqplot.sprintf(F,z[W][2]*100)}else{if(this.dataLabels.constructor==Array){F=this.dataLabelFormatString||"%s";T=e.jqplot.sprintf(F,this.dataLabels[W])}}}}var p=(this._radius)*this.dataLabelPositionFactor+this.sliceMargin+this.dataLabelNudge;var P=this._center[0]+Math.cos(U)*p+this.canvas._offsets.left;var O=this._center[1]+Math.sin(U)*p+this.canvas._offsets.top;var u=e('
'+T+"
").insertBefore(o.eventCanvas._elem);if(this.dataLabelCenterOn){P-=u.width()/2;O-=u.height()/2}else{P-=u.width()*Math.sin(U/2);O-=u.height()/2}P=Math.round(P);O=Math.round(O);u.css({left:P,top:O})}}};e.jqplot.PieAxisRenderer=function(){e.jqplot.LinearAxisRenderer.call(this)};e.jqplot.PieAxisRenderer.prototype=new e.jqplot.LinearAxisRenderer();e.jqplot.PieAxisRenderer.prototype.constructor=e.jqplot.PieAxisRenderer;e.jqplot.PieAxisRenderer.prototype.init=function(o){this.tickRenderer=e.jqplot.PieTickRenderer;e.extend(true,this,o);this._dataBounds={min:0,max:100};this.min=0;this.max=100;this.showTicks=false;this.ticks=[];this.showMark=false;this.show=false};e.jqplot.PieLegendRenderer=function(){e.jqplot.TableLegendRenderer.call(this)};e.jqplot.PieLegendRenderer.prototype=new e.jqplot.TableLegendRenderer();e.jqplot.PieLegendRenderer.prototype.constructor=e.jqplot.PieLegendRenderer;e.jqplot.PieLegendRenderer.prototype.init=function(o){this.numberRows=null;this.numberColumns=null;e.extend(true,this,o)};e.jqplot.PieLegendRenderer.prototype.draw=function(){var r=this;if(this.show){var B=this._series;this._elem=e(document.createElement("table"));this._elem.addClass("jqplot-table-legend");var E={position:"absolute"};if(this.background){E.background=this.background}if(this.border){E.border=this.border}if(this.fontSize){E.fontSize=this.fontSize}if(this.fontFamily){E.fontFamily=this.fontFamily}if(this.textColor){E.textColor=this.textColor}if(this.marginTop!=null){E.marginTop=this.marginTop}if(this.marginBottom!=null){E.marginBottom=this.marginBottom}if(this.marginLeft!=null){E.marginLeft=this.marginLeft}if(this.marginRight!=null){E.marginRight=this.marginRight}this._elem.css(E);var I=false,A=false,o,y;var C=B[0];var p=new e.jqplot.ColorGenerator(C.seriesColors);if(C.show){var J=C.data;if(this.numberRows){o=this.numberRows;if(!this.numberColumns){y=Math.ceil(J.length/o)}else{y=this.numberColumns}}else{if(this.numberColumns){y=this.numberColumns;o=Math.ceil(J.length/this.numberColumns)}else{o=J.length;y=1}}var H,G;var q,w,v;var x,z,F;var D=0;var u,t;for(H=0;H0){I=true}else{I=false}}else{if(H==o-1){I=false}else{I=true}}z=(I)?this.rowSpacing:"0";w=e(document.createElement("td"));w.addClass("jqplot-table-legend jqplot-table-legend-swatch");w.css({textAlign:"center",paddingTop:z});u=e(document.createElement("div"));u.addClass("jqplot-table-legend-swatch-outline");t=e(document.createElement("div"));t.addClass("jqplot-table-legend-swatch");t.css({backgroundColor:F,borderColor:F});w.append(u.append(t));v=e(document.createElement("td"));v.addClass("jqplot-table-legend jqplot-table-legend-label");v.css("paddingTop",z);if(this.escapeHtml){v.text(x)}else{v.html(x)}if(A){v.prependTo(q);w.prependTo(q)}else{w.appendTo(q);v.appendTo(q)}I=true}D++}}}}return this._elem};e.jqplot.PieRenderer.prototype.handleMove=function(q,p,t,s,r){if(s){var o=[s.seriesIndex,s.pointIndex,s.data];r.target.trigger("jqplotDataMouseOver",o);if(r.series[o[0]].highlightMouseOver&&!(o[0]==r.plugins.pieRenderer.highlightedSeriesIndex&&o[1]==r.series[o[0]]._highlightedPoint)){r.target.trigger("jqplotDataHighlight",o);d(r,o[0],o[1])}}else{if(s==null){k(r)}}};function c(s,r,p){p=p||{};p.axesDefaults=p.axesDefaults||{};p.legend=p.legend||{};p.seriesDefaults=p.seriesDefaults||{};var o=false;if(p.seriesDefaults.renderer==e.jqplot.PieRenderer){o=true}else{if(p.series){for(var q=0;q. - -The project page and downloads are at . - -Below are a few examples to demonstrate jqPlot usage. These plots are shown as static images. -Many more examples of dynamically rendered plots can be seen on the test and examples pages here: <../../tests/>. - -Include the Files: - -jqPlot requires jQuery (1.4+ required for certain features). jQuery is included in the distribution. -To use jqPlot include jquery, the jqPlot jQuery plugin, jqPlot css file and optionally the excanvas -script for IE support in your web page. Note, excanvas is required only for IE versions below 9. IE 9 includes -native support for the canvas element and does not require excanvas: - -> -> -> -> - -Add a plot container: - -Add a container (target) to your web page where you want your plot to show up. -Be sure to give your target a width and a height: - ->
- -Create a plot: - -Then, create the actual plot by calling the -$.jqplot plugin with the id of your target and some data: - -> $.jqplot('chartdiv', [[[1, 2],[3,5.12],[5,13.1],[7,33.6],[9,85.9],[11,219.9]]]); - -Which will produce a -chart like: - -(see images/basicline.png) - -Plot Options: - -You can customize the plot by passing options to the $.jqplot function. Options are described in - in the jqPlotOptions.txt file. An example of options usage: - -> $.jqplot('chartdiv', [[[1, 2],[3,5.12],[5,13.1],[7,33.6],[9,85.9],[11,219.9]]], -> { title:'Exponential Line', -> axes:{yaxis:{min:-10, max:240}}, -> series:[{color:'#5FAB78'}] -> }); - -Which will produce -a plot like: - -(see images/basicoptions.png) - -Using Plugins: - -You can use jqPlot plugins (that is, plugins to the jqPlot plugin) by including them in your html -after you include the jqPlot plugin. Here is how to include the log axis plugin: - -> -> -> -> -> - -Important note: For jqplot builds r529 and above (0.9.7r529 and higher), you must explicitly -enable plugins via either the { show: true } plugin option to the plot or by using -the $.jqplot.config.enablePlugins = true; config options set on the page before plot creation. -Only plugins that can be immediately active upon loading are affected. This includes -non-renderer plugins like cursor, dragable, highlighter, and trendline. - -Here is the same $.jqplot call -but with a log y axis: - -> $.jqplot('chartdiv', [[[1, 2],[3,5.12],[5,13.1],[7,33.6],[9,85.9],[11,219.9]]], -> { title:'Exponential Line', -> axes:{yaxis:{renderer: $.jqplot.LogAxisRenderer}}, -> series:[{color:'#5FAB78'}] -> }); - -Which produces -a plot like: - -(see images/basiclogaxis.png) - -You can further customize with options specific -to the log axis plugin: - -> $.jqplot('chartdiv', [[[1, 2],[3,5.12],[5,13.1],[7,33.6],[9,85.9],[11,219.9]]], -> { title:'Exponential Line', -> axes:{yaxis:{renderer: $.jqplot.LogAxisRenderer, tickDistribution:'power'}}, -> series:[{color:'#5FAB78'}] -> }); - -Which makes a -plot like: - -(see images/basiclogoptions.png) - -For a full list of options, see in the jqPlotOptions.txt file. - -You can add as many plugins as you wish. Order is generally not important. -Some plugins, like the highlighter plugin which highlights data points near the -mouse, don't need any extra options or setup to function. Highlighter does have -additional options which the user can set. - -Other plugins, the barRenderer for example, provide functionality that must be specified -in the chart options object. To render a series as a bar graph with the bar renderer, -you would first include the plugin after jqPlot: - -> - -Then you would create -a chart like: - -> $.jqplot('chartdiv', [[34.53, 56.32, 25.1, 18.6]], {series:[{renderer:$.jqplot.BarRenderer}]}); - -Here the default LineRenderer is replaced by a BarRenderer to generate a bar graph for the first (and only) series. diff --git a/wp-content/plugins/wp-piwik/js/jqplot/wp-piwik.jqplot.js b/wp-content/plugins/wp-piwik/js/jqplot/wp-piwik.jqplot.js deleted file mode 100644 index 687347a..0000000 --- a/wp-content/plugins/wp-piwik/js/jqplot/wp-piwik.jqplot.js +++ /dev/null @@ -1,10 +0,0 @@ -/* Files combined for WP-Piwik. Get jqPlot at http://www.jqplot.com/ */ -/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com - jsDate | (c) 2010-2013 Chris Leonello -*/(function(L){var u;L.fn.emptyForce=function(){for(var ah=0,ai;(ai=L(this)[ah])!=null;ah++){if(ai.nodeType===1){L.cleanData(ai.getElementsByTagName("*"))}if(L.jqplot.use_excanvas){ai.outerHTML=""}else{while(ai.firstChild){ai.removeChild(ai.firstChild)}}ai=null}return L(this)};L.fn.removeChildForce=function(ah){while(ah.firstChild){this.removeChildForce(ah.firstChild);ah.removeChild(ah.firstChild)}};L.fn.jqplot=function(){var ah=[];var aj=[];for(var ak=0,ai=arguments.length;ak'+ao+"");L("#"+an).addClass("jqplot-error");document.getElementById(an).style.background=L.jqplot.config.errorBackground;document.getElementById(an).style.border=L.jqplot.config.errorBorder;document.getElementById(an).style.fontFamily=L.jqplot.config.errorFontFamily;document.getElementById(an).style.fontSize=L.jqplot.config.errorFontSize;document.getElementById(an).style.fontStyle=L.jqplot.config.errorFontStyle;document.getElementById(an).style.fontWeight=L.jqplot.config.errorFontWeight}}else{am.init(an,aj,ah);am.draw();am.themeEngine.init.call(am);return am}};L.jqplot.version="1.0.8";L.jqplot.revision="1250";L.jqplot.targetCounter=1;L.jqplot.CanvasManager=function(){if(typeof L.jqplot.CanvasManager.canvases=="undefined"){L.jqplot.CanvasManager.canvases=[];L.jqplot.CanvasManager.free=[]}var ah=[];this.getCanvas=function(){var ak;var aj=true;if(!L.jqplot.use_excanvas){for(var al=0,ai=L.jqplot.CanvasManager.canvases.length;al887){L.jqplot.support_canvas_text.result=true}else{L.jqplot.support_canvas_text.result=!!(document.createElement("canvas").getContext&&typeof document.createElement("canvas").getContext("2d").fillText=="function")}}return L.jqplot.support_canvas_text.result};L.jqplot.use_excanvas=false;L.jqplot.preInitHooks=[];L.jqplot.postInitHooks=[];L.jqplot.preParseOptionsHooks=[];L.jqplot.postParseOptionsHooks=[];L.jqplot.preDrawHooks=[];L.jqplot.postDrawHooks=[];L.jqplot.preDrawSeriesHooks=[];L.jqplot.postDrawSeriesHooks=[];L.jqplot.preDrawLegendHooks=[];L.jqplot.addLegendRowHooks=[];L.jqplot.preSeriesInitHooks=[];L.jqplot.postSeriesInitHooks=[];L.jqplot.preParseSeriesOptionsHooks=[];L.jqplot.postParseSeriesOptionsHooks=[];L.jqplot.eventListenerHooks=[];L.jqplot.preDrawSeriesShadowHooks=[];L.jqplot.postDrawSeriesShadowHooks=[];L.jqplot.ElemContainer=function(){this._elem;this._plotWidth;this._plotHeight;this._plotDimensions={height:null,width:null}};L.jqplot.ElemContainer.prototype.createElement=function(ak,am,ai,aj,an){this._offsets=am;var ah=ai||"jqplot";var al=document.createElement(ak);this._elem=L(al);this._elem.addClass(ah);this._elem.css(aj);this._elem.attr(an);al=null;return this._elem};L.jqplot.ElemContainer.prototype.getWidth=function(){if(this._elem){return this._elem.outerWidth(true)}else{return null}};L.jqplot.ElemContainer.prototype.getHeight=function(){if(this._elem){return this._elem.outerHeight(true)}else{return null}};L.jqplot.ElemContainer.prototype.getPosition=function(){if(this._elem){return this._elem.position()}else{return{top:null,left:null,bottom:null,right:null}}};L.jqplot.ElemContainer.prototype.getTop=function(){return this.getPosition().top};L.jqplot.ElemContainer.prototype.getLeft=function(){return this.getPosition().left};L.jqplot.ElemContainer.prototype.getBottom=function(){return this._elem.css("bottom")};L.jqplot.ElemContainer.prototype.getRight=function(){return this._elem.css("right")};function w(ah){L.jqplot.ElemContainer.call(this);this.name=ah;this._series=[];this.show=false;this.tickRenderer=L.jqplot.AxisTickRenderer;this.tickOptions={};this.labelRenderer=L.jqplot.AxisLabelRenderer;this.labelOptions={};this.label=null;this.showLabel=true;this.min=null;this.max=null;this.autoscale=false;this.pad=1.2;this.padMax=null;this.padMin=null;this.ticks=[];this.numberTicks;this.tickInterval;this.renderer=L.jqplot.LinearAxisRenderer;this.rendererOptions={};this.showTicks=true;this.showTickMarks=true;this.showMinorTicks=true;this.drawMajorGridlines=true;this.drawMinorGridlines=false;this.drawMajorTickMarks=true;this.drawMinorTickMarks=true;this.useSeriesColor=false;this.borderWidth=null;this.borderColor=null;this.scaleToHiddenSeries=false;this._dataBounds={min:null,max:null};this._intervalStats=[];this._offsets={min:null,max:null};this._ticks=[];this._label=null;this.syncTicks=null;this.tickSpacing=75;this._min=null;this._max=null;this._tickInterval=null;this._numberTicks=null;this.__ticks=null;this._options={}}w.prototype=new L.jqplot.ElemContainer();w.prototype.constructor=w;w.prototype.init=function(){if(L.isFunction(this.renderer)){this.renderer=new this.renderer()}this.tickOptions.axis=this.name;if(this.tickOptions.showMark==null){this.tickOptions.showMark=this.showTicks}if(this.tickOptions.showMark==null){this.tickOptions.showMark=this.showTickMarks}if(this.tickOptions.showLabel==null){this.tickOptions.showLabel=this.showTicks}if(this.label==null||this.label==""){this.showLabel=false}else{this.labelOptions.label=this.label}if(this.showLabel==false){this.labelOptions.show=false}if(this.pad==0){this.pad=1}if(this.padMax==0){this.padMax=1}if(this.padMin==0){this.padMin=1}if(this.padMax==null){this.padMax=(this.pad-1)/2+1}if(this.padMin==null){this.padMin=(this.pad-1)/2+1}this.pad=this.padMax+this.padMin-1;if(this.min!=null||this.max!=null){this.autoscale=false}if(this.syncTicks==null&&this.name.indexOf("y")>-1){this.syncTicks=true}else{if(this.syncTicks==null){this.syncTicks=false}}this.renderer.init.call(this,this.rendererOptions)};w.prototype.draw=function(ah,ai){if(this.__ticks){this.__ticks=null}return this.renderer.draw.call(this,ah,ai)};w.prototype.set=function(){this.renderer.set.call(this)};w.prototype.pack=function(ai,ah){if(this.show){this.renderer.pack.call(this,ai,ah)}if(this._min==null){this._min=this.min;this._max=this.max;this._tickInterval=this.tickInterval;this._numberTicks=this.numberTicks;this.__ticks=this._ticks}};w.prototype.reset=function(){this.renderer.reset.call(this)};w.prototype.resetScale=function(ah){L.extend(true,this,{min:null,max:null,numberTicks:null,tickInterval:null,_ticks:[],ticks:[]},ah);this.resetDataBounds()};w.prototype.resetDataBounds=function(){var ao=this._dataBounds;ao.min=null;ao.max=null;var ai,ap,am;var aj=(this.show)?true:false;for(var al=0;alao.max)||ao.max==null){ao.max=am[ak][0]}}else{if((am[ak][ah]!=null&&am[ak][ah]ao.max)||ao.max==null){ao.max=am[ak][an]}}}if(aj&&ap.renderer.constructor!==L.jqplot.BarRenderer){aj=false}else{if(aj&&this._options.hasOwnProperty("forceTickAt0")&&this._options.forceTickAt0==false){aj=false}else{if(aj&&ap.renderer.constructor===L.jqplot.BarRenderer){if(ap.barDirection=="vertical"&&this.name!="xaxis"&&this.name!="x2axis"){if(this._options.pad!=null||this._options.padMin!=null){aj=false}}else{if(ap.barDirection=="horizontal"&&(this.name=="xaxis"||this.name=="x2axis")){if(this._options.pad!=null||this._options.padMin!=null){aj=false}}}}}}}}if(aj&&this.renderer.constructor===L.jqplot.LinearAxisRenderer&&ao.min>=0){this.padMin=1;this.forceTickAt0=true}};function q(ah){L.jqplot.ElemContainer.call(this);this.show=false;this.location="ne";this.labels=[];this.showLabels=true;this.showSwatches=true;this.placement="insideGrid";this.xoffset=0;this.yoffset=0;this.border;this.background;this.textColor;this.fontFamily;this.fontSize;this.rowSpacing="0.5em";this.renderer=L.jqplot.TableLegendRenderer;this.rendererOptions={};this.preDraw=false;this.marginTop=null;this.marginRight=null;this.marginBottom=null;this.marginLeft=null;this.escapeHtml=false;this._series=[];L.extend(true,this,ah)}q.prototype=new L.jqplot.ElemContainer();q.prototype.constructor=q;q.prototype.setOptions=function(ah){L.extend(true,this,ah);if(this.placement=="inside"){this.placement="insideGrid"}if(this.xoffset>0){if(this.placement=="insideGrid"){switch(this.location){case"nw":case"w":case"sw":if(this.marginLeft==null){this.marginLeft=this.xoffset+"px"}this.marginRight="0px";break;case"ne":case"e":case"se":default:if(this.marginRight==null){this.marginRight=this.xoffset+"px"}this.marginLeft="0px";break}}else{if(this.placement=="outside"){switch(this.location){case"nw":case"w":case"sw":if(this.marginRight==null){this.marginRight=this.xoffset+"px"}this.marginLeft="0px";break;case"ne":case"e":case"se":default:if(this.marginLeft==null){this.marginLeft=this.xoffset+"px"}this.marginRight="0px";break}}}this.xoffset=0}if(this.yoffset>0){if(this.placement=="outside"){switch(this.location){case"sw":case"s":case"se":if(this.marginTop==null){this.marginTop=this.yoffset+"px"}this.marginBottom="0px";break;case"ne":case"n":case"nw":default:if(this.marginBottom==null){this.marginBottom=this.yoffset+"px"}this.marginTop="0px";break}}else{if(this.placement=="insideGrid"){switch(this.location){case"sw":case"s":case"se":if(this.marginBottom==null){this.marginBottom=this.yoffset+"px"}this.marginTop="0px";break;case"ne":case"n":case"nw":default:if(this.marginTop==null){this.marginTop=this.yoffset+"px"}this.marginBottom="0px";break}}}this.yoffset=0}};q.prototype.init=function(){if(L.isFunction(this.renderer)){this.renderer=new this.renderer()}this.renderer.init.call(this,this.rendererOptions)};q.prototype.draw=function(ai,aj){for(var ah=0;ah');this.target.append(az);az.height(aD);az.width(aA);az.css("top",this.eventCanvas._offsets.top);az.css("left",this.eventCanvas._offsets.left);var aC=L('
');az.append(aC);aC.html(this.noDataIndicator.indicator);var aB=aC.height();var ax=aC.width();aC.height(aB);aC.width(ax);aC.css("top",(aD-aB)/2+"px")})}}this.data=L.extend(true,[],ar);this.parseOptions(ay);if(this.textColor){this.target.css("color",this.textColor)}if(this.fontFamily){this.target.css("font-family",this.fontFamily)}if(this.fontSize){this.target.css("font-size",this.fontSize)}this.title.init();this.legend.init();this._sumy=0;this._sumx=0;this.computePlotData();for(var at=0;at0){for(var aq=au;aq--;){var an=this._plotData[aq][ap][av];if(aw*an>=0){this._plotData[au][ap][av]+=an;this._stackData[au][ap][av]+=an;break}}}}}else{for(var ar=0;ar0){at._prevPlotData=this.series[au-1]._plotData}at._sumy=0;at._sumx=0;for(ar=at.data.length-1;ar>-1;ar--){at._sumy+=at.data[ar][1];at._sumx+=at.data[ar][0]}}};this.populatePlotData=function(au,av){this._plotData=[];this._stackData=[];au._stackData=[];au._plotData=[];var ay={x:[],y:[]};if(this.stackSeries&&!au.disableStack){au._stack=true;var ax=(au._stackAxis==="x")?0:1;var az=L.extend(true,[],au.data);var aA=L.extend(true,[],au.data);var an,am,ao,aw,al;for(var ar=0;ar=0){aA[aq][ax]+=aw}}}for(var at=0;at0){au._prevPlotData=this.series[av-1]._plotData}au._sumy=0;au._sumx=0;for(at=au.data.length-1;at>-1;at--){au._sumy+=au.data[at][1];au._sumx+=au.data[at][0]}};this.getNextSeriesColor=(function(am){var al=0;var an=am.seriesColors;return function(){if(al=0&&an>=0){al.top+=aK;al.bottom+=aK;al.left+=an;al.right+=an}}var am=["top","bottom","left","right"];for(var aB in am){if(this._gridPadding[am[aB]]==null&&al[am[aB]]>0){this._gridPadding[am[aB]]=al[am[aB]]}else{if(this._gridPadding[am[aB]]==null){this._gridPadding[am[aB]]=this._defaultGridPadding[am[aB]]}}}var aA=this._gridPadding;if(this.legend.placement==="outsideGrid"){aA={top:this.title.getHeight(),left:0,right:0,bottom:0};if(this.legend.location==="s"){aA.left=this._gridPadding.left;aA.right=this._gridPadding.right}}ar.xaxis.pack({position:"absolute",bottom:this._gridPadding.bottom-ar.xaxis.getHeight(),left:0,width:this._width},{min:this._gridPadding.left,max:this._width-this._gridPadding.right});ar.yaxis.pack({position:"absolute",top:0,left:this._gridPadding.left-ar.yaxis.getWidth(),height:this._height},{min:this._height-this._gridPadding.bottom,max:this._gridPadding.top});ar.x2axis.pack({position:"absolute",top:this._gridPadding.top-ar.x2axis.getHeight(),left:0,width:this._width},{min:this._gridPadding.left,max:this._width-this._gridPadding.right});for(aH=8;aH>0;aH--){ar[aG[aH-1]].pack({position:"absolute",top:0,right:this._gridPadding.right-az[aH-1]},{min:this._height-this._gridPadding.bottom,max:this._gridPadding.top})}var au=(this._width-this._gridPadding.left-this._gridPadding.right)/2+this._gridPadding.left-ar.yMidAxis.getWidth()/2;ar.yMidAxis.pack({position:"absolute",top:0,left:au,zIndex:9,textAlign:"center"},{min:this._height-this._gridPadding.bottom,max:this._gridPadding.top});this.target.append(this.grid.createElement(this._gridPadding,this));this.grid.draw();var aq=this.series;var aJ=aq.length;for(aH=0,aE=aJ;aHax)?av:ax;var ar=this.series[aw];var aq=this.series[au];if(aq.renderer.smooth){var ap=aq.renderer._smoothedData.slice(0).reverse()}else{var ap=aq.gridData.slice(0).reverse()}if(ar.renderer.smooth){var at=ar.renderer._smoothedData.concat(ap)}else{var at=ar.gridData.concat(ap)}var ao=(an.color!==null)?an.color:this.series[ax].fillColor;var ay=(an.baseSeries!==null)?an.baseSeries:aw;var am=this.series[ay].renderer.shapeRenderer;var al={fillStyle:ao,fill:true,closePath:true};am.draw(ar.shadowCanvas._ctx,at,al)};this.bindCustomEvents=function(){this.eventCanvas._elem.bind("click",{plot:this},this.onClick);this.eventCanvas._elem.bind("dblclick",{plot:this},this.onDblClick);this.eventCanvas._elem.bind("mousedown",{plot:this},this.onMouseDown);this.eventCanvas._elem.bind("mousemove",{plot:this},this.onMouseMove);this.eventCanvas._elem.bind("mouseenter",{plot:this},this.onMouseEnter);this.eventCanvas._elem.bind("mouseleave",{plot:this},this.onMouseLeave);if(this.captureRightClick){this.eventCanvas._elem.bind("mouseup",{plot:this},this.onRightClick);this.eventCanvas._elem.get(0).oncontextmenu=function(){return false}}else{this.eventCanvas._elem.bind("mouseup",{plot:this},this.onMouseUp)}};function ai(av){var au=av.data.plot;var ap=au.eventCanvas._elem.offset();var at={x:av.pageX-ap.left,y:av.pageY-ap.top};var aq={xaxis:null,yaxis:null,x2axis:null,y2axis:null,y3axis:null,y4axis:null,y5axis:null,y6axis:null,y7axis:null,y8axis:null,y9axis:null,yMidAxis:null};var ar=["xaxis","yaxis","x2axis","y2axis","y3axis","y4axis","y5axis","y6axis","y7axis","y8axis","y9axis","yMidAxis"];var al=au.axes;var am,ao;for(am=11;am>0;am--){ao=ar[am-1];if(al[ao].show){aq[ao]=al[ao].series_p2u(at[ao.charAt(0)])}}return{offsets:ap,gridPos:at,dataPos:aq}}function ak(al,am){var aq=am.series;var aW,aU,aT,aO,aP,aJ,aI,aw,au,az,aA,aK;var aS,aX,aQ,ar,aH,aM,aV;var an,aN;for(aT=am.seriesStack.length-1;aT>=0;aT--){aW=am.seriesStack[aT];aO=aq[aW];aV=aO._highlightThreshold;switch(aO.renderer.constructor){case L.jqplot.BarRenderer:aJ=al.x;aI=al.y;for(aU=0;aUaH[0][0]&&aJaH[2][1]&&aIaH[0][0]+aV[0][0]&&aJaH[2][1]&&aI0&&-aI>=0){aw=2*Math.PI-Math.atan(-aI/aJ)}else{if(aJ>0&&-aI<0){aw=-Math.atan(-aI/aJ)}else{if(aJ<0){aw=Math.PI-Math.atan(-aI/aJ)}else{if(aJ==0&&-aI>0){aw=3*Math.PI/2}else{if(aJ==0&&-aI<0){aw=Math.PI/2}else{if(aJ==0&&aI==0){aw=0}}}}}}if(az){aw-=az;if(aw<0){aw+=2*Math.PI}else{if(aw>2*Math.PI){aw-=2*Math.PI}}}au=aO.sliceMargin/180*Math.PI;if(aPaO._innerRadius){for(aU=0;aU0)?aO.gridData[aU-1][1]+au:au;aK=aO.gridData[aU][1];if(aw>aA&&aw0&&-aI>=0){aw=2*Math.PI-Math.atan(-aI/aJ)}else{if(aJ>0&&-aI<0){aw=-Math.atan(-aI/aJ)}else{if(aJ<0){aw=Math.PI-Math.atan(-aI/aJ)}else{if(aJ==0&&-aI>0){aw=3*Math.PI/2}else{if(aJ==0&&-aI<0){aw=Math.PI/2}else{if(aJ==0&&aI==0){aw=0}}}}}}if(az){aw-=az;if(aw<0){aw+=2*Math.PI}else{if(aw>2*Math.PI){aw-=2*Math.PI}}}au=aO.sliceMargin/180*Math.PI;if(aP0)?aO.gridData[aU-1][1]+au:au;aK=aO.gridData[aU][1];if(aw>aA&&aw=ay[0][1]&&aI<=ay[3][1]&&aJ>=at[0]&&aJ<=aE[0]){return{seriesIndex:aO.index,pointIndex:aU,gridData:null,data:aO.data[aU]}}}break;case L.jqplot.LineRenderer:aJ=al.x;aI=al.y;aP=aO.renderer;if(aO.show){if((aO.fill||(aO.renderer.bands.show&&aO.renderer.bands.fill))&&(!am.plugins.highlighter||!am.plugins.highlighter.show)){var ax=false;if(aJ>aO._boundingBox[0][0]&&aJaO._boundingBox[1][1]&&aI=aI||aB[1]=aI){if(aC[0]+(aI-aC[1])/(aB[1]-aC[1])*(aB[0]-aC[0])0)?aN:0;for(var aU=0;aU=aQ[0]-aP._bodyWidth/2&&aJ<=aQ[0]+aP._bodyWidth/2&&aI>=av(aO.data[aU][2])&&aI<=av(aO.data[aU][3])){return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}else{if(!aP.hlc){var av=aO._yaxis.series_u2p;if(aJ>=aQ[0]-aP._tickLength&&aJ<=aQ[0]+aP._tickLength&&aI>=av(aO.data[aU][2])&&aI<=av(aO.data[aU][3])){return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}else{var av=aO._yaxis.series_u2p;if(aJ>=aQ[0]-aP._tickLength&&aJ<=aQ[0]+aP._tickLength&&aI>=av(aO.data[aU][1])&&aI<=av(aO.data[aU][2])){return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}}}else{if(aQ[0]!=null&&aQ[1]!=null){aX=Math.sqrt((aJ-aQ[0])*(aJ-aQ[0])+(aI-aQ[1])*(aI-aQ[1]));if(aX<=an&&(aX<=aS||aS==null)){aS=aX;return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}}}}}break;default:aJ=al.x;aI=al.y;aP=aO.renderer;if(aO.show){aN=aO.markerRenderer.size/2+aO.neighborThreshold;an=(aN>0)?aN:0;for(var aU=0;aU=aQ[0]-aP._bodyWidth/2&&aJ<=aQ[0]+aP._bodyWidth/2&&aI>=av(aO.data[aU][2])&&aI<=av(aO.data[aU][3])){return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}else{if(!aP.hlc){var av=aO._yaxis.series_u2p;if(aJ>=aQ[0]-aP._tickLength&&aJ<=aQ[0]+aP._tickLength&&aI>=av(aO.data[aU][2])&&aI<=av(aO.data[aU][3])){return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}else{var av=aO._yaxis.series_u2p;if(aJ>=aQ[0]-aP._tickLength&&aJ<=aQ[0]+aP._tickLength&&aI>=av(aO.data[aU][1])&&aI<=av(aO.data[aU][2])){return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}}}else{aX=Math.sqrt((aJ-aQ[0])*(aJ-aQ[0])+(aI-aQ[1])*(aI-aQ[1]));if(aX<=an&&(aX<=aS||aS==null)){aS=aX;return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}}}break}}return null}this.onClick=function(an){var am=ai(an);var ap=an.data.plot;var ao=ak(am.gridPos,ap);var al=L.Event("jqplotClick");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,ao,ap])};this.onDblClick=function(an){var am=ai(an);var ap=an.data.plot;var ao=ak(am.gridPos,ap);var al=L.Event("jqplotDblClick");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,ao,ap])};this.onMouseDown=function(an){var am=ai(an);var ap=an.data.plot;var ao=ak(am.gridPos,ap);var al=L.Event("jqplotMouseDown");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,ao,ap])};this.onMouseUp=function(an){var am=ai(an);var al=L.Event("jqplotMouseUp");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,null,an.data.plot])};this.onRightClick=function(an){var am=ai(an);var ap=an.data.plot;var ao=ak(am.gridPos,ap);if(ap.captureRightClick){if(an.which==3){var al=L.Event("jqplotRightClick");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,ao,ap])}else{var al=L.Event("jqplotMouseUp");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,ao,ap])}}};this.onMouseMove=function(an){var am=ai(an);var ap=an.data.plot;var ao=ak(am.gridPos,ap);var al=L.Event("jqplotMouseMove");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,ao,ap])};this.onMouseEnter=function(an){var am=ai(an);var ao=an.data.plot;var al=L.Event("jqplotMouseEnter");al.pageX=an.pageX;al.pageY=an.pageY;al.relatedTarget=an.relatedTarget;L(this).trigger(al,[am.gridPos,am.dataPos,null,ao])};this.onMouseLeave=function(an){var am=ai(an);var ao=an.data.plot;var al=L.Event("jqplotMouseLeave");al.pageX=an.pageX;al.pageY=an.pageY;al.relatedTarget=an.relatedTarget;L(this).trigger(al,[am.gridPos,am.dataPos,null,ao])};this.drawSeries=function(an,al){var ap,ao,am;al=(typeof(an)==="number"&&al==null)?an:al;an=(typeof(an)==="object")?an:{};if(al!=u){ao=this.series[al];am=ao.shadowCanvas._ctx;am.clearRect(0,0,am.canvas.width,am.canvas.height);ao.drawShadow(am,an,this);am=ao.canvas._ctx;am.clearRect(0,0,am.canvas.width,am.canvas.height);ao.draw(am,an,this);if(ao.renderer.constructor==L.jqplot.BezierCurveRenderer){if(al660)?ah[aj]*0.85:0.73*ah[aj]+90;ah[aj]=parseInt(ah[aj],10);(ah[aj]>255)?255:ah[aj]}ah[3]=0.3+0.35*al[3];ak.push("rgba("+ah[0]+","+ah[1]+","+ah[2]+","+ah[3]+")")}}else{var al=L.jqplot.getColorComponents(ai);var ah=[al[0],al[1],al[2]];var an=ah[0]+ah[1]+ah[2];for(var aj=0;aj<3;aj++){ah[aj]=(an>660)?ah[aj]*0.85:0.73*ah[aj]+90;ah[aj]=parseInt(ah[aj],10);(ah[aj]>255)?255:ah[aj]}ah[3]=0.3+0.35*al[3];ak="rgba("+ah[0]+","+ah[1]+","+ah[2]+","+ah[3]+")"}return ak};L.jqplot.ColorGenerator=function(ai){ai=ai||L.jqplot.config.defaultColors;var ah=0;this.next=function(){if(ah0){return ai[ah--]}else{ah=ai.length-1;return ai[ah]}};this.get=function(ak){var aj=ak-ai.length*Math.floor(ak/ai.length);return ai[aj]};this.setColors=function(aj){ai=aj};this.reset=function(){ah=0};this.getIndex=function(){return ah};this.setIndex=function(aj){ah=aj}};L.jqplot.hex2rgb=function(aj,ah){aj=aj.replace("#","");if(aj.length==3){aj=aj.charAt(0)+aj.charAt(0)+aj.charAt(1)+aj.charAt(1)+aj.charAt(2)+aj.charAt(2)}var ai;ai="rgba("+parseInt(aj.slice(0,2),16)+", "+parseInt(aj.slice(2,4),16)+", "+parseInt(aj.slice(4,6),16);if(ah){ai+=", "+ah}ai+=")";return ai};L.jqplot.rgb2hex=function(am){var aj=/rgba?\( *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *(?:, *[0-9.]*)?\)/;var ah=am.match(aj);var al="#";for(var ak=1;ak<4;ak++){var ai;if(ah[ak].search(/%/)!=-1){ai=parseInt(255*ah[ak]/100,10).toString(16);if(ai.length==1){ai="0"+ai}}else{ai=parseInt(ah[ak],10).toString(16);if(ai.length==1){ai="0"+ai}}al+=ai}return al};L.jqplot.normalize2rgb=function(ai,ah){if(ai.search(/^ *rgba?\(/)!=-1){return ai}else{if(ai.search(/^ *#?[0-9a-fA-F]?[0-9a-fA-F]/)!=-1){return L.jqplot.hex2rgb(ai,ah)}else{throw new Error("Invalid color spec")}}};L.jqplot.getColorComponents=function(am){am=L.jqplot.colorKeywordMap[am]||am;var ak=L.jqplot.normalize2rgb(am);var aj=/rgba?\( *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *,? *([0-9.]* *)?\)/;var ah=ak.match(aj);var ai=[];for(var al=1;al<4;al++){if(ah[al].search(/%/)!=-1){ai[al-1]=parseInt(255*ah[al]/100,10)}else{ai[al-1]=parseInt(ah[al],10)}}ai[3]=parseFloat(ah[4])?parseFloat(ah[4]):1;return ai};L.jqplot.colorKeywordMap={aliceblue:"rgb(240, 248, 255)",antiquewhite:"rgb(250, 235, 215)",aqua:"rgb( 0, 255, 255)",aquamarine:"rgb(127, 255, 212)",azure:"rgb(240, 255, 255)",beige:"rgb(245, 245, 220)",bisque:"rgb(255, 228, 196)",black:"rgb( 0, 0, 0)",blanchedalmond:"rgb(255, 235, 205)",blue:"rgb( 0, 0, 255)",blueviolet:"rgb(138, 43, 226)",brown:"rgb(165, 42, 42)",burlywood:"rgb(222, 184, 135)",cadetblue:"rgb( 95, 158, 160)",chartreuse:"rgb(127, 255, 0)",chocolate:"rgb(210, 105, 30)",coral:"rgb(255, 127, 80)",cornflowerblue:"rgb(100, 149, 237)",cornsilk:"rgb(255, 248, 220)",crimson:"rgb(220, 20, 60)",cyan:"rgb( 0, 255, 255)",darkblue:"rgb( 0, 0, 139)",darkcyan:"rgb( 0, 139, 139)",darkgoldenrod:"rgb(184, 134, 11)",darkgray:"rgb(169, 169, 169)",darkgreen:"rgb( 0, 100, 0)",darkgrey:"rgb(169, 169, 169)",darkkhaki:"rgb(189, 183, 107)",darkmagenta:"rgb(139, 0, 139)",darkolivegreen:"rgb( 85, 107, 47)",darkorange:"rgb(255, 140, 0)",darkorchid:"rgb(153, 50, 204)",darkred:"rgb(139, 0, 0)",darksalmon:"rgb(233, 150, 122)",darkseagreen:"rgb(143, 188, 143)",darkslateblue:"rgb( 72, 61, 139)",darkslategray:"rgb( 47, 79, 79)",darkslategrey:"rgb( 47, 79, 79)",darkturquoise:"rgb( 0, 206, 209)",darkviolet:"rgb(148, 0, 211)",deeppink:"rgb(255, 20, 147)",deepskyblue:"rgb( 0, 191, 255)",dimgray:"rgb(105, 105, 105)",dimgrey:"rgb(105, 105, 105)",dodgerblue:"rgb( 30, 144, 255)",firebrick:"rgb(178, 34, 34)",floralwhite:"rgb(255, 250, 240)",forestgreen:"rgb( 34, 139, 34)",fuchsia:"rgb(255, 0, 255)",gainsboro:"rgb(220, 220, 220)",ghostwhite:"rgb(248, 248, 255)",gold:"rgb(255, 215, 0)",goldenrod:"rgb(218, 165, 32)",gray:"rgb(128, 128, 128)",grey:"rgb(128, 128, 128)",green:"rgb( 0, 128, 0)",greenyellow:"rgb(173, 255, 47)",honeydew:"rgb(240, 255, 240)",hotpink:"rgb(255, 105, 180)",indianred:"rgb(205, 92, 92)",indigo:"rgb( 75, 0, 130)",ivory:"rgb(255, 255, 240)",khaki:"rgb(240, 230, 140)",lavender:"rgb(230, 230, 250)",lavenderblush:"rgb(255, 240, 245)",lawngreen:"rgb(124, 252, 0)",lemonchiffon:"rgb(255, 250, 205)",lightblue:"rgb(173, 216, 230)",lightcoral:"rgb(240, 128, 128)",lightcyan:"rgb(224, 255, 255)",lightgoldenrodyellow:"rgb(250, 250, 210)",lightgray:"rgb(211, 211, 211)",lightgreen:"rgb(144, 238, 144)",lightgrey:"rgb(211, 211, 211)",lightpink:"rgb(255, 182, 193)",lightsalmon:"rgb(255, 160, 122)",lightseagreen:"rgb( 32, 178, 170)",lightskyblue:"rgb(135, 206, 250)",lightslategray:"rgb(119, 136, 153)",lightslategrey:"rgb(119, 136, 153)",lightsteelblue:"rgb(176, 196, 222)",lightyellow:"rgb(255, 255, 224)",lime:"rgb( 0, 255, 0)",limegreen:"rgb( 50, 205, 50)",linen:"rgb(250, 240, 230)",magenta:"rgb(255, 0, 255)",maroon:"rgb(128, 0, 0)",mediumaquamarine:"rgb(102, 205, 170)",mediumblue:"rgb( 0, 0, 205)",mediumorchid:"rgb(186, 85, 211)",mediumpurple:"rgb(147, 112, 219)",mediumseagreen:"rgb( 60, 179, 113)",mediumslateblue:"rgb(123, 104, 238)",mediumspringgreen:"rgb( 0, 250, 154)",mediumturquoise:"rgb( 72, 209, 204)",mediumvioletred:"rgb(199, 21, 133)",midnightblue:"rgb( 25, 25, 112)",mintcream:"rgb(245, 255, 250)",mistyrose:"rgb(255, 228, 225)",moccasin:"rgb(255, 228, 181)",navajowhite:"rgb(255, 222, 173)",navy:"rgb( 0, 0, 128)",oldlace:"rgb(253, 245, 230)",olive:"rgb(128, 128, 0)",olivedrab:"rgb(107, 142, 35)",orange:"rgb(255, 165, 0)",orangered:"rgb(255, 69, 0)",orchid:"rgb(218, 112, 214)",palegoldenrod:"rgb(238, 232, 170)",palegreen:"rgb(152, 251, 152)",paleturquoise:"rgb(175, 238, 238)",palevioletred:"rgb(219, 112, 147)",papayawhip:"rgb(255, 239, 213)",peachpuff:"rgb(255, 218, 185)",peru:"rgb(205, 133, 63)",pink:"rgb(255, 192, 203)",plum:"rgb(221, 160, 221)",powderblue:"rgb(176, 224, 230)",purple:"rgb(128, 0, 128)",red:"rgb(255, 0, 0)",rosybrown:"rgb(188, 143, 143)",royalblue:"rgb( 65, 105, 225)",saddlebrown:"rgb(139, 69, 19)",salmon:"rgb(250, 128, 114)",sandybrown:"rgb(244, 164, 96)",seagreen:"rgb( 46, 139, 87)",seashell:"rgb(255, 245, 238)",sienna:"rgb(160, 82, 45)",silver:"rgb(192, 192, 192)",skyblue:"rgb(135, 206, 235)",slateblue:"rgb(106, 90, 205)",slategray:"rgb(112, 128, 144)",slategrey:"rgb(112, 128, 144)",snow:"rgb(255, 250, 250)",springgreen:"rgb( 0, 255, 127)",steelblue:"rgb( 70, 130, 180)",tan:"rgb(210, 180, 140)",teal:"rgb( 0, 128, 128)",thistle:"rgb(216, 191, 216)",tomato:"rgb(255, 99, 71)",turquoise:"rgb( 64, 224, 208)",violet:"rgb(238, 130, 238)",wheat:"rgb(245, 222, 179)",white:"rgb(255, 255, 255)",whitesmoke:"rgb(245, 245, 245)",yellow:"rgb(255, 255, 0)",yellowgreen:"rgb(154, 205, 50)"};L.jqplot.AxisLabelRenderer=function(ah){L.jqplot.ElemContainer.call(this);this.axis;this.show=true;this.label="";this.fontFamily=null;this.fontSize=null;this.textColor=null;this._elem;this.escapeHTML=false;L.extend(true,this,ah)};L.jqplot.AxisLabelRenderer.prototype=new L.jqplot.ElemContainer();L.jqplot.AxisLabelRenderer.prototype.constructor=L.jqplot.AxisLabelRenderer;L.jqplot.AxisLabelRenderer.prototype.init=function(ah){L.extend(true,this,ah)};L.jqplot.AxisLabelRenderer.prototype.draw=function(ah,ai){if(this._elem){this._elem.emptyForce();this._elem=null}this._elem=L('
');if(Number(this.label)){this._elem.css("white-space","nowrap")}if(!this.escapeHTML){this._elem.html(this.label)}else{this._elem.text(this.label)}if(this.fontFamily){this._elem.css("font-family",this.fontFamily)}if(this.fontSize){this._elem.css("font-size",this.fontSize)}if(this.textColor){this._elem.css("color",this.textColor)}return this._elem};L.jqplot.AxisLabelRenderer.prototype.pack=function(){};L.jqplot.AxisTickRenderer=function(ah){L.jqplot.ElemContainer.call(this);this.mark="outside";this.axis;this.showMark=true;this.showGridline=true;this.isMinorTick=false;this.size=4;this.markSize=6;this.show=true;this.showLabel=true;this.label=null;this.value=null;this._styles={};this.formatter=L.jqplot.DefaultTickFormatter;this.prefix="";this.suffix="";this.formatString="";this.fontFamily;this.fontSize;this.textColor;this.escapeHTML=false;this._elem;this._breakTick=false;L.extend(true,this,ah)};L.jqplot.AxisTickRenderer.prototype.init=function(ah){L.extend(true,this,ah)};L.jqplot.AxisTickRenderer.prototype=new L.jqplot.ElemContainer();L.jqplot.AxisTickRenderer.prototype.constructor=L.jqplot.AxisTickRenderer;L.jqplot.AxisTickRenderer.prototype.setTick=function(ah,aj,ai){this.value=ah;this.axis=aj;if(ai){this.isMinorTick=true}return this};L.jqplot.AxisTickRenderer.prototype.draw=function(){if(this.label===null){this.label=this.prefix+this.formatter(this.formatString,this.value)+this.suffix}var ai={position:"absolute"};if(Number(this.label)){ai.whitSpace="nowrap"}if(this._elem){this._elem.emptyForce();this._elem=null}this._elem=L(document.createElement("div"));this._elem.addClass("jqplot-"+this.axis+"-tick");if(!this.escapeHTML){this._elem.html(this.label)}else{this._elem.text(this.label)}this._elem.css(ai);for(var ah in this._styles){this._elem.css(ah,this._styles[ah])}if(this.fontFamily){this._elem.css("font-family",this.fontFamily)}if(this.fontSize){this._elem.css("font-size",this.fontSize)}if(this.textColor){this._elem.css("color",this.textColor)}if(this._breakTick){this._elem.addClass("jqplot-breakTick")}return this._elem};L.jqplot.DefaultTickFormatter=function(ah,ai){if(typeof ai=="number"){if(!ah){ah=L.jqplot.config.defaultTickFormatString}return L.jqplot.sprintf(ah,ai)}else{return String(ai)}};L.jqplot.PercentTickFormatter=function(ah,ai){if(typeof ai=="number"){ai=100*ai;if(!ah){ah=L.jqplot.config.defaultTickFormatString}return L.jqplot.sprintf(ah,ai)}else{return String(ai)}};L.jqplot.AxisTickRenderer.prototype.pack=function(){};L.jqplot.CanvasGridRenderer=function(){this.shadowRenderer=new L.jqplot.ShadowRenderer()};L.jqplot.CanvasGridRenderer.prototype.init=function(ai){this._ctx;L.extend(true,this,ai);var ah={lineJoin:"miter",lineCap:"round",fill:false,isarc:false,angle:this.shadowAngle,offset:this.shadowOffset,alpha:this.shadowAlpha,depth:this.shadowDepth,lineWidth:this.shadowWidth,closePath:false,strokeStyle:this.shadowColor};this.renderer.shadowRenderer.init(ah)};L.jqplot.CanvasGridRenderer.prototype.createElement=function(ak){var aj;if(this._elem){if(L.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==u){aj=this._elem.get(0);window.G_vmlCanvasManager.uninitElement(aj);aj=null}this._elem.emptyForce();this._elem=null}aj=ak.canvasManager.getCanvas();var ah=this._plotDimensions.width;var ai=this._plotDimensions.height;aj.width=ah;aj.height=ai;this._elem=L(aj);this._elem.addClass("jqplot-grid-canvas");this._elem.css({position:"absolute",left:0,top:0});aj=ak.canvasManager.initCanvas(aj);this._top=this._offsets.top;this._bottom=ai-this._offsets.bottom;this._left=this._offsets.left;this._right=ah-this._offsets.right;this._width=this._right-this._left;this._height=this._bottom-this._top;aj=null;return this._elem};L.jqplot.CanvasGridRenderer.prototype.draw=function(){this._ctx=this._elem.get(0).getContext("2d");var at=this._ctx;var aw=this._axes;at.save();at.clearRect(0,0,this._plotDimensions.width,this._plotDimensions.height);at.fillStyle=this.backgroundColor||this.background;at.fillRect(this._left,this._top,this._width,this._height);at.save();at.lineJoin="miter";at.lineCap="butt";at.lineWidth=this.gridLineWidth;at.strokeStyle=this.gridLineColor;var aA,az,ap,aq;var am=["xaxis","yaxis","x2axis","y2axis"];for(var ay=4;ay>0;ay--){var aD=am[ay-1];var ah=aw[aD];var aB=ah._ticks;var ar=aB.length;if(ah.show){if(ah.drawBaseline){var aC={};if(ah.baselineWidth!==null){aC.lineWidth=ah.baselineWidth}if(ah.baselineColor!==null){aC.strokeStyle=ah.baselineColor}switch(aD){case"xaxis":ao(this._left,this._bottom,this._right,this._bottom,aC);break;case"yaxis":ao(this._left,this._bottom,this._left,this._top,aC);break;case"x2axis":ao(this._left,this._bottom,this._right,this._bottom,aC);break;case"y2axis":ao(this._right,this._bottom,this._right,this._top,aC);break}}for(var au=ar;au>0;au--){var an=aB[au-1];if(an.show){var ak=Math.round(ah.u2p(an.value))+0.5;switch(aD){case"xaxis":if(an.showGridline&&this.drawGridlines&&((!an.isMinorTick&&ah.drawMajorGridlines)||(an.isMinorTick&&ah.drawMinorGridlines))){ao(ak,this._top,ak,this._bottom)}if(an.showMark&&an.mark&&((!an.isMinorTick&&ah.drawMajorTickMarks)||(an.isMinorTick&&ah.drawMinorTickMarks))){ap=an.markSize;aq=an.mark;var ak=Math.round(ah.u2p(an.value))+0.5;switch(aq){case"outside":aA=this._bottom;az=this._bottom+ap;break;case"inside":aA=this._bottom-ap;az=this._bottom;break;case"cross":aA=this._bottom-ap;az=this._bottom+ap;break;default:aA=this._bottom;az=this._bottom+ap;break}if(this.shadow){this.renderer.shadowRenderer.draw(at,[[ak,aA],[ak,az]],{lineCap:"butt",lineWidth:this.gridLineWidth,offset:this.gridLineWidth*0.75,depth:2,fill:false,closePath:false})}ao(ak,aA,ak,az)}break;case"yaxis":if(an.showGridline&&this.drawGridlines&&((!an.isMinorTick&&ah.drawMajorGridlines)||(an.isMinorTick&&ah.drawMinorGridlines))){ao(this._right,ak,this._left,ak)}if(an.showMark&&an.mark&&((!an.isMinorTick&&ah.drawMajorTickMarks)||(an.isMinorTick&&ah.drawMinorTickMarks))){ap=an.markSize;aq=an.mark;var ak=Math.round(ah.u2p(an.value))+0.5;switch(aq){case"outside":aA=this._left-ap;az=this._left;break;case"inside":aA=this._left;az=this._left+ap;break;case"cross":aA=this._left-ap;az=this._left+ap;break;default:aA=this._left-ap;az=this._left;break}if(this.shadow){this.renderer.shadowRenderer.draw(at,[[aA,ak],[az,ak]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}ao(aA,ak,az,ak,{strokeStyle:ah.borderColor})}break;case"x2axis":if(an.showGridline&&this.drawGridlines&&((!an.isMinorTick&&ah.drawMajorGridlines)||(an.isMinorTick&&ah.drawMinorGridlines))){ao(ak,this._bottom,ak,this._top)}if(an.showMark&&an.mark&&((!an.isMinorTick&&ah.drawMajorTickMarks)||(an.isMinorTick&&ah.drawMinorTickMarks))){ap=an.markSize;aq=an.mark;var ak=Math.round(ah.u2p(an.value))+0.5;switch(aq){case"outside":aA=this._top-ap;az=this._top;break;case"inside":aA=this._top;az=this._top+ap;break;case"cross":aA=this._top-ap;az=this._top+ap;break;default:aA=this._top-ap;az=this._top;break}if(this.shadow){this.renderer.shadowRenderer.draw(at,[[ak,aA],[ak,az]],{lineCap:"butt",lineWidth:this.gridLineWidth,offset:this.gridLineWidth*0.75,depth:2,fill:false,closePath:false})}ao(ak,aA,ak,az)}break;case"y2axis":if(an.showGridline&&this.drawGridlines&&((!an.isMinorTick&&ah.drawMajorGridlines)||(an.isMinorTick&&ah.drawMinorGridlines))){ao(this._left,ak,this._right,ak)}if(an.showMark&&an.mark&&((!an.isMinorTick&&ah.drawMajorTickMarks)||(an.isMinorTick&&ah.drawMinorTickMarks))){ap=an.markSize;aq=an.mark;var ak=Math.round(ah.u2p(an.value))+0.5;switch(aq){case"outside":aA=this._right;az=this._right+ap;break;case"inside":aA=this._right-ap;az=this._right;break;case"cross":aA=this._right-ap;az=this._right+ap;break;default:aA=this._right;az=this._right+ap;break}if(this.shadow){this.renderer.shadowRenderer.draw(at,[[aA,ak],[az,ak]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}ao(aA,ak,az,ak,{strokeStyle:ah.borderColor})}break;default:break}}}an=null}ah=null;aB=null}am=["y3axis","y4axis","y5axis","y6axis","y7axis","y8axis","y9axis","yMidAxis"];for(var ay=7;ay>0;ay--){var ah=aw[am[ay-1]];var aB=ah._ticks;if(ah.show){var ai=aB[ah.numberTicks-1];var al=aB[0];var aj=ah.getLeft();var av=[[aj,ai.getTop()+ai.getHeight()/2],[aj,al.getTop()+al.getHeight()/2+1]];if(this.shadow){this.renderer.shadowRenderer.draw(at,av,{lineCap:"butt",fill:false,closePath:false})}ao(av[0][0],av[0][1],av[1][0],av[1][1],{lineCap:"butt",strokeStyle:ah.borderColor,lineWidth:ah.borderWidth});for(var au=aB.length;au>0;au--){var an=aB[au-1];ap=an.markSize;aq=an.mark;var ak=Math.round(ah.u2p(an.value))+0.5;if(an.showMark&&an.mark){switch(aq){case"outside":aA=aj;az=aj+ap;break;case"inside":aA=aj-ap;az=aj;break;case"cross":aA=aj-ap;az=aj+ap;break;default:aA=aj;az=aj+ap;break}av=[[aA,ak],[az,ak]];if(this.shadow){this.renderer.shadowRenderer.draw(at,av,{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}ao(aA,ak,az,ak,{strokeStyle:ah.borderColor})}an=null}al=null}ah=null;aB=null}at.restore();function ao(aH,aG,aE,ax,aF){at.save();aF=aF||{};if(aF.lineWidth==null||aF.lineWidth!=0){L.extend(true,at,aF);at.beginPath();at.moveTo(aH,aG);at.lineTo(aE,ax);at.stroke();at.restore()}}if(this.shadow){var av=[[this._left,this._bottom],[this._right,this._bottom],[this._right,this._top]];this.renderer.shadowRenderer.draw(at,av)}if(this.borderWidth!=0&&this.drawBorder){ao(this._left,this._top,this._right,this._top,{lineCap:"round",strokeStyle:aw.x2axis.borderColor,lineWidth:aw.x2axis.borderWidth});ao(this._right,this._top,this._right,this._bottom,{lineCap:"round",strokeStyle:aw.y2axis.borderColor,lineWidth:aw.y2axis.borderWidth});ao(this._right,this._bottom,this._left,this._bottom,{lineCap:"round",strokeStyle:aw.xaxis.borderColor,lineWidth:aw.xaxis.borderWidth});ao(this._left,this._bottom,this._left,this._top,{lineCap:"round",strokeStyle:aw.yaxis.borderColor,lineWidth:aw.yaxis.borderWidth})}at.restore();at=null;aw=null};L.jqplot.DivTitleRenderer=function(){};L.jqplot.DivTitleRenderer.prototype.init=function(ah){L.extend(true,this,ah)};L.jqplot.DivTitleRenderer.prototype.draw=function(){if(this._elem){this._elem.emptyForce();this._elem=null}var ak=this.renderer;var aj=document.createElement("div");this._elem=L(aj);this._elem.addClass("jqplot-title");if(!this.text){this.show=false;this._elem.height(0);this._elem.width(0)}else{if(this.text){var ah;if(this.color){ah=this.color}else{if(this.textColor){ah=this.textColor}}var ai={position:"absolute",top:"0px",left:"0px"};if(this._plotWidth){ai.width=this._plotWidth+"px"}if(this.fontSize){ai.fontSize=this.fontSize}if(typeof this.textAlign==="string"){ai.textAlign=this.textAlign}else{ai.textAlign="center"}if(ah){ai.color=ah}if(this.paddingBottom){ai.paddingBottom=this.paddingBottom}if(this.fontFamily){ai.fontFamily=this.fontFamily}this._elem.css(ai);if(this.escapeHtml){this._elem.text(this.text)}else{this._elem.html(this.text)}}}aj=null;return this._elem};L.jqplot.DivTitleRenderer.prototype.pack=function(){};var r=0.1;L.jqplot.LinePattern=function(aw,aq){var ap={dotted:[r,L.jqplot.config.dotGapLength],dashed:[L.jqplot.config.dashLength,L.jqplot.config.gapLength],solid:null};if(typeof aq==="string"){if(aq[0]==="."||aq[0]==="-"){var ax=aq;aq=[];for(var ao=0,al=ax.length;ao0)&&(aC>0)){aA/=aB;az/=aB;while(true){var aD=aC*ar;if(aD=aq.length){ak=0}ar=aq[ak]}else{au=ay;at=aE;if((ak&1)==0){aw.lineTo(au,at)}else{aw.moveTo(au,at)}ar-=aB/aC;break}}}};var ai=function(){aw.beginPath()};var am=function(){aj(an,ah)};return{moveTo:av,lineTo:aj,beginPath:ai,closePath:am}};L.jqplot.LineRenderer=function(){this.shapeRenderer=new L.jqplot.ShapeRenderer();this.shadowRenderer=new L.jqplot.ShadowRenderer()};L.jqplot.LineRenderer.prototype.init=function(ai,an){ai=ai||{};this._type="line";this.renderer.animation={show:false,direction:"left",speed:2500,_supported:true};this.renderer.smooth=false;this.renderer.tension=null;this.renderer.constrainSmoothing=true;this.renderer._smoothedData=[];this.renderer._smoothedPlotData=[];this.renderer._hiBandGridData=[];this.renderer._lowBandGridData=[];this.renderer._hiBandSmoothedData=[];this.renderer._lowBandSmoothedData=[];this.renderer.bandData=[];this.renderer.bands={show:false,hiData:[],lowData:[],color:this.color,showLines:false,fill:true,fillColor:null,_min:null,_max:null,interval:"3%"};var al={highlightMouseOver:ai.highlightMouseOver,highlightMouseDown:ai.highlightMouseDown,highlightColor:ai.highlightColor};delete (ai.highlightMouseOver);delete (ai.highlightMouseDown);delete (ai.highlightColor);L.extend(true,this.renderer,ai);this.renderer.options=ai;if(this.renderer.bandData.length>1&&(!ai.bands||ai.bands.show==null)){this.renderer.bands.show=true}else{if(ai.bands&&ai.bands.show==null&&ai.bands.interval!=null){this.renderer.bands.show=true}}if(this.fill){this.renderer.bands.show=false}if(this.renderer.bands.show){this.renderer.initBands.call(this,this.renderer.options,an)}if(this._stack){this.renderer.smooth=false}var am={lineJoin:this.lineJoin,lineCap:this.lineCap,fill:this.fill,isarc:false,strokeStyle:this.color,fillStyle:this.fillColor,lineWidth:this.lineWidth,linePattern:this.linePattern,closePath:this.fill};this.renderer.shapeRenderer.init(am);var aj=ai.shadowOffset;if(aj==null){if(this.lineWidth>2.5){aj=1.25*(1+(Math.atan((this.lineWidth/2.5))/0.785398163-1)*0.6)}else{aj=1.25*Math.atan((this.lineWidth/2.5))/0.785398163}}var ah={lineJoin:this.lineJoin,lineCap:this.lineCap,fill:this.fill,isarc:false,angle:this.shadowAngle,offset:aj,alpha:this.shadowAlpha,depth:this.shadowDepth,lineWidth:this.lineWidth,linePattern:this.linePattern,closePath:this.fill};this.renderer.shadowRenderer.init(ah);this._areaPoints=[];this._boundingBox=[[],[]];if(!this.isTrendline&&this.fill||this.renderer.bands.show){this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColor=null;if(al.highlightMouseDown&&al.highlightMouseOver==null){al.highlightMouseOver=false}L.extend(true,this,{highlightMouseOver:al.highlightMouseOver,highlightMouseDown:al.highlightMouseDown,highlightColor:al.highlightColor});if(!this.highlightColor){var ak=(this.renderer.bands.show)?this.renderer.bands.fillColor:this.fillColor;this.highlightColor=L.jqplot.computeHighlightColors(ak)}if(this.highlighter){this.highlighter.show=false}}if(!this.isTrendline&&an){an.plugins.lineRenderer={};an.postInitHooks.addOnce(z);an.postDrawHooks.addOnce(af);an.eventListenerHooks.addOnce("jqplotMouseMove",h);an.eventListenerHooks.addOnce("jqplotMouseDown",e);an.eventListenerHooks.addOnce("jqplotMouseUp",ad);an.eventListenerHooks.addOnce("jqplotClick",g);an.eventListenerHooks.addOnce("jqplotRightClick",s)}};L.jqplot.LineRenderer.prototype.initBands=function(ak,av){var al=ak.bandData||[];var an=this.renderer.bands;an.hiData=[];an.lowData=[];var aB=this.data;an._max=null;an._min=null;if(al.length==2){if(L.isArray(al[0][0])){var ao;var ah=0,ar=0;for(var aw=0,at=al[0].length;awan._max)||an._max==null){an._max=ao[1]}if((ao[1]!=null&&ao[1]an._max)||an._max==null){an._max=ao[1];ar=1}if((ao[1]!=null&&ao[1]al[1][0])?0:1;var aC=(aj)?0:1;for(var aw=0,at=aB.length;aw2&&!L.isArray(al[0][0])){var aj=(al[0][0]>al[0][1])?0:1;var aC=(aj)?0:1;for(var aw=0,at=al.length;awan._max)||an._max==null){an._max=am[aw][1]}}for(var aw=0,at=ap.length;aw0){aR=Math.abs((ap[aQ][1]-ap[aQ-1][1])/(ap[aQ][0]-ap[aQ-1][0]))}am=aR/aG+aE;aM=aF*A(am)-aF*A(aE)+aS;aT=(aO+aM)/2}else{aT=aU}for(aK=0;aK2){var ao;if(this.renderer.constrainSmoothing){ao=J.call(this,this.gridData);this.renderer._smoothedData=ao[0];this.renderer._smoothedPlotData=ao[1];if(ak.show){ao=J.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=ao[0];ao=J.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=ao[0]}ao=null}else{ao=F.call(this,this.gridData);this.renderer._smoothedData=ao[0];this.renderer._smoothedPlotData=ao[1];if(ak.show){ao=F.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=ao[0];ao=F.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=ao[0]}ao=null}}};L.jqplot.LineRenderer.prototype.makeGridData=function(ao,aq){var am=this._xaxis.series_u2p;var ah=this._yaxis.series_u2p;var ar=[];var aj=[];this.renderer._smoothedData=[];this.renderer._smoothedPlotData=[];this.renderer._hiBandGridData=[];this.renderer._lowBandGridData=[];this.renderer._hiBandSmoothedData=[];this.renderer._lowBandSmoothedData=[];var al=this.renderer.bands;var ai=false;for(var an=0;an2){var ap;if(this.renderer.constrainSmoothing){ap=J.call(this,ar);this.renderer._smoothedData=ap[0];this.renderer._smoothedPlotData=ap[1];if(al.show){ap=J.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=ap[0];ap=J.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=ap[0]}ap=null}else{ap=F.call(this,ar);this.renderer._smoothedData=ap[0];this.renderer._smoothedPlotData=ap[1];if(al.show){ap=F.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=ap[0];ap=F.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=ap[0]}ap=null}}return ar};L.jqplot.LineRenderer.prototype.draw=function(ax,aI,ai,aB){var aC;var aq=L.extend(true,{},ai);var ak=(aq.shadow!=u)?aq.shadow:this.shadow;var aJ=(aq.showLine!=u)?aq.showLine:this.showLine;var aA=(aq.fill!=u)?aq.fill:this.fill;var ah=(aq.fillAndStroke!=u)?aq.fillAndStroke:this.fillAndStroke;var ar,ay,av,aE;ax.save();if(aI.length){if(aJ){if(aA){if(this.fillToZero){var aF=this.negativeColor;if(!this.useNegativeColors){aF=aq.fillStyle}var ao=false;var ap=aq.fillStyle;if(ah){var aH=aI.slice(0)}if(this.index==0||!this._stack){var aw=[];var aL=(this.renderer.smooth)?this.renderer._smoothedPlotData:this._plotData;this._areaPoints=[];var aG=this._yaxis.series_u2p(this.fillToValue);var aj=this._xaxis.series_u2p(this.fillToValue);aq.closePath=true;if(this.fillAxis=="y"){aw.push([aI[0][0],aG]);this._areaPoints.push([aI[0][0],aG]);for(var aC=0;aC0;aC--){aI.push(au[aC-1])}if(ak){this.renderer.shadowRenderer.draw(ax,aI,aq)}this._areaPoints=aI;this.renderer.shapeRenderer.draw(ax,aI,aq)}}else{if(ah){var aH=aI.slice(0)}if(this.index==0||!this._stack){var al=ax.canvas.height;aI.unshift([aI[0][0],al]);var aD=aI.length;aI.push([aI[aD-1][0],al])}else{var au=this._prevGridData;for(var aC=au.length;aC>0;aC--){aI.push(au[aC-1])}}this._areaPoints=aI;if(ak){this.renderer.shadowRenderer.draw(ax,aI,aq)}this.renderer.shapeRenderer.draw(ax,aI,aq)}if(ah){var az=L.extend(true,{},aq,{fill:false,closePath:false});this.renderer.shapeRenderer.draw(ax,aH,az);if(this.markerRenderer.show){if(this.renderer.smooth){aH=this.gridData}for(aC=0;aCat[0]||ar==null){ar=at[0]}if(aEat[1]||ay==null){ay=at[1]}}if(this.type==="line"&&this.renderer.bands.show){aE=this._yaxis.series_u2p(this.renderer.bands._min);ay=this._yaxis.series_u2p(this.renderer.bands._max)}this._boundingBox=[[ar,aE],[av,ay]];if(this.markerRenderer.show&&!aA){if(this.renderer.smooth){aI=this.gridData}for(aC=0;aCao){ao=aj}}}al=null;am=null;if(ah){ai=this._label._elem.outerWidth(true);an=this._label._elem.outerHeight(true)}if(this.name=="xaxis"){ao=ao+an;this._elem.css({height:ao+"px",left:"0px",bottom:"0px"})}else{if(this.name=="x2axis"){ao=ao+an;this._elem.css({height:ao+"px",left:"0px",top:"0px"})}else{if(this.name=="yaxis"){ao=ao+ai;this._elem.css({width:ao+"px",left:"0px",top:"0px"});if(ah&&this._label.constructor==L.jqplot.AxisLabelRenderer){this._label._elem.css("width",ai+"px")}}else{ao=ao+ai;this._elem.css({width:ao+"px",right:"0px",top:"0px"});if(ah&&this._label.constructor==L.jqplot.AxisLabelRenderer){this._label._elem.css("width",ai+"px")}}}}}};L.jqplot.LinearAxisRenderer.prototype.createTicks=function(aj){var aT=this._ticks;var aK=this.ticks;var az=this.name;var aB=this._dataBounds;var ah=(this.name.charAt(0)==="x")?this._plotDimensions.width:this._plotDimensions.height;var an;var a6,aI;var ap,ao;var a4,a0;var aH=this.min;var a5=this.max;var aW=this.numberTicks;var ba=this.tickInterval;var am=30;this._scalefact=(Math.max(ah,am+1)-am)/300;if(aK.length){for(a0=0;a0this.breakPoints[0]&&aO[0]<=this.breakPoints[1]){aU.show=false;aU.showGridline=false;aU.label=aO[1]}else{aU.label=aO[1]}}}else{aU.label=aO[1]}aU.setTick(aO[0],this.name);this._ticks.push(aU)}else{if(L.isPlainObject(aO)){L.extend(true,aU,aO);aU.axis=this.name;this._ticks.push(aU)}else{aU.value=aO;if(this.breakPoints){if(aO==this.breakPoints[0]){aU.label=this.breakTickLabel;aU._breakTick=true;aU.showGridline=false;aU.showMark=false}else{if(aO>this.breakPoints[0]&&aO<=this.breakPoints[1]){aU.show=false;aU.showGridline=false}}}aU.setTick(aO,this.name);this._ticks.push(aU)}}}this.numberTicks=aK.length;this.min=this._ticks[0].value;this.max=this._ticks[this.numberTicks-1].value;this.tickInterval=(this.max-this.min)/(this.numberTicks-1)}else{if(az=="xaxis"||az=="x2axis"){ah=this._plotDimensions.width}else{ah=this._plotDimensions.height}var ax=this.numberTicks;if(this.alignTicks){if(this.name==="x2axis"&&aj.axes.xaxis.show){ax=aj.axes.xaxis.numberTicks}else{if(this.name.charAt(0)==="y"&&this.name!=="yaxis"&&this.name!=="yMidAxis"&&aj.axes.yaxis.show){ax=aj.axes.yaxis.numberTicks}}}a6=((this.min!=null)?this.min:aB.min);aI=((this.max!=null)?this.max:aB.max);var av=aI-a6;var aS,ay;var at;if(this.tickOptions==null||!this.tickOptions.formatString){this._overrideFormatString=true}if(this.min==null||this.max==null&&this.tickInterval==null&&!this.autoscale){if(this.forceTickAt0){if(a6>0){a6=0}if(aI<0){aI=0}}if(this.forceTickAt100){if(a6>100){a6=100}if(aI<100){aI=100}}var aE=false,a1=false;if(this.min!=null){aE=true}else{if(this.max!=null){a1=true}}var aP=L.jqplot.LinearTickGenerator(a6,aI,this._scalefact,ax,aE,a1);var aw=(this.min!=null)?a6:a6+av*(this.padMin-1);var aQ=(this.max!=null)?aI:aI-av*(this.padMax-1);if(a6aQ){aw=(this.min!=null)?a6:a6-av*(this.padMin-1);aQ=(this.max!=null)?aI:aI+av*(this.padMax-1);aP=L.jqplot.LinearTickGenerator(aw,aQ,this._scalefact,ax,aE,a1)}this.min=aP[0];this.max=aP[1];this.numberTicks=aP[2];this._autoFormatString=aP[3];this.tickInterval=aP[4]}else{if(a6==aI){var ai=0.05;if(a6>0){ai=Math.max(Math.log(a6)/Math.LN10,0.05)}a6-=ai;aI+=ai}if(this.autoscale&&this.min==null&&this.max==null){var ak,al,ar;var aC=false;var aN=false;var aA={min:null,max:null,average:null,stddev:null};for(var a0=0;a0a2){a2=aR[aZ]}}}var au=(a2-aG)/a2;if(aV.renderer.constructor==L.jqplot.BarRenderer){if(aG>=0&&(aV.fillToZero||au>0.1)){aC=true}else{aC=false;if(aV.fill&&aV.fillToZero&&aG<0&&a2>0){aN=true}else{aN=false}}}else{if(aV.fill){if(aG>=0&&(aV.fillToZero||au>0.1)){aC=true}else{if(aG<0&&a2>0&&aV.fillToZero){aC=false;aN=true}else{aC=false;aN=false}}}else{if(aG<0){aC=false}}}}}if(aC){this.numberTicks=2+Math.ceil((ah-(this.tickSpacing-1))/this.tickSpacing);this.min=0;aH=0;al=aI/(this.numberTicks-1);at=Math.pow(10,Math.abs(Math.floor(Math.log(al)/Math.LN10)));if(al/at==parseInt(al/at,10)){al+=at}this.tickInterval=Math.ceil(al/at)*at;this.max=this.tickInterval*(this.numberTicks-1)}else{if(aN){this.numberTicks=2+Math.ceil((ah-(this.tickSpacing-1))/this.tickSpacing);var aJ=Math.ceil(Math.abs(a6)/av*(this.numberTicks-1));var a9=this.numberTicks-1-aJ;al=Math.max(Math.abs(a6/aJ),Math.abs(aI/a9));at=Math.pow(10,Math.abs(Math.floor(Math.log(al)/Math.LN10)));this.tickInterval=Math.ceil(al/at)*at;this.max=this.tickInterval*a9;this.min=-this.tickInterval*aJ}else{if(this.numberTicks==null){if(this.tickInterval){this.numberTicks=3+Math.ceil(av/this.tickInterval)}else{this.numberTicks=2+Math.ceil((ah-(this.tickSpacing-1))/this.tickSpacing)}}if(this.tickInterval==null){al=av/(this.numberTicks-1);if(al<1){at=Math.pow(10,Math.abs(Math.floor(Math.log(al)/Math.LN10)))}else{at=1}this.tickInterval=Math.ceil(al*at*this.pad)/at}else{at=1/this.tickInterval}ak=this.tickInterval*(this.numberTicks-1);ar=(ak-av)/2;if(this.min==null){this.min=Math.floor(at*(a6-ar))/at}if(this.max==null){this.max=this.min+ak}}}var aF=L.jqplot.getSignificantFigures(this.tickInterval);var aM;if(aF.digitsLeft>=aF.significantDigits){aM="%d"}else{var at=Math.max(0,5-aF.digitsLeft);at=Math.min(at,aF.digitsRight);aM="%."+at+"f"}this._autoFormatString=aM}else{aS=(this.min!=null)?this.min:a6-av*(this.padMin-1);ay=(this.max!=null)?this.max:aI+av*(this.padMax-1);av=ay-aS;if(this.numberTicks==null){if(this.tickInterval!=null){this.numberTicks=Math.ceil((ay-aS)/this.tickInterval)+1}else{if(ah>100){this.numberTicks=parseInt(3+(ah-100)/75,10)}else{this.numberTicks=2}}}if(this.tickInterval==null){this.tickInterval=av/(this.numberTicks-1)}if(this.max==null){ay=aS+this.tickInterval*(this.numberTicks-1)}if(this.min==null){aS=ay-this.tickInterval*(this.numberTicks-1)}var aF=L.jqplot.getSignificantFigures(this.tickInterval);var aM;if(aF.digitsLeft>=aF.significantDigits){aM="%d"}else{var at=Math.max(0,5-aF.digitsLeft);at=Math.min(at,aF.digitsRight);aM="%."+at+"f"}this._autoFormatString=aM;this.min=aS;this.max=ay}if(this.renderer.constructor==L.jqplot.LinearAxisRenderer&&this._autoFormatString==""){av=this.max-this.min;var a7=new this.tickRenderer(this.tickOptions);var aL=a7.formatString||L.jqplot.config.defaultTickFormatString;var aL=aL.match(L.jqplot.sprintf.regex)[0];var a3=0;if(aL){if(aL.search(/[fFeEgGpP]/)>-1){var aY=aL.match(/\%\.(\d{0,})?[eEfFgGpP]/);if(aY){a3=parseInt(aY[1],10)}else{a3=6}}else{if(aL.search(/[di]/)>-1){a3=0}}var aq=Math.pow(10,-a3);if(this.tickIntervalthis.breakPoints[0]&&aAthis.breakPoints[0]&&aAthis.breakPoints[0]&&aA=this.breakPoints[1]){return(aA-au)*ak/al}else{return(aA+this.breakPoints[1]-this.breakPoints[0]-au)*ak/al}};this.series_p2u=function(aA){return aA*al/ak+au}}}else{this.p2u=function(aA){return(aA-am)*al/ak+at};this.u2p=function(aA){return(aA-at)*ak/al+am};if(this.name=="xaxis"||this.name=="x2axis"){this.series_u2p=function(aA){return(aA-at)*ak/al};this.series_p2u=function(aA){return aA*al/ak+at}}else{this.series_u2p=function(aA){return(aA-au)*ak/al};this.series_p2u=function(aA){return aA*al/ak+au}}}if(this.show){if(this.name=="xaxis"||this.name=="x2axis"){for(var av=0;av0){ah=-ap._textRenderer.height*Math.cos(-ap._textRenderer.angle)/2}else{ah=-ap.getHeight()+ap._textRenderer.height*Math.cos(ap._textRenderer.angle)/2}break;case"middle":ah=-ap.getHeight()/2;break;default:ah=-ap.getHeight()/2;break}}else{ah=-ap.getHeight()/2}var az=this.u2p(ap.value)+ah+"px";ap._elem.css("top",az);ap.pack()}}if(aq){var aw=this._label._elem.outerHeight(true);this._label._elem.css("top",ao-ak/2-aw/2+"px");if(this.name=="yaxis"){this._label._elem.css("left","0px")}else{this._label._elem.css("right","0px")}this._label.pack()}}}ay=null};function i(ai){var ah;ai=Math.abs(ai);if(ai>=10){ah="%d"}else{if(ai>1){if(ai===parseInt(ai,10)){ah="%d"}else{ah="%.1f"}}else{var aj=-Math.floor(Math.log(ai)/Math.LN10);ah="%."+aj+"f"}}return ah}var b=[0.1,0.2,0.3,0.4,0.5,0.8,1,2,3,4,5];var c=function(ai){var ah=b.indexOf(ai);if(ah>0){return b[ah-1]}else{return b[b.length-1]/100}};var k=function(ai){var ah=b.indexOf(ai);if(ah5){ah=10*aj}else{if(am>2){ah=5*aj}else{if(am>1){ah=2*aj}else{ah=aj}}}}else{if(am>5){ah=10*aj}else{if(am>4){ah=5*aj}else{if(am>3){ah=4*aj}else{if(am>2){ah=3*aj}else{if(am>1){ah=2*aj}else{ah=aj}}}}}}return ah}function Q(ai,ah){ah=ah||1;var ak=Math.floor(Math.log(ai)/Math.LN10);var am=Math.pow(10,ak);var al=ai/am;var aj;al=al/ah;if(al<=0.38){aj=0.1}else{if(al<=1.6){aj=0.2}else{if(al<=4){aj=0.5}else{if(al<=8){aj=1}else{if(al<=16){aj=2}else{aj=5}}}}}return aj*am}function x(aj,ai){var al=Math.floor(Math.log(aj)/Math.LN10);var an=Math.pow(10,al);var am=aj/an;var ah;var ak;am=am/ai;if(am<=0.38){ak=0.1}else{if(am<=1.6){ak=0.2}else{if(am<=4){ak=0.5}else{if(am<=8){ak=1}else{if(am<=16){ak=2}else{ak=5}}}}}ah=ak*an;return[ah,ak,an]}L.jqplot.LinearTickGenerator=function(an,aq,aj,ak,ao,ar){ao=(ao===null)?false:ao;ar=(ar===null||ao)?false:ar;if(an===aq){aq=(aq)?0:1}aj=aj||1;if(aqat){at=aB}if(ai>aA){aA=ai}})}an.width=at+Number(av);an.height=aA+Number(ax);var ak=an.getContext("2d");ak.save();ak.fillStyle=al;ak.fillRect(0,0,an.width,an.height);ak.restore();ak.translate(au,ar);ak.textAlign="left";ak.textBaseline="top";function aC(aE){var aF=parseInt(L(aE).css("line-height"),10);if(isNaN(aF)){aF=parseInt(L(aE).css("font-size"),10)*1.2}return aF}function aD(aF,aE,aS,aG,aO,aH){var aQ=aC(aF);var aK=L(aF).innerWidth();var aL=L(aF).innerHeight();var aN=aS.split(/\s+/);var aR=aN.length;var aP="";var aM=[];var aU=aO;var aT=aG;for(var aJ=0;aJaK){aM.push(aJ);aP="";aJ--}}if(aM.length===0){if(L(aF).css("textAlign")==="center"){aT=aG+(aH-aE.measureText(aP).width)/2-au}aE.fillText(aS,aT,aO)}else{aP=aN.slice(0,aM[0]).join(" ");if(L(aF).css("textAlign")==="center"){aT=aG+(aH-aE.measureText(aP).width)/2-au}aE.fillText(aP,aT,aU);aU+=aQ;for(var aJ=1,aI=aM.length;aJ0){ak.strokeRect(aI,aL,L(aG).innerWidth(),L(aG).innerHeight())}L(aG).find("div.jqplot-table-legend-swatch-outline").each(function(){var aU=L(this);ak.strokeStyle=aU.css("border-top-color");var aQ=aI+aU.position().left;var aR=aL+aU.position().top;ak.strokeRect(aQ,aR,aU.innerWidth(),aU.innerHeight());aQ+=parseInt(aU.css("padding-left"),10);aR+=parseInt(aU.css("padding-top"),10);var aT=aU.innerHeight()-2*parseInt(aU.css("padding-top"),10);var aP=aU.innerWidth()-2*parseInt(aU.css("padding-left"),10);var aS=aU.children("div.jqplot-table-legend-swatch");ak.fillStyle=aS.css("background-color");ak.fillRect(aQ,aR,aP,aT)});L(aG).find("td.jqplot-table-legend-label").each(function(){var aR=L(this);var aP=aI+aR.position().left;var aQ=aL+aR.position().top+parseInt(aR.css("padding-top"),10);ak.font=aR.jqplotGetComputedFontStyle();ak.fillStyle=aR.css("color");aD(aR,ak,aR.text(),aP,aQ,aM)});var aH=null}else{if(aN=="canvas"){ak.drawImage(aG,aI,aL)}}}}L(this).children().each(function(){aw(this,av,ax)});return an};L.fn.jqplotToImageStr=function(ai){var ah=L(this).jqplotToImageCanvas(ai);if(ah){return ah.toDataURL("image/png")}else{return null}};L.fn.jqplotToImageElem=function(ah){var ai=document.createElement("img");var aj=L(this).jqplotToImageStr(ah);ai.src=aj;return ai};L.fn.jqplotToImageElemStr=function(ah){var ai="";return ai};L.fn.jqplotSaveImage=function(){var ah=L(this).jqplotToImageStr({});if(ah){window.location.href=ah.replace("image/png","image/octet-stream")}};L.fn.jqplotViewImage=function(){var ai=L(this).jqplotToImageElemStr({});var aj=L(this).jqplotToImageStr({});if(ai){var ah=window.open("");ah.document.open("image/png");ah.document.write(ai);ah.document.close();ah=null}};var ag=function(){this.syntax=ag.config.syntax;this._type="jsDate";this.proxy=new Date();this.options={};this.locale=ag.regional.getLocale();this.formatString="";this.defaultCentury=ag.config.defaultCentury;switch(arguments.length){case 0:break;case 1:if(l(arguments[0])=="[object Object]"&&arguments[0]._type!="jsDate"){var aj=this.options=arguments[0];this.syntax=aj.syntax||this.syntax;this.defaultCentury=aj.defaultCentury||this.defaultCentury;this.proxy=ag.createDate(aj.date)}else{this.proxy=ag.createDate(arguments[0])}break;default:var ah=[];for(var ai=0;ai0?"floor":"ceil"](ak))};ag.prototype.getAbbrDayName=function(){return ag.regional[this.locale]["dayNamesShort"][this.proxy.getDay()]};ag.prototype.getAbbrMonthName=function(){return ag.regional[this.locale]["monthNamesShort"][this.proxy.getMonth()]};ag.prototype.getAMPM=function(){return this.proxy.getHours()>=12?"PM":"AM"};ag.prototype.getAmPm=function(){return this.proxy.getHours()>=12?"pm":"am"};ag.prototype.getCentury=function(){return parseInt(this.proxy.getFullYear()/100,10)};ag.prototype.getDate=function(){return this.proxy.getDate()};ag.prototype.getDay=function(){return this.proxy.getDay()};ag.prototype.getDayOfWeek=function(){var ah=this.proxy.getDay();return ah===0?7:ah};ag.prototype.getDayOfYear=function(){var ai=this.proxy;var ah=ai-new Date(""+ai.getFullYear()+"/1/1 GMT");ah+=ai.getTimezoneOffset()*60000;ai=null;return parseInt(ah/60000/60/24,10)+1};ag.prototype.getDayName=function(){return ag.regional[this.locale]["dayNames"][this.proxy.getDay()]};ag.prototype.getFullWeekOfYear=function(){var ak=this.proxy;var ah=this.getDayOfYear();var aj=6-ak.getDay();var ai=parseInt((ah+aj)/7,10);return ai};ag.prototype.getFullYear=function(){return this.proxy.getFullYear()};ag.prototype.getGmtOffset=function(){var ah=this.proxy.getTimezoneOffset()/60;var ai=ah<0?"+":"-";ah=Math.abs(ah);return ai+N(Math.floor(ah),2)+":"+N((ah%1)*60,2)};ag.prototype.getHours=function(){return this.proxy.getHours()};ag.prototype.getHours12=function(){var ah=this.proxy.getHours();return ah>12?ah-12:(ah==0?12:ah)};ag.prototype.getIsoWeek=function(){var ak=this.proxy;var aj=this.getWeekOfYear();var ah=(new Date(""+ak.getFullYear()+"/1/1")).getDay();var ai=aj+(ah>4||ah<=1?0:1);if(ai==53&&(new Date(""+ak.getFullYear()+"/12/31")).getDay()<4){ai=1}else{if(ai===0){ak=new ag(new Date(""+(ak.getFullYear()-1)+"/12/31"));ai=ak.getIsoWeek()}}ak=null;return ai};ag.prototype.getMilliseconds=function(){return this.proxy.getMilliseconds()};ag.prototype.getMinutes=function(){return this.proxy.getMinutes()};ag.prototype.getMonth=function(){return this.proxy.getMonth()};ag.prototype.getMonthName=function(){return ag.regional[this.locale]["monthNames"][this.proxy.getMonth()]};ag.prototype.getMonthNumber=function(){return this.proxy.getMonth()+1};ag.prototype.getSeconds=function(){return this.proxy.getSeconds()};ag.prototype.getShortYear=function(){return this.proxy.getYear()%100};ag.prototype.getTime=function(){return this.proxy.getTime()};ag.prototype.getTimezoneAbbr=function(){return this.proxy.toString().replace(/^.*\(([^)]+)\)$/,"$1")};ag.prototype.getTimezoneName=function(){var ah=/(?:\((.+)\)$| ([A-Z]{3}) )/.exec(this.toString());return ah[1]||ah[2]||"GMT"+this.getGmtOffset()};ag.prototype.getTimezoneOffset=function(){return this.proxy.getTimezoneOffset()};ag.prototype.getWeekOfYear=function(){var ah=this.getDayOfYear();var aj=7-this.getDayOfWeek();var ai=parseInt((ah+aj)/7,10);return ai};ag.prototype.getUnix=function(){return Math.round(this.proxy.getTime()/1000,0)};ag.prototype.getYear=function(){return this.proxy.getYear()};ag.prototype.next=function(ah){ah=ah||"day";return this.clone().add(1,ah)};ag.prototype.set=function(){switch(arguments.length){case 0:this.proxy=new Date();break;case 1:if(l(arguments[0])=="[object Object]"&&arguments[0]._type!="jsDate"){var aj=this.options=arguments[0];this.syntax=aj.syntax||this.syntax;this.defaultCentury=aj.defaultCentury||this.defaultCentury;this.proxy=ag.createDate(aj.date)}else{this.proxy=ag.createDate(arguments[0])}break;default:var ah=[];for(var ai=0;ai0?"floor":"ceil"](ah/12));var ai=aj.getMonth()+(ah%12);if(ai==12){ai=0;aj.setYear(aj.getFullYear()+1)}else{if(ai==-1){ai=11;aj.setYear(aj.getFullYear()-1)}}aj.setMonth(ai)},diff:function(al,aj){var ah=al.getFullYear()-aj.getFullYear();var ai=al.getMonth()-aj.getMonth()+(ah*12);var ak=al.getDate()-aj.getDate();return ai+(ak/30)}},year:{add:function(ai,ah){ai.setYear(ai.getFullYear()+Math[ah>0?"floor":"ceil"](ah))},diff:function(ai,ah){return E.month.diff(ai,ah)/12}}};for(var Y in E){if(Y.substring(Y.length-1)!="s"){E[Y+"s"]=E[Y]}}var H=function(al,ak,ai){if(ag.formats[ai]["shortcuts"][ak]){return ag.strftime(al,ag.formats[ai]["shortcuts"][ak],ai)}else{var ah=(ag.formats[ai]["codes"][ak]||"").split(".");var aj=al["get"+ah[0]]?al["get"+ah[0]]():"";if(ah[1]){aj=N(aj,ah[1])}return aj}};ag.strftime=function(an,ak,aj,ao){var ai="perl";var am=ag.regional.getLocale();if(aj&&ag.formats.hasOwnProperty(aj)){ai=aj}else{if(aj&&ag.regional.hasOwnProperty(aj)){am=aj}}if(ao&&ag.formats.hasOwnProperty(ao)){ai=ao}else{if(ao&&ag.regional.hasOwnProperty(ao)){am=ao}}if(l(an)!="[object Object]"||an._type!="jsDate"){an=new ag(an);an.locale=am}if(!ak){ak=an.formatString||ag.regional[am]["formatString"]}var ah=ak||"%Y-%m-%d",ap="",al;while(ah.length>0){if(al=ah.match(ag.formats[ai].codes.matcher)){ap+=ah.slice(0,al.index);ap+=(al[1]||"")+H(an,al[2],ai);ah=ah.slice(al.index+al[0].length)}else{ap+=ah;ah=""}}return ap};ag.formats={ISO:"%Y-%m-%dT%H:%M:%S.%N%G",SQL:"%Y-%m-%d %H:%M:%S"};ag.formats.perl={codes:{matcher:/()%(#?(%|[a-z]))/i,Y:"FullYear",y:"ShortYear.2",m:"MonthNumber.2","#m":"MonthNumber",B:"MonthName",b:"AbbrMonthName",d:"Date.2","#d":"Date",e:"Date",A:"DayName",a:"AbbrDayName",w:"Day",H:"Hours.2","#H":"Hours",I:"Hours12.2","#I":"Hours12",p:"AMPM",M:"Minutes.2","#M":"Minutes",S:"Seconds.2","#S":"Seconds",s:"Unix",N:"Milliseconds.3","#N":"Milliseconds",O:"TimezoneOffset",Z:"TimezoneName",G:"GmtOffset"},shortcuts:{F:"%Y-%m-%d",T:"%H:%M:%S",X:"%H:%M:%S",x:"%m/%d/%y",D:"%m/%d/%y","#c":"%a %b %e %H:%M:%S %Y",v:"%e-%b-%Y",R:"%H:%M",r:"%I:%M:%S %p",t:"\t",n:"\n","%":"%"}};ag.formats.php={codes:{matcher:/()%((%|[a-z]))/i,a:"AbbrDayName",A:"DayName",d:"Date.2",e:"Date",j:"DayOfYear.3",u:"DayOfWeek",w:"Day",U:"FullWeekOfYear.2",V:"IsoWeek.2",W:"WeekOfYear.2",b:"AbbrMonthName",B:"MonthName",m:"MonthNumber.2",h:"AbbrMonthName",C:"Century.2",y:"ShortYear.2",Y:"FullYear",H:"Hours.2",I:"Hours12.2",l:"Hours12",p:"AMPM",P:"AmPm",M:"Minutes.2",S:"Seconds.2",s:"Unix",O:"TimezoneOffset",z:"GmtOffset",Z:"TimezoneAbbr"},shortcuts:{D:"%m/%d/%y",F:"%Y-%m-%d",T:"%H:%M:%S",X:"%H:%M:%S",x:"%m/%d/%y",R:"%H:%M",r:"%I:%M:%S %p",t:"\t",n:"\n","%":"%"}};ag.createDate=function(aj){if(aj==null){return new Date()}if(aj instanceof Date){return aj}if(typeof aj=="number"){return new Date(aj)}var ao=String(aj).replace(/^\s*(.+)\s*$/g,"$1");ao=ao.replace(/^([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,4})/,"$1/$2/$3");ao=ao.replace(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{4})/i,"$1 $2 $3");var an=ao.match(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{2})\D*/i);if(an&&an.length>3){var at=parseFloat(an[3]);var am=ag.config.defaultCentury+at;am=String(am);ao=ao.replace(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{2})\D*/i,an[1]+" "+an[2]+" "+am)}an=ao.match(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})[^0-9]/);function ar(ax,aw){var aC=parseFloat(aw[1]);var aB=parseFloat(aw[2]);var aA=parseFloat(aw[3]);var az=ag.config.defaultCentury;var av,au,aD,ay;if(aC>31){au=aA;aD=aB;av=az+aC}else{au=aB;aD=aC;av=az+aA}ay=aD+"/"+au+"/"+av;return ax.replace(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})/,ay)}if(an&&an.length>3){ao=ar(ao,an)}var an=ao.match(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})$/);if(an&&an.length>3){ao=ar(ao,an)}var al=0;var ai=ag.matchers.length;var aq,ah,ap=ao,ak;while(al31){ah=an;ai=am+ao}else{ah=ao;ai=am+an}var ap=ab(aj[2],ag.regional[ag.regional.getLocale()]["monthNamesShort"]);if(ap==-1){ap=ab(aj[2],ag.regional[ag.regional.getLocale()]["monthNames"])}ak.setFullYear(ai,ap,ah);ak.setHours(0,0,0,0);return ak}else{return al}}];function ab(aj,ak){if(ak.indexOf){return ak.indexOf(aj)}for(var ah=0,ai=ak.length;ah=ap)?"":Array(1+ap-au.length>>>0).join(aq);return at?au+ar:ar+au}function ak(ar){var aq=new String(ar);for(var ap=10;ap>0;ap--){if(aq==(aq=aq.replace(/^(\d+)(\d{3})/,"$1"+L.jqplot.sprintf.thousandsSeparator+"$2"))){break}}return aq}function aj(av,au,ax,ar,at,aq){var aw=ar-av.length;if(aw>0){var ap=" ";if(aq){ap=" "}if(ax||!at){av=an(av,ar,ap,ax)}else{av=av.slice(0,au.length)+an("",aw,"0",true)+av.slice(au.length)}}return av}function ao(ay,aq,aw,ar,ap,av,ax,au){var at=ay>>>0;aw=aw&&at&&{"2":"0b","8":"0","16":"0x"}[aq]||"";ay=aw+an(at.toString(aq),av||0,"0",false);return aj(ay,aw,ar,ap,ax,au)}function ah(au,av,ar,ap,at,aq){if(ap!=null){au=au.slice(0,ap)}return aj(au,"",av,ar,at,aq)}var ai=arguments,al=0,am=ai[al++];return am.replace(L.jqplot.sprintf.regex,function(aM,ax,ay,aB,aO,aJ,av){if(aM=="%%"){return"%"}var aD=false,az="",aA=false,aL=false,aw=false,au=false;for(var aI=0;ay&&aI-1?6:(av=="d")?0:void (0)}else{if(aJ=="*"){aJ=+ai[al++]}else{if(aJ.charAt(0)=="*"){aJ=+ai[aJ.slice(1,-1)]}else{aJ=+aJ}}}var aF=ax?ai[ax.slice(0,-1)]:ai[al++];switch(av){case"s":if(aF==null){return""}return ah(String(aF),aD,aB,aJ,aA,aw);case"c":return ah(String.fromCharCode(+aF),aD,aB,aJ,aA,aw);case"b":return ao(aF,2,aL,aD,aB,aJ,aA,aw);case"o":return ao(aF,8,aL,aD,aB,aJ,aA,aw);case"x":return ao(aF,16,aL,aD,aB,aJ,aA,aw);case"X":return ao(aF,16,aL,aD,aB,aJ,aA,aw).toUpperCase();case"u":return ao(aF,10,aL,aD,aB,aJ,aA,aw);case"i":var ar=parseInt(+aF,10);if(isNaN(ar)){return""}var aH=ar<0?"-":az;var aK=au?ak(String(Math.abs(ar))):String(Math.abs(ar));aF=aH+an(aK,aJ,"0",false);return aj(aF,aH,aD,aB,aA,aw);case"d":var ar=Math.round(+aF);if(isNaN(ar)){return""}var aH=ar<0?"-":az;var aK=au?ak(String(Math.abs(ar))):String(Math.abs(ar));aF=aH+an(aK,aJ,"0",false);return aj(aF,aH,aD,aB,aA,aw);case"e":case"E":case"f":case"F":case"g":case"G":var ar=+aF;if(isNaN(ar)){return""}var aH=ar<0?"-":az;var at=["toExponential","toFixed","toPrecision"]["efg".indexOf(av.toLowerCase())];var aN=["toString","toUpperCase"]["eEfFgG".indexOf(av)%2];var aK=Math.abs(ar)[at](aJ);var aE=aK.toString().split(".");aE[0]=au?ak(aE[0]):aE[0];aK=aE.join(L.jqplot.sprintf.decimalMark);aF=aH+aK;var aC=aj(aF,aH,aD,aB,aA,aw)[aN]();return aC;case"p":case"P":var ar=+aF;if(isNaN(ar)){return""}var aH=ar<0?"-":az;var aE=String(Number(Math.abs(ar)).toExponential()).split(/e|E/);var aq=(aE[0].indexOf(".")!=-1)?aE[0].length-1:String(ar).length;var aG=(aE[1]<0)?-aE[1]-1:0;if(Math.abs(ar)<1){if(aq+aG<=aJ){aF=aH+Math.abs(ar).toPrecision(aq)}else{if(aq<=aJ-1){aF=aH+Math.abs(ar).toExponential(aq-1)}else{aF=aH+Math.abs(ar).toExponential(aJ-1)}}}else{var ap=(aq<=aJ)?aq:aJ;aF=aH+Math.abs(ar).toPrecision(ap)}var aN=["toString","toUpperCase"]["pP".indexOf(av)%2];return aj(aF,aH,aD,aB,aA,aw)[aN]();case"n":return"";default:return aM}})};L.jqplot.sprintf.thousandsSeparator=",";L.jqplot.sprintf.decimalMark=".";L.jqplot.sprintf.regex=/%%|%(\d+\$)?([-+#0&\' ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([nAscboxXuidfegpEGP])/g;L.jqplot.getSignificantFigures=function(al){var an=String(Number(Math.abs(al)).toExponential()).split(/e|E/);var am=(an[0].indexOf(".")!=-1)?an[0].length-1:an[0].length;var ai=(an[1]<0)?-an[1]-1:0;var ah=parseInt(an[1],10);var aj=(ah+1>0)?ah+1:0;var ak=(am<=aj)?0:am-ah-1;return{significantDigits:am,digitsLeft:aj,digitsRight:ak,zeros:ai,exponent:ah}};L.jqplot.getPrecision=function(ah){return L.jqplot.getSignificantFigures(ah).digitsRight};var X=L.uiBackCompat!==false;L.jqplot.effects={effect:{}};var m="jqplot.storage.";L.extend(L.jqplot.effects,{version:"1.9pre",save:function(ai,aj){for(var ah=0;ah").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),ah={width:ai.width(),height:ai.height()},ak=document.activeElement;ai.wrap(al);if(ai[0]===ak||L.contains(ai[0],ak)){L(ak).focus()}al=ai.parent();if(ai.css("position")==="static"){al.css({position:"relative"});ai.css({position:"relative"})}else{L.extend(aj,{position:ai.css("position"),zIndex:ai.css("z-index")});L.each(["top","left","bottom","right"],function(am,an){aj[an]=ai.css(an);if(isNaN(parseInt(aj[an],10))){aj[an]="auto"}});ai.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}ai.css(ah);return al.css(aj).show()},removeWrapper:function(ah){var ai=document.activeElement;if(ah.parent().is(".ui-effects-wrapper")){ah.parent().replaceWith(ah);if(ah[0]===ai||L.contains(ah[0],ai)){L(ai).focus()}}return ah}});function j(ai,ah,aj,ak){if(L.isPlainObject(ai)){return ai}ai={effect:ai};if(ah===u){ah={}}if(L.isFunction(ah)){ak=ah;aj=null;ah={}}if(L.type(ah)==="number"||L.fx.speeds[ah]){ak=aj;aj=ah;ah={}}if(L.isFunction(aj)){ak=aj;aj=null}if(ah){L.extend(ai,ah)}aj=aj||ah.duration;ai.duration=L.fx.off?0:typeof aj==="number"?aj:aj in L.fx.speeds?L.fx.speeds[aj]:L.fx.speeds._default;ai.complete=ak||ah.complete;return ai}function ae(ah){if(!ah||typeof ah==="number"||L.fx.speeds[ah]){return true}if(typeof ah==="string"&&!L.jqplot.effects.effect[ah]){if(X&&L.jqplot.effects[ah]){return false}return true}return false}L.fn.extend({jqplotEffect:function(ap,aq,ai,ao){var an=j.apply(this,arguments),ak=an.mode,al=an.queue,am=L.jqplot.effects.effect[an.effect],ah=!am&&X&&L.jqplot.effects[an.effect];if(L.fx.off||!(am||ah)){if(ak){return this[ak](an.duration,an.complete)}else{return this.each(function(){if(an.complete){an.complete.call(this)}})}}function aj(au){var av=L(this),at=an.complete,aw=an.mode;function ar(){if(L.isFunction(at)){at.call(av[0])}if(L.isFunction(au)){au()}}if(av.is(":hidden")?aw==="hide":aw==="show"){ar()}else{am.call(av[0],an,ar)}}if(am){return al===false?this.each(aj):this.queue(al||"fx",aj)}else{return ah.call(this,{options:an,duration:an.duration,callback:an.complete,mode:an.mode})}}});var a=/up|down|vertical/,v=/up|left|vertical|horizontal/;L.jqplot.effects.effect.blind=function(aj,ao){var ak=L(this),ar=["position","top","bottom","left","right","height","width"],ap=L.jqplot.effects.setMode(ak,aj.mode||"hide"),au=aj.direction||"up",am=a.test(au),al=am?"height":"width",aq=am?"top":"left",aw=v.test(au),an={},av=ap==="show",ai,ah,at;if(ak.parent().is(".ui-effects-wrapper")){L.jqplot.effects.save(ak.parent(),ar)}else{L.jqplot.effects.save(ak,ar)}ak.show();at=parseInt(ak.css("top"),10);ai=L.jqplot.effects.createWrapper(ak).css({overflow:"hidden"});ah=am?ai[al]()+at:ai[al]();an[al]=av?String(ah):"0";if(!aw){ak.css(am?"bottom":"right",0).css(am?"top":"left","").css({position:"absolute"});an[aq]=av?"0":String(ah)}if(av){ai.css(al,0);if(!aw){ai.css(aq,ah)}}ai.animate(an,{duration:aj.duration,easing:aj.easing,queue:false,complete:function(){if(ap==="hide"){ak.hide()}L.jqplot.effects.restore(ak,ar);L.jqplot.effects.removeWrapper(ak);ao()}})}})(jQuery); -/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com - jsDate | (c) 2010-2013 Chris Leonello -*/(function(f){f.jqplot.Trendline=function(){this.show=f.jqplot.config.enablePlugins;this.color="#666666";this.renderer=new f.jqplot.LineRenderer();this.rendererOptions={marker:{show:false}};this.label="";this.type="linear";this.shadow=true;this.markerRenderer={show:false};this.lineWidth=1.5;this.shadowAngle=45;this.shadowOffset=1;this.shadowAlpha=0.07;this.shadowDepth=3;this.isTrendline=true};f.jqplot.postSeriesInitHooks.push(e);f.jqplot.postDrawSeriesHooks.push(g);f.jqplot.addLegendRowHooks.push(a);function a(k){var j=null;if(k.trendline&&k.trendline.show){var i=k.trendline.label.toString();if(i){j={label:i,color:k.trendline.color}}}return j}function e(m,k,j,i,l){if(this._type&&(this._type==="line"||this._type=="bar")){this.trendline=new f.jqplot.Trendline();i=i||{};f.extend(true,this.trendline,{color:this.color},j.trendline,i.trendline);this.trendline.renderer.init.call(this.trendline,null)}}function g(m,i){i=f.extend(true,{},this.trendline,i);if(this.trendline&&i.show){var k;var l=i.data||this.data;k=c(l,this.trendline.type);var j=i.gridData||this.renderer.makeGridData.call(this,k.data);this.trendline.renderer.draw.call(this.trendline,m,j,{showLine:true,shadow:this.trendline.shadow})}}function b(w,v,n){var u=(n==null)?"linear":n;var s=w.length;var t;var z;var o=0;var m=0;var r=0;var q=0;var l=0;var j=[];var k=[];if(u=="linear"){k=w;j=v}else{if(u=="exp"||u=="exponential"){for(var p=0;p570)?o[p]*0.8:o[p]+0.3*(255-o[p]);o[p]=parseInt(o[p],10)}this.highlightColors.push("rgb("+o[0]+","+o[1]+","+o[2]+")")}}this.highlightColorGenerator=new e.jqplot.ColorGenerator(this.highlightColors);u.postParseOptionsHooks.addOnce(m);u.postInitHooks.addOnce(g);u.eventListenerHooks.addOnce("jqplotMouseMove",b);u.eventListenerHooks.addOnce("jqplotMouseDown",a);u.eventListenerHooks.addOnce("jqplotMouseUp",l);u.eventListenerHooks.addOnce("jqplotClick",f);u.eventListenerHooks.addOnce("jqplotRightClick",n);u.postDrawHooks.addOnce(i)};e.jqplot.PieRenderer.prototype.setGridData=function(t){var p=[];var u=[];var o=this.startAngle/180*Math.PI;var s=0;this._drawData=false;for(var r=0;r0){p[r]+=p[r-1]}s+=this.data[r][1]}var q=Math.PI*2/p[p.length-1];for(var r=0;r0){p[r]+=p[r-1]}s+=t[r][1]}var q=Math.PI*2/p[p.length-1];for(var r=0;r0&&s>0.01&&s<6.282){w=parseFloat(p)/2/h(q)}return w}e.jqplot.PieRenderer.prototype.drawSlice=function(B,z,y,u,w){if(this._drawData){var p=this._radius;var A=this.fill;var x=this.lineWidth;var s=this.sliceMargin;if(this.fill==false){s+=this.lineWidth}B.save();B.translate(this._center[0],this._center[1]);var D=j(z,y,this.sliceMargin,this.fill,this.lineWidth);var o=D*Math.cos((z+y)/2);var C=D*Math.sin((z+y)/2);if((y-z)<=Math.PI){p-=D}else{p+=D}B.translate(o,C);if(w){for(var v=0,t=this.shadowDepth;v6.282+this.startAngle){y=6.282+this.startAngle;if(z>y){z=6.281+this.startAngle}}if(z>=y){return}B.beginPath();B.fillStyle=u;B.strokeStyle=u;B.lineWidth=x;B.arc(0,0,r,z,y,false);B.lineTo(0,0);B.closePath();if(A){B.fill()}else{B.stroke()}}};e.jqplot.PieRenderer.prototype.draw=function(B,z,E,o){var W;var H=(E!=undefined)?E:{};var t=0;var s=0;var N=1;var L=new e.jqplot.ColorGenerator(this.seriesColors);if(E.legendInfo&&E.legendInfo.placement=="insideGrid"){var J=E.legendInfo;switch(J.location){case"nw":t=J.width+J.xoffset;break;case"w":t=J.width+J.xoffset;break;case"sw":t=J.width+J.xoffset;break;case"ne":t=J.width+J.xoffset;N=-1;break;case"e":t=J.width+J.xoffset;N=-1;break;case"se":t=J.width+J.xoffset;N=-1;break;case"n":s=J.height+J.yoffset;break;case"s":s=J.height+J.yoffset;N=-1;break;default:break}}var K=(H.shadow!=undefined)?H.shadow:this.shadow;var A=(H.fill!=undefined)?H.fill:this.fill;var C=B.canvas.width;var I=B.canvas.height;var Q=C-t-2*this.padding;var X=I-s-2*this.padding;var M=Math.min(Q,X);var Y=M;this._sliceAngles=[];var v=this.sliceMargin;if(this.fill==false){v+=this.lineWidth}var q;var G=0;var R,aa,Z,ab;var D=this.startAngle/180*Math.PI;for(var W=0,V=z.length;WMath.PI){G=Math.max(q,G)}}if(this.diameter!=null&&this.diameter>0){this._diameter=this.diameter-2*G}else{this._diameter=Y-2*G}if(this._diameter<6){e.jqplot.log("Diameter of pie too small, not rendering.");return}var S=this._radius=this._diameter/2;this._center=[(C-N*t)/2+N*t+G*Math.cos(D),(I-N*s)/2+N*s+G*Math.sin(D)];if(this.shadow){for(var W=0,V=z.length;W=this.dataLabelThreshold){var F,U=(this._sliceAngles[W][0]+this._sliceAngles[W][1])/2,T;if(this.dataLabels=="label"){F=this.dataLabelFormatString||"%s";T=e.jqplot.sprintf(F,z[W][0])}else{if(this.dataLabels=="value"){F=this.dataLabelFormatString||"%d";T=e.jqplot.sprintf(F,this.data[W][1])}else{if(this.dataLabels=="percent"){F=this.dataLabelFormatString||"%d%%";T=e.jqplot.sprintf(F,z[W][2]*100)}else{if(this.dataLabels.constructor==Array){F=this.dataLabelFormatString||"%s";T=e.jqplot.sprintf(F,this.dataLabels[W])}}}}var p=(this._radius)*this.dataLabelPositionFactor+this.sliceMargin+this.dataLabelNudge;var P=this._center[0]+Math.cos(U)*p+this.canvas._offsets.left;var O=this._center[1]+Math.sin(U)*p+this.canvas._offsets.top;var u=e('
'+T+"
").insertBefore(o.eventCanvas._elem);if(this.dataLabelCenterOn){P-=u.width()/2;O-=u.height()/2}else{P-=u.width()*Math.sin(U/2);O-=u.height()/2}P=Math.round(P);O=Math.round(O);u.css({left:P,top:O})}}};e.jqplot.PieAxisRenderer=function(){e.jqplot.LinearAxisRenderer.call(this)};e.jqplot.PieAxisRenderer.prototype=new e.jqplot.LinearAxisRenderer();e.jqplot.PieAxisRenderer.prototype.constructor=e.jqplot.PieAxisRenderer;e.jqplot.PieAxisRenderer.prototype.init=function(o){this.tickRenderer=e.jqplot.PieTickRenderer;e.extend(true,this,o);this._dataBounds={min:0,max:100};this.min=0;this.max=100;this.showTicks=false;this.ticks=[];this.showMark=false;this.show=false};e.jqplot.PieLegendRenderer=function(){e.jqplot.TableLegendRenderer.call(this)};e.jqplot.PieLegendRenderer.prototype=new e.jqplot.TableLegendRenderer();e.jqplot.PieLegendRenderer.prototype.constructor=e.jqplot.PieLegendRenderer;e.jqplot.PieLegendRenderer.prototype.init=function(o){this.numberRows=null;this.numberColumns=null;e.extend(true,this,o)};e.jqplot.PieLegendRenderer.prototype.draw=function(){var r=this;if(this.show){var B=this._series;this._elem=e(document.createElement("table"));this._elem.addClass("jqplot-table-legend");var E={position:"absolute"};if(this.background){E.background=this.background}if(this.border){E.border=this.border}if(this.fontSize){E.fontSize=this.fontSize}if(this.fontFamily){E.fontFamily=this.fontFamily}if(this.textColor){E.textColor=this.textColor}if(this.marginTop!=null){E.marginTop=this.marginTop}if(this.marginBottom!=null){E.marginBottom=this.marginBottom}if(this.marginLeft!=null){E.marginLeft=this.marginLeft}if(this.marginRight!=null){E.marginRight=this.marginRight}this._elem.css(E);var I=false,A=false,o,y;var C=B[0];var p=new e.jqplot.ColorGenerator(C.seriesColors);if(C.show){var J=C.data;if(this.numberRows){o=this.numberRows;if(!this.numberColumns){y=Math.ceil(J.length/o)}else{y=this.numberColumns}}else{if(this.numberColumns){y=this.numberColumns;o=Math.ceil(J.length/this.numberColumns)}else{o=J.length;y=1}}var H,G;var q,w,v;var x,z,F;var D=0;var u,t;for(H=0;H0){I=true}else{I=false}}else{if(H==o-1){I=false}else{I=true}}z=(I)?this.rowSpacing:"0";w=e(document.createElement("td"));w.addClass("jqplot-table-legend jqplot-table-legend-swatch");w.css({textAlign:"center",paddingTop:z});u=e(document.createElement("div"));u.addClass("jqplot-table-legend-swatch-outline");t=e(document.createElement("div"));t.addClass("jqplot-table-legend-swatch");t.css({backgroundColor:F,borderColor:F});w.append(u.append(t));v=e(document.createElement("td"));v.addClass("jqplot-table-legend jqplot-table-legend-label");v.css("paddingTop",z);if(this.escapeHtml){v.text(x)}else{v.html(x)}if(A){v.prependTo(q);w.prependTo(q)}else{w.appendTo(q);v.appendTo(q)}I=true}D++}}}}return this._elem};e.jqplot.PieRenderer.prototype.handleMove=function(q,p,t,s,r){if(s){var o=[s.seriesIndex,s.pointIndex,s.data];r.target.trigger("jqplotDataMouseOver",o);if(r.series[o[0]].highlightMouseOver&&!(o[0]==r.plugins.pieRenderer.highlightedSeriesIndex&&o[1]==r.series[o[0]]._highlightedPoint)){r.target.trigger("jqplotDataHighlight",o);d(r,o[0],o[1])}}else{if(s==null){k(r)}}};function c(s,r,p){p=p||{};p.axesDefaults=p.axesDefaults||{};p.legend=p.legend||{};p.seriesDefaults=p.seriesDefaults||{};var o=false;if(p.seriesDefaults.renderer==e.jqplot.PieRenderer){o=true}else{if(p.series){for(var q=0;qSparkline: 1,4,6,6,8,5,3,5

-* $('.sparkline').sparkline(); -* There must be no spaces in the enclosed data set -* -* Otherwise values must be an array of numbers or null values -*

Sparkline: This text replaced if the browser is compatible

-* $('#sparkline1').sparkline([1,4,6,6,8,5,3,5]) -* $('#sparkline2').sparkline([1,4,6,null,null,5,3,5]) -* -* Values can also be specified in an HTML comment, or as a values attribute: -*

Sparkline:

-*

Sparkline:

-* $('.sparkline').sparkline(); -* -* For line charts, x values can also be specified: -*

Sparkline: 1:1,2.7:4,3.4:6,5:6,6:8,8.7:5,9:3,10:5

-* $('#sparkline1').sparkline([ [1,1], [2.7,4], [3.4,6], [5,6], [6,8], [8.7,5], [9,3], [10,5] ]) -* -* By default, options should be passed in as teh second argument to the sparkline function: -* $('.sparkline').sparkline([1,2,3,4], {type: 'bar'}) -* -* Options can also be set by passing them on the tag itself. This feature is disabled by default though -* as there's a slight performance overhead: -* $('.sparkline').sparkline([1,2,3,4], {enableTagOptions: true}) -*

Sparkline: loading

-* Prefix all options supplied as tag attribute with "spark" (configurable by setting tagOptionPrefix) -* -* Supported options: -* lineColor - Color of the line used for the chart -* fillColor - Color used to fill in the chart - Set to '' or false for a transparent chart -* width - Width of the chart - Defaults to 3 times the number of values in pixels -* height - Height of the chart - Defaults to the height of the containing element -* chartRangeMin - Specify the minimum value to use for the Y range of the chart - Defaults to the minimum value supplied -* chartRangeMax - Specify the maximum value to use for the Y range of the chart - Defaults to the maximum value supplied -* chartRangeClip - Clip out of range values to the max/min specified by chartRangeMin and chartRangeMax -* chartRangeMinX - Specify the minimum value to use for the X range of the chart - Defaults to the minimum value supplied -* chartRangeMaxX - Specify the maximum value to use for the X range of the chart - Defaults to the maximum value supplied -* composite - If true then don't erase any existing chart attached to the tag, but draw -* another chart over the top - Note that width and height are ignored if an -* existing chart is detected. -* tagValuesAttribute - Name of tag attribute to check for data values - Defaults to 'values' -* enableTagOptions - Whether to check tags for sparkline options -* tagOptionPrefix - Prefix used for options supplied as tag attributes - Defaults to 'spark' -* disableHiddenCheck - If set to true, then the plugin will assume that charts will never be drawn into a -* hidden dom element, avoding a browser reflow -* disableInteraction - If set to true then all mouseover/click interaction behaviour will be disabled, -* making the plugin perform much like it did in 1.x -* disableTooltips - If set to true then tooltips will be disabled - Defaults to false (tooltips enabled) -* disableHighlight - If set to true then highlighting of selected chart elements on mouseover will be disabled -* defaults to false (highlights enabled) -* highlightLighten - Factor to lighten/darken highlighted chart values by - Defaults to 1.4 for a 40% increase -* tooltipContainer - Specify which DOM element the tooltip should be rendered into - defaults to document.body -* tooltipClassname - Optional CSS classname to apply to tooltips - If not specified then a default style will be applied -* tooltipOffsetX - How many pixels away from the mouse pointer to render the tooltip on the X axis -* tooltipOffsetY - How many pixels away from the mouse pointer to render the tooltip on the r axis -* tooltipFormatter - Optional callback that allows you to override the HTML displayed in the tooltip -* callback is given arguments of (sparkline, options, fields) -* tooltipChartTitle - If specified then the tooltip uses the string specified by this setting as a title -* tooltipFormat - A format string or SPFormat object (or an array thereof for multiple entries) -* to control the format of the tooltip -* tooltipPrefix - A string to prepend to each field displayed in a tooltip -* tooltipSuffix - A string to append to each field displayed in a tooltip -* tooltipSkipNull - If true then null values will not have a tooltip displayed (defaults to true) -* tooltipValueLookups - An object or range map to map field values to tooltip strings -* (eg. to map -1 to "Lost", 0 to "Draw", and 1 to "Win") -* numberFormatter - Optional callback for formatting numbers in tooltips -* numberDigitGroupSep - Character to use for group separator in numbers "1,234" - Defaults to "," -* numberDecimalMark - Character to use for the decimal point when formatting numbers - Defaults to "." -* numberDigitGroupCount - Number of digits between group separator - Defaults to 3 -* -* There are 7 types of sparkline, selected by supplying a "type" option of 'line' (default), -* 'bar', 'tristate', 'bullet', 'discrete', 'pie' or 'box' -* line - Line chart. Options: -* spotColor - Set to '' to not end each line in a circular spot -* minSpotColor - If set, color of spot at minimum value -* maxSpotColor - If set, color of spot at maximum value -* spotRadius - Radius in pixels -* lineWidth - Width of line in pixels -* normalRangeMin -* normalRangeMax - If set draws a filled horizontal bar between these two values marking the "normal" -* or expected range of values -* normalRangeColor - Color to use for the above bar -* drawNormalOnTop - Draw the normal range above the chart fill color if true -* defaultPixelsPerValue - Defaults to 3 pixels of width for each value in the chart -* highlightSpotColor - The color to use for drawing a highlight spot on mouseover - Set to null to disable -* highlightLineColor - The color to use for drawing a highlight line on mouseover - Set to null to disable -* valueSpots - Specify which points to draw spots on, and in which color. Accepts a range map -* -* bar - Bar chart. Options: -* barColor - Color of bars for postive values -* negBarColor - Color of bars for negative values -* zeroColor - Color of bars with zero values -* nullColor - Color of bars with null values - Defaults to omitting the bar entirely -* barWidth - Width of bars in pixels -* colorMap - Optional mappnig of values to colors to override the *BarColor values above -* can be an Array of values to control the color of individual bars or a range map -* to specify colors for individual ranges of values -* barSpacing - Gap between bars in pixels -* zeroAxis - Centers the y-axis around zero if true -* -* tristate - Charts values of win (>0), lose (<0) or draw (=0) -* posBarColor - Color of win values -* negBarColor - Color of lose values -* zeroBarColor - Color of draw values -* barWidth - Width of bars in pixels -* barSpacing - Gap between bars in pixels -* colorMap - Optional mappnig of values to colors to override the *BarColor values above -* can be an Array of values to control the color of individual bars or a range map -* to specify colors for individual ranges of values -* -* discrete - Options: -* lineHeight - Height of each line in pixels - Defaults to 30% of the graph height -* thesholdValue - Values less than this value will be drawn using thresholdColor instead of lineColor -* thresholdColor -* -* bullet - Values for bullet graphs msut be in the order: target, performance, range1, range2, range3, ... -* options: -* targetColor - The color of the vertical target marker -* targetWidth - The width of the target marker in pixels -* performanceColor - The color of the performance measure horizontal bar -* rangeColors - Colors to use for each qualitative range background color -* -* pie - Pie chart. Options: -* sliceColors - An array of colors to use for pie slices -* offset - Angle in degrees to offset the first slice - Try -90 or +90 -* borderWidth - Width of border to draw around the pie chart, in pixels - Defaults to 0 (no border) -* borderColor - Color to use for the pie chart border - Defaults to #000 -* -* box - Box plot. Options: -* raw - Set to true to supply pre-computed plot points as values -* values should be: low_outlier, low_whisker, q1, median, q3, high_whisker, high_outlier -* When set to false you can supply any number of values and the box plot will -* be computed for you. Default is false. -* showOutliers - Set to true (default) to display outliers as circles -* outlierIQR - Interquartile range used to determine outliers. Default 1.5 -* boxLineColor - Outline color of the box -* boxFillColor - Fill color for the box -* whiskerColor - Line color used for whiskers -* outlierLineColor - Outline color of outlier circles -* outlierFillColor - Fill color of the outlier circles -* spotRadius - Radius of outlier circles -* medianColor - Line color of the median line -* target - Draw a target cross hair at the supplied value (default undefined) -* -* -* -* Examples: -* $('#sparkline1').sparkline(myvalues, { lineColor: '#f00', fillColor: false }); -* $('.barsparks').sparkline('html', { type:'bar', height:'40px', barWidth:5 }); -* $('#tristate').sparkline([1,1,-1,1,0,0,-1], { type:'tristate' }): -* $('#discrete').sparkline([1,3,4,5,5,3,4,5], { type:'discrete' }); -* $('#bullet').sparkline([10,12,12,9,7], { type:'bullet' }); -* $('#pie').sparkline([1,1,2], { type:'pie' }); -*/ - -/*jslint regexp: true, browser: true, jquery: true, white: true, nomen: false, plusplus: false, maxerr: 500, indent: 4 */ - -(function(document, Math, undefined) { // performance/minified-size optimization -(function(factory) { - if(typeof define === 'function' && define.amd) { - define(['jquery'], factory); - } else if (jQuery && !jQuery.fn.sparkline) { - factory(jQuery); - } -}; -(function($) { - 'use strict'; - - var UNSET_OPTION = {}, - getDefaults, createClass, SPFormat, clipval, quartile, normalizeValue, normalizeValues, - remove, isNumber, all, sum, addCSS, ensureArray, formatNumber, RangeMap, - MouseHandler, Tooltip, barHighlightMixin, - line, bar, tristate, discrete, bullet, pie, box, defaultStyles, initStyles, - VShape, VCanvas_base, VCanvas_canvas, VCanvas_vml, pending, shapeCount = 0; - - /** - * Default configuration settings - */ - getDefaults = function () { - return { - // Settings common to most/all chart types - common: { - type: 'line', - lineColor: '#00f', - fillColor: '#cdf', - defaultPixelsPerValue: 3, - width: 'auto', - height: 'auto', - composite: false, - tagValuesAttribute: 'values', - tagOptionsPrefix: 'spark', - enableTagOptions: false, - enableHighlight: true, - highlightLighten: 1.4, - tooltipSkipNull: true, - tooltipPrefix: '', - tooltipSuffix: '', - disableHiddenCheck: false, - numberFormatter: false, - numberDigitGroupCount: 3, - numberDigitGroupSep: ',', - numberDecimalMark: '.', - disableTooltips: false, - disableInteraction: false - }, - // Defaults for line charts - line: { - spotColor: '#f80', - highlightSpotColor: '#5f5', - highlightLineColor: '#f22', - spotRadius: 1.5, - minSpotColor: '#f80', - maxSpotColor: '#f80', - lineWidth: 1, - normalRangeMin: undefined, - normalRangeMax: undefined, - normalRangeColor: '#ccc', - drawNormalOnTop: false, - chartRangeMin: undefined, - chartRangeMax: undefined, - chartRangeMinX: undefined, - chartRangeMaxX: undefined, - tooltipFormat: new SPFormat(' {{prefix}}{{y}}{{suffix}}') - }, - // Defaults for bar charts - bar: { - barColor: '#3366cc', - negBarColor: '#f44', - stackedBarColor: ['#3366cc', '#dc3912', '#ff9900', '#109618', '#66aa00', - '#dd4477', '#0099c6', '#990099'], - zeroColor: undefined, - nullColor: undefined, - zeroAxis: true, - barWidth: 4, - barSpacing: 1, - chartRangeMax: undefined, - chartRangeMin: undefined, - chartRangeClip: false, - colorMap: undefined, - tooltipFormat: new SPFormat(' {{prefix}}{{value}}{{suffix}}') - }, - // Defaults for tristate charts - tristate: { - barWidth: 4, - barSpacing: 1, - posBarColor: '#6f6', - negBarColor: '#f44', - zeroBarColor: '#999', - colorMap: {}, - tooltipFormat: new SPFormat(' {{value:map}}'), - tooltipValueLookups: { map: { '-1': 'Loss', '0': 'Draw', '1': 'Win' } } - }, - // Defaults for discrete charts - discrete: { - lineHeight: 'auto', - thresholdColor: undefined, - thresholdValue: 0, - chartRangeMax: undefined, - chartRangeMin: undefined, - chartRangeClip: false, - tooltipFormat: new SPFormat('{{prefix}}{{value}}{{suffix}}') - }, - // Defaults for bullet charts - bullet: { - targetColor: '#f33', - targetWidth: 3, // width of the target bar in pixels - performanceColor: '#33f', - rangeColors: ['#d3dafe', '#a8b6ff', '#7f94ff'], - base: undefined, // set this to a number to change the base start number - tooltipFormat: new SPFormat('{{fieldkey:fields}} - {{value}}'), - tooltipValueLookups: { fields: {r: 'Range', p: 'Performance', t: 'Target'} } - }, - // Defaults for pie charts - pie: { - offset: 0, - sliceColors: ['#3366cc', '#dc3912', '#ff9900', '#109618', '#66aa00', - '#dd4477', '#0099c6', '#990099'], - borderWidth: 0, - borderColor: '#000', - tooltipFormat: new SPFormat(' {{value}} ({{percent.1}}%)') - }, - // Defaults for box plots - box: { - raw: false, - boxLineColor: '#000', - boxFillColor: '#cdf', - whiskerColor: '#000', - outlierLineColor: '#333', - outlierFillColor: '#fff', - medianColor: '#f00', - showOutliers: true, - outlierIQR: 1.5, - spotRadius: 1.5, - target: undefined, - targetColor: '#4a2', - chartRangeMax: undefined, - chartRangeMin: undefined, - tooltipFormat: new SPFormat('{{field:fields}}: {{value}}'), - tooltipFormatFieldlistKey: 'field', - tooltipValueLookups: { fields: { lq: 'Lower Quartile', med: 'Median', - uq: 'Upper Quartile', lo: 'Left Outlier', ro: 'Right Outlier', - lw: 'Left Whisker', rw: 'Right Whisker'} } - } - }; - }; - - // You can have tooltips use a css class other than jqstooltip by specifying tooltipClassname - defaultStyles = '.jqstooltip { ' + - 'position: absolute;' + - 'left: 0px;' + - 'top: 0px;' + - 'visibility: hidden;' + - 'background: rgb(0, 0, 0) transparent;' + - 'background-color: rgba(0,0,0,0.6);' + - 'filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);' + - '-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";' + - 'color: white;' + - 'font: 10px arial, san serif;' + - 'text-align: left;' + - 'white-space: nowrap;' + - 'padding: 5px;' + - 'border: 1px solid white;' + - 'z-index: 10000;' + - '}' + - '.jqsfield { ' + - 'color: white;' + - 'font: 10px arial, san serif;' + - 'text-align: left;' + - '}'; - - /** - * Utilities - */ - - createClass = function (/* [baseclass, [mixin, ...]], definition */) { - var Class, args; - Class = function () { - this.init.apply(this, arguments); - }; - if (arguments.length > 1) { - if (arguments[0]) { - Class.prototype = $.extend(new arguments[0](), arguments[arguments.length - 1]); - Class._super = arguments[0].prototype; - } else { - Class.prototype = arguments[arguments.length - 1]; - } - if (arguments.length > 2) { - args = Array.prototype.slice.call(arguments, 1, -1); - args.unshift(Class.prototype); - $.extend.apply($, args); - } - } else { - Class.prototype = arguments[0]; - } - Class.prototype.cls = Class; - return Class; - }; - - /** - * Wraps a format string for tooltips - * {{x}} - * {{x.2} - * {{x:months}} - */ - $.SPFormatClass = SPFormat = createClass({ - fre: /\{\{([\w.]+?)(:(.+?))?\}\}/g, - precre: /(\w+)\.(\d+)/, - - init: function (format, fclass) { - this.format = format; - this.fclass = fclass; - }, - - render: function (fieldset, lookups, options) { - var self = this, - fields = fieldset, - match, token, lookupkey, fieldvalue, prec; - return this.format.replace(this.fre, function () { - var lookup; - token = arguments[1]; - lookupkey = arguments[3]; - match = self.precre.exec(token); - if (match) { - prec = match[2]; - token = match[1]; - } else { - prec = false; - } - fieldvalue = fields[token]; - if (fieldvalue === undefined) { - return ''; - } - if (lookupkey && lookups && lookups[lookupkey]) { - lookup = lookups[lookupkey]; - if (lookup.get) { // RangeMap - return lookups[lookupkey].get(fieldvalue) || fieldvalue; - } else { - return lookups[lookupkey][fieldvalue] || fieldvalue; - } - } - if (isNumber(fieldvalue)) { - if (options.get('numberFormatter')) { - fieldvalue = options.get('numberFormatter')(fieldvalue); - } else { - fieldvalue = formatNumber(fieldvalue, prec, - options.get('numberDigitGroupCount'), - options.get('numberDigitGroupSep'), - options.get('numberDecimalMark')); - } - } - return fieldvalue; - }); - } - }); - - // convience method to avoid needing the new operator - $.spformat = function(format, fclass) { - return new SPFormat(format, fclass); - }; - - clipval = function (val, min, max) { - if (val < min) { - return min; - } - if (val > max) { - return max; - } - return val; - }; - - quartile = function (values, q) { - var vl; - if (q === 2) { - vl = Math.floor(values.length / 2); - return values.length % 2 ? values[vl] : (values[vl-1] + values[vl]) / 2; - } else { - if (values.length % 2 ) { // odd - vl = (values.length * q + q) / 4; - return vl % 1 ? (values[Math.floor(vl)] + values[Math.floor(vl) - 1]) / 2 : values[vl-1]; - } else { //even - vl = (values.length * q + 2) / 4; - return vl % 1 ? (values[Math.floor(vl)] + values[Math.floor(vl) - 1]) / 2 : values[vl-1]; - - } - } - }; - - normalizeValue = function (val) { - var nf; - switch (val) { - case 'undefined': - val = undefined; - break; - case 'null': - val = null; - break; - case 'true': - val = true; - break; - case 'false': - val = false; - break; - default: - nf = parseFloat(val); - if (val == nf) { - val = nf; - } - } - return val; - }; - - normalizeValues = function (vals) { - var i, result = []; - for (i = vals.length; i--;) { - result[i] = normalizeValue(vals[i]); - } - return result; - }; - - remove = function (vals, filter) { - var i, vl, result = []; - for (i = 0, vl = vals.length; i < vl; i++) { - if (vals[i] !== filter) { - result.push(vals[i]); - } - } - return result; - }; - - isNumber = function (num) { - return !isNaN(parseFloat(num)) && isFinite(num); - }; - - formatNumber = function (num, prec, groupsize, groupsep, decsep) { - var p, i; - num = (prec === false ? parseFloat(num).toString() : num.toFixed(prec)).split(''); - p = (p = $.inArray('.', num)) < 0 ? num.length : p; - if (p < num.length) { - num[p] = decsep; - } - for (i = p - groupsize; i > 0; i -= groupsize) { - num.splice(i, 0, groupsep); - } - return num.join(''); - }; - - // determine if all values of an array match a value - // returns true if the array is empty - all = function (val, arr, ignoreNull) { - var i; - for (i = arr.length; i--; ) { - if (ignoreNull && arr[i] === null) continue; - if (arr[i] !== val) { - return false; - } - } - return true; - }; - - // sums the numeric values in an array, ignoring other values - sum = function (vals) { - var total = 0, i; - for (i = vals.length; i--;) { - total += typeof vals[i] === 'number' ? vals[i] : 0; - } - return total; - }; - - ensureArray = function (val) { - return $.isArray(val) ? val : [val]; - }; - - // http://paulirish.com/2008/bookmarklet-inject-new-css-rules/ - addCSS = function(css) { - var tag; - //if ('\v' == 'v') /* ie only */ { - if (document.createStyleSheet) { - document.createStyleSheet().cssText = css; - } else { - tag = document.createElement('style'); - tag.type = 'text/css'; - document.getElementsByTagName('head')[0].appendChild(tag); - tag[(typeof document.body.style.WebkitAppearance == 'string') /* webkit only */ ? 'innerText' : 'innerHTML'] = css; - } - }; - - // Provide a cross-browser interface to a few simple drawing primitives - $.fn.simpledraw = function (width, height, useExisting, interact) { - var target, mhandler; - if (useExisting && (target = this.data('_jqs_vcanvas'))) { - return target; - } - - if ($.fn.sparkline.canvas === false) { - // We've already determined that neither Canvas nor VML are available - return false; - - } else if ($.fn.sparkline.canvas === undefined) { - // No function defined yet -- need to see if we support Canvas or VML - var el = document.createElement('canvas'); - if (!!(el.getContext && el.getContext('2d'))) { - // Canvas is available - $.fn.sparkline.canvas = function(width, height, target, interact) { - return new VCanvas_canvas(width, height, target, interact); - }; - } else if (document.namespaces && !document.namespaces.v) { - // VML is available - document.namespaces.add('v', 'urn:schemas-microsoft-com:vml', '#default#VML'); - $.fn.sparkline.canvas = function(width, height, target, interact) { - return new VCanvas_vml(width, height, target); - }; - } else { - // Neither Canvas nor VML are available - $.fn.sparkline.canvas = false; - return false; - } - } - - if (width === undefined) { - width = $(this).innerWidth(); - } - if (height === undefined) { - height = $(this).innerHeight(); - } - - target = $.fn.sparkline.canvas(width, height, this, interact); - - mhandler = $(this).data('_jqs_mhandler'); - if (mhandler) { - mhandler.registerCanvas(target); - } - return target; - }; - - $.fn.cleardraw = function () { - var target = this.data('_jqs_vcanvas'); - if (target) { - target.reset(); - } - }; - - $.RangeMapClass = RangeMap = createClass({ - init: function (map) { - var key, range, rangelist = []; - for (key in map) { - if (map.hasOwnProperty(key) && typeof key === 'string' && key.indexOf(':') > -1) { - range = key.split(':'); - range[0] = range[0].length === 0 ? -Infinity : parseFloat(range[0]); - range[1] = range[1].length === 0 ? Infinity : parseFloat(range[1]); - range[2] = map[key]; - rangelist.push(range); - } - } - this.map = map; - this.rangelist = rangelist || false; - }, - - get: function (value) { - var rangelist = this.rangelist, - i, range, result; - if ((result = this.map[value]) !== undefined) { - return result; - } - if (rangelist) { - for (i = rangelist.length; i--;) { - range = rangelist[i]; - if (range[0] <= value && range[1] >= value) { - return range[2]; - } - } - } - return undefined; - } - }); - - // Convenience function - $.range_map = function(map) { - return new RangeMap(map); - }; - - MouseHandler = createClass({ - init: function (el, options) { - var $el = $(el); - this.$el = $el; - this.options = options; - this.currentPageX = 0; - this.currentPageY = 0; - this.el = el; - this.splist = []; - this.tooltip = null; - this.over = false; - this.displayTooltips = !options.get('disableTooltips'); - this.highlightEnabled = !options.get('disableHighlight'); - }, - - registerSparkline: function (sp) { - this.splist.push(sp); - if (this.over) { - this.updateDisplay(); - } - }, - - registerCanvas: function (canvas) { - var $canvas = $(canvas.canvas); - this.canvas = canvas; - this.$canvas = $canvas; - $canvas.mouseenter($.proxy(this.mouseenter, this)); - $canvas.mouseleave($.proxy(this.mouseleave, this)); - $canvas.click($.proxy(this.mouseclick, this)); - }, - - reset: function (removeTooltip) { - this.splist = []; - if (this.tooltip && removeTooltip) { - this.tooltip.remove(); - this.tooltip = undefined; - } - }, - - mouseclick: function (e) { - var clickEvent = $.Event('sparklineClick'); - clickEvent.originalEvent = e; - clickEvent.sparklines = this.splist; - this.$el.trigger(clickEvent); - }, - - mouseenter: function (e) { - $(document.body).unbind('mousemove.jqs'); - $(document.body).bind('mousemove.jqs', $.proxy(this.mousemove, this)); - this.over = true; - this.currentPageX = e.pageX; - this.currentPageY = e.pageY; - this.currentEl = e.target; - if (!this.tooltip && this.displayTooltips) { - this.tooltip = new Tooltip(this.options); - this.tooltip.updatePosition(e.pageX, e.pageY); - } - this.updateDisplay(); - }, - - mouseleave: function () { - $(document.body).unbind('mousemove.jqs'); - var splist = this.splist, - spcount = splist.length, - needsRefresh = false, - sp, i; - this.over = false; - this.currentEl = null; - - if (this.tooltip) { - this.tooltip.remove(); - this.tooltip = null; - } - - for (i = 0; i < spcount; i++) { - sp = splist[i]; - if (sp.clearRegionHighlight()) { - needsRefresh = true; - } - } - - if (needsRefresh) { - this.canvas.render(); - } - }, - - mousemove: function (e) { - this.currentPageX = e.pageX; - this.currentPageY = e.pageY; - this.currentEl = e.target; - if (this.tooltip) { - this.tooltip.updatePosition(e.pageX, e.pageY); - } - this.updateDisplay(); - }, - - updateDisplay: function () { - var splist = this.splist, - spcount = splist.length, - needsRefresh = false, - offset = this.$canvas.offset(), - localX = this.currentPageX - offset.left, - localY = this.currentPageY - offset.top, - tooltiphtml, sp, i, result, changeEvent; - if (!this.over) { - return; - } - for (i = 0; i < spcount; i++) { - sp = splist[i]; - result = sp.setRegionHighlight(this.currentEl, localX, localY); - if (result) { - needsRefresh = true; - } - } - if (needsRefresh) { - changeEvent = $.Event('sparklineRegionChange'); - changeEvent.sparklines = this.splist; - this.$el.trigger(changeEvent); - if (this.tooltip) { - tooltiphtml = ''; - for (i = 0; i < spcount; i++) { - sp = splist[i]; - tooltiphtml += sp.getCurrentRegionTooltip(); - } - this.tooltip.setContent(tooltiphtml); - } - if (!this.disableHighlight) { - this.canvas.render(); - } - } - if (result === null) { - this.mouseleave(); - } - } - }); - - - Tooltip = createClass({ - sizeStyle: 'position: static !important;' + - 'display: block !important;' + - 'visibility: hidden !important;' + - 'float: left !important;', - - init: function (options) { - var tooltipClassname = options.get('tooltipClassname', 'jqstooltip'), - sizetipStyle = this.sizeStyle, - offset; - this.container = options.get('tooltipContainer') || document.body; - this.tooltipOffsetX = options.get('tooltipOffsetX', 10); - this.tooltipOffsetY = options.get('tooltipOffsetY', 12); - // remove any previous lingering tooltip - $('#jqssizetip').remove(); - $('#jqstooltip').remove(); - this.sizetip = $('
', { - id: 'jqssizetip', - style: sizetipStyle, - 'class': tooltipClassname - }); - this.tooltip = $('
', { - id: 'jqstooltip', - 'class': tooltipClassname - }).appendTo(this.container); - // account for the container's location - offset = this.tooltip.offset(); - this.offsetLeft = offset.left; - this.offsetTop = offset.top; - this.hidden = true; - $(window).unbind('resize.jqs scroll.jqs'); - $(window).bind('resize.jqs scroll.jqs', $.proxy(this.updateWindowDims, this)); - this.updateWindowDims(); - }, - - updateWindowDims: function () { - this.scrollTop = $(window).scrollTop(); - this.scrollLeft = $(window).scrollLeft(); - this.scrollRight = this.scrollLeft + $(window).width(); - this.updatePosition(); - }, - - getSize: function (content) { - this.sizetip.html(content).appendTo(this.container); - this.width = this.sizetip.width() + 1; - this.height = this.sizetip.height(); - this.sizetip.remove(); - }, - - setContent: function (content) { - if (!content) { - this.tooltip.css('visibility', 'hidden'); - this.hidden = true; - return; - } - this.getSize(content); - this.tooltip.html(content) - .css({ - 'width': this.width, - 'height': this.height, - 'visibility': 'visible' - }); - if (this.hidden) { - this.hidden = false; - this.updatePosition(); - } - }, - - updatePosition: function (x, y) { - if (x === undefined) { - if (this.mousex === undefined) { - return; - } - x = this.mousex - this.offsetLeft; - y = this.mousey - this.offsetTop; - - } else { - this.mousex = x = x - this.offsetLeft; - this.mousey = y = y - this.offsetTop; - } - if (!this.height || !this.width || this.hidden) { - return; - } - - y -= this.height + this.tooltipOffsetY; - x += this.tooltipOffsetX; - - if (y < this.scrollTop) { - y = this.scrollTop; - } - if (x < this.scrollLeft) { - x = this.scrollLeft; - } else if (x + this.width > this.scrollRight) { - x = this.scrollRight - this.width; - } - - this.tooltip.css({ - 'left': x, - 'top': y - }); - }, - - remove: function () { - this.tooltip.remove(); - this.sizetip.remove(); - this.sizetip = this.tooltip = undefined; - $(window).unbind('resize.jqs scroll.jqs'); - } - }); - - initStyles = function() { - addCSS(defaultStyles); - }; - - $(initStyles); - - pending = []; - $.fn.sparkline = function (userValues, userOptions) { - return this.each(function () { - var options = new $.fn.sparkline.options(this, userOptions), - $this = $(this), - render, i; - render = function () { - var values, width, height, tmp, mhandler, sp, vals; - if (userValues === 'html' || userValues === undefined) { - vals = this.getAttribute(options.get('tagValuesAttribute')); - if (vals === undefined || vals === null) { - vals = $this.html(); - } - values = vals.replace(/(^\s*\s*$)|\s+/g, '').split(','); - } else { - values = userValues; - } - - width = options.get('width') === 'auto' ? values.length * options.get('defaultPixelsPerValue') : options.get('width'); - if (options.get('height') === 'auto') { - if (!options.get('composite') || !$.data(this, '_jqs_vcanvas')) { - // must be a better way to get the line height - tmp = document.createElement('span'); - tmp.innerHTML = 'a'; - $this.html(tmp); - height = $(tmp).innerHeight() || $(tmp).height(); - $(tmp).remove(); - tmp = null; - } - } else { - height = options.get('height'); - } - - if (!options.get('disableInteraction')) { - mhandler = $.data(this, '_jqs_mhandler'); - if (!mhandler) { - mhandler = new MouseHandler(this, options); - $.data(this, '_jqs_mhandler', mhandler); - } else if (!options.get('composite')) { - mhandler.reset(); - } - } else { - mhandler = false; - } - - if (options.get('composite') && !$.data(this, '_jqs_vcanvas')) { - if (!$.data(this, '_jqs_errnotify')) { - alert('Attempted to attach a composite sparkline to an element with no existing sparkline'); - $.data(this, '_jqs_errnotify', true); - } - return; - } - - sp = new $.fn.sparkline[options.get('type')](this, values, options, width, height); - - sp.render(); - - if (mhandler) { - mhandler.registerSparkline(sp); - } - }; - if (($(this).html() && !options.get('disableHiddenCheck') && $(this).is(':hidden')) || !$(this).parents('body').length) { - if (!options.get('composite') && $.data(this, '_jqs_pending')) { - // remove any existing references to the element - for (i = pending.length; i; i--) { - if (pending[i - 1][0] == this) { - pending.splice(i - 1, 1); - } - } - } - pending.push([this, render]); - $.data(this, '_jqs_pending', true); - } else { - render.call(this); - } - }); - }; - - $.fn.sparkline.defaults = getDefaults(); - - - $.sparkline_display_visible = function () { - var el, i, pl; - var done = []; - for (i = 0, pl = pending.length; i < pl; i++) { - el = pending[i][0]; - if ($(el).is(':visible') && !$(el).parents().is(':hidden')) { - pending[i][1].call(el); - $.data(pending[i][0], '_jqs_pending', false); - done.push(i); - } else if (!$(el).closest('html').length && !$.data(el, '_jqs_pending')) { - // element has been inserted and removed from the DOM - // If it was not yet inserted into the dom then the .data request - // will return true. - // removing from the dom causes the data to be removed. - $.data(pending[i][0], '_jqs_pending', false); - done.push(i); - } - } - for (i = done.length; i; i--) { - pending.splice(done[i - 1], 1); - } - }; - - - /** - * User option handler - */ - $.fn.sparkline.options = createClass({ - init: function (tag, userOptions) { - var extendedOptions, defaults, base, tagOptionType; - this.userOptions = userOptions = userOptions || {}; - this.tag = tag; - this.tagValCache = {}; - defaults = $.fn.sparkline.defaults; - base = defaults.common; - this.tagOptionsPrefix = userOptions.enableTagOptions && (userOptions.tagOptionsPrefix || base.tagOptionsPrefix); - - tagOptionType = this.getTagSetting('type'); - if (tagOptionType === UNSET_OPTION) { - extendedOptions = defaults[userOptions.type || base.type]; - } else { - extendedOptions = defaults[tagOptionType]; - } - this.mergedOptions = $.extend({}, base, extendedOptions, userOptions); - }, - - - getTagSetting: function (key) { - var prefix = this.tagOptionsPrefix, - val, i, pairs, keyval; - if (prefix === false || prefix === undefined) { - return UNSET_OPTION; - } - if (this.tagValCache.hasOwnProperty(key)) { - val = this.tagValCache.key; - } else { - val = this.tag.getAttribute(prefix + key); - if (val === undefined || val === null) { - val = UNSET_OPTION; - } else if (val.substr(0, 1) === '[') { - val = val.substr(1, val.length - 2).split(','); - for (i = val.length; i--;) { - val[i] = normalizeValue(val[i].replace(/(^\s*)|(\s*$)/g, '')); - } - } else if (val.substr(0, 1) === '{') { - pairs = val.substr(1, val.length - 2).split(','); - val = {}; - for (i = pairs.length; i--;) { - keyval = pairs[i].split(':', 2); - val[keyval[0].replace(/(^\s*)|(\s*$)/g, '')] = normalizeValue(keyval[1].replace(/(^\s*)|(\s*$)/g, '')); - } - } else { - val = normalizeValue(val); - } - this.tagValCache.key = val; - } - return val; - }, - - get: function (key, defaultval) { - var tagOption = this.getTagSetting(key), - result; - if (tagOption !== UNSET_OPTION) { - return tagOption; - } - return (result = this.mergedOptions[key]) === undefined ? defaultval : result; - } - }); - - - $.fn.sparkline._base = createClass({ - disabled: false, - - init: function (el, values, options, width, height) { - this.el = el; - this.$el = $(el); - this.values = values; - this.options = options; - this.width = width; - this.height = height; - this.currentRegion = undefined; - }, - - /** - * Setup the canvas - */ - initTarget: function () { - var interactive = !this.options.get('disableInteraction'); - if (!(this.target = this.$el.simpledraw(this.width, this.height, this.options.get('composite'), interactive))) { - this.disabled = true; - } else { - this.canvasWidth = this.target.pixelWidth; - this.canvasHeight = this.target.pixelHeight; - } - }, - - /** - * Actually render the chart to the canvas - */ - render: function () { - if (this.disabled) { - this.el.innerHTML = ''; - return false; - } - return true; - }, - - /** - * Return a region id for a given x/y co-ordinate - */ - getRegion: function (x, y) { - }, - - /** - * Highlight an item based on the moused-over x,y co-ordinate - */ - setRegionHighlight: function (el, x, y) { - var currentRegion = this.currentRegion, - highlightEnabled = !this.options.get('disableHighlight'), - newRegion; - if (x > this.canvasWidth || y > this.canvasHeight || x < 0 || y < 0) { - return null; - } - newRegion = this.getRegion(el, x, y); - if (currentRegion !== newRegion) { - if (currentRegion !== undefined && highlightEnabled) { - this.removeHighlight(); - } - this.currentRegion = newRegion; - if (newRegion !== undefined && highlightEnabled) { - this.renderHighlight(); - } - return true; - } - return false; - }, - - /** - * Reset any currently highlighted item - */ - clearRegionHighlight: function () { - if (this.currentRegion !== undefined) { - this.removeHighlight(); - this.currentRegion = undefined; - return true; - } - return false; - }, - - renderHighlight: function () { - this.changeHighlight(true); - }, - - removeHighlight: function () { - this.changeHighlight(false); - }, - - changeHighlight: function (highlight) {}, - - /** - * Fetch the HTML to display as a tooltip - */ - getCurrentRegionTooltip: function () { - var options = this.options, - header = '', - entries = [], - fields, formats, formatlen, fclass, text, i, - showFields, showFieldsKey, newFields, fv, - formatter, format, fieldlen, j; - if (this.currentRegion === undefined) { - return ''; - } - fields = this.getCurrentRegionFields(); - formatter = options.get('tooltipFormatter'); - if (formatter) { - return formatter(this, options, fields); - } - if (options.get('tooltipChartTitle')) { - header += '
' + options.get('tooltipChartTitle') + '
\n'; - } - formats = this.options.get('tooltipFormat'); - if (!formats) { - return ''; - } - if (!$.isArray(formats)) { - formats = [formats]; - } - if (!$.isArray(fields)) { - fields = [fields]; - } - showFields = this.options.get('tooltipFormatFieldlist'); - showFieldsKey = this.options.get('tooltipFormatFieldlistKey'); - if (showFields && showFieldsKey) { - // user-selected ordering of fields - newFields = []; - for (i = fields.length; i--;) { - fv = fields[i][showFieldsKey]; - if ((j = $.inArray(fv, showFields)) != -1) { - newFields[j] = fields[i]; - } - } - fields = newFields; - } - formatlen = formats.length; - fieldlen = fields.length; - for (i = 0; i < formatlen; i++) { - format = formats[i]; - if (typeof format === 'string') { - format = new SPFormat(format); - } - fclass = format.fclass || 'jqsfield'; - for (j = 0; j < fieldlen; j++) { - if (!fields[j].isNull || !options.get('tooltipSkipNull')) { - $.extend(fields[j], { - prefix: options.get('tooltipPrefix'), - suffix: options.get('tooltipSuffix') - }); - text = format.render(fields[j], options.get('tooltipValueLookups'), options); - entries.push('
' + text + '
'); - } - } - } - if (entries.length) { - return header + entries.join('\n'); - } - return ''; - }, - - getCurrentRegionFields: function () {}, - - calcHighlightColor: function (color, options) { - var highlightColor = options.get('highlightColor'), - lighten = options.get('highlightLighten'), - parse, mult, rgbnew, i; - if (highlightColor) { - return highlightColor; - } - if (lighten) { - // extract RGB values - parse = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(color) || /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(color); - if (parse) { - rgbnew = []; - mult = color.length === 4 ? 16 : 1; - for (i = 0; i < 3; i++) { - rgbnew[i] = clipval(Math.round(parseInt(parse[i + 1], 16) * mult * lighten), 0, 255); - } - return 'rgb(' + rgbnew.join(',') + ')'; - } - - } - return color; - } - - }); - - barHighlightMixin = { - changeHighlight: function (highlight) { - var currentRegion = this.currentRegion, - target = this.target, - shapeids = this.regionShapes[currentRegion], - newShapes; - // will be null if the region value was null - if (shapeids) { - newShapes = this.renderRegion(currentRegion, highlight); - if ($.isArray(newShapes) || $.isArray(shapeids)) { - target.replaceWithShapes(shapeids, newShapes); - this.regionShapes[currentRegion] = $.map(newShapes, function (newShape) { - return newShape.id; - }); - } else { - target.replaceWithShape(shapeids, newShapes); - this.regionShapes[currentRegion] = newShapes.id; - } - } - }, - - render: function () { - var values = this.values, - target = this.target, - regionShapes = this.regionShapes, - shapes, ids, i, j; - - if (!this.cls._super.render.call(this)) { - return; - } - for (i = values.length; i--;) { - shapes = this.renderRegion(i); - if (shapes) { - if ($.isArray(shapes)) { - ids = []; - for (j = shapes.length; j--;) { - shapes[j].append(); - ids.push(shapes[j].id); - } - regionShapes[i] = ids; - } else { - shapes.append(); - regionShapes[i] = shapes.id; // store just the shapeid - } - } else { - // null value - regionShapes[i] = null; - } - } - target.render(); - } - }; - - /** - * Line charts - */ - $.fn.sparkline.line = line = createClass($.fn.sparkline._base, { - type: 'line', - - init: function (el, values, options, width, height) { - line._super.init.call(this, el, values, options, width, height); - this.vertices = []; - this.regionMap = []; - this.xvalues = []; - this.yvalues = []; - this.yminmax = []; - this.hightlightSpotId = null; - this.lastShapeId = null; - this.initTarget(); - }, - - getRegion: function (el, x, y) { - var i, - regionMap = this.regionMap; // maps regions to value positions - for (i = regionMap.length; i--;) { - if (regionMap[i] !== null && x >= regionMap[i][0] && x <= regionMap[i][1]) { - return regionMap[i][2]; - } - } - return undefined; - }, - - getCurrentRegionFields: function () { - var currentRegion = this.currentRegion; - return { - isNull: this.yvalues[currentRegion] === null, - x: this.xvalues[currentRegion], - y: this.yvalues[currentRegion], - color: this.options.get('lineColor'), - fillColor: this.options.get('fillColor'), - offset: currentRegion - }; - }, - - renderHighlight: function () { - var currentRegion = this.currentRegion, - target = this.target, - vertex = this.vertices[currentRegion], - options = this.options, - spotRadius = options.get('spotRadius'), - highlightSpotColor = options.get('highlightSpotColor'), - highlightLineColor = options.get('highlightLineColor'), - highlightSpot, highlightLine; - - if (!vertex) { - return; - } - if (spotRadius && highlightSpotColor) { - highlightSpot = target.drawCircle(vertex[0], vertex[1], - spotRadius, undefined, highlightSpotColor); - this.highlightSpotId = highlightSpot.id; - target.insertAfterShape(this.lastShapeId, highlightSpot); - } - if (highlightLineColor) { - highlightLine = target.drawLine(vertex[0], this.canvasTop, vertex[0], - this.canvasTop + this.canvasHeight, highlightLineColor); - this.highlightLineId = highlightLine.id; - target.insertAfterShape(this.lastShapeId, highlightLine); - } - }, - - removeHighlight: function () { - var target = this.target; - if (this.highlightSpotId) { - target.removeShapeId(this.highlightSpotId); - this.highlightSpotId = null; - } - if (this.highlightLineId) { - target.removeShapeId(this.highlightLineId); - this.highlightLineId = null; - } - }, - - scanValues: function () { - var values = this.values, - valcount = values.length, - xvalues = this.xvalues, - yvalues = this.yvalues, - yminmax = this.yminmax, - i, val, isStr, isArray, sp; - for (i = 0; i < valcount; i++) { - val = values[i]; - isStr = typeof(values[i]) === 'string'; - isArray = typeof(values[i]) === 'object' && values[i] instanceof Array; - sp = isStr && values[i].split(':'); - if (isStr && sp.length === 2) { // x:y - xvalues.push(Number(sp[0])); - yvalues.push(Number(sp[1])); - yminmax.push(Number(sp[1])); - } else if (isArray) { - xvalues.push(val[0]); - yvalues.push(val[1]); - yminmax.push(val[1]); - } else { - xvalues.push(i); - if (values[i] === null || values[i] === 'null') { - yvalues.push(null); - } else { - yvalues.push(Number(val)); - yminmax.push(Number(val)); - } - } - } - if (this.options.get('xvalues')) { - xvalues = this.options.get('xvalues'); - } - - this.maxy = this.maxyorg = Math.max.apply(Math, yminmax); - this.miny = this.minyorg = Math.min.apply(Math, yminmax); - - this.maxx = Math.max.apply(Math, xvalues); - this.minx = Math.min.apply(Math, xvalues); - - this.xvalues = xvalues; - this.yvalues = yvalues; - this.yminmax = yminmax; - - }, - - processRangeOptions: function () { - var options = this.options, - normalRangeMin = options.get('normalRangeMin'), - normalRangeMax = options.get('normalRangeMax'); - - if (normalRangeMin !== undefined) { - if (normalRangeMin < this.miny) { - this.miny = normalRangeMin; - } - if (normalRangeMax > this.maxy) { - this.maxy = normalRangeMax; - } - } - if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < this.miny)) { - this.miny = options.get('chartRangeMin'); - } - if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > this.maxy)) { - this.maxy = options.get('chartRangeMax'); - } - if (options.get('chartRangeMinX') !== undefined && (options.get('chartRangeClipX') || options.get('chartRangeMinX') < this.minx)) { - this.minx = options.get('chartRangeMinX'); - } - if (options.get('chartRangeMaxX') !== undefined && (options.get('chartRangeClipX') || options.get('chartRangeMaxX') > this.maxx)) { - this.maxx = options.get('chartRangeMaxX'); - } - - }, - - drawNormalRange: function (canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey) { - var normalRangeMin = this.options.get('normalRangeMin'), - normalRangeMax = this.options.get('normalRangeMax'), - ytop = canvasTop + Math.round(canvasHeight - (canvasHeight * ((normalRangeMax - this.miny) / rangey))), - height = Math.round((canvasHeight * (normalRangeMax - normalRangeMin)) / rangey); - this.target.drawRect(canvasLeft, ytop, canvasWidth, height, undefined, this.options.get('normalRangeColor')).append(); - }, - - render: function () { - var options = this.options, - target = this.target, - canvasWidth = this.canvasWidth, - canvasHeight = this.canvasHeight, - vertices = this.vertices, - spotRadius = options.get('spotRadius'), - regionMap = this.regionMap, - rangex, rangey, yvallast, - canvasTop, canvasLeft, - vertex, path, paths, x, y, xnext, xpos, xposnext, - last, next, yvalcount, lineShapes, fillShapes, plen, - valueSpots, hlSpotsEnabled, color, xvalues, yvalues, i; - - if (!line._super.render.call(this)) { - return; - } - - this.scanValues(); - this.processRangeOptions(); - - xvalues = this.xvalues; - yvalues = this.yvalues; - - if (!this.yminmax.length || this.yvalues.length < 2) { - // empty or all null valuess - return; - } - - canvasTop = canvasLeft = 0; - - rangex = this.maxx - this.minx === 0 ? 1 : this.maxx - this.minx; - rangey = this.maxy - this.miny === 0 ? 1 : this.maxy - this.miny; - yvallast = this.yvalues.length - 1; - - if (spotRadius && (canvasWidth < (spotRadius * 4) || canvasHeight < (spotRadius * 4))) { - spotRadius = 0; - } - if (spotRadius) { - // adjust the canvas size as required so that spots will fit - hlSpotsEnabled = options.get('highlightSpotColor') && !options.get('disableInteraction'); - if (hlSpotsEnabled || options.get('minSpotColor') || (options.get('spotColor') && yvalues[yvallast] === this.miny)) { - canvasHeight -= Math.ceil(spotRadius); - } - if (hlSpotsEnabled || options.get('maxSpotColor') || (options.get('spotColor') && yvalues[yvallast] === this.maxy)) { - canvasHeight -= Math.ceil(spotRadius); - canvasTop += Math.ceil(spotRadius); - } - if (hlSpotsEnabled || - ((options.get('minSpotColor') || options.get('maxSpotColor')) && (yvalues[0] === this.miny || yvalues[0] === this.maxy))) { - canvasLeft += Math.ceil(spotRadius); - canvasWidth -= Math.ceil(spotRadius); - } - if (hlSpotsEnabled || options.get('spotColor') || - (options.get('minSpotColor') || options.get('maxSpotColor') && - (yvalues[yvallast] === this.miny || yvalues[yvallast] === this.maxy))) { - canvasWidth -= Math.ceil(spotRadius); - } - } - - - canvasHeight--; - - if (options.get('normalRangeMin') !== undefined && !options.get('drawNormalOnTop')) { - this.drawNormalRange(canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey); - } - - path = []; - paths = [path]; - last = next = null; - yvalcount = yvalues.length; - for (i = 0; i < yvalcount; i++) { - x = xvalues[i]; - xnext = xvalues[i + 1]; - y = yvalues[i]; - xpos = canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex)); - xposnext = i < yvalcount - 1 ? canvasLeft + Math.round((xnext - this.minx) * (canvasWidth / rangex)) : canvasWidth; - next = xpos + ((xposnext - xpos) / 2); - regionMap[i] = [last || 0, next, i]; - last = next; - if (y === null) { - if (i) { - if (yvalues[i - 1] !== null) { - path = []; - paths.push(path); - } - vertices.push(null); - } - } else { - if (y < this.miny) { - y = this.miny; - } - if (y > this.maxy) { - y = this.maxy; - } - if (!path.length) { - // previous value was null - path.push([xpos, canvasTop + canvasHeight]); - } - vertex = [xpos, canvasTop + Math.round(canvasHeight - (canvasHeight * ((y - this.miny) / rangey)))]; - path.push(vertex); - vertices.push(vertex); - } - } - - lineShapes = []; - fillShapes = []; - plen = paths.length; - for (i = 0; i < plen; i++) { - path = paths[i]; - if (path.length) { - if (options.get('fillColor')) { - path.push([path[path.length - 1][0], (canvasTop + canvasHeight)]); - fillShapes.push(path.slice(0)); - path.pop(); - } - // if there's only a single point in this path, then we want to display it - // as a vertical line which means we keep path[0] as is - if (path.length > 2) { - // else we want the first value - path[0] = [path[0][0], path[1][1]]; - } - lineShapes.push(path); - } - } - - // draw the fill first, then optionally the normal range, then the line on top of that - plen = fillShapes.length; - for (i = 0; i < plen; i++) { - target.drawShape(fillShapes[i], - options.get('fillColor'), options.get('fillColor')).append(); - } - - if (options.get('normalRangeMin') !== undefined && options.get('drawNormalOnTop')) { - this.drawNormalRange(canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey); - } - - plen = lineShapes.length; - for (i = 0; i < plen; i++) { - target.drawShape(lineShapes[i], options.get('lineColor'), undefined, - options.get('lineWidth')).append(); - } - - if (spotRadius && options.get('valueSpots')) { - valueSpots = options.get('valueSpots'); - if (valueSpots.get === undefined) { - valueSpots = new RangeMap(valueSpots); - } - for (i = 0; i < yvalcount; i++) { - color = valueSpots.get(yvalues[i]); - if (color) { - target.drawCircle(canvasLeft + Math.round((xvalues[i] - this.minx) * (canvasWidth / rangex)), - canvasTop + Math.round(canvasHeight - (canvasHeight * ((yvalues[i] - this.miny) / rangey))), - spotRadius, undefined, - color).append(); - } - } - - } - if (spotRadius && options.get('spotColor') && yvalues[yvallast] !== null) { - target.drawCircle(canvasLeft + Math.round((xvalues[xvalues.length - 1] - this.minx) * (canvasWidth / rangex)), - canvasTop + Math.round(canvasHeight - (canvasHeight * ((yvalues[yvallast] - this.miny) / rangey))), - spotRadius, undefined, - options.get('spotColor')).append(); - } - if (this.maxy !== this.minyorg) { - if (spotRadius && options.get('minSpotColor')) { - x = xvalues[$.inArray(this.minyorg, yvalues)]; - target.drawCircle(canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex)), - canvasTop + Math.round(canvasHeight - (canvasHeight * ((this.minyorg - this.miny) / rangey))), - spotRadius, undefined, - options.get('minSpotColor')).append(); - } - if (spotRadius && options.get('maxSpotColor')) { - x = xvalues[$.inArray(this.maxyorg, yvalues)]; - target.drawCircle(canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex)), - canvasTop + Math.round(canvasHeight - (canvasHeight * ((this.maxyorg - this.miny) / rangey))), - spotRadius, undefined, - options.get('maxSpotColor')).append(); - } - } - - this.lastShapeId = target.getLastShapeId(); - this.canvasTop = canvasTop; - target.render(); - } - }); - - /** - * Bar charts - */ - $.fn.sparkline.bar = bar = createClass($.fn.sparkline._base, barHighlightMixin, { - type: 'bar', - - init: function (el, values, options, width, height) { - var barWidth = parseInt(options.get('barWidth'), 10), - barSpacing = parseInt(options.get('barSpacing'), 10), - chartRangeMin = options.get('chartRangeMin'), - chartRangeMax = options.get('chartRangeMax'), - chartRangeClip = options.get('chartRangeClip'), - stackMin = Infinity, - stackMax = -Infinity, - isStackString, groupMin, groupMax, stackRanges, - numValues, i, vlen, range, zeroAxis, xaxisOffset, min, max, clipMin, clipMax, - stacked, vlist, j, slen, svals, val, yoffset, yMaxCalc, canvasHeightEf; - bar._super.init.call(this, el, values, options, width, height); - - // scan values to determine whether to stack bars - for (i = 0, vlen = values.length; i < vlen; i++) { - val = values[i]; - isStackString = typeof(val) === 'string' && val.indexOf(':') > -1; - if (isStackString || $.isArray(val)) { - stacked = true; - if (isStackString) { - val = values[i] = normalizeValues(val.split(':')); - } - val = remove(val, null); // min/max will treat null as zero - groupMin = Math.min.apply(Math, val); - groupMax = Math.max.apply(Math, val); - if (groupMin < stackMin) { - stackMin = groupMin; - } - if (groupMax > stackMax) { - stackMax = groupMax; - } - } - } - - this.stacked = stacked; - this.regionShapes = {}; - this.barWidth = barWidth; - this.barSpacing = barSpacing; - this.totalBarWidth = barWidth + barSpacing; - this.width = width = (values.length * barWidth) + ((values.length - 1) * barSpacing); - - this.initTarget(); - - if (chartRangeClip) { - clipMin = chartRangeMin === undefined ? -Infinity : chartRangeMin; - clipMax = chartRangeMax === undefined ? Infinity : chartRangeMax; - } - - numValues = []; - stackRanges = stacked ? [] : numValues; - var stackTotals = []; - var stackRangesNeg = []; - for (i = 0, vlen = values.length; i < vlen; i++) { - if (stacked) { - vlist = values[i]; - values[i] = svals = []; - stackTotals[i] = 0; - stackRanges[i] = stackRangesNeg[i] = 0; - for (j = 0, slen = vlist.length; j < slen; j++) { - val = svals[j] = chartRangeClip ? clipval(vlist[j], clipMin, clipMax) : vlist[j]; - if (val !== null) { - if (val > 0) { - stackTotals[i] += val; - } - if (stackMin < 0 && stackMax > 0) { - if (val < 0) { - stackRangesNeg[i] += Math.abs(val); - } else { - stackRanges[i] += val; - } - } else { - stackRanges[i] += Math.abs(val - (val < 0 ? stackMax : stackMin)); - } - numValues.push(val); - } - } - } else { - val = chartRangeClip ? clipval(values[i], clipMin, clipMax) : values[i]; - val = values[i] = normalizeValue(val); - if (val !== null) { - numValues.push(val); - } - } - } - this.max = max = Math.max.apply(Math, numValues); - this.min = min = Math.min.apply(Math, numValues); - this.stackMax = stackMax = stacked ? Math.max.apply(Math, stackTotals) : max; - this.stackMin = stackMin = stacked ? Math.min.apply(Math, numValues) : min; - - if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < min)) { - min = options.get('chartRangeMin'); - } - if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > max)) { - max = options.get('chartRangeMax'); - } - - this.zeroAxis = zeroAxis = options.get('zeroAxis', true); - if (min <= 0 && max >= 0 && zeroAxis) { - xaxisOffset = 0; - } else if (zeroAxis == false) { - xaxisOffset = min; - } else if (min > 0) { - xaxisOffset = min; - } else { - xaxisOffset = max; - } - this.xaxisOffset = xaxisOffset; - - range = stacked ? (Math.max.apply(Math, stackRanges) + Math.max.apply(Math, stackRangesNeg)) : max - min; - - // as we plot zero/min values a single pixel line, we add a pixel to all other - // values - Reduce the effective canvas size to suit - this.canvasHeightEf = (zeroAxis && min < 0) ? this.canvasHeight - 2 : this.canvasHeight - 1; - - if (min < xaxisOffset) { - yMaxCalc = (stacked && max >= 0) ? stackMax : max; - yoffset = (yMaxCalc - xaxisOffset) / range * this.canvasHeight; - if (yoffset !== Math.ceil(yoffset)) { - this.canvasHeightEf -= 2; - yoffset = Math.ceil(yoffset); - } - } else { - yoffset = this.canvasHeight; - } - this.yoffset = yoffset; - - if ($.isArray(options.get('colorMap'))) { - this.colorMapByIndex = options.get('colorMap'); - this.colorMapByValue = null; - } else { - this.colorMapByIndex = null; - this.colorMapByValue = options.get('colorMap'); - if (this.colorMapByValue && this.colorMapByValue.get === undefined) { - this.colorMapByValue = new RangeMap(this.colorMapByValue); - } - } - - this.range = range; - }, - - getRegion: function (el, x, y) { - var result = Math.floor(x / this.totalBarWidth); - return (result < 0 || result >= this.values.length) ? undefined : result; - }, - - getCurrentRegionFields: function () { - var currentRegion = this.currentRegion, - values = ensureArray(this.values[currentRegion]), - result = [], - value, i; - for (i = values.length; i--;) { - value = values[i]; - result.push({ - isNull: value === null, - value: value, - color: this.calcColor(i, value, currentRegion), - offset: currentRegion - }); - } - return result; - }, - - calcColor: function (stacknum, value, valuenum) { - var colorMapByIndex = this.colorMapByIndex, - colorMapByValue = this.colorMapByValue, - options = this.options, - color, newColor; - if (this.stacked) { - color = options.get('stackedBarColor'); - } else { - color = (value < 0) ? options.get('negBarColor') : options.get('barColor'); - } - if (value === 0 && options.get('zeroColor') !== undefined) { - color = options.get('zeroColor'); - } - if (colorMapByValue && (newColor = colorMapByValue.get(value))) { - color = newColor; - } else if (colorMapByIndex && colorMapByIndex.length > valuenum) { - color = colorMapByIndex[valuenum]; - } - return $.isArray(color) ? color[stacknum % color.length] : color; - }, - - /** - * Render bar(s) for a region - */ - renderRegion: function (valuenum, highlight) { - var vals = this.values[valuenum], - options = this.options, - xaxisOffset = this.xaxisOffset, - result = [], - range = this.range, - stacked = this.stacked, - target = this.target, - x = valuenum * this.totalBarWidth, - canvasHeightEf = this.canvasHeightEf, - yoffset = this.yoffset, - y, height, color, isNull, yoffsetNeg, i, valcount, val, minPlotted, allMin; - - vals = $.isArray(vals) ? vals : [vals]; - valcount = vals.length; - val = vals[0]; - isNull = all(null, vals); - allMin = all(xaxisOffset, vals, true); - - if (isNull) { - if (options.get('nullColor')) { - color = highlight ? options.get('nullColor') : this.calcHighlightColor(options.get('nullColor'), options); - y = (yoffset > 0) ? yoffset - 1 : yoffset; - return target.drawRect(x, y, this.barWidth - 1, 0, color, color); - } else { - return undefined; - } - } - yoffsetNeg = yoffset; - for (i = 0; i < valcount; i++) { - val = vals[i]; - - if (stacked && val === xaxisOffset) { - if (!allMin || minPlotted) { - continue; - } - minPlotted = true; - } - - if (range > 0) { - height = Math.floor(canvasHeightEf * ((Math.abs(val - xaxisOffset) / range))) + 1; - } else { - height = 1; - } - if (val < xaxisOffset || (val === xaxisOffset && yoffset === 0)) { - y = yoffsetNeg; - yoffsetNeg += height; - } else { - y = yoffset - height; - yoffset -= height; - } - color = this.calcColor(i, val, valuenum); - if (highlight) { - color = this.calcHighlightColor(color, options); - } - result.push(target.drawRect(x, y, this.barWidth - 1, height - 1, color, color)); - } - if (result.length === 1) { - return result[0]; - } - return result; - } - }); - - /** - * Tristate charts - */ - $.fn.sparkline.tristate = tristate = createClass($.fn.sparkline._base, barHighlightMixin, { - type: 'tristate', - - init: function (el, values, options, width, height) { - var barWidth = parseInt(options.get('barWidth'), 10), - barSpacing = parseInt(options.get('barSpacing'), 10); - tristate._super.init.call(this, el, values, options, width, height); - - this.regionShapes = {}; - this.barWidth = barWidth; - this.barSpacing = barSpacing; - this.totalBarWidth = barWidth + barSpacing; - this.values = $.map(values, Number); - this.width = width = (values.length * barWidth) + ((values.length - 1) * barSpacing); - - if ($.isArray(options.get('colorMap'))) { - this.colorMapByIndex = options.get('colorMap'); - this.colorMapByValue = null; - } else { - this.colorMapByIndex = null; - this.colorMapByValue = options.get('colorMap'); - if (this.colorMapByValue && this.colorMapByValue.get === undefined) { - this.colorMapByValue = new RangeMap(this.colorMapByValue); - } - } - this.initTarget(); - }, - - getRegion: function (el, x, y) { - return Math.floor(x / this.totalBarWidth); - }, - - getCurrentRegionFields: function () { - var currentRegion = this.currentRegion; - return { - isNull: this.values[currentRegion] === undefined, - value: this.values[currentRegion], - color: this.calcColor(this.values[currentRegion], currentRegion), - offset: currentRegion - }; - }, - - calcColor: function (value, valuenum) { - var values = this.values, - options = this.options, - colorMapByIndex = this.colorMapByIndex, - colorMapByValue = this.colorMapByValue, - color, newColor; - - if (colorMapByValue && (newColor = colorMapByValue.get(value))) { - color = newColor; - } else if (colorMapByIndex && colorMapByIndex.length > valuenum) { - color = colorMapByIndex[valuenum]; - } else if (values[valuenum] < 0) { - color = options.get('negBarColor'); - } else if (values[valuenum] > 0) { - color = options.get('posBarColor'); - } else { - color = options.get('zeroBarColor'); - } - return color; - }, - - renderRegion: function (valuenum, highlight) { - var values = this.values, - options = this.options, - target = this.target, - canvasHeight, height, halfHeight, - x, y, color; - - canvasHeight = target.pixelHeight; - halfHeight = Math.round(canvasHeight / 2); - - x = valuenum * this.totalBarWidth; - if (values[valuenum] < 0) { - y = halfHeight; - height = halfHeight - 1; - } else if (values[valuenum] > 0) { - y = 0; - height = halfHeight - 1; - } else { - y = halfHeight - 1; - height = 2; - } - color = this.calcColor(values[valuenum], valuenum); - if (color === null) { - return; - } - if (highlight) { - color = this.calcHighlightColor(color, options); - } - return target.drawRect(x, y, this.barWidth - 1, height - 1, color, color); - } - }); - - /** - * Discrete charts - */ - $.fn.sparkline.discrete = discrete = createClass($.fn.sparkline._base, barHighlightMixin, { - type: 'discrete', - - init: function (el, values, options, width, height) { - discrete._super.init.call(this, el, values, options, width, height); - - this.regionShapes = {}; - this.values = values = $.map(values, Number); - this.min = Math.min.apply(Math, values); - this.max = Math.max.apply(Math, values); - this.range = this.max - this.min; - this.width = width = options.get('width') === 'auto' ? values.length * 2 : this.width; - this.interval = Math.floor(width / values.length); - this.itemWidth = width / values.length; - if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < this.min)) { - this.min = options.get('chartRangeMin'); - } - if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > this.max)) { - this.max = options.get('chartRangeMax'); - } - this.initTarget(); - if (this.target) { - this.lineHeight = options.get('lineHeight') === 'auto' ? Math.round(this.canvasHeight * 0.3) : options.get('lineHeight'); - } - }, - - getRegion: function (el, x, y) { - return Math.floor(x / this.itemWidth); - }, - - getCurrentRegionFields: function () { - var currentRegion = this.currentRegion; - return { - isNull: this.values[currentRegion] === undefined, - value: this.values[currentRegion], - offset: currentRegion - }; - }, - - renderRegion: function (valuenum, highlight) { - var values = this.values, - options = this.options, - min = this.min, - max = this.max, - range = this.range, - interval = this.interval, - target = this.target, - canvasHeight = this.canvasHeight, - lineHeight = this.lineHeight, - pheight = canvasHeight - lineHeight, - ytop, val, color, x; - - val = clipval(values[valuenum], min, max); - x = valuenum * interval; - ytop = Math.round(pheight - pheight * ((val - min) / range)); - color = (options.get('thresholdColor') && val < options.get('thresholdValue')) ? options.get('thresholdColor') : options.get('lineColor'); - if (highlight) { - color = this.calcHighlightColor(color, options); - } - return target.drawLine(x, ytop, x, ytop + lineHeight, color); - } - }); - - /** - * Bullet charts - */ - $.fn.sparkline.bullet = bullet = createClass($.fn.sparkline._base, { - type: 'bullet', - - init: function (el, values, options, width, height) { - var min, max, vals; - bullet._super.init.call(this, el, values, options, width, height); - - // values: target, performance, range1, range2, range3 - this.values = values = normalizeValues(values); - // target or performance could be null - vals = values.slice(); - vals[0] = vals[0] === null ? vals[2] : vals[0]; - vals[1] = values[1] === null ? vals[2] : vals[1]; - min = Math.min.apply(Math, values); - max = Math.max.apply(Math, values); - if (options.get('base') === undefined) { - min = min < 0 ? min : 0; - } else { - min = options.get('base'); - } - this.min = min; - this.max = max; - this.range = max - min; - this.shapes = {}; - this.valueShapes = {}; - this.regiondata = {}; - this.width = width = options.get('width') === 'auto' ? '4.0em' : width; - this.target = this.$el.simpledraw(width, height, options.get('composite')); - if (!values.length) { - this.disabled = true; - } - this.initTarget(); - }, - - getRegion: function (el, x, y) { - var shapeid = this.target.getShapeAt(el, x, y); - return (shapeid !== undefined && this.shapes[shapeid] !== undefined) ? this.shapes[shapeid] : undefined; - }, - - getCurrentRegionFields: function () { - var currentRegion = this.currentRegion; - return { - fieldkey: currentRegion.substr(0, 1), - value: this.values[currentRegion.substr(1)], - region: currentRegion - }; - }, - - changeHighlight: function (highlight) { - var currentRegion = this.currentRegion, - shapeid = this.valueShapes[currentRegion], - shape; - delete this.shapes[shapeid]; - switch (currentRegion.substr(0, 1)) { - case 'r': - shape = this.renderRange(currentRegion.substr(1), highlight); - break; - case 'p': - shape = this.renderPerformance(highlight); - break; - case 't': - shape = this.renderTarget(highlight); - break; - } - this.valueShapes[currentRegion] = shape.id; - this.shapes[shape.id] = currentRegion; - this.target.replaceWithShape(shapeid, shape); - }, - - renderRange: function (rn, highlight) { - var rangeval = this.values[rn], - rangewidth = Math.round(this.canvasWidth * ((rangeval - this.min) / this.range)), - color = this.options.get('rangeColors')[rn - 2]; - if (highlight) { - color = this.calcHighlightColor(color, this.options); - } - return this.target.drawRect(0, 0, rangewidth - 1, this.canvasHeight - 1, color, color); - }, - - renderPerformance: function (highlight) { - var perfval = this.values[1], - perfwidth = Math.round(this.canvasWidth * ((perfval - this.min) / this.range)), - color = this.options.get('performanceColor'); - if (highlight) { - color = this.calcHighlightColor(color, this.options); - } - return this.target.drawRect(0, Math.round(this.canvasHeight * 0.3), perfwidth - 1, - Math.round(this.canvasHeight * 0.4) - 1, color, color); - }, - - renderTarget: function (highlight) { - var targetval = this.values[0], - x = Math.round(this.canvasWidth * ((targetval - this.min) / this.range) - (this.options.get('targetWidth') / 2)), - targettop = Math.round(this.canvasHeight * 0.10), - targetheight = this.canvasHeight - (targettop * 2), - color = this.options.get('targetColor'); - if (highlight) { - color = this.calcHighlightColor(color, this.options); - } - return this.target.drawRect(x, targettop, this.options.get('targetWidth') - 1, targetheight - 1, color, color); - }, - - render: function () { - var vlen = this.values.length, - target = this.target, - i, shape; - if (!bullet._super.render.call(this)) { - return; - } - for (i = 2; i < vlen; i++) { - shape = this.renderRange(i).append(); - this.shapes[shape.id] = 'r' + i; - this.valueShapes['r' + i] = shape.id; - } - if (this.values[1] !== null) { - shape = this.renderPerformance().append(); - this.shapes[shape.id] = 'p1'; - this.valueShapes.p1 = shape.id; - } - if (this.values[0] !== null) { - shape = this.renderTarget().append(); - this.shapes[shape.id] = 't0'; - this.valueShapes.t0 = shape.id; - } - target.render(); - } - }); - - /** - * Pie charts - */ - $.fn.sparkline.pie = pie = createClass($.fn.sparkline._base, { - type: 'pie', - - init: function (el, values, options, width, height) { - var total = 0, i; - - pie._super.init.call(this, el, values, options, width, height); - - this.shapes = {}; // map shape ids to value offsets - this.valueShapes = {}; // maps value offsets to shape ids - this.values = values = $.map(values, Number); - - if (options.get('width') === 'auto') { - this.width = this.height; - } - - if (values.length > 0) { - for (i = values.length; i--;) { - total += values[i]; - } - } - this.total = total; - this.initTarget(); - this.radius = Math.floor(Math.min(this.canvasWidth, this.canvasHeight) / 2); - }, - - getRegion: function (el, x, y) { - var shapeid = this.target.getShapeAt(el, x, y); - return (shapeid !== undefined && this.shapes[shapeid] !== undefined) ? this.shapes[shapeid] : undefined; - }, - - getCurrentRegionFields: function () { - var currentRegion = this.currentRegion; - return { - isNull: this.values[currentRegion] === undefined, - value: this.values[currentRegion], - percent: this.values[currentRegion] / this.total * 100, - color: this.options.get('sliceColors')[currentRegion % this.options.get('sliceColors').length], - offset: currentRegion - }; - }, - - changeHighlight: function (highlight) { - var currentRegion = this.currentRegion, - newslice = this.renderSlice(currentRegion, highlight), - shapeid = this.valueShapes[currentRegion]; - delete this.shapes[shapeid]; - this.target.replaceWithShape(shapeid, newslice); - this.valueShapes[currentRegion] = newslice.id; - this.shapes[newslice.id] = currentRegion; - }, - - renderSlice: function (valuenum, highlight) { - var target = this.target, - options = this.options, - radius = this.radius, - borderWidth = options.get('borderWidth'), - offset = options.get('offset'), - circle = 2 * Math.PI, - values = this.values, - total = this.total, - next = offset ? (2*Math.PI)*(offset/360) : 0, - start, end, i, vlen, color; - - vlen = values.length; - for (i = 0; i < vlen; i++) { - start = next; - end = next; - if (total > 0) { // avoid divide by zero - end = next + (circle * (values[i] / total)); - } - if (valuenum === i) { - color = options.get('sliceColors')[i % options.get('sliceColors').length]; - if (highlight) { - color = this.calcHighlightColor(color, options); - } - - return target.drawPieSlice(radius, radius, radius - borderWidth, start, end, undefined, color); - } - next = end; - } - }, - - render: function () { - var target = this.target, - values = this.values, - options = this.options, - radius = this.radius, - borderWidth = options.get('borderWidth'), - shape, i; - - if (!pie._super.render.call(this)) { - return; - } - if (borderWidth) { - target.drawCircle(radius, radius, Math.floor(radius - (borderWidth / 2)), - options.get('borderColor'), undefined, borderWidth).append(); - } - for (i = values.length; i--;) { - if (values[i]) { // don't render zero values - shape = this.renderSlice(i).append(); - this.valueShapes[i] = shape.id; // store just the shapeid - this.shapes[shape.id] = i; - } - } - target.render(); - } - }); - - /** - * Box plots - */ - $.fn.sparkline.box = box = createClass($.fn.sparkline._base, { - type: 'box', - - init: function (el, values, options, width, height) { - box._super.init.call(this, el, values, options, width, height); - this.values = $.map(values, Number); - this.width = options.get('width') === 'auto' ? '4.0em' : width; - this.initTarget(); - if (!this.values.length) { - this.disabled = 1; - } - }, - - /** - * Simulate a single region - */ - getRegion: function () { - return 1; - }, - - getCurrentRegionFields: function () { - var result = [ - { field: 'lq', value: this.quartiles[0] }, - { field: 'med', value: this.quartiles[1] }, - { field: 'uq', value: this.quartiles[2] } - ]; - if (this.loutlier !== undefined) { - result.push({ field: 'lo', value: this.loutlier}); - } - if (this.routlier !== undefined) { - result.push({ field: 'ro', value: this.routlier}); - } - if (this.lwhisker !== undefined) { - result.push({ field: 'lw', value: this.lwhisker}); - } - if (this.rwhisker !== undefined) { - result.push({ field: 'rw', value: this.rwhisker}); - } - return result; - }, - - render: function () { - var target = this.target, - values = this.values, - vlen = values.length, - options = this.options, - canvasWidth = this.canvasWidth, - canvasHeight = this.canvasHeight, - minValue = options.get('chartRangeMin') === undefined ? Math.min.apply(Math, values) : options.get('chartRangeMin'), - maxValue = options.get('chartRangeMax') === undefined ? Math.max.apply(Math, values) : options.get('chartRangeMax'), - canvasLeft = 0, - lwhisker, loutlier, iqr, q1, q2, q3, rwhisker, routlier, i, - size, unitSize; - - if (!box._super.render.call(this)) { - return; - } - - if (options.get('raw')) { - if (options.get('showOutliers') && values.length > 5) { - loutlier = values[0]; - lwhisker = values[1]; - q1 = values[2]; - q2 = values[3]; - q3 = values[4]; - rwhisker = values[5]; - routlier = values[6]; - } else { - lwhisker = values[0]; - q1 = values[1]; - q2 = values[2]; - q3 = values[3]; - rwhisker = values[4]; - } - } else { - values.sort(function (a, b) { return a - b; }); - q1 = quartile(values, 1); - q2 = quartile(values, 2); - q3 = quartile(values, 3); - iqr = q3 - q1; - if (options.get('showOutliers')) { - lwhisker = rwhisker = undefined; - for (i = 0; i < vlen; i++) { - if (lwhisker === undefined && values[i] > q1 - (iqr * options.get('outlierIQR'))) { - lwhisker = values[i]; - } - if (values[i] < q3 + (iqr * options.get('outlierIQR'))) { - rwhisker = values[i]; - } - } - loutlier = values[0]; - routlier = values[vlen - 1]; - } else { - lwhisker = values[0]; - rwhisker = values[vlen - 1]; - } - } - this.quartiles = [q1, q2, q3]; - this.lwhisker = lwhisker; - this.rwhisker = rwhisker; - this.loutlier = loutlier; - this.routlier = routlier; - - unitSize = canvasWidth / (maxValue - minValue + 1); - if (options.get('showOutliers')) { - canvasLeft = Math.ceil(options.get('spotRadius')); - canvasWidth -= 2 * Math.ceil(options.get('spotRadius')); - unitSize = canvasWidth / (maxValue - minValue + 1); - if (loutlier < lwhisker) { - target.drawCircle((loutlier - minValue) * unitSize + canvasLeft, - canvasHeight / 2, - options.get('spotRadius'), - options.get('outlierLineColor'), - options.get('outlierFillColor')).append(); - } - if (routlier > rwhisker) { - target.drawCircle((routlier - minValue) * unitSize + canvasLeft, - canvasHeight / 2, - options.get('spotRadius'), - options.get('outlierLineColor'), - options.get('outlierFillColor')).append(); - } - } - - // box - target.drawRect( - Math.round((q1 - minValue) * unitSize + canvasLeft), - Math.round(canvasHeight * 0.1), - Math.round((q3 - q1) * unitSize), - Math.round(canvasHeight * 0.8), - options.get('boxLineColor'), - options.get('boxFillColor')).append(); - // left whisker - target.drawLine( - Math.round((lwhisker - minValue) * unitSize + canvasLeft), - Math.round(canvasHeight / 2), - Math.round((q1 - minValue) * unitSize + canvasLeft), - Math.round(canvasHeight / 2), - options.get('lineColor')).append(); - target.drawLine( - Math.round((lwhisker - minValue) * unitSize + canvasLeft), - Math.round(canvasHeight / 4), - Math.round((lwhisker - minValue) * unitSize + canvasLeft), - Math.round(canvasHeight - canvasHeight / 4), - options.get('whiskerColor')).append(); - // right whisker - target.drawLine(Math.round((rwhisker - minValue) * unitSize + canvasLeft), - Math.round(canvasHeight / 2), - Math.round((q3 - minValue) * unitSize + canvasLeft), - Math.round(canvasHeight / 2), - options.get('lineColor')).append(); - target.drawLine( - Math.round((rwhisker - minValue) * unitSize + canvasLeft), - Math.round(canvasHeight / 4), - Math.round((rwhisker - minValue) * unitSize + canvasLeft), - Math.round(canvasHeight - canvasHeight / 4), - options.get('whiskerColor')).append(); - // median line - target.drawLine( - Math.round((q2 - minValue) * unitSize + canvasLeft), - Math.round(canvasHeight * 0.1), - Math.round((q2 - minValue) * unitSize + canvasLeft), - Math.round(canvasHeight * 0.9), - options.get('medianColor')).append(); - if (options.get('target')) { - size = Math.ceil(options.get('spotRadius')); - target.drawLine( - Math.round((options.get('target') - minValue) * unitSize + canvasLeft), - Math.round((canvasHeight / 2) - size), - Math.round((options.get('target') - minValue) * unitSize + canvasLeft), - Math.round((canvasHeight / 2) + size), - options.get('targetColor')).append(); - target.drawLine( - Math.round((options.get('target') - minValue) * unitSize + canvasLeft - size), - Math.round(canvasHeight / 2), - Math.round((options.get('target') - minValue) * unitSize + canvasLeft + size), - Math.round(canvasHeight / 2), - options.get('targetColor')).append(); - } - target.render(); - } - }); - - // Setup a very simple "virtual canvas" to make drawing the few shapes we need easier - // This is accessible as $(foo).simpledraw() - - VShape = createClass({ - init: function (target, id, type, args) { - this.target = target; - this.id = id; - this.type = type; - this.args = args; - }, - append: function () { - this.target.appendShape(this); - return this; - } - }); - - VCanvas_base = createClass({ - _pxregex: /(\d+)(px)?\s*$/i, - - init: function (width, height, target) { - if (!width) { - return; - } - this.width = width; - this.height = height; - this.target = target; - this.lastShapeId = null; - if (target[0]) { - target = target[0]; - } - $.data(target, '_jqs_vcanvas', this); - }, - - drawLine: function (x1, y1, x2, y2, lineColor, lineWidth) { - return this.drawShape([[x1, y1], [x2, y2]], lineColor, lineWidth); - }, - - drawShape: function (path, lineColor, fillColor, lineWidth) { - return this._genShape('Shape', [path, lineColor, fillColor, lineWidth]); - }, - - drawCircle: function (x, y, radius, lineColor, fillColor, lineWidth) { - return this._genShape('Circle', [x, y, radius, lineColor, fillColor, lineWidth]); - }, - - drawPieSlice: function (x, y, radius, startAngle, endAngle, lineColor, fillColor) { - return this._genShape('PieSlice', [x, y, radius, startAngle, endAngle, lineColor, fillColor]); - }, - - drawRect: function (x, y, width, height, lineColor, fillColor) { - return this._genShape('Rect', [x, y, width, height, lineColor, fillColor]); - }, - - getElement: function () { - return this.canvas; - }, - - /** - * Return the most recently inserted shape id - */ - getLastShapeId: function () { - return this.lastShapeId; - }, - - /** - * Clear and reset the canvas - */ - reset: function () { - alert('reset not implemented'); - }, - - _insert: function (el, target) { - $(target).html(el); - }, - - /** - * Calculate the pixel dimensions of the canvas - */ - _calculatePixelDims: function (width, height, canvas) { - // XXX This should probably be a configurable option - var match; - match = this._pxregex.exec(height); - if (match) { - this.pixelHeight = match[1]; - } else { - this.pixelHeight = $(canvas).height(); - } - match = this._pxregex.exec(width); - if (match) { - this.pixelWidth = match[1]; - } else { - this.pixelWidth = $(canvas).width(); - } - }, - - /** - * Generate a shape object and id for later rendering - */ - _genShape: function (shapetype, shapeargs) { - var id = shapeCount++; - shapeargs.unshift(id); - return new VShape(this, id, shapetype, shapeargs); - }, - - /** - * Add a shape to the end of the render queue - */ - appendShape: function (shape) { - alert('appendShape not implemented'); - }, - - /** - * Replace one shape with another - */ - replaceWithShape: function (shapeid, shape) { - alert('replaceWithShape not implemented'); - }, - - /** - * Insert one shape after another in the render queue - */ - insertAfterShape: function (shapeid, shape) { - alert('insertAfterShape not implemented'); - }, - - /** - * Remove a shape from the queue - */ - removeShapeId: function (shapeid) { - alert('removeShapeId not implemented'); - }, - - /** - * Find a shape at the specified x/y co-ordinates - */ - getShapeAt: function (el, x, y) { - alert('getShapeAt not implemented'); - }, - - /** - * Render all queued shapes onto the canvas - */ - render: function () { - alert('render not implemented'); - } - }); - - VCanvas_canvas = createClass(VCanvas_base, { - init: function (width, height, target, interact) { - VCanvas_canvas._super.init.call(this, width, height, target); - this.canvas = document.createElement('canvas'); - if (target[0]) { - target = target[0]; - } - $.data(target, '_jqs_vcanvas', this); - $(this.canvas).css({ display: 'inline-block', width: width, height: height, verticalAlign: 'top' }); - this._insert(this.canvas, target); - this._calculatePixelDims(width, height, this.canvas); - this.canvas.width = this.pixelWidth; - this.canvas.height = this.pixelHeight; - this.interact = interact; - this.shapes = {}; - this.shapeseq = []; - this.currentTargetShapeId = undefined; - $(this.canvas).css({width: this.pixelWidth, height: this.pixelHeight}); - }, - - _getContext: function (lineColor, fillColor, lineWidth) { - var context = this.canvas.getContext('2d'); - if (lineColor !== undefined) { - context.strokeStyle = lineColor; - } - context.lineWidth = lineWidth === undefined ? 1 : lineWidth; - if (fillColor !== undefined) { - context.fillStyle = fillColor; - } - return context; - }, - - reset: function () { - var context = this._getContext(); - context.clearRect(0, 0, this.pixelWidth, this.pixelHeight); - this.shapes = {}; - this.shapeseq = []; - this.currentTargetShapeId = undefined; - }, - - _drawShape: function (shapeid, path, lineColor, fillColor, lineWidth) { - var context = this._getContext(lineColor, fillColor, lineWidth), - i, plen; - context.beginPath(); - context.moveTo(path[0][0] + 0.5, path[0][1] + 0.5); - for (i = 1, plen = path.length; i < plen; i++) { - context.lineTo(path[i][0] + 0.5, path[i][1] + 0.5); // the 0.5 offset gives us crisp pixel-width lines - } - if (lineColor !== undefined) { - context.stroke(); - } - if (fillColor !== undefined) { - context.fill(); - } - if (this.targetX !== undefined && this.targetY !== undefined && - context.isPointInPath(this.targetX, this.targetY)) { - this.currentTargetShapeId = shapeid; - } - }, - - _drawCircle: function (shapeid, x, y, radius, lineColor, fillColor, lineWidth) { - var context = this._getContext(lineColor, fillColor, lineWidth); - context.beginPath(); - context.arc(x, y, radius, 0, 2 * Math.PI, false); - if (this.targetX !== undefined && this.targetY !== undefined && - context.isPointInPath(this.targetX, this.targetY)) { - this.currentTargetShapeId = shapeid; - } - if (lineColor !== undefined) { - context.stroke(); - } - if (fillColor !== undefined) { - context.fill(); - } - }, - - _drawPieSlice: function (shapeid, x, y, radius, startAngle, endAngle, lineColor, fillColor) { - var context = this._getContext(lineColor, fillColor); - context.beginPath(); - context.moveTo(x, y); - context.arc(x, y, radius, startAngle, endAngle, false); - context.lineTo(x, y); - context.closePath(); - if (lineColor !== undefined) { - context.stroke(); - } - if (fillColor) { - context.fill(); - } - if (this.targetX !== undefined && this.targetY !== undefined && - context.isPointInPath(this.targetX, this.targetY)) { - this.currentTargetShapeId = shapeid; - } - }, - - _drawRect: function (shapeid, x, y, width, height, lineColor, fillColor) { - return this._drawShape(shapeid, [[x, y], [x + width, y], [x + width, y + height], [x, y + height], [x, y]], lineColor, fillColor); - }, - - appendShape: function (shape) { - this.shapes[shape.id] = shape; - this.shapeseq.push(shape.id); - this.lastShapeId = shape.id; - return shape.id; - }, - - replaceWithShape: function (shapeid, shape) { - var shapeseq = this.shapeseq, - i; - this.shapes[shape.id] = shape; - for (i = shapeseq.length; i--;) { - if (shapeseq[i] == shapeid) { - shapeseq[i] = shape.id; - } - } - delete this.shapes[shapeid]; - }, - - replaceWithShapes: function (shapeids, shapes) { - var shapeseq = this.shapeseq, - shapemap = {}, - sid, i, first; - - for (i = shapeids.length; i--;) { - shapemap[shapeids[i]] = true; - } - for (i = shapeseq.length; i--;) { - sid = shapeseq[i]; - if (shapemap[sid]) { - shapeseq.splice(i, 1); - delete this.shapes[sid]; - first = i; - } - } - for (i = shapes.length; i--;) { - shapeseq.splice(first, 0, shapes[i].id); - this.shapes[shapes[i].id] = shapes[i]; - } - - }, - - insertAfterShape: function (shapeid, shape) { - var shapeseq = this.shapeseq, - i; - for (i = shapeseq.length; i--;) { - if (shapeseq[i] === shapeid) { - shapeseq.splice(i + 1, 0, shape.id); - this.shapes[shape.id] = shape; - return; - } - } - }, - - removeShapeId: function (shapeid) { - var shapeseq = this.shapeseq, - i; - for (i = shapeseq.length; i--;) { - if (shapeseq[i] === shapeid) { - shapeseq.splice(i, 1); - break; - } - } - delete this.shapes[shapeid]; - }, - - getShapeAt: function (el, x, y) { - this.targetX = x; - this.targetY = y; - this.render(); - return this.currentTargetShapeId; - }, - - render: function () { - var shapeseq = this.shapeseq, - shapes = this.shapes, - shapeCount = shapeseq.length, - context = this._getContext(), - shapeid, shape, i; - context.clearRect(0, 0, this.pixelWidth, this.pixelHeight); - for (i = 0; i < shapeCount; i++) { - shapeid = shapeseq[i]; - shape = shapes[shapeid]; - this['_draw' + shape.type].apply(this, shape.args); - } - if (!this.interact) { - // not interactive so no need to keep the shapes array - this.shapes = {}; - this.shapeseq = []; - } - } - - }); - - VCanvas_vml = createClass(VCanvas_base, { - init: function (width, height, target) { - var groupel; - VCanvas_vml._super.init.call(this, width, height, target); - if (target[0]) { - target = target[0]; - } - $.data(target, '_jqs_vcanvas', this); - this.canvas = document.createElement('span'); - $(this.canvas).css({ display: 'inline-block', position: 'relative', overflow: 'hidden', width: width, height: height, margin: '0px', padding: '0px', verticalAlign: 'top'}); - this._insert(this.canvas, target); - this._calculatePixelDims(width, height, this.canvas); - this.canvas.width = this.pixelWidth; - this.canvas.height = this.pixelHeight; - groupel = ''; - this.canvas.insertAdjacentHTML('beforeEnd', groupel); - this.group = $(this.canvas).children()[0]; - this.rendered = false; - this.prerender = ''; - }, - - _drawShape: function (shapeid, path, lineColor, fillColor, lineWidth) { - var vpath = [], - initial, stroke, fill, closed, vel, plen, i; - for (i = 0, plen = path.length; i < plen; i++) { - vpath[i] = '' + (path[i][0]) + ',' + (path[i][1]); - } - initial = vpath.splice(0, 1); - lineWidth = lineWidth === undefined ? 1 : lineWidth; - stroke = lineColor === undefined ? ' stroked="false" ' : ' strokeWeight="' + lineWidth + 'px" strokeColor="' + lineColor + '" '; - fill = fillColor === undefined ? ' filled="false"' : ' fillColor="' + fillColor + '" filled="true" '; - closed = vpath[0] === vpath[vpath.length - 1] ? 'x ' : ''; - vel = '' + - ' '; - return vel; - }, - - _drawCircle: function (shapeid, x, y, radius, lineColor, fillColor, lineWidth) { - var stroke, fill, vel; - x -= radius; - y -= radius; - stroke = lineColor === undefined ? ' stroked="false" ' : ' strokeWeight="' + lineWidth + 'px" strokeColor="' + lineColor + '" '; - fill = fillColor === undefined ? ' filled="false"' : ' fillColor="' + fillColor + '" filled="true" '; - vel = ''; - return vel; - - }, - - _drawPieSlice: function (shapeid, x, y, radius, startAngle, endAngle, lineColor, fillColor) { - var vpath, startx, starty, endx, endy, stroke, fill, vel; - if (startAngle === endAngle) { - return ''; // VML seems to have problem when start angle equals end angle. - } - if ((endAngle - startAngle) === (2 * Math.PI)) { - startAngle = 0.0; // VML seems to have a problem when drawing a full circle that doesn't start 0 - endAngle = (2 * Math.PI); - } - - startx = x + Math.round(Math.cos(startAngle) * radius); - starty = y + Math.round(Math.sin(startAngle) * radius); - endx = x + Math.round(Math.cos(endAngle) * radius); - endy = y + Math.round(Math.sin(endAngle) * radius); - - if (startx === endx && starty === endy) { - if ((endAngle - startAngle) < Math.PI) { - // Prevent very small slices from being mistaken as a whole pie - return ''; - } - // essentially going to be the entire circle, so ignore startAngle - startx = endx = x + radius; - starty = endy = y; - } - - if (startx === endx && starty === endy && (endAngle - startAngle) < Math.PI) { - return ''; - } - - vpath = [x - radius, y - radius, x + radius, y + radius, startx, starty, endx, endy]; - stroke = lineColor === undefined ? ' stroked="false" ' : ' strokeWeight="1px" strokeColor="' + lineColor + '" '; - fill = fillColor === undefined ? ' filled="false"' : ' fillColor="' + fillColor + '" filled="true" '; - vel = '' + - ' '; - return vel; - }, - - _drawRect: function (shapeid, x, y, width, height, lineColor, fillColor) { - return this._drawShape(shapeid, [[x, y], [x, y + height], [x + width, y + height], [x + width, y], [x, y]], lineColor, fillColor); - }, - - reset: function () { - this.group.innerHTML = ''; - }, - - appendShape: function (shape) { - var vel = this['_draw' + shape.type].apply(this, shape.args); - if (this.rendered) { - this.group.insertAdjacentHTML('beforeEnd', vel); - } else { - this.prerender += vel; - } - this.lastShapeId = shape.id; - return shape.id; - }, - - replaceWithShape: function (shapeid, shape) { - var existing = $('#jqsshape' + shapeid), - vel = this['_draw' + shape.type].apply(this, shape.args); - existing[0].outerHTML = vel; - }, - - replaceWithShapes: function (shapeids, shapes) { - // replace the first shapeid with all the new shapes then toast the remaining old shapes - var existing = $('#jqsshape' + shapeids[0]), - replace = '', - slen = shapes.length, - i; - for (i = 0; i < slen; i++) { - replace += this['_draw' + shapes[i].type].apply(this, shapes[i].args); - } - existing[0].outerHTML = replace; - for (i = 1; i < shapeids.length; i++) { - $('#jqsshape' + shapeids[i]).remove(); - } - }, - - insertAfterShape: function (shapeid, shape) { - var existing = $('#jqsshape' + shapeid), - vel = this['_draw' + shape.type].apply(this, shape.args); - existing[0].insertAdjacentHTML('afterEnd', vel); - }, - - removeShapeId: function (shapeid) { - var existing = $('#jqsshape' + shapeid); - this.group.removeChild(existing[0]); - }, - - getShapeAt: function (el, x, y) { - var shapeid = el.id.substr(8); - return shapeid; - }, - - render: function () { - if (!this.rendered) { - // batch the intial render into a single repaint - this.group.innerHTML = this.prerender; - this.rendered = true; - } - } - }); - -}))}(document, Math));;; diff --git a/wp-content/plugins/wp-piwik/js/sparkline/jquery.sparkline.min.js b/wp-content/plugins/wp-piwik/js/sparkline/jquery.sparkline.min.js deleted file mode 100644 index fa616bf..0000000 --- a/wp-content/plugins/wp-piwik/js/sparkline/jquery.sparkline.min.js +++ /dev/null @@ -1,5 +0,0 @@ -/* jquery.sparkline 2.1.2 - http://omnipotent.net/jquery.sparkline/ -** Licensed under the New BSD License - see above site for details */ - -(function(a,b,c){(function(a){typeof define=="function"&&define.amd?define(["jquery"],a):jQuery&&!jQuery.fn.sparkline&&a(jQuery)})(function(d){"use strict";var e={},f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L=0;f=function(){return{common:{type:"line",lineColor:"#00f",fillColor:"#cdf",defaultPixelsPerValue:3,width:"auto",height:"auto",composite:!1,tagValuesAttribute:"values",tagOptionsPrefix:"spark",enableTagOptions:!1,enableHighlight:!0,highlightLighten:1.4,tooltipSkipNull:!0,tooltipPrefix:"",tooltipSuffix:"",disableHiddenCheck:!1,numberFormatter:!1,numberDigitGroupCount:3,numberDigitGroupSep:",",numberDecimalMark:".",disableTooltips:!1,disableInteraction:!1},line:{spotColor:"#f80",highlightSpotColor:"#5f5",highlightLineColor:"#f22",spotRadius:1.5,minSpotColor:"#f80",maxSpotColor:"#f80",lineWidth:1,normalRangeMin:c,normalRangeMax:c,normalRangeColor:"#ccc",drawNormalOnTop:!1,chartRangeMin:c,chartRangeMax:c,chartRangeMinX:c,chartRangeMaxX:c,tooltipFormat:new h(' {{prefix}}{{y}}{{suffix}}')},bar:{barColor:"#3366cc",negBarColor:"#f44",stackedBarColor:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],zeroColor:c,nullColor:c,zeroAxis:!0,barWidth:4,barSpacing:1,chartRangeMax:c,chartRangeMin:c,chartRangeClip:!1,colorMap:c,tooltipFormat:new h(' {{prefix}}{{value}}{{suffix}}')},tristate:{barWidth:4,barSpacing:1,posBarColor:"#6f6",negBarColor:"#f44",zeroBarColor:"#999",colorMap:{},tooltipFormat:new h(' {{value:map}}'),tooltipValueLookups:{map:{"-1":"Loss",0:"Draw",1:"Win"}}},discrete:{lineHeight:"auto",thresholdColor:c,thresholdValue:0,chartRangeMax:c,chartRangeMin:c,chartRangeClip:!1,tooltipFormat:new h("{{prefix}}{{value}}{{suffix}}")},bullet:{targetColor:"#f33",targetWidth:3,performanceColor:"#33f",rangeColors:["#d3dafe","#a8b6ff","#7f94ff"],base:c,tooltipFormat:new h("{{fieldkey:fields}} - {{value}}"),tooltipValueLookups:{fields:{r:"Range",p:"Performance",t:"Target"}}},pie:{offset:0,sliceColors:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],borderWidth:0,borderColor:"#000",tooltipFormat:new h(' {{value}} ({{percent.1}}%)')},box:{raw:!1,boxLineColor:"#000",boxFillColor:"#cdf",whiskerColor:"#000",outlierLineColor:"#333",outlierFillColor:"#fff",medianColor:"#f00",showOutliers:!0,outlierIQR:1.5,spotRadius:1.5,target:c,targetColor:"#4a2",chartRangeMax:c,chartRangeMin:c,tooltipFormat:new h("{{field:fields}}: {{value}}"),tooltipFormatFieldlistKey:"field",tooltipValueLookups:{fields:{lq:"Lower Quartile",med:"Median",uq:"Upper Quartile",lo:"Left Outlier",ro:"Right Outlier",lw:"Left Whisker",rw:"Right Whisker"}}}}},E='.jqstooltip { position: absolute;left: 0px;top: 0px;visibility: hidden;background: rgb(0, 0, 0) transparent;background-color: rgba(0,0,0,0.6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";color: white;font: 10px arial, san serif;text-align: left;white-space: nowrap;padding: 5px;border: 1px solid white;z-index: 10000;}.jqsfield { color: white;font: 10px arial, san serif;text-align: left;}',g=function(){var a,b;return a=function(){this.init.apply(this,arguments)},arguments.length>1?(arguments[0]?(a.prototype=d.extend(new arguments[0],arguments[arguments.length-1]),a._super=arguments[0].prototype):a.prototype=arguments[arguments.length-1],arguments.length>2&&(b=Array.prototype.slice.call(arguments,1,-1),b.unshift(a.prototype),d.extend.apply(d,b))):a.prototype=arguments[0],a.prototype.cls=a,a},d.SPFormatClass=h=g({fre:/\{\{([\w.]+?)(:(.+?))?\}\}/g,precre:/(\w+)\.(\d+)/,init:function(a,b){this.format=a,this.fclass=b},render:function(a,b,d){var e=this,f=a,g,h,i,j,k;return this.format.replace(this.fre,function(){var a;return h=arguments[1],i=arguments[3],g=e.precre.exec(h),g?(k=g[2],h=g[1]):k=!1,j=f[h],j===c?"":i&&b&&b[i]?(a=b[i],a.get?b[i].get(j)||j:b[i][j]||j):(n(j)&&(d.get("numberFormatter")?j=d.get("numberFormatter")(j):j=s(j,k,d.get("numberDigitGroupCount"),d.get("numberDigitGroupSep"),d.get("numberDecimalMark"))),j)})}}),d.spformat=function(a,b){return new h(a,b)},i=function(a,b,c){return ac?c:a},j=function(a,c){var d;return c===2?(d=b.floor(a.length/2),a.length%2?a[d]:(a[d-1]+a[d])/2):a.length%2?(d=(a.length*c+c)/4,d%1?(a[b.floor(d)]+a[b.floor(d)-1])/2:a[d-1]):(d=(a.length*c+2)/4,d%1?(a[b.floor(d)]+a[b.floor(d)-1])/2:a[d-1])},k=function(a){var b;switch(a){case"undefined":a=c;break;case"null":a=null;break;case"true":a=!0;break;case"false":a=!1;break;default:b=parseFloat(a),a==b&&(a=b)}return a},l=function(a){var b,c=[];for(b=a.length;b--;)c[b]=k(a[b]);return c},m=function(a,b){var c,d,e=[];for(c=0,d=a.length;c0;h-=c)a.splice(h,0,e);return a.join("")},o=function(a,b,c){var d;for(d=b.length;d--;){if(c&&b[d]===null)continue;if(b[d]!==a)return!1}return!0},p=function(a){var b=0,c;for(c=a.length;c--;)b+=typeof a[c]=="number"?a[c]:0;return b},r=function(a){return d.isArray(a)?a:[a]},q=function(b){var c;a.createStyleSheet?a.createStyleSheet().cssText=b:(c=a.createElement("style"),c.type="text/css",a.getElementsByTagName("head")[0].appendChild(c),c[typeof a.body.style.WebkitAppearance=="string"?"innerText":"innerHTML"]=b)},d.fn.simpledraw=function(b,e,f,g){var h,i;if(f&&(h=this.data("_jqs_vcanvas")))return h;if(d.fn.sparkline.canvas===!1)return!1;if(d.fn.sparkline.canvas===c){var j=a.createElement("canvas");if(!j.getContext||!j.getContext("2d")){if(!a.namespaces||!!a.namespaces.v)return d.fn.sparkline.canvas=!1,!1;a.namespaces.add("v","urn:schemas-microsoft-com:vml","#default#VML"),d.fn.sparkline.canvas=function(a,b,c,d){return new J(a,b,c)}}else d.fn.sparkline.canvas=function(a,b,c,d){return new I(a,b,c,d)}}return b===c&&(b=d(this).innerWidth()),e===c&&(e=d(this).innerHeight()),h=d.fn.sparkline.canvas(b,e,this,g),i=d(this).data("_jqs_mhandler"),i&&i.registerCanvas(h),h},d.fn.cleardraw=function(){var a=this.data("_jqs_vcanvas");a&&a.reset()},d.RangeMapClass=t=g({init:function(a){var b,c,d=[];for(b in a)a.hasOwnProperty(b)&&typeof b=="string"&&b.indexOf(":")>-1&&(c=b.split(":"),c[0]=c[0].length===0?-Infinity:parseFloat(c[0]),c[1]=c[1].length===0?Infinity:parseFloat(c[1]),c[2]=a[b],d.push(c));this.map=a,this.rangelist=d||!1},get:function(a){var b=this.rangelist,d,e,f;if((f=this.map[a])!==c)return f;if(b)for(d=b.length;d--;){e=b[d];if(e[0]<=a&&e[1]>=a)return e[2]}return c}}),d.range_map=function(a){return new t(a)},u=g({init:function(a,b){var c=d(a);this.$el=c,this.options=b,this.currentPageX=0,this.currentPageY=0,this.el=a,this.splist=[],this.tooltip=null,this.over=!1,this.displayTooltips=!b.get("disableTooltips"),this.highlightEnabled=!b.get("disableHighlight")},registerSparkline:function(a){this.splist.push(a),this.over&&this.updateDisplay()},registerCanvas:function(a){var b=d(a.canvas);this.canvas=a,this.$canvas=b,b.mouseenter(d.proxy(this.mouseenter,this)),b.mouseleave(d.proxy(this.mouseleave,this)),b.click(d.proxy(this.mouseclick,this))},reset:function(a){this.splist=[],this.tooltip&&a&&(this.tooltip.remove(),this.tooltip=c)},mouseclick:function(a){var b=d.Event("sparklineClick");b.originalEvent=a,b.sparklines=this.splist,this.$el.trigger(b)},mouseenter:function(b){d(a.body).unbind("mousemove.jqs"),d(a.body).bind("mousemove.jqs",d.proxy(this.mousemove,this)),this.over=!0,this.currentPageX=b.pageX,this.currentPageY=b.pageY,this.currentEl=b.target,!this.tooltip&&this.displayTooltips&&(this.tooltip=new v(this.options),this.tooltip.updatePosition(b.pageX,b.pageY)),this.updateDisplay()},mouseleave:function(){d(a.body).unbind("mousemove.jqs");var b=this.splist,c=b.length,e=!1,f,g;this.over=!1,this.currentEl=null,this.tooltip&&(this.tooltip.remove(),this.tooltip=null);for(g=0;g