From 1b69658feb7a77379f9e612cabd84e9bf8d8719c Mon Sep 17 00:00:00 2001 From: Kevin Cristiano <kcristiano@tadpole.cc> Date: Sun, 14 Jan 2018 15:43:03 -0500 Subject: [PATCH] civicrm-47 Update to 4.7.28 --- civicrm/CRM/Activity/BAO/Activity.php | 35 +- civicrm/CRM/Activity/Form/Activity.php | 2 +- civicrm/CRM/Activity/Form/ActivityFilter.php | 4 + civicrm/CRM/Activity/Page/AJAX.php | 2 +- civicrm/CRM/Admin/Form/Extensions.php | 13 +- civicrm/CRM/Admin/Form/Options.php | 18 +- civicrm/CRM/Admin/Page/Extensions.php | 40 +- civicrm/CRM/Batch/Page/AJAX.php | 31 +- civicrm/CRM/Case/Form/ActivityToCase.php | 6 + civicrm/CRM/Contact/BAO/Contact.php | 6 + civicrm/CRM/Contact/BAO/Contact/Utils.php | 24 +- civicrm/CRM/Contact/BAO/Group.php | 32 +- civicrm/CRM/Contact/BAO/Query.php | 34 +- civicrm/CRM/Contact/BAO/SavedSearch.php | 7 + civicrm/CRM/Contact/Form/GroupContact.php | 12 +- .../Form/Search/Custom/ContribSYBNT.php | 46 +- civicrm/CRM/Contact/Form/Task.php | 6 +- .../CRM/Contact/Form/Task/PDFLetterCommon.php | 8 +- civicrm/CRM/Contact/Import/Parser/Contact.php | 52 +- civicrm/CRM/Contact/Page/DedupeRules.php | 2 +- .../Page/View/UserDashBoard/GroupContact.php | 12 +- civicrm/CRM/Contact/Selector/Custom.php | 2 +- civicrm/CRM/Contribute/BAO/Contribution.php | 27 +- .../CRM/Contribute/BAO/ContributionRecur.php | 6 + civicrm/CRM/Contribute/BAO/Query.php | 8 + .../Contribute/Form/Contribution/Confirm.php | 8 +- .../Contribute/Form/Contribution/ThankYou.php | 34 +- .../CRM/Contribute/Form/ContributionBase.php | 19 +- civicrm/CRM/Contribute/Form/Task/Invoice.php | 10 +- civicrm/CRM/Core/BAO/ActionSchedule.php | 5 +- civicrm/CRM/Core/BAO/Address.php | 68 +- civicrm/CRM/Core/BAO/CMSUser.php | 21 +- civicrm/CRM/Core/BAO/CustomField.php | 8 +- civicrm/CRM/Core/BAO/Navigation.php | 5 +- civicrm/CRM/Core/BAO/OptionValue.php | 9 + civicrm/CRM/Core/BAO/PrevNextCache.php | 11 +- civicrm/CRM/Core/DAO.php | 9 +- civicrm/CRM/Core/Error.php | 4 +- civicrm/CRM/Core/Form.php | 18 +- civicrm/CRM/Core/Payment.php | 5 +- civicrm/CRM/Core/Permission.php | 3 +- civicrm/CRM/Core/Resources.php | 3 + civicrm/CRM/Custom/Page/Option.php | 50 +- civicrm/CRM/Dedupe/BAO/RuleGroup.php | 4 +- civicrm/CRM/Dedupe/Finder.php | 23 +- civicrm/CRM/Dedupe/Merger.php | 7 +- civicrm/CRM/Event/BAO/Participant.php | 1 + civicrm/CRM/Event/Cart/BAO/EventInCart.php | 4 +- civicrm/CRM/Event/Form/ManageEvent/Fee.php | 22 +- civicrm/CRM/Extension/Info.php | 33 + civicrm/CRM/Extension/Manager.php | 109 + civicrm/CRM/Extension/Mapper.php | 48 + civicrm/CRM/Mailing/BAO/Mailing.php | 14 +- civicrm/CRM/Mailing/Event/BAO/Opened.php | 5 +- civicrm/CRM/Mailing/Info.php | 4 +- civicrm/CRM/Member/BAO/Query.php | 8 +- civicrm/CRM/Member/DAO/MembershipType.php | 6 +- civicrm/CRM/Member/Form/Membership.php | 11 - civicrm/CRM/Pledge/BAO/Query.php | 12 + civicrm/CRM/Pledge/DAO/Pledge.php | 10 +- civicrm/CRM/Price/BAO/LineItem.php | 5 + civicrm/CRM/Price/DAO/PriceFieldValue.php | 12 +- civicrm/CRM/Profile/Form/Edit.php | 6 +- civicrm/CRM/Report/Form.php | 7 +- .../Form/Contribute/HouseholdSummary.php | 14 + .../Report/Form/Event/ParticipantListing.php | 22 +- civicrm/CRM/Report/Form/Mailing/Summary.php | 11 +- civicrm/CRM/UF/Form/AdvanceSetting.php | 2 + .../CRM/Upgrade/Incremental/php/FourSeven.php | 64 + .../CRM/Upgrade/Incremental/php/FourThree.php | 5 +- .../CRM/Upgrade/Incremental/php/FourTwo.php | 2 +- .../Upgrade/Incremental/sql/4.7.28.mysql.tpl | 55 + civicrm/CRM/Utils/API/HTMLInputCoder.php | 1 + civicrm/CRM/Utils/Check/Component/Env.php | 27 + .../CRM/Utils/Check/Component/Timestamps.php | 44 +- civicrm/CRM/Utils/File.php | 2 +- civicrm/CRM/Utils/Hook.php | 18 +- civicrm/CRM/Utils/SQL.php | 63 + civicrm/CRM/Utils/System/Backdrop.php | 20 + civicrm/CRM/Utils/System/Base.php | 18 + civicrm/CRM/Utils/System/Drupal8.php | 22 +- civicrm/CRM/Utils/System/DrupalBase.php | 20 + civicrm/CRM/Utils/System/Joomla.php | 80 +- civicrm/CRM/Utils/System/WordPress.php | 31 + civicrm/CRM/Utils/Type.php | 24 +- civicrm/CRM/Utils/VisualBundle.php | 110 + civicrm/Civi/Angular/Manager.php | 34 +- civicrm/Civi/Core/AssetBuilder.php | 17 + civicrm/Civi/Core/Container.php | 2 + civicrm/ang/crmCaseType/edit.html | 16 +- civicrm/ang/crmCaseType/list.html | 125 +- civicrm/ang/crmMailing/BlockMailing.html | 6 +- civicrm/ang/crmMailing/EditUnsubGroupCtrl.js | 14 +- civicrm/ang/crmMailing/RadioDate.js | 24 +- civicrm/ang/crmMailing/services.js | 5 + civicrm/ang/crmUi.js | 20 +- civicrm/ang/crmUi/field.html | 2 +- civicrm/api/api.php | 4 + civicrm/api/v3/Extension.php | 23 +- civicrm/api/v3/Mailing.php | 9 +- civicrm/api/v3/utils.php | 15 + civicrm/bower.json | 3 + .../crossfilter-1.3.x/.bower.json | 38 + .../crossfilter-1.3.x/CONTRIBUTING.md | 23 + .../crossfilter-1.3.x/LICENSE | 12 + .../crossfilter-1.3.x/README.md | 7 + .../crossfilter-1.3.x/bower.json | 28 + .../crossfilter-1.3.x/crossfilter.js | 1401 ++ .../crossfilter-1.3.x/crossfilter.min.js | 1 + .../bower_components/crossfilter2/.bower.json | 38 + .../crossfilter2/CONTRIBUTING.md | 23 + civicrm/bower_components/crossfilter2/LICENSE | 12 + .../bower_components/crossfilter2/README.md | 7 + .../bower_components/crossfilter2/bower.json | 28 + .../crossfilter2/crossfilter.js | 1401 ++ .../crossfilter2/crossfilter.min.js | 1 + civicrm/bower_components/d3-3.5.x/.bower.json | 18 + civicrm/bower_components/d3-3.5.x/LICENSE | 26 + civicrm/bower_components/d3-3.5.x/README.md | 13 + civicrm/bower_components/d3-3.5.x/bower.json | 7 + civicrm/bower_components/d3-3.5.x/d3.js | 9554 +++++++++++++ civicrm/bower_components/d3-3.5.x/d3.min.js | 5 + civicrm/bower_components/dc-2.1.x/.bower.json | 38 + civicrm/bower_components/dc-2.1.x/LICENSE | 191 + civicrm/bower_components/dc-2.1.x/README.md | 105 + civicrm/bower_components/dc-2.1.x/bower.json | 24 + civicrm/bower_components/dc-2.1.x/dc.css | 209 + civicrm/bower_components/dc-2.1.x/dc.js | 11155 ++++++++++++++++ civicrm/bower_components/dc-2.1.x/dc.js.map | 1 + civicrm/bower_components/dc-2.1.x/dc.min.css | 1 + civicrm/bower_components/dc-2.1.x/dc.min.js | 23 + .../bower_components/dc-2.1.x/dc.min.js.map | 1 + civicrm/civicrm-version.php | 2 +- civicrm/composer.json | 5 + civicrm/composer.lock | 43 +- civicrm/css/civicrmNavigation.css | 3 + civicrm/install/index.php | 180 +- civicrm/install/template.html | 2 + civicrm/js/crm.ajax.js | 2 +- civicrm/release-notes.md | 11 + civicrm/release-notes/4.7.28.md | 662 + civicrm/sql/civicrm.mysql | 4 +- civicrm/sql/civicrm_data.mysql | 73 +- civicrm/sql/civicrm_generated.mysql | 4 +- .../templates/CRM/Activity/Form/Activity.tpl | 4 +- .../templates/CRM/Admin/Form/Setting/Case.tpl | 1 - .../CRM/Admin/Page/ExtensionDetails.tpl | 15 + .../CRM/Admin/Page/Extensions/Main.tpl | 2 +- .../Form/Search/Custom/ContribSYBNT.tpl | 12 +- .../templates/CRM/Contact/Page/DedupeFind.tpl | 26 +- .../CRM/Contact/Page/Inline/Demographics.tpl | 3 +- .../CRM/Contribute/Form/Contribution/Main.tpl | 2 +- .../Form/Search/ContributionRecur.tpl | 7 + civicrm/templates/CRM/Custom/Page/Option.tpl | 1 + .../CRM/Event/Cart/Form/Checkout/Payment.tpl | 12 +- .../CRM/Event/Form/Registration/Register.tpl | 2 +- .../templates/CRM/Financial/Form/Search.tpl | 4 +- .../templates/CRM/Profile/Form/Dynamic.tpl | 4 +- .../templates/CRM/UF/Form/AdvanceSetting.tpl | 10 + civicrm/templates/CRM/UF/Form/Group.hlp | 14 + civicrm/templates/CRM/common/version.tpl | 2 +- civicrm/vendor/autoload.php | 2 +- civicrm/vendor/composer/autoload_psr4.php | 2 + civicrm/vendor/composer/autoload_real.php | 14 +- civicrm/vendor/composer/autoload_static.php | 23 +- civicrm/vendor/composer/installed.json | 42 + civicrm/vendor/marcj/topsort/.travis.yml | 21 + civicrm/vendor/marcj/topsort/LICENSE | 21 + civicrm/vendor/marcj/topsort/README.md | 212 + civicrm/vendor/marcj/topsort/bin/console | 11 + .../marcj/topsort/bin/upload-coverage.sh | 6 + civicrm/vendor/marcj/topsort/composer.json | 31 + civicrm/vendor/marcj/topsort/composer.lock | 1273 ++ civicrm/vendor/marcj/topsort/phpunit.xml | 36 + .../src/CircularDependencyException.php | 61 + .../topsort/src/Command/BenchmarkCommand.php | 85 + .../topsort/src/ElementNotFoundException.php | 60 + .../topsort/src/GroupedTopSortInterface.php | 69 + .../topsort/src/Implementations/ArraySort.php | 120 + .../Implementations/BaseImplementation.php | 77 + .../src/Implementations/FixedArraySort.php | 55 + .../src/Implementations/GroupedArraySort.php | 201 + .../Implementations/GroupedFixedArraySort.php | 87 + .../src/Implementations/GroupedStringSort.php | 107 + .../src/Implementations/StringSort.php | 84 + .../marcj/topsort/src/TopSortInterface.php | 53 + includes/civicrm.shortcodes.php | 61 +- 187 files changed, 29752 insertions(+), 615 deletions(-) create mode 100644 civicrm/CRM/Upgrade/Incremental/sql/4.7.28.mysql.tpl create mode 100644 civicrm/CRM/Utils/VisualBundle.php create mode 100644 civicrm/bower_components/crossfilter-1.3.x/.bower.json create mode 100644 civicrm/bower_components/crossfilter-1.3.x/CONTRIBUTING.md create mode 100644 civicrm/bower_components/crossfilter-1.3.x/LICENSE create mode 100644 civicrm/bower_components/crossfilter-1.3.x/README.md create mode 100644 civicrm/bower_components/crossfilter-1.3.x/bower.json create mode 100644 civicrm/bower_components/crossfilter-1.3.x/crossfilter.js create mode 100644 civicrm/bower_components/crossfilter-1.3.x/crossfilter.min.js create mode 100644 civicrm/bower_components/crossfilter2/.bower.json create mode 100644 civicrm/bower_components/crossfilter2/CONTRIBUTING.md create mode 100644 civicrm/bower_components/crossfilter2/LICENSE create mode 100644 civicrm/bower_components/crossfilter2/README.md create mode 100644 civicrm/bower_components/crossfilter2/bower.json create mode 100644 civicrm/bower_components/crossfilter2/crossfilter.js create mode 100644 civicrm/bower_components/crossfilter2/crossfilter.min.js create mode 100644 civicrm/bower_components/d3-3.5.x/.bower.json create mode 100644 civicrm/bower_components/d3-3.5.x/LICENSE create mode 100644 civicrm/bower_components/d3-3.5.x/README.md create mode 100644 civicrm/bower_components/d3-3.5.x/bower.json create mode 100644 civicrm/bower_components/d3-3.5.x/d3.js create mode 100644 civicrm/bower_components/d3-3.5.x/d3.min.js create mode 100644 civicrm/bower_components/dc-2.1.x/.bower.json create mode 100644 civicrm/bower_components/dc-2.1.x/LICENSE create mode 100644 civicrm/bower_components/dc-2.1.x/README.md create mode 100644 civicrm/bower_components/dc-2.1.x/bower.json create mode 100644 civicrm/bower_components/dc-2.1.x/dc.css create mode 100644 civicrm/bower_components/dc-2.1.x/dc.js create mode 100644 civicrm/bower_components/dc-2.1.x/dc.js.map create mode 100644 civicrm/bower_components/dc-2.1.x/dc.min.css create mode 100644 civicrm/bower_components/dc-2.1.x/dc.min.js create mode 100644 civicrm/bower_components/dc-2.1.x/dc.min.js.map create mode 100644 civicrm/release-notes/4.7.28.md create mode 100644 civicrm/vendor/marcj/topsort/.travis.yml create mode 100644 civicrm/vendor/marcj/topsort/LICENSE create mode 100644 civicrm/vendor/marcj/topsort/README.md create mode 100755 civicrm/vendor/marcj/topsort/bin/console create mode 100755 civicrm/vendor/marcj/topsort/bin/upload-coverage.sh create mode 100644 civicrm/vendor/marcj/topsort/composer.json create mode 100644 civicrm/vendor/marcj/topsort/composer.lock create mode 100644 civicrm/vendor/marcj/topsort/phpunit.xml create mode 100644 civicrm/vendor/marcj/topsort/src/CircularDependencyException.php create mode 100644 civicrm/vendor/marcj/topsort/src/Command/BenchmarkCommand.php create mode 100644 civicrm/vendor/marcj/topsort/src/ElementNotFoundException.php create mode 100644 civicrm/vendor/marcj/topsort/src/GroupedTopSortInterface.php create mode 100644 civicrm/vendor/marcj/topsort/src/Implementations/ArraySort.php create mode 100644 civicrm/vendor/marcj/topsort/src/Implementations/BaseImplementation.php create mode 100644 civicrm/vendor/marcj/topsort/src/Implementations/FixedArraySort.php create mode 100644 civicrm/vendor/marcj/topsort/src/Implementations/GroupedArraySort.php create mode 100644 civicrm/vendor/marcj/topsort/src/Implementations/GroupedFixedArraySort.php create mode 100644 civicrm/vendor/marcj/topsort/src/Implementations/GroupedStringSort.php create mode 100644 civicrm/vendor/marcj/topsort/src/Implementations/StringSort.php create mode 100644 civicrm/vendor/marcj/topsort/src/TopSortInterface.php diff --git a/civicrm/CRM/Activity/BAO/Activity.php b/civicrm/CRM/Activity/BAO/Activity.php index ea9bd39efd..a591d350f7 100644 --- a/civicrm/CRM/Activity/BAO/Activity.php +++ b/civicrm/CRM/Activity/BAO/Activity.php @@ -706,10 +706,6 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity { ), ); - if ($params['context'] != 'activity') { - $activityParams['status_id'] = CRM_Core_PseudoConstant::getKey(__CLASS__, 'status_id', 'Scheduled'); - } - // activity type ID clause if (!empty($params['activity_type_id'])) { if (is_array($params['activity_type_id'])) { @@ -726,6 +722,10 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity { $activityParams['activity_type_id'] = array('IN' => array_keys($activityTypes)); } + if (!empty($params['activity_status_id'])) { + $activityParams['activity_status_id'] = array('IN' => explode(',', $params['activity_status_id'])); + } + $excludeActivityIDs = array(); if (!empty($params['activity_type_exclude_id'])) { if (is_array($params['activity_type_exclude_id'])) { @@ -757,13 +757,7 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity { } } - if (empty($order)) { - // context = 'activity' in Activities tab. - $activityParams['options']['sort'] = (CRM_Utils_Array::value('context', $params) == 'activity') ? "activity_date_time DESC" : "status_id ASC, activity_date_time ASC"; - } - else { - $activityParams['options']['sort'] = str_replace('activity_type ', 'activity_type_id.label ', $order); - } + $activityParams['options']['sort'] = empty($order) ? "activity_date_time DESC" : str_replace('activity_type ', 'activity_type_id.label ', $order); //TODO : // 1. we should use Activity.Getcount for fetching count only, but in order to check that @@ -915,7 +909,7 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity { ); $sql = "CREATE TEMPORARY TABLE {$activityTempTable} ( "; - $insertValueSQL = array(); + $insertValueSQL = $selectColumns = array(); // The activityTempTable contains the sorted rows // so in order to maintain the sort order as-is we add an auto_increment // field; we can sort by this later to ensure the sort order stays correct. @@ -923,6 +917,12 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity { foreach ($tableFields as $name => $desc) { $sql .= "$name $desc,\n"; $insertValueSQL[] = $name; + if ($name == 'source_contact_name' && CRM_Utils_SQL::supportsFullGroupBy()) { + $selectColumns[] = "ANY_VALUE(tbl.$name)"; + } + else { + $selectColumns[] = "tbl.$name"; + } } // add unique key on activity_id just to be sure @@ -935,7 +935,7 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity { CRM_Core_DAO::executeQuery($sql); - $insertSQL = "INSERT INTO {$activityTempTable} (" . implode(',', $insertValueSQL) . " ) "; + $insertSQL = "INSERT IGNORE INTO {$activityTempTable} (" . implode(',', $insertValueSQL) . " ) "; $order = $limit = $groupBy = ''; $groupBy = " GROUP BY tbl.activity_id, tbl.activity_type, tbl.case_id, tbl.case_subject "; @@ -955,7 +955,7 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity { if (empty($order)) { // context = 'activity' in Activities tab. - $order = (CRM_Utils_Array::value('context', $input) == 'activity') ? " ORDER BY tbl.activity_date_time desc " : " ORDER BY tbl.status_id asc, tbl.activity_date_time asc "; + $order = " ORDER BY tbl.activity_date_time desc "; } if (!empty($input['rowCount']) && @@ -967,9 +967,7 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity { $input['count'] = FALSE; list($sqlClause, $params) = self::deprecatedGetActivitySQLClause($input); - $query = "{$insertSQL} - SELECT DISTINCT tbl.* from ( {$sqlClause} ) -as tbl "; + $query = sprintf("{$insertSQL} \n SELECT DISTINCT %s from ( %s ) \n as tbl ", implode(', ', $selectColumns), $sqlClause); // Filter case activities - CRM-5761. $components = self::activityComponents(); @@ -1259,9 +1257,6 @@ LEFT JOIN civicrm_case_activity ON ( civicrm_case_activity.activity_id = tbl.a if (!empty($input['activity_status_id'])) { $commonClauses[] = sprintf("civicrm_activity.status_id IN (%s)", $input['activity_status_id']); } - elseif ($input['context'] != 'activity') { - $commonClauses[] = "civicrm_activity.status_id = 1"; - } // Filter on component IDs. $components = self::activityComponents(); diff --git a/civicrm/CRM/Activity/Form/Activity.php b/civicrm/CRM/Activity/Form/Activity.php index 7187c523d3..9cdfd4a74a 100644 --- a/civicrm/CRM/Activity/Form/Activity.php +++ b/civicrm/CRM/Activity/Form/Activity.php @@ -242,7 +242,7 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task { if (CRM_Contact_Form_Search::isSearchContext($this->_context)) { $this->_context = 'search'; } - elseif (!in_array($this->_context, array('dashlet', 'dashletFullscreen')) + elseif (!in_array($this->_context, array('dashlet', 'case', 'dashletFullscreen')) && $this->_currentlyViewedContactId ) { $this->_context = 'activity'; diff --git a/civicrm/CRM/Activity/Form/ActivityFilter.php b/civicrm/CRM/Activity/Form/ActivityFilter.php index b843dc2a0e..95c3b2448a 100644 --- a/civicrm/CRM/Activity/Form/ActivityFilter.php +++ b/civicrm/CRM/Activity/Form/ActivityFilter.php @@ -72,6 +72,10 @@ class CRM_Activity_Form_ActivityFilter extends CRM_Core_Form { ->getBagByContact(NULL, $userID) ->get('activity_tab_filter'); } + // set Activity status 'Scheduled' by default only for dashlet + elseif (strstr(CRM_Utils_Array::value('q', $_GET), 'dashlet')) { + $defaults['status_id'] = CRM_Core_PseudoConstant::getKey('CRM_Activity_BAO_Activity', 'status_id', 'Scheduled'); + } return $defaults; } diff --git a/civicrm/CRM/Activity/Page/AJAX.php b/civicrm/CRM/Activity/Page/AJAX.php index 321c73e617..2266878ed8 100644 --- a/civicrm/CRM/Activity/Page/AJAX.php +++ b/civicrm/CRM/Activity/Page/AJAX.php @@ -208,7 +208,7 @@ class CRM_Activity_Page_AJAX { foreach ($caseRelationships as $key => &$row) { $typeLabel = $row['relation']; // Add "<br />(Case Manager)" to label - if ($row['relation_type'] == $managerRoleId) { + if (!empty($row['relation_type']) && $row['relation_type'] == $managerRoleId) { $row['relation'] .= '<br />' . '(' . ts('Case Manager') . ')'; } // view user links diff --git a/civicrm/CRM/Admin/Form/Extensions.php b/civicrm/CRM/Admin/Form/Extensions.php index 7f273cb163..d6901f557f 100644 --- a/civicrm/CRM/Admin/Form/Extensions.php +++ b/civicrm/CRM/Admin/Form/Extensions.php @@ -42,10 +42,17 @@ class CRM_Admin_Form_Extensions extends CRM_Admin_Form { public function preProcess() { parent::preProcess(); + $mainPage = new CRM_Admin_Page_Extensions(); + $localExtensionRows = $mainPage->formatLocalExtensionRows(); + $this->assign('localExtensionRows', $localExtensionRows); + + $remoteExtensionRows = $mainPage->formatRemoteExtensionRows($localExtensionRows); + $this->assign('remoteExtensionRows', $remoteExtensionRows); + $this->_key = CRM_Utils_Request::retrieve('key', 'String', $this, FALSE, 0 ); - if (!CRM_Utils_Type::validate($this->_key, 'ExtensionKey')) { + if (!CRM_Utils_Type::validate($this->_key, 'ExtensionKey') && !empty($this->_key)) { throw new CRM_Core_Exception('Extension Key does not match expected standard'); } $session = CRM_Core_Session::singleton(); @@ -180,12 +187,12 @@ class CRM_Admin_Form_Extensions extends CRM_Admin_Form { } if ($this->_action & CRM_Core_Action::ADD) { - CRM_Extension_System::singleton()->getManager()->install(array($this->_key)); + civicrm_api3('Extension', 'install', array('keys' => $this->_key)); CRM_Core_Session::setStatus("", ts('Extension Installed'), "success"); } if ($this->_action & CRM_Core_Action::ENABLE) { - CRM_Extension_System::singleton()->getManager()->enable(array($this->_key)); + civicrm_api3('Extension', 'enable', array('keys' => $this->_key)); CRM_Core_Session::setStatus("", ts('Extension Enabled'), "success"); } diff --git a/civicrm/CRM/Admin/Form/Options.php b/civicrm/CRM/Admin/Form/Options.php index e247f55194..bd79a922bb 100644 --- a/civicrm/CRM/Admin/Form/Options.php +++ b/civicrm/CRM/Admin/Form/Options.php @@ -50,6 +50,12 @@ class CRM_Admin_Form_Options extends CRM_Admin_Form { */ protected $_gLabel; + /** + * Is this Option Group Domain Specific + * @var bool + */ + protected $_domainSpecific = FALSE; + /** * Pre-process */ @@ -74,6 +80,7 @@ class CRM_Admin_Form_Options extends CRM_Admin_Form { 'name' ); $this->_gLabel = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', $this->_gid, 'title'); + $this->_domainSpecific = in_array($this->_gName, CRM_Core_OptionGroup::$_domainIDGroups); $url = "civicrm/admin/options/{$this->_gName}"; $params = "reset=1"; @@ -172,6 +179,11 @@ class CRM_Admin_Form_Options extends CRM_Admin_Form { CRM_Core_DAO::getAttribute('CRM_Core_DAO_OptionValue', 'value'), TRUE ); + $this->addRule('value', + ts('This Value already exists in the database for this option group. Please select a different Value.'), + 'optionExists', + array('CRM_Core_DAO_OptionValue', $this->_id, $this->_gid, 'value', $this->_domainSpecific) + ); } else { $this->add('text', 'icon', ts('Icon'), array('class' => 'crm-icon-picker', 'title' => ts('Choose Icon'), 'allowClear' => TRUE)); @@ -187,12 +199,10 @@ class CRM_Admin_Form_Options extends CRM_Admin_Form { 'addressee', )) && !$isReserved ) { - $domainSpecificOptionGroups = array('from_email_address'); - $domainSpecific = in_array($this->_gName, $domainSpecificOptionGroups) ? TRUE : FALSE; $this->addRule('label', - ts('This Label already exists in the database for this option group. Please select a different Value.'), + ts('This Label already exists in the database for this option group. Please select a different Label.'), 'optionExists', - array('CRM_Core_DAO_OptionValue', $this->_id, $this->_gid, 'label', $domainSpecific) + array('CRM_Core_DAO_OptionValue', $this->_id, $this->_gid, 'label', $this->_domainSpecific) ); } diff --git a/civicrm/CRM/Admin/Page/Extensions.php b/civicrm/CRM/Admin/Page/Extensions.php index 589b9dfde6..8abf943cc1 100644 --- a/civicrm/CRM/Admin/Page/Extensions.php +++ b/civicrm/CRM/Admin/Page/Extensions.php @@ -125,8 +125,6 @@ class CRM_Admin_Page_Extensions extends CRM_Core_Page_Basic { * Browse all options. */ public function browse() { - $mapper = CRM_Extension_System::singleton()->getMapper(); - $manager = CRM_Extension_System::singleton()->getManager(); // build announcements at the top of the page $this->assign('extAddNewEnabled', CRM_Extension_System::singleton()->getBrowser()->isEnabled()); @@ -145,7 +143,23 @@ class CRM_Admin_Page_Extensions extends CRM_Core_Page_Basic { // TODO: Debate whether to immediately detect changes in underlying source tree // $manager->refresh(); - // build list of local extensions + $localExtensionRows = $this->formatLocalExtensionRows(); + $this->assign('localExtensionRows', $localExtensionRows); + + $remoteExtensionRows = $this->formatRemoteExtensionRows($localExtensionRows); + $this->assign('remoteExtensionRows', $remoteExtensionRows); + } + + /** + * Get the list of local extensions and format them as a table with + * status and action data. + * + * @return array + */ + public function formatLocalExtensionRows() { + $mapper = CRM_Extension_System::singleton()->getMapper(); + $manager = CRM_Extension_System::singleton()->getManager(); + $localExtensionRows = array(); // array($pseudo_id => extended_CRM_Extension_Info) $keys = array_keys($manager->getStatuses()); sort($keys); @@ -203,8 +217,17 @@ class CRM_Admin_Page_Extensions extends CRM_Core_Page_Basic { $localExtensionRows[$row['id']] = $row; } - $this->assign('localExtensionRows', $localExtensionRows); + return $localExtensionRows; + } + /** + * Get the list of local extensions and format them as a table with + * status and action data. + * + * @param array $localExtensionRows + * @return array + */ + public function formatRemoteExtensionRows($localExtensionRows) { try { $remoteExtensions = CRM_Extension_System::singleton()->getBrowser()->getExtensions(); } @@ -232,13 +255,16 @@ class CRM_Admin_Page_Extensions extends CRM_Core_Page_Basic { $row['id'] ); if (isset($localExtensionRows[$info->key])) { - if (version_compare($localExtensionRows[$info->key]['version'], $info->version, '<')) { - $row['is_upgradeable'] = TRUE; + if (array_key_exists('version', $localExtensionRows[$info->key])) { + if (version_compare($localExtensionRows[$info->key]['version'], $info->version, '<')) { + $row['is_upgradeable'] = TRUE; + } } } $remoteExtensionRows[$row['id']] = $row; } - $this->assign('remoteExtensionRows', $remoteExtensionRows); + + return $remoteExtensionRows; } /** diff --git a/civicrm/CRM/Batch/Page/AJAX.php b/civicrm/CRM/Batch/Page/AJAX.php index 7f8fd93813..2877e0244c 100644 --- a/civicrm/CRM/Batch/Page/AJAX.php +++ b/civicrm/CRM/Batch/Page/AJAX.php @@ -54,21 +54,32 @@ class CRM_Batch_Page_AJAX { * @deprecated */ public static function getBatchList() { - $sortMapper = array( - 0 => 'title', - 1 => 'type_id', - 2 => '', - 3 => 'total', - 4 => 'status_id', - 5 => '', - ); - + $context = isset($_REQUEST['context']) ? CRM_Utils_Type::escape($_REQUEST['context'], 'String') : NULL; + if ($context != 'financialBatch') { + $sortMapper = array( + 0 => 'title', + 1 => 'type_id.label', + 2 => 'item_count', + 3 => 'total', + 4 => 'status_id.label', + 5 => 'created_id.sort_name', + ); + } + else { + $sortMapper = array( + 1 => 'title', + 2 => 'payment_instrument_id.label', + 3 => 'item_count', + 4 => 'total', + 5 => 'status_id.label', + 6 => 'created_id.sort_name', + ); + } $sEcho = CRM_Utils_Type::escape($_REQUEST['sEcho'], 'Integer'); $offset = isset($_REQUEST['iDisplayStart']) ? CRM_Utils_Type::escape($_REQUEST['iDisplayStart'], 'Integer') : 0; $rowCount = isset($_REQUEST['iDisplayLength']) ? CRM_Utils_Type::escape($_REQUEST['iDisplayLength'], 'Integer') : 25; $sort = isset($_REQUEST['iSortCol_0']) ? CRM_Utils_Array::value(CRM_Utils_Type::escape($_REQUEST['iSortCol_0'], 'Integer'), $sortMapper) : NULL; $sortOrder = isset($_REQUEST['sSortDir_0']) ? CRM_Utils_Type::escape($_REQUEST['sSortDir_0'], 'String') : 'asc'; - $context = isset($_REQUEST['context']) ? CRM_Utils_Type::escape($_REQUEST['context'], 'String') : NULL; $params = $_REQUEST; if ($sort && $sortOrder) { diff --git a/civicrm/CRM/Case/Form/ActivityToCase.php b/civicrm/CRM/Case/Form/ActivityToCase.php index 7951af7031..f33cfbdb8e 100644 --- a/civicrm/CRM/Case/Form/ActivityToCase.php +++ b/civicrm/CRM/Case/Form/ActivityToCase.php @@ -67,6 +67,12 @@ class CRM_Case_Form_ActivityToCase extends CRM_Core_Form { // If this contact has an open case, supply it as a default $cid = CRM_Utils_Request::retrieve('cid', 'Integer'); + if (!$cid) { + $act = civicrm_api3('Activity', 'getsingle', array('id' => $this->_activityId, 'return' => 'target_contact_id')); + if (!empty($act['target_contact_id'])) { + $cid = $act['target_contact_id'][0]; + } + } if ($cid) { $cases = civicrm_api3('CaseContact', 'get', array( 'contact_id' => $cid, diff --git a/civicrm/CRM/Contact/BAO/Contact.php b/civicrm/CRM/Contact/BAO/Contact.php index 2599d975f4..565096516e 100644 --- a/civicrm/CRM/Contact/BAO/Contact.php +++ b/civicrm/CRM/Contact/BAO/Contact.php @@ -179,6 +179,12 @@ class CRM_Contact_BAO_Contact extends CRM_Contact_DAO_Contact { $contact->display_name = $contact->sort_name = CRM_Utils_Array::value('organization_name', $params, ''); } } + if (strlen($contact->display_name) > 128) { + $contact->display_name = substr($contact->display_name, 0, 128); + } + if (strlen($contact->sort_name) > 128) { + $contact->sort_name = substr($contact->sort_name, 0, 128); + } $privacy = CRM_Utils_Array::value('privacy', $params); if ($privacy && diff --git a/civicrm/CRM/Contact/BAO/Contact/Utils.php b/civicrm/CRM/Contact/BAO/Contact/Utils.php index 89d8394b62..83ceefc3ec 100644 --- a/civicrm/CRM/Contact/BAO/Contact/Utils.php +++ b/civicrm/CRM/Contact/BAO/Contact/Utils.php @@ -800,7 +800,7 @@ INNER JOIN civicrm_contact contact_target ON ( contact_target.id = act.contact_i * Function handles shared contact address processing. * In this function we just modify submitted values so that new address created for the user * has same address as shared contact address. We copy the address so that search etc will be - * much efficient. + * much more efficient. * * @param array $address * This is associated array which contains submitted form values. @@ -810,20 +810,20 @@ INNER JOIN civicrm_contact contact_target ON ( contact_target.id = act.contact_i return; } - // Sharing contact address during create mode is pretty straight forward. - // In update mode we should check following: - // - We should check if user has uncheck shared contact address - // - If yes then unset the master_id or may be just delete the address that copied master - // Normal update process will automatically create new address with submitted values + // In create mode sharing a contact's address is pretty straight forward. + // In update mode we should check if the user stops sharing. If yes: + // - Set the master_id to an empty value + // Normal update process will automatically create new address with submitted values - // 1. loop through entire subnitted address array - $masterAddress = array(); + // 1. loop through entire submitted address array $skipFields = array('is_primary', 'location_type_id', 'is_billing', 'master_id'); foreach ($address as & $values) { - // 2. check if master id exists, if not continue - if (empty($values['master_id']) || empty($values['use_shared_address'])) { - // we should unset master id when use uncheck share address for existing address - $values['master_id'] = 'null'; + // 2. check if "Use another contact's address" is checked, if not continue + // Additionally, if master_id is set (address was shared), set master_id to empty value. + if (empty($values['use_shared_address'])) { + if (!empty($values['master_id'])) { + $values['master_id'] = ''; + } continue; } diff --git a/civicrm/CRM/Contact/BAO/Group.php b/civicrm/CRM/Contact/BAO/Group.php index a64e698da0..3fd0e073f1 100644 --- a/civicrm/CRM/Contact/BAO/Group.php +++ b/civicrm/CRM/Contact/BAO/Group.php @@ -1081,9 +1081,9 @@ FROM civicrm_group WHERE id IN $groupIdString "; if ($parents) { - // group can have > 1 parent so parents may be comma separated list (eg. '1,2,5'). We just grab and match on 1st parent. + // group can have > 1 parent so parents may be comma separated list (eg. '1,2,5'). $parentArray = explode(',', $parents); - $parent = $parentArray[0]; + $parent = self::filterActiveGroups($parentArray); $args[2] = array($parent, 'Integer'); $query .= " AND SUBSTRING_INDEX(parents, ',', 1) = %2"; } @@ -1099,7 +1099,7 @@ WHERE id IN $groupIdString while ($dao->fetch()) { if ($dao->parents) { $parentArray = explode(',', $dao->parents); - $parent = $parentArray[0]; + $parent = self::filterActiveGroups($parentArray); $tree[$parent][] = array( 'id' => $dao->id, 'title' => $dao->title, @@ -1386,4 +1386,30 @@ WHERE {$whereClause}"; return $childGroupIDs; } + /** + * Check parent groups and filter out the disabled ones. + * + * @param array $parentArray + * Array of group Ids. + * + * @return int + */ + public static function filterActiveGroups($parentArray) { + if (count($parentArray) > 1) { + $result = civicrm_api3('Group', 'get', array( + 'id' => array('IN' => $parentArray), + 'is_active' => TRUE, + 'return' => 'id', + )); + $activeParentGroupIDs = CRM_Utils_Array::collect('id', $result['values']); + foreach ($parentArray as $key => $groupID) { + if (!array_key_exists($groupID, $activeParentGroupIDs)) { + unset($parentArray[$key]); + } + } + } + + return reset($parentArray); + } + } diff --git a/civicrm/CRM/Contact/BAO/Query.php b/civicrm/CRM/Contact/BAO/Query.php index ab28ca3de9..b4c5951fb6 100644 --- a/civicrm/CRM/Contact/BAO/Query.php +++ b/civicrm/CRM/Contact/BAO/Query.php @@ -4678,16 +4678,7 @@ civicrm_relationship.is_permission_a_b = 0 * @return string */ public static function appendAnyValueToSelect($selectClauses, $groupBy) { - $mysqlVersion = CRM_Core_DAO::singleValueQuery('SELECT VERSION()'); - $sqlMode = explode(',', CRM_Core_DAO::singleValueQuery('SELECT @@sql_mode')); - - // Disable only_full_group_by mode for lower sql versions. - if (version_compare($mysqlVersion, '5.7', '<') || (!empty($sqlMode) && !in_array('ONLY_FULL_GROUP_BY', $sqlMode))) { - $key = array_search('ONLY_FULL_GROUP_BY', $sqlMode); - unset($sqlMode[$key]); - CRM_Core_DAO::executeQuery("SET SESSION sql_mode = '" . implode(',', $sqlMode) . "'"); - } - else { + if (!CRM_Utils_SQL::disableFullGroupByMode()) { $groupBy = array_map('trim', (array) $groupBy); $aggregateFunctions = '/(ROUND|AVG|COUNT|GROUP_CONCAT|SUM|MAX|MIN)\(/i'; foreach ($selectClauses as $key => &$val) { @@ -4702,6 +4693,27 @@ civicrm_relationship.is_permission_a_b = 0 return "SELECT " . implode(', ', $selectClauses) . " "; } + /** + * For some special cases, where if non-aggregate ORDER BY columns are not present in GROUP BY + * on full_group_by mode, then append the those missing columns to GROUP BY clause + * keyword to select fields not present in groupBy + * + * @param string $groupBy - GROUP BY clause where missing ORDER BY columns will be appended + * @param array $orderBys - ORDER BY sub-clauses + * + */ + public static function getGroupByFromOrderBy(&$groupBy, $orderBys) { + if (CRM_Utils_SQL::disableFullGroupByMode()) { + foreach ($orderBys as $orderBy) { + $orderBy = str_replace(array(' DESC', ' ASC'), '', $orderBy); // remove sort syntax from ORDER BY clauses if present + // if ORDER BY column is not present in GROUP BY then append it to end + if (preg_match('/(MAX|MIN)\(/i', trim($orderBy)) !== 1 && !strstr($groupBy, $orderBy)) { + $groupBy .= ", {$orderBy}"; + } + } + } + } + /** * Include Select columns in groupBy clause. * @@ -4716,7 +4728,7 @@ civicrm_relationship.is_permission_a_b = 0 $sqlMode = CRM_Core_DAO::singleValueQuery('SELECT @@sql_mode'); //return if ONLY_FULL_GROUP_BY is not enabled. - if (!version_compare($mysqlVersion, '5.7', '<') && !empty($sqlMode) && in_array('ONLY_FULL_GROUP_BY', explode(',', $sqlMode))) { + if (CRM_Utils_SQL::supportsFullGroupBy() && !empty($sqlMode) && in_array('ONLY_FULL_GROUP_BY', explode(',', $sqlMode))) { $regexToExclude = '/(ROUND|AVG|COUNT|GROUP_CONCAT|SUM|MAX|MIN)\(/i'; foreach ($selectClauses as $key => $val) { $aliasArray = preg_split('/ as /i', $val); diff --git a/civicrm/CRM/Contact/BAO/SavedSearch.php b/civicrm/CRM/Contact/BAO/SavedSearch.php index 694f849847..04fe04ef7c 100644 --- a/civicrm/CRM/Contact/BAO/SavedSearch.php +++ b/civicrm/CRM/Contact/BAO/SavedSearch.php @@ -183,6 +183,13 @@ class CRM_Contact_BAO_SavedSearch extends CRM_Contact_DAO_SavedSearch { } } + if ($customSearchClass = CRM_Utils_Array::value('customSearchClass', $result)) { + // check if there is a special function - formatSavedSearchFields defined in the custom search form + if (method_exists($customSearchClass, 'formatSavedSearchFields')) { + $customSearchClass::formatSavedSearchFields($result); + } + } + return $result; } diff --git a/civicrm/CRM/Contact/Form/GroupContact.php b/civicrm/CRM/Contact/Form/GroupContact.php index 27377e2c8e..a443d8115f 100644 --- a/civicrm/CRM/Contact/Form/GroupContact.php +++ b/civicrm/CRM/Contact/Form/GroupContact.php @@ -80,7 +80,17 @@ class CRM_Contact_Form_GroupContact extends CRM_Core_Form { // get the list of all the groups if ($this->_context == 'user') { $onlyPublicGroups = CRM_Utils_Request::retrieve('onlyPublicGroups', 'Boolean', $this, FALSE); - $allGroups = CRM_Core_PseudoConstant::staticGroup($onlyPublicGroups); + $ids = CRM_Core_PseudoConstant::allGroup(); + $heirGroups = CRM_Contact_BAO_Group::getGroupsHierarchy($ids); + + $allGroups = array(); + foreach ($heirGroups as $id => $group) { + // make sure that this group has public visibility + if ($onlyPublicGroups && $group['visibility'] == 'User and User Admin Only') { + continue; + } + $allGroups[$id] = $group; + } } else { $allGroups = CRM_Core_PseudoConstant::group(); diff --git a/civicrm/CRM/Contact/Form/Search/Custom/ContribSYBNT.php b/civicrm/CRM/Contact/Form/Search/Custom/ContribSYBNT.php index 5af0eefca4..e88f797070 100644 --- a/civicrm/CRM/Contact/Form/Search/Custom/ContribSYBNT.php +++ b/civicrm/CRM/Contact/Form/Search/Custom/ContribSYBNT.php @@ -43,7 +43,7 @@ class CRM_Contact_Form_Search_Custom_ContribSYBNT extends CRM_Contact_Form_Searc * @param $formValues */ public function __construct(&$formValues) { - $this->_formValues = $formValues; + $this->_formValues = self::formatSavedSearchFields($formValues); $this->_permissionedComponent = 'CiviContribute'; $this->_columns = array( @@ -83,7 +83,7 @@ class CRM_Contact_Form_Search_Custom_ContribSYBNT extends CRM_Contact_Form_Searc foreach ($this->_dates as $name => $title) { if (!empty($this->_formValues[$name])) { - $this->{$name} = CRM_Utils_Date::processDate($this->_formValues[$name]); + $this->{$name} = $this->_formValues[$name]; } } } @@ -101,7 +101,7 @@ class CRM_Contact_Form_Search_Custom_ContribSYBNT extends CRM_Contact_Form_Searc } foreach ($this->_dates as $name => $title) { - $form->addDate($name, $title, FALSE, array('formatType' => 'custom')); + $form->add('datepicker', $name, $title, array(), FALSE, array('time' => FALSE)); } foreach ($this->_checkboxes as $name => $title) { @@ -194,7 +194,7 @@ ORDER BY donation_amount desc if ($justIDs) { CRM_Core_DAO::executeQuery("DROP TEMPORARY TABLE IF EXISTS CustomSearch_SYBNT_temp"); $query = "CREATE TEMPORARY TABLE CustomSearch_SYBNT_temp AS ({$sql})"; - $dao = CRM_Core_DAO::executeQuery($query); + CRM_Core_DAO::executeQuery($query); $sql = "SELECT contact_a.id as contact_id FROM CustomSearch_SYBNT_temp as contact_a"; } return $sql; @@ -246,22 +246,22 @@ count(contrib_1.id) AS donation_count $clauses = array(); if (!empty($this->start_date_1)) { - $clauses[] = "contrib_1.receive_date >= {$this->start_date_1}"; + $clauses[] = CRM_Core_DAO::composeQuery('contrib_1.receive_date >= %1', array(1 => array($this->start_date_1, 'String'))); } if (!empty($this->end_date_1)) { - $clauses[] = "contrib_1.receive_date <= {$this->end_date_1}"; + $clauses[] = CRM_Core_DAO::composeQuery('contrib_1.receive_date <= %1', array(1 => array($this->end_date_1, 'String'))); } if (!empty($this->start_date_2) || !empty($this->end_date_2)) { $clauses[] = "contrib_2.is_test = 0"; if (!empty($this->start_date_2)) { - $clauses[] = "contrib_2.receive_date >= {$this->start_date_2}"; + $clauses[] = CRM_Core_DAO::composeQuery('contrib_2.receive_date >= %1', array(1 => array($this->start_date_2, 'String'))); } if (!empty($this->end_date_2)) { - $clauses[] = "contrib_2.receive_date <= {$this->end_date_2}"; + $clauses[] = CRM_Core_DAO::composeQuery('contrib_2.receive_date <= %1', array(1 => array($this->end_date_2, 'String'))); } } @@ -279,11 +279,11 @@ count(contrib_1.id) AS donation_count $excludeClauses = array(); if ($this->exclude_start_date) { - $excludeClauses[] = "c.receive_date >= {$this->exclude_start_date}"; + $excludeClauses[] = CRM_Core_DAO::composeQuery('c.receive_date >= %1', array(1 => array($this->exclude_start_date, 'String'))); } if ($this->exclude_end_date) { - $excludeClauses[] = "c.receive_date <= {$this->exclude_end_date}"; + $excludeClauses[] = CRM_Core_DAO::composeQuery('c.receive_date <= %1', array(1 => array($this->exclude_end_date, 'String'))); } $excludeClause = NULL; @@ -317,7 +317,7 @@ GROUP BY c.contact_id $havingClause "; - $dao = CRM_Core_DAO::executeQuery($query); + CRM_Core_DAO::executeQuery($query); } // now ensure we dont consider donors that are not first time @@ -329,7 +329,7 @@ FROM civicrm_contribution c WHERE c.is_test = 0 AND c.receive_date < {$this->start_date_1} "; - $dao = CRM_Core_DAO::executeQuery($query); + CRM_Core_DAO::executeQuery($query); } $clauses[] = " xg.contact_id IS NULL "; @@ -400,4 +400,26 @@ AND c.receive_date < {$this->start_date_1} list($this->_aclFrom, $this->_aclWhere) = CRM_Contact_BAO_Contact_Permission::cacheClause($tableAlias); } + /** + * Format saved search fields for this custom group + * + * @param array $formValues + * + */ + public static function formatSavedSearchFields(&$formValues) { + $dateFields = array( + 'start_date_1', + 'end_date_1', + 'start_date_2', + 'end_date_2', + 'exclude_start_date', + 'exclude_end_date', + ); + foreach ($formValues as $element => $value) { + if (in_array($element, $dateFields) && !empty($value)) { + $formValues[$element] = date('Y-m-d', strtotime($value)); + } + } + } + } diff --git a/civicrm/CRM/Contact/Form/Task.php b/civicrm/CRM/Contact/Form/Task.php index a4ff17ecd3..8b8b9e2887 100644 --- a/civicrm/CRM/Contact/Form/Task.php +++ b/civicrm/CRM/Contact/Form/Task.php @@ -100,15 +100,15 @@ class CRM_Contact_Form_Task extends CRM_Core_Form { $form->_contactIds = array(); $form->_contactTypes = array(); - $isStandAlone = (in_array('task', $form->urlPath)); + $isStandAlone = in_array('task', $form->urlPath); if ($isStandAlone) { list($form->_task, $title) = CRM_Contact_Task::getTaskAndTitleByClass(get_class($form)); if (!array_key_exists($form->_task, CRM_Contact_Task::permissionedTaskTitles(CRM_Core_Permission::getPermission()))) { - CRM_Core_Error::fatal(ts('You do not have enough permission to do this task.')); + CRM_Core_Error::fatal(ts('You do not have permission to access this page.')); } $form->_contactIds = explode(',', CRM_Utils_Request::retrieve('cids', 'String', $form, TRUE)); if (empty($form->_contactIds)) { - CRM_Core_Error::statusBounce(ts("You did't selected any contact to perform this task.")); + CRM_Core_Error::statusBounce(ts('No Contacts Selected')); } $form->setTitle($title); } diff --git a/civicrm/CRM/Contact/Form/Task/PDFLetterCommon.php b/civicrm/CRM/Contact/Form/Task/PDFLetterCommon.php index 71df969cb3..ce7e33a8f1 100644 --- a/civicrm/CRM/Contact/Form/Task/PDFLetterCommon.php +++ b/civicrm/CRM/Contact/Form/Task/PDFLetterCommon.php @@ -363,8 +363,12 @@ class CRM_Contact_Form_Task_PDFLetterCommon { $skipDeceased = isset($form->skipDeceased) ? $form->skipDeceased : TRUE; $html = $activityIds = array(); + // CRM-21255 - Hrm, CiviCase 4+5 seem to report buttons differently... + $c = $form->controller->container(); + $isLiveMode = ($buttonName == '_qf_PDF_upload') || isset($c['values']['PDF']['buttons']['_qf_PDF_upload']); + // CRM-16725 Skip creation of activities if user is previewing their PDF letter(s) - if ($buttonName == '_qf_PDF_upload') { + if ($isLiveMode) { // This seems silly, but the old behavior was to first check `_cid` // and then use the provided `$contactIds`. Probably not even necessary, @@ -418,7 +422,7 @@ class CRM_Contact_Form_Task_PDFLetterCommon { } $tee = NULL; - if (Civi::settings()->get('recordGeneratedLetters') === 'combined-attached') { + if ($isLiveMode && Civi::settings()->get('recordGeneratedLetters') === 'combined-attached') { if (count($activityIds) !== 1) { throw new CRM_Core_Exception("When recordGeneratedLetters=combined-attached, there should only be one activity."); } diff --git a/civicrm/CRM/Contact/Import/Parser/Contact.php b/civicrm/CRM/Contact/Import/Parser/Contact.php index 2d4cf7cfe7..a6925e439a 100644 --- a/civicrm/CRM/Contact/Import/Parser/Contact.php +++ b/civicrm/CRM/Contact/Import/Parser/Contact.php @@ -508,16 +508,36 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Contact_Import_Parser { ))) ) { - if ($internalCid = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $params['external_identifier'], 'id', 'external_identifier', TRUE)) { + $extIDResult = civicrm_api3('Contact', 'get', array( + 'external_identifier' => $params['external_identifier'], + 'showAll' => 'all', + 'return' => array('id', 'contact_is_deleted'), + )); + if (isset($extIDResult['id'])) { + // record with matching external identifier does exist. + $internalCid = $extIDResult['id']; if ($internalCid != CRM_Utils_Array::value('id', $params)) { - $errorMessage = ts('External ID already exists in Database.'); - array_unshift($values, $errorMessage); - $importRecordParams = array( - $statusFieldName => 'ERROR', - "${statusFieldName}Msg" => $errorMessage, - ); - $this->updateImportRecord($values[count($values) - 1], $importRecordParams); - return CRM_Import_Parser::DUPLICATE; + if ($extIDResult['values'][$internalCid]['contact_is_deleted'] == 1) { + // And it is deleted. What to do? If we skip it, they user + // will be under the impression that the record exists in + // the database, yet they won't be able to find it. If we + // don't skip it, the database will try to insert a new record + // with an external_identifier that is non-unique. So... + // we will update this contact to remove the external_identifier + // and let a new record be created. + $update_params = array('id' => $internalCid, 'external_identifier' => ''); + civicrm_api3('Contact', 'create', $update_params); + } + else { + $errorMessage = ts('External ID already exists in Database.'); + array_unshift($values, $errorMessage); + $importRecordParams = array( + $statusFieldName => 'ERROR', + "${statusFieldName}Msg" => $errorMessage, + ); + $this->updateImportRecord($values[count($values) - 1], $importRecordParams); + return CRM_Import_Parser::DUPLICATE; + } } } } @@ -1997,12 +2017,24 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Contact_Import_Parser { $extIDMatch = NULL; if (!empty($params['external_identifier'])) { + // Check for any match on external id, deleted or otherwise. $extIDContact = civicrm_api3('Contact', 'get', array( 'external_identifier' => $params['external_identifier'], - 'return' => 'id', + 'showAll' => 'all', + 'return' => array('id', 'contact_is_deleted'), )); if (isset($extIDContact['id'])) { $extIDMatch = $extIDContact['id']; + + if ($extIDContact['values'][$extIDMatch]['contact_is_deleted'] == 1) { + // If the contact is deleted, update external identifier to be blank + // to avoid key error from MySQL. + $params = array('id' => $extIDMatch, 'external_identifier' => ''); + civicrm_api3('Contact', 'create', $params); + + // And now it is no longer a match. + $extIDMatch = NULL; + } } } $checkParams = array('check_permissions' => FALSE, 'match' => $params); diff --git a/civicrm/CRM/Contact/Page/DedupeRules.php b/civicrm/CRM/Contact/Page/DedupeRules.php index 01d420d714..d7288e6dbf 100644 --- a/civicrm/CRM/Contact/Page/DedupeRules.php +++ b/civicrm/CRM/Contact/Page/DedupeRules.php @@ -132,7 +132,7 @@ class CRM_Contact_Page_DedupeRules extends CRM_Core_Page_Basic { // get all rule groups $ruleGroups = array(); $dao = new CRM_Dedupe_DAO_RuleGroup(); - $dao->orderBy('contact_type,used ASC'); + $dao->orderBy('contact_type ASC, used ASC, title ASC'); $dao->find(); $dedupeRuleTypes = CRM_Core_SelectValues::getDedupeRuleTypes(); diff --git a/civicrm/CRM/Contact/Page/View/UserDashBoard/GroupContact.php b/civicrm/CRM/Contact/Page/View/UserDashBoard/GroupContact.php index 247d5fe2f0..ed399bff16 100644 --- a/civicrm/CRM/Contact/Page/View/UserDashBoard/GroupContact.php +++ b/civicrm/CRM/Contact/Page/View/UserDashBoard/GroupContact.php @@ -40,28 +40,32 @@ class CRM_Contact_Page_View_UserDashBoard_GroupContact extends CRM_Contact_Page_ $this->_contactId, NULL, NULL, TRUE, TRUE, - $this->_onlyPublicGroups + $this->_onlyPublicGroups, + NULL, NULL, TRUE ); $in = CRM_Contact_BAO_GroupContact::getContactGroup( $this->_contactId, 'Added', NULL, FALSE, TRUE, - $this->_onlyPublicGroups + $this->_onlyPublicGroups, + NULL, NULL, TRUE ); $pending = CRM_Contact_BAO_GroupContact::getContactGroup( $this->_contactId, 'Pending', NULL, FALSE, TRUE, - $this->_onlyPublicGroups + $this->_onlyPublicGroups, + NULL, NULL, TRUE ); $out = CRM_Contact_BAO_GroupContact::getContactGroup( $this->_contactId, 'Removed', NULL, FALSE, TRUE, - $this->_onlyPublicGroups + $this->_onlyPublicGroups, + NULL, NULL, TRUE ); $this->assign('groupCount', $count); diff --git a/civicrm/CRM/Contact/Selector/Custom.php b/civicrm/CRM/Contact/Selector/Custom.php index 7399177184..b1cc490e88 100644 --- a/civicrm/CRM/Contact/Selector/Custom.php +++ b/civicrm/CRM/Contact/Selector/Custom.php @@ -297,7 +297,7 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector { $contactQueryObj = $this->_search->getQueryObj(); } - $dao = CRM_Core_DAO::executeQuery($sql, CRM_Core_DAO::$_nullArray); + $dao = CRM_Core_DAO::executeQuery($sql); $columns = $this->_search->columns(); $columnNames = array_values($columns); diff --git a/civicrm/CRM/Contribute/BAO/Contribution.php b/civicrm/CRM/Contribute/BAO/Contribution.php index 8bb11a19e2..79fdeb3ffb 100644 --- a/civicrm/CRM/Contribute/BAO/Contribution.php +++ b/civicrm/CRM/Contribute/BAO/Contribution.php @@ -139,6 +139,11 @@ class CRM_Contribute_BAO_Contribution extends CRM_Contribute_DAO_Contribution { //set defaults in create mode if (!$contributionID) { CRM_Core_DAO::setCreateDefaults($params, self::getDefaults()); + + if (empty($params['invoice_number'])) { + $nextContributionID = CRM_Core_DAO::singleValueQuery("SELECT COALESCE(MAX(id) + 1, 1) FROM civicrm_contribution"); + $params['invoice_number'] = self::getInvoiceNumber($nextContributionID); + } } $contributionStatus = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'name'); @@ -5105,12 +5110,17 @@ WHERE eft.financial_trxn_id IN ({$trxnId}, {$baseTrxnId['financialTrxnId']}) * * * @param string $name + * @param bool $checkInvoicing * @return string * */ - public static function checkContributeSettings($name = NULL) { + public static function checkContributeSettings($name = NULL, $checkInvoicing = FALSE) { $contributeSettings = Civi::settings()->get('contribution_invoice_settings'); + if ($checkInvoicing && !CRM_Utils_Array::value('invoicing', $contributeSettings)) { + return NULL; + } + if ($name) { return CRM_Utils_Array::value($name, $contributeSettings); } @@ -5756,4 +5766,19 @@ LIMIT 1;"; return $contributionDetails; } + /** + * Get invoice_number for contribution. + * + * @param int $contributionID + * + * @return string + */ + public static function getInvoiceNumber($contributionID) { + if ($invoicePrefix = self::checkContributeSettings('invoice_prefix', TRUE)) { + return $invoicePrefix . $contributionID; + } + + return NULL; + } + } diff --git a/civicrm/CRM/Contribute/BAO/ContributionRecur.php b/civicrm/CRM/Contribute/BAO/ContributionRecur.php index bb6d30b735..9ea55f7714 100644 --- a/civicrm/CRM/Contribute/BAO/ContributionRecur.php +++ b/civicrm/CRM/Contribute/BAO/ContributionRecur.php @@ -777,6 +777,12 @@ INNER JOIN civicrm_contribution con ON ( con.id = mp.contribution_id ) CRM_Core_Form_Date::buildDateRange($form, 'contribution_recur_next_sched_contribution_date', 1, '_low', '_high', ts('From'), FALSE, FALSE, 'birth'); CRM_Core_Form_Date::buildDateRange($form, 'contribution_recur_failure_retry_date', 1, '_low', '_high', ts('From'), FALSE, FALSE, 'birth'); CRM_Core_Form_Date::buildDateRange($form, 'contribution_recur_cancel_date', 1, '_low', '_high', ts('From'), FALSE, FALSE, 'birth'); + + // Add field for contribution status + $form->addSelect('contribution_recur_contribution_status_id', + array('entity' => 'contribution', 'multiple' => 'multiple', 'context' => 'search', 'options' => CRM_Contribute_PseudoConstant::contributionStatus()) + ); + $form->addElement('text', 'contribution_recur_processor_id', ts('Processor ID'), CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_ContributionRecur', 'processor_id')); $form->addElement('text', 'contribution_recur_trxn_id', ts('Transaction ID'), CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_ContributionRecur', 'trxn_id')); diff --git a/civicrm/CRM/Contribute/BAO/Query.php b/civicrm/CRM/Contribute/BAO/Query.php index e402e7c213..23c32b4fcd 100644 --- a/civicrm/CRM/Contribute/BAO/Query.php +++ b/civicrm/CRM/Contribute/BAO/Query.php @@ -386,6 +386,13 @@ class CRM_Contribute_BAO_Query extends CRM_Core_BAO_Query { $query->_tables['civicrm_contribution_recur'] = $query->_whereTables['civicrm_contribution_recur'] = 1; return; + case 'contribution_recur_contribution_status_id': + $query->_where[$grouping][] = CRM_Contact_BAO_Query::buildClause("civicrm_contribution_recur.contribution_status_id", $op, $value, 'String'); + list($op, $value) = CRM_Contact_BAO_Query::buildQillForFieldValue('CRM_Contribute_DAO_ContributionRecur', 'contribution_status_id', $value, $op, $pseudoExtraParam); + $query->_qill[$grouping][] = ts("Recurring Contribution Status %1 '%2'", array(1 => $op, 2 => $value)); + $query->_tables['civicrm_contribution_recur'] = $query->_whereTables['civicrm_contribution_recur'] = 1; + return; + case 'contribution_note': $value = $strtolower(CRM_Core_DAO::escapeString($value)); if ($wildcard) { @@ -814,6 +821,7 @@ class CRM_Contribute_BAO_Query extends CRM_Core_BAO_Query { 'trxn_id' => 1, // join 'invoice_id' => 1, + 'invoice_number' => 1, // added 'currency' => 1, // to diff --git a/civicrm/CRM/Contribute/Form/Contribution/Confirm.php b/civicrm/CRM/Contribute/Form/Contribution/Confirm.php index 04563c238d..abddc63b47 100644 --- a/civicrm/CRM/Contribute/Form/Contribution/Confirm.php +++ b/civicrm/CRM/Contribute/Form/Contribution/Confirm.php @@ -520,14 +520,18 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr $invoiceSettings = Civi::settings()->get('contribution_invoice_settings'); $invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings); + // Make a copy of line items array to use for display only + $tplLineItems = $this->_lineItem; if ($invoicing) { $getTaxDetails = FALSE; $taxTerm = CRM_Utils_Array::value('tax_term', $invoiceSettings); foreach ($this->_lineItem as $key => $value) { - foreach ($value as $v) { + foreach ($value as $k => $v) { if (isset($v['tax_rate'])) { if ($v['tax_rate'] != '') { $getTaxDetails = TRUE; + // Cast to float to display without trailing zero decimals + $tplLineItems[$key][$k]['tax_rate'] = (float) $v['tax_rate']; } } } @@ -591,7 +595,7 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr $this->_separateMembershipPayment = $this->get('separateMembershipPayment'); $this->assign('is_separate_payment', $this->_separateMembershipPayment); if ($this->_priceSetId && !CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $this->_priceSetId, 'is_quick_config')) { - $this->assign('lineItem', $this->_lineItem); + $this->assign('lineItem', $tplLineItems); } else { $this->assign('is_quick_config', 1); diff --git a/civicrm/CRM/Contribute/Form/Contribution/ThankYou.php b/civicrm/CRM/Contribute/Form/Contribution/ThankYou.php index 09b44253bb..f00974809e 100644 --- a/civicrm/CRM/Contribute/Form/Contribution/ThankYou.php +++ b/civicrm/CRM/Contribute/Form/Contribution/ThankYou.php @@ -99,30 +99,22 @@ class CRM_Contribute_Form_Contribution_ThankYou extends CRM_Contribute_Form_Cont if ($productID) { CRM_Contribute_BAO_Premium::buildPremiumBlock($this, $this->_id, FALSE, $productID, $option); } - if ($this->_priceSetId && !CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $this->_priceSetId, 'is_quick_config')) { - $this->assign('lineItem', $this->_lineItem); - } - else { - if (is_array($membershipTypeID)) { - $membershipTypeID = current($membershipTypeID); - } - $this->assign('is_quick_config', 1); - $this->_params['is_quick_config'] = 1; - } - $this->assign('priceSetID', $this->_priceSetId); - $this->assign('useForMember', $this->get('useForMember')); $params = $this->_params; $invoiceSettings = Civi::settings()->get('contribution_invoice_settings'); $invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings); + // Make a copy of line items array to use for display only + $tplLineItems = $this->_lineItem; if ($invoicing) { $getTaxDetails = FALSE; $taxTerm = CRM_Utils_Array::value('tax_term', $invoiceSettings); - foreach ($this->_lineItem as $value) { - foreach ($value as $v) { + foreach ($this->_lineItem as $key => $value) { + foreach ($value as $k => $v) { if (isset($v['tax_rate'])) { if ($v['tax_rate'] != '') { $getTaxDetails = TRUE; + // Cast to float to display without trailing zero decimals + $tplLineItems[$key][$k]['tax_rate'] = (float) $v['tax_rate']; } } } @@ -131,6 +123,20 @@ class CRM_Contribute_Form_Contribution_ThankYou extends CRM_Contribute_Form_Cont $this->assign('taxTerm', $taxTerm); $this->assign('totalTaxAmount', $params['tax_amount']); } + + if ($this->_priceSetId && !CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $this->_priceSetId, 'is_quick_config')) { + $this->assign('lineItem', $tplLineItems); + } + else { + if (is_array($membershipTypeID)) { + $membershipTypeID = current($membershipTypeID); + } + $this->assign('is_quick_config', 1); + $this->_params['is_quick_config'] = 1; + } + $this->assign('priceSetID', $this->_priceSetId); + $this->assign('useForMember', $this->get('useForMember')); + if (!empty($this->_values['honoree_profile_id']) && !empty($params['soft_credit_type_id'])) { $softCreditTypes = CRM_Core_OptionGroup::values("soft_credit_type", FALSE); diff --git a/civicrm/CRM/Contribute/Form/ContributionBase.php b/civicrm/CRM/Contribute/Form/ContributionBase.php index fd2b20e11b..216c8149e2 100644 --- a/civicrm/CRM/Contribute/Form/ContributionBase.php +++ b/civicrm/CRM/Contribute/Form/ContributionBase.php @@ -328,13 +328,11 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form { } } - if ($isMonetary && - (!$isPayLater || !empty($this->_values['payment_processor'])) - ) { - $this->_paymentProcessorIDs = explode( + if ($isMonetary) { + $this->_paymentProcessorIDs = array_filter(explode( CRM_Core_DAO::VALUE_SEPARATOR, CRM_Utils_Array::value('payment_processor', $this->_values) - ); + )); $this->assignPaymentProcessor($isPayLater); } @@ -567,20 +565,20 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form { } //fix for CRM-3767 - $assignCCInfo = FALSE; + $isMonetary = FALSE; if ($this->_amount > 0.0) { - $assignCCInfo = TRUE; + $isMonetary = TRUE; } elseif (!empty($this->_params['selectMembership'])) { $memFee = CRM_Core_DAO::getFieldValue('CRM_Member_DAO_MembershipType', $this->_params['selectMembership'], 'minimum_fee'); if ($memFee > 0.0) { - $assignCCInfo = TRUE; + $isMonetary = TRUE; } } // The concept of contributeMode is deprecated. // The payment processor object can provide info about the fields it shows. - if ($assignCCInfo) { + if ($isMonetary) { /** @var $paymentProcessorObject \CRM_Core_Payment */ $paymentProcessorObject = $this->_paymentProcessor['object']; $paymentFields = $paymentProcessorObject->getPaymentFormFields(); @@ -938,6 +936,9 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form { } $fieldTypes = array('Contact', 'Organization'); + if (!empty($form->_membershipBlock)) { + $fieldTypes = array_merge($fieldTypes, array('Membership')); + } $contactSubType = CRM_Contact_BAO_ContactType::subTypes('Organization'); $fieldTypes = array_merge($fieldTypes, $contactSubType); diff --git a/civicrm/CRM/Contribute/Form/Task/Invoice.php b/civicrm/CRM/Contribute/Form/Task/Invoice.php index 59e86e0015..03ec061b5e 100644 --- a/civicrm/CRM/Contribute/Form/Task/Invoice.php +++ b/civicrm/CRM/Contribute/Form/Task/Invoice.php @@ -312,7 +312,9 @@ class CRM_Contribute_Form_Task_Invoice extends CRM_Contribute_Form_Task { $creditNoteId = $contribution->creditnote_id; } } - $invoiceNumber = CRM_Utils_Array::value('invoice_prefix', $prefixValue) . "" . $contribution->id; + if (!$contribution->invoice_number) { + $contribution->invoice_number = CRM_Contribute_BAO_Contribution::getInvoiceNumber($contribution->id); + } //to obtain due date for PDF invoice $contributionReceiveDate = date('F j,Y', strtotime(date($input['receive_date']))); @@ -425,7 +427,7 @@ class CRM_Contribute_Form_Task_Invoice extends CRM_Contribute_Form_Task { 'component' => $input['component'], 'id' => $contribution->id, 'source' => $source, - 'invoice_number' => $invoiceNumber, + 'invoice_number' => $contribution->invoice_number, 'invoice_id' => $contribution->invoice_id, 'resourceBase' => $config->userFrameworkResourceURL, 'defaultCurrency' => $config->defaultCurrency, @@ -469,7 +471,7 @@ class CRM_Contribute_Form_Task_Invoice extends CRM_Contribute_Form_Task { $tplParams['creditnote_id'] = $creditNoteId; } - $pdfFileName = "{$invoiceNumber}.pdf"; + $pdfFileName = $contribution->invoice_number . ".pdf"; $sendTemplateParams = array( 'groupName' => 'msg_tpl_workflow_contribution', 'valueName' => 'contribution_invoice_receipt', @@ -556,8 +558,6 @@ class CRM_Contribute_Form_Task_Invoice extends CRM_Contribute_Form_Task { $fileName = self::putFile($html, $pdfFileName); self::addActivities($subject, $contribution->contact_id, $fileName, $params); } - - CRM_Core_DAO::setFieldValue('CRM_Contribute_DAO_Contribution', $contribution->id, 'invoice_number', $invoiceNumber); $invoiceTemplate->clearTemplateVars(); } diff --git a/civicrm/CRM/Core/BAO/ActionSchedule.php b/civicrm/CRM/Core/BAO/ActionSchedule.php index 35a41f1aae..45cfe04a2a 100644 --- a/civicrm/CRM/Core/BAO/ActionSchedule.php +++ b/civicrm/CRM/Core/BAO/ActionSchedule.php @@ -556,10 +556,7 @@ FROM civicrm_action_schedule cas 'provider_id' => $schedule->sms_provider_id, 'activity_subject' => $messageSubject, ); - $activityTypeID = CRM_Core_OptionGroup::getValue('activity_type', - 'SMS', - 'name' - ); + $activityTypeID = CRM_Core_PseudoConstant::getKey('CRM_Activity_BAO_Activity', 'activity_type_id', 'SMS'); $activityParams = array( 'source_contact_id' => $userID, 'activity_type_id' => $activityTypeID, diff --git a/civicrm/CRM/Core/BAO/Address.php b/civicrm/CRM/Core/BAO/Address.php index df274fd788..1d06932896 100644 --- a/civicrm/CRM/Core/BAO/Address.php +++ b/civicrm/CRM/Core/BAO/Address.php @@ -152,6 +152,11 @@ class CRM_Core_BAO_Address extends CRM_Core_DAO_Address { CRM_Core_BAO_Block::handlePrimary($params, get_class()); } + // (prevent chaining 1 and 3) CRM-21214 + if (CRM_Utils_Array::value('master_id', $params)) { + self::fixSharedAddress($params); + } + $address->copyValues($params); $address->save(); @@ -171,15 +176,11 @@ class CRM_Core_BAO_Address extends CRM_Core_DAO_Address { CRM_Core_BAO_CustomValueTable::store($addressCustom, 'civicrm_address', $address->id); } - //call the function to sync shared address + // call the function to sync shared address and create relationships + // if address is already shared, share master_id with all children and update relationships accordingly + // (prevent chaining 2) CRM-21214 self::processSharedAddress($address->id, $params); - // call the function to create shared relationships - // we only create create relationship if address is shared by Individual - if (!CRM_Utils_System::isNull($address->master_id)) { - self::processSharedAddressRelationship($address->master_id, $params); - } - // lets call the post hook only after we've done all the follow on processing CRM_Utils_Hook::post($hook, 'Address', $address->id, $address); } @@ -995,6 +996,27 @@ SELECT is_primary, } } + /** + * Fix the shared address if address is already shared + * or if address will be shared with itself. + * + * @param array $params + * Associated array of address params. + */ + public static function fixSharedAddress(&$params) { + // if address master address is shared, use its master (prevent chaining 1) CRM-21214 + $masterMasterId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Address', $params['master_id'], 'master_id'); + if ($masterMasterId > 0) { + $params['master_id'] = $masterMasterId; + } + + // prevent an endless chain between two shared addresses (prevent chaining 3) CRM-21214 + if (CRM_Utils_Array::value('id', $params) == $params['master_id']) { + $params['master_id'] = NULL; + CRM_Core_Session::setStatus(ts("You can't connect an address to itself"), '', 'warning'); + } + } + /** * Update the shared addresses if master address is modified. * @@ -1004,17 +1026,29 @@ SELECT is_primary, * Associated array of address params. */ public static function processSharedAddress($addressId, $params) { - $query = 'SELECT id FROM civicrm_address WHERE master_id = %1'; + $query = 'SELECT id, contact_id FROM civicrm_address WHERE master_id = %1'; $dao = CRM_Core_DAO::executeQuery($query, array(1 => array($addressId, 'Integer'))); // unset contact id - $skipFields = array('is_primary', 'location_type_id', 'is_billing', 'master_id', 'contact_id'); + $skipFields = array('is_primary', 'location_type_id', 'is_billing', 'contact_id'); + if (CRM_Utils_Array::value('master_id', $params)) { + // call the function to create a relationship for the new shared address + self::processSharedAddressRelationship($params['master_id'], $params['contact_id']); + } + else { + // else no new shares will be created, only update shared addresses + $skipFields[] = 'master_id'; + } foreach ($skipFields as $value) { unset($params[$value]); } $addressDAO = new CRM_Core_DAO_Address(); while ($dao->fetch()) { + // call the function to update the relationship + if (CRM_Utils_Array::value('master_id', $params)) { + self::processSharedAddressRelationship($params['master_id'], $dao->contact_id); + } $addressDAO->copyValues($params); $addressDAO->id = $dao->id; $addressDAO->save(); @@ -1098,18 +1132,17 @@ SELECT is_primary, /** * Create relationship between contacts who share an address. * - * Note that currently we create relationship only for Individual contacts - * Individual + Household and Individual + Orgnization + * Note that currently we create relationship between + * Individual + Household and Individual + Organization * * @param int $masterAddressId * Master address id. - * @param array $params - * Associated array of submitted values. + * @param int $currentContactId + * Current contact id. */ - public static function processSharedAddressRelationship($masterAddressId, $params) { + public static function processSharedAddressRelationship($masterAddressId, $currentContactId) { // get the contact type of contact being edited / created - $currentContactType = CRM_Contact_BAO_Contact::getContactType($params['contact_id']); - $currentContactId = $params['contact_id']; + $currentContactType = CRM_Contact_BAO_Contact::getContactType($currentContactId); // if current contact is not of type individual return if ($currentContactType != 'Individual') { @@ -1125,8 +1158,7 @@ SELECT is_primary, $dao = CRM_Core_DAO::executeQuery($query, array(1 => array($masterAddressId, 'Integer'))); $dao->fetch(); - // if current contact is not of type individual return, since we don't create relationship between - // 2 individuals + // master address contact needs to be Household or Organization, otherwise return if ($dao->contact_type == 'Individual') { return; } diff --git a/civicrm/CRM/Core/BAO/CMSUser.php b/civicrm/CRM/Core/BAO/CMSUser.php index 141ba941ed..c8452a41e6 100644 --- a/civicrm/CRM/Core/BAO/CMSUser.php +++ b/civicrm/CRM/Core/BAO/CMSUser.php @@ -91,18 +91,8 @@ class CRM_Core_BAO_CMSUser { $isJoomla = ucfirst($config->userFramework) == 'Joomla' ? TRUE : FALSE; $isWordPress = $config->userFramework == 'WordPress' ? TRUE : FALSE; - //if CMS is configured for not to allow creating new CMS user, - //don't build the form,Fixed for CRM-4036 - if ($isJoomla) { - $userParams = JComponentHelper::getParams('com_users'); - if (!$userParams->get('allowUserRegistration')) { - return FALSE; - } - } - elseif ($isDrupal && !variable_get('user_register', TRUE)) { - return FALSE; - } - elseif ($isWordPress && !get_option('users_can_register')) { + if (!$config->userSystem->isUserRegistrationPermitted()) { + // Do not build form if CMS is not configured to allow creating users. return FALSE; } @@ -111,8 +101,7 @@ class CRM_Core_BAO_CMSUser { } // $cms is true when there is email(primary location) is set in the profile field. - $session = CRM_Core_Session::singleton(); - $userID = $session->get('userID'); + $userID = CRM_Core_Session::singleton()->get('userID'); $showUserRegistration = FALSE; if ($action) { $showUserRegistration = TRUE; @@ -138,7 +127,7 @@ class CRM_Core_BAO_CMSUser { $form->assign('isCMS', $required); if (!$userID || $action & CRM_Core_Action::PREVIEW || $action & CRM_Core_Action::PROFILE) { $form->add('text', 'cms_name', ts('Username'), NULL, $required); - if (($isDrupal && !variable_get('user_email_verification', TRUE)) OR ($isJoomla) OR ($isWordPress)) { + if ($config->userSystem->isPasswordUserGenerated()) { $form->add('password', 'cms_pass', ts('Password')); $form->add('password', 'cms_confirm_pass', ts('Confirm Password')); } @@ -208,7 +197,7 @@ class CRM_Core_BAO_CMSUser { $errors[$emailName] = ts('Please specify a valid email address.'); } - if (($isDrupal && !variable_get('user_email_verification', TRUE)) OR ($isJoomla) OR ($isWordPress)) { + if ($config->userSystem->isPasswordUserGenerated()) { if (empty($fields['cms_pass']) || empty($fields['cms_confirm_pass']) ) { diff --git a/civicrm/CRM/Core/BAO/CustomField.php b/civicrm/CRM/Core/BAO/CustomField.php index 21d093fc48..4b1b11cfae 100644 --- a/civicrm/CRM/Core/BAO/CustomField.php +++ b/civicrm/CRM/Core/BAO/CustomField.php @@ -1247,7 +1247,13 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField { // In the context of displaying a profile, show file/image if ($value) { if ($entityId) { - $url = self::getFileURL($entityId, $field['id']); + if (CRM_Utils_Rule::positiveInteger($value)) { + $fileId = $value; + } + else { + $fileId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_File', $value, 'id', 'uri'); + } + $url = self::getFileURL($entityId, $field['id'], $fileId); if ($url) { $display = $url['file_url']; } diff --git a/civicrm/CRM/Core/BAO/Navigation.php b/civicrm/CRM/Core/BAO/Navigation.php index b499f0ceb7..cff1a1d4bd 100644 --- a/civicrm/CRM/Core/BAO/Navigation.php +++ b/civicrm/CRM/Core/BAO/Navigation.php @@ -528,7 +528,7 @@ FROM civicrm_navigation WHERE domain_id = $domainID {$whereClause} ORDER BY pare } if (!empty($value['attributes']['icon'])) { - $menuIcon = sprintf('<span class="%s"></span> ', $value['attributes']['icon']); + $menuIcon = sprintf('<i class="%s"></i>', $value['attributes']['icon']); $name = $menuIcon . $name; } @@ -608,7 +608,8 @@ FROM civicrm_navigation WHERE domain_id = $domainID {$whereClause} ORDER BY pare public static function resetNavigation($contactID = NULL) { $newKey = CRM_Utils_String::createRandom(self::CACHE_KEY_STRLEN, CRM_Utils_String::ALPHANUMERIC); if (!$contactID) { - $query = "UPDATE civicrm_setting SET value = '$newKey' WHERE name='navigation' AND contact_id IS NOT NULL"; + $ser = serialize($newKey); + $query = "UPDATE civicrm_setting SET value = '$ser' WHERE name='navigation' AND contact_id IS NOT NULL"; CRM_Core_DAO::executeQuery($query); CRM_Core_BAO_Cache::deleteGroup('navigation'); } diff --git a/civicrm/CRM/Core/BAO/OptionValue.php b/civicrm/CRM/Core/BAO/OptionValue.php index bd276f2faf..9bb61d0543 100644 --- a/civicrm/CRM/Core/BAO/OptionValue.php +++ b/civicrm/CRM/Core/BAO/OptionValue.php @@ -219,6 +219,15 @@ class CRM_Core_BAO_OptionValue extends CRM_Core_DAO_OptionValue { $groupName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', $groupId, 'name', 'id' ); + if (empty($ids['optionValue']) && empty($params['id']) && !empty($params['value'])) { + $domainSpecifc = in_array($groupName, CRM_Core_OptionGroup::$_domainIDGroups) ? TRUE : FALSE; + $dao = new CRM_Core_DAO_OptionValue(); + $dao->value = $params['value']; + $dao->option_group_id = $groupId; + if ($dao->find(TRUE)) { + throw new CRM_Core_Exception('Value already exists in the database'); + } + } if (in_array($groupName, CRM_Core_OptionGroup::$_domainIDGroups)) { $optionValue->domain_id = CRM_Utils_Array::value('domain_id', $params, CRM_Core_Config::domainID()); } diff --git a/civicrm/CRM/Core/BAO/PrevNextCache.php b/civicrm/CRM/Core/BAO/PrevNextCache.php index a3d6f44123..0eab40d4c8 100644 --- a/civicrm/CRM/Core/BAO/PrevNextCache.php +++ b/civicrm/CRM/Core/BAO/PrevNextCache.php @@ -366,11 +366,16 @@ WHERE (pn.cacheKey $op %1 OR pn.cacheKey $op %2) * @param bool $checkPermissions * Respect logged in user's permissions. * + * @param int $searchLimit + * Limit for the number of contacts to be used for comparison. + * The search methodology finds all matches for the searchedContacts so this limits + * the number of searched contacts, not the matches found. + * * @return bool * @throws \CRM_Core_Exception * @throws \CiviCRM_API3_Exception */ - public static function refillCache($rgid, $gid, $cacheKeyString, $criteria, $checkPermissions) { + public static function refillCache($rgid, $gid, $cacheKeyString, $criteria, $checkPermissions, $searchLimit = 0) { if (!$cacheKeyString && $rgid) { $cacheKeyString = CRM_Dedupe_Merger::getMergeCacheKeyString($rgid, $gid, $criteria, $checkPermissions); } @@ -389,7 +394,7 @@ WHERE (pn.cacheKey $op %1 OR pn.cacheKey $op %2) // 2. FILL cache $foundDupes = array(); if ($rgid && $gid) { - $foundDupes = CRM_Dedupe_Finder::dupesInGroup($rgid, $gid); + $foundDupes = CRM_Dedupe_Finder::dupesInGroup($rgid, $gid, $searchLimit); } elseif ($rgid) { $contactIDs = array(); @@ -397,7 +402,7 @@ WHERE (pn.cacheKey $op %1 OR pn.cacheKey $op %2) $contacts = civicrm_api3('Contact', 'get', array_merge(array('options' => array('limit' => 0), 'return' => 'id'), $criteria['contact'])); $contactIDs = array_keys($contacts['values']); } - $foundDupes = CRM_Dedupe_Finder::dupes($rgid, $contactIDs, $checkPermissions); + $foundDupes = CRM_Dedupe_Finder::dupes($rgid, $contactIDs, $checkPermissions, $searchLimit); } if (!empty($foundDupes)) { diff --git a/civicrm/CRM/Core/DAO.php b/civicrm/CRM/Core/DAO.php index c6d3156b80..503a896e76 100644 --- a/civicrm/CRM/Core/DAO.php +++ b/civicrm/CRM/Core/DAO.php @@ -118,8 +118,15 @@ class CRM_Core_DAO extends DB_DataObject { } $factory = new CRM_Contact_DAO_Factory(); CRM_Core_DAO::setFactory($factory); + $currentModes = CRM_Utils_SQL::getSqlModes(); if (CRM_Utils_Constant::value('CIVICRM_MYSQL_STRICT', CRM_Utils_System::isDevelopment())) { - CRM_Core_DAO::executeQuery('SET SESSION sql_mode = STRICT_TRANS_TABLES'); + if (CRM_Utils_SQL::supportsFullGroupBy() && !in_array('ONLY_FULL_GROUP_BY', $currentModes) && CRM_Utils_SQL::isGroupByModeInDefault()) { + $currentModes[] = 'ONLY_FULL_GROUP_BY'; + } + if (!in_array('STRICT_TRANS_TABLES', $currentModes)) { + $currentModes = array_merge(array('STRICT_TRANS_TABLES'), $currentModes); + } + CRM_Core_DAO::executeQuery("SET SESSION sql_mode = %1", array(1 => array(implode(',', $currentModes), 'String'))); } CRM_Core_DAO::executeQuery('SET NAMES utf8'); CRM_Core_DAO::executeQuery('SET @uniqueID = %1', array(1 => array(CRM_Utils_Request::id(), 'String'))); diff --git a/civicrm/CRM/Core/Error.php b/civicrm/CRM/Core/Error.php index 645ccca2c3..cffb07980b 100644 --- a/civicrm/CRM/Core/Error.php +++ b/civicrm/CRM/Core/Error.php @@ -343,7 +343,7 @@ class CRM_Core_Error extends PEAR_ErrorStack { } if (!$message) { - $message = ts('We experienced an unexpected error. Please post a detailed description and the backtrace on the CiviCRM forums: %1', array(1 => 'http://forum.civicrm.org/')); + $message = ts('We experienced an unexpected error. You may have found a bug. For more information on how to provide a bug report, please read: %1', array(1 => 'https://civicrm.org/bug-reporting')); } if (php_sapi_name() == "cli") { @@ -423,7 +423,7 @@ class CRM_Core_Error extends PEAR_ErrorStack { 'exception' => $exception, ); if (!$vars['message']) { - $vars['message'] = ts('We experienced an unexpected error. Please post a detailed description and the backtrace on the CiviCRM forums: %1', array(1 => 'http://forum.civicrm.org/')); + $vars['message'] = ts('We experienced an unexpected error. You may have found a bug. For more information on how to provide a bug report, please read: %1', array(1 => 'https://civicrm.org/bug-reporting')); } // Case A: CLI diff --git a/civicrm/CRM/Core/Form.php b/civicrm/CRM/Core/Form.php index 99a091d64f..948d7ce4e3 100644 --- a/civicrm/CRM/Core/Form.php +++ b/civicrm/CRM/Core/Form.php @@ -724,20 +724,20 @@ class CRM_Core_Form extends HTML_QuickForm_Page { * * It would be good to sync it with the back-end function on abstractEditPayment & use one everywhere. * - * @param bool $is_pay_later_enabled + * @param bool $isPayLaterEnabled * * @throws \CRM_Core_Exception */ - protected function assignPaymentProcessor($is_pay_later_enabled) { + protected function assignPaymentProcessor($isPayLaterEnabled) { $this->_paymentProcessors = CRM_Financial_BAO_PaymentProcessor::getPaymentProcessors( array(ucfirst($this->_mode) . 'Mode'), $this->_paymentProcessorIDs ); + if ($isPayLaterEnabled) { + $this->_paymentProcessors[0] = CRM_Financial_BAO_PaymentProcessor::getPayment(0); + } if (!empty($this->_paymentProcessors)) { - if ($is_pay_later_enabled) { - $this->_paymentProcessors[0] = CRM_Financial_BAO_PaymentProcessor::getPayment(0); - } foreach ($this->_paymentProcessors as $paymentProcessorID => $paymentProcessorDetail) { if (empty($this->_paymentProcessor) && $paymentProcessorDetail['is_default'] == 1 || (count($this->_paymentProcessors) == 1) ) { @@ -1865,14 +1865,16 @@ class CRM_Core_Form extends HTML_QuickForm_Page { } $props['select'] = CRM_Utils_Array::value('select', $props, array()) + $defaults; - $this->formatReferenceFieldAttributes($props); + $this->formatReferenceFieldAttributes($props, get_class($this)); return $this->add('text', $name, $label, $props, $required); } /** - * @param $props + * @param array $props + * @param string $formName */ - private function formatReferenceFieldAttributes(&$props) { + private function formatReferenceFieldAttributes(&$props, $formName) { + CRM_Utils_Hook::alterEntityRefParams($props, $formName); $props['data-select-params'] = json_encode($props['select']); $props['data-api-params'] = $props['api'] ? json_encode($props['api']) : NULL; $props['data-api-entity'] = $props['entity']; diff --git a/civicrm/CRM/Core/Payment.php b/civicrm/CRM/Core/Payment.php index 822b6bcc88..f817967cca 100644 --- a/civicrm/CRM/Core/Payment.php +++ b/civicrm/CRM/Core/Payment.php @@ -1446,11 +1446,10 @@ abstract class CRM_Core_Payment { case 'recur': $sql = " - SELECT con.contact_id + SELECT DISTINCT con.contact_id FROM civicrm_contribution_recur rec INNER JOIN civicrm_contribution con ON ( con.contribution_recur_id = rec.id ) - WHERE rec.id = %1 - GROUP BY rec.id"; + WHERE rec.id = %1"; $contactID = CRM_Core_DAO::singleValueQuery($sql, array(1 => array($entityID, 'Integer'))); $entityArg = 'crid'; break; diff --git a/civicrm/CRM/Core/Permission.php b/civicrm/CRM/Core/Permission.php index c934bc6098..d6a1915cb3 100644 --- a/civicrm/CRM/Core/Permission.php +++ b/civicrm/CRM/Core/Permission.php @@ -1603,8 +1603,7 @@ class CRM_Core_Permission { * invoices permission and the invoice author is the current user. */ public static function checkDownloadInvoice() { - global $user; - $cid = CRM_Core_BAO_UFMatch::getContactId($user->uid); + $cid = CRM_Core_Session::getLoggedInContactID(); if (CRM_Core_Permission::check('access CiviContribute') || (CRM_Core_Permission::check('view my invoices') && $_GET['cid'] == $cid) ) { diff --git a/civicrm/CRM/Core/Resources.php b/civicrm/CRM/Core/Resources.php index f8c00772ae..87cb3c79c9 100644 --- a/civicrm/CRM/Core/Resources.php +++ b/civicrm/CRM/Core/Resources.php @@ -528,6 +528,9 @@ class CRM_Core_Resources { $patterns = (array) $patterns; $files = array(); foreach ($patterns as $pattern) { + if (preg_match(';^(assetBuilder|ext)://;', $pattern)) { + $files[] = $pattern; + } if (CRM_Utils_File::isAbsolute($pattern)) { // Absolute path. $files = array_merge($files, (array) glob($pattern, $flags)); diff --git a/civicrm/CRM/Custom/Page/Option.php b/civicrm/CRM/Custom/Page/Option.php index 8fe3a8841a..23b9f9ae34 100644 --- a/civicrm/CRM/Custom/Page/Option.php +++ b/civicrm/CRM/Custom/Page/Option.php @@ -108,6 +108,47 @@ class CRM_Custom_Page_Option extends CRM_Core_Page { return self::$_actionLinks; } + /** + * Alphabetize multiple option values + * + * @return void + */ + public function alphabetize() { + $optionGroupID = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_CustomField', + $this->_fid, + 'option_group_id' + ); + $query = " +SELECT id, label +FROM civicrm_option_value +WHERE option_group_id = %1"; + $params = array( + 1 => array($optionGroupID, 'Integer'), + ); + $dao = CRM_Core_DAO::executeQuery($query, $params); + $optionValue = array(); + while ($dao->fetch()) { + $optionValue[$dao->id] = $dao->label; + } + asort($optionValue, SORT_STRING | SORT_FLAG_CASE | SORT_NATURAL); + + $i = 1; + foreach ($optionValue as $key => $_) { + $clause[] = "WHEN $key THEN $i"; + $i++; + } + + $when = implode(' ', $clause); + $sql = " +UPDATE civicrm_option_value +SET weight = CASE id +$when +END +WHERE option_group_id = %1"; + + $dao = CRM_Core_DAO::executeQuery($sql, $params); + } + /** * Browse all custom group fields. * @@ -167,7 +208,6 @@ WHERE option_group_id = %1"; $controller->setEmbedded(TRUE); $controller->process(); $controller->run(); - $this->browse(); } /** @@ -222,7 +262,7 @@ WHERE option_group_id = %1"; $this, FALSE, 0 ); - // what action to take ? + // take action in addition to default browse ? if (($action & (CRM_Core_Action::UPDATE | CRM_Core_Action::ADD | CRM_Core_Action::VIEW | CRM_Core_Action::DELETE ) @@ -232,9 +272,11 @@ WHERE option_group_id = %1"; // no browse for edit/update/view $this->edit($action); } - else { - $this->browse(); + elseif ($action & CRM_Core_Action::MAP) { + $this->alphabetize(); } + $this->browse(); + // Call the parents run method return parent::run(); } diff --git a/civicrm/CRM/Dedupe/BAO/RuleGroup.php b/civicrm/CRM/Dedupe/BAO/RuleGroup.php index b3b0ef128a..7bd63eec8f 100644 --- a/civicrm/CRM/Dedupe/BAO/RuleGroup.php +++ b/civicrm/CRM/Dedupe/BAO/RuleGroup.php @@ -196,13 +196,13 @@ class CRM_Dedupe_BAO_RuleGroup extends CRM_Dedupe_DAO_RuleGroup { if ($this->params && !$this->noRules) { $tempTableQuery = "CREATE TEMPORARY TABLE dedupe (id1 int, weight int, UNIQUE UI_id1 (id1)) ENGINE=InnoDB"; $insertClause = "INSERT INTO dedupe (id1, weight)"; - $groupByClause = "GROUP BY id1"; + $groupByClause = "GROUP BY id1, weight"; $dupeCopyJoin = " JOIN dedupe_copy ON dedupe_copy.id1 = t1.column WHERE "; } else { $tempTableQuery = "CREATE TEMPORARY TABLE dedupe (id1 int, id2 int, weight int, UNIQUE UI_id1_id2 (id1, id2)) ENGINE=InnoDB"; $insertClause = "INSERT INTO dedupe (id1, id2, weight)"; - $groupByClause = "GROUP BY id1, id2"; + $groupByClause = "GROUP BY id1, id2, weight"; $dupeCopyJoin = " JOIN dedupe_copy ON dedupe_copy.id1 = t1.column AND dedupe_copy.id2 = t2.column WHERE "; } $patternColumn = '/t1.(\w+)/'; diff --git a/civicrm/CRM/Dedupe/Finder.php b/civicrm/CRM/Dedupe/Finder.php index 19d2ce2c8e..3b61672bf2 100644 --- a/civicrm/CRM/Dedupe/Finder.php +++ b/civicrm/CRM/Dedupe/Finder.php @@ -51,9 +51,10 @@ class CRM_Dedupe_Finder { * @param bool $checkPermissions * Respect logged in user permissions. * - * @param int $limit - * Optional limit. This limits the number of contacts for which the code will - * attempt to find matches. + * @param int $searchLimit + * Limit for the number of contacts to be used for comparison. + * The search methodology finds all matches for the searchedContacts so this limits + * the number of searched contacts, not the matches found. * * @return array * Array of (cid1, cid2, weight) dupe triples @@ -61,18 +62,18 @@ class CRM_Dedupe_Finder { * @throws CiviCRM_API3_Exception * @throws Exception */ - public static function dupes($rgid, $cids = array(), $checkPermissions = TRUE, $limit = NULL) { + public static function dupes($rgid, $cids = array(), $checkPermissions = TRUE, $searchLimit = 0) { $rgBao = new CRM_Dedupe_BAO_RuleGroup(); $rgBao->id = $rgid; $rgBao->contactIds = $cids; if (!$rgBao->find(TRUE)) { CRM_Core_Error::fatal("Dedupe rule not found for selected contacts"); } - if (empty($rgBao->contactIds) && !empty($limit)) { + if (empty($rgBao->contactIds) && !empty($searchLimit)) { $limitedContacts = civicrm_api3('Contact', 'get', array( 'return' => 'id', 'contact_type' => $rgBao->contact_type, - 'options' => array('limit' => $limit), + 'options' => array('limit' => $searchLimit), )); $rgBao->contactIds = array_keys($limitedContacts['values']); } @@ -171,12 +172,16 @@ class CRM_Dedupe_Finder { * @param int $gid * Contact group id (currently, works only with non-smart groups). * - * @param int $limit + * @param int $searchLimit + * Limit for the number of contacts to be used for comparison. + * The search methodology finds all matches for the searchedContacts so this limits + * the number of searched contacts, not the matches found. + * * @return array * array of (cid1, cid2, weight) dupe triples */ - public static function dupesInGroup($rgid, $gid, $limit = NULL) { - $cids = array_keys(CRM_Contact_BAO_Group::getMember($gid, $limit)); + public static function dupesInGroup($rgid, $gid, $searchLimit = 0) { + $cids = array_keys(CRM_Contact_BAO_Group::getMember($gid, $searchLimit)); if (!empty($cids)) { return self::dupes($rgid, $cids); } diff --git a/civicrm/CRM/Dedupe/Merger.php b/civicrm/CRM/Dedupe/Merger.php index c2ebae7119..47cc8b7435 100644 --- a/civicrm/CRM/Dedupe/Merger.php +++ b/civicrm/CRM/Dedupe/Merger.php @@ -1926,10 +1926,13 @@ INNER JOIN civicrm_membership membership2 ON membership1.membership_type_id = m * @param bool $checkPermissions * Respect logged in user permissions. * + * @param int $searchLimit + * Limit to searching for matches against this many contacts. + * * @return array * Array of matches meeting the criteria. */ - public static function getDuplicatePairs($rule_group_id, $group_id, $reloadCacheIfEmpty, $batchLimit, $isSelected, $orderByClause = '', $includeConflicts = TRUE, $criteria = array(), $checkPermissions = TRUE) { + public static function getDuplicatePairs($rule_group_id, $group_id, $reloadCacheIfEmpty, $batchLimit, $isSelected, $orderByClause = '', $includeConflicts = TRUE, $criteria = array(), $checkPermissions = TRUE, $searchLimit = 0) { $where = self::getWhereString($batchLimit, $isSelected); $cacheKeyString = self::getMergeCacheKeyString($rule_group_id, $group_id, $criteria, $checkPermissions); $join = self::getJoinOnDedupeTable(); @@ -1938,7 +1941,7 @@ INNER JOIN civicrm_membership membership2 ON membership1.membership_type_id = m // If we haven't found any dupes, probably cache is empty. // Try filling cache and give another try. We don't need to specify include conflicts here are there will not be any // until we have done some processing. - CRM_Core_BAO_PrevNextCache::refillCache($rule_group_id, $group_id, $cacheKeyString, $criteria, $checkPermissions); + CRM_Core_BAO_PrevNextCache::refillCache($rule_group_id, $group_id, $cacheKeyString, $criteria, $checkPermissions, $searchLimit); $dupePairs = CRM_Core_BAO_PrevNextCache::retrieve($cacheKeyString, $join, $where, 0, 0, array(), $orderByClause, $includeConflicts); return $dupePairs; } diff --git a/civicrm/CRM/Event/BAO/Participant.php b/civicrm/CRM/Event/BAO/Participant.php index c8452b9e2d..29ee233865 100644 --- a/civicrm/CRM/Event/BAO/Participant.php +++ b/civicrm/CRM/Event/BAO/Participant.php @@ -547,6 +547,7 @@ INNER JOIN civicrm_participant participant ON ( line.entity_table = 'civicrm_p INNER JOIN civicrm_price_field_value value ON ( value.id = line.price_field_value_id ) INNER JOIN civicrm_price_field field ON ( value.price_field_id = field.id ) WHERE participant.event_id = %1 + AND line.qty > 0 {$statusIdClause} {$isTestClause} {$skipParticipantClause}"; diff --git a/civicrm/CRM/Event/Cart/BAO/EventInCart.php b/civicrm/CRM/Event/Cart/BAO/EventInCart.php index 457b12dcac..05872c0395 100644 --- a/civicrm/CRM/Event/Cart/BAO/EventInCart.php +++ b/civicrm/CRM/Event/Cart/BAO/EventInCart.php @@ -291,14 +291,14 @@ class CRM_Event_Cart_BAO_EventInCart extends CRM_Event_Cart_DAO_EventInCart impl if ($event_in_cart) { return array( - 'label' => "Remove from Cart", + 'label' => ts("Remove from Cart"), 'path' => 'civicrm/event/remove_from_cart', 'query' => "reset=1&id={$event_id}", ); } else { return array( - 'label' => "Add to Cart", + 'label' => ts("Add to Cart"), 'path' => 'civicrm/event/add_to_cart', 'query' => "reset=1&id={$event_id}", ); diff --git a/civicrm/CRM/Event/Form/ManageEvent/Fee.php b/civicrm/CRM/Event/Form/ManageEvent/Fee.php index beaeb885bf..8b024d73e2 100644 --- a/civicrm/CRM/Event/Form/ManageEvent/Fee.php +++ b/civicrm/CRM/Event/Form/ManageEvent/Fee.php @@ -228,12 +228,12 @@ class CRM_Event_Form_ManageEvent_Fee extends CRM_Event_Form_ManageEvent { } $this->_showHide->addToTemplate(); $this->assign('inDate', $this->_inDate); - if (!empty($defaults['payment_processor'])) { - $defaults['payment_processor'] = str_replace(CRM_Core_DAO::VALUE_SEPARATOR, ',', + $defaults['payment_processor'] = array_fill_keys(explode(CRM_Core_DAO::VALUE_SEPARATOR, $defaults['payment_processor'] - ); + ), '1'); } + return $defaults; } @@ -255,15 +255,11 @@ class CRM_Event_Form_ManageEvent_Fee extends CRM_Event_Form_ManageEvent { $paymentProcessor = CRM_Core_PseudoConstant::paymentProcessor(); $this->assign('paymentProcessor', $paymentProcessor); - - $this->addEntityRef('payment_processor', ts('Payment Processor'), array( - 'entity' => 'PaymentProcessor', - 'multiple' => TRUE, - 'api' => array( - 'params' => array('domain_id' => CRM_Core_Config::domainID()), - ), - 'select' => array('minimumInputLength' => 0), - )); + $this->addCheckBox('payment_processor', ts('Payment Processor'), + array_flip($paymentProcessor), + NULL, NULL, NULL, NULL, + array(' ', ' ', ' ', '<br/>') + ); // financial type if (!CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus() || @@ -564,7 +560,7 @@ class CRM_Event_Form_ManageEvent_Fee extends CRM_Event_Form_ManageEvent { } if (!empty($params['payment_processor'])) { - $params['payment_processor'] = str_replace(',', CRM_Core_DAO::VALUE_SEPARATOR, $params['payment_processor']); + $params['payment_processor'] = implode(CRM_Core_DAO::VALUE_SEPARATOR, array_keys($params['payment_processor'])); } else { $params['payment_processor'] = 'null'; diff --git a/civicrm/CRM/Extension/Info.php b/civicrm/CRM/Extension/Info.php index 53aff153da..0f672d33bb 100644 --- a/civicrm/CRM/Extension/Info.php +++ b/civicrm/CRM/Extension/Info.php @@ -51,6 +51,12 @@ class CRM_Extension_Info { */ public $classloader = array(); + /** + * @var array + * Each item is they key-name of an extension required by this extension. + */ + public $requires = array(); + /** * Load extension info an XML file. * @@ -90,6 +96,27 @@ class CRM_Extension_Info { return $instance; } + /** + * Build a reverse-dependency map. + * + * @param array $infos + * The universe of available extensions. + * Ex: $infos['org.civicrm.foobar'] = new CRM_Extension_Info(). + * @return array + * If "org.civicrm.api" is required by "org.civicrm.foo", then return + * array('org.civicrm.api' => array(CRM_Extension_Info[org.civicrm.foo])). + * Array(string $key => array $requiredBys). + */ + public static function buildReverseMap($infos) { + $revMap = array(); + foreach ($infos as $info) { + foreach ($info->requires as $key) { + $revMap[$key][] = $info; + } + } + return $revMap; + } + /** * @param null $key * @param null $type @@ -141,6 +168,12 @@ class CRM_Extension_Info { ); } } + elseif ($attr === 'requires') { + $this->requires = array(); + foreach ($val->ext as $ext) { + $this->requires[] = (string) $ext; + } + } else { $this->$attr = CRM_Utils_XML::xmlObjToArray($val); } diff --git a/civicrm/CRM/Extension/Manager.php b/civicrm/CRM/Extension/Manager.php index 6ef8c6e55f..975c88b8e7 100644 --- a/civicrm/CRM/Extension/Manager.php +++ b/civicrm/CRM/Extension/Manager.php @@ -222,6 +222,11 @@ class CRM_Extension_Manager { $typeManager->onPreEnable($info); $this->_setExtensionActive($info, 1); $typeManager->onPostEnable($info); + + // A full refresh would be preferrable but very slow. This at least allows + // later extensions to access classes from earlier extensions. + $this->statuses = NULL; + $this->mapper->refresh(); break; case self::STATUS_UNINSTALLED: @@ -229,6 +234,11 @@ class CRM_Extension_Manager { $typeManager->onPreInstall($info); $this->_createExtensionEntry($info); $typeManager->onPostInstall($info); + + // A full refresh would be preferrable but very slow. This at least allows + // later extensions to access classes from earlier extensions. + $this->statuses = NULL; + $this->mapper->refresh(); break; case self::STATUS_UNKNOWN: @@ -292,6 +302,13 @@ class CRM_Extension_Manager { // TODO: to mitigate the risk of crashing during installation, scan // keys/statuses/types before doing anything + sort($keys); + $disableRequirements = $this->findDisableRequirements($keys); + sort($disableRequirements); // This munges order, but makes it comparable. + if ($keys !== $disableRequirements) { + throw new CRM_Extension_Exception_DependencyException("Cannot disable extension due dependencies. Consider disabling all these: " . implode(',', $disableRequirements)); + } + foreach ($keys as $key) { switch ($origStatuses[$key]) { case self::STATUS_INSTALLED: @@ -568,4 +585,96 @@ class CRM_Extension_Manager { } } + /** + * Build a list of extensions to install, in an order that will satisfy dependencies. + * + * @param array $keys + * List of extensions to install. + * @return array + * List of extension keys, including dependencies, in order of installation. + */ + public function findInstallRequirements($keys) { + $infos = $this->mapper->getAllInfos(); + $todoKeys = array_unique($keys); // array(string $key). + $doneKeys = array(); // array(string $key => 1); + $sorter = new \MJS\TopSort\Implementations\FixedArraySort(); + + while (!empty($todoKeys)) { + $key = array_shift($todoKeys); + if (isset($doneKeys[$key])) { + continue; + } + $doneKeys[$key] = 1; + + /** @var CRM_Extension_Info $info */ + $info = @$infos[$key]; + + if ($this->getStatus($key) === self::STATUS_INSTALLED) { + $sorter->add($key, array()); + } + elseif ($info && $info->requires) { + $sorter->add($key, $info->requires); + $todoKeys = array_merge($todoKeys, $info->requires); + } + else { + $sorter->add($key, array()); + } + } + return $sorter->sort(); + } + + /** + * Build a list of extensions to remove, in an order that will satisfy dependencies. + * + * @param array $keys + * List of extensions to install. + * @return array + * List of extension keys, including dependencies, in order of removal. + */ + public function findDisableRequirements($keys) { + $INSTALLED = array( + self::STATUS_INSTALLED, + self::STATUS_INSTALLED_MISSING, + ); + $installedInfos = $this->filterInfosByStatus($this->mapper->getAllInfos(), $INSTALLED); + $revMap = CRM_Extension_Info::buildReverseMap($installedInfos); + $todoKeys = array_unique($keys); + $doneKeys = array(); + $sorter = new \MJS\TopSort\Implementations\FixedArraySort(); + + while (!empty($todoKeys)) { + $key = array_shift($todoKeys); + if (isset($doneKeys[$key])) { + continue; + } + $doneKeys[$key] = 1; + + if (isset($revMap[$key])) { + $requiredBys = CRM_Utils_Array::collect('key', + $this->filterInfosByStatus($revMap[$key], $INSTALLED)); + $sorter->add($key, $requiredBys); + $todoKeys = array_merge($todoKeys, $requiredBys); + } + else { + $sorter->add($key, array()); + } + } + return $sorter->sort(); + } + + /** + * @param $infos + * @param $filterStatuses + * @return array + */ + protected function filterInfosByStatus($infos, $filterStatuses) { + $matches = array(); + foreach ($infos as $k => $v) { + if (in_array($this->getStatus($v->key), $filterStatuses)) { + $matches[$k] = $v; + } + } + return $matches; + } + } diff --git a/civicrm/CRM/Extension/Mapper.php b/civicrm/CRM/Extension/Mapper.php index de31e82d91..12f624529b 100644 --- a/civicrm/CRM/Extension/Mapper.php +++ b/civicrm/CRM/Extension/Mapper.php @@ -340,6 +340,54 @@ class CRM_Extension_Mapper { return $urls; } + /** + * Get a list of extension keys, filtered by the corresponding file path. + * + * @param string $pattern + * A file path. To search subdirectories, append "*". + * Ex: "/var/www/extensions/*" + * Ex: "/var/www/extensions/org.foo.bar" + * @return array + * Array(string $key). + * Ex: array("org.foo.bar"). + */ + public function getKeysByPath($pattern) { + $keys = array(); + + if (CRM_Utils_String::endsWith($pattern, '*')) { + $prefix = rtrim($pattern, '*'); + foreach ($this->container->getKeys() as $key) { + $path = CRM_Utils_File::addTrailingSlash($this->container->getPath($key)); + if (realpath($prefix) == realpath($path) || CRM_Utils_File::isChildPath($prefix, $path)) { + $keys[] = $key; + } + } + } + else { + foreach ($this->container->getKeys() as $key) { + $path = CRM_Utils_File::addTrailingSlash($this->container->getPath($key)); + if (realpath($pattern) == realpath($path)) { + $keys[] = $key; + } + } + } + + return $keys; + } + + /** + * @return array + * Ex: $result['org.civicrm.foobar'] = new CRM_Extension_Info(...). + * @throws \CRM_Extension_Exception + * @throws \Exception + */ + public function getAllInfos() { + foreach ($this->container->getKeys() as $key) { + $this->keyToInfo($key); + } + return $this->infos; + } + /** * @param string $name * diff --git a/civicrm/CRM/Mailing/BAO/Mailing.php b/civicrm/CRM/Mailing/BAO/Mailing.php index 766da13306..fb5b8f13e0 100644 --- a/civicrm/CRM/Mailing/BAO/Mailing.php +++ b/civicrm/CRM/Mailing/BAO/Mailing.php @@ -1739,7 +1739,6 @@ ORDER BY civicrm_email.is_bulkmail DESC CRM_Contact_BAO_Contact_Utils::generateChecksum($mailing->id, NULL, NULL, NULL, 'mailing', 16); $groupTableName = CRM_Contact_BAO_Group::getTableName(); - $mailingTableName = CRM_Mailing_BAO_Mailing::getTableName(); /* Create the mailing group record */ $mg = new CRM_Mailing_DAO_MailingGroup(); @@ -1767,7 +1766,7 @@ ORDER BY civicrm_email.is_bulkmail DESC CRM_Core_BAO_File::processAttachment($params, 'civicrm_mailing', $mailing->id); // If we're going to autosend, then check validity before saving. - if (!empty($params['scheduled_date']) && $params['scheduled_date'] != 'null' && !empty($params['_evil_bao_validator_'])) { + if (empty($params['is_completed']) && !empty($params['scheduled_date']) && $params['scheduled_date'] != 'null' && !empty($params['_evil_bao_validator_'])) { $cb = Civi\Core\Resolver::singleton()->get($params['_evil_bao_validator_']); $errors = call_user_func($cb, $mailing); if (!empty($errors)) { @@ -1783,7 +1782,9 @@ ORDER BY civicrm_email.is_bulkmail DESC if (!empty($params['scheduled_date']) && $params['scheduled_date'] != 'null' && empty($params['_skip_evil_bao_auto_schedule_'])) { $job = new CRM_Mailing_BAO_MailingJob(); $job->mailing_id = $mailing->id; - $job->status = 'Scheduled'; + // If we are creating a new Completed mailing (e.g. import from another system) set the job to completed. + // Keeping former behaviour when an id is present is precautionary and may warrant reconsideration later. + $job->status = ((empty($params['is_completed']) || !empty($params['id'])) ? 'Scheduled' : 'Complete'); $job->is_test = 0; if (!$job->find(TRUE)) { @@ -2231,7 +2232,8 @@ ORDER BY civicrm_email.is_bulkmail DESC ON {$t['queue']}.job_id = {$t['job']}.id WHERE {$t['url']}.mailing_id = $mailing_id AND {$t['job']}.is_test = 0 - GROUP BY {$t['url']}.id"); + GROUP BY {$t['url']}.id + ORDER BY unique_clicks DESC"); $report['click_through'] = array(); @@ -2915,9 +2917,9 @@ WHERE civicrm_mailing_job.id = %1 $config = CRM_Core_Config::singleton(); if ($mode == NULL && CRM_Core_BAO_MailSettings::defaultDomain() == "EXAMPLE.ORG") { - throw new CRM_Core_Exception(ts('The <a href="%1">default mailbox</a> has not been configured. You will find <a href="%2">more info in the online user and administrator guide</a>', array( + throw new CRM_Core_Exception(ts('The <a href="%1">default mailbox</a> has not been configured. You will find <a href="%2">more info in the online system administrator guide</a>', array( 1 => CRM_Utils_System::url('civicrm/admin/mailSettings', 'reset=1'), - 2 => "http://book.civicrm.org/user/advanced-configuration/email-system-configuration/", + 2 => "https://docs.civicrm.org/sysadmin/en/latest/setup/civimail/", ))); } diff --git a/civicrm/CRM/Mailing/Event/BAO/Opened.php b/civicrm/CRM/Mailing/Event/BAO/Opened.php index 11b99fadd5..a1f63b4ec8 100644 --- a/civicrm/CRM/Mailing/Event/BAO/Opened.php +++ b/civicrm/CRM/Mailing/Event/BAO/Opened.php @@ -283,7 +283,10 @@ class CRM_Mailing_Event_BAO_Opened extends CRM_Mailing_Event_DAO_Opened { $query .= $groupBy; - $orderBy = "sort_name ASC, {$open}.time_stamp DESC"; + $orderBy = "sort_name ASC"; + if (!$is_distinct) { + $orderBy .= ", {$open}.time_stamp DESC"; + } if ($sort) { if (is_string($sort)) { $sort = CRM_Utils_Type::escape($sort, 'String'); diff --git a/civicrm/CRM/Mailing/Info.php b/civicrm/CRM/Mailing/Info.php index 59ec9e1235..50e3f07bbf 100644 --- a/civicrm/CRM/Mailing/Info.php +++ b/civicrm/CRM/Mailing/Info.php @@ -79,7 +79,9 @@ class CRM_Mailing_Info extends CRM_Core_Component_Info { $result = civicrm_api3('ReportInstance', 'get', array( 'sequential' => 1, 'report_id' => 'mailing/' . $report)); - $reportIds[$report] = $result['values'][0]['id']; + if (!empty($result['values'])) { + $reportIds[$report] = $result['values'][0]['id']; + } } $result = array(); $result['crmMailing'] = include "$civicrm_root/ang/crmMailing.ang.php"; diff --git a/civicrm/CRM/Member/BAO/Query.php b/civicrm/CRM/Member/BAO/Query.php index 79d9b7b395..b2993e379a 100644 --- a/civicrm/CRM/Member/BAO/Query.php +++ b/civicrm/CRM/Member/BAO/Query.php @@ -171,18 +171,22 @@ class CRM_Member_BAO_Query extends CRM_Core_BAO_Query { ); return; + case 'membership_start_date': case 'member_start_date_low': case 'member_start_date_high': + $fldName = str_replace(array('_low', '_high'), '', $name); $query->dateQueryBuilder($values, - 'civicrm_membership', 'member_start_date', 'start_date', + 'civicrm_membership', $fldName, 'start_date', 'Start Date' ); return; + case 'membership_end_date': case 'member_end_date_low': case 'member_end_date_high': + $fldName = str_replace(array('_low', '_high'), '', $name); $query->dateQueryBuilder($values, - 'civicrm_membership', 'member_end_date', 'end_date', + 'civicrm_membership', $fldName, 'end_date', 'End Date' ); return; diff --git a/civicrm/CRM/Member/DAO/MembershipType.php b/civicrm/CRM/Member/DAO/MembershipType.php index b0e32cc43b..3077ceba0f 100644 --- a/civicrm/CRM/Member/DAO/MembershipType.php +++ b/civicrm/CRM/Member/DAO/MembershipType.php @@ -30,7 +30,7 @@ * * Generated from xml/schema/CRM/Member/MembershipType.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:22af2c3f87df3ad7cf2002c145f53cc6) + * (GenCodeChecksum:c86019d4817d79e1dd59d69eaa2a3eb6) */ require_once 'CRM/Core/DAO.php'; require_once 'CRM/Utils/Type.php'; @@ -299,8 +299,8 @@ class CRM_Member_DAO_MembershipType extends CRM_Core_DAO { 'title' => ts('membership Type Minimum Fee') , 'description' => 'Minimum fee for this membership (0 for free/complimentary memberships).', 'precision' => array( - 20, - 2 + 18, + 9 ) , 'table_name' => 'civicrm_membership_type', 'entity' => 'MembershipType', diff --git a/civicrm/CRM/Member/Form/Membership.php b/civicrm/CRM/Member/Form/Membership.php index e6f5c984ee..acb14746d6 100644 --- a/civicrm/CRM/Member/Form/Membership.php +++ b/civicrm/CRM/Member/Form/Membership.php @@ -1201,20 +1201,9 @@ class CRM_Member_Form_Membership extends CRM_Member_Form { 'start_date' => 'startDate', 'end_date' => 'endDate', ); - $dateModified = FALSE; foreach ($dateTypes as $dateField => $dateVariable) { - if (!empty($params['id'])) { - $membershipDate = CRM_Core_DAO::getFieldValue('CRM_Member_DAO_Membership', $params['id'], $dateField, 'id'); - if ($membershipDate != date('Y-m-d', strtotime($formValues[$dateField]))) { - $dateModified = TRUE; - } - } $$dateVariable = CRM_Utils_Date::processDate($formValues[$dateField]); } - //skip status calculation on update if none of the dates are modified. - if (!empty($params['id']) && empty($params['is_override']) && !$dateModified) { - $params['skipStatusCal'] = TRUE; - } $memTypeNumTerms = empty($termsByType) ? CRM_Utils_Array::value('num_terms', $formValues) : NULL; diff --git a/civicrm/CRM/Pledge/BAO/Query.php b/civicrm/CRM/Pledge/BAO/Query.php index 9cf75496aa..dc4965ab27 100644 --- a/civicrm/CRM/Pledge/BAO/Query.php +++ b/civicrm/CRM/Pledge/BAO/Query.php @@ -63,6 +63,18 @@ class CRM_Pledge_BAO_Query extends CRM_Core_BAO_Query { $query->_tables['civicrm_pledge'] = $query->_whereTables['civicrm_pledge'] = 1; } + if (!empty($query->_returnProperties['pledge_original_installment_amount'])) { + $query->_select['pledge_original_installment_amount'] = 'civicrm_pledge.original_installment_amount as pledge_original_installment_amount'; + $query->_element['pledge_original_installment_amount'] = 1; + $query->_tables['civicrm_pledge'] = $query->_whereTables['civicrm_pledge'] = 1; + } + + if (!empty($query->_returnProperties['installments'])) { + $query->_select['installments'] = 'civicrm_pledge.installments as installments'; + $query->_element['installments'] = 1; + $query->_tables['civicrm_pledge'] = $query->_whereTables['civicrm_pledge'] = 1; + } + if (!empty($query->_returnProperties['pledge_create_date'])) { $query->_select['pledge_create_date'] = 'civicrm_pledge.create_date as pledge_create_date'; $query->_element['pledge_create_date'] = 1; diff --git a/civicrm/CRM/Pledge/DAO/Pledge.php b/civicrm/CRM/Pledge/DAO/Pledge.php index cda4ed3aa6..d63802f49b 100644 --- a/civicrm/CRM/Pledge/DAO/Pledge.php +++ b/civicrm/CRM/Pledge/DAO/Pledge.php @@ -30,7 +30,7 @@ * * Generated from xml/schema/CRM/Pledge/Pledge.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:02d420c23b3c72fc2687cd857cc7d178) + * (GenCodeChecksum:0e2129564a1877226e6dfce2840ce831) */ require_once 'CRM/Core/DAO.php'; require_once 'CRM/Utils/Type.php'; @@ -318,6 +318,10 @@ class CRM_Pledge_DAO_Pledge extends CRM_Core_DAO { 20, 2 ) , + 'export' => true, + 'where' => 'civicrm_pledge.original_installment_amount', + 'headerPattern' => '', + 'dataPattern' => '', 'table_name' => 'civicrm_pledge', 'entity' => 'Pledge', 'bao' => 'CRM_Pledge_BAO_Pledge', @@ -404,6 +408,10 @@ class CRM_Pledge_DAO_Pledge extends CRM_Core_DAO { 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Pledge Number of Installments') , 'description' => 'Total number of payments to be made.', + 'export' => true, + 'where' => 'civicrm_pledge.installments', + 'headerPattern' => '', + 'dataPattern' => '', 'default' => '1', 'table_name' => 'civicrm_pledge', 'entity' => 'Pledge', diff --git a/civicrm/CRM/Price/BAO/LineItem.php b/civicrm/CRM/Price/BAO/LineItem.php index 2b782e48f8..505642d602 100644 --- a/civicrm/CRM/Price/BAO/LineItem.php +++ b/civicrm/CRM/Price/BAO/LineItem.php @@ -70,6 +70,8 @@ class CRM_Price_BAO_LineItem extends CRM_Price_DAO_LineItem { // unset entity table and entity id in $params // we never update the entity table and entity id during update mode if ($id) { + $entity_id = CRM_Utils_Array::value('entity_id', $params); + $entity_table = CRM_Utils_Array::value('entity_table', $params); unset($params['entity_id'], $params['entity_table']); } else { @@ -102,6 +104,9 @@ class CRM_Price_BAO_LineItem extends CRM_Price_DAO_LineItem { } if ($id) { + // CRM-21281: Restore entity reference in case the post hook needs it + $lineItemBAO->entity_id = $entity_id; + $lineItemBAO->entity_table = $entity_table; CRM_Utils_Hook::post('edit', 'LineItem', $id, $lineItemBAO); } else { diff --git a/civicrm/CRM/Price/DAO/PriceFieldValue.php b/civicrm/CRM/Price/DAO/PriceFieldValue.php index f9de529cfa..fb0465b855 100644 --- a/civicrm/CRM/Price/DAO/PriceFieldValue.php +++ b/civicrm/CRM/Price/DAO/PriceFieldValue.php @@ -30,7 +30,7 @@ * * Generated from xml/schema/CRM/Price/PriceFieldValue.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:d5b9853fb1321ad9872ce5b11a582d81) + * (GenCodeChecksum:fed218269d1baab495490130b4e2442a) */ require_once 'CRM/Core/DAO.php'; require_once 'CRM/Utils/Type.php'; @@ -95,7 +95,7 @@ class CRM_Price_DAO_PriceFieldValue extends CRM_Core_DAO { /** * Price field option amount * - * @var string + * @var float */ public $amount; /** @@ -292,12 +292,14 @@ class CRM_Price_DAO_PriceFieldValue extends CRM_Core_DAO { ) , 'amount' => array( 'name' => 'amount', - 'type' => CRM_Utils_Type::T_STRING, + 'type' => CRM_Utils_Type::T_MONEY, 'title' => ts('Amount') , 'description' => 'Price field option amount', 'required' => true, - 'maxlength' => 512, - 'size' => 8, + 'precision' => array( + 18, + 9 + ) , 'table_name' => 'civicrm_price_field_value', 'entity' => 'PriceFieldValue', 'bao' => 'CRM_Price_BAO_PriceFieldValue', diff --git a/civicrm/CRM/Profile/Form/Edit.php b/civicrm/CRM/Profile/Form/Edit.php index ac84a3fc93..07a1c225b4 100644 --- a/civicrm/CRM/Profile/Form/Edit.php +++ b/civicrm/CRM/Profile/Form/Edit.php @@ -220,9 +220,11 @@ SELECT module,is_reserved $this->assign('cancelURL', $this->_cancelURL); + $cancelButtonValue = !empty($this->_ufGroup['cancel_button_text']) ? $this->_ufGroup['cancel_button_text'] : ts('Cancel'); + $this->assign('cancelButtonText', $cancelButtonValue); + if (($this->_multiRecord & CRM_Core_Action::DELETE) && $this->_recordExists) { $this->_deleteButtonName = $this->getButtonName('upload', 'delete'); - $this->addElement('submit', $this->_deleteButtonName, ts('Delete')); return; @@ -241,7 +243,7 @@ SELECT module,is_reserved $buttons[] = array( 'type' => $buttonName, - 'name' => ts('Save'), + 'name' => !empty($this->_ufGroup['submit_button_text']) ? $this->_ufGroup['submit_button_text'] : ts('Save'), 'isDefault' => TRUE, ); diff --git a/civicrm/CRM/Report/Form.php b/civicrm/CRM/Report/Form.php index 9149554ba9..c96d63ba0f 100644 --- a/civicrm/CRM/Report/Form.php +++ b/civicrm/CRM/Report/Form.php @@ -3051,7 +3051,7 @@ WHERE cg.extends IN ('" . implode("','", $this->_customGroupExtends) . "') AND $value = CRM_Utils_Array::value($op, $pair) . " " . $val; } } - if ($value) { + if ($value && empty($field['no_display'])) { $statistics['filters'][] = array( 'title' => CRM_Utils_Array::value('title', $field), 'value' => $value, @@ -4551,6 +4551,11 @@ LEFT JOIN civicrm_contact {$field['alias']} ON {$field['alias']}.id = {$this->_a 'preferred_language' => array( 'title' => ts('Preferred Language'), ), + 'is_deleted' => array( + 'no_display' => TRUE, + 'default' => 0, + 'type' => CRM_Utils_Type::T_BOOLEAN, + ), ); } diff --git a/civicrm/CRM/Report/Form/Contribute/HouseholdSummary.php b/civicrm/CRM/Report/Form/Contribute/HouseholdSummary.php index 43135d64e3..1c82dbc92c 100644 --- a/civicrm/CRM/Report/Form/Contribute/HouseholdSummary.php +++ b/civicrm/CRM/Report/Form/Contribute/HouseholdSummary.php @@ -138,6 +138,9 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form { 'required' => TRUE, 'no_display' => TRUE, ), + 'financial_type_id' => array( + 'title' => ts('Financial Type'), + ), 'trxn_id' => NULL, 'receive_date' => array('default' => TRUE), 'receipt_date' => NULL, @@ -158,6 +161,11 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form { 'options' => CRM_Contribute_PseudoConstant::contributionStatus(), 'default' => array(1), ), + 'financial_type_id' => array( + 'title' => ts('Financial Type'), + 'operatorType' => CRM_Report_Form::OP_MULTISELECT, + 'options' => CRM_Contribute_PseudoConstant::financialType(), + ), ), 'grouping' => 'contri-fields', ), @@ -526,6 +534,12 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form { } } + if (array_key_exists('civicrm_contribution_financial_type_id', $row)) { + if ($value = $row['civicrm_contribution_financial_type_id']) { + $rows[$rowNum]['civicrm_contribution_financial_type_id'] = CRM_Contribute_PseudoConstant::financialType($value); + } + } + // handle state province if (array_key_exists('civicrm_address_state_province_id', $row)) { if ($value = $row['civicrm_address_state_province_id']) { diff --git a/civicrm/CRM/Report/Form/Event/ParticipantListing.php b/civicrm/CRM/Report/Form/Event/ParticipantListing.php index 4a650cc4de..a9ded26d42 100644 --- a/civicrm/CRM/Report/Form/Event/ParticipantListing.php +++ b/civicrm/CRM/Report/Form/Event/ParticipantListing.php @@ -115,27 +115,7 @@ class CRM_Report_Form_Event_ParticipantListing extends CRM_Report_Form_Event { 'title' => ts('Contact Subtype'), ), ), - 'filters' => array( - 'sort_name' => array( - 'title' => ts('Participant Name'), - 'operator' => 'like', - ), - 'gender_id' => array( - 'title' => ts('Gender'), - 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'options' => CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'gender_id'), - ), - 'birth_date' => array( - 'title' => ts('Birth Date'), - 'operatorType' => CRM_Report_Form::OP_DATE, - ), - 'contact_type' => array( - 'title' => ts('Contact Type'), - ), - 'contact_sub_type' => array( - 'title' => ts('Contact Subtype'), - ), - ), + 'filters' => CRM_Report_Form::getBasicContactFilters(), ), 'civicrm_email' => array( 'dao' => 'CRM_Core_DAO_Email', diff --git a/civicrm/CRM/Report/Form/Mailing/Summary.php b/civicrm/CRM/Report/Form/Mailing/Summary.php index c5373ed425..91f97eb8ce 100644 --- a/civicrm/CRM/Report/Form/Mailing/Summary.php +++ b/civicrm/CRM/Report/Form/Mailing/Summary.php @@ -149,11 +149,13 @@ class CRM_Report_Form_Mailing_Summary extends CRM_Report_Form { 'order_bys' => array( 'start_date' => array( 'title' => ts('Start Date'), + 'dbAlias' => 'MIN(mailing_job_civireport.start_date)', ), 'end_date' => array( 'title' => ts('End Date'), 'default_weight' => '1', 'default_order' => 'DESC', + 'dbAlias' => 'MAX(mailing_job_civireport.end_date)', ), ), 'grouping' => 'mailing-fields', @@ -500,10 +502,6 @@ class CRM_Report_Form_Mailing_Summary extends CRM_Report_Form { else { $this->_where = "WHERE " . implode(' AND ', $clauses); } - - // if ( $this->_aclWhere ) { - // $this->_where .= " AND {$this->_aclWhere} "; - // } } public function groupBy() { @@ -513,6 +511,11 @@ class CRM_Report_Form_Mailing_Summary extends CRM_Report_Form { $this->_groupBy = CRM_Contact_BAO_Query::getGroupByFromSelectColumns($this->_selectClauses, $groupBy); } + public function orderBy() { + parent::orderBy(); + CRM_Contact_BAO_Query::getGroupByFromOrderBy($this->_groupBy, $this->_orderByArray); + } + public function postProcess() { $this->beginPostProcess(); diff --git a/civicrm/CRM/UF/Form/AdvanceSetting.php b/civicrm/CRM/UF/Form/AdvanceSetting.php index 28a6c62d30..818896e476 100644 --- a/civicrm/CRM/UF/Form/AdvanceSetting.php +++ b/civicrm/CRM/UF/Form/AdvanceSetting.php @@ -51,6 +51,8 @@ class CRM_UF_Form_AdvanceSetting extends CRM_UF_Form_Group { // we do not have any url checks to allow relative urls $form->addElement('text', 'post_URL', ts('Redirect URL'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_UFGroup', 'post_URL')); $form->addElement('text', 'cancel_URL', ts('Cancel Redirect URL'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_UFGroup', 'cancel_URL')); + $form->addElement('text', 'cancel_button_text', ts('Cancel Button Text'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_UFGroup', 'cancel_button_text')); + $form->addElement('text', 'submit_button_text', ts('Submit Button Text'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_UFGroup', 'submit_button_text')); // add select for groups $group = array('' => ts('- select -')) + $form->_group; diff --git a/civicrm/CRM/Upgrade/Incremental/php/FourSeven.php b/civicrm/CRM/Upgrade/Incremental/php/FourSeven.php index d51e716e5d..63e9dc6334 100644 --- a/civicrm/CRM/Upgrade/Incremental/php/FourSeven.php +++ b/civicrm/CRM/Upgrade/Incremental/php/FourSeven.php @@ -458,6 +458,32 @@ class CRM_Upgrade_Incremental_php_FourSeven extends CRM_Upgrade_Incremental_Base $this->addTask('Remove broken Contribution_logging reports', 'removeContributionLoggingReports'); } + /** + * Upgrade function. + * + * @param string $rev + */ + public function upgrade_4_7_28($rev) { + $this->addTask(ts('Upgrade DB to %1: SQL', array(1 => $rev)), 'runSql', $rev); + $this->addTask('CRM-20572: Fix date fields in save search criteria of Contrib Sybunt custom search ', 'fixDateFieldsInSmartGroups'); + // CRM-20868 : Update invoice_numbers (in batch) with value in [invoice prefix][contribution id] format + if ($invoicePrefix = CRM_Contribute_BAO_Contribution::checkContributeSettings('invoice_prefix', TRUE)) { + list($minId, $maxId) = CRM_Core_DAO::executeQuery("SELECT coalesce(min(id),0), coalesce(max(id),0) + FROM civicrm_contribution ")->getDatabaseResult()->fetchRow(); + for ($startId = $minId; $startId <= $maxId; $startId += self::BATCH_SIZE) { + $endId = $startId + self::BATCH_SIZE - 1; + $title = ts("Upgrade DB to %1: Update Contribution Invoice number (%2 => %3)", array( + 1 => $rev, + 2 => $startId, + 3 => $endId, + )); + $this->addTask($title, 'updateContributionInvoiceNumber', $startId, $endId, $invoicePrefix); + } + } + + $this->addTask('Rebuild Multilingual Schema', 'rebuildMultilingalSchema'); + } + /* * Important! All upgrade functions MUST add a 'runSql' task. * Uncomment and use the following template for a new upgrade version @@ -591,6 +617,27 @@ class CRM_Upgrade_Incremental_php_FourSeven extends CRM_Upgrade_Incremental_Base return $settings; } + /** + * Update Invoice number for all completed contribution. + * + * @param \CRM_Queue_TaskContext $ctx + * + * @return bool + */ + public static function updateContributionInvoiceNumber(CRM_Queue_TaskContext $ctx, $startID, $endID, $invoicePrefix) { + CRM_Core_DAO::executeQuery(" + UPDATE `civicrm_contribution` SET `invoice_number` = CONCAT(%1, `id`) + WHERE `id` >= %2 AND `id` <= %3 AND `invoice_number` IS NOT NULL", + array( + 1 => array($invoicePrefix, 'String'), + 2 => array($startID, 'Integer'), + 3 => array($endID, 'Integer'), + ) + ); + + return TRUE; + } + /** * Add Getting Started dashlet to dashboard * @@ -1311,6 +1358,23 @@ FROM `civicrm_dashboard_contact` JOIN `civicrm_contact` WHERE civicrm_dashboard_ return $config->imageUploadDir && $config->imageUploadURL && $check->isDirAccessible($config->imageUploadDir, $config->imageUploadURL); } + /** + * CRM-20572 - Format date fields in Contrib Sybunt custom search's saved criteria. + * + * @param \CRM_Queue_TaskContext $ctx + * + * @return bool + */ + public static function fixDateFieldsInSmartGroups(CRM_Queue_TaskContext $ctx) { + $dao = CRM_Core_DAO::executeQuery("SELECT id, form_values FROM civicrm_saved_search WHERE form_values LIKE '%CRM_Contact_Form_Search_Custom_ContribSYBNT%'"); + while ($dao->fetch()) { + $formValues = unserialize($dao->form_values); + CRM_Contact_Form_Search_Custom_ContribSYBNT::formatSavedSearchFields($formValues); + CRM_Core_DAO::executeQuery("UPDATE civicrm_saved_search SET form_values = %1 WHERE id = {$dao->id}", array(1 => array(serialize($formValues), 'String'))); + } + return TRUE; + } + /** * CRM-20892 Convert default of created_date in civicrm_mailing table to NULL * @return bool diff --git a/civicrm/CRM/Upgrade/Incremental/php/FourThree.php b/civicrm/CRM/Upgrade/Incremental/php/FourThree.php index cc3b298447..71442572e4 100644 --- a/civicrm/CRM/Upgrade/Incremental/php/FourThree.php +++ b/civicrm/CRM/Upgrade/Incremental/php/FourThree.php @@ -762,7 +762,7 @@ INSERT INTO civicrm_financial_trxn (contribution_id, payment_instrument_id, currency, total_amount, net_amount, fee_amount, trxn_id, status_id, check_number, to_financial_account_id, from_financial_account_id, trxn_date, payment_processor_id, is_fee) -SELECT con.id, ft.payment_instrument_id, ft.currency, ft.fee_amount, NULL, NULL, ft.trxn_id, %1 as status_id, +SELECT DISTINCT con.id, ft.payment_instrument_id, ft.currency, ft.fee_amount, NULL, NULL, ft.trxn_id, %1 as status_id, ft.check_number, efaFT.financial_account_id as to_financial_account_id, CASE WHEN efaPP.financial_account_id IS NOT NULL THEN efaPP.financial_account_id @@ -782,8 +782,7 @@ FROM civicrm_contribution con AND efaPP.account_relationship = {$assetAccountIs}) LEFT JOIN {$tempTableName1} tpi ON ft.payment_instrument_id = tpi.instrument_id -WHERE ft.fee_amount IS NOT NULL AND ft.fee_amount != 0 AND (con.contribution_status_id IN (%1, %3) OR (con.contribution_status_id =%2 AND con.is_pay_later = 1)) -GROUP BY con.id"; +WHERE ft.fee_amount IS NOT NULL AND ft.fee_amount != 0 AND (con.contribution_status_id IN (%1, %3) OR (con.contribution_status_id =%2 AND con.is_pay_later = 1))"; CRM_Core_DAO::executeQuery($sql, $queryParams); //link financial_trxn to contribution diff --git a/civicrm/CRM/Upgrade/Incremental/php/FourTwo.php b/civicrm/CRM/Upgrade/Incremental/php/FourTwo.php index 47a3a0994d..f047bb29fa 100644 --- a/civicrm/CRM/Upgrade/Incremental/php/FourTwo.php +++ b/civicrm/CRM/Upgrade/Incremental/php/FourTwo.php @@ -613,7 +613,7 @@ LEFT JOIN civicrm_participant_payment cpp ON cc.id = cpp.contribution_id LEFT JOIN civicrm_price_set_entity cpse on cpse.entity_table = 'civicrm_contribution_page' AND cpse.entity_id = cc.contribution_page_id WHERE (cc.id BETWEEN %1 AND %2) AND cli.entity_id IS NULL AND cc.contribution_page_id IS NOT NULL AND cpp.contribution_id IS NULL -GROUP BY cc.id +GROUP BY cc.id, cmp.membership_id "; $result = CRM_Core_DAO::executeQuery($sql, $sqlParams); diff --git a/civicrm/CRM/Upgrade/Incremental/sql/4.7.28.mysql.tpl b/civicrm/CRM/Upgrade/Incremental/sql/4.7.28.mysql.tpl new file mode 100644 index 0000000000..f4024bcb75 --- /dev/null +++ b/civicrm/CRM/Upgrade/Incremental/sql/4.7.28.mysql.tpl @@ -0,0 +1,55 @@ +{* file to handle db changes in 4.7.27 during upgrade *} + +-- CRM-21268 Missing French overseas departments. + INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES + (NULL, 1076, "WF", "Wallis-et-Futuna"), + (NULL, 1076, "NC", "Nouvelle-Calédonie"), + +-- CRM-21283 Add in missing parishes and regions of Barbados and Antigua and Barbuda + (NULL, 1009, "03", "Saint George"), + (NULL, 1009, "04", "Saint John"), + (NULL, 1009, "05", "Saint Mary"), + (NULL, 1009, "06", "Saint Paul"), + (NULL, 1009, "07", "Saint Peter"), + (NULL, 1009, "08", "Saint Philip"), + (NULL, 1009, "10", "Barbuda"), + (NULL, 1009, "11", "Redonda"), + (NULL, 1018, "01", "Christ Church"), + (NULL, 1018, "02", "Saint Andrew"), + (NULL, 1018, "03", "Saint George"), + (NULL, 1018, "04", "Saint James"), + (NULL, 1018, "05", "Saint John"), + (NULL, 1018, "06", "Saint Joseph"), + (NULL, 1018, "07", "Saint Lucy"), + (NULL, 1018, "08", "Saint Michael"), + (NULL, 1018, "09", "Saint Peter"), + (NULL, 1018, "10", "Saint Philip"), + (NULL, 1018, "11", "Saint Thomas"); + +-- CRM-21337 ISO compliance for Romanian and Bulgarian counties +UPDATE `civicrm_state_province` SET `name` = 'ArgeÈ™' WHERE `name` = 'Arges' AND `country_id` = 1176; +UPDATE `civicrm_state_province` SET `name` = 'Bacău' WHERE `name` = 'Bacau' AND `country_id` = 1176; +UPDATE `civicrm_state_province` SET `name` = 'BistriÈ›a-Năsăud' WHERE `name` = 'Bistrita-Nasaud' AND `country_id` = 1176; +UPDATE `civicrm_state_province` SET `name` = 'BotoÈ™ani' WHERE `name` = 'Boto\'ani' AND `country_id` = 1176; +UPDATE `civicrm_state_province` SET `name` = 'BraÈ™ov' WHERE `name` = 'Bra\'ov' AND `country_id` = 1176; +UPDATE `civicrm_state_province` SET `name` = 'Brăila' WHERE `name` = 'Braila' AND `country_id` = 1176; +UPDATE `civicrm_state_province` SET `name` = 'Buzău' WHERE `name` = 'Buzau' AND `country_id` = 1176; +UPDATE `civicrm_state_province` SET `name` = 'CaraÈ™-Severin' WHERE `name` = 'Caras-Severin' AND `country_id` = 1176; +UPDATE `civicrm_state_province` SET `name` = 'CălăraÈ™i' WHERE `name` = 'Ca la ras\'i' AND `country_id` = 1176; +UPDATE `civicrm_state_province` SET `name` = 'ConstanÈ›a' WHERE `name` = 'Constant\'a' AND `country_id` = 1176; +UPDATE `civicrm_state_province` SET `name` = 'DâmboviÈ›a' WHERE `name` = 'Dambovit\'a' AND `country_id` = 1176; +UPDATE `civicrm_state_province` SET `name` = 'GalaÈ›i' WHERE `name` = 'Galat\'i' AND `country_id` = 1176; +UPDATE `civicrm_state_province` SET `name` = 'IalomiÈ›a' WHERE `name` = 'Ialomit\'a' AND `country_id` = 1176; +UPDATE `civicrm_state_province` SET `name` = 'IaÈ™i' WHERE `name` = 'Ias\'i' AND `country_id` = 1176; +UPDATE `civicrm_state_province` SET `name` = 'MaramureÈ™' WHERE `name` = 'Maramures' AND `country_id` = 1176; +UPDATE `civicrm_state_province` SET `name` = 'MehedinÈ›i' WHERE `name` = 'Mehedint\'i' AND `country_id` = 1176; +UPDATE `civicrm_state_province` SET `name` = 'MureÈ™' WHERE `name` = 'Mures' AND `country_id` = 1176; +UPDATE `civicrm_state_province` SET `name` = 'NeamÈ›' WHERE `name` = 'Neamt' AND `country_id` = 1176; +UPDATE `civicrm_state_province` SET `name` = 'Sălaj' WHERE `name` = 'Sa laj' AND `country_id` = 1176; +UPDATE `civicrm_state_province` SET `name` = 'TimiÈ™' WHERE `name` = 'Timis' AND `country_id` = 1176; +UPDATE `civicrm_state_province` SET `name` = 'Vâlcea' WHERE `name` = 'Valcea' AND `country_id` = 1176; +UPDATE `civicrm_state_province` SET `name` = 'Pazardzhik' WHERE `name` = 'Pazardzik' AND `country_id` = 1033; + +-- CRM-20772 Price set calculation precision when sales tax enabled +ALTER TABLE `civicrm_membership_type` CHANGE `minimum_fee` `minimum_fee` DECIMAL(18,9) NULL DEFAULT '0.00' COMMENT 'Minimum fee for this membership (0 for free/complimentary memberships).'; +ALTER TABLE `civicrm_price_field_value` CHANGE `amount` `amount` DECIMAL(18,9) NOT NULL COMMENT 'Price field option amount'; diff --git a/civicrm/CRM/Utils/API/HTMLInputCoder.php b/civicrm/CRM/Utils/API/HTMLInputCoder.php index b826ed2607..297c72a5eb 100644 --- a/civicrm/CRM/Utils/API/HTMLInputCoder.php +++ b/civicrm/CRM/Utils/API/HTMLInputCoder.php @@ -109,6 +109,7 @@ class CRM_Utils_API_HTMLInputCoder extends CRM_Utils_API_AbstractFieldCoder { 'new', // The 'new' text in word replacements 'replyto_email', // e.g. '"Full Name" <user@example.org>' 'operator', + 'content', // CRM-20468 ); } return $this->skipFields; diff --git a/civicrm/CRM/Utils/Check/Component/Env.php b/civicrm/CRM/Utils/Check/Component/Env.php index 583e09409d..54b92ac6f7 100644 --- a/civicrm/CRM/Utils/Check/Component/Env.php +++ b/civicrm/CRM/Utils/Check/Component/Env.php @@ -883,4 +883,31 @@ class CRM_Utils_Check_Component_Env extends CRM_Utils_Check_Component { return $messages; } + /** + * Check that the resource URL points to the correct location. + * @return array + */ + public function checkResourceUrl() { + $messages = array(); + // Skip when run during unit tests, you can't check without a CMS. + if (CRM_Core_Config::singleton()->userFramework == 'UnitTests') { + return $messages; + } + // Does arrow.png exist where we expect it? + $arrowUrl = CRM_Core_Config::singleton()->userFrameworkResourceURL . 'packages/jquery/css/images/arrow.png'; + $headers = get_headers($arrowUrl); + $fileExists = stripos($headers[0], "200 OK") ? 1 : 0; + if (!$fileExists) { + $messages[] = new CRM_Utils_Check_Message( + __FUNCTION__, + ts('The Resource URL is not set correctly. Please set the <a href="%1">CiviCRM Resource URL</a>.', + array(1 => CRM_Utils_System::url('civicrm/admin/setting/url', 'reset=1'))), + ts('Incorrect Resource URL'), + \Psr\Log\LogLevel::ERROR, + 'fa-server' + ); + } + return $messages; + } + } diff --git a/civicrm/CRM/Utils/Check/Component/Timestamps.php b/civicrm/CRM/Utils/Check/Component/Timestamps.php index d7bc3c25a8..2f58fda64f 100644 --- a/civicrm/CRM/Utils/Check/Component/Timestamps.php +++ b/civicrm/CRM/Utils/Check/Component/Timestamps.php @@ -110,28 +110,28 @@ class CRM_Utils_Check_Component_Timestamps extends CRM_Utils_Check_Component { public static function getConvertedTimestamps() { return array( - array('table' => 'civicrm_cache', 'column' => 'created_date', 'changed' => '4.7.20', 'default' => 'CURRENT_TIMESTAMP', 'jira' => 'CRM-9683'), - array('table' => 'civicrm_cache', 'column' => 'expired_date', 'changed' => '4.7.20', 'jira' => 'CRM-9683'), - array('table' => 'civicrm_job', 'column' => 'last_run', 'changed' => '4.7.20', 'jira' => 'CRM-9683'), - array('table' => 'civicrm_mailing_event_bounce', 'column' => 'time_stamp', 'changed' => '4.7.20', 'default' => 'CURRENT_TIMESTAMP', 'jira' => 'CRM-9683'), - array('table' => 'civicrm_mailing_event_confirm', 'column' => 'time_stamp', 'changed' => '4.7.20', 'default' => 'CURRENT_TIMESTAMP', 'jira' => 'CRM-9683'), - array('table' => 'civicrm_mailing_event_delivered', 'column' => 'time_stamp', 'changed' => '4.7.20', 'default' => 'CURRENT_TIMESTAMP', 'jira' => 'CRM-9683'), - array('table' => 'civicrm_mailing_event_forward', 'column' => 'time_stamp', 'changed' => '4.7.20', 'default' => 'CURRENT_TIMESTAMP', 'jira' => 'CRM-9683'), - array('table' => 'civicrm_mailing_event_opened', 'column' => 'time_stamp', 'changed' => '4.7.20', 'default' => 'CURRENT_TIMESTAMP', 'jira' => 'CRM-9683'), - array('table' => 'civicrm_mailing_event_reply', 'column' => 'time_stamp', 'changed' => '4.7.20', 'default' => 'CURRENT_TIMESTAMP', 'jira' => 'CRM-9683'), - array('table' => 'civicrm_mailing_event_subscribe', 'column' => 'time_stamp', 'changed' => '4.7.20', 'default' => 'CURRENT_TIMESTAMP', 'jira' => 'CRM-9683'), - array('table' => 'civicrm_mailing_event_trackable_url_open', 'column' => 'time_stamp', 'changed' => '4.7.20', 'default' => 'CURRENT_TIMESTAMP', 'jira' => 'CRM-9683'), - array('table' => 'civicrm_mailing_event_unsubscribe', 'column' => 'time_stamp', 'changed' => '4.7.20', 'default' => 'CURRENT_TIMESTAMP', 'jira' => 'CRM-9683'), - array('table' => 'civicrm_mailing', 'column' => 'created_date', 'changed' => '4.7.20', 'default' => 'CURRENT_TIMESTAMP', 'jira' => 'CRM-9683'), - array('table' => 'civicrm_mailing', 'column' => 'scheduled_date', 'changed' => '4.7.20', 'jira' => 'CRM-9683'), - array('table' => 'civicrm_mailing', 'column' => 'approval_date', 'changed' => '4.7.20', 'jira' => 'CRM-9683'), - array('table' => 'civicrm_mailing_abtest', 'column' => 'created_date', 'changed' => '4.7.20', 'default' => 'CURRENT_TIMESTAMP', 'jira' => 'CRM-9683'), - array('table' => 'civicrm_mailing_job', 'column' => 'scheduled_date', 'changed' => '4.7.20', 'jira' => 'CRM-9683'), - array('table' => 'civicrm_mailing_job', 'column' => 'start_date', 'changed' => '4.7.20', 'jira' => 'CRM-9683'), - array('table' => 'civicrm_mailing_job', 'column' => 'end_date', 'changed' => '4.7.20', 'jira' => 'CRM-9683'), - array('table' => 'civicrm_mailing_spool', 'column' => 'added_at', 'changed' => '4.7.20', 'jira' => 'CRM-9683'), - array('table' => 'civicrm_mailing_spool', 'column' => 'removed_at', 'changed' => '4.7.20', 'jira' => 'CRM-9683'), - array('table' => 'civicrm_subscription_history', 'column' => 'date', 'changed' => '4.7.27', 'default' => 'CURRENT_TIMESTAMP', 'jira' => 'CRM-21157'), + array('table' => 'civicrm_cache', 'column' => 'created_date', 'changed' => '4.7.20', 'default' => 'CURRENT_TIMESTAMP', 'jira' => 'CRM-9683', 'comment' => 'When was the cache item created'), + array('table' => 'civicrm_cache', 'column' => 'expired_date', 'changed' => '4.7.20', 'jira' => 'CRM-9683', 'comment' => 'When should the cache item expire'), + array('table' => 'civicrm_job', 'column' => 'last_run', 'changed' => '4.7.20', 'jira' => 'CRM-9683', 'comment' => 'When was this cron entry last run'), + array('table' => 'civicrm_mailing_event_bounce', 'column' => 'time_stamp', 'changed' => '4.7.20', 'default' => 'CURRENT_TIMESTAMP', 'jira' => 'CRM-9683', 'comment' => 'When this bounce event occurred.'), + array('table' => 'civicrm_mailing_event_confirm', 'column' => 'time_stamp', 'changed' => '4.7.20', 'default' => 'CURRENT_TIMESTAMP', 'jira' => 'CRM-9683', 'comment' => 'When this confirmation event occurred.'), + array('table' => 'civicrm_mailing_event_delivered', 'column' => 'time_stamp', 'changed' => '4.7.20', 'default' => 'CURRENT_TIMESTAMP', 'jira' => 'CRM-9683', 'comment' => 'When this delivery event occurred.'), + array('table' => 'civicrm_mailing_event_forward', 'column' => 'time_stamp', 'changed' => '4.7.20', 'default' => 'CURRENT_TIMESTAMP', 'jira' => 'CRM-9683', 'comment' => 'When this forward event occurred.'), + array('table' => 'civicrm_mailing_event_opened', 'column' => 'time_stamp', 'changed' => '4.7.20', 'default' => 'CURRENT_TIMESTAMP', 'jira' => 'CRM-9683', 'comment' => 'When this open event occurred.'), + array('table' => 'civicrm_mailing_event_reply', 'column' => 'time_stamp', 'changed' => '4.7.20', 'default' => 'CURRENT_TIMESTAMP', 'jira' => 'CRM-9683', 'comment' => 'When this reply event occurred.'), + array('table' => 'civicrm_mailing_event_subscribe', 'column' => 'time_stamp', 'changed' => '4.7.20', 'default' => 'CURRENT_TIMESTAMP', 'jira' => 'CRM-9683', 'comment' => 'When this subscription event occurred.'), + array('table' => 'civicrm_mailing_event_trackable_url_open', 'column' => 'time_stamp', 'changed' => '4.7.20', 'default' => 'CURRENT_TIMESTAMP', 'jira' => 'CRM-9683', 'comment' => 'When this trackable URL open occurred.'), + array('table' => 'civicrm_mailing_event_unsubscribe', 'column' => 'time_stamp', 'changed' => '4.7.20', 'default' => 'CURRENT_TIMESTAMP', 'jira' => 'CRM-9683', 'comment' => 'When this delivery event occurred.'), + array('table' => 'civicrm_mailing', 'column' => 'created_date', 'changed' => '4.7.20', 'jira' => 'CRM-9683', 'comment' => 'Date and time this mailing was created.'), + array('table' => 'civicrm_mailing', 'column' => 'scheduled_date', 'changed' => '4.7.20', 'jira' => 'CRM-9683', 'comment' => 'Date and time this mailing was scheduled.'), + array('table' => 'civicrm_mailing', 'column' => 'approval_date', 'changed' => '4.7.20', 'jira' => 'CRM-9683', 'comment' => 'Date and time this mailing was approved.'), + array('table' => 'civicrm_mailing_abtest', 'column' => 'created_date', 'changed' => '4.7.20', 'default' => 'CURRENT_TIMESTAMP', 'jira' => 'CRM-9683', 'comment' => 'When was this item created'), + array('table' => 'civicrm_mailing_job', 'column' => 'scheduled_date', 'changed' => '4.7.20', 'jira' => 'CRM-9683', 'comment' => 'date on which this job was scheduled.'), + array('table' => 'civicrm_mailing_job', 'column' => 'start_date', 'changed' => '4.7.20', 'jira' => 'CRM-9683', 'comment' => 'date on which this job was started.'), + array('table' => 'civicrm_mailing_job', 'column' => 'end_date', 'changed' => '4.7.20', 'jira' => 'CRM-9683', 'comment' => 'date on which this job ended.'), + array('table' => 'civicrm_mailing_spool', 'column' => 'added_at', 'changed' => '4.7.20', 'jira' => 'CRM-9683', 'comment' => 'date on which this job was added.'), + array('table' => 'civicrm_mailing_spool', 'column' => 'removed_at', 'changed' => '4.7.20', 'jira' => 'CRM-9683', 'comment' => 'date on which this job was removed.'), + array('table' => 'civicrm_subscription_history', 'column' => 'date', 'changed' => '4.7.27', 'default' => 'CURRENT_TIMESTAMP', 'jira' => 'CRM-21157', 'comment' => 'Date of the (un)subscription'), ); } diff --git a/civicrm/CRM/Utils/File.php b/civicrm/CRM/Utils/File.php index 889399bc43..b23cacf128 100644 --- a/civicrm/CRM/Utils/File.php +++ b/civicrm/CRM/Utils/File.php @@ -890,7 +890,7 @@ HTACCESS; break; default: - $url = sprintf('<a href="%s">%s</a>', $url, basename($path)); + $url = sprintf('<a href="%s">%s</a>', $url, self::cleanFileName(basename($path))); break; } diff --git a/civicrm/CRM/Utils/Hook.php b/civicrm/CRM/Utils/Hook.php index 4c1163493e..12e595fb5c 100644 --- a/civicrm/CRM/Utils/Hook.php +++ b/civicrm/CRM/Utils/Hook.php @@ -2110,8 +2110,8 @@ abstract class CRM_Utils_Hook { * ); * $angularModules['myBigAngularModule'] = array( * 'ext' => 'org.example.mymod', - * 'js' => array('js/part1.js', 'js/part2.js'), - * 'css' => array('css/myAngularModule.css'), + * 'js' => array('js/part1.js', 'js/part2.js', 'ext://other.ext.name/file.js', 'assetBuilder://dynamicAsset.js'), + * 'css' => array('css/myAngularModule.css', 'ext://other.ext.name/file.css', 'assetBuilder://dynamicAsset.css'), * 'partials' => array('partials/myBigAngularModule'), * 'requires' => array('otherModuleA', 'otherModuleB'), * 'basePages' => array('civicrm/a'), @@ -2382,4 +2382,18 @@ abstract class CRM_Utils_Hook { return self::singleton()->invoke(array('message'), $message, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_inboundSMS'); } + /** + * This hook is called to modify api params of EntityRef form field + * + * @param array $params + * + * @return mixed + */ + public static function alterEntityRefParams(&$params, $formName) { + return self::singleton()->invoke(array('params', 'formName'), $params, $formName, + self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, + 'civicrm_alterEntityRefParams' + ); + } + } diff --git a/civicrm/CRM/Utils/SQL.php b/civicrm/CRM/Utils/SQL.php index 574b3a6cfe..a82614e465 100644 --- a/civicrm/CRM/Utils/SQL.php +++ b/civicrm/CRM/Utils/SQL.php @@ -59,4 +59,67 @@ class CRM_Utils_SQL { return $clauses; } + /** + * Get current sqlModes of the session + * @return array + */ + public static function getSqlModes() { + $sqlModes = explode(',', CRM_Core_DAO::singleValueQuery('SELECT @@sql_mode')); + return $sqlModes; + } + + /** + * Checks if this system enforce the MYSQL mode ONLY_FULL_GROUP_BY. + * This function should be named supportsAnyValueAndEnforcesFullGroupBY(), + * but should be deprecated instead. + * + * @return mixed + * @deprecated + */ + public static function supportsFullGroupBy() { + // CRM-21455 MariaDB 10.2 does not support ANY_VALUE + $version = CRM_Core_DAO::singleValueQuery('SELECT VERSION()'); + + if (stripos('mariadb', $version) !== FALSE) { + return FALSE; + } + + return version_compare($version, '5.7', '>='); + } + + /** + * Disable ONLY_FULL_GROUP_BY for MySQL versions lower then 5.7 + * + * @return bool + */ + public static function disableFullGroupByMode() { + $sqlModes = self::getSqlModes(); + + // Disable only_full_group_by mode for lower sql versions. + if (!self::supportsFullGroupBy() || (!empty($sqlModes) && !in_array('ONLY_FULL_GROUP_BY', $sqlModes))) { + if ($key = array_search('ONLY_FULL_GROUP_BY', $sqlModes)) { + unset($sqlModes[$key]); + CRM_Core_DAO::executeQuery("SET SESSION sql_mode = '" . implode(',', $sqlModes) . "'"); + } + return TRUE; + } + + return FALSE; + } + + /** + * CHeck if ONLY_FULL_GROUP_BY is in the global sql_modes + * @return bool + */ + public static function isGroupByModeInDefault() { + if (!self::supportsFullGroupBy()) { + return FALSE; + } + $sqlModes = explode(',', CRM_Core_DAO::singleValueQuery('SELECT @@global.sql_mode')); + if (!in_array('ONLY_FULL_GROUP_BY', $sqlModes)) { + return FALSE; + } + return TRUE; + } + } diff --git a/civicrm/CRM/Utils/System/Backdrop.php b/civicrm/CRM/Utils/System/Backdrop.php index 7de0c8a2cb..3b96bfbd02 100644 --- a/civicrm/CRM/Utils/System/Backdrop.php +++ b/civicrm/CRM/Utils/System/Backdrop.php @@ -412,6 +412,26 @@ AND u.status = 1 user_login_finalize($params); } + /** + * @inheritDoc + */ + public function isUserRegistrationPermitted() { + if (config_get('system.core', 'user_register') == 'admin_only') { + return FALSE; + } + return TRUE; + } + + /** + * @inheritDoc + */ + public function isPasswordUserGenerated() { + if (config_get('system.core', 'user_email_verification') == TRUE) { + return FALSE; + } + return TRUE; + } + /** * @inheritDoc */ diff --git a/civicrm/CRM/Utils/System/Base.php b/civicrm/CRM/Utils/System/Base.php index 2191ede2ad..d3f8f060d0 100644 --- a/civicrm/CRM/Utils/System/Base.php +++ b/civicrm/CRM/Utils/System/Base.php @@ -395,6 +395,24 @@ abstract class CRM_Utils_System_Base { return FALSE; } + /** + * Check if user registration is permitted. + * + * @return bool + */ + public function isUserRegistrationPermitted() { + return FALSE; + } + + /** + * Check if user can create passwords or is initially assigned a system-generated one. + * + * @return bool + */ + public function isPasswordUserGenerated() { + return FALSE; + } + /** * Get user login URL for hosting CMS (method declared in each CMS system class) * diff --git a/civicrm/CRM/Utils/System/Drupal8.php b/civicrm/CRM/Utils/System/Drupal8.php index 22a5faee22..fe4369933a 100644 --- a/civicrm/CRM/Utils/System/Drupal8.php +++ b/civicrm/CRM/Utils/System/Drupal8.php @@ -215,7 +215,6 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { switch ($region) { case 'html-header': - case 'page-footer': break; default: @@ -240,7 +239,6 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { public function addScript($code, $region) { switch ($region) { case 'html-header': - case 'page-footer': break; default: @@ -526,6 +524,26 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { return \Drupal::currentUser()->isAuthenticated(); } + /** + * @inheritDoc + */ + public function isUserRegistrationPermitted() { + if (\Drupal::config('user.settings')->get('register') == 'admin_only') { + return FALSE; + } + return TRUE; + } + + /** + * @inheritDoc + */ + public function isPasswordUserGenerated() { + if (\Drupal::config('user.settings')->get('verify_mail') == TRUE) { + return FALSE; + } + return TRUE; + } + /** * @inheritDoc */ diff --git a/civicrm/CRM/Utils/System/DrupalBase.php b/civicrm/CRM/Utils/System/DrupalBase.php index cd0ca13c51..b54b6761ab 100644 --- a/civicrm/CRM/Utils/System/DrupalBase.php +++ b/civicrm/CRM/Utils/System/DrupalBase.php @@ -414,6 +414,26 @@ abstract class CRM_Utils_System_DrupalBase extends CRM_Utils_System_Base { return defined('VERSION') ? VERSION : 'Unknown'; } + /** + * @inheritDoc + */ + public function isUserRegistrationPermitted() { + if (!variable_get('user_register', TRUE)) { + return FALSE; + } + return TRUE; + } + + /** + * @inheritDoc + */ + public function isPasswordUserGenerated() { + if (variable_get('user_email_verification', TRUE)) { + return FALSE; + } + return TRUE; + } + /** * @inheritDoc */ diff --git a/civicrm/CRM/Utils/System/Joomla.php b/civicrm/CRM/Utils/System/Joomla.php index 5d7b826457..2b356ad26b 100644 --- a/civicrm/CRM/Utils/System/Joomla.php +++ b/civicrm/CRM/Utils/System/Joomla.php @@ -362,12 +362,8 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { $row = $users[0]; } - $joomlaBase = dirname(dirname(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))))); - if (!defined('JVERSION')) { - require $joomlaBase . '/libraries/cms/version/version.php'; - $jversion = new JVersion(); - define('JVERSION', $jversion->getShortVersion()); - } + $joomlaBase = self::getBasePath(); + self::getJVersion($joomlaBase); if (!empty($row)) { $dbPassword = $row->password; @@ -389,8 +385,13 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { return FALSE; } + if (version_compare(JVERSION, '3.8.0', 'ge')) { + jimport('joomla.application.helper'); + jimport('joomla.application.cms'); + jimport('joomla.application.administrator'); + } //include additional files required by Joomla 3.2.1+ - if (version_compare(JVERSION, '3.2.1', 'ge')) { + elseif (version_compare(JVERSION, '3.2.1', 'ge')) { require_once $joomlaBase . '/libraries/cms/application/helper.php'; require_once $joomlaBase . '/libraries/cms/application/cms.php'; require_once $joomlaBase . '/libraries/cms/application/administrator.php'; @@ -507,6 +508,32 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { } } + public function getJVersion($joomlaBase) { + // Files may be in different places depending on Joomla version + if (!defined('JVERSION')) { + // Joomla 3.8.0+ + $versionPhp = $joomlaBase . '/libraries/src/Version.php'; + if (!file_exists($versionPhp)) { + // Joomla < 3.8.0 + $versionPhp = $joomlaBase . '/libraries/cms/version/version.php'; + } + require $versionPhp; + $jversion = new JVersion(); + define('JVERSION', $jversion->getShortVersion()); + } + } + + /** + * Setup the base path related constant. + * @return mixed + */ + public function getBasePath() { + global $civicrm_root; + $joomlaPath = explode('/administrator', $civicrm_root); + $joomlaBase = $joomlaPath[0]; + return $joomlaBase; + } + /** * Load joomla bootstrap. * @@ -521,8 +548,7 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { * @return bool */ public function loadBootStrap($params = array(), $loadUser = TRUE, $throwError = TRUE, $realPath = NULL, $loadDefines = TRUE) { - // Setup the base path related constant. - $joomlaBase = dirname(dirname(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))))); + $joomlaBase = self::getBasePath(); // load BootStrap here if needed // We are a valid Joomla entry point. @@ -531,30 +557,25 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { define('DS', DIRECTORY_SEPARATOR); define('JPATH_BASE', $joomlaBase . '/administrator'); require $joomlaBase . '/administrator/includes/defines.php'; + require $joomlaBase . '/administrator/includes/framework.php'; } // Get the framework. if (file_exists($joomlaBase . '/libraries/import.legacy.php')) { require $joomlaBase . '/libraries/import.legacy.php'; } + require $joomlaBase . '/libraries/cms.php'; require $joomlaBase . '/libraries/import.php'; require $joomlaBase . '/libraries/joomla/event/dispatcher.php'; - require $joomlaBase . '/configuration.php'; - - // Files may be in different places depending on Joomla version - if (!defined('JVERSION')) { - require $joomlaBase . '/libraries/cms/version/version.php'; - $jversion = new JVersion(); - define('JVERSION', $jversion->getShortVersion()); - } + require_once $joomlaBase . '/configuration.php'; + self::getJVersion($joomlaBase); if (version_compare(JVERSION, '3.0', 'lt')) { require $joomlaBase . '/libraries/joomla/environment/uri.php'; require $joomlaBase . '/libraries/joomla/application/component/helper.php'; } else { - require $joomlaBase . '/libraries/cms.php'; - require $joomlaBase . '/libraries/joomla/uri/uri.php'; + jimport('joomla.environment.uri'); } jimport('joomla.application.cli'); @@ -578,6 +599,24 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { return ($user->guest) ? FALSE : TRUE; } + /** + * @inheritDoc + */ + public function isUserRegistrationPermitted() { + $userParams = JComponentHelper::getParams('com_users'); + if (!$userParams->get('allowUserRegistration')) { + return FALSE; + } + return TRUE; + } + + /** + * @inheritDoc + */ + public function isPasswordUserGenerated() { + return TRUE; + } + /** * @inheritDoc */ @@ -704,8 +743,7 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { } list($url, $siteName, $siteRoot) = $this->getDefaultSiteSettings(); - $includePath = "$siteRoot/libraries/cms/version"; - if (file_exists("$includePath/version.php")) { + if (file_exists("$siteRoot/administrator/index.php")) { return $siteRoot; } return NULL; diff --git a/civicrm/CRM/Utils/System/WordPress.php b/civicrm/CRM/Utils/System/WordPress.php index 579f647d28..75c5c9414b 100644 --- a/civicrm/CRM/Utils/System/WordPress.php +++ b/civicrm/CRM/Utils/System/WordPress.php @@ -350,6 +350,20 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { CRM_Core_Error::fatal(ts('You do not have permission to access this page.')); } + /** + * Determine the native ID of the CMS user. + * + * @param string $username + * @return int|NULL + */ + public function getUfId($username) { + $userdata = get_user_by('login', $username); + if (!$userdata->data->ID) { + return NULL; + } + return $userdata->data->ID; + } + /** * @inheritDoc */ @@ -609,6 +623,23 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { return $isloggedIn; } + /** + * @inheritDoc + */ + public function isUserRegistrationPermitted() { + if (!get_option('users_can_register')) { + return FALSE; + } + return TRUE; + } + + /** + * @inheritDoc + */ + public function isPasswordUserGenerated() { + return TRUE; + } + /** * @return mixed */ diff --git a/civicrm/CRM/Utils/Type.php b/civicrm/CRM/Utils/Type.php index fbe1c934e7..43546f5567 100644 --- a/civicrm/CRM/Utils/Type.php +++ b/civicrm/CRM/Utils/Type.php @@ -143,6 +143,28 @@ class CRM_Utils_Type { return (isset($string)) ? $string : ""; } + /** + * @return array + * An array of type in the form 'type name' => 'int representing type' + */ + public static function getValidTypes() { + return array( + 'Int' => self::T_INT, + 'String' => self::T_STRING, + 'Enum' => self::T_ENUM, + 'Date' => self::T_DATE, + 'Time' => self::T_TIME, + 'Boolean' => self::T_BOOLEAN, + 'Text' => self::T_TEXT, + 'Blob' => self::T_BLOB, + 'Timestamp' => self::T_TIMESTAMP, + 'Float' => self::T_FLOAT, + 'Money' => self::T_MONEY, + 'Email' => self::T_EMAIL, + 'Mediumblob' => self::T_MEDIUMBLOB, + ); + } + /** * Get the data_type for the field. * @@ -524,7 +546,7 @@ class CRM_Utils_Type { } /** - * Get list of avaliable Data Tupes for Option Groups + * Get list of avaliable Data Types for Option Groups * * @return array */ diff --git a/civicrm/CRM/Utils/VisualBundle.php b/civicrm/CRM/Utils/VisualBundle.php new file mode 100644 index 0000000000..27128b1760 --- /dev/null +++ b/civicrm/CRM/Utils/VisualBundle.php @@ -0,0 +1,110 @@ +<?php +/* + +--------------------------------------------------------------------+ + | CiviCRM version 4.7 | + +--------------------------------------------------------------------+ + | Copyright CiviCRM LLC (c) 2004-2017 | + +--------------------------------------------------------------------+ + | This file is a part of CiviCRM. | + | | + | CiviCRM is free software; you can copy, modify, and distribute it | + | under the terms of the GNU Affero General Public License | + | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | + | | + | CiviCRM 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 Affero General Public License for more details. | + | | + | You should have received a copy of the GNU Affero General Public | + | License and the CiviCRM Licensing Exception along | + | with this program; if not, contact CiviCRM LLC | + | at info[AT]civicrm[DOT]org. If you have questions about the | + | GNU Affero General Public License or the licensing of CiviCRM, | + | see the CiviCRM license FAQ at http://civicrm.org/licensing | + +--------------------------------------------------------------------+ + */ + +/** + * This class defines the `visual-bundle.js` asset, which combines `dc.js`, + * `d3.js`, and `crossfilter.js` into one asset -- and puts the services + * in the `CRM.visual` namespace. + * + * @package CRM + * @copyright CiviCRM LLC (c) 2004-2017 + * $Id$ + * + */ +class CRM_Utils_VisualBundle { + + public static function register() { + Civi::resources()->addScriptUrl(Civi::service('asset_manager')->getUrl('visual-bundle.js')); + Civi::resources()->addStyleUrl(Civi::service('asset_manager')->getUrl('visual-bundle.css')); + } + + /** + * Generate asset content (when accessed via AssetBuilder). + * + * @param \Civi\Core\Event\GenericHookEvent $event + * @see CRM_Utils_hook::buildAsset() + * @see \Civi\Core\AssetBuilder + */ + public static function buildAssetJs($event) { + if ($event->asset !== 'visual-bundle.js') { + return; + } + + $files = array( + 'crossfilter' => '[civicrm.bower]/crossfilter-1.3.x/crossfilter.min.js', + 'd3' => '[civicrm.bower]/d3-3.5.x/d3.min.js', + 'dc' => '[civicrm.bower]/dc-2.1.x/dc.min.js', + ); + + $content = array(); + $content[] = "(function(){"; + $content[] = "var backups = {d3: window.d3, crossfilter: window.crossfilter, dc: window.dc}"; + $content[] = 'window.CRM = window.CRM || {};'; + $content[] = 'CRM.visual = CRM.visual || {};'; + foreach ($files as $var => $file) { + $content[] = "// File: $file"; + $content[] = file_get_contents(Civi::paths()->getPath($file)); + } + foreach ($files as $var => $file) { + $content[] = "CRM.visual.$var = $var;"; + } + foreach ($files as $var => $file) { + $content[] = "window.$var = backups.$var;"; + } + $content[] = "})();"; + + $event->mimeType = 'application/javascript'; + $event->content = implode("\n", $content); + } + + /** + * Generate asset content (when accessed via AssetBuilder). + * + * @param \Civi\Core\Event\GenericHookEvent $event + * @see CRM_Utils_hook::buildAsset() + * @see \Civi\Core\AssetBuilder + */ + public static function buildAssetCss($event) { + if ($event->asset !== 'visual-bundle.css') { + return; + } + + $files = array( + '[civicrm.bower]/dc-2.1.x/dc.min.css', + ); + + $content = array(); + foreach ($files as $file) { + $content[] = "// File: $file"; + $content[] = file_get_contents(Civi::paths()->getPath($file)); + } + + $event->mimeType = 'text/css'; + $event->content = implode("\n", $content); + } + +} diff --git a/civicrm/Civi/Angular/Manager.php b/civicrm/Civi/Angular/Manager.php index 3f47762051..a10a8096f5 100644 --- a/civicrm/Civi/Angular/Manager.php +++ b/civicrm/Civi/Angular/Manager.php @@ -327,7 +327,12 @@ class Manager { $module = $this->getModule($moduleName); if (isset($module[$resType])) { foreach ($module[$resType] as $file) { - switch ($refType) { + $refTypeSuffix = ''; + if (is_string($file) && preg_match(';^(assetBuilder|ext)://;', $file)) { + $refTypeSuffix = '-' . parse_url($file, PHP_URL_SCHEME); + } + + switch ($refType . $refTypeSuffix) { case 'path': $result[] = $this->res->getPath($module['ext'], $file); break; @@ -340,6 +345,33 @@ class Manager { $result[] = $this->res->getUrl($module['ext'], $file, TRUE); break; + case 'path-assetBuilder': + $assetName = parse_url($file, PHP_URL_HOST) . parse_url($file, PHP_URL_PATH); + $assetParams = array(); + parse_str('' . parse_url($file, PHP_URL_QUERY), $assetParams); + $result[] = \Civi::service('asset_builder')->getPath($assetName, $assetParams); + break; + + case 'rawUrl-assetBuilder': + case 'cacheUrl-assetBuilder': + $assetName = parse_url($file, PHP_URL_HOST) . parse_url($file, PHP_URL_PATH); + $assetParams = array(); + parse_str('' . parse_url($file, PHP_URL_QUERY), $assetParams); + $result[] = \Civi::service('asset_builder')->getUrl($assetName, $assetParams); + break; + + case 'path-ext': + $result[] = $this->res->getPath(parse_url($file, PHP_URL_HOST), ltrim(parse_url($file, PHP_URL_PATH), '/')); + break; + + case 'rawUrl-ext': + $result[] = $this->res->getUrl(parse_url($file, PHP_URL_HOST), ltrim(parse_url($file, PHP_URL_PATH), '/')); + break; + + case 'cacheUrl-ext': + $result[] = $this->res->getUrl(parse_url($file, PHP_URL_HOST), ltrim(parse_url($file, PHP_URL_PATH), '/'), TRUE); + break; + case 'settings': case 'requires': if (!empty($module[$resType])) { diff --git a/civicrm/Civi/Core/AssetBuilder.php b/civicrm/Civi/Core/AssetBuilder.php index 5c3c8263b0..5f79555650 100644 --- a/civicrm/Civi/Core/AssetBuilder.php +++ b/civicrm/Civi/Core/AssetBuilder.php @@ -139,6 +139,23 @@ class AssetBuilder { } } + /** + * @param string $name + * Ex: 'angular.json'. + * @param array $params + * @return string + * URL. + * Ex: '/var/www/files/civicrm/dyn/angular.abcd1234abcd1234.json'. + */ + public function getPath($name, $params = array()) { + if (!$this->isValidName($name)) { + throw new \RuntimeException("Invalid dynamic asset name"); + } + + $fileName = $this->build($name, $params); + return $this->getCachePath($fileName); + } + /** * Build the cached copy of an $asset. * diff --git a/civicrm/Civi/Core/Container.php b/civicrm/Civi/Core/Container.php index 23a5108f38..ffe1bfbe3b 100644 --- a/civicrm/Civi/Core/Container.php +++ b/civicrm/Civi/Core/Container.php @@ -298,6 +298,8 @@ class Container { $dispatcher->addListener('hook_civicrm_eventDefs', array('\Civi\API\Events', 'hookEventDefs')); $dispatcher->addListener('hook_civicrm_eventDefs', array('\Civi\Core\Event\SystemInstallEvent', 'hookEventDefs')); $dispatcher->addListener('hook_civicrm_buildAsset', array('\Civi\Angular\Page\Modules', 'buildAngularModules')); + $dispatcher->addListener('hook_civicrm_buildAsset', array('\CRM_Utils_VisualBundle', 'buildAssetJs')); + $dispatcher->addListener('hook_civicrm_buildAsset', array('\CRM_Utils_VisualBundle', 'buildAssetCss')); $dispatcher->addListener('civi.dao.postInsert', array('\CRM_Core_BAO_RecurringEntity', 'triggerInsert')); $dispatcher->addListener('civi.dao.postUpdate', array('\CRM_Core_BAO_RecurringEntity', 'triggerUpdate')); $dispatcher->addListener('civi.dao.postDelete', array('\CRM_Core_BAO_RecurringEntity', 'triggerDelete')); diff --git a/civicrm/ang/crmCaseType/edit.html b/civicrm/ang/crmCaseType/edit.html index a31d9c5e5e..48b464f60d 100644 --- a/civicrm/ang/crmCaseType/edit.html +++ b/civicrm/ang/crmCaseType/edit.html @@ -3,19 +3,13 @@ Controller: CaseTypeCtrl Required vars: caseType --> <h1 crm-page-title>{{caseType.title || ts('New Case Type')}}</h1> + +<div class="help"> + {{ts('Use this screen to define or update the Case Roles, Activity Types, and Timelines for a case type.')}} <a href="https://docs.civicrm.org/user/en/stable/case-management/set-up/" target="_blank">{{ts('Learn more...')}}</a> +</div> + <form name="editCaseTypeForm" unsaved-warning-form> <div class="crm-block crm-form-block crmCaseType"> - <div class="help"> - {{ts('Use this screen to define or update the Case Roles, Activity Types, and Timelines for a case type.')}} <a href="https://docs.civicrm.org/user/en/stable/case-management/set-up/" target="_blank">{{ts('Learn more...')}}</a> - </div> - <div class="crm-submit-buttons"> - <button crm-icon="fa-check" ng-click="editCaseTypeForm.$setPristine(); save()" ng-disabled="editCaseTypeForm.$invalid"> - {{ts('Save')}} - </button> - <button crm-icon="fa-times" ng-click="editCaseTypeForm.$setPristine(); goto('caseType')"> - {{ts('Cancel')}} - </button> - </div> <div ng-include="'~/crmCaseType/caseTypeDetails.html'"></div> diff --git a/civicrm/ang/crmCaseType/list.html b/civicrm/ang/crmCaseType/list.html index 832a4d4073..97137e2663 100644 --- a/civicrm/ang/crmCaseType/list.html +++ b/civicrm/ang/crmCaseType/list.html @@ -8,68 +8,71 @@ Required vars: caseTypes {{ts('A Case Type describes a group of related tasks, interactions, or processes.')}} </div> -<table class="display"> - <thead> - <tr> - <th>{{ts('Title')}}</th> - <th>{{ts('Name')}}</th> - <th>{{ts('Description')}}</th> - <th>{{ts('Enabled?')}}</th> - <th></th> - </tr> - </thead> - <tbody> - <tr ng-repeat="caseType in caseTypes" - class="crm-entity" - ng-class-even="'even-row even'" - ng-class-odd="'odd-row odd'" - ng-class="{disabled: 0==caseType.is_active, forked: 1==caseType.is_forked}"> - <td>{{caseType.title}}</td> - <td>{{caseType.name}}</td> - <td>{{caseType.description}}</td> - <td>{{caseType.is_active == 1 ? ts('Yes') : ts('No')}}</td> - <!-- FIXME: Can't figure out how styling in other tables gets the nowrap effect... in absence of a consistent fix, KISS --> - <td style="white-space: nowrap"> - <span> - <a class="action-item crm-hover-button" ng-href="#/caseType/{{caseType.id}}">{{ts('Edit')}}</a> +<div class="crm-content-block crm-block"> - <span class="btn-slide crm-hover-button"> - {{ts('more')}} - <ul class="panel" style="display: none;"> - <li ng-hide="caseType.is_active"> - <a class="action-item crm-hover-button" ng-click="toggleCaseType(caseType)"> - {{ts('Enable')}} - </a> - </li> - <li ng-show="caseType.is_active"> - <a class="action-item crm-hover-button" - crm-confirm="{type: 'disable', obj: caseType}" - on-yes="toggleCaseType(caseType)"> - {{ts('Disable')}} - </a> - </li> - <li ng-show="caseType.is_forked"> - <a class="action-item crm-hover-button" - crm-confirm="{type: 'revert', obj: caseType}" - on-yes="revertCaseType(caseType)"> - {{ts('Revert')}} - </a> - </li> - <li> - <a class="action-item crm-hover-button" - crm-confirm="{type: 'delete', obj: caseType}" - on-yes="deleteCaseType(caseType)"> - {{ts('Delete')}} - </a> - </li> - </ul> + <table class="display"> + <thead> + <tr> + <th>{{ts('Title')}}</th> + <th>{{ts('Name')}}</th> + <th>{{ts('Description')}}</th> + <th>{{ts('Enabled?')}}</th> + <th></th> + </tr> + </thead> + <tbody> + <tr ng-repeat="caseType in caseTypes" + class="crm-entity" + ng-class-even="'even-row even'" + ng-class-odd="'odd-row odd'" + ng-class="{disabled: 0==caseType.is_active, forked: 1==caseType.is_forked}"> + <td>{{caseType.title}}</td> + <td>{{caseType.name}}</td> + <td>{{caseType.description}}</td> + <td>{{caseType.is_active == 1 ? ts('Yes') : ts('No')}}</td> + <!-- FIXME: Can't figure out how styling in other tables gets the nowrap effect... in absence of a consistent fix, KISS --> + <td style="white-space: nowrap"> + <span> + <a class="action-item crm-hover-button" ng-href="#/caseType/{{caseType.id}}">{{ts('Edit')}}</a> + + <span class="btn-slide crm-hover-button"> + {{ts('more')}} + <ul class="panel" style="display: none;"> + <li ng-hide="caseType.is_active"> + <a class="action-item crm-hover-button" ng-click="toggleCaseType(caseType)"> + {{ts('Enable')}} + </a> + </li> + <li ng-show="caseType.is_active"> + <a class="action-item crm-hover-button" + crm-confirm="{type: 'disable', obj: caseType}" + on-yes="toggleCaseType(caseType)"> + {{ts('Disable')}} + </a> + </li> + <li ng-show="caseType.is_forked"> + <a class="action-item crm-hover-button" + crm-confirm="{type: 'revert', obj: caseType}" + on-yes="revertCaseType(caseType)"> + {{ts('Revert')}} + </a> + </li> + <li> + <a class="action-item crm-hover-button" + crm-confirm="{type: 'delete', obj: caseType}" + on-yes="deleteCaseType(caseType)"> + {{ts('Delete')}} + </a> + </li> + </ul> + </span> </span> - </span> - </td> - </tr> - </tbody> -</table> + </td> + </tr> + </tbody> + </table> -<div class="crm-submit-buttons"> - <a ng-href="#/caseType/new" class="button"><span><i class="crm-i fa-plus-circle"></i> {{ts('New Case Type')}}</span></a> + <div class="crm-submit-buttons"> + <a ng-href="#/caseType/new" class="button"><span><i class="crm-i fa-plus-circle"></i> {{ts('New Case Type')}}</span></a> + </div> </div> diff --git a/civicrm/ang/crmMailing/BlockMailing.html b/civicrm/ang/crmMailing/BlockMailing.html index abf890a407..5a04d8e04f 100644 --- a/civicrm/ang/crmMailing/BlockMailing.html +++ b/civicrm/ang/crmMailing/BlockMailing.html @@ -49,8 +49,8 @@ It could perhaps be thinned by 30-60% by making more directives. </select> </div> </div> - <div crm-ui-field="{name: 'subform.recipients', title: ts('Recipients')}"> - <div crm-mailing-block-recipients="{name: 'recipients', id: 'subform.recipients'}" crm-mailing="mailing"></div> + <div crm-ui-field="{name: 'subform.recipients', title: ts('Recipients'), required: true}"> + <div crm-mailing-block-recipients="{name: 'recipients', id: 'subform.recipients'}" crm-mailing="mailing" cm-ui-id="subform.recipients"></div> </div> <span ng-controller="EditUnsubGroupCtrl"> <div crm-ui-field="{name: 'subform.baseGroup', title: ts('Unsubscribe Group')}" ng-if="isUnsubGroupRequired(mailing)"> @@ -61,7 +61,7 @@ It could perhaps be thinned by 30-60% by making more directives. ng-model="mailing.recipients.groups.base[0]" ng-required="true" > - <option ng-repeat="grp in crmMailingConst.groupNames | filter:{is_hidden:0} | orderBy:'title'" value="{{grp.id}}">{{grp.title}}</option> + <option ng-repeat="grp in crmMailingConst.testGroupNames | filter:{is_hidden:0} | orderBy:'title'" value="{{grp.id}}">{{grp.title}}</option> </select> </div> </span> diff --git a/civicrm/ang/crmMailing/EditUnsubGroupCtrl.js b/civicrm/ang/crmMailing/EditUnsubGroupCtrl.js index c0e7d3e71f..56070e03e6 100644 --- a/civicrm/ang/crmMailing/EditUnsubGroupCtrl.js +++ b/civicrm/ang/crmMailing/EditUnsubGroupCtrl.js @@ -3,14 +3,16 @@ angular.module('crmMailing').controller('EditUnsubGroupCtrl', function EditUnsubGroupCtrl($scope) { // CRM.crmMailing.groupNames is a global constant - since it doesn't change, we can digest & cache. var mandatoryIds = []; - _.each(CRM.crmMailing.groupNames, function(grp) { - if (grp.is_hidden == "1") { - mandatoryIds.push(parseInt(grp.id)); - } - }); $scope.isUnsubGroupRequired = function isUnsubGroupRequired(mailing) { - return _.intersection(mandatoryIds, mailing.recipients.groups.include).length > 0; + if (!_.isEmpty(CRM.crmMailing.groupNames)) { + _.each(CRM.crmMailing.groupNames, function(grp) { + if (grp.is_hidden == "1") { + mandatoryIds.push(parseInt(grp.id)); + } + }); + return _.intersection(mandatoryIds, mailing.recipients.groups.include).length > 0; + } }; }); diff --git a/civicrm/ang/crmMailing/RadioDate.js b/civicrm/ang/crmMailing/RadioDate.js index c747f2e275..037b6e22ba 100644 --- a/civicrm/ang/crmMailing/RadioDate.js +++ b/civicrm/ang/crmMailing/RadioDate.js @@ -1,10 +1,24 @@ (function(angular, $, _) { + // "YYYY-MM-DD hh:mm:ss" => Date() + function parseYmdHms(d) { + var parts = d.split(/[\-: ]/); + return new Date(parts[0], parts[1]-1, parts[2], parts[3], parts[4], parts[5]); + } + + function isDateBefore(tgt, cutoff, tolerance) { + var ad = parseYmdHms(tgt), bd = parseYmdHms(cutoff); + // We'll allow a little leeway, where tgt is considered before cutoff + // even if technically misses the cutoff by a little. + return ad < bd-tolerance; + } + // Represent a datetime field as if it were a radio ('schedule.mode') and a datetime ('schedule.datetime'). // example: <div crm-mailing-radio-date="mySchedule" ng-model="mailing.scheduled_date">...</div> angular.module('crmMailing').directive('crmMailingRadioDate', function(crmUiAlert) { return { require: 'ngModel', link: function($scope, element, attrs, ngModel) { + var lastAlert = null; var schedule = $scope[attrs.crmMailingRadioDate] = { mode: 'now', @@ -63,9 +77,13 @@ date = [year, month, day].join('-'); time = [hours, minutes, "00"].join(':'); currentDate = date + ' ' + time; - ngModel.$setValidity('dateTimeInThePast', !($(this).val().length && submittedDate < currentDate)); - if ($(this).val().length && submittedDate < currentDate) { - crmUiAlert({ + var isInPast = (submittedDate.length && submittedDate.match(/^[0-9\-]+ [0-9\:]+$/) && isDateBefore(submittedDate, currentDate, 4*60*60*1000)); + ngModel.$setValidity('dateTimeInThePast', !isInPast); + if (lastAlert && lastAlert.isOpen) { + lastAlert.close(); + } + if (isInPast) { + lastAlert = crmUiAlert({ text: ts('The scheduled date and time is in the past'), title: ts('Error') }); diff --git a/civicrm/ang/crmMailing/services.js b/civicrm/ang/crmMailing/services.js index 6c60d338b3..a4de098344 100644 --- a/civicrm/ang/crmMailing/services.js +++ b/civicrm/ang/crmMailing/services.js @@ -277,6 +277,7 @@ }); delete params.recipients; // the content was merged in return qApi('Mailing', 'create', params).then(function(result) { + mailing.modified_date = result.values[result.id].modified_date; // changes rolled back, so we don't care about updating mailing return result.values[result.id]['api.Mailing.preview'].values; }); @@ -304,6 +305,7 @@ delete params.recipients; // the content was merged in return qApi('Mailing', 'create', params).then(function (recipResult) { // changes rolled back, so we don't care about updating mailing + mailing.modified_date = recipResult.values[recipResult.id].modified_date; return recipResult.values[recipResult.id]['api.MailingRecipients.get'].values; }); }, @@ -323,6 +325,7 @@ delete params.recipients; // the content was merged in return qApi('Mailing', 'create', params).then(function (recipResult) { // changes rolled back, so we don't care about updating mailing + mailing.modified_date = recipResult.values[recipResult.id].modified_date; return recipResult.values[recipResult.id]['api.MailingRecipients.getcount']; }); }, @@ -354,6 +357,7 @@ mailing.id = result.id; } // no rollback, so update mailing.id // Perhaps we should reload mailing based on result? + mailing.modified_date = result.values[result.id].modified_date; return mailing; }); }, @@ -405,6 +409,7 @@ if (result.id && !mailing.id) { mailing.id = result.id; } // no rollback, so update mailing.id + mailing.modified_date = result.values[result.id].modified_date; return result.values[result.id]['api.Mailing.send_test'].values; }); } diff --git a/civicrm/ang/crmUi.js b/civicrm/ang/crmUi.js index ecfe172a99..a66334015a 100644 --- a/civicrm/ang/crmUi.js +++ b/civicrm/ang/crmUi.js @@ -124,7 +124,7 @@ // example: <div crm-ui-field="{title: ts('My Field')}"> {{mydata}} </div> // example: <div crm-ui-field="{name: 'subform.myfield', title: ts('My Field')}"> <input crm-ui-id="subform.myfield" name="myfield" /> </div> // example: <div crm-ui-field="{name: 'subform.myfield', title: ts('My Field')}"> <input crm-ui-id="subform.myfield" name="myfield" required /> </div> - // example: <div crm-ui-field="{name: 'subform.myfield', title: ts('My Field'), help: hs('help_field_name')}"> {{mydata}} </div> + // example: <div crm-ui-field="{name: 'subform.myfield', title: ts('My Field'), help: hs('help_field_name'), required: true}"> {{mydata}} </div> .directive('crmUiField', function() { // Note: When writing new templates, the "label" position is particular. See/patch "var label" below. var templateUrls = { @@ -255,7 +255,7 @@ // immediately for initialization. Use retries/retryDelay to initialize such elements. var init = function (retries, retryDelay) { var input = $('#' + id); - if (input.length === 0) { + if (input.length === 0 && !attrs.crmUiForceRequired) { if (retries) { $timeout(function(){ init(retries-1, retryDelay); @@ -264,6 +264,11 @@ return; } + if (attrs.crmUiForceRequired) { + scope.crmIsRequired = true; + return; + } + var tgtScope = scope;//.$parent; if (attrs.crmDepth) { for (var i = attrs.crmDepth; i > 0; i--) { @@ -326,6 +331,7 @@ link: function (scope, elm, attrs) { var iframe = $(elm)[0]; iframe.setAttribute('width', '100%'); + iframe.setAttribute('height', '250px'); iframe.setAttribute('frameborder', '0'); var refresh = function () { @@ -355,6 +361,10 @@ iframe.setAttribute('height', '' + $(this).innerHeight() + 'px'); }); + $(elm).parent().on('dialogresize', function(e, ui) { + iframe.setAttribute('class', 'resized'); + }); + scope.$parent.$watch(attrs.crmUiIframe, refresh); } }; @@ -788,11 +798,7 @@ }; this.isSelectable = function(step) { if (step.selected) return false; - var result = false; - angular.forEach(steps, function(otherStep, otherKey) { - if (step === otherStep && otherKey <= maxVisited) result = true; - }); - return result; + return this.$validStep(); }; /*** @param Object step the $scope of the step */ diff --git a/civicrm/ang/crmUi/field.html b/civicrm/ang/crmUi/field.html index aca140d29e..da6521a69e 100644 --- a/civicrm/ang/crmUi/field.html +++ b/civicrm/ang/crmUi/field.html @@ -1,5 +1,5 @@ <div class="label"> - <label crm-ui-for="{{crmUiField.name}}" crm-depth="1">{{crmUiField.title}}</label> + <label crm-ui-for="{{crmUiField.name}}" crm-depth="1" crm-ui-force-required="{{crmUiField.required}}">{{crmUiField.title}}</label> <a crm-ui-help="help" ng-if="help"></a> </div> <div class="content" ng-transclude></div> diff --git a/civicrm/api/api.php b/civicrm/api/api.php index 5c432630a8..04b0421bcb 100644 --- a/civicrm/api/api.php +++ b/civicrm/api/api.php @@ -129,6 +129,10 @@ function _civicrm_api_get_camel_name($entity) { */ function _civicrm_api_replace_variables(&$params, &$parentResult, $separator = '.') { foreach ($params as $field => &$value) { + if (substr($field, 0, 4) == 'api.') { + // CRM-21246 - Leave nested calls alone. + continue; + } if (is_string($value) && substr($value, 0, 6) == '$value') { $value = _civicrm_api_replace_variable($value, $parentResult, $separator); } diff --git a/civicrm/api/v3/Extension.php b/civicrm/api/v3/Extension.php index b618a37e83..3b9378e6c8 100644 --- a/civicrm/api/v3/Extension.php +++ b/civicrm/api/v3/Extension.php @@ -41,6 +41,7 @@ define('API_V3_EXTENSION_DELIMITER', ','); * Input parameters. * - key: string, eg "com.example.myextension" * - keys: array of string, eg array("com.example.myextension1", "com.example.myextension2") + * - path: string, e.g. "/var/www/extensions/*" * * Using 'keys' should be more performant than making multiple API calls with 'key' * @@ -53,7 +54,8 @@ function civicrm_api3_extension_install($params) { } try { - CRM_Extension_System::singleton()->getManager()->install($keys); + $manager = CRM_Extension_System::singleton()->getManager(); + $manager->install($manager->findInstallRequirements($keys)); } catch (CRM_Extension_Exception $e) { return civicrm_api3_create_error($e->getMessage()); @@ -69,11 +71,15 @@ function civicrm_api3_extension_install($params) { function _civicrm_api3_extension_install_spec(&$fields) { $fields['keys'] = array( 'title' => 'Extension Key(s)', - 'api.required' => 1, 'api.aliases' => array('key'), 'type' => CRM_Utils_Type::T_STRING, 'description' => 'Fully qualified name of one or more extensions', ); + $fields['path'] = array( + 'title' => 'Extension Path', + 'type' => CRM_Utils_Type::T_STRING, + 'description' => 'The path to the extension. May use wildcard ("*").', + ); } /** @@ -113,6 +119,7 @@ function civicrm_api3_extension_upgrade() { * Input parameters. * - key: string, eg "com.example.myextension" * - keys: array of string, eg array("com.example.myextension1", "com.example.myextension2") + * - path: string, e.g. "/var/www/vendor/foo/myext" or "/var/www/vendor/*" * * Using 'keys' should be more performant than making multiple API calls with 'key' * @@ -124,7 +131,8 @@ function civicrm_api3_extension_enable($params) { return civicrm_api3_create_success(); } - CRM_Extension_System::singleton()->getManager()->enable($keys); + $manager = CRM_Extension_System::singleton()->getManager(); + $manager->enable($manager->findInstallRequirements($keys)); return civicrm_api3_create_success(); } @@ -143,6 +151,7 @@ function _civicrm_api3_extension_enable_spec(&$fields) { * Input parameters. * - key: string, eg "com.example.myextension" * - keys: array of string, eg array("com.example.myextension1", "com.example.myextension2") + * - path: string, e.g. "/var/www/vendor/foo/myext" or "/var/www/vendor/*" * * Using 'keys' should be more performant than making multiple API calls with 'key' * @@ -173,6 +182,7 @@ function _civicrm_api3_extension_disable_spec(&$fields) { * Input parameters. * - key: string, eg "com.example.myextension" * - keys: array of string, eg array("com.example.myextension1", "com.example.myextension2") + * - path: string, e.g. "/var/www/vendor/foo/myext" or "/var/www/vendor/*" * * Using 'keys' should be more performant than making multiple API calls with 'key' * @@ -392,11 +402,16 @@ function civicrm_api3_extension_getremote($params) { * * @param array $params * @param string $key - * API request params with 'keys'. + * API request params with 'keys' or 'path'. + * - keys: A comma-delimited list of extension names + * - path: An absolute directory path. May append '*' to match all sub-directories. * * @return array */ function _civicrm_api3_getKeys($params, $key = 'keys') { + if ($key == 'path') { + return CRM_Extension_System::singleton()->getMapper()->getKeysByPath($params['path']); + } if (isset($params[$key])) { if (is_array($params[$key])) { return $params[$key]; diff --git a/civicrm/api/v3/Mailing.php b/civicrm/api/v3/Mailing.php index a8ee98d5f8..6a7e4f3d3b 100644 --- a/civicrm/api/v3/Mailing.php +++ b/civicrm/api/v3/Mailing.php @@ -66,10 +66,17 @@ function civicrm_api3_mailing_create($params) { else { $safeParams = $params; } + $timestampCheck = TRUE; + if (!empty($params['id']) && !empty($params['modified_date'])) { + $timestampCheck = _civicrm_api3_compare_timestamps($safeParams['modified_date'], $safeParams['id'], 'Mailing'); + unset($safeParams['modified_date']); + } + if (!$timestampCheck) { + throw new API_Exception("Mailing has not been saved, Content maybe out of date, please refresh the page and try again"); + } $safeParams['_evil_bao_validator_'] = 'CRM_Mailing_BAO_Mailing::checkSendable'; $result = _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $safeParams); return _civicrm_api3_mailing_get_formatResult($result); - } /** diff --git a/civicrm/api/v3/utils.php b/civicrm/api/v3/utils.php index cdbc837f2a..0eb47fa992 100644 --- a/civicrm/api/v3/utils.php +++ b/civicrm/api/v3/utils.php @@ -2504,3 +2504,18 @@ function _civicrm_api3_check_edit_permissions($bao_name, $params) { } } } + +/** + * Check if an entity has been modified since the last known modified_date + * @param string $modifiedDate Last knowm modified_date + * @param int $id Id of record to check + * @param string $entity API Entity + * @return bool + */ +function _civicrm_api3_compare_timestamps($modifiedDate, $id, $entity) { + $currentDbInfo = civicrm_api3($entity, 'getsingle', array('id' => $id)); + if (strtotime($currentDbInfo['modified_date']) <= strtotime($modifiedDate)) { + return TRUE; + } + return FALSE; +} diff --git a/civicrm/bower.json b/civicrm/bower.json index 343c2fb96f..3011e50552 100644 --- a/civicrm/bower.json +++ b/civicrm/bower.json @@ -15,6 +15,9 @@ "angular-unsavedChanges": "~0.1.1", "qunit": "~1.10", "d3": "3.4.11", + "d3-3.5.x": "d3#~3.5.17", + "dc-2.1.x": "dc.js#~2.1.8", + "crossfilter-1.3.x": "crossfilter2#~1.3.11", "jquery": "~1.12", "jquery-ui": "~1.12", "lodash-compat": "~3.0", diff --git a/civicrm/bower_components/crossfilter-1.3.x/.bower.json b/civicrm/bower_components/crossfilter-1.3.x/.bower.json new file mode 100644 index 0000000000..9b5f903498 --- /dev/null +++ b/civicrm/bower_components/crossfilter-1.3.x/.bower.json @@ -0,0 +1,38 @@ +{ + "name": "crossfilter2", + "description": "Fast multidimensional filtering for coordinated views.", + "main": "crossfilter.min.js", + "license": "Apache-2.0", + "keywords": [ + "analytics", + "visualization", + "crossfilter" + ], + "homepage": "https://github.com/crossfilter/crossfilter", + "moduleType": [ + "globals", + "node" + ], + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "src", + "lib", + "test", + "component.json", + "package.json", + "index.js", + "Makefile" + ], + "version": "1.3.14", + "_release": "1.3.14", + "_resolution": { + "type": "version", + "tag": "1.3.14", + "commit": "8066669e84e13a8e3212df6dc20dee63f083cca2" + }, + "_source": "https://github.com/crossfilter/crossfilter.git", + "_target": "~1.3.11", + "_originalSource": "crossfilter2" +} \ No newline at end of file diff --git a/civicrm/bower_components/crossfilter-1.3.x/CONTRIBUTING.md b/civicrm/bower_components/crossfilter-1.3.x/CONTRIBUTING.md new file mode 100644 index 0000000000..4e2411bf92 --- /dev/null +++ b/civicrm/bower_components/crossfilter-1.3.x/CONTRIBUTING.md @@ -0,0 +1,23 @@ +## Contributing To Crossfilter + +### Individual Contributor License Agreement + +Want to add support for a new backend or visualization? We'd love for you to participate in the development of Crossfilter. Before we can accept your pull request, please sign our [Individual Contributor License Agreement][1]. It's a short form that covers our bases and makes sure you're eligible to contribute. Thank you! + + [1]: https://spreadsheets.google.com/spreadsheet/viewform?formkey=dDViT2xzUHAwRkI3X3k5Z0lQM091OGc6MQ&ndplr=1 + +### Getting Help + +Full API documentation is kept [in the wiki][2]. If you have a question or need help using Crossfilter, please ask on Stackoverflow using the [crossfilter tag][3]. Feel free to file bug reports and other suggestions in the [github issue tracker][4]. + + [2]: https://github.com/square/crossfilter/wiki + [3]: http://stackoverflow.com/questions/tagged/crossfilter + [4]: https://github.com/square/crossfilter/issues + +### License + +Crossfilter is available under the [Apache License][5]. + + [5]: https://github.com/square/crossfilter/blob/master/LICENSE + + diff --git a/civicrm/bower_components/crossfilter-1.3.x/LICENSE b/civicrm/bower_components/crossfilter-1.3.x/LICENSE new file mode 100644 index 0000000000..a0ae5ddbc7 --- /dev/null +++ b/civicrm/bower_components/crossfilter-1.3.x/LICENSE @@ -0,0 +1,12 @@ +Copyright 2012 Square, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. diff --git a/civicrm/bower_components/crossfilter-1.3.x/README.md b/civicrm/bower_components/crossfilter-1.3.x/README.md new file mode 100644 index 0000000000..a8e0b9175f --- /dev/null +++ b/civicrm/bower_components/crossfilter-1.3.x/README.md @@ -0,0 +1,7 @@ +# Crossfilter + +**Crossfilter** is a JavaScript library for exploring large multivariate datasets in the browser. Crossfilter supports extremely fast (<30ms) interaction with coordinated views, even with datasets containing a million or more records; we built it to power analytics for Square Register, allowing merchants to slice and dice their payment history fluidly. + +Since most interactions only involve a single dimension, and then only small adjustments are made to the filter values, incremental filtering and reducing is significantly faster than starting from scratch. Crossfilter uses sorted indexes (and a few bit-twiddling hacks) to make this possible, dramatically increasing the perforÂmance of live histograms and top-K lists. Crossfilter is available under the [Apache License](/square/crossfilter/blob/master/LICENSE). + +Want to learn more? [See the wiki.](https://github.com/square/crossfilter/wiki) diff --git a/civicrm/bower_components/crossfilter-1.3.x/bower.json b/civicrm/bower_components/crossfilter-1.3.x/bower.json new file mode 100644 index 0000000000..c75d6ff0d9 --- /dev/null +++ b/civicrm/bower_components/crossfilter-1.3.x/bower.json @@ -0,0 +1,28 @@ +{ + "name": "crossfilter2", + "description": "Fast multidimensional filtering for coordinated views.", + "main": "crossfilter.min.js", + "license": "Apache-2.0", + "keywords": [ + "analytics", + "visualization", + "crossfilter" + ], + "homepage": "https://github.com/crossfilter/crossfilter", + "moduleType": [ + "globals", + "node" + ], + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "src", + "lib", + "test", + "component.json", + "package.json", + "index.js", + "Makefile" + ] +} diff --git a/civicrm/bower_components/crossfilter-1.3.x/crossfilter.js b/civicrm/bower_components/crossfilter-1.3.x/crossfilter.js new file mode 100644 index 0000000000..a9b843b24b --- /dev/null +++ b/civicrm/bower_components/crossfilter-1.3.x/crossfilter.js @@ -0,0 +1,1401 @@ +(function(exports){ +crossfilter.version = "1.3.14"; +function crossfilter_identity(d) { + return d; +} +crossfilter.permute = permute; + +function permute(array, index) { + for (var i = 0, n = index.length, copy = new Array(n); i < n; ++i) { + copy[i] = array[index[i]]; + } + return copy; +} +var bisect = crossfilter.bisect = bisect_by(crossfilter_identity); + +bisect.by = bisect_by; + +function bisect_by(f) { + + // Locate the insertion point for x in a to maintain sorted order. The + // arguments lo and hi may be used to specify a subset of the array which + // should be considered; by default the entire array is used. If x is already + // present in a, the insertion point will be before (to the left of) any + // existing entries. The return value is suitable for use as the first + // argument to `array.splice` assuming that a is already sorted. + // + // The returned insertion point i partitions the array a into two halves so + // that all v < x for v in a[lo:i] for the left side and all v >= x for v in + // a[i:hi] for the right side. + function bisectLeft(a, x, lo, hi) { + while (lo < hi) { + var mid = lo + hi >>> 1; + if (f(a[mid]) < x) lo = mid + 1; + else hi = mid; + } + return lo; + } + + // Similar to bisectLeft, but returns an insertion point which comes after (to + // the right of) any existing entries of x in a. + // + // The returned insertion point i partitions the array into two halves so that + // all v <= x for v in a[lo:i] for the left side and all v > x for v in + // a[i:hi] for the right side. + function bisectRight(a, x, lo, hi) { + while (lo < hi) { + var mid = lo + hi >>> 1; + if (x < f(a[mid])) hi = mid; + else lo = mid + 1; + } + return lo; + } + + bisectRight.right = bisectRight; + bisectRight.left = bisectLeft; + return bisectRight; +} +var heap = crossfilter.heap = heap_by(crossfilter_identity); + +heap.by = heap_by; + +function heap_by(f) { + + // Builds a binary heap within the specified array a[lo:hi]. The heap has the + // property such that the parent a[lo+i] is always less than or equal to its + // two children: a[lo+2*i+1] and a[lo+2*i+2]. + function heap(a, lo, hi) { + var n = hi - lo, + i = (n >>> 1) + 1; + while (--i > 0) sift(a, i, n, lo); + return a; + } + + // Sorts the specified array a[lo:hi] in descending order, assuming it is + // already a heap. + function sort(a, lo, hi) { + var n = hi - lo, + t; + while (--n > 0) t = a[lo], a[lo] = a[lo + n], a[lo + n] = t, sift(a, 1, n, lo); + return a; + } + + // Sifts the element a[lo+i-1] down the heap, where the heap is the contiguous + // slice of array a[lo:lo+n]. This method can also be used to update the heap + // incrementally, without incurring the full cost of reconstructing the heap. + function sift(a, i, n, lo) { + var d = a[--lo + i], + x = f(d), + child; + while ((child = i << 1) <= n) { + if (child < n && f(a[lo + child]) > f(a[lo + child + 1])) child++; + if (x <= f(a[lo + child])) break; + a[lo + i] = a[lo + child]; + i = child; + } + a[lo + i] = d; + } + + heap.sort = sort; + return heap; +} +var heapselect = crossfilter.heapselect = heapselect_by(crossfilter_identity); + +heapselect.by = heapselect_by; + +function heapselect_by(f) { + var heap = heap_by(f); + + // Returns a new array containing the top k elements in the array a[lo:hi]. + // The returned array is not sorted, but maintains the heap property. If k is + // greater than hi - lo, then fewer than k elements will be returned. The + // order of elements in a is unchanged by this operation. + function heapselect(a, lo, hi, k) { + var queue = new Array(k = Math.min(hi - lo, k)), + min, + i, + x, + d; + + for (i = 0; i < k; ++i) queue[i] = a[lo++]; + heap(queue, 0, k); + + if (lo < hi) { + min = f(queue[0]); + do { + if (x = f(d = a[lo]) > min) { + queue[0] = d; + min = f(heap(queue, 0, k)[0]); + } + } while (++lo < hi); + } + + return queue; + } + + return heapselect; +} +var insertionsort = crossfilter.insertionsort = insertionsort_by(crossfilter_identity); + +insertionsort.by = insertionsort_by; + +function insertionsort_by(f) { + + function insertionsort(a, lo, hi) { + for (var i = lo + 1; i < hi; ++i) { + for (var j = i, t = a[i], x = f(t); j > lo && f(a[j - 1]) > x; --j) { + a[j] = a[j - 1]; + } + a[j] = t; + } + return a; + } + + return insertionsort; +} +// Algorithm designed by Vladimir Yaroslavskiy. +// Implementation based on the Dart project; see lib/dart/LICENSE for details. + +var quicksort = crossfilter.quicksort = quicksort_by(crossfilter_identity); + +quicksort.by = quicksort_by; + +function quicksort_by(f) { + var insertionsort = insertionsort_by(f); + + function sort(a, lo, hi) { + return (hi - lo < quicksort_sizeThreshold + ? insertionsort + : quicksort)(a, lo, hi); + } + + function quicksort(a, lo, hi) { + // Compute the two pivots by looking at 5 elements. + var sixth = (hi - lo) / 6 | 0, + i1 = lo + sixth, + i5 = hi - 1 - sixth, + i3 = lo + hi - 1 >> 1, // The midpoint. + i2 = i3 - sixth, + i4 = i3 + sixth; + + var e1 = a[i1], x1 = f(e1), + e2 = a[i2], x2 = f(e2), + e3 = a[i3], x3 = f(e3), + e4 = a[i4], x4 = f(e4), + e5 = a[i5], x5 = f(e5); + + var t; + + // Sort the selected 5 elements using a sorting network. + if (x1 > x2) t = e1, e1 = e2, e2 = t, t = x1, x1 = x2, x2 = t; + if (x4 > x5) t = e4, e4 = e5, e5 = t, t = x4, x4 = x5, x5 = t; + if (x1 > x3) t = e1, e1 = e3, e3 = t, t = x1, x1 = x3, x3 = t; + if (x2 > x3) t = e2, e2 = e3, e3 = t, t = x2, x2 = x3, x3 = t; + if (x1 > x4) t = e1, e1 = e4, e4 = t, t = x1, x1 = x4, x4 = t; + if (x3 > x4) t = e3, e3 = e4, e4 = t, t = x3, x3 = x4, x4 = t; + if (x2 > x5) t = e2, e2 = e5, e5 = t, t = x2, x2 = x5, x5 = t; + if (x2 > x3) t = e2, e2 = e3, e3 = t, t = x2, x2 = x3, x3 = t; + if (x4 > x5) t = e4, e4 = e5, e5 = t, t = x4, x4 = x5, x5 = t; + + var pivot1 = e2, pivotValue1 = x2, + pivot2 = e4, pivotValue2 = x4; + + // e2 and e4 have been saved in the pivot variables. They will be written + // back, once the partitioning is finished. + a[i1] = e1; + a[i2] = a[lo]; + a[i3] = e3; + a[i4] = a[hi - 1]; + a[i5] = e5; + + var less = lo + 1, // First element in the middle partition. + great = hi - 2; // Last element in the middle partition. + + // Note that for value comparison, <, <=, >= and > coerce to a primitive via + // Object.prototype.valueOf; == and === do not, so in order to be consistent + // with natural order (such as for Date objects), we must do two compares. + var pivotsEqual = pivotValue1 <= pivotValue2 && pivotValue1 >= pivotValue2; + if (pivotsEqual) { + + // Degenerated case where the partitioning becomes a dutch national flag + // problem. + // + // [ | < pivot | == pivot | unpartitioned | > pivot | ] + // ^ ^ ^ ^ ^ + // left less k great right + // + // a[left] and a[right] are undefined and are filled after the + // partitioning. + // + // Invariants: + // 1) for x in ]left, less[ : x < pivot. + // 2) for x in [less, k[ : x == pivot. + // 3) for x in ]great, right[ : x > pivot. + for (var k = less; k <= great; ++k) { + var ek = a[k], xk = f(ek); + if (xk < pivotValue1) { + if (k !== less) { + a[k] = a[less]; + a[less] = ek; + } + ++less; + } else if (xk > pivotValue1) { + + // Find the first element <= pivot in the range [k - 1, great] and + // put [:ek:] there. We know that such an element must exist: + // When k == less, then el3 (which is equal to pivot) lies in the + // interval. Otherwise a[k - 1] == pivot and the search stops at k-1. + // Note that in the latter case invariant 2 will be violated for a + // short amount of time. The invariant will be restored when the + // pivots are put into their final positions. + while (true) { + var greatValue = f(a[great]); + if (greatValue > pivotValue1) { + great--; + // This is the only location in the while-loop where a new + // iteration is started. + continue; + } else if (greatValue < pivotValue1) { + // Triple exchange. + a[k] = a[less]; + a[less++] = a[great]; + a[great--] = ek; + break; + } else { + a[k] = a[great]; + a[great--] = ek; + // Note: if great < k then we will exit the outer loop and fix + // invariant 2 (which we just violated). + break; + } + } + } + } + } else { + + // We partition the list into three parts: + // 1. < pivot1 + // 2. >= pivot1 && <= pivot2 + // 3. > pivot2 + // + // During the loop we have: + // [ | < pivot1 | >= pivot1 && <= pivot2 | unpartitioned | > pivot2 | ] + // ^ ^ ^ ^ ^ + // left less k great right + // + // a[left] and a[right] are undefined and are filled after the + // partitioning. + // + // Invariants: + // 1. for x in ]left, less[ : x < pivot1 + // 2. for x in [less, k[ : pivot1 <= x && x <= pivot2 + // 3. for x in ]great, right[ : x > pivot2 + for (var k = less; k <= great; k++) { + var ek = a[k], xk = f(ek); + if (xk < pivotValue1) { + if (k !== less) { + a[k] = a[less]; + a[less] = ek; + } + ++less; + } else { + if (xk > pivotValue2) { + while (true) { + var greatValue = f(a[great]); + if (greatValue > pivotValue2) { + great--; + if (great < k) break; + // This is the only location inside the loop where a new + // iteration is started. + continue; + } else { + // a[great] <= pivot2. + if (greatValue < pivotValue1) { + // Triple exchange. + a[k] = a[less]; + a[less++] = a[great]; + a[great--] = ek; + } else { + // a[great] >= pivot1. + a[k] = a[great]; + a[great--] = ek; + } + break; + } + } + } + } + } + } + + // Move pivots into their final positions. + // We shrunk the list from both sides (a[left] and a[right] have + // meaningless values in them) and now we move elements from the first + // and third partition into these locations so that we can store the + // pivots. + a[lo] = a[less - 1]; + a[less - 1] = pivot1; + a[hi - 1] = a[great + 1]; + a[great + 1] = pivot2; + + // The list is now partitioned into three partitions: + // [ < pivot1 | >= pivot1 && <= pivot2 | > pivot2 ] + // ^ ^ ^ ^ + // left less great right + + // Recursive descent. (Don't include the pivot values.) + sort(a, lo, less - 1); + sort(a, great + 2, hi); + + if (pivotsEqual) { + // All elements in the second partition are equal to the pivot. No + // need to sort them. + return a; + } + + // In theory it should be enough to call _doSort recursively on the second + // partition. + // The Android source however removes the pivot elements from the recursive + // call if the second partition is too large (more than 2/3 of the list). + if (less < i1 && great > i5) { + var lessValue, greatValue; + while ((lessValue = f(a[less])) <= pivotValue1 && lessValue >= pivotValue1) ++less; + while ((greatValue = f(a[great])) <= pivotValue2 && greatValue >= pivotValue2) --great; + + // Copy paste of the previous 3-way partitioning with adaptions. + // + // We partition the list into three parts: + // 1. == pivot1 + // 2. > pivot1 && < pivot2 + // 3. == pivot2 + // + // During the loop we have: + // [ == pivot1 | > pivot1 && < pivot2 | unpartitioned | == pivot2 ] + // ^ ^ ^ + // less k great + // + // Invariants: + // 1. for x in [ *, less[ : x == pivot1 + // 2. for x in [less, k[ : pivot1 < x && x < pivot2 + // 3. for x in ]great, * ] : x == pivot2 + for (var k = less; k <= great; k++) { + var ek = a[k], xk = f(ek); + if (xk <= pivotValue1 && xk >= pivotValue1) { + if (k !== less) { + a[k] = a[less]; + a[less] = ek; + } + less++; + } else { + if (xk <= pivotValue2 && xk >= pivotValue2) { + while (true) { + var greatValue = f(a[great]); + if (greatValue <= pivotValue2 && greatValue >= pivotValue2) { + great--; + if (great < k) break; + // This is the only location inside the loop where a new + // iteration is started. + continue; + } else { + // a[great] < pivot2. + if (greatValue < pivotValue1) { + // Triple exchange. + a[k] = a[less]; + a[less++] = a[great]; + a[great--] = ek; + } else { + // a[great] == pivot1. + a[k] = a[great]; + a[great--] = ek; + } + break; + } + } + } + } + } + } + + // The second partition has now been cleared of pivot elements and looks + // as follows: + // [ * | > pivot1 && < pivot2 | * ] + // ^ ^ + // less great + // Sort the second partition using recursive descent. + + // The second partition looks as follows: + // [ * | >= pivot1 && <= pivot2 | * ] + // ^ ^ + // less great + // Simply sort it by recursive descent. + + return sort(a, less, great + 1); + } + + return sort; +} + +var quicksort_sizeThreshold = 32; +var crossfilter_array8 = crossfilter_arrayUntyped, + crossfilter_array16 = crossfilter_arrayUntyped, + crossfilter_array32 = crossfilter_arrayUntyped, + crossfilter_arrayLengthen = crossfilter_arrayLengthenUntyped, + crossfilter_arrayWiden = crossfilter_arrayWidenUntyped; + +if (typeof Uint8Array !== "undefined") { + crossfilter_array8 = function(n) { return new Uint8Array(n); }; + crossfilter_array16 = function(n) { return new Uint16Array(n); }; + crossfilter_array32 = function(n) { return new Uint32Array(n); }; + + crossfilter_arrayLengthen = function(array, length) { + if (array.length >= length) return array; + var copy = new array.constructor(length); + copy.set(array); + return copy; + }; + + crossfilter_arrayWiden = function(array, width) { + var copy; + switch (width) { + case 16: copy = crossfilter_array16(array.length); break; + case 32: copy = crossfilter_array32(array.length); break; + default: throw new Error("invalid array width!"); + } + copy.set(array); + return copy; + }; +} + +function crossfilter_arrayUntyped(n) { + var array = new Array(n), i = -1; + while (++i < n) array[i] = 0; + return array; +} + +function crossfilter_arrayLengthenUntyped(array, length) { + var n = array.length; + while (n < length) array[n++] = 0; + return array; +} + +function crossfilter_arrayWidenUntyped(array, width) { + if (width > 32) throw new Error("invalid array width!"); + return array; +} +function crossfilter_filterExact(bisect, value) { + return function(values) { + var n = values.length; + return [bisect.left(values, value, 0, n), bisect.right(values, value, 0, n)]; + }; +} + +function crossfilter_filterRange(bisect, range) { + var min = range[0], + max = range[1]; + return function(values) { + var n = values.length; + return [bisect.left(values, min, 0, n), bisect.left(values, max, 0, n)]; + }; +} + +function crossfilter_filterAll(values) { + return [0, values.length]; +} +function crossfilter_null() { + return null; +} +function crossfilter_zero() { + return 0; +} +function crossfilter_reduceIncrement(p) { + return p + 1; +} + +function crossfilter_reduceDecrement(p) { + return p - 1; +} + +function crossfilter_reduceAdd(f) { + return function(p, v) { + return p + +f(v); + }; +} + +function crossfilter_reduceSubtract(f) { + return function(p, v) { + return p - f(v); + }; +} +exports.crossfilter = crossfilter; + +function crossfilter() { + var crossfilter = { + add: add, + remove: removeData, + dimension: dimension, + groupAll: groupAll, + size: size + }; + + var data = [], // the records + n = 0, // the number of records; data.length + m = 0, // a bit mask representing which dimensions are in use + M = 8, // number of dimensions that can fit in `filters` + filters = crossfilter_array8(0), // M bits per record; 1 is filtered out + filterListeners = [], // when the filters change + dataListeners = [], // when data is added + removeDataListeners = []; // when data is removed + + // Adds the specified new records to this crossfilter. + function add(newData) { + var n0 = n, + n1 = newData.length; + + // If there's actually new data to add… + // Merge the new data into the existing data. + // Lengthen the filter bitset to handle the new records. + // Notify listeners (dimensions and groups) that new data is available. + if (n1) { + data = data.concat(newData); + filters = crossfilter_arrayLengthen(filters, n += n1); + dataListeners.forEach(function(l) { l(newData, n0, n1); }); + } + + return crossfilter; + } + + // Removes all records that match the current filters. + function removeData() { + var newIndex = crossfilter_index(n, n), + removed = []; + for (var i = 0, j = 0; i < n; ++i) { + if (filters[i]) newIndex[i] = j++; + else removed.push(i); + } + + // Remove all matching records from groups. + filterListeners.forEach(function(l) { l(0, [], removed); }); + + // Update indexes. + removeDataListeners.forEach(function(l) { l(newIndex); }); + + // Remove old filters and data by overwriting. + for (var i = 0, j = 0, k; i < n; ++i) { + if (k = filters[i]) { + if (i !== j) filters[j] = k, data[j] = data[i]; + ++j; + } + } + data.length = j; + while (n > j) filters[--n] = 0; + } + + // Adds a new dimension with the specified value accessor function. + function dimension(value) { + var dimension = { + filter: filter, + filterExact: filterExact, + filterRange: filterRange, + filterFunction: filterFunction, + filterAll: filterAll, + top: top, + bottom: bottom, + group: group, + groupAll: groupAll, + dispose: dispose, + remove: dispose // for backwards-compatibility + }; + + var one = ~m & -~m, // lowest unset bit as mask, e.g., 00001000 + zero = ~one, // inverted one, e.g., 11110111 + values, // sorted, cached array + index, // value rank ↦ object id + newValues, // temporary array storing newly-added values + newIndex, // temporary array storing newly-added index + sort = quicksort_by(function(i) { return newValues[i]; }), + refilter = crossfilter_filterAll, // for recomputing filter + refilterFunction, // the custom filter function in use + indexListeners = [], // when data is added + dimensionGroups = [], + lo0 = 0, + hi0 = 0; + + // Updating a dimension is a two-stage process. First, we must update the + // associated filters for the newly-added records. Once all dimensions have + // updated their filters, the groups are notified to update. + dataListeners.unshift(preAdd); + dataListeners.push(postAdd); + + removeDataListeners.push(removeData); + + // Incorporate any existing data into this dimension, and make sure that the + // filter bitset is wide enough to handle the new dimension. + m |= one; + if (M >= 32 ? !one : m & -(1 << M)) { + filters = crossfilter_arrayWiden(filters, M <<= 1); + } + preAdd(data, 0, n); + postAdd(data, 0, n); + + // Incorporates the specified new records into this dimension. + // This function is responsible for updating filters, values, and index. + function preAdd(newData, n0, n1) { + + // Permute new values into natural order using a sorted index. + newValues = newData.map(value); + newIndex = sort(crossfilter_range(n1), 0, n1); + newValues = permute(newValues, newIndex); + + // Bisect newValues to determine which new records are selected. + var bounds = refilter(newValues), lo1 = bounds[0], hi1 = bounds[1], i; + if (refilterFunction) { + for (i = 0; i < n1; ++i) { + if (!refilterFunction(newValues[i], i)) filters[newIndex[i] + n0] |= one; + } + } else { + for (i = 0; i < lo1; ++i) filters[newIndex[i] + n0] |= one; + for (i = hi1; i < n1; ++i) filters[newIndex[i] + n0] |= one; + } + + // If this dimension previously had no data, then we don't need to do the + // more expensive merge operation; use the new values and index as-is. + if (!n0) { + values = newValues; + index = newIndex; + lo0 = lo1; + hi0 = hi1; + return; + } + + var oldValues = values, + oldIndex = index, + i0 = 0, + i1 = 0; + + // Otherwise, create new arrays into which to merge new and old. + values = new Array(n); + index = crossfilter_index(n, n); + + // Merge the old and new sorted values, and old and new index. + for (i = 0; i0 < n0 && i1 < n1; ++i) { + if (oldValues[i0] < newValues[i1]) { + values[i] = oldValues[i0]; + index[i] = oldIndex[i0++]; + } else { + values[i] = newValues[i1]; + index[i] = newIndex[i1++] + n0; + } + } + + // Add any remaining old values. + for (; i0 < n0; ++i0, ++i) { + values[i] = oldValues[i0]; + index[i] = oldIndex[i0]; + } + + // Add any remaining new values. + for (; i1 < n1; ++i1, ++i) { + values[i] = newValues[i1]; + index[i] = newIndex[i1] + n0; + } + + // Bisect again to recompute lo0 and hi0. + bounds = refilter(values), lo0 = bounds[0], hi0 = bounds[1]; + } + + // When all filters have updated, notify index listeners of the new values. + function postAdd(newData, n0, n1) { + indexListeners.forEach(function(l) { l(newValues, newIndex, n0, n1); }); + newValues = newIndex = null; + } + + function removeData(reIndex) { + for (var i = 0, j = 0, k; i < n; ++i) { + if (filters[k = index[i]]) { + if (i !== j) values[j] = values[i]; + index[j] = reIndex[k]; + ++j; + } + } + values.length = j; + while (j < n) index[j++] = 0; + + // Bisect again to recompute lo0 and hi0. + var bounds = refilter(values); + lo0 = bounds[0], hi0 = bounds[1]; + } + + // Updates the selected values based on the specified bounds [lo, hi]. + // This implementation is used by all the public filter methods. + function filterIndexBounds(bounds) { + var lo1 = bounds[0], + hi1 = bounds[1]; + + if (refilterFunction) { + refilterFunction = null; + filterIndexFunction(function(d, i) { return lo1 <= i && i < hi1; }); + lo0 = lo1; + hi0 = hi1; + return dimension; + } + + var i, + j, + k, + added = [], + removed = []; + + // Fast incremental update based on previous lo index. + if (lo1 < lo0) { + for (i = lo1, j = Math.min(lo0, hi1); i < j; ++i) { + filters[k = index[i]] ^= one; + added.push(k); + } + } else if (lo1 > lo0) { + for (i = lo0, j = Math.min(lo1, hi0); i < j; ++i) { + filters[k = index[i]] ^= one; + removed.push(k); + } + } + + // Fast incremental update based on previous hi index. + if (hi1 > hi0) { + for (i = Math.max(lo1, hi0), j = hi1; i < j; ++i) { + filters[k = index[i]] ^= one; + added.push(k); + } + } else if (hi1 < hi0) { + for (i = Math.max(lo0, hi1), j = hi0; i < j; ++i) { + filters[k = index[i]] ^= one; + removed.push(k); + } + } + + lo0 = lo1; + hi0 = hi1; + filterListeners.forEach(function(l) { l(one, added, removed); }); + return dimension; + } + + // Filters this dimension using the specified range, value, or null. + // If the range is null, this is equivalent to filterAll. + // If the range is an array, this is equivalent to filterRange. + // Otherwise, this is equivalent to filterExact. + function filter(range) { + return range == null + ? filterAll() : Array.isArray(range) + ? filterRange(range) : typeof range === "function" + ? filterFunction(range) + : filterExact(range); + } + + // Filters this dimension to select the exact value. + function filterExact(value) { + return filterIndexBounds((refilter = crossfilter_filterExact(bisect, value))(values)); + } + + // Filters this dimension to select the specified range [lo, hi]. + // The lower bound is inclusive, and the upper bound is exclusive. + function filterRange(range) { + return filterIndexBounds((refilter = crossfilter_filterRange(bisect, range))(values)); + } + + // Clears any filters on this dimension. + function filterAll() { + return filterIndexBounds((refilter = crossfilter_filterAll)(values)); + } + + // Filters this dimension using an arbitrary function. + function filterFunction(f) { + refilter = crossfilter_filterAll; + + filterIndexFunction(refilterFunction = f); + + lo0 = 0; + hi0 = n; + + return dimension; + } + + function filterIndexFunction(f) { + var i, + k, + x, + added = [], + removed = []; + + for (i = 0; i < n; ++i) { + if (!(filters[k = index[i]] & one) ^ !!(x = f(values[i], i))) { + if (x) filters[k] &= zero, added.push(k); + else filters[k] |= one, removed.push(k); + } + } + filterListeners.forEach(function(l) { l(one, added, removed); }); + } + + // Returns the top K selected records based on this dimension's order. + // Note: observes this dimension's filter, unlike group and groupAll. + function top(k) { + var array = [], + i = hi0, + j; + + while (--i >= lo0 && k > 0) { + if (!filters[j = index[i]]) { + array.push(data[j]); + --k; + } + } + + return array; + } + + // Returns the bottom K selected records based on this dimension's order. + // Note: observes this dimension's filter, unlike group and groupAll. + function bottom(k) { + var array = [], + i = lo0, + j; + + while (i < hi0 && k > 0) { + if (!filters[j = index[i]]) { + array.push(data[j]); + --k; + } + i++; + } + + return array; + } + + // Adds a new group to this dimension, using the specified key function. + function group(key) { + var group = { + top: top, + all: all, + reduce: reduce, + reduceCount: reduceCount, + reduceSum: reduceSum, + order: order, + orderNatural: orderNatural, + size: size, + dispose: dispose, + remove: dispose // for backwards-compatibility + }; + + // Ensure that this group will be removed when the dimension is removed. + dimensionGroups.push(group); + + var groups, // array of {key, value} + groupIndex, // object id ↦ group id + groupWidth = 8, + groupCapacity = crossfilter_capacity(groupWidth), + k = 0, // cardinality + select, + heap, + reduceAdd, + reduceRemove, + reduceInitial, + update = crossfilter_null, + reset = crossfilter_null, + resetNeeded = true, + groupAll = key === crossfilter_null; + + if (arguments.length < 1) key = crossfilter_identity; + + // The group listens to the crossfilter for when any dimension changes, so + // that it can update the associated reduce values. It must also listen to + // the parent dimension for when data is added, and compute new keys. + filterListeners.push(update); + indexListeners.push(add); + removeDataListeners.push(removeData); + + // Incorporate any existing data into the grouping. + add(values, index, 0, n); + + // Incorporates the specified new values into this group. + // This function is responsible for updating groups and groupIndex. + function add(newValues, newIndex, n0, n1) { + var oldGroups = groups, + reIndex = crossfilter_index(k, groupCapacity), + add = reduceAdd, + initial = reduceInitial, + k0 = k, // old cardinality + i0 = 0, // index of old group + i1 = 0, // index of new record + j, // object id + g0, // old group + x0, // old key + x1, // new key + g, // group to add + x; // key of group to add + + // If a reset is needed, we don't need to update the reduce values. + if (resetNeeded) add = initial = crossfilter_null; + + // Reset the new groups (k is a lower bound). + // Also, make sure that groupIndex exists and is long enough. + groups = new Array(k), k = 0; + groupIndex = k0 > 1 ? crossfilter_arrayLengthen(groupIndex, n) : crossfilter_index(n, groupCapacity); + + // Get the first old key (x0 of g0), if it exists. + if (k0) x0 = (g0 = oldGroups[0]).key; + + // Find the first new key (x1), skipping NaN keys. + while (i1 < n1 && !((x1 = key(newValues[i1])) >= x1)) ++i1; + + // While new keys remain… + while (i1 < n1) { + + // Determine the lesser of the two current keys; new and old. + // If there are no old keys remaining, then always add the new key. + if (g0 && x0 <= x1) { + g = g0, x = x0; + + // Record the new index of the old group. + reIndex[i0] = k; + + // Retrieve the next old key. + if (g0 = oldGroups[++i0]) x0 = g0.key; + } else { + g = {key: x1, value: initial()}, x = x1; + } + + // Add the lesser group. + groups[k] = g; + + // Add any selected records belonging to the added group, while + // advancing the new key and populating the associated group index. + while (!(x1 > x)) { + groupIndex[j = newIndex[i1] + n0] = k; + if (!(filters[j] & zero)) g.value = add(g.value, data[j]); + if (++i1 >= n1) break; + x1 = key(newValues[i1]); + } + + groupIncrement(); + } + + // Add any remaining old groups that were greater than all new keys. + // No incremental reduce is needed; these groups have no new records. + // Also record the new index of the old group. + while (i0 < k0) { + groups[reIndex[i0] = k] = oldGroups[i0++]; + groupIncrement(); + } + + // If we added any new groups before any old groups, + // update the group index of all the old records. + if (k > i0) for (i0 = 0; i0 < n0; ++i0) { + groupIndex[i0] = reIndex[groupIndex[i0]]; + } + + // Modify the update and reset behavior based on the cardinality. + // If the cardinality is less than or equal to one, then the groupIndex + // is not needed. If the cardinality is zero, then there are no records + // and therefore no groups to update or reset. Note that we also must + // change the registered listener to point to the new method. + j = filterListeners.indexOf(update); + if (k > 1) { + update = updateMany; + reset = resetMany; + } else { + if (!k && groupAll) { + k = 1; + groups = [{key: null, value: initial()}]; + } + if (k === 1) { + update = updateOne; + reset = resetOne; + } else { + update = crossfilter_null; + reset = crossfilter_null; + } + groupIndex = null; + } + filterListeners[j] = update; + + // Count the number of added groups, + // and widen the group index as needed. + function groupIncrement() { + if (++k === groupCapacity) { + reIndex = crossfilter_arrayWiden(reIndex, groupWidth <<= 1); + groupIndex = crossfilter_arrayWiden(groupIndex, groupWidth); + groupCapacity = crossfilter_capacity(groupWidth); + } + } + } + + function removeData() { + if (k > 1) { + var oldK = k, + oldGroups = groups, + seenGroups = crossfilter_index(oldK, oldK); + + // Filter out non-matches by copying matching group index entries to + // the beginning of the array. + for (var i = 0, j = 0; i < n; ++i) { + if (filters[i]) { + seenGroups[groupIndex[j] = groupIndex[i]] = 1; + ++j; + } + } + + // Reassemble groups including only those groups that were referred + // to by matching group index entries. Note the new group index in + // seenGroups. + groups = [], k = 0; + for (i = 0; i < oldK; ++i) { + if (seenGroups[i]) { + seenGroups[i] = k++; + groups.push(oldGroups[i]); + } + } + + if (k > 1) { + // Reindex the group index using seenGroups to find the new index. + for (var i = 0; i < j; ++i) groupIndex[i] = seenGroups[groupIndex[i]]; + } else { + groupIndex = null; + } + filterListeners[filterListeners.indexOf(update)] = k > 1 + ? (reset = resetMany, update = updateMany) + : k === 1 ? (reset = resetOne, update = updateOne) + : reset = update = crossfilter_null; + } else if (k === 1) { + if (groupAll) return; + for (var i = 0; i < n; ++i) if (filters[i]) return; + groups = [], k = 0; + filterListeners[filterListeners.indexOf(update)] = + update = reset = crossfilter_null; + } + } + + // Reduces the specified selected or deselected records. + // This function is only used when the cardinality is greater than 1. + function updateMany(filterOne, added, removed) { + if (filterOne === one || resetNeeded) return; + + var i, + k, + n, + g; + + // Add the added values. + for (i = 0, n = added.length; i < n; ++i) { + if (!(filters[k = added[i]] & zero)) { + g = groups[groupIndex[k]]; + g.value = reduceAdd(g.value, data[k]); + } + } + + // Remove the removed values. + for (i = 0, n = removed.length; i < n; ++i) { + if ((filters[k = removed[i]] & zero) === filterOne) { + g = groups[groupIndex[k]]; + g.value = reduceRemove(g.value, data[k]); + } + } + } + + // Reduces the specified selected or deselected records. + // This function is only used when the cardinality is 1. + function updateOne(filterOne, added, removed) { + if (filterOne === one || resetNeeded) return; + + var i, + k, + n, + g = groups[0]; + + // Add the added values. + for (i = 0, n = added.length; i < n; ++i) { + if (!(filters[k = added[i]] & zero)) { + g.value = reduceAdd(g.value, data[k]); + } + } + + // Remove the removed values. + for (i = 0, n = removed.length; i < n; ++i) { + if ((filters[k = removed[i]] & zero) === filterOne) { + g.value = reduceRemove(g.value, data[k]); + } + } + } + + // Recomputes the group reduce values from scratch. + // This function is only used when the cardinality is greater than 1. + function resetMany() { + var i, + g; + + // Reset all group values. + for (i = 0; i < k; ++i) { + groups[i].value = reduceInitial(); + } + + // Add any selected records. + for (i = 0; i < n; ++i) { + if (!(filters[i] & zero)) { + g = groups[groupIndex[i]]; + g.value = reduceAdd(g.value, data[i]); + } + } + } + + // Recomputes the group reduce values from scratch. + // This function is only used when the cardinality is 1. + function resetOne() { + var i, + g = groups[0]; + + // Reset the singleton group values. + g.value = reduceInitial(); + + // Add any selected records. + for (i = 0; i < n; ++i) { + if (!(filters[i] & zero)) { + g.value = reduceAdd(g.value, data[i]); + } + } + } + + // Returns the array of group values, in the dimension's natural order. + function all() { + if (resetNeeded) reset(), resetNeeded = false; + return groups; + } + + // Returns a new array containing the top K group values, in reduce order. + function top(k) { + var top = select(all(), 0, groups.length, k); + return heap.sort(top, 0, top.length); + } + + // Sets the reduce behavior for this group to use the specified functions. + // This method lazily recomputes the reduce values, waiting until needed. + function reduce(add, remove, initial) { + reduceAdd = add; + reduceRemove = remove; + reduceInitial = initial; + resetNeeded = true; + return group; + } + + // A convenience method for reducing by count. + function reduceCount() { + return reduce(crossfilter_reduceIncrement, crossfilter_reduceDecrement, crossfilter_zero); + } + + // A convenience method for reducing by sum(value). + function reduceSum(value) { + return reduce(crossfilter_reduceAdd(value), crossfilter_reduceSubtract(value), crossfilter_zero); + } + + // Sets the reduce order, using the specified accessor. + function order(value) { + select = heapselect_by(valueOf); + heap = heap_by(valueOf); + function valueOf(d) { return value(d.value); } + return group; + } + + // A convenience method for natural ordering by reduce value. + function orderNatural() { + return order(crossfilter_identity); + } + + // Returns the cardinality of this group, irrespective of any filters. + function size() { + return k; + } + + // Removes this group and associated event listeners. + function dispose() { + var i = filterListeners.indexOf(update); + if (i >= 0) filterListeners.splice(i, 1); + i = indexListeners.indexOf(add); + if (i >= 0) indexListeners.splice(i, 1); + i = removeDataListeners.indexOf(removeData); + if (i >= 0) removeDataListeners.splice(i, 1); + return group; + } + + return reduceCount().orderNatural(); + } + + // A convenience function for generating a singleton group. + function groupAll() { + var g = group(crossfilter_null), all = g.all; + delete g.all; + delete g.top; + delete g.order; + delete g.orderNatural; + delete g.size; + g.value = function() { return all()[0].value; }; + return g; + } + + // Removes this dimension and associated groups and event listeners. + function dispose() { + dimensionGroups.forEach(function(group) { group.dispose(); }); + var i = dataListeners.indexOf(preAdd); + if (i >= 0) dataListeners.splice(i, 1); + i = dataListeners.indexOf(postAdd); + if (i >= 0) dataListeners.splice(i, 1); + i = removeDataListeners.indexOf(removeData); + if (i >= 0) removeDataListeners.splice(i, 1); + m &= zero; + return filterAll(); + } + + return dimension; + } + + // A convenience method for groupAll on a dummy dimension. + // This implementation can be optimized since it always has cardinality 1. + function groupAll() { + var group = { + reduce: reduce, + reduceCount: reduceCount, + reduceSum: reduceSum, + value: value, + dispose: dispose, + remove: dispose // for backwards-compatibility + }; + + var reduceValue, + reduceAdd, + reduceRemove, + reduceInitial, + resetNeeded = true; + + // The group listens to the crossfilter for when any dimension changes, so + // that it can update the reduce value. It must also listen to the parent + // dimension for when data is added. + filterListeners.push(update); + dataListeners.push(add); + + // For consistency; actually a no-op since resetNeeded is true. + add(data, 0, n); + + // Incorporates the specified new values into this group. + function add(newData, n0) { + var i; + + if (resetNeeded) return; + + // Add the added values. + for (i = n0; i < n; ++i) { + if (!filters[i]) { + reduceValue = reduceAdd(reduceValue, data[i]); + } + } + } + + // Reduces the specified selected or deselected records. + function update(filterOne, added, removed) { + var i, + k, + n; + + if (resetNeeded) return; + + // Add the added values. + for (i = 0, n = added.length; i < n; ++i) { + if (!filters[k = added[i]]) { + reduceValue = reduceAdd(reduceValue, data[k]); + } + } + + // Remove the removed values. + for (i = 0, n = removed.length; i < n; ++i) { + if (filters[k = removed[i]] === filterOne) { + reduceValue = reduceRemove(reduceValue, data[k]); + } + } + } + + // Recomputes the group reduce value from scratch. + function reset() { + var i; + + reduceValue = reduceInitial(); + + for (i = 0; i < n; ++i) { + if (!filters[i]) { + reduceValue = reduceAdd(reduceValue, data[i]); + } + } + } + + // Sets the reduce behavior for this group to use the specified functions. + // This method lazily recomputes the reduce value, waiting until needed. + function reduce(add, remove, initial) { + reduceAdd = add; + reduceRemove = remove; + reduceInitial = initial; + resetNeeded = true; + return group; + } + + // A convenience method for reducing by count. + function reduceCount() { + return reduce(crossfilter_reduceIncrement, crossfilter_reduceDecrement, crossfilter_zero); + } + + // A convenience method for reducing by sum(value). + function reduceSum(value) { + return reduce(crossfilter_reduceAdd(value), crossfilter_reduceSubtract(value), crossfilter_zero); + } + + // Returns the computed reduce value. + function value() { + if (resetNeeded) reset(), resetNeeded = false; + return reduceValue; + } + + // Removes this group and associated event listeners. + function dispose() { + var i = filterListeners.indexOf(update); + if (i >= 0) filterListeners.splice(i); + i = dataListeners.indexOf(add); + if (i >= 0) dataListeners.splice(i); + return group; + } + + return reduceCount(); + } + + // Returns the number of records in this crossfilter, irrespective of any filters. + function size() { + return n; + } + + return arguments.length + ? add(arguments[0]) + : crossfilter; +} + +// Returns an array of size n, big enough to store ids up to m. +function crossfilter_index(n, m) { + return (m < 0x101 + ? crossfilter_array8 : m < 0x10001 + ? crossfilter_array16 + : crossfilter_array32)(n); +} + +// Constructs a new array of size n, with sequential values from 0 to n - 1. +function crossfilter_range(n) { + var range = crossfilter_index(n, n); + for (var i = -1; ++i < n;) range[i] = i; + return range; +} + +function crossfilter_capacity(w) { + return w === 8 + ? 0x100 : w === 16 + ? 0x10000 + : 0x100000000; +} +})(typeof exports !== 'undefined' && exports || this); diff --git a/civicrm/bower_components/crossfilter-1.3.x/crossfilter.min.js b/civicrm/bower_components/crossfilter-1.3.x/crossfilter.min.js new file mode 100644 index 0000000000..7bb2c73edb --- /dev/null +++ b/civicrm/bower_components/crossfilter-1.3.x/crossfilter.min.js @@ -0,0 +1 @@ +!function(r){function n(r){return r}function t(r,n){for(var t=0,e=n.length,u=Array(e);e>t;++t)u[t]=r[n[t]];return u}function e(r){function n(n,t,e,u){for(;u>e;){var f=e+u>>>1;r(n[f])<t?e=f+1:u=f}return e}function t(n,t,e,u){for(;u>e;){var f=e+u>>>1;t<r(n[f])?u=f:e=f+1}return e}return t.right=t,t.left=n,t}function u(r){function n(r,n,t){for(var u=t-n,f=(u>>>1)+1;--f>0;)e(r,f,u,n);return r}function t(r,n,t){for(var u,f=t-n;--f>0;)u=r[n],r[n]=r[n+f],r[n+f]=u,e(r,1,f,n);return r}function e(n,t,e,u){for(var f,o=n[--u+t],i=r(o);(f=t<<1)<=e&&(e>f&&r(n[u+f])>r(n[u+f+1])&&f++,!(i<=r(n[u+f])));)n[u+t]=n[u+f],t=f;n[u+t]=o}return n.sort=t,n}function f(r){function n(n,e,u,f){var o,i,a,c,l=Array(f=Math.min(u-e,f));for(i=0;f>i;++i)l[i]=n[e++];if(t(l,0,f),u>e){o=r(l[0]);do(a=r(c=n[e])>o)&&(l[0]=c,o=r(t(l,0,f)[0]));while(++e<u)}return l}var t=u(r);return n}function o(r){function n(n,t,e){for(var u=t+1;e>u;++u){for(var f=u,o=n[u],i=r(o);f>t&&r(n[f-1])>i;--f)n[f]=n[f-1];n[f]=o}return n}return n}function i(r){function n(r,n,u){return(N>u-n?e:t)(r,n,u)}function t(t,e,u){var f,o=0|(u-e)/6,i=e+o,a=u-1-o,c=e+u-1>>1,l=c-o,v=c+o,s=t[i],h=r(s),d=t[l],p=r(d),g=t[c],y=r(g),m=t[v],x=r(m),b=t[a],A=r(b);h>p&&(f=s,s=d,d=f,f=h,h=p,p=f),x>A&&(f=m,m=b,b=f,f=x,x=A,A=f),h>y&&(f=s,s=g,g=f,f=h,h=y,y=f),p>y&&(f=d,d=g,g=f,f=p,p=y,y=f),h>x&&(f=s,s=m,m=f,f=h,h=x,x=f),y>x&&(f=g,g=m,m=f,f=y,y=x,x=f),p>A&&(f=d,d=b,b=f,f=p,p=A,A=f),p>y&&(f=d,d=g,g=f,f=p,p=y,y=f),x>A&&(f=m,m=b,b=f,f=x,x=A,A=f);var k=d,O=p,w=m,E=x;t[i]=s,t[l]=t[e],t[c]=g,t[v]=t[u-1],t[a]=b;var M=e+1,U=u-2,z=E>=O&&O>=E;if(z)for(var N=M;U>=N;++N){var C=t[N],S=r(C);if(O>S)N!==M&&(t[N]=t[M],t[M]=C),++M;else if(S>O)for(;;){var q=r(t[U]);{if(!(q>O)){if(O>q){t[N]=t[M],t[M++]=t[U],t[U--]=C;break}t[N]=t[U],t[U--]=C;break}U--}}}else for(var N=M;U>=N;N++){var C=t[N],S=r(C);if(O>S)N!==M&&(t[N]=t[M],t[M]=C),++M;else if(S>E)for(;;){var q=r(t[U]);{if(!(q>E)){O>q?(t[N]=t[M],t[M++]=t[U],t[U--]=C):(t[N]=t[U],t[U--]=C);break}if(U--,N>U)break}}}if(t[e]=t[M-1],t[M-1]=k,t[u-1]=t[U+1],t[U+1]=w,n(t,e,M-1),n(t,U+2,u),z)return t;if(i>M&&U>a){for(var F,q;(F=r(t[M]))<=O&&F>=O;)++M;for(;(q=r(t[U]))<=E&&q>=E;)--U;for(var N=M;U>=N;N++){var C=t[N],S=r(C);if(O>=S&&S>=O)N!==M&&(t[N]=t[M],t[M]=C),M++;else if(E>=S&&S>=E)for(;;){var q=r(t[U]);{if(!(E>=q&&q>=E)){O>q?(t[N]=t[M],t[M++]=t[U],t[U--]=C):(t[N]=t[U],t[U--]=C);break}if(U--,N>U)break}}}}return n(t,M,U+1)}var e=o(r);return n}function a(r){for(var n=Array(r),t=-1;++t<r;)n[t]=0;return n}function c(r,n){for(var t=r.length;n>t;)r[t++]=0;return r}function l(r,n){if(n>32)throw Error("invalid array width!");return r}function v(r,n){return function(t){var e=t.length;return[r.left(t,n,0,e),r.right(t,n,0,e)]}}function s(r,n){var t=n[0],e=n[1];return function(n){var u=n.length;return[r.left(n,t,0,u),r.left(n,e,0,u)]}}function h(r){return[0,r.length]}function d(){return null}function p(){return 0}function g(r){return r+1}function y(r){return r-1}function m(r){return function(n,t){return n+ +r(t)}}function x(r){return function(n,t){return n-r(t)}}function b(){function r(r){var n=E,t=r.length;return t&&(b=b.concat(r),z=F(z,E+=t),S.forEach(function(e){e(r,n,t)})),l}function e(){for(var r=A(E,E),n=[],t=0,e=0;E>t;++t)z[t]?r[t]=e++:n.push(t);N.forEach(function(r){r(0,[],n)}),q.forEach(function(n){n(r)});for(var u,t=0,e=0;E>t;++t)(u=z[t])&&(t!==e&&(z[e]=u,b[e]=b[t]),++e);for(b.length=e;E>e;)z[--E]=0}function o(r){function e(n,e,u){T=n.map(r),V=$(k(u),0,u),T=t(T,V);var f,o=_(T),i=o[0],a=o[1];if(W)for(f=0;u>f;++f)W(T[f],f)||(z[V[f]+e]|=Y);else{for(f=0;i>f;++f)z[V[f]+e]|=Y;for(f=a;u>f;++f)z[V[f]+e]|=Y}if(!e)return P=T,Q=V,tn=i,en=a,void 0;var c=P,l=Q,v=0,s=0;for(P=Array(E),Q=A(E,E),f=0;e>v&&u>s;++f)c[v]<T[s]?(P[f]=c[v],Q[f]=l[v++]):(P[f]=T[s],Q[f]=V[s++]+e);for(;e>v;++v,++f)P[f]=c[v],Q[f]=l[v];for(;u>s;++s,++f)P[f]=T[s],Q[f]=V[s]+e;o=_(P),tn=o[0],en=o[1]}function o(r,n,t){rn.forEach(function(r){r(T,V,n,t)}),T=V=null}function a(r){for(var n,t=0,e=0;E>t;++t)z[n=Q[t]]&&(t!==e&&(P[e]=P[t]),Q[e]=r[n],++e);for(P.length=e;E>e;)Q[e++]=0;var u=_(P);tn=u[0],en=u[1]}function c(r){var n=r[0],t=r[1];if(W)return W=null,G(function(r,e){return e>=n&&t>e}),tn=n,en=t,X;var e,u,f,o=[],i=[];if(tn>n)for(e=n,u=Math.min(tn,t);u>e;++e)z[f=Q[e]]^=Y,o.push(f);else if(n>tn)for(e=tn,u=Math.min(n,en);u>e;++e)z[f=Q[e]]^=Y,i.push(f);if(t>en)for(e=Math.max(n,en),u=t;u>e;++e)z[f=Q[e]]^=Y,o.push(f);else if(en>t)for(e=Math.max(tn,t),u=en;u>e;++e)z[f=Q[e]]^=Y,i.push(f);return tn=n,en=t,N.forEach(function(r){r(Y,o,i)}),X}function l(r){return null==r?B():Array.isArray(r)?j(r):"function"==typeof r?D(r):C(r)}function C(r){return c((_=v(w,r))(P))}function j(r){return c((_=s(w,r))(P))}function B(){return c((_=h)(P))}function D(r){return _=h,G(W=r),tn=0,en=E,X}function G(r){var n,t,e,u=[],f=[];for(n=0;E>n;++n)!(z[t=Q[n]]&Y)^!!(e=r(P[n],n))&&(e?(z[t]&=Z,u.push(t)):(z[t]|=Y,f.push(t)));N.forEach(function(r){r(Y,u,f)})}function H(r){for(var n,t=[],e=en;--e>=tn&&r>0;)z[n=Q[e]]||(t.push(b[n]),--r);return t}function I(r){for(var n,t=[],e=tn;en>e&&r>0;)z[n=Q[e]]||(t.push(b[n]),--r),e++;return t}function J(r){function t(n,t,e,u){function f(){++T===L&&(m=R(m,K<<=1),B=R(B,K),L=O(K))}var l,v,s,h,p,g,y=j,m=A(T,L),x=H,k=J,w=T,M=0,U=0;for(X&&(x=k=d),j=Array(T),T=0,B=w>1?F(B,E):A(E,L),w&&(s=(v=y[0]).key);u>U&&!((h=r(n[U]))>=h);)++U;for(;u>U;){for(v&&h>=s?(p=v,g=s,m[M]=T,(v=y[++M])&&(s=v.key)):(p={key:h,value:k()},g=h),j[T]=p;!(h>g||(B[l=t[U]+e]=T,z[l]&Z||(p.value=x(p.value,b[l])),++U>=u));)h=r(n[U]);f()}for(;w>M;)j[m[M]=T]=y[M++],f();if(T>M)for(M=0;e>M;++M)B[M]=m[B[M]];l=N.indexOf(V),T>1?(V=o,W=a):(!T&&$&&(T=1,j=[{key:null,value:k()}]),1===T?(V=i,W=c):(V=d,W=d),B=null),N[l]=V}function e(){if(T>1){for(var r=T,n=j,t=A(r,r),e=0,u=0;E>e;++e)z[e]&&(t[B[u]=B[e]]=1,++u);for(j=[],T=0,e=0;r>e;++e)t[e]&&(t[e]=T++,j.push(n[e]));if(T>1)for(var e=0;u>e;++e)B[e]=t[B[e]];else B=null;N[N.indexOf(V)]=T>1?(W=a,V=o):1===T?(W=c,V=i):W=V=d}else if(1===T){if($)return;for(var e=0;E>e;++e)if(z[e])return;j=[],T=0,N[N.indexOf(V)]=V=W=d}}function o(r,n,t){if(r!==Y&&!X){var e,u,f,o;for(e=0,f=n.length;f>e;++e)z[u=n[e]]&Z||(o=j[B[u]],o.value=H(o.value,b[u]));for(e=0,f=t.length;f>e;++e)(z[u=t[e]]&Z)===r&&(o=j[B[u]],o.value=I(o.value,b[u]))}}function i(r,n,t){if(r!==Y&&!X){var e,u,f,o=j[0];for(e=0,f=n.length;f>e;++e)z[u=n[e]]&Z||(o.value=H(o.value,b[u]));for(e=0,f=t.length;f>e;++e)(z[u=t[e]]&Z)===r&&(o.value=I(o.value,b[u]))}}function a(){var r,n;for(r=0;T>r;++r)j[r].value=J();for(r=0;E>r;++r)z[r]&Z||(n=j[B[r]],n.value=H(n.value,b[r]))}function c(){var r,n=j[0];for(n.value=J(),r=0;E>r;++r)z[r]&Z||(n.value=H(n.value,b[r]))}function l(){return X&&(W(),X=!1),j}function v(r){var n=D(l(),0,j.length,r);return G.sort(n,0,n.length)}function s(r,n,t){return H=r,I=n,J=t,X=!0,S}function h(){return s(g,y,p)}function k(r){return s(m(r),x(r),p)}function w(r){function n(n){return r(n.value)}return D=f(n),G=u(n),S}function M(){return w(n)}function U(){return T}function C(){var r=N.indexOf(V);return r>=0&&N.splice(r,1),r=rn.indexOf(t),r>=0&&rn.splice(r,1),r=q.indexOf(e),r>=0&&q.splice(r,1),S}var S={top:v,all:l,reduce:s,reduceCount:h,reduceSum:k,order:w,orderNatural:M,size:U,dispose:C,remove:C};nn.push(S);var j,B,D,G,H,I,J,K=8,L=O(K),T=0,V=d,W=d,X=!0,$=r===d;return arguments.length<1&&(r=n),N.push(V),rn.push(t),q.push(e),t(P,Q,0,E),h().orderNatural()}function K(){var r=J(d),n=r.all;return delete r.all,delete r.top,delete r.order,delete r.orderNatural,delete r.size,r.value=function(){return n()[0].value},r}function L(){nn.forEach(function(r){r.dispose()});var r=S.indexOf(e);return r>=0&&S.splice(r,1),r=S.indexOf(o),r>=0&&S.splice(r,1),r=q.indexOf(a),r>=0&&q.splice(r,1),M&=Z,B()}var P,Q,T,V,W,X={filter:l,filterExact:C,filterRange:j,filterFunction:D,filterAll:B,top:H,bottom:I,group:J,groupAll:K,dispose:L,remove:L},Y=~M&-~M,Z=~Y,$=i(function(r){return T[r]}),_=h,rn=[],nn=[],tn=0,en=0;return S.unshift(e),S.push(o),q.push(a),M|=Y,(U>=32?!Y:M&-(1<<U))&&(z=R(z,U<<=1)),e(b,0,E),o(b,0,E),X}function a(){function r(r,n){var t;if(!h)for(t=n;E>t;++t)z[t]||(a=c(a,b[t]))}function n(r,n,t){var e,u,f;if(!h){for(e=0,f=n.length;f>e;++e)z[u=n[e]]||(a=c(a,b[u]));for(e=0,f=t.length;f>e;++e)z[u=t[e]]===r&&(a=l(a,b[u]))}}function t(){var r;for(a=v(),r=0;E>r;++r)z[r]||(a=c(a,b[r]))}function e(r,n,t){return c=r,l=n,v=t,h=!0,s}function u(){return e(g,y,p)}function f(r){return e(m(r),x(r),p)}function o(){return h&&(t(),h=!1),a}function i(){var t=N.indexOf(n);return t>=0&&N.splice(t),t=S.indexOf(r),t>=0&&S.splice(t),s}var a,c,l,v,s={reduce:e,reduceCount:u,reduceSum:f,value:o,dispose:i,remove:i},h=!0;return N.push(n),S.push(r),r(b,0,E),u()}function c(){return E}var l={add:r,remove:e,dimension:o,groupAll:a,size:c},b=[],E=0,M=0,U=8,z=C(0),N=[],S=[],q=[];return arguments.length?r(arguments[0]):l}function A(r,n){return(257>n?C:65537>n?S:q)(r)}function k(r){for(var n=A(r,r),t=-1;++t<r;)n[t]=t;return n}function O(r){return 8===r?256:16===r?65536:4294967296}b.version="1.3.14",b.permute=t;var w=b.bisect=e(n);w.by=e;var E=b.heap=u(n);E.by=u;var M=b.heapselect=f(n);M.by=f;var U=b.insertionsort=o(n);U.by=o;var z=b.quicksort=i(n);z.by=i;var N=32,C=a,S=a,q=a,F=c,R=l;"undefined"!=typeof Uint8Array&&(C=function(r){return new Uint8Array(r)},S=function(r){return new Uint16Array(r)},q=function(r){return new Uint32Array(r)},F=function(r,n){if(r.length>=n)return r;var t=new r.constructor(n);return t.set(r),t},R=function(r,n){var t;switch(n){case 16:t=S(r.length);break;case 32:t=q(r.length);break;default:throw Error("invalid array width!")}return t.set(r),t}),r.crossfilter=b}("undefined"!=typeof exports&&exports||this); \ No newline at end of file diff --git a/civicrm/bower_components/crossfilter2/.bower.json b/civicrm/bower_components/crossfilter2/.bower.json new file mode 100644 index 0000000000..dc6f7ce790 --- /dev/null +++ b/civicrm/bower_components/crossfilter2/.bower.json @@ -0,0 +1,38 @@ +{ + "name": "crossfilter2", + "description": "Fast multidimensional filtering for coordinated views.", + "main": "crossfilter.min.js", + "license": "Apache-2.0", + "keywords": [ + "analytics", + "visualization", + "crossfilter" + ], + "homepage": "https://github.com/crossfilter/crossfilter", + "moduleType": [ + "globals", + "node" + ], + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "src", + "lib", + "test", + "component.json", + "package.json", + "index.js", + "Makefile" + ], + "version": "1.3.14", + "_release": "1.3.14", + "_resolution": { + "type": "version", + "tag": "1.3.14", + "commit": "8066669e84e13a8e3212df6dc20dee63f083cca2" + }, + "_source": "https://github.com/crossfilter/crossfilter.git", + "_target": "~1.3", + "_originalSource": "crossfilter2" +} \ No newline at end of file diff --git a/civicrm/bower_components/crossfilter2/CONTRIBUTING.md b/civicrm/bower_components/crossfilter2/CONTRIBUTING.md new file mode 100644 index 0000000000..4e2411bf92 --- /dev/null +++ b/civicrm/bower_components/crossfilter2/CONTRIBUTING.md @@ -0,0 +1,23 @@ +## Contributing To Crossfilter + +### Individual Contributor License Agreement + +Want to add support for a new backend or visualization? We'd love for you to participate in the development of Crossfilter. Before we can accept your pull request, please sign our [Individual Contributor License Agreement][1]. It's a short form that covers our bases and makes sure you're eligible to contribute. Thank you! + + [1]: https://spreadsheets.google.com/spreadsheet/viewform?formkey=dDViT2xzUHAwRkI3X3k5Z0lQM091OGc6MQ&ndplr=1 + +### Getting Help + +Full API documentation is kept [in the wiki][2]. If you have a question or need help using Crossfilter, please ask on Stackoverflow using the [crossfilter tag][3]. Feel free to file bug reports and other suggestions in the [github issue tracker][4]. + + [2]: https://github.com/square/crossfilter/wiki + [3]: http://stackoverflow.com/questions/tagged/crossfilter + [4]: https://github.com/square/crossfilter/issues + +### License + +Crossfilter is available under the [Apache License][5]. + + [5]: https://github.com/square/crossfilter/blob/master/LICENSE + + diff --git a/civicrm/bower_components/crossfilter2/LICENSE b/civicrm/bower_components/crossfilter2/LICENSE new file mode 100644 index 0000000000..a0ae5ddbc7 --- /dev/null +++ b/civicrm/bower_components/crossfilter2/LICENSE @@ -0,0 +1,12 @@ +Copyright 2012 Square, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. diff --git a/civicrm/bower_components/crossfilter2/README.md b/civicrm/bower_components/crossfilter2/README.md new file mode 100644 index 0000000000..a8e0b9175f --- /dev/null +++ b/civicrm/bower_components/crossfilter2/README.md @@ -0,0 +1,7 @@ +# Crossfilter + +**Crossfilter** is a JavaScript library for exploring large multivariate datasets in the browser. Crossfilter supports extremely fast (<30ms) interaction with coordinated views, even with datasets containing a million or more records; we built it to power analytics for Square Register, allowing merchants to slice and dice their payment history fluidly. + +Since most interactions only involve a single dimension, and then only small adjustments are made to the filter values, incremental filtering and reducing is significantly faster than starting from scratch. Crossfilter uses sorted indexes (and a few bit-twiddling hacks) to make this possible, dramatically increasing the perforÂmance of live histograms and top-K lists. Crossfilter is available under the [Apache License](/square/crossfilter/blob/master/LICENSE). + +Want to learn more? [See the wiki.](https://github.com/square/crossfilter/wiki) diff --git a/civicrm/bower_components/crossfilter2/bower.json b/civicrm/bower_components/crossfilter2/bower.json new file mode 100644 index 0000000000..c75d6ff0d9 --- /dev/null +++ b/civicrm/bower_components/crossfilter2/bower.json @@ -0,0 +1,28 @@ +{ + "name": "crossfilter2", + "description": "Fast multidimensional filtering for coordinated views.", + "main": "crossfilter.min.js", + "license": "Apache-2.0", + "keywords": [ + "analytics", + "visualization", + "crossfilter" + ], + "homepage": "https://github.com/crossfilter/crossfilter", + "moduleType": [ + "globals", + "node" + ], + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "src", + "lib", + "test", + "component.json", + "package.json", + "index.js", + "Makefile" + ] +} diff --git a/civicrm/bower_components/crossfilter2/crossfilter.js b/civicrm/bower_components/crossfilter2/crossfilter.js new file mode 100644 index 0000000000..a9b843b24b --- /dev/null +++ b/civicrm/bower_components/crossfilter2/crossfilter.js @@ -0,0 +1,1401 @@ +(function(exports){ +crossfilter.version = "1.3.14"; +function crossfilter_identity(d) { + return d; +} +crossfilter.permute = permute; + +function permute(array, index) { + for (var i = 0, n = index.length, copy = new Array(n); i < n; ++i) { + copy[i] = array[index[i]]; + } + return copy; +} +var bisect = crossfilter.bisect = bisect_by(crossfilter_identity); + +bisect.by = bisect_by; + +function bisect_by(f) { + + // Locate the insertion point for x in a to maintain sorted order. The + // arguments lo and hi may be used to specify a subset of the array which + // should be considered; by default the entire array is used. If x is already + // present in a, the insertion point will be before (to the left of) any + // existing entries. The return value is suitable for use as the first + // argument to `array.splice` assuming that a is already sorted. + // + // The returned insertion point i partitions the array a into two halves so + // that all v < x for v in a[lo:i] for the left side and all v >= x for v in + // a[i:hi] for the right side. + function bisectLeft(a, x, lo, hi) { + while (lo < hi) { + var mid = lo + hi >>> 1; + if (f(a[mid]) < x) lo = mid + 1; + else hi = mid; + } + return lo; + } + + // Similar to bisectLeft, but returns an insertion point which comes after (to + // the right of) any existing entries of x in a. + // + // The returned insertion point i partitions the array into two halves so that + // all v <= x for v in a[lo:i] for the left side and all v > x for v in + // a[i:hi] for the right side. + function bisectRight(a, x, lo, hi) { + while (lo < hi) { + var mid = lo + hi >>> 1; + if (x < f(a[mid])) hi = mid; + else lo = mid + 1; + } + return lo; + } + + bisectRight.right = bisectRight; + bisectRight.left = bisectLeft; + return bisectRight; +} +var heap = crossfilter.heap = heap_by(crossfilter_identity); + +heap.by = heap_by; + +function heap_by(f) { + + // Builds a binary heap within the specified array a[lo:hi]. The heap has the + // property such that the parent a[lo+i] is always less than or equal to its + // two children: a[lo+2*i+1] and a[lo+2*i+2]. + function heap(a, lo, hi) { + var n = hi - lo, + i = (n >>> 1) + 1; + while (--i > 0) sift(a, i, n, lo); + return a; + } + + // Sorts the specified array a[lo:hi] in descending order, assuming it is + // already a heap. + function sort(a, lo, hi) { + var n = hi - lo, + t; + while (--n > 0) t = a[lo], a[lo] = a[lo + n], a[lo + n] = t, sift(a, 1, n, lo); + return a; + } + + // Sifts the element a[lo+i-1] down the heap, where the heap is the contiguous + // slice of array a[lo:lo+n]. This method can also be used to update the heap + // incrementally, without incurring the full cost of reconstructing the heap. + function sift(a, i, n, lo) { + var d = a[--lo + i], + x = f(d), + child; + while ((child = i << 1) <= n) { + if (child < n && f(a[lo + child]) > f(a[lo + child + 1])) child++; + if (x <= f(a[lo + child])) break; + a[lo + i] = a[lo + child]; + i = child; + } + a[lo + i] = d; + } + + heap.sort = sort; + return heap; +} +var heapselect = crossfilter.heapselect = heapselect_by(crossfilter_identity); + +heapselect.by = heapselect_by; + +function heapselect_by(f) { + var heap = heap_by(f); + + // Returns a new array containing the top k elements in the array a[lo:hi]. + // The returned array is not sorted, but maintains the heap property. If k is + // greater than hi - lo, then fewer than k elements will be returned. The + // order of elements in a is unchanged by this operation. + function heapselect(a, lo, hi, k) { + var queue = new Array(k = Math.min(hi - lo, k)), + min, + i, + x, + d; + + for (i = 0; i < k; ++i) queue[i] = a[lo++]; + heap(queue, 0, k); + + if (lo < hi) { + min = f(queue[0]); + do { + if (x = f(d = a[lo]) > min) { + queue[0] = d; + min = f(heap(queue, 0, k)[0]); + } + } while (++lo < hi); + } + + return queue; + } + + return heapselect; +} +var insertionsort = crossfilter.insertionsort = insertionsort_by(crossfilter_identity); + +insertionsort.by = insertionsort_by; + +function insertionsort_by(f) { + + function insertionsort(a, lo, hi) { + for (var i = lo + 1; i < hi; ++i) { + for (var j = i, t = a[i], x = f(t); j > lo && f(a[j - 1]) > x; --j) { + a[j] = a[j - 1]; + } + a[j] = t; + } + return a; + } + + return insertionsort; +} +// Algorithm designed by Vladimir Yaroslavskiy. +// Implementation based on the Dart project; see lib/dart/LICENSE for details. + +var quicksort = crossfilter.quicksort = quicksort_by(crossfilter_identity); + +quicksort.by = quicksort_by; + +function quicksort_by(f) { + var insertionsort = insertionsort_by(f); + + function sort(a, lo, hi) { + return (hi - lo < quicksort_sizeThreshold + ? insertionsort + : quicksort)(a, lo, hi); + } + + function quicksort(a, lo, hi) { + // Compute the two pivots by looking at 5 elements. + var sixth = (hi - lo) / 6 | 0, + i1 = lo + sixth, + i5 = hi - 1 - sixth, + i3 = lo + hi - 1 >> 1, // The midpoint. + i2 = i3 - sixth, + i4 = i3 + sixth; + + var e1 = a[i1], x1 = f(e1), + e2 = a[i2], x2 = f(e2), + e3 = a[i3], x3 = f(e3), + e4 = a[i4], x4 = f(e4), + e5 = a[i5], x5 = f(e5); + + var t; + + // Sort the selected 5 elements using a sorting network. + if (x1 > x2) t = e1, e1 = e2, e2 = t, t = x1, x1 = x2, x2 = t; + if (x4 > x5) t = e4, e4 = e5, e5 = t, t = x4, x4 = x5, x5 = t; + if (x1 > x3) t = e1, e1 = e3, e3 = t, t = x1, x1 = x3, x3 = t; + if (x2 > x3) t = e2, e2 = e3, e3 = t, t = x2, x2 = x3, x3 = t; + if (x1 > x4) t = e1, e1 = e4, e4 = t, t = x1, x1 = x4, x4 = t; + if (x3 > x4) t = e3, e3 = e4, e4 = t, t = x3, x3 = x4, x4 = t; + if (x2 > x5) t = e2, e2 = e5, e5 = t, t = x2, x2 = x5, x5 = t; + if (x2 > x3) t = e2, e2 = e3, e3 = t, t = x2, x2 = x3, x3 = t; + if (x4 > x5) t = e4, e4 = e5, e5 = t, t = x4, x4 = x5, x5 = t; + + var pivot1 = e2, pivotValue1 = x2, + pivot2 = e4, pivotValue2 = x4; + + // e2 and e4 have been saved in the pivot variables. They will be written + // back, once the partitioning is finished. + a[i1] = e1; + a[i2] = a[lo]; + a[i3] = e3; + a[i4] = a[hi - 1]; + a[i5] = e5; + + var less = lo + 1, // First element in the middle partition. + great = hi - 2; // Last element in the middle partition. + + // Note that for value comparison, <, <=, >= and > coerce to a primitive via + // Object.prototype.valueOf; == and === do not, so in order to be consistent + // with natural order (such as for Date objects), we must do two compares. + var pivotsEqual = pivotValue1 <= pivotValue2 && pivotValue1 >= pivotValue2; + if (pivotsEqual) { + + // Degenerated case where the partitioning becomes a dutch national flag + // problem. + // + // [ | < pivot | == pivot | unpartitioned | > pivot | ] + // ^ ^ ^ ^ ^ + // left less k great right + // + // a[left] and a[right] are undefined and are filled after the + // partitioning. + // + // Invariants: + // 1) for x in ]left, less[ : x < pivot. + // 2) for x in [less, k[ : x == pivot. + // 3) for x in ]great, right[ : x > pivot. + for (var k = less; k <= great; ++k) { + var ek = a[k], xk = f(ek); + if (xk < pivotValue1) { + if (k !== less) { + a[k] = a[less]; + a[less] = ek; + } + ++less; + } else if (xk > pivotValue1) { + + // Find the first element <= pivot in the range [k - 1, great] and + // put [:ek:] there. We know that such an element must exist: + // When k == less, then el3 (which is equal to pivot) lies in the + // interval. Otherwise a[k - 1] == pivot and the search stops at k-1. + // Note that in the latter case invariant 2 will be violated for a + // short amount of time. The invariant will be restored when the + // pivots are put into their final positions. + while (true) { + var greatValue = f(a[great]); + if (greatValue > pivotValue1) { + great--; + // This is the only location in the while-loop where a new + // iteration is started. + continue; + } else if (greatValue < pivotValue1) { + // Triple exchange. + a[k] = a[less]; + a[less++] = a[great]; + a[great--] = ek; + break; + } else { + a[k] = a[great]; + a[great--] = ek; + // Note: if great < k then we will exit the outer loop and fix + // invariant 2 (which we just violated). + break; + } + } + } + } + } else { + + // We partition the list into three parts: + // 1. < pivot1 + // 2. >= pivot1 && <= pivot2 + // 3. > pivot2 + // + // During the loop we have: + // [ | < pivot1 | >= pivot1 && <= pivot2 | unpartitioned | > pivot2 | ] + // ^ ^ ^ ^ ^ + // left less k great right + // + // a[left] and a[right] are undefined and are filled after the + // partitioning. + // + // Invariants: + // 1. for x in ]left, less[ : x < pivot1 + // 2. for x in [less, k[ : pivot1 <= x && x <= pivot2 + // 3. for x in ]great, right[ : x > pivot2 + for (var k = less; k <= great; k++) { + var ek = a[k], xk = f(ek); + if (xk < pivotValue1) { + if (k !== less) { + a[k] = a[less]; + a[less] = ek; + } + ++less; + } else { + if (xk > pivotValue2) { + while (true) { + var greatValue = f(a[great]); + if (greatValue > pivotValue2) { + great--; + if (great < k) break; + // This is the only location inside the loop where a new + // iteration is started. + continue; + } else { + // a[great] <= pivot2. + if (greatValue < pivotValue1) { + // Triple exchange. + a[k] = a[less]; + a[less++] = a[great]; + a[great--] = ek; + } else { + // a[great] >= pivot1. + a[k] = a[great]; + a[great--] = ek; + } + break; + } + } + } + } + } + } + + // Move pivots into their final positions. + // We shrunk the list from both sides (a[left] and a[right] have + // meaningless values in them) and now we move elements from the first + // and third partition into these locations so that we can store the + // pivots. + a[lo] = a[less - 1]; + a[less - 1] = pivot1; + a[hi - 1] = a[great + 1]; + a[great + 1] = pivot2; + + // The list is now partitioned into three partitions: + // [ < pivot1 | >= pivot1 && <= pivot2 | > pivot2 ] + // ^ ^ ^ ^ + // left less great right + + // Recursive descent. (Don't include the pivot values.) + sort(a, lo, less - 1); + sort(a, great + 2, hi); + + if (pivotsEqual) { + // All elements in the second partition are equal to the pivot. No + // need to sort them. + return a; + } + + // In theory it should be enough to call _doSort recursively on the second + // partition. + // The Android source however removes the pivot elements from the recursive + // call if the second partition is too large (more than 2/3 of the list). + if (less < i1 && great > i5) { + var lessValue, greatValue; + while ((lessValue = f(a[less])) <= pivotValue1 && lessValue >= pivotValue1) ++less; + while ((greatValue = f(a[great])) <= pivotValue2 && greatValue >= pivotValue2) --great; + + // Copy paste of the previous 3-way partitioning with adaptions. + // + // We partition the list into three parts: + // 1. == pivot1 + // 2. > pivot1 && < pivot2 + // 3. == pivot2 + // + // During the loop we have: + // [ == pivot1 | > pivot1 && < pivot2 | unpartitioned | == pivot2 ] + // ^ ^ ^ + // less k great + // + // Invariants: + // 1. for x in [ *, less[ : x == pivot1 + // 2. for x in [less, k[ : pivot1 < x && x < pivot2 + // 3. for x in ]great, * ] : x == pivot2 + for (var k = less; k <= great; k++) { + var ek = a[k], xk = f(ek); + if (xk <= pivotValue1 && xk >= pivotValue1) { + if (k !== less) { + a[k] = a[less]; + a[less] = ek; + } + less++; + } else { + if (xk <= pivotValue2 && xk >= pivotValue2) { + while (true) { + var greatValue = f(a[great]); + if (greatValue <= pivotValue2 && greatValue >= pivotValue2) { + great--; + if (great < k) break; + // This is the only location inside the loop where a new + // iteration is started. + continue; + } else { + // a[great] < pivot2. + if (greatValue < pivotValue1) { + // Triple exchange. + a[k] = a[less]; + a[less++] = a[great]; + a[great--] = ek; + } else { + // a[great] == pivot1. + a[k] = a[great]; + a[great--] = ek; + } + break; + } + } + } + } + } + } + + // The second partition has now been cleared of pivot elements and looks + // as follows: + // [ * | > pivot1 && < pivot2 | * ] + // ^ ^ + // less great + // Sort the second partition using recursive descent. + + // The second partition looks as follows: + // [ * | >= pivot1 && <= pivot2 | * ] + // ^ ^ + // less great + // Simply sort it by recursive descent. + + return sort(a, less, great + 1); + } + + return sort; +} + +var quicksort_sizeThreshold = 32; +var crossfilter_array8 = crossfilter_arrayUntyped, + crossfilter_array16 = crossfilter_arrayUntyped, + crossfilter_array32 = crossfilter_arrayUntyped, + crossfilter_arrayLengthen = crossfilter_arrayLengthenUntyped, + crossfilter_arrayWiden = crossfilter_arrayWidenUntyped; + +if (typeof Uint8Array !== "undefined") { + crossfilter_array8 = function(n) { return new Uint8Array(n); }; + crossfilter_array16 = function(n) { return new Uint16Array(n); }; + crossfilter_array32 = function(n) { return new Uint32Array(n); }; + + crossfilter_arrayLengthen = function(array, length) { + if (array.length >= length) return array; + var copy = new array.constructor(length); + copy.set(array); + return copy; + }; + + crossfilter_arrayWiden = function(array, width) { + var copy; + switch (width) { + case 16: copy = crossfilter_array16(array.length); break; + case 32: copy = crossfilter_array32(array.length); break; + default: throw new Error("invalid array width!"); + } + copy.set(array); + return copy; + }; +} + +function crossfilter_arrayUntyped(n) { + var array = new Array(n), i = -1; + while (++i < n) array[i] = 0; + return array; +} + +function crossfilter_arrayLengthenUntyped(array, length) { + var n = array.length; + while (n < length) array[n++] = 0; + return array; +} + +function crossfilter_arrayWidenUntyped(array, width) { + if (width > 32) throw new Error("invalid array width!"); + return array; +} +function crossfilter_filterExact(bisect, value) { + return function(values) { + var n = values.length; + return [bisect.left(values, value, 0, n), bisect.right(values, value, 0, n)]; + }; +} + +function crossfilter_filterRange(bisect, range) { + var min = range[0], + max = range[1]; + return function(values) { + var n = values.length; + return [bisect.left(values, min, 0, n), bisect.left(values, max, 0, n)]; + }; +} + +function crossfilter_filterAll(values) { + return [0, values.length]; +} +function crossfilter_null() { + return null; +} +function crossfilter_zero() { + return 0; +} +function crossfilter_reduceIncrement(p) { + return p + 1; +} + +function crossfilter_reduceDecrement(p) { + return p - 1; +} + +function crossfilter_reduceAdd(f) { + return function(p, v) { + return p + +f(v); + }; +} + +function crossfilter_reduceSubtract(f) { + return function(p, v) { + return p - f(v); + }; +} +exports.crossfilter = crossfilter; + +function crossfilter() { + var crossfilter = { + add: add, + remove: removeData, + dimension: dimension, + groupAll: groupAll, + size: size + }; + + var data = [], // the records + n = 0, // the number of records; data.length + m = 0, // a bit mask representing which dimensions are in use + M = 8, // number of dimensions that can fit in `filters` + filters = crossfilter_array8(0), // M bits per record; 1 is filtered out + filterListeners = [], // when the filters change + dataListeners = [], // when data is added + removeDataListeners = []; // when data is removed + + // Adds the specified new records to this crossfilter. + function add(newData) { + var n0 = n, + n1 = newData.length; + + // If there's actually new data to add… + // Merge the new data into the existing data. + // Lengthen the filter bitset to handle the new records. + // Notify listeners (dimensions and groups) that new data is available. + if (n1) { + data = data.concat(newData); + filters = crossfilter_arrayLengthen(filters, n += n1); + dataListeners.forEach(function(l) { l(newData, n0, n1); }); + } + + return crossfilter; + } + + // Removes all records that match the current filters. + function removeData() { + var newIndex = crossfilter_index(n, n), + removed = []; + for (var i = 0, j = 0; i < n; ++i) { + if (filters[i]) newIndex[i] = j++; + else removed.push(i); + } + + // Remove all matching records from groups. + filterListeners.forEach(function(l) { l(0, [], removed); }); + + // Update indexes. + removeDataListeners.forEach(function(l) { l(newIndex); }); + + // Remove old filters and data by overwriting. + for (var i = 0, j = 0, k; i < n; ++i) { + if (k = filters[i]) { + if (i !== j) filters[j] = k, data[j] = data[i]; + ++j; + } + } + data.length = j; + while (n > j) filters[--n] = 0; + } + + // Adds a new dimension with the specified value accessor function. + function dimension(value) { + var dimension = { + filter: filter, + filterExact: filterExact, + filterRange: filterRange, + filterFunction: filterFunction, + filterAll: filterAll, + top: top, + bottom: bottom, + group: group, + groupAll: groupAll, + dispose: dispose, + remove: dispose // for backwards-compatibility + }; + + var one = ~m & -~m, // lowest unset bit as mask, e.g., 00001000 + zero = ~one, // inverted one, e.g., 11110111 + values, // sorted, cached array + index, // value rank ↦ object id + newValues, // temporary array storing newly-added values + newIndex, // temporary array storing newly-added index + sort = quicksort_by(function(i) { return newValues[i]; }), + refilter = crossfilter_filterAll, // for recomputing filter + refilterFunction, // the custom filter function in use + indexListeners = [], // when data is added + dimensionGroups = [], + lo0 = 0, + hi0 = 0; + + // Updating a dimension is a two-stage process. First, we must update the + // associated filters for the newly-added records. Once all dimensions have + // updated their filters, the groups are notified to update. + dataListeners.unshift(preAdd); + dataListeners.push(postAdd); + + removeDataListeners.push(removeData); + + // Incorporate any existing data into this dimension, and make sure that the + // filter bitset is wide enough to handle the new dimension. + m |= one; + if (M >= 32 ? !one : m & -(1 << M)) { + filters = crossfilter_arrayWiden(filters, M <<= 1); + } + preAdd(data, 0, n); + postAdd(data, 0, n); + + // Incorporates the specified new records into this dimension. + // This function is responsible for updating filters, values, and index. + function preAdd(newData, n0, n1) { + + // Permute new values into natural order using a sorted index. + newValues = newData.map(value); + newIndex = sort(crossfilter_range(n1), 0, n1); + newValues = permute(newValues, newIndex); + + // Bisect newValues to determine which new records are selected. + var bounds = refilter(newValues), lo1 = bounds[0], hi1 = bounds[1], i; + if (refilterFunction) { + for (i = 0; i < n1; ++i) { + if (!refilterFunction(newValues[i], i)) filters[newIndex[i] + n0] |= one; + } + } else { + for (i = 0; i < lo1; ++i) filters[newIndex[i] + n0] |= one; + for (i = hi1; i < n1; ++i) filters[newIndex[i] + n0] |= one; + } + + // If this dimension previously had no data, then we don't need to do the + // more expensive merge operation; use the new values and index as-is. + if (!n0) { + values = newValues; + index = newIndex; + lo0 = lo1; + hi0 = hi1; + return; + } + + var oldValues = values, + oldIndex = index, + i0 = 0, + i1 = 0; + + // Otherwise, create new arrays into which to merge new and old. + values = new Array(n); + index = crossfilter_index(n, n); + + // Merge the old and new sorted values, and old and new index. + for (i = 0; i0 < n0 && i1 < n1; ++i) { + if (oldValues[i0] < newValues[i1]) { + values[i] = oldValues[i0]; + index[i] = oldIndex[i0++]; + } else { + values[i] = newValues[i1]; + index[i] = newIndex[i1++] + n0; + } + } + + // Add any remaining old values. + for (; i0 < n0; ++i0, ++i) { + values[i] = oldValues[i0]; + index[i] = oldIndex[i0]; + } + + // Add any remaining new values. + for (; i1 < n1; ++i1, ++i) { + values[i] = newValues[i1]; + index[i] = newIndex[i1] + n0; + } + + // Bisect again to recompute lo0 and hi0. + bounds = refilter(values), lo0 = bounds[0], hi0 = bounds[1]; + } + + // When all filters have updated, notify index listeners of the new values. + function postAdd(newData, n0, n1) { + indexListeners.forEach(function(l) { l(newValues, newIndex, n0, n1); }); + newValues = newIndex = null; + } + + function removeData(reIndex) { + for (var i = 0, j = 0, k; i < n; ++i) { + if (filters[k = index[i]]) { + if (i !== j) values[j] = values[i]; + index[j] = reIndex[k]; + ++j; + } + } + values.length = j; + while (j < n) index[j++] = 0; + + // Bisect again to recompute lo0 and hi0. + var bounds = refilter(values); + lo0 = bounds[0], hi0 = bounds[1]; + } + + // Updates the selected values based on the specified bounds [lo, hi]. + // This implementation is used by all the public filter methods. + function filterIndexBounds(bounds) { + var lo1 = bounds[0], + hi1 = bounds[1]; + + if (refilterFunction) { + refilterFunction = null; + filterIndexFunction(function(d, i) { return lo1 <= i && i < hi1; }); + lo0 = lo1; + hi0 = hi1; + return dimension; + } + + var i, + j, + k, + added = [], + removed = []; + + // Fast incremental update based on previous lo index. + if (lo1 < lo0) { + for (i = lo1, j = Math.min(lo0, hi1); i < j; ++i) { + filters[k = index[i]] ^= one; + added.push(k); + } + } else if (lo1 > lo0) { + for (i = lo0, j = Math.min(lo1, hi0); i < j; ++i) { + filters[k = index[i]] ^= one; + removed.push(k); + } + } + + // Fast incremental update based on previous hi index. + if (hi1 > hi0) { + for (i = Math.max(lo1, hi0), j = hi1; i < j; ++i) { + filters[k = index[i]] ^= one; + added.push(k); + } + } else if (hi1 < hi0) { + for (i = Math.max(lo0, hi1), j = hi0; i < j; ++i) { + filters[k = index[i]] ^= one; + removed.push(k); + } + } + + lo0 = lo1; + hi0 = hi1; + filterListeners.forEach(function(l) { l(one, added, removed); }); + return dimension; + } + + // Filters this dimension using the specified range, value, or null. + // If the range is null, this is equivalent to filterAll. + // If the range is an array, this is equivalent to filterRange. + // Otherwise, this is equivalent to filterExact. + function filter(range) { + return range == null + ? filterAll() : Array.isArray(range) + ? filterRange(range) : typeof range === "function" + ? filterFunction(range) + : filterExact(range); + } + + // Filters this dimension to select the exact value. + function filterExact(value) { + return filterIndexBounds((refilter = crossfilter_filterExact(bisect, value))(values)); + } + + // Filters this dimension to select the specified range [lo, hi]. + // The lower bound is inclusive, and the upper bound is exclusive. + function filterRange(range) { + return filterIndexBounds((refilter = crossfilter_filterRange(bisect, range))(values)); + } + + // Clears any filters on this dimension. + function filterAll() { + return filterIndexBounds((refilter = crossfilter_filterAll)(values)); + } + + // Filters this dimension using an arbitrary function. + function filterFunction(f) { + refilter = crossfilter_filterAll; + + filterIndexFunction(refilterFunction = f); + + lo0 = 0; + hi0 = n; + + return dimension; + } + + function filterIndexFunction(f) { + var i, + k, + x, + added = [], + removed = []; + + for (i = 0; i < n; ++i) { + if (!(filters[k = index[i]] & one) ^ !!(x = f(values[i], i))) { + if (x) filters[k] &= zero, added.push(k); + else filters[k] |= one, removed.push(k); + } + } + filterListeners.forEach(function(l) { l(one, added, removed); }); + } + + // Returns the top K selected records based on this dimension's order. + // Note: observes this dimension's filter, unlike group and groupAll. + function top(k) { + var array = [], + i = hi0, + j; + + while (--i >= lo0 && k > 0) { + if (!filters[j = index[i]]) { + array.push(data[j]); + --k; + } + } + + return array; + } + + // Returns the bottom K selected records based on this dimension's order. + // Note: observes this dimension's filter, unlike group and groupAll. + function bottom(k) { + var array = [], + i = lo0, + j; + + while (i < hi0 && k > 0) { + if (!filters[j = index[i]]) { + array.push(data[j]); + --k; + } + i++; + } + + return array; + } + + // Adds a new group to this dimension, using the specified key function. + function group(key) { + var group = { + top: top, + all: all, + reduce: reduce, + reduceCount: reduceCount, + reduceSum: reduceSum, + order: order, + orderNatural: orderNatural, + size: size, + dispose: dispose, + remove: dispose // for backwards-compatibility + }; + + // Ensure that this group will be removed when the dimension is removed. + dimensionGroups.push(group); + + var groups, // array of {key, value} + groupIndex, // object id ↦ group id + groupWidth = 8, + groupCapacity = crossfilter_capacity(groupWidth), + k = 0, // cardinality + select, + heap, + reduceAdd, + reduceRemove, + reduceInitial, + update = crossfilter_null, + reset = crossfilter_null, + resetNeeded = true, + groupAll = key === crossfilter_null; + + if (arguments.length < 1) key = crossfilter_identity; + + // The group listens to the crossfilter for when any dimension changes, so + // that it can update the associated reduce values. It must also listen to + // the parent dimension for when data is added, and compute new keys. + filterListeners.push(update); + indexListeners.push(add); + removeDataListeners.push(removeData); + + // Incorporate any existing data into the grouping. + add(values, index, 0, n); + + // Incorporates the specified new values into this group. + // This function is responsible for updating groups and groupIndex. + function add(newValues, newIndex, n0, n1) { + var oldGroups = groups, + reIndex = crossfilter_index(k, groupCapacity), + add = reduceAdd, + initial = reduceInitial, + k0 = k, // old cardinality + i0 = 0, // index of old group + i1 = 0, // index of new record + j, // object id + g0, // old group + x0, // old key + x1, // new key + g, // group to add + x; // key of group to add + + // If a reset is needed, we don't need to update the reduce values. + if (resetNeeded) add = initial = crossfilter_null; + + // Reset the new groups (k is a lower bound). + // Also, make sure that groupIndex exists and is long enough. + groups = new Array(k), k = 0; + groupIndex = k0 > 1 ? crossfilter_arrayLengthen(groupIndex, n) : crossfilter_index(n, groupCapacity); + + // Get the first old key (x0 of g0), if it exists. + if (k0) x0 = (g0 = oldGroups[0]).key; + + // Find the first new key (x1), skipping NaN keys. + while (i1 < n1 && !((x1 = key(newValues[i1])) >= x1)) ++i1; + + // While new keys remain… + while (i1 < n1) { + + // Determine the lesser of the two current keys; new and old. + // If there are no old keys remaining, then always add the new key. + if (g0 && x0 <= x1) { + g = g0, x = x0; + + // Record the new index of the old group. + reIndex[i0] = k; + + // Retrieve the next old key. + if (g0 = oldGroups[++i0]) x0 = g0.key; + } else { + g = {key: x1, value: initial()}, x = x1; + } + + // Add the lesser group. + groups[k] = g; + + // Add any selected records belonging to the added group, while + // advancing the new key and populating the associated group index. + while (!(x1 > x)) { + groupIndex[j = newIndex[i1] + n0] = k; + if (!(filters[j] & zero)) g.value = add(g.value, data[j]); + if (++i1 >= n1) break; + x1 = key(newValues[i1]); + } + + groupIncrement(); + } + + // Add any remaining old groups that were greater than all new keys. + // No incremental reduce is needed; these groups have no new records. + // Also record the new index of the old group. + while (i0 < k0) { + groups[reIndex[i0] = k] = oldGroups[i0++]; + groupIncrement(); + } + + // If we added any new groups before any old groups, + // update the group index of all the old records. + if (k > i0) for (i0 = 0; i0 < n0; ++i0) { + groupIndex[i0] = reIndex[groupIndex[i0]]; + } + + // Modify the update and reset behavior based on the cardinality. + // If the cardinality is less than or equal to one, then the groupIndex + // is not needed. If the cardinality is zero, then there are no records + // and therefore no groups to update or reset. Note that we also must + // change the registered listener to point to the new method. + j = filterListeners.indexOf(update); + if (k > 1) { + update = updateMany; + reset = resetMany; + } else { + if (!k && groupAll) { + k = 1; + groups = [{key: null, value: initial()}]; + } + if (k === 1) { + update = updateOne; + reset = resetOne; + } else { + update = crossfilter_null; + reset = crossfilter_null; + } + groupIndex = null; + } + filterListeners[j] = update; + + // Count the number of added groups, + // and widen the group index as needed. + function groupIncrement() { + if (++k === groupCapacity) { + reIndex = crossfilter_arrayWiden(reIndex, groupWidth <<= 1); + groupIndex = crossfilter_arrayWiden(groupIndex, groupWidth); + groupCapacity = crossfilter_capacity(groupWidth); + } + } + } + + function removeData() { + if (k > 1) { + var oldK = k, + oldGroups = groups, + seenGroups = crossfilter_index(oldK, oldK); + + // Filter out non-matches by copying matching group index entries to + // the beginning of the array. + for (var i = 0, j = 0; i < n; ++i) { + if (filters[i]) { + seenGroups[groupIndex[j] = groupIndex[i]] = 1; + ++j; + } + } + + // Reassemble groups including only those groups that were referred + // to by matching group index entries. Note the new group index in + // seenGroups. + groups = [], k = 0; + for (i = 0; i < oldK; ++i) { + if (seenGroups[i]) { + seenGroups[i] = k++; + groups.push(oldGroups[i]); + } + } + + if (k > 1) { + // Reindex the group index using seenGroups to find the new index. + for (var i = 0; i < j; ++i) groupIndex[i] = seenGroups[groupIndex[i]]; + } else { + groupIndex = null; + } + filterListeners[filterListeners.indexOf(update)] = k > 1 + ? (reset = resetMany, update = updateMany) + : k === 1 ? (reset = resetOne, update = updateOne) + : reset = update = crossfilter_null; + } else if (k === 1) { + if (groupAll) return; + for (var i = 0; i < n; ++i) if (filters[i]) return; + groups = [], k = 0; + filterListeners[filterListeners.indexOf(update)] = + update = reset = crossfilter_null; + } + } + + // Reduces the specified selected or deselected records. + // This function is only used when the cardinality is greater than 1. + function updateMany(filterOne, added, removed) { + if (filterOne === one || resetNeeded) return; + + var i, + k, + n, + g; + + // Add the added values. + for (i = 0, n = added.length; i < n; ++i) { + if (!(filters[k = added[i]] & zero)) { + g = groups[groupIndex[k]]; + g.value = reduceAdd(g.value, data[k]); + } + } + + // Remove the removed values. + for (i = 0, n = removed.length; i < n; ++i) { + if ((filters[k = removed[i]] & zero) === filterOne) { + g = groups[groupIndex[k]]; + g.value = reduceRemove(g.value, data[k]); + } + } + } + + // Reduces the specified selected or deselected records. + // This function is only used when the cardinality is 1. + function updateOne(filterOne, added, removed) { + if (filterOne === one || resetNeeded) return; + + var i, + k, + n, + g = groups[0]; + + // Add the added values. + for (i = 0, n = added.length; i < n; ++i) { + if (!(filters[k = added[i]] & zero)) { + g.value = reduceAdd(g.value, data[k]); + } + } + + // Remove the removed values. + for (i = 0, n = removed.length; i < n; ++i) { + if ((filters[k = removed[i]] & zero) === filterOne) { + g.value = reduceRemove(g.value, data[k]); + } + } + } + + // Recomputes the group reduce values from scratch. + // This function is only used when the cardinality is greater than 1. + function resetMany() { + var i, + g; + + // Reset all group values. + for (i = 0; i < k; ++i) { + groups[i].value = reduceInitial(); + } + + // Add any selected records. + for (i = 0; i < n; ++i) { + if (!(filters[i] & zero)) { + g = groups[groupIndex[i]]; + g.value = reduceAdd(g.value, data[i]); + } + } + } + + // Recomputes the group reduce values from scratch. + // This function is only used when the cardinality is 1. + function resetOne() { + var i, + g = groups[0]; + + // Reset the singleton group values. + g.value = reduceInitial(); + + // Add any selected records. + for (i = 0; i < n; ++i) { + if (!(filters[i] & zero)) { + g.value = reduceAdd(g.value, data[i]); + } + } + } + + // Returns the array of group values, in the dimension's natural order. + function all() { + if (resetNeeded) reset(), resetNeeded = false; + return groups; + } + + // Returns a new array containing the top K group values, in reduce order. + function top(k) { + var top = select(all(), 0, groups.length, k); + return heap.sort(top, 0, top.length); + } + + // Sets the reduce behavior for this group to use the specified functions. + // This method lazily recomputes the reduce values, waiting until needed. + function reduce(add, remove, initial) { + reduceAdd = add; + reduceRemove = remove; + reduceInitial = initial; + resetNeeded = true; + return group; + } + + // A convenience method for reducing by count. + function reduceCount() { + return reduce(crossfilter_reduceIncrement, crossfilter_reduceDecrement, crossfilter_zero); + } + + // A convenience method for reducing by sum(value). + function reduceSum(value) { + return reduce(crossfilter_reduceAdd(value), crossfilter_reduceSubtract(value), crossfilter_zero); + } + + // Sets the reduce order, using the specified accessor. + function order(value) { + select = heapselect_by(valueOf); + heap = heap_by(valueOf); + function valueOf(d) { return value(d.value); } + return group; + } + + // A convenience method for natural ordering by reduce value. + function orderNatural() { + return order(crossfilter_identity); + } + + // Returns the cardinality of this group, irrespective of any filters. + function size() { + return k; + } + + // Removes this group and associated event listeners. + function dispose() { + var i = filterListeners.indexOf(update); + if (i >= 0) filterListeners.splice(i, 1); + i = indexListeners.indexOf(add); + if (i >= 0) indexListeners.splice(i, 1); + i = removeDataListeners.indexOf(removeData); + if (i >= 0) removeDataListeners.splice(i, 1); + return group; + } + + return reduceCount().orderNatural(); + } + + // A convenience function for generating a singleton group. + function groupAll() { + var g = group(crossfilter_null), all = g.all; + delete g.all; + delete g.top; + delete g.order; + delete g.orderNatural; + delete g.size; + g.value = function() { return all()[0].value; }; + return g; + } + + // Removes this dimension and associated groups and event listeners. + function dispose() { + dimensionGroups.forEach(function(group) { group.dispose(); }); + var i = dataListeners.indexOf(preAdd); + if (i >= 0) dataListeners.splice(i, 1); + i = dataListeners.indexOf(postAdd); + if (i >= 0) dataListeners.splice(i, 1); + i = removeDataListeners.indexOf(removeData); + if (i >= 0) removeDataListeners.splice(i, 1); + m &= zero; + return filterAll(); + } + + return dimension; + } + + // A convenience method for groupAll on a dummy dimension. + // This implementation can be optimized since it always has cardinality 1. + function groupAll() { + var group = { + reduce: reduce, + reduceCount: reduceCount, + reduceSum: reduceSum, + value: value, + dispose: dispose, + remove: dispose // for backwards-compatibility + }; + + var reduceValue, + reduceAdd, + reduceRemove, + reduceInitial, + resetNeeded = true; + + // The group listens to the crossfilter for when any dimension changes, so + // that it can update the reduce value. It must also listen to the parent + // dimension for when data is added. + filterListeners.push(update); + dataListeners.push(add); + + // For consistency; actually a no-op since resetNeeded is true. + add(data, 0, n); + + // Incorporates the specified new values into this group. + function add(newData, n0) { + var i; + + if (resetNeeded) return; + + // Add the added values. + for (i = n0; i < n; ++i) { + if (!filters[i]) { + reduceValue = reduceAdd(reduceValue, data[i]); + } + } + } + + // Reduces the specified selected or deselected records. + function update(filterOne, added, removed) { + var i, + k, + n; + + if (resetNeeded) return; + + // Add the added values. + for (i = 0, n = added.length; i < n; ++i) { + if (!filters[k = added[i]]) { + reduceValue = reduceAdd(reduceValue, data[k]); + } + } + + // Remove the removed values. + for (i = 0, n = removed.length; i < n; ++i) { + if (filters[k = removed[i]] === filterOne) { + reduceValue = reduceRemove(reduceValue, data[k]); + } + } + } + + // Recomputes the group reduce value from scratch. + function reset() { + var i; + + reduceValue = reduceInitial(); + + for (i = 0; i < n; ++i) { + if (!filters[i]) { + reduceValue = reduceAdd(reduceValue, data[i]); + } + } + } + + // Sets the reduce behavior for this group to use the specified functions. + // This method lazily recomputes the reduce value, waiting until needed. + function reduce(add, remove, initial) { + reduceAdd = add; + reduceRemove = remove; + reduceInitial = initial; + resetNeeded = true; + return group; + } + + // A convenience method for reducing by count. + function reduceCount() { + return reduce(crossfilter_reduceIncrement, crossfilter_reduceDecrement, crossfilter_zero); + } + + // A convenience method for reducing by sum(value). + function reduceSum(value) { + return reduce(crossfilter_reduceAdd(value), crossfilter_reduceSubtract(value), crossfilter_zero); + } + + // Returns the computed reduce value. + function value() { + if (resetNeeded) reset(), resetNeeded = false; + return reduceValue; + } + + // Removes this group and associated event listeners. + function dispose() { + var i = filterListeners.indexOf(update); + if (i >= 0) filterListeners.splice(i); + i = dataListeners.indexOf(add); + if (i >= 0) dataListeners.splice(i); + return group; + } + + return reduceCount(); + } + + // Returns the number of records in this crossfilter, irrespective of any filters. + function size() { + return n; + } + + return arguments.length + ? add(arguments[0]) + : crossfilter; +} + +// Returns an array of size n, big enough to store ids up to m. +function crossfilter_index(n, m) { + return (m < 0x101 + ? crossfilter_array8 : m < 0x10001 + ? crossfilter_array16 + : crossfilter_array32)(n); +} + +// Constructs a new array of size n, with sequential values from 0 to n - 1. +function crossfilter_range(n) { + var range = crossfilter_index(n, n); + for (var i = -1; ++i < n;) range[i] = i; + return range; +} + +function crossfilter_capacity(w) { + return w === 8 + ? 0x100 : w === 16 + ? 0x10000 + : 0x100000000; +} +})(typeof exports !== 'undefined' && exports || this); diff --git a/civicrm/bower_components/crossfilter2/crossfilter.min.js b/civicrm/bower_components/crossfilter2/crossfilter.min.js new file mode 100644 index 0000000000..7bb2c73edb --- /dev/null +++ b/civicrm/bower_components/crossfilter2/crossfilter.min.js @@ -0,0 +1 @@ +!function(r){function n(r){return r}function t(r,n){for(var t=0,e=n.length,u=Array(e);e>t;++t)u[t]=r[n[t]];return u}function e(r){function n(n,t,e,u){for(;u>e;){var f=e+u>>>1;r(n[f])<t?e=f+1:u=f}return e}function t(n,t,e,u){for(;u>e;){var f=e+u>>>1;t<r(n[f])?u=f:e=f+1}return e}return t.right=t,t.left=n,t}function u(r){function n(r,n,t){for(var u=t-n,f=(u>>>1)+1;--f>0;)e(r,f,u,n);return r}function t(r,n,t){for(var u,f=t-n;--f>0;)u=r[n],r[n]=r[n+f],r[n+f]=u,e(r,1,f,n);return r}function e(n,t,e,u){for(var f,o=n[--u+t],i=r(o);(f=t<<1)<=e&&(e>f&&r(n[u+f])>r(n[u+f+1])&&f++,!(i<=r(n[u+f])));)n[u+t]=n[u+f],t=f;n[u+t]=o}return n.sort=t,n}function f(r){function n(n,e,u,f){var o,i,a,c,l=Array(f=Math.min(u-e,f));for(i=0;f>i;++i)l[i]=n[e++];if(t(l,0,f),u>e){o=r(l[0]);do(a=r(c=n[e])>o)&&(l[0]=c,o=r(t(l,0,f)[0]));while(++e<u)}return l}var t=u(r);return n}function o(r){function n(n,t,e){for(var u=t+1;e>u;++u){for(var f=u,o=n[u],i=r(o);f>t&&r(n[f-1])>i;--f)n[f]=n[f-1];n[f]=o}return n}return n}function i(r){function n(r,n,u){return(N>u-n?e:t)(r,n,u)}function t(t,e,u){var f,o=0|(u-e)/6,i=e+o,a=u-1-o,c=e+u-1>>1,l=c-o,v=c+o,s=t[i],h=r(s),d=t[l],p=r(d),g=t[c],y=r(g),m=t[v],x=r(m),b=t[a],A=r(b);h>p&&(f=s,s=d,d=f,f=h,h=p,p=f),x>A&&(f=m,m=b,b=f,f=x,x=A,A=f),h>y&&(f=s,s=g,g=f,f=h,h=y,y=f),p>y&&(f=d,d=g,g=f,f=p,p=y,y=f),h>x&&(f=s,s=m,m=f,f=h,h=x,x=f),y>x&&(f=g,g=m,m=f,f=y,y=x,x=f),p>A&&(f=d,d=b,b=f,f=p,p=A,A=f),p>y&&(f=d,d=g,g=f,f=p,p=y,y=f),x>A&&(f=m,m=b,b=f,f=x,x=A,A=f);var k=d,O=p,w=m,E=x;t[i]=s,t[l]=t[e],t[c]=g,t[v]=t[u-1],t[a]=b;var M=e+1,U=u-2,z=E>=O&&O>=E;if(z)for(var N=M;U>=N;++N){var C=t[N],S=r(C);if(O>S)N!==M&&(t[N]=t[M],t[M]=C),++M;else if(S>O)for(;;){var q=r(t[U]);{if(!(q>O)){if(O>q){t[N]=t[M],t[M++]=t[U],t[U--]=C;break}t[N]=t[U],t[U--]=C;break}U--}}}else for(var N=M;U>=N;N++){var C=t[N],S=r(C);if(O>S)N!==M&&(t[N]=t[M],t[M]=C),++M;else if(S>E)for(;;){var q=r(t[U]);{if(!(q>E)){O>q?(t[N]=t[M],t[M++]=t[U],t[U--]=C):(t[N]=t[U],t[U--]=C);break}if(U--,N>U)break}}}if(t[e]=t[M-1],t[M-1]=k,t[u-1]=t[U+1],t[U+1]=w,n(t,e,M-1),n(t,U+2,u),z)return t;if(i>M&&U>a){for(var F,q;(F=r(t[M]))<=O&&F>=O;)++M;for(;(q=r(t[U]))<=E&&q>=E;)--U;for(var N=M;U>=N;N++){var C=t[N],S=r(C);if(O>=S&&S>=O)N!==M&&(t[N]=t[M],t[M]=C),M++;else if(E>=S&&S>=E)for(;;){var q=r(t[U]);{if(!(E>=q&&q>=E)){O>q?(t[N]=t[M],t[M++]=t[U],t[U--]=C):(t[N]=t[U],t[U--]=C);break}if(U--,N>U)break}}}}return n(t,M,U+1)}var e=o(r);return n}function a(r){for(var n=Array(r),t=-1;++t<r;)n[t]=0;return n}function c(r,n){for(var t=r.length;n>t;)r[t++]=0;return r}function l(r,n){if(n>32)throw Error("invalid array width!");return r}function v(r,n){return function(t){var e=t.length;return[r.left(t,n,0,e),r.right(t,n,0,e)]}}function s(r,n){var t=n[0],e=n[1];return function(n){var u=n.length;return[r.left(n,t,0,u),r.left(n,e,0,u)]}}function h(r){return[0,r.length]}function d(){return null}function p(){return 0}function g(r){return r+1}function y(r){return r-1}function m(r){return function(n,t){return n+ +r(t)}}function x(r){return function(n,t){return n-r(t)}}function b(){function r(r){var n=E,t=r.length;return t&&(b=b.concat(r),z=F(z,E+=t),S.forEach(function(e){e(r,n,t)})),l}function e(){for(var r=A(E,E),n=[],t=0,e=0;E>t;++t)z[t]?r[t]=e++:n.push(t);N.forEach(function(r){r(0,[],n)}),q.forEach(function(n){n(r)});for(var u,t=0,e=0;E>t;++t)(u=z[t])&&(t!==e&&(z[e]=u,b[e]=b[t]),++e);for(b.length=e;E>e;)z[--E]=0}function o(r){function e(n,e,u){T=n.map(r),V=$(k(u),0,u),T=t(T,V);var f,o=_(T),i=o[0],a=o[1];if(W)for(f=0;u>f;++f)W(T[f],f)||(z[V[f]+e]|=Y);else{for(f=0;i>f;++f)z[V[f]+e]|=Y;for(f=a;u>f;++f)z[V[f]+e]|=Y}if(!e)return P=T,Q=V,tn=i,en=a,void 0;var c=P,l=Q,v=0,s=0;for(P=Array(E),Q=A(E,E),f=0;e>v&&u>s;++f)c[v]<T[s]?(P[f]=c[v],Q[f]=l[v++]):(P[f]=T[s],Q[f]=V[s++]+e);for(;e>v;++v,++f)P[f]=c[v],Q[f]=l[v];for(;u>s;++s,++f)P[f]=T[s],Q[f]=V[s]+e;o=_(P),tn=o[0],en=o[1]}function o(r,n,t){rn.forEach(function(r){r(T,V,n,t)}),T=V=null}function a(r){for(var n,t=0,e=0;E>t;++t)z[n=Q[t]]&&(t!==e&&(P[e]=P[t]),Q[e]=r[n],++e);for(P.length=e;E>e;)Q[e++]=0;var u=_(P);tn=u[0],en=u[1]}function c(r){var n=r[0],t=r[1];if(W)return W=null,G(function(r,e){return e>=n&&t>e}),tn=n,en=t,X;var e,u,f,o=[],i=[];if(tn>n)for(e=n,u=Math.min(tn,t);u>e;++e)z[f=Q[e]]^=Y,o.push(f);else if(n>tn)for(e=tn,u=Math.min(n,en);u>e;++e)z[f=Q[e]]^=Y,i.push(f);if(t>en)for(e=Math.max(n,en),u=t;u>e;++e)z[f=Q[e]]^=Y,o.push(f);else if(en>t)for(e=Math.max(tn,t),u=en;u>e;++e)z[f=Q[e]]^=Y,i.push(f);return tn=n,en=t,N.forEach(function(r){r(Y,o,i)}),X}function l(r){return null==r?B():Array.isArray(r)?j(r):"function"==typeof r?D(r):C(r)}function C(r){return c((_=v(w,r))(P))}function j(r){return c((_=s(w,r))(P))}function B(){return c((_=h)(P))}function D(r){return _=h,G(W=r),tn=0,en=E,X}function G(r){var n,t,e,u=[],f=[];for(n=0;E>n;++n)!(z[t=Q[n]]&Y)^!!(e=r(P[n],n))&&(e?(z[t]&=Z,u.push(t)):(z[t]|=Y,f.push(t)));N.forEach(function(r){r(Y,u,f)})}function H(r){for(var n,t=[],e=en;--e>=tn&&r>0;)z[n=Q[e]]||(t.push(b[n]),--r);return t}function I(r){for(var n,t=[],e=tn;en>e&&r>0;)z[n=Q[e]]||(t.push(b[n]),--r),e++;return t}function J(r){function t(n,t,e,u){function f(){++T===L&&(m=R(m,K<<=1),B=R(B,K),L=O(K))}var l,v,s,h,p,g,y=j,m=A(T,L),x=H,k=J,w=T,M=0,U=0;for(X&&(x=k=d),j=Array(T),T=0,B=w>1?F(B,E):A(E,L),w&&(s=(v=y[0]).key);u>U&&!((h=r(n[U]))>=h);)++U;for(;u>U;){for(v&&h>=s?(p=v,g=s,m[M]=T,(v=y[++M])&&(s=v.key)):(p={key:h,value:k()},g=h),j[T]=p;!(h>g||(B[l=t[U]+e]=T,z[l]&Z||(p.value=x(p.value,b[l])),++U>=u));)h=r(n[U]);f()}for(;w>M;)j[m[M]=T]=y[M++],f();if(T>M)for(M=0;e>M;++M)B[M]=m[B[M]];l=N.indexOf(V),T>1?(V=o,W=a):(!T&&$&&(T=1,j=[{key:null,value:k()}]),1===T?(V=i,W=c):(V=d,W=d),B=null),N[l]=V}function e(){if(T>1){for(var r=T,n=j,t=A(r,r),e=0,u=0;E>e;++e)z[e]&&(t[B[u]=B[e]]=1,++u);for(j=[],T=0,e=0;r>e;++e)t[e]&&(t[e]=T++,j.push(n[e]));if(T>1)for(var e=0;u>e;++e)B[e]=t[B[e]];else B=null;N[N.indexOf(V)]=T>1?(W=a,V=o):1===T?(W=c,V=i):W=V=d}else if(1===T){if($)return;for(var e=0;E>e;++e)if(z[e])return;j=[],T=0,N[N.indexOf(V)]=V=W=d}}function o(r,n,t){if(r!==Y&&!X){var e,u,f,o;for(e=0,f=n.length;f>e;++e)z[u=n[e]]&Z||(o=j[B[u]],o.value=H(o.value,b[u]));for(e=0,f=t.length;f>e;++e)(z[u=t[e]]&Z)===r&&(o=j[B[u]],o.value=I(o.value,b[u]))}}function i(r,n,t){if(r!==Y&&!X){var e,u,f,o=j[0];for(e=0,f=n.length;f>e;++e)z[u=n[e]]&Z||(o.value=H(o.value,b[u]));for(e=0,f=t.length;f>e;++e)(z[u=t[e]]&Z)===r&&(o.value=I(o.value,b[u]))}}function a(){var r,n;for(r=0;T>r;++r)j[r].value=J();for(r=0;E>r;++r)z[r]&Z||(n=j[B[r]],n.value=H(n.value,b[r]))}function c(){var r,n=j[0];for(n.value=J(),r=0;E>r;++r)z[r]&Z||(n.value=H(n.value,b[r]))}function l(){return X&&(W(),X=!1),j}function v(r){var n=D(l(),0,j.length,r);return G.sort(n,0,n.length)}function s(r,n,t){return H=r,I=n,J=t,X=!0,S}function h(){return s(g,y,p)}function k(r){return s(m(r),x(r),p)}function w(r){function n(n){return r(n.value)}return D=f(n),G=u(n),S}function M(){return w(n)}function U(){return T}function C(){var r=N.indexOf(V);return r>=0&&N.splice(r,1),r=rn.indexOf(t),r>=0&&rn.splice(r,1),r=q.indexOf(e),r>=0&&q.splice(r,1),S}var S={top:v,all:l,reduce:s,reduceCount:h,reduceSum:k,order:w,orderNatural:M,size:U,dispose:C,remove:C};nn.push(S);var j,B,D,G,H,I,J,K=8,L=O(K),T=0,V=d,W=d,X=!0,$=r===d;return arguments.length<1&&(r=n),N.push(V),rn.push(t),q.push(e),t(P,Q,0,E),h().orderNatural()}function K(){var r=J(d),n=r.all;return delete r.all,delete r.top,delete r.order,delete r.orderNatural,delete r.size,r.value=function(){return n()[0].value},r}function L(){nn.forEach(function(r){r.dispose()});var r=S.indexOf(e);return r>=0&&S.splice(r,1),r=S.indexOf(o),r>=0&&S.splice(r,1),r=q.indexOf(a),r>=0&&q.splice(r,1),M&=Z,B()}var P,Q,T,V,W,X={filter:l,filterExact:C,filterRange:j,filterFunction:D,filterAll:B,top:H,bottom:I,group:J,groupAll:K,dispose:L,remove:L},Y=~M&-~M,Z=~Y,$=i(function(r){return T[r]}),_=h,rn=[],nn=[],tn=0,en=0;return S.unshift(e),S.push(o),q.push(a),M|=Y,(U>=32?!Y:M&-(1<<U))&&(z=R(z,U<<=1)),e(b,0,E),o(b,0,E),X}function a(){function r(r,n){var t;if(!h)for(t=n;E>t;++t)z[t]||(a=c(a,b[t]))}function n(r,n,t){var e,u,f;if(!h){for(e=0,f=n.length;f>e;++e)z[u=n[e]]||(a=c(a,b[u]));for(e=0,f=t.length;f>e;++e)z[u=t[e]]===r&&(a=l(a,b[u]))}}function t(){var r;for(a=v(),r=0;E>r;++r)z[r]||(a=c(a,b[r]))}function e(r,n,t){return c=r,l=n,v=t,h=!0,s}function u(){return e(g,y,p)}function f(r){return e(m(r),x(r),p)}function o(){return h&&(t(),h=!1),a}function i(){var t=N.indexOf(n);return t>=0&&N.splice(t),t=S.indexOf(r),t>=0&&S.splice(t),s}var a,c,l,v,s={reduce:e,reduceCount:u,reduceSum:f,value:o,dispose:i,remove:i},h=!0;return N.push(n),S.push(r),r(b,0,E),u()}function c(){return E}var l={add:r,remove:e,dimension:o,groupAll:a,size:c},b=[],E=0,M=0,U=8,z=C(0),N=[],S=[],q=[];return arguments.length?r(arguments[0]):l}function A(r,n){return(257>n?C:65537>n?S:q)(r)}function k(r){for(var n=A(r,r),t=-1;++t<r;)n[t]=t;return n}function O(r){return 8===r?256:16===r?65536:4294967296}b.version="1.3.14",b.permute=t;var w=b.bisect=e(n);w.by=e;var E=b.heap=u(n);E.by=u;var M=b.heapselect=f(n);M.by=f;var U=b.insertionsort=o(n);U.by=o;var z=b.quicksort=i(n);z.by=i;var N=32,C=a,S=a,q=a,F=c,R=l;"undefined"!=typeof Uint8Array&&(C=function(r){return new Uint8Array(r)},S=function(r){return new Uint16Array(r)},q=function(r){return new Uint32Array(r)},F=function(r,n){if(r.length>=n)return r;var t=new r.constructor(n);return t.set(r),t},R=function(r,n){var t;switch(n){case 16:t=S(r.length);break;case 32:t=q(r.length);break;default:throw Error("invalid array width!")}return t.set(r),t}),r.crossfilter=b}("undefined"!=typeof exports&&exports||this); \ No newline at end of file diff --git a/civicrm/bower_components/d3-3.5.x/.bower.json b/civicrm/bower_components/d3-3.5.x/.bower.json new file mode 100644 index 0000000000..c83d63af97 --- /dev/null +++ b/civicrm/bower_components/d3-3.5.x/.bower.json @@ -0,0 +1,18 @@ +{ + "name": "d3", + "description": "A JavaScript visualization library for HTML and SVG.", + "main": "d3.js", + "license": "BSD-3-Clause", + "ignore": [], + "homepage": "https://github.com/mbostock-bower/d3-bower", + "version": "3.5.17", + "_release": "3.5.17", + "_resolution": { + "type": "version", + "tag": "v3.5.17", + "commit": "abe0262a205c9f3755c3a757de4dfd1d49f34b24" + }, + "_source": "https://github.com/mbostock-bower/d3-bower.git", + "_target": "~3.5.17", + "_originalSource": "d3" +} \ No newline at end of file diff --git a/civicrm/bower_components/d3-3.5.x/LICENSE b/civicrm/bower_components/d3-3.5.x/LICENSE new file mode 100644 index 0000000000..ff3f2e5419 --- /dev/null +++ b/civicrm/bower_components/d3-3.5.x/LICENSE @@ -0,0 +1,26 @@ +Copyright (c) 2010-2016, Michael Bostock +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* The name Michael Bostock may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/civicrm/bower_components/d3-3.5.x/README.md b/civicrm/bower_components/d3-3.5.x/README.md new file mode 100644 index 0000000000..33e97bf18e --- /dev/null +++ b/civicrm/bower_components/d3-3.5.x/README.md @@ -0,0 +1,13 @@ +# Data-Driven Documents + +<a href="https://d3js.org"><img src="https://d3js.org/logo.svg" align="left" hspace="10" vspace="6"></a> + +**D3.js** is a JavaScript library for manipulating documents based on data. **D3** helps you bring data to life using HTML, SVG, and CSS. **D3** emphasizes web standards and combines powerful visualization components with a data-driven approach to DOM manipulation, giving you the full capabilities of modern browsers without tying yourself to a proprietary framework. + +Want to learn more? [See the wiki.](https://github.com/mbostock/d3/wiki) + +For examples, [see the gallery](https://github.com/mbostock/d3/wiki/Gallery) and [mbostock’s bl.ocks](http://bl.ocks.org/mbostock). + +## Good News, Everyone! + +The next major release of D3, 4.0, is coming! See the [4.0 development branch](https://github.com/mbostock/d3/tree/4) and read the [new API reference](https://github.com/mbostock/d3/blob/4/README.md) to get ready. diff --git a/civicrm/bower_components/d3-3.5.x/bower.json b/civicrm/bower_components/d3-3.5.x/bower.json new file mode 100644 index 0000000000..5bc3d4130a --- /dev/null +++ b/civicrm/bower_components/d3-3.5.x/bower.json @@ -0,0 +1,7 @@ +{ + "name": "d3", + "description": "A JavaScript visualization library for HTML and SVG.", + "main": "d3.js", + "license": "BSD-3-Clause", + "ignore": [] +} diff --git a/civicrm/bower_components/d3-3.5.x/d3.js b/civicrm/bower_components/d3-3.5.x/d3.js new file mode 100644 index 0000000000..aded45c440 --- /dev/null +++ b/civicrm/bower_components/d3-3.5.x/d3.js @@ -0,0 +1,9554 @@ +!function() { + var d3 = { + version: "3.5.17" + }; + var d3_arraySlice = [].slice, d3_array = function(list) { + return d3_arraySlice.call(list); + }; + var d3_document = this.document; + function d3_documentElement(node) { + return node && (node.ownerDocument || node.document || node).documentElement; + } + function d3_window(node) { + return node && (node.ownerDocument && node.ownerDocument.defaultView || node.document && node || node.defaultView); + } + if (d3_document) { + try { + d3_array(d3_document.documentElement.childNodes)[0].nodeType; + } catch (e) { + d3_array = function(list) { + var i = list.length, array = new Array(i); + while (i--) array[i] = list[i]; + return array; + }; + } + } + if (!Date.now) Date.now = function() { + return +new Date(); + }; + if (d3_document) { + try { + d3_document.createElement("DIV").style.setProperty("opacity", 0, ""); + } catch (error) { + var d3_element_prototype = this.Element.prototype, d3_element_setAttribute = d3_element_prototype.setAttribute, d3_element_setAttributeNS = d3_element_prototype.setAttributeNS, d3_style_prototype = this.CSSStyleDeclaration.prototype, d3_style_setProperty = d3_style_prototype.setProperty; + d3_element_prototype.setAttribute = function(name, value) { + d3_element_setAttribute.call(this, name, value + ""); + }; + d3_element_prototype.setAttributeNS = function(space, local, value) { + d3_element_setAttributeNS.call(this, space, local, value + ""); + }; + d3_style_prototype.setProperty = function(name, value, priority) { + d3_style_setProperty.call(this, name, value + "", priority); + }; + } + } + d3.ascending = d3_ascending; + function d3_ascending(a, b) { + return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; + } + d3.descending = function(a, b) { + return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; + }; + d3.min = function(array, f) { + var i = -1, n = array.length, a, b; + if (arguments.length === 1) { + while (++i < n) if ((b = array[i]) != null && b >= b) { + a = b; + break; + } + while (++i < n) if ((b = array[i]) != null && a > b) a = b; + } else { + while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) { + a = b; + break; + } + while (++i < n) if ((b = f.call(array, array[i], i)) != null && a > b) a = b; + } + return a; + }; + d3.max = function(array, f) { + var i = -1, n = array.length, a, b; + if (arguments.length === 1) { + while (++i < n) if ((b = array[i]) != null && b >= b) { + a = b; + break; + } + while (++i < n) if ((b = array[i]) != null && b > a) a = b; + } else { + while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) { + a = b; + break; + } + while (++i < n) if ((b = f.call(array, array[i], i)) != null && b > a) a = b; + } + return a; + }; + d3.extent = function(array, f) { + var i = -1, n = array.length, a, b, c; + if (arguments.length === 1) { + while (++i < n) if ((b = array[i]) != null && b >= b) { + a = c = b; + break; + } + while (++i < n) if ((b = array[i]) != null) { + if (a > b) a = b; + if (c < b) c = b; + } + } else { + while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) { + a = c = b; + break; + } + while (++i < n) if ((b = f.call(array, array[i], i)) != null) { + if (a > b) a = b; + if (c < b) c = b; + } + } + return [ a, c ]; + }; + function d3_number(x) { + return x === null ? NaN : +x; + } + function d3_numeric(x) { + return !isNaN(x); + } + d3.sum = function(array, f) { + var s = 0, n = array.length, a, i = -1; + if (arguments.length === 1) { + while (++i < n) if (d3_numeric(a = +array[i])) s += a; + } else { + while (++i < n) if (d3_numeric(a = +f.call(array, array[i], i))) s += a; + } + return s; + }; + d3.mean = function(array, f) { + var s = 0, n = array.length, a, i = -1, j = n; + if (arguments.length === 1) { + while (++i < n) if (d3_numeric(a = d3_number(array[i]))) s += a; else --j; + } else { + while (++i < n) if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) s += a; else --j; + } + if (j) return s / j; + }; + d3.quantile = function(values, p) { + var H = (values.length - 1) * p + 1, h = Math.floor(H), v = +values[h - 1], e = H - h; + return e ? v + e * (values[h] - v) : v; + }; + d3.median = function(array, f) { + var numbers = [], n = array.length, a, i = -1; + if (arguments.length === 1) { + while (++i < n) if (d3_numeric(a = d3_number(array[i]))) numbers.push(a); + } else { + while (++i < n) if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) numbers.push(a); + } + if (numbers.length) return d3.quantile(numbers.sort(d3_ascending), .5); + }; + d3.variance = function(array, f) { + var n = array.length, m = 0, a, d, s = 0, i = -1, j = 0; + if (arguments.length === 1) { + while (++i < n) { + if (d3_numeric(a = d3_number(array[i]))) { + d = a - m; + m += d / ++j; + s += d * (a - m); + } + } + } else { + while (++i < n) { + if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) { + d = a - m; + m += d / ++j; + s += d * (a - m); + } + } + } + if (j > 1) return s / (j - 1); + }; + d3.deviation = function() { + var v = d3.variance.apply(this, arguments); + return v ? Math.sqrt(v) : v; + }; + function d3_bisector(compare) { + return { + left: function(a, x, lo, hi) { + if (arguments.length < 3) lo = 0; + if (arguments.length < 4) hi = a.length; + while (lo < hi) { + var mid = lo + hi >>> 1; + if (compare(a[mid], x) < 0) lo = mid + 1; else hi = mid; + } + return lo; + }, + right: function(a, x, lo, hi) { + if (arguments.length < 3) lo = 0; + if (arguments.length < 4) hi = a.length; + while (lo < hi) { + var mid = lo + hi >>> 1; + if (compare(a[mid], x) > 0) hi = mid; else lo = mid + 1; + } + return lo; + } + }; + } + var d3_bisect = d3_bisector(d3_ascending); + d3.bisectLeft = d3_bisect.left; + d3.bisect = d3.bisectRight = d3_bisect.right; + d3.bisector = function(f) { + return d3_bisector(f.length === 1 ? function(d, x) { + return d3_ascending(f(d), x); + } : f); + }; + d3.shuffle = function(array, i0, i1) { + if ((m = arguments.length) < 3) { + i1 = array.length; + if (m < 2) i0 = 0; + } + var m = i1 - i0, t, i; + while (m) { + i = Math.random() * m-- | 0; + t = array[m + i0], array[m + i0] = array[i + i0], array[i + i0] = t; + } + return array; + }; + d3.permute = function(array, indexes) { + var i = indexes.length, permutes = new Array(i); + while (i--) permutes[i] = array[indexes[i]]; + return permutes; + }; + d3.pairs = function(array) { + var i = 0, n = array.length - 1, p0, p1 = array[0], pairs = new Array(n < 0 ? 0 : n); + while (i < n) pairs[i] = [ p0 = p1, p1 = array[++i] ]; + return pairs; + }; + d3.transpose = function(matrix) { + if (!(n = matrix.length)) return []; + for (var i = -1, m = d3.min(matrix, d3_transposeLength), transpose = new Array(m); ++i < m; ) { + for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n; ) { + row[j] = matrix[j][i]; + } + } + return transpose; + }; + function d3_transposeLength(d) { + return d.length; + } + d3.zip = function() { + return d3.transpose(arguments); + }; + d3.keys = function(map) { + var keys = []; + for (var key in map) keys.push(key); + return keys; + }; + d3.values = function(map) { + var values = []; + for (var key in map) values.push(map[key]); + return values; + }; + d3.entries = function(map) { + var entries = []; + for (var key in map) entries.push({ + key: key, + value: map[key] + }); + return entries; + }; + d3.merge = function(arrays) { + var n = arrays.length, m, i = -1, j = 0, merged, array; + while (++i < n) j += arrays[i].length; + merged = new Array(j); + while (--n >= 0) { + array = arrays[n]; + m = array.length; + while (--m >= 0) { + merged[--j] = array[m]; + } + } + return merged; + }; + var abs = Math.abs; + d3.range = function(start, stop, step) { + if (arguments.length < 3) { + step = 1; + if (arguments.length < 2) { + stop = start; + start = 0; + } + } + if ((stop - start) / step === Infinity) throw new Error("infinite range"); + var range = [], k = d3_range_integerScale(abs(step)), i = -1, j; + start *= k, stop *= k, step *= k; + if (step < 0) while ((j = start + step * ++i) > stop) range.push(j / k); else while ((j = start + step * ++i) < stop) range.push(j / k); + return range; + }; + function d3_range_integerScale(x) { + var k = 1; + while (x * k % 1) k *= 10; + return k; + } + function d3_class(ctor, properties) { + for (var key in properties) { + Object.defineProperty(ctor.prototype, key, { + value: properties[key], + enumerable: false + }); + } + } + d3.map = function(object, f) { + var map = new d3_Map(); + if (object instanceof d3_Map) { + object.forEach(function(key, value) { + map.set(key, value); + }); + } else if (Array.isArray(object)) { + var i = -1, n = object.length, o; + if (arguments.length === 1) while (++i < n) map.set(i, object[i]); else while (++i < n) map.set(f.call(object, o = object[i], i), o); + } else { + for (var key in object) map.set(key, object[key]); + } + return map; + }; + function d3_Map() { + this._ = Object.create(null); + } + var d3_map_proto = "__proto__", d3_map_zero = "\x00"; + d3_class(d3_Map, { + has: d3_map_has, + get: function(key) { + return this._[d3_map_escape(key)]; + }, + set: function(key, value) { + return this._[d3_map_escape(key)] = value; + }, + remove: d3_map_remove, + keys: d3_map_keys, + values: function() { + var values = []; + for (var key in this._) values.push(this._[key]); + return values; + }, + entries: function() { + var entries = []; + for (var key in this._) entries.push({ + key: d3_map_unescape(key), + value: this._[key] + }); + return entries; + }, + size: d3_map_size, + empty: d3_map_empty, + forEach: function(f) { + for (var key in this._) f.call(this, d3_map_unescape(key), this._[key]); + } + }); + function d3_map_escape(key) { + return (key += "") === d3_map_proto || key[0] === d3_map_zero ? d3_map_zero + key : key; + } + function d3_map_unescape(key) { + return (key += "")[0] === d3_map_zero ? key.slice(1) : key; + } + function d3_map_has(key) { + return d3_map_escape(key) in this._; + } + function d3_map_remove(key) { + return (key = d3_map_escape(key)) in this._ && delete this._[key]; + } + function d3_map_keys() { + var keys = []; + for (var key in this._) keys.push(d3_map_unescape(key)); + return keys; + } + function d3_map_size() { + var size = 0; + for (var key in this._) ++size; + return size; + } + function d3_map_empty() { + for (var key in this._) return false; + return true; + } + d3.nest = function() { + var nest = {}, keys = [], sortKeys = [], sortValues, rollup; + function map(mapType, array, depth) { + if (depth >= keys.length) return rollup ? rollup.call(nest, array) : sortValues ? array.sort(sortValues) : array; + var i = -1, n = array.length, key = keys[depth++], keyValue, object, setter, valuesByKey = new d3_Map(), values; + while (++i < n) { + if (values = valuesByKey.get(keyValue = key(object = array[i]))) { + values.push(object); + } else { + valuesByKey.set(keyValue, [ object ]); + } + } + if (mapType) { + object = mapType(); + setter = function(keyValue, values) { + object.set(keyValue, map(mapType, values, depth)); + }; + } else { + object = {}; + setter = function(keyValue, values) { + object[keyValue] = map(mapType, values, depth); + }; + } + valuesByKey.forEach(setter); + return object; + } + function entries(map, depth) { + if (depth >= keys.length) return map; + var array = [], sortKey = sortKeys[depth++]; + map.forEach(function(key, keyMap) { + array.push({ + key: key, + values: entries(keyMap, depth) + }); + }); + return sortKey ? array.sort(function(a, b) { + return sortKey(a.key, b.key); + }) : array; + } + nest.map = function(array, mapType) { + return map(mapType, array, 0); + }; + nest.entries = function(array) { + return entries(map(d3.map, array, 0), 0); + }; + nest.key = function(d) { + keys.push(d); + return nest; + }; + nest.sortKeys = function(order) { + sortKeys[keys.length - 1] = order; + return nest; + }; + nest.sortValues = function(order) { + sortValues = order; + return nest; + }; + nest.rollup = function(f) { + rollup = f; + return nest; + }; + return nest; + }; + d3.set = function(array) { + var set = new d3_Set(); + if (array) for (var i = 0, n = array.length; i < n; ++i) set.add(array[i]); + return set; + }; + function d3_Set() { + this._ = Object.create(null); + } + d3_class(d3_Set, { + has: d3_map_has, + add: function(key) { + this._[d3_map_escape(key += "")] = true; + return key; + }, + remove: d3_map_remove, + values: d3_map_keys, + size: d3_map_size, + empty: d3_map_empty, + forEach: function(f) { + for (var key in this._) f.call(this, d3_map_unescape(key)); + } + }); + d3.behavior = {}; + function d3_identity(d) { + return d; + } + d3.rebind = function(target, source) { + var i = 1, n = arguments.length, method; + while (++i < n) target[method = arguments[i]] = d3_rebind(target, source, source[method]); + return target; + }; + function d3_rebind(target, source, method) { + return function() { + var value = method.apply(source, arguments); + return value === source ? target : value; + }; + } + function d3_vendorSymbol(object, name) { + if (name in object) return name; + name = name.charAt(0).toUpperCase() + name.slice(1); + for (var i = 0, n = d3_vendorPrefixes.length; i < n; ++i) { + var prefixName = d3_vendorPrefixes[i] + name; + if (prefixName in object) return prefixName; + } + } + var d3_vendorPrefixes = [ "webkit", "ms", "moz", "Moz", "o", "O" ]; + function d3_noop() {} + d3.dispatch = function() { + var dispatch = new d3_dispatch(), i = -1, n = arguments.length; + while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch); + return dispatch; + }; + function d3_dispatch() {} + d3_dispatch.prototype.on = function(type, listener) { + var i = type.indexOf("."), name = ""; + if (i >= 0) { + name = type.slice(i + 1); + type = type.slice(0, i); + } + if (type) return arguments.length < 2 ? this[type].on(name) : this[type].on(name, listener); + if (arguments.length === 2) { + if (listener == null) for (type in this) { + if (this.hasOwnProperty(type)) this[type].on(name, null); + } + return this; + } + }; + function d3_dispatch_event(dispatch) { + var listeners = [], listenerByName = new d3_Map(); + function event() { + var z = listeners, i = -1, n = z.length, l; + while (++i < n) if (l = z[i].on) l.apply(this, arguments); + return dispatch; + } + event.on = function(name, listener) { + var l = listenerByName.get(name), i; + if (arguments.length < 2) return l && l.on; + if (l) { + l.on = null; + listeners = listeners.slice(0, i = listeners.indexOf(l)).concat(listeners.slice(i + 1)); + listenerByName.remove(name); + } + if (listener) listeners.push(listenerByName.set(name, { + on: listener + })); + return dispatch; + }; + return event; + } + d3.event = null; + function d3_eventPreventDefault() { + d3.event.preventDefault(); + } + function d3_eventSource() { + var e = d3.event, s; + while (s = e.sourceEvent) e = s; + return e; + } + function d3_eventDispatch(target) { + var dispatch = new d3_dispatch(), i = 0, n = arguments.length; + while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch); + dispatch.of = function(thiz, argumentz) { + return function(e1) { + try { + var e0 = e1.sourceEvent = d3.event; + e1.target = target; + d3.event = e1; + dispatch[e1.type].apply(thiz, argumentz); + } finally { + d3.event = e0; + } + }; + }; + return dispatch; + } + d3.requote = function(s) { + return s.replace(d3_requote_re, "\\$&"); + }; + var d3_requote_re = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g; + var d3_subclass = {}.__proto__ ? function(object, prototype) { + object.__proto__ = prototype; + } : function(object, prototype) { + for (var property in prototype) object[property] = prototype[property]; + }; + function d3_selection(groups) { + d3_subclass(groups, d3_selectionPrototype); + return groups; + } + var d3_select = function(s, n) { + return n.querySelector(s); + }, d3_selectAll = function(s, n) { + return n.querySelectorAll(s); + }, d3_selectMatches = function(n, s) { + var d3_selectMatcher = n.matches || n[d3_vendorSymbol(n, "matchesSelector")]; + d3_selectMatches = function(n, s) { + return d3_selectMatcher.call(n, s); + }; + return d3_selectMatches(n, s); + }; + if (typeof Sizzle === "function") { + d3_select = function(s, n) { + return Sizzle(s, n)[0] || null; + }; + d3_selectAll = Sizzle; + d3_selectMatches = Sizzle.matchesSelector; + } + d3.selection = function() { + return d3.select(d3_document.documentElement); + }; + var d3_selectionPrototype = d3.selection.prototype = []; + d3_selectionPrototype.select = function(selector) { + var subgroups = [], subgroup, subnode, group, node; + selector = d3_selection_selector(selector); + for (var j = -1, m = this.length; ++j < m; ) { + subgroups.push(subgroup = []); + subgroup.parentNode = (group = this[j]).parentNode; + for (var i = -1, n = group.length; ++i < n; ) { + if (node = group[i]) { + subgroup.push(subnode = selector.call(node, node.__data__, i, j)); + if (subnode && "__data__" in node) subnode.__data__ = node.__data__; + } else { + subgroup.push(null); + } + } + } + return d3_selection(subgroups); + }; + function d3_selection_selector(selector) { + return typeof selector === "function" ? selector : function() { + return d3_select(selector, this); + }; + } + d3_selectionPrototype.selectAll = function(selector) { + var subgroups = [], subgroup, node; + selector = d3_selection_selectorAll(selector); + for (var j = -1, m = this.length; ++j < m; ) { + for (var group = this[j], i = -1, n = group.length; ++i < n; ) { + if (node = group[i]) { + subgroups.push(subgroup = d3_array(selector.call(node, node.__data__, i, j))); + subgroup.parentNode = node; + } + } + } + return d3_selection(subgroups); + }; + function d3_selection_selectorAll(selector) { + return typeof selector === "function" ? selector : function() { + return d3_selectAll(selector, this); + }; + } + var d3_nsXhtml = "http://www.w3.org/1999/xhtml"; + var d3_nsPrefix = { + svg: "http://www.w3.org/2000/svg", + xhtml: d3_nsXhtml, + xlink: "http://www.w3.org/1999/xlink", + xml: "http://www.w3.org/XML/1998/namespace", + xmlns: "http://www.w3.org/2000/xmlns/" + }; + d3.ns = { + prefix: d3_nsPrefix, + qualify: function(name) { + var i = name.indexOf(":"), prefix = name; + if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1); + return d3_nsPrefix.hasOwnProperty(prefix) ? { + space: d3_nsPrefix[prefix], + local: name + } : name; + } + }; + d3_selectionPrototype.attr = function(name, value) { + if (arguments.length < 2) { + if (typeof name === "string") { + var node = this.node(); + name = d3.ns.qualify(name); + return name.local ? node.getAttributeNS(name.space, name.local) : node.getAttribute(name); + } + for (value in name) this.each(d3_selection_attr(value, name[value])); + return this; + } + return this.each(d3_selection_attr(name, value)); + }; + function d3_selection_attr(name, value) { + name = d3.ns.qualify(name); + function attrNull() { + this.removeAttribute(name); + } + function attrNullNS() { + this.removeAttributeNS(name.space, name.local); + } + function attrConstant() { + this.setAttribute(name, value); + } + function attrConstantNS() { + this.setAttributeNS(name.space, name.local, value); + } + function attrFunction() { + var x = value.apply(this, arguments); + if (x == null) this.removeAttribute(name); else this.setAttribute(name, x); + } + function attrFunctionNS() { + var x = value.apply(this, arguments); + if (x == null) this.removeAttributeNS(name.space, name.local); else this.setAttributeNS(name.space, name.local, x); + } + return value == null ? name.local ? attrNullNS : attrNull : typeof value === "function" ? name.local ? attrFunctionNS : attrFunction : name.local ? attrConstantNS : attrConstant; + } + function d3_collapse(s) { + return s.trim().replace(/\s+/g, " "); + } + d3_selectionPrototype.classed = function(name, value) { + if (arguments.length < 2) { + if (typeof name === "string") { + var node = this.node(), n = (name = d3_selection_classes(name)).length, i = -1; + if (value = node.classList) { + while (++i < n) if (!value.contains(name[i])) return false; + } else { + value = node.getAttribute("class"); + while (++i < n) if (!d3_selection_classedRe(name[i]).test(value)) return false; + } + return true; + } + for (value in name) this.each(d3_selection_classed(value, name[value])); + return this; + } + return this.each(d3_selection_classed(name, value)); + }; + function d3_selection_classedRe(name) { + return new RegExp("(?:^|\\s+)" + d3.requote(name) + "(?:\\s+|$)", "g"); + } + function d3_selection_classes(name) { + return (name + "").trim().split(/^|\s+/); + } + function d3_selection_classed(name, value) { + name = d3_selection_classes(name).map(d3_selection_classedName); + var n = name.length; + function classedConstant() { + var i = -1; + while (++i < n) name[i](this, value); + } + function classedFunction() { + var i = -1, x = value.apply(this, arguments); + while (++i < n) name[i](this, x); + } + return typeof value === "function" ? classedFunction : classedConstant; + } + function d3_selection_classedName(name) { + var re = d3_selection_classedRe(name); + return function(node, value) { + if (c = node.classList) return value ? c.add(name) : c.remove(name); + var c = node.getAttribute("class") || ""; + if (value) { + re.lastIndex = 0; + if (!re.test(c)) node.setAttribute("class", d3_collapse(c + " " + name)); + } else { + node.setAttribute("class", d3_collapse(c.replace(re, " "))); + } + }; + } + d3_selectionPrototype.style = function(name, value, priority) { + var n = arguments.length; + if (n < 3) { + if (typeof name !== "string") { + if (n < 2) value = ""; + for (priority in name) this.each(d3_selection_style(priority, name[priority], value)); + return this; + } + if (n < 2) { + var node = this.node(); + return d3_window(node).getComputedStyle(node, null).getPropertyValue(name); + } + priority = ""; + } + return this.each(d3_selection_style(name, value, priority)); + }; + function d3_selection_style(name, value, priority) { + function styleNull() { + this.style.removeProperty(name); + } + function styleConstant() { + this.style.setProperty(name, value, priority); + } + function styleFunction() { + var x = value.apply(this, arguments); + if (x == null) this.style.removeProperty(name); else this.style.setProperty(name, x, priority); + } + return value == null ? styleNull : typeof value === "function" ? styleFunction : styleConstant; + } + d3_selectionPrototype.property = function(name, value) { + if (arguments.length < 2) { + if (typeof name === "string") return this.node()[name]; + for (value in name) this.each(d3_selection_property(value, name[value])); + return this; + } + return this.each(d3_selection_property(name, value)); + }; + function d3_selection_property(name, value) { + function propertyNull() { + delete this[name]; + } + function propertyConstant() { + this[name] = value; + } + function propertyFunction() { + var x = value.apply(this, arguments); + if (x == null) delete this[name]; else this[name] = x; + } + return value == null ? propertyNull : typeof value === "function" ? propertyFunction : propertyConstant; + } + d3_selectionPrototype.text = function(value) { + return arguments.length ? this.each(typeof value === "function" ? function() { + var v = value.apply(this, arguments); + this.textContent = v == null ? "" : v; + } : value == null ? function() { + this.textContent = ""; + } : function() { + this.textContent = value; + }) : this.node().textContent; + }; + d3_selectionPrototype.html = function(value) { + return arguments.length ? this.each(typeof value === "function" ? function() { + var v = value.apply(this, arguments); + this.innerHTML = v == null ? "" : v; + } : value == null ? function() { + this.innerHTML = ""; + } : function() { + this.innerHTML = value; + }) : this.node().innerHTML; + }; + d3_selectionPrototype.append = function(name) { + name = d3_selection_creator(name); + return this.select(function() { + return this.appendChild(name.apply(this, arguments)); + }); + }; + function d3_selection_creator(name) { + function create() { + var document = this.ownerDocument, namespace = this.namespaceURI; + return namespace === d3_nsXhtml && document.documentElement.namespaceURI === d3_nsXhtml ? document.createElement(name) : document.createElementNS(namespace, name); + } + function createNS() { + return this.ownerDocument.createElementNS(name.space, name.local); + } + return typeof name === "function" ? name : (name = d3.ns.qualify(name)).local ? createNS : create; + } + d3_selectionPrototype.insert = function(name, before) { + name = d3_selection_creator(name); + before = d3_selection_selector(before); + return this.select(function() { + return this.insertBefore(name.apply(this, arguments), before.apply(this, arguments) || null); + }); + }; + d3_selectionPrototype.remove = function() { + return this.each(d3_selectionRemove); + }; + function d3_selectionRemove() { + var parent = this.parentNode; + if (parent) parent.removeChild(this); + } + d3_selectionPrototype.data = function(value, key) { + var i = -1, n = this.length, group, node; + if (!arguments.length) { + value = new Array(n = (group = this[0]).length); + while (++i < n) { + if (node = group[i]) { + value[i] = node.__data__; + } + } + return value; + } + function bind(group, groupData) { + var i, n = group.length, m = groupData.length, n0 = Math.min(n, m), updateNodes = new Array(m), enterNodes = new Array(m), exitNodes = new Array(n), node, nodeData; + if (key) { + var nodeByKeyValue = new d3_Map(), keyValues = new Array(n), keyValue; + for (i = -1; ++i < n; ) { + if (node = group[i]) { + if (nodeByKeyValue.has(keyValue = key.call(node, node.__data__, i))) { + exitNodes[i] = node; + } else { + nodeByKeyValue.set(keyValue, node); + } + keyValues[i] = keyValue; + } + } + for (i = -1; ++i < m; ) { + if (!(node = nodeByKeyValue.get(keyValue = key.call(groupData, nodeData = groupData[i], i)))) { + enterNodes[i] = d3_selection_dataNode(nodeData); + } else if (node !== true) { + updateNodes[i] = node; + node.__data__ = nodeData; + } + nodeByKeyValue.set(keyValue, true); + } + for (i = -1; ++i < n; ) { + if (i in keyValues && nodeByKeyValue.get(keyValues[i]) !== true) { + exitNodes[i] = group[i]; + } + } + } else { + for (i = -1; ++i < n0; ) { + node = group[i]; + nodeData = groupData[i]; + if (node) { + node.__data__ = nodeData; + updateNodes[i] = node; + } else { + enterNodes[i] = d3_selection_dataNode(nodeData); + } + } + for (;i < m; ++i) { + enterNodes[i] = d3_selection_dataNode(groupData[i]); + } + for (;i < n; ++i) { + exitNodes[i] = group[i]; + } + } + enterNodes.update = updateNodes; + enterNodes.parentNode = updateNodes.parentNode = exitNodes.parentNode = group.parentNode; + enter.push(enterNodes); + update.push(updateNodes); + exit.push(exitNodes); + } + var enter = d3_selection_enter([]), update = d3_selection([]), exit = d3_selection([]); + if (typeof value === "function") { + while (++i < n) { + bind(group = this[i], value.call(group, group.parentNode.__data__, i)); + } + } else { + while (++i < n) { + bind(group = this[i], value); + } + } + update.enter = function() { + return enter; + }; + update.exit = function() { + return exit; + }; + return update; + }; + function d3_selection_dataNode(data) { + return { + __data__: data + }; + } + d3_selectionPrototype.datum = function(value) { + return arguments.length ? this.property("__data__", value) : this.property("__data__"); + }; + d3_selectionPrototype.filter = function(filter) { + var subgroups = [], subgroup, group, node; + if (typeof filter !== "function") filter = d3_selection_filter(filter); + for (var j = 0, m = this.length; j < m; j++) { + subgroups.push(subgroup = []); + subgroup.parentNode = (group = this[j]).parentNode; + for (var i = 0, n = group.length; i < n; i++) { + if ((node = group[i]) && filter.call(node, node.__data__, i, j)) { + subgroup.push(node); + } + } + } + return d3_selection(subgroups); + }; + function d3_selection_filter(selector) { + return function() { + return d3_selectMatches(this, selector); + }; + } + d3_selectionPrototype.order = function() { + for (var j = -1, m = this.length; ++j < m; ) { + for (var group = this[j], i = group.length - 1, next = group[i], node; --i >= 0; ) { + if (node = group[i]) { + if (next && next !== node.nextSibling) next.parentNode.insertBefore(node, next); + next = node; + } + } + } + return this; + }; + d3_selectionPrototype.sort = function(comparator) { + comparator = d3_selection_sortComparator.apply(this, arguments); + for (var j = -1, m = this.length; ++j < m; ) this[j].sort(comparator); + return this.order(); + }; + function d3_selection_sortComparator(comparator) { + if (!arguments.length) comparator = d3_ascending; + return function(a, b) { + return a && b ? comparator(a.__data__, b.__data__) : !a - !b; + }; + } + d3_selectionPrototype.each = function(callback) { + return d3_selection_each(this, function(node, i, j) { + callback.call(node, node.__data__, i, j); + }); + }; + function d3_selection_each(groups, callback) { + for (var j = 0, m = groups.length; j < m; j++) { + for (var group = groups[j], i = 0, n = group.length, node; i < n; i++) { + if (node = group[i]) callback(node, i, j); + } + } + return groups; + } + d3_selectionPrototype.call = function(callback) { + var args = d3_array(arguments); + callback.apply(args[0] = this, args); + return this; + }; + d3_selectionPrototype.empty = function() { + return !this.node(); + }; + d3_selectionPrototype.node = function() { + for (var j = 0, m = this.length; j < m; j++) { + for (var group = this[j], i = 0, n = group.length; i < n; i++) { + var node = group[i]; + if (node) return node; + } + } + return null; + }; + d3_selectionPrototype.size = function() { + var n = 0; + d3_selection_each(this, function() { + ++n; + }); + return n; + }; + function d3_selection_enter(selection) { + d3_subclass(selection, d3_selection_enterPrototype); + return selection; + } + var d3_selection_enterPrototype = []; + d3.selection.enter = d3_selection_enter; + d3.selection.enter.prototype = d3_selection_enterPrototype; + d3_selection_enterPrototype.append = d3_selectionPrototype.append; + d3_selection_enterPrototype.empty = d3_selectionPrototype.empty; + d3_selection_enterPrototype.node = d3_selectionPrototype.node; + d3_selection_enterPrototype.call = d3_selectionPrototype.call; + d3_selection_enterPrototype.size = d3_selectionPrototype.size; + d3_selection_enterPrototype.select = function(selector) { + var subgroups = [], subgroup, subnode, upgroup, group, node; + for (var j = -1, m = this.length; ++j < m; ) { + upgroup = (group = this[j]).update; + subgroups.push(subgroup = []); + subgroup.parentNode = group.parentNode; + for (var i = -1, n = group.length; ++i < n; ) { + if (node = group[i]) { + subgroup.push(upgroup[i] = subnode = selector.call(group.parentNode, node.__data__, i, j)); + subnode.__data__ = node.__data__; + } else { + subgroup.push(null); + } + } + } + return d3_selection(subgroups); + }; + d3_selection_enterPrototype.insert = function(name, before) { + if (arguments.length < 2) before = d3_selection_enterInsertBefore(this); + return d3_selectionPrototype.insert.call(this, name, before); + }; + function d3_selection_enterInsertBefore(enter) { + var i0, j0; + return function(d, i, j) { + var group = enter[j].update, n = group.length, node; + if (j != j0) j0 = j, i0 = 0; + if (i >= i0) i0 = i + 1; + while (!(node = group[i0]) && ++i0 < n) ; + return node; + }; + } + d3.select = function(node) { + var group; + if (typeof node === "string") { + group = [ d3_select(node, d3_document) ]; + group.parentNode = d3_document.documentElement; + } else { + group = [ node ]; + group.parentNode = d3_documentElement(node); + } + return d3_selection([ group ]); + }; + d3.selectAll = function(nodes) { + var group; + if (typeof nodes === "string") { + group = d3_array(d3_selectAll(nodes, d3_document)); + group.parentNode = d3_document.documentElement; + } else { + group = d3_array(nodes); + group.parentNode = null; + } + return d3_selection([ group ]); + }; + d3_selectionPrototype.on = function(type, listener, capture) { + var n = arguments.length; + if (n < 3) { + if (typeof type !== "string") { + if (n < 2) listener = false; + for (capture in type) this.each(d3_selection_on(capture, type[capture], listener)); + return this; + } + if (n < 2) return (n = this.node()["__on" + type]) && n._; + capture = false; + } + return this.each(d3_selection_on(type, listener, capture)); + }; + function d3_selection_on(type, listener, capture) { + var name = "__on" + type, i = type.indexOf("."), wrap = d3_selection_onListener; + if (i > 0) type = type.slice(0, i); + var filter = d3_selection_onFilters.get(type); + if (filter) type = filter, wrap = d3_selection_onFilter; + function onRemove() { + var l = this[name]; + if (l) { + this.removeEventListener(type, l, l.$); + delete this[name]; + } + } + function onAdd() { + var l = wrap(listener, d3_array(arguments)); + onRemove.call(this); + this.addEventListener(type, this[name] = l, l.$ = capture); + l._ = listener; + } + function removeAll() { + var re = new RegExp("^__on([^.]+)" + d3.requote(type) + "$"), match; + for (var name in this) { + if (match = name.match(re)) { + var l = this[name]; + this.removeEventListener(match[1], l, l.$); + delete this[name]; + } + } + } + return i ? listener ? onAdd : onRemove : listener ? d3_noop : removeAll; + } + var d3_selection_onFilters = d3.map({ + mouseenter: "mouseover", + mouseleave: "mouseout" + }); + if (d3_document) { + d3_selection_onFilters.forEach(function(k) { + if ("on" + k in d3_document) d3_selection_onFilters.remove(k); + }); + } + function d3_selection_onListener(listener, argumentz) { + return function(e) { + var o = d3.event; + d3.event = e; + argumentz[0] = this.__data__; + try { + listener.apply(this, argumentz); + } finally { + d3.event = o; + } + }; + } + function d3_selection_onFilter(listener, argumentz) { + var l = d3_selection_onListener(listener, argumentz); + return function(e) { + var target = this, related = e.relatedTarget; + if (!related || related !== target && !(related.compareDocumentPosition(target) & 8)) { + l.call(target, e); + } + }; + } + var d3_event_dragSelect, d3_event_dragId = 0; + function d3_event_dragSuppress(node) { + var name = ".dragsuppress-" + ++d3_event_dragId, click = "click" + name, w = d3.select(d3_window(node)).on("touchmove" + name, d3_eventPreventDefault).on("dragstart" + name, d3_eventPreventDefault).on("selectstart" + name, d3_eventPreventDefault); + if (d3_event_dragSelect == null) { + d3_event_dragSelect = "onselectstart" in node ? false : d3_vendorSymbol(node.style, "userSelect"); + } + if (d3_event_dragSelect) { + var style = d3_documentElement(node).style, select = style[d3_event_dragSelect]; + style[d3_event_dragSelect] = "none"; + } + return function(suppressClick) { + w.on(name, null); + if (d3_event_dragSelect) style[d3_event_dragSelect] = select; + if (suppressClick) { + var off = function() { + w.on(click, null); + }; + w.on(click, function() { + d3_eventPreventDefault(); + off(); + }, true); + setTimeout(off, 0); + } + }; + } + d3.mouse = function(container) { + return d3_mousePoint(container, d3_eventSource()); + }; + var d3_mouse_bug44083 = this.navigator && /WebKit/.test(this.navigator.userAgent) ? -1 : 0; + function d3_mousePoint(container, e) { + if (e.changedTouches) e = e.changedTouches[0]; + var svg = container.ownerSVGElement || container; + if (svg.createSVGPoint) { + var point = svg.createSVGPoint(); + if (d3_mouse_bug44083 < 0) { + var window = d3_window(container); + if (window.scrollX || window.scrollY) { + svg = d3.select("body").append("svg").style({ + position: "absolute", + top: 0, + left: 0, + margin: 0, + padding: 0, + border: "none" + }, "important"); + var ctm = svg[0][0].getScreenCTM(); + d3_mouse_bug44083 = !(ctm.f || ctm.e); + svg.remove(); + } + } + if (d3_mouse_bug44083) point.x = e.pageX, point.y = e.pageY; else point.x = e.clientX, + point.y = e.clientY; + point = point.matrixTransform(container.getScreenCTM().inverse()); + return [ point.x, point.y ]; + } + var rect = container.getBoundingClientRect(); + return [ e.clientX - rect.left - container.clientLeft, e.clientY - rect.top - container.clientTop ]; + } + d3.touch = function(container, touches, identifier) { + if (arguments.length < 3) identifier = touches, touches = d3_eventSource().changedTouches; + if (touches) for (var i = 0, n = touches.length, touch; i < n; ++i) { + if ((touch = touches[i]).identifier === identifier) { + return d3_mousePoint(container, touch); + } + } + }; + d3.behavior.drag = function() { + var event = d3_eventDispatch(drag, "drag", "dragstart", "dragend"), origin = null, mousedown = dragstart(d3_noop, d3.mouse, d3_window, "mousemove", "mouseup"), touchstart = dragstart(d3_behavior_dragTouchId, d3.touch, d3_identity, "touchmove", "touchend"); + function drag() { + this.on("mousedown.drag", mousedown).on("touchstart.drag", touchstart); + } + function dragstart(id, position, subject, move, end) { + return function() { + var that = this, target = d3.event.target.correspondingElement || d3.event.target, parent = that.parentNode, dispatch = event.of(that, arguments), dragged = 0, dragId = id(), dragName = ".drag" + (dragId == null ? "" : "-" + dragId), dragOffset, dragSubject = d3.select(subject(target)).on(move + dragName, moved).on(end + dragName, ended), dragRestore = d3_event_dragSuppress(target), position0 = position(parent, dragId); + if (origin) { + dragOffset = origin.apply(that, arguments); + dragOffset = [ dragOffset.x - position0[0], dragOffset.y - position0[1] ]; + } else { + dragOffset = [ 0, 0 ]; + } + dispatch({ + type: "dragstart" + }); + function moved() { + var position1 = position(parent, dragId), dx, dy; + if (!position1) return; + dx = position1[0] - position0[0]; + dy = position1[1] - position0[1]; + dragged |= dx | dy; + position0 = position1; + dispatch({ + type: "drag", + x: position1[0] + dragOffset[0], + y: position1[1] + dragOffset[1], + dx: dx, + dy: dy + }); + } + function ended() { + if (!position(parent, dragId)) return; + dragSubject.on(move + dragName, null).on(end + dragName, null); + dragRestore(dragged); + dispatch({ + type: "dragend" + }); + } + }; + } + drag.origin = function(x) { + if (!arguments.length) return origin; + origin = x; + return drag; + }; + return d3.rebind(drag, event, "on"); + }; + function d3_behavior_dragTouchId() { + return d3.event.changedTouches[0].identifier; + } + d3.touches = function(container, touches) { + if (arguments.length < 2) touches = d3_eventSource().touches; + return touches ? d3_array(touches).map(function(touch) { + var point = d3_mousePoint(container, touch); + point.identifier = touch.identifier; + return point; + }) : []; + }; + var ε = 1e-6, ε2 = ε * ε, Ï€ = Math.PI, Ï„ = 2 * Ï€, τε = Ï„ - ε, halfÏ€ = Ï€ / 2, d3_radians = Ï€ / 180, d3_degrees = 180 / Ï€; + function d3_sgn(x) { + return x > 0 ? 1 : x < 0 ? -1 : 0; + } + function d3_cross2d(a, b, c) { + return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]); + } + function d3_acos(x) { + return x > 1 ? 0 : x < -1 ? Ï€ : Math.acos(x); + } + function d3_asin(x) { + return x > 1 ? halfÏ€ : x < -1 ? -halfÏ€ : Math.asin(x); + } + function d3_sinh(x) { + return ((x = Math.exp(x)) - 1 / x) / 2; + } + function d3_cosh(x) { + return ((x = Math.exp(x)) + 1 / x) / 2; + } + function d3_tanh(x) { + return ((x = Math.exp(2 * x)) - 1) / (x + 1); + } + function d3_haversin(x) { + return (x = Math.sin(x / 2)) * x; + } + var Ï = Math.SQRT2, Ï2 = 2, Ï4 = 4; + d3.interpolateZoom = function(p0, p1) { + var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], ux1 = p1[0], uy1 = p1[1], w1 = p1[2], dx = ux1 - ux0, dy = uy1 - uy0, d2 = dx * dx + dy * dy, i, S; + if (d2 < ε2) { + S = Math.log(w1 / w0) / Ï; + i = function(t) { + return [ ux0 + t * dx, uy0 + t * dy, w0 * Math.exp(Ï * t * S) ]; + }; + } else { + var d1 = Math.sqrt(d2), b0 = (w1 * w1 - w0 * w0 + Ï4 * d2) / (2 * w0 * Ï2 * d1), b1 = (w1 * w1 - w0 * w0 - Ï4 * d2) / (2 * w1 * Ï2 * d1), r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1); + S = (r1 - r0) / Ï; + i = function(t) { + var s = t * S, coshr0 = d3_cosh(r0), u = w0 / (Ï2 * d1) * (coshr0 * d3_tanh(Ï * s + r0) - d3_sinh(r0)); + return [ ux0 + u * dx, uy0 + u * dy, w0 * coshr0 / d3_cosh(Ï * s + r0) ]; + }; + } + i.duration = S * 1e3; + return i; + }; + d3.behavior.zoom = function() { + var view = { + x: 0, + y: 0, + k: 1 + }, translate0, center0, center, size = [ 960, 500 ], scaleExtent = d3_behavior_zoomInfinity, duration = 250, zooming = 0, mousedown = "mousedown.zoom", mousemove = "mousemove.zoom", mouseup = "mouseup.zoom", mousewheelTimer, touchstart = "touchstart.zoom", touchtime, event = d3_eventDispatch(zoom, "zoomstart", "zoom", "zoomend"), x0, x1, y0, y1; + if (!d3_behavior_zoomWheel) { + d3_behavior_zoomWheel = "onwheel" in d3_document ? (d3_behavior_zoomDelta = function() { + return -d3.event.deltaY * (d3.event.deltaMode ? 120 : 1); + }, "wheel") : "onmousewheel" in d3_document ? (d3_behavior_zoomDelta = function() { + return d3.event.wheelDelta; + }, "mousewheel") : (d3_behavior_zoomDelta = function() { + return -d3.event.detail; + }, "MozMousePixelScroll"); + } + function zoom(g) { + g.on(mousedown, mousedowned).on(d3_behavior_zoomWheel + ".zoom", mousewheeled).on("dblclick.zoom", dblclicked).on(touchstart, touchstarted); + } + zoom.event = function(g) { + g.each(function() { + var dispatch = event.of(this, arguments), view1 = view; + if (d3_transitionInheritId) { + d3.select(this).transition().each("start.zoom", function() { + view = this.__chart__ || { + x: 0, + y: 0, + k: 1 + }; + zoomstarted(dispatch); + }).tween("zoom:zoom", function() { + var dx = size[0], dy = size[1], cx = center0 ? center0[0] : dx / 2, cy = center0 ? center0[1] : dy / 2, i = d3.interpolateZoom([ (cx - view.x) / view.k, (cy - view.y) / view.k, dx / view.k ], [ (cx - view1.x) / view1.k, (cy - view1.y) / view1.k, dx / view1.k ]); + return function(t) { + var l = i(t), k = dx / l[2]; + this.__chart__ = view = { + x: cx - l[0] * k, + y: cy - l[1] * k, + k: k + }; + zoomed(dispatch); + }; + }).each("interrupt.zoom", function() { + zoomended(dispatch); + }).each("end.zoom", function() { + zoomended(dispatch); + }); + } else { + this.__chart__ = view; + zoomstarted(dispatch); + zoomed(dispatch); + zoomended(dispatch); + } + }); + }; + zoom.translate = function(_) { + if (!arguments.length) return [ view.x, view.y ]; + view = { + x: +_[0], + y: +_[1], + k: view.k + }; + rescale(); + return zoom; + }; + zoom.scale = function(_) { + if (!arguments.length) return view.k; + view = { + x: view.x, + y: view.y, + k: null + }; + scaleTo(+_); + rescale(); + return zoom; + }; + zoom.scaleExtent = function(_) { + if (!arguments.length) return scaleExtent; + scaleExtent = _ == null ? d3_behavior_zoomInfinity : [ +_[0], +_[1] ]; + return zoom; + }; + zoom.center = function(_) { + if (!arguments.length) return center; + center = _ && [ +_[0], +_[1] ]; + return zoom; + }; + zoom.size = function(_) { + if (!arguments.length) return size; + size = _ && [ +_[0], +_[1] ]; + return zoom; + }; + zoom.duration = function(_) { + if (!arguments.length) return duration; + duration = +_; + return zoom; + }; + zoom.x = function(z) { + if (!arguments.length) return x1; + x1 = z; + x0 = z.copy(); + view = { + x: 0, + y: 0, + k: 1 + }; + return zoom; + }; + zoom.y = function(z) { + if (!arguments.length) return y1; + y1 = z; + y0 = z.copy(); + view = { + x: 0, + y: 0, + k: 1 + }; + return zoom; + }; + function location(p) { + return [ (p[0] - view.x) / view.k, (p[1] - view.y) / view.k ]; + } + function point(l) { + return [ l[0] * view.k + view.x, l[1] * view.k + view.y ]; + } + function scaleTo(s) { + view.k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], s)); + } + function translateTo(p, l) { + l = point(l); + view.x += p[0] - l[0]; + view.y += p[1] - l[1]; + } + function zoomTo(that, p, l, k) { + that.__chart__ = { + x: view.x, + y: view.y, + k: view.k + }; + scaleTo(Math.pow(2, k)); + translateTo(center0 = p, l); + that = d3.select(that); + if (duration > 0) that = that.transition().duration(duration); + that.call(zoom.event); + } + function rescale() { + if (x1) x1.domain(x0.range().map(function(x) { + return (x - view.x) / view.k; + }).map(x0.invert)); + if (y1) y1.domain(y0.range().map(function(y) { + return (y - view.y) / view.k; + }).map(y0.invert)); + } + function zoomstarted(dispatch) { + if (!zooming++) dispatch({ + type: "zoomstart" + }); + } + function zoomed(dispatch) { + rescale(); + dispatch({ + type: "zoom", + scale: view.k, + translate: [ view.x, view.y ] + }); + } + function zoomended(dispatch) { + if (!--zooming) dispatch({ + type: "zoomend" + }), center0 = null; + } + function mousedowned() { + var that = this, dispatch = event.of(that, arguments), dragged = 0, subject = d3.select(d3_window(that)).on(mousemove, moved).on(mouseup, ended), location0 = location(d3.mouse(that)), dragRestore = d3_event_dragSuppress(that); + d3_selection_interrupt.call(that); + zoomstarted(dispatch); + function moved() { + dragged = 1; + translateTo(d3.mouse(that), location0); + zoomed(dispatch); + } + function ended() { + subject.on(mousemove, null).on(mouseup, null); + dragRestore(dragged); + zoomended(dispatch); + } + } + function touchstarted() { + var that = this, dispatch = event.of(that, arguments), locations0 = {}, distance0 = 0, scale0, zoomName = ".zoom-" + d3.event.changedTouches[0].identifier, touchmove = "touchmove" + zoomName, touchend = "touchend" + zoomName, targets = [], subject = d3.select(that), dragRestore = d3_event_dragSuppress(that); + started(); + zoomstarted(dispatch); + subject.on(mousedown, null).on(touchstart, started); + function relocate() { + var touches = d3.touches(that); + scale0 = view.k; + touches.forEach(function(t) { + if (t.identifier in locations0) locations0[t.identifier] = location(t); + }); + return touches; + } + function started() { + var target = d3.event.target; + d3.select(target).on(touchmove, moved).on(touchend, ended); + targets.push(target); + var changed = d3.event.changedTouches; + for (var i = 0, n = changed.length; i < n; ++i) { + locations0[changed[i].identifier] = null; + } + var touches = relocate(), now = Date.now(); + if (touches.length === 1) { + if (now - touchtime < 500) { + var p = touches[0]; + zoomTo(that, p, locations0[p.identifier], Math.floor(Math.log(view.k) / Math.LN2) + 1); + d3_eventPreventDefault(); + } + touchtime = now; + } else if (touches.length > 1) { + var p = touches[0], q = touches[1], dx = p[0] - q[0], dy = p[1] - q[1]; + distance0 = dx * dx + dy * dy; + } + } + function moved() { + var touches = d3.touches(that), p0, l0, p1, l1; + d3_selection_interrupt.call(that); + for (var i = 0, n = touches.length; i < n; ++i, l1 = null) { + p1 = touches[i]; + if (l1 = locations0[p1.identifier]) { + if (l0) break; + p0 = p1, l0 = l1; + } + } + if (l1) { + var distance1 = (distance1 = p1[0] - p0[0]) * distance1 + (distance1 = p1[1] - p0[1]) * distance1, scale1 = distance0 && Math.sqrt(distance1 / distance0); + p0 = [ (p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2 ]; + l0 = [ (l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2 ]; + scaleTo(scale1 * scale0); + } + touchtime = null; + translateTo(p0, l0); + zoomed(dispatch); + } + function ended() { + if (d3.event.touches.length) { + var changed = d3.event.changedTouches; + for (var i = 0, n = changed.length; i < n; ++i) { + delete locations0[changed[i].identifier]; + } + for (var identifier in locations0) { + return void relocate(); + } + } + d3.selectAll(targets).on(zoomName, null); + subject.on(mousedown, mousedowned).on(touchstart, touchstarted); + dragRestore(); + zoomended(dispatch); + } + } + function mousewheeled() { + var dispatch = event.of(this, arguments); + if (mousewheelTimer) clearTimeout(mousewheelTimer); else d3_selection_interrupt.call(this), + translate0 = location(center0 = center || d3.mouse(this)), zoomstarted(dispatch); + mousewheelTimer = setTimeout(function() { + mousewheelTimer = null; + zoomended(dispatch); + }, 50); + d3_eventPreventDefault(); + scaleTo(Math.pow(2, d3_behavior_zoomDelta() * .002) * view.k); + translateTo(center0, translate0); + zoomed(dispatch); + } + function dblclicked() { + var p = d3.mouse(this), k = Math.log(view.k) / Math.LN2; + zoomTo(this, p, location(p), d3.event.shiftKey ? Math.ceil(k) - 1 : Math.floor(k) + 1); + } + return d3.rebind(zoom, event, "on"); + }; + var d3_behavior_zoomInfinity = [ 0, Infinity ], d3_behavior_zoomDelta, d3_behavior_zoomWheel; + d3.color = d3_color; + function d3_color() {} + d3_color.prototype.toString = function() { + return this.rgb() + ""; + }; + d3.hsl = d3_hsl; + function d3_hsl(h, s, l) { + return this instanceof d3_hsl ? void (this.h = +h, this.s = +s, this.l = +l) : arguments.length < 2 ? h instanceof d3_hsl ? new d3_hsl(h.h, h.s, h.l) : d3_rgb_parse("" + h, d3_rgb_hsl, d3_hsl) : new d3_hsl(h, s, l); + } + var d3_hslPrototype = d3_hsl.prototype = new d3_color(); + d3_hslPrototype.brighter = function(k) { + k = Math.pow(.7, arguments.length ? k : 1); + return new d3_hsl(this.h, this.s, this.l / k); + }; + d3_hslPrototype.darker = function(k) { + k = Math.pow(.7, arguments.length ? k : 1); + return new d3_hsl(this.h, this.s, k * this.l); + }; + d3_hslPrototype.rgb = function() { + return d3_hsl_rgb(this.h, this.s, this.l); + }; + function d3_hsl_rgb(h, s, l) { + var m1, m2; + h = isNaN(h) ? 0 : (h %= 360) < 0 ? h + 360 : h; + s = isNaN(s) ? 0 : s < 0 ? 0 : s > 1 ? 1 : s; + l = l < 0 ? 0 : l > 1 ? 1 : l; + m2 = l <= .5 ? l * (1 + s) : l + s - l * s; + m1 = 2 * l - m2; + function v(h) { + if (h > 360) h -= 360; else if (h < 0) h += 360; + if (h < 60) return m1 + (m2 - m1) * h / 60; + if (h < 180) return m2; + if (h < 240) return m1 + (m2 - m1) * (240 - h) / 60; + return m1; + } + function vv(h) { + return Math.round(v(h) * 255); + } + return new d3_rgb(vv(h + 120), vv(h), vv(h - 120)); + } + d3.hcl = d3_hcl; + function d3_hcl(h, c, l) { + return this instanceof d3_hcl ? void (this.h = +h, this.c = +c, this.l = +l) : arguments.length < 2 ? h instanceof d3_hcl ? new d3_hcl(h.h, h.c, h.l) : h instanceof d3_lab ? d3_lab_hcl(h.l, h.a, h.b) : d3_lab_hcl((h = d3_rgb_lab((h = d3.rgb(h)).r, h.g, h.b)).l, h.a, h.b) : new d3_hcl(h, c, l); + } + var d3_hclPrototype = d3_hcl.prototype = new d3_color(); + d3_hclPrototype.brighter = function(k) { + return new d3_hcl(this.h, this.c, Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1))); + }; + d3_hclPrototype.darker = function(k) { + return new d3_hcl(this.h, this.c, Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1))); + }; + d3_hclPrototype.rgb = function() { + return d3_hcl_lab(this.h, this.c, this.l).rgb(); + }; + function d3_hcl_lab(h, c, l) { + if (isNaN(h)) h = 0; + if (isNaN(c)) c = 0; + return new d3_lab(l, Math.cos(h *= d3_radians) * c, Math.sin(h) * c); + } + d3.lab = d3_lab; + function d3_lab(l, a, b) { + return this instanceof d3_lab ? void (this.l = +l, this.a = +a, this.b = +b) : arguments.length < 2 ? l instanceof d3_lab ? new d3_lab(l.l, l.a, l.b) : l instanceof d3_hcl ? d3_hcl_lab(l.h, l.c, l.l) : d3_rgb_lab((l = d3_rgb(l)).r, l.g, l.b) : new d3_lab(l, a, b); + } + var d3_lab_K = 18; + var d3_lab_X = .95047, d3_lab_Y = 1, d3_lab_Z = 1.08883; + var d3_labPrototype = d3_lab.prototype = new d3_color(); + d3_labPrototype.brighter = function(k) { + return new d3_lab(Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)), this.a, this.b); + }; + d3_labPrototype.darker = function(k) { + return new d3_lab(Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)), this.a, this.b); + }; + d3_labPrototype.rgb = function() { + return d3_lab_rgb(this.l, this.a, this.b); + }; + function d3_lab_rgb(l, a, b) { + var y = (l + 16) / 116, x = y + a / 500, z = y - b / 200; + x = d3_lab_xyz(x) * d3_lab_X; + y = d3_lab_xyz(y) * d3_lab_Y; + z = d3_lab_xyz(z) * d3_lab_Z; + return new d3_rgb(d3_xyz_rgb(3.2404542 * x - 1.5371385 * y - .4985314 * z), d3_xyz_rgb(-.969266 * x + 1.8760108 * y + .041556 * z), d3_xyz_rgb(.0556434 * x - .2040259 * y + 1.0572252 * z)); + } + function d3_lab_hcl(l, a, b) { + return l > 0 ? new d3_hcl(Math.atan2(b, a) * d3_degrees, Math.sqrt(a * a + b * b), l) : new d3_hcl(NaN, NaN, l); + } + function d3_lab_xyz(x) { + return x > .206893034 ? x * x * x : (x - 4 / 29) / 7.787037; + } + function d3_xyz_lab(x) { + return x > .008856 ? Math.pow(x, 1 / 3) : 7.787037 * x + 4 / 29; + } + function d3_xyz_rgb(r) { + return Math.round(255 * (r <= .00304 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - .055)); + } + d3.rgb = d3_rgb; + function d3_rgb(r, g, b) { + return this instanceof d3_rgb ? void (this.r = ~~r, this.g = ~~g, this.b = ~~b) : arguments.length < 2 ? r instanceof d3_rgb ? new d3_rgb(r.r, r.g, r.b) : d3_rgb_parse("" + r, d3_rgb, d3_hsl_rgb) : new d3_rgb(r, g, b); + } + function d3_rgbNumber(value) { + return new d3_rgb(value >> 16, value >> 8 & 255, value & 255); + } + function d3_rgbString(value) { + return d3_rgbNumber(value) + ""; + } + var d3_rgbPrototype = d3_rgb.prototype = new d3_color(); + d3_rgbPrototype.brighter = function(k) { + k = Math.pow(.7, arguments.length ? k : 1); + var r = this.r, g = this.g, b = this.b, i = 30; + if (!r && !g && !b) return new d3_rgb(i, i, i); + if (r && r < i) r = i; + if (g && g < i) g = i; + if (b && b < i) b = i; + return new d3_rgb(Math.min(255, r / k), Math.min(255, g / k), Math.min(255, b / k)); + }; + d3_rgbPrototype.darker = function(k) { + k = Math.pow(.7, arguments.length ? k : 1); + return new d3_rgb(k * this.r, k * this.g, k * this.b); + }; + d3_rgbPrototype.hsl = function() { + return d3_rgb_hsl(this.r, this.g, this.b); + }; + d3_rgbPrototype.toString = function() { + return "#" + d3_rgb_hex(this.r) + d3_rgb_hex(this.g) + d3_rgb_hex(this.b); + }; + function d3_rgb_hex(v) { + return v < 16 ? "0" + Math.max(0, v).toString(16) : Math.min(255, v).toString(16); + } + function d3_rgb_parse(format, rgb, hsl) { + var r = 0, g = 0, b = 0, m1, m2, color; + m1 = /([a-z]+)\((.*)\)/.exec(format = format.toLowerCase()); + if (m1) { + m2 = m1[2].split(","); + switch (m1[1]) { + case "hsl": + { + return hsl(parseFloat(m2[0]), parseFloat(m2[1]) / 100, parseFloat(m2[2]) / 100); + } + + case "rgb": + { + return rgb(d3_rgb_parseNumber(m2[0]), d3_rgb_parseNumber(m2[1]), d3_rgb_parseNumber(m2[2])); + } + } + } + if (color = d3_rgb_names.get(format)) { + return rgb(color.r, color.g, color.b); + } + if (format != null && format.charAt(0) === "#" && !isNaN(color = parseInt(format.slice(1), 16))) { + if (format.length === 4) { + r = (color & 3840) >> 4; + r = r >> 4 | r; + g = color & 240; + g = g >> 4 | g; + b = color & 15; + b = b << 4 | b; + } else if (format.length === 7) { + r = (color & 16711680) >> 16; + g = (color & 65280) >> 8; + b = color & 255; + } + } + return rgb(r, g, b); + } + function d3_rgb_hsl(r, g, b) { + var min = Math.min(r /= 255, g /= 255, b /= 255), max = Math.max(r, g, b), d = max - min, h, s, l = (max + min) / 2; + if (d) { + s = l < .5 ? d / (max + min) : d / (2 - max - min); + if (r == max) h = (g - b) / d + (g < b ? 6 : 0); else if (g == max) h = (b - r) / d + 2; else h = (r - g) / d + 4; + h *= 60; + } else { + h = NaN; + s = l > 0 && l < 1 ? 0 : h; + } + return new d3_hsl(h, s, l); + } + function d3_rgb_lab(r, g, b) { + r = d3_rgb_xyz(r); + g = d3_rgb_xyz(g); + b = d3_rgb_xyz(b); + var x = d3_xyz_lab((.4124564 * r + .3575761 * g + .1804375 * b) / d3_lab_X), y = d3_xyz_lab((.2126729 * r + .7151522 * g + .072175 * b) / d3_lab_Y), z = d3_xyz_lab((.0193339 * r + .119192 * g + .9503041 * b) / d3_lab_Z); + return d3_lab(116 * y - 16, 500 * (x - y), 200 * (y - z)); + } + function d3_rgb_xyz(r) { + return (r /= 255) <= .04045 ? r / 12.92 : Math.pow((r + .055) / 1.055, 2.4); + } + function d3_rgb_parseNumber(c) { + var f = parseFloat(c); + return c.charAt(c.length - 1) === "%" ? Math.round(f * 2.55) : f; + } + var d3_rgb_names = d3.map({ + aliceblue: 15792383, + antiquewhite: 16444375, + aqua: 65535, + aquamarine: 8388564, + azure: 15794175, + beige: 16119260, + bisque: 16770244, + black: 0, + blanchedalmond: 16772045, + blue: 255, + blueviolet: 9055202, + brown: 10824234, + burlywood: 14596231, + cadetblue: 6266528, + chartreuse: 8388352, + chocolate: 13789470, + coral: 16744272, + cornflowerblue: 6591981, + cornsilk: 16775388, + crimson: 14423100, + cyan: 65535, + darkblue: 139, + darkcyan: 35723, + darkgoldenrod: 12092939, + darkgray: 11119017, + darkgreen: 25600, + darkgrey: 11119017, + darkkhaki: 12433259, + darkmagenta: 9109643, + darkolivegreen: 5597999, + darkorange: 16747520, + darkorchid: 10040012, + darkred: 9109504, + darksalmon: 15308410, + darkseagreen: 9419919, + darkslateblue: 4734347, + darkslategray: 3100495, + darkslategrey: 3100495, + darkturquoise: 52945, + darkviolet: 9699539, + deeppink: 16716947, + deepskyblue: 49151, + dimgray: 6908265, + dimgrey: 6908265, + dodgerblue: 2003199, + firebrick: 11674146, + floralwhite: 16775920, + forestgreen: 2263842, + fuchsia: 16711935, + gainsboro: 14474460, + ghostwhite: 16316671, + gold: 16766720, + goldenrod: 14329120, + gray: 8421504, + green: 32768, + greenyellow: 11403055, + grey: 8421504, + honeydew: 15794160, + hotpink: 16738740, + indianred: 13458524, + indigo: 4915330, + ivory: 16777200, + khaki: 15787660, + lavender: 15132410, + lavenderblush: 16773365, + lawngreen: 8190976, + lemonchiffon: 16775885, + lightblue: 11393254, + lightcoral: 15761536, + lightcyan: 14745599, + lightgoldenrodyellow: 16448210, + lightgray: 13882323, + lightgreen: 9498256, + lightgrey: 13882323, + lightpink: 16758465, + lightsalmon: 16752762, + lightseagreen: 2142890, + lightskyblue: 8900346, + lightslategray: 7833753, + lightslategrey: 7833753, + lightsteelblue: 11584734, + lightyellow: 16777184, + lime: 65280, + limegreen: 3329330, + linen: 16445670, + magenta: 16711935, + maroon: 8388608, + mediumaquamarine: 6737322, + mediumblue: 205, + mediumorchid: 12211667, + mediumpurple: 9662683, + mediumseagreen: 3978097, + mediumslateblue: 8087790, + mediumspringgreen: 64154, + mediumturquoise: 4772300, + mediumvioletred: 13047173, + midnightblue: 1644912, + mintcream: 16121850, + mistyrose: 16770273, + moccasin: 16770229, + navajowhite: 16768685, + navy: 128, + oldlace: 16643558, + olive: 8421376, + olivedrab: 7048739, + orange: 16753920, + orangered: 16729344, + orchid: 14315734, + palegoldenrod: 15657130, + palegreen: 10025880, + paleturquoise: 11529966, + palevioletred: 14381203, + papayawhip: 16773077, + peachpuff: 16767673, + peru: 13468991, + pink: 16761035, + plum: 14524637, + powderblue: 11591910, + purple: 8388736, + rebeccapurple: 6697881, + red: 16711680, + rosybrown: 12357519, + royalblue: 4286945, + saddlebrown: 9127187, + salmon: 16416882, + sandybrown: 16032864, + seagreen: 3050327, + seashell: 16774638, + sienna: 10506797, + silver: 12632256, + skyblue: 8900331, + slateblue: 6970061, + slategray: 7372944, + slategrey: 7372944, + snow: 16775930, + springgreen: 65407, + steelblue: 4620980, + tan: 13808780, + teal: 32896, + thistle: 14204888, + tomato: 16737095, + turquoise: 4251856, + violet: 15631086, + wheat: 16113331, + white: 16777215, + whitesmoke: 16119285, + yellow: 16776960, + yellowgreen: 10145074 + }); + d3_rgb_names.forEach(function(key, value) { + d3_rgb_names.set(key, d3_rgbNumber(value)); + }); + function d3_functor(v) { + return typeof v === "function" ? v : function() { + return v; + }; + } + d3.functor = d3_functor; + d3.xhr = d3_xhrType(d3_identity); + function d3_xhrType(response) { + return function(url, mimeType, callback) { + if (arguments.length === 2 && typeof mimeType === "function") callback = mimeType, + mimeType = null; + return d3_xhr(url, mimeType, response, callback); + }; + } + function d3_xhr(url, mimeType, response, callback) { + var xhr = {}, dispatch = d3.dispatch("beforesend", "progress", "load", "error"), headers = {}, request = new XMLHttpRequest(), responseType = null; + if (this.XDomainRequest && !("withCredentials" in request) && /^(http(s)?:)?\/\//.test(url)) request = new XDomainRequest(); + "onload" in request ? request.onload = request.onerror = respond : request.onreadystatechange = function() { + request.readyState > 3 && respond(); + }; + function respond() { + var status = request.status, result; + if (!status && d3_xhrHasResponse(request) || status >= 200 && status < 300 || status === 304) { + try { + result = response.call(xhr, request); + } catch (e) { + dispatch.error.call(xhr, e); + return; + } + dispatch.load.call(xhr, result); + } else { + dispatch.error.call(xhr, request); + } + } + request.onprogress = function(event) { + var o = d3.event; + d3.event = event; + try { + dispatch.progress.call(xhr, request); + } finally { + d3.event = o; + } + }; + xhr.header = function(name, value) { + name = (name + "").toLowerCase(); + if (arguments.length < 2) return headers[name]; + if (value == null) delete headers[name]; else headers[name] = value + ""; + return xhr; + }; + xhr.mimeType = function(value) { + if (!arguments.length) return mimeType; + mimeType = value == null ? null : value + ""; + return xhr; + }; + xhr.responseType = function(value) { + if (!arguments.length) return responseType; + responseType = value; + return xhr; + }; + xhr.response = function(value) { + response = value; + return xhr; + }; + [ "get", "post" ].forEach(function(method) { + xhr[method] = function() { + return xhr.send.apply(xhr, [ method ].concat(d3_array(arguments))); + }; + }); + xhr.send = function(method, data, callback) { + if (arguments.length === 2 && typeof data === "function") callback = data, data = null; + request.open(method, url, true); + if (mimeType != null && !("accept" in headers)) headers["accept"] = mimeType + ",*/*"; + if (request.setRequestHeader) for (var name in headers) request.setRequestHeader(name, headers[name]); + if (mimeType != null && request.overrideMimeType) request.overrideMimeType(mimeType); + if (responseType != null) request.responseType = responseType; + if (callback != null) xhr.on("error", callback).on("load", function(request) { + callback(null, request); + }); + dispatch.beforesend.call(xhr, request); + request.send(data == null ? null : data); + return xhr; + }; + xhr.abort = function() { + request.abort(); + return xhr; + }; + d3.rebind(xhr, dispatch, "on"); + return callback == null ? xhr : xhr.get(d3_xhr_fixCallback(callback)); + } + function d3_xhr_fixCallback(callback) { + return callback.length === 1 ? function(error, request) { + callback(error == null ? request : null); + } : callback; + } + function d3_xhrHasResponse(request) { + var type = request.responseType; + return type && type !== "text" ? request.response : request.responseText; + } + d3.dsv = function(delimiter, mimeType) { + var reFormat = new RegExp('["' + delimiter + "\n]"), delimiterCode = delimiter.charCodeAt(0); + function dsv(url, row, callback) { + if (arguments.length < 3) callback = row, row = null; + var xhr = d3_xhr(url, mimeType, row == null ? response : typedResponse(row), callback); + xhr.row = function(_) { + return arguments.length ? xhr.response((row = _) == null ? response : typedResponse(_)) : row; + }; + return xhr; + } + function response(request) { + return dsv.parse(request.responseText); + } + function typedResponse(f) { + return function(request) { + return dsv.parse(request.responseText, f); + }; + } + dsv.parse = function(text, f) { + var o; + return dsv.parseRows(text, function(row, i) { + if (o) return o(row, i - 1); + var a = new Function("d", "return {" + row.map(function(name, i) { + return JSON.stringify(name) + ": d[" + i + "]"; + }).join(",") + "}"); + o = f ? function(row, i) { + return f(a(row), i); + } : a; + }); + }; + dsv.parseRows = function(text, f) { + var EOL = {}, EOF = {}, rows = [], N = text.length, I = 0, n = 0, t, eol; + function token() { + if (I >= N) return EOF; + if (eol) return eol = false, EOL; + var j = I; + if (text.charCodeAt(j) === 34) { + var i = j; + while (i++ < N) { + if (text.charCodeAt(i) === 34) { + if (text.charCodeAt(i + 1) !== 34) break; + ++i; + } + } + I = i + 2; + var c = text.charCodeAt(i + 1); + if (c === 13) { + eol = true; + if (text.charCodeAt(i + 2) === 10) ++I; + } else if (c === 10) { + eol = true; + } + return text.slice(j + 1, i).replace(/""/g, '"'); + } + while (I < N) { + var c = text.charCodeAt(I++), k = 1; + if (c === 10) eol = true; else if (c === 13) { + eol = true; + if (text.charCodeAt(I) === 10) ++I, ++k; + } else if (c !== delimiterCode) continue; + return text.slice(j, I - k); + } + return text.slice(j); + } + while ((t = token()) !== EOF) { + var a = []; + while (t !== EOL && t !== EOF) { + a.push(t); + t = token(); + } + if (f && (a = f(a, n++)) == null) continue; + rows.push(a); + } + return rows; + }; + dsv.format = function(rows) { + if (Array.isArray(rows[0])) return dsv.formatRows(rows); + var fieldSet = new d3_Set(), fields = []; + rows.forEach(function(row) { + for (var field in row) { + if (!fieldSet.has(field)) { + fields.push(fieldSet.add(field)); + } + } + }); + return [ fields.map(formatValue).join(delimiter) ].concat(rows.map(function(row) { + return fields.map(function(field) { + return formatValue(row[field]); + }).join(delimiter); + })).join("\n"); + }; + dsv.formatRows = function(rows) { + return rows.map(formatRow).join("\n"); + }; + function formatRow(row) { + return row.map(formatValue).join(delimiter); + } + function formatValue(text) { + return reFormat.test(text) ? '"' + text.replace(/\"/g, '""') + '"' : text; + } + return dsv; + }; + d3.csv = d3.dsv(",", "text/csv"); + d3.tsv = d3.dsv(" ", "text/tab-separated-values"); + var d3_timer_queueHead, d3_timer_queueTail, d3_timer_interval, d3_timer_timeout, d3_timer_frame = this[d3_vendorSymbol(this, "requestAnimationFrame")] || function(callback) { + setTimeout(callback, 17); + }; + d3.timer = function() { + d3_timer.apply(this, arguments); + }; + function d3_timer(callback, delay, then) { + var n = arguments.length; + if (n < 2) delay = 0; + if (n < 3) then = Date.now(); + var time = then + delay, timer = { + c: callback, + t: time, + n: null + }; + if (d3_timer_queueTail) d3_timer_queueTail.n = timer; else d3_timer_queueHead = timer; + d3_timer_queueTail = timer; + if (!d3_timer_interval) { + d3_timer_timeout = clearTimeout(d3_timer_timeout); + d3_timer_interval = 1; + d3_timer_frame(d3_timer_step); + } + return timer; + } + function d3_timer_step() { + var now = d3_timer_mark(), delay = d3_timer_sweep() - now; + if (delay > 24) { + if (isFinite(delay)) { + clearTimeout(d3_timer_timeout); + d3_timer_timeout = setTimeout(d3_timer_step, delay); + } + d3_timer_interval = 0; + } else { + d3_timer_interval = 1; + d3_timer_frame(d3_timer_step); + } + } + d3.timer.flush = function() { + d3_timer_mark(); + d3_timer_sweep(); + }; + function d3_timer_mark() { + var now = Date.now(), timer = d3_timer_queueHead; + while (timer) { + if (now >= timer.t && timer.c(now - timer.t)) timer.c = null; + timer = timer.n; + } + return now; + } + function d3_timer_sweep() { + var t0, t1 = d3_timer_queueHead, time = Infinity; + while (t1) { + if (t1.c) { + if (t1.t < time) time = t1.t; + t1 = (t0 = t1).n; + } else { + t1 = t0 ? t0.n = t1.n : d3_timer_queueHead = t1.n; + } + } + d3_timer_queueTail = t0; + return time; + } + function d3_format_precision(x, p) { + return p - (x ? Math.ceil(Math.log(x) / Math.LN10) : 1); + } + d3.round = function(x, n) { + return n ? Math.round(x * (n = Math.pow(10, n))) / n : Math.round(x); + }; + var d3_formatPrefixes = [ "y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y" ].map(d3_formatPrefix); + d3.formatPrefix = function(value, precision) { + var i = 0; + if (value = +value) { + if (value < 0) value *= -1; + if (precision) value = d3.round(value, d3_format_precision(value, precision)); + i = 1 + Math.floor(1e-12 + Math.log(value) / Math.LN10); + i = Math.max(-24, Math.min(24, Math.floor((i - 1) / 3) * 3)); + } + return d3_formatPrefixes[8 + i / 3]; + }; + function d3_formatPrefix(d, i) { + var k = Math.pow(10, abs(8 - i) * 3); + return { + scale: i > 8 ? function(d) { + return d / k; + } : function(d) { + return d * k; + }, + symbol: d + }; + } + function d3_locale_numberFormat(locale) { + var locale_decimal = locale.decimal, locale_thousands = locale.thousands, locale_grouping = locale.grouping, locale_currency = locale.currency, formatGroup = locale_grouping && locale_thousands ? function(value, width) { + var i = value.length, t = [], j = 0, g = locale_grouping[0], length = 0; + while (i > 0 && g > 0) { + if (length + g + 1 > width) g = Math.max(1, width - length); + t.push(value.substring(i -= g, i + g)); + if ((length += g + 1) > width) break; + g = locale_grouping[j = (j + 1) % locale_grouping.length]; + } + return t.reverse().join(locale_thousands); + } : d3_identity; + return function(specifier) { + var match = d3_format_re.exec(specifier), fill = match[1] || " ", align = match[2] || ">", sign = match[3] || "-", symbol = match[4] || "", zfill = match[5], width = +match[6], comma = match[7], precision = match[8], type = match[9], scale = 1, prefix = "", suffix = "", integer = false, exponent = true; + if (precision) precision = +precision.substring(1); + if (zfill || fill === "0" && align === "=") { + zfill = fill = "0"; + align = "="; + } + switch (type) { + case "n": + comma = true; + type = "g"; + break; + + case "%": + scale = 100; + suffix = "%"; + type = "f"; + break; + + case "p": + scale = 100; + suffix = "%"; + type = "r"; + break; + + case "b": + case "o": + case "x": + case "X": + if (symbol === "#") prefix = "0" + type.toLowerCase(); + + case "c": + exponent = false; + + case "d": + integer = true; + precision = 0; + break; + + case "s": + scale = -1; + type = "r"; + break; + } + if (symbol === "$") prefix = locale_currency[0], suffix = locale_currency[1]; + if (type == "r" && !precision) type = "g"; + if (precision != null) { + if (type == "g") precision = Math.max(1, Math.min(21, precision)); else if (type == "e" || type == "f") precision = Math.max(0, Math.min(20, precision)); + } + type = d3_format_types.get(type) || d3_format_typeDefault; + var zcomma = zfill && comma; + return function(value) { + var fullSuffix = suffix; + if (integer && value % 1) return ""; + var negative = value < 0 || value === 0 && 1 / value < 0 ? (value = -value, "-") : sign === "-" ? "" : sign; + if (scale < 0) { + var unit = d3.formatPrefix(value, precision); + value = unit.scale(value); + fullSuffix = unit.symbol + suffix; + } else { + value *= scale; + } + value = type(value, precision); + var i = value.lastIndexOf("."), before, after; + if (i < 0) { + var j = exponent ? value.lastIndexOf("e") : -1; + if (j < 0) before = value, after = ""; else before = value.substring(0, j), after = value.substring(j); + } else { + before = value.substring(0, i); + after = locale_decimal + value.substring(i + 1); + } + if (!zfill && comma) before = formatGroup(before, Infinity); + var length = prefix.length + before.length + after.length + (zcomma ? 0 : negative.length), padding = length < width ? new Array(length = width - length + 1).join(fill) : ""; + if (zcomma) before = formatGroup(padding + before, padding.length ? width - after.length : Infinity); + negative += prefix; + value = before + after; + return (align === "<" ? negative + value + padding : align === ">" ? padding + negative + value : align === "^" ? padding.substring(0, length >>= 1) + negative + value + padding.substring(length) : negative + (zcomma ? value : padding + value)) + fullSuffix; + }; + }; + } + var d3_format_re = /(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i; + var d3_format_types = d3.map({ + b: function(x) { + return x.toString(2); + }, + c: function(x) { + return String.fromCharCode(x); + }, + o: function(x) { + return x.toString(8); + }, + x: function(x) { + return x.toString(16); + }, + X: function(x) { + return x.toString(16).toUpperCase(); + }, + g: function(x, p) { + return x.toPrecision(p); + }, + e: function(x, p) { + return x.toExponential(p); + }, + f: function(x, p) { + return x.toFixed(p); + }, + r: function(x, p) { + return (x = d3.round(x, d3_format_precision(x, p))).toFixed(Math.max(0, Math.min(20, d3_format_precision(x * (1 + 1e-15), p)))); + } + }); + function d3_format_typeDefault(x) { + return x + ""; + } + var d3_time = d3.time = {}, d3_date = Date; + function d3_date_utc() { + this._ = new Date(arguments.length > 1 ? Date.UTC.apply(this, arguments) : arguments[0]); + } + d3_date_utc.prototype = { + getDate: function() { + return this._.getUTCDate(); + }, + getDay: function() { + return this._.getUTCDay(); + }, + getFullYear: function() { + return this._.getUTCFullYear(); + }, + getHours: function() { + return this._.getUTCHours(); + }, + getMilliseconds: function() { + return this._.getUTCMilliseconds(); + }, + getMinutes: function() { + return this._.getUTCMinutes(); + }, + getMonth: function() { + return this._.getUTCMonth(); + }, + getSeconds: function() { + return this._.getUTCSeconds(); + }, + getTime: function() { + return this._.getTime(); + }, + getTimezoneOffset: function() { + return 0; + }, + valueOf: function() { + return this._.valueOf(); + }, + setDate: function() { + d3_time_prototype.setUTCDate.apply(this._, arguments); + }, + setDay: function() { + d3_time_prototype.setUTCDay.apply(this._, arguments); + }, + setFullYear: function() { + d3_time_prototype.setUTCFullYear.apply(this._, arguments); + }, + setHours: function() { + d3_time_prototype.setUTCHours.apply(this._, arguments); + }, + setMilliseconds: function() { + d3_time_prototype.setUTCMilliseconds.apply(this._, arguments); + }, + setMinutes: function() { + d3_time_prototype.setUTCMinutes.apply(this._, arguments); + }, + setMonth: function() { + d3_time_prototype.setUTCMonth.apply(this._, arguments); + }, + setSeconds: function() { + d3_time_prototype.setUTCSeconds.apply(this._, arguments); + }, + setTime: function() { + d3_time_prototype.setTime.apply(this._, arguments); + } + }; + var d3_time_prototype = Date.prototype; + function d3_time_interval(local, step, number) { + function round(date) { + var d0 = local(date), d1 = offset(d0, 1); + return date - d0 < d1 - date ? d0 : d1; + } + function ceil(date) { + step(date = local(new d3_date(date - 1)), 1); + return date; + } + function offset(date, k) { + step(date = new d3_date(+date), k); + return date; + } + function range(t0, t1, dt) { + var time = ceil(t0), times = []; + if (dt > 1) { + while (time < t1) { + if (!(number(time) % dt)) times.push(new Date(+time)); + step(time, 1); + } + } else { + while (time < t1) times.push(new Date(+time)), step(time, 1); + } + return times; + } + function range_utc(t0, t1, dt) { + try { + d3_date = d3_date_utc; + var utc = new d3_date_utc(); + utc._ = t0; + return range(utc, t1, dt); + } finally { + d3_date = Date; + } + } + local.floor = local; + local.round = round; + local.ceil = ceil; + local.offset = offset; + local.range = range; + var utc = local.utc = d3_time_interval_utc(local); + utc.floor = utc; + utc.round = d3_time_interval_utc(round); + utc.ceil = d3_time_interval_utc(ceil); + utc.offset = d3_time_interval_utc(offset); + utc.range = range_utc; + return local; + } + function d3_time_interval_utc(method) { + return function(date, k) { + try { + d3_date = d3_date_utc; + var utc = new d3_date_utc(); + utc._ = date; + return method(utc, k)._; + } finally { + d3_date = Date; + } + }; + } + d3_time.year = d3_time_interval(function(date) { + date = d3_time.day(date); + date.setMonth(0, 1); + return date; + }, function(date, offset) { + date.setFullYear(date.getFullYear() + offset); + }, function(date) { + return date.getFullYear(); + }); + d3_time.years = d3_time.year.range; + d3_time.years.utc = d3_time.year.utc.range; + d3_time.day = d3_time_interval(function(date) { + var day = new d3_date(2e3, 0); + day.setFullYear(date.getFullYear(), date.getMonth(), date.getDate()); + return day; + }, function(date, offset) { + date.setDate(date.getDate() + offset); + }, function(date) { + return date.getDate() - 1; + }); + d3_time.days = d3_time.day.range; + d3_time.days.utc = d3_time.day.utc.range; + d3_time.dayOfYear = function(date) { + var year = d3_time.year(date); + return Math.floor((date - year - (date.getTimezoneOffset() - year.getTimezoneOffset()) * 6e4) / 864e5); + }; + [ "sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday" ].forEach(function(day, i) { + i = 7 - i; + var interval = d3_time[day] = d3_time_interval(function(date) { + (date = d3_time.day(date)).setDate(date.getDate() - (date.getDay() + i) % 7); + return date; + }, function(date, offset) { + date.setDate(date.getDate() + Math.floor(offset) * 7); + }, function(date) { + var day = d3_time.year(date).getDay(); + return Math.floor((d3_time.dayOfYear(date) + (day + i) % 7) / 7) - (day !== i); + }); + d3_time[day + "s"] = interval.range; + d3_time[day + "s"].utc = interval.utc.range; + d3_time[day + "OfYear"] = function(date) { + var day = d3_time.year(date).getDay(); + return Math.floor((d3_time.dayOfYear(date) + (day + i) % 7) / 7); + }; + }); + d3_time.week = d3_time.sunday; + d3_time.weeks = d3_time.sunday.range; + d3_time.weeks.utc = d3_time.sunday.utc.range; + d3_time.weekOfYear = d3_time.sundayOfYear; + function d3_locale_timeFormat(locale) { + var locale_dateTime = locale.dateTime, locale_date = locale.date, locale_time = locale.time, locale_periods = locale.periods, locale_days = locale.days, locale_shortDays = locale.shortDays, locale_months = locale.months, locale_shortMonths = locale.shortMonths; + function d3_time_format(template) { + var n = template.length; + function format(date) { + var string = [], i = -1, j = 0, c, p, f; + while (++i < n) { + if (template.charCodeAt(i) === 37) { + string.push(template.slice(j, i)); + if ((p = d3_time_formatPads[c = template.charAt(++i)]) != null) c = template.charAt(++i); + if (f = d3_time_formats[c]) c = f(date, p == null ? c === "e" ? " " : "0" : p); + string.push(c); + j = i + 1; + } + } + string.push(template.slice(j, i)); + return string.join(""); + } + format.parse = function(string) { + var d = { + y: 1900, + m: 0, + d: 1, + H: 0, + M: 0, + S: 0, + L: 0, + Z: null + }, i = d3_time_parse(d, template, string, 0); + if (i != string.length) return null; + if ("p" in d) d.H = d.H % 12 + d.p * 12; + var localZ = d.Z != null && d3_date !== d3_date_utc, date = new (localZ ? d3_date_utc : d3_date)(); + if ("j" in d) date.setFullYear(d.y, 0, d.j); else if ("W" in d || "U" in d) { + if (!("w" in d)) d.w = "W" in d ? 1 : 0; + date.setFullYear(d.y, 0, 1); + date.setFullYear(d.y, 0, "W" in d ? (d.w + 6) % 7 + d.W * 7 - (date.getDay() + 5) % 7 : d.w + d.U * 7 - (date.getDay() + 6) % 7); + } else date.setFullYear(d.y, d.m, d.d); + date.setHours(d.H + (d.Z / 100 | 0), d.M + d.Z % 100, d.S, d.L); + return localZ ? date._ : date; + }; + format.toString = function() { + return template; + }; + return format; + } + function d3_time_parse(date, template, string, j) { + var c, p, t, i = 0, n = template.length, m = string.length; + while (i < n) { + if (j >= m) return -1; + c = template.charCodeAt(i++); + if (c === 37) { + t = template.charAt(i++); + p = d3_time_parsers[t in d3_time_formatPads ? template.charAt(i++) : t]; + if (!p || (j = p(date, string, j)) < 0) return -1; + } else if (c != string.charCodeAt(j++)) { + return -1; + } + } + return j; + } + d3_time_format.utc = function(template) { + var local = d3_time_format(template); + function format(date) { + try { + d3_date = d3_date_utc; + var utc = new d3_date(); + utc._ = date; + return local(utc); + } finally { + d3_date = Date; + } + } + format.parse = function(string) { + try { + d3_date = d3_date_utc; + var date = local.parse(string); + return date && date._; + } finally { + d3_date = Date; + } + }; + format.toString = local.toString; + return format; + }; + d3_time_format.multi = d3_time_format.utc.multi = d3_time_formatMulti; + var d3_time_periodLookup = d3.map(), d3_time_dayRe = d3_time_formatRe(locale_days), d3_time_dayLookup = d3_time_formatLookup(locale_days), d3_time_dayAbbrevRe = d3_time_formatRe(locale_shortDays), d3_time_dayAbbrevLookup = d3_time_formatLookup(locale_shortDays), d3_time_monthRe = d3_time_formatRe(locale_months), d3_time_monthLookup = d3_time_formatLookup(locale_months), d3_time_monthAbbrevRe = d3_time_formatRe(locale_shortMonths), d3_time_monthAbbrevLookup = d3_time_formatLookup(locale_shortMonths); + locale_periods.forEach(function(p, i) { + d3_time_periodLookup.set(p.toLowerCase(), i); + }); + var d3_time_formats = { + a: function(d) { + return locale_shortDays[d.getDay()]; + }, + A: function(d) { + return locale_days[d.getDay()]; + }, + b: function(d) { + return locale_shortMonths[d.getMonth()]; + }, + B: function(d) { + return locale_months[d.getMonth()]; + }, + c: d3_time_format(locale_dateTime), + d: function(d, p) { + return d3_time_formatPad(d.getDate(), p, 2); + }, + e: function(d, p) { + return d3_time_formatPad(d.getDate(), p, 2); + }, + H: function(d, p) { + return d3_time_formatPad(d.getHours(), p, 2); + }, + I: function(d, p) { + return d3_time_formatPad(d.getHours() % 12 || 12, p, 2); + }, + j: function(d, p) { + return d3_time_formatPad(1 + d3_time.dayOfYear(d), p, 3); + }, + L: function(d, p) { + return d3_time_formatPad(d.getMilliseconds(), p, 3); + }, + m: function(d, p) { + return d3_time_formatPad(d.getMonth() + 1, p, 2); + }, + M: function(d, p) { + return d3_time_formatPad(d.getMinutes(), p, 2); + }, + p: function(d) { + return locale_periods[+(d.getHours() >= 12)]; + }, + S: function(d, p) { + return d3_time_formatPad(d.getSeconds(), p, 2); + }, + U: function(d, p) { + return d3_time_formatPad(d3_time.sundayOfYear(d), p, 2); + }, + w: function(d) { + return d.getDay(); + }, + W: function(d, p) { + return d3_time_formatPad(d3_time.mondayOfYear(d), p, 2); + }, + x: d3_time_format(locale_date), + X: d3_time_format(locale_time), + y: function(d, p) { + return d3_time_formatPad(d.getFullYear() % 100, p, 2); + }, + Y: function(d, p) { + return d3_time_formatPad(d.getFullYear() % 1e4, p, 4); + }, + Z: d3_time_zone, + "%": function() { + return "%"; + } + }; + var d3_time_parsers = { + a: d3_time_parseWeekdayAbbrev, + A: d3_time_parseWeekday, + b: d3_time_parseMonthAbbrev, + B: d3_time_parseMonth, + c: d3_time_parseLocaleFull, + d: d3_time_parseDay, + e: d3_time_parseDay, + H: d3_time_parseHour24, + I: d3_time_parseHour24, + j: d3_time_parseDayOfYear, + L: d3_time_parseMilliseconds, + m: d3_time_parseMonthNumber, + M: d3_time_parseMinutes, + p: d3_time_parseAmPm, + S: d3_time_parseSeconds, + U: d3_time_parseWeekNumberSunday, + w: d3_time_parseWeekdayNumber, + W: d3_time_parseWeekNumberMonday, + x: d3_time_parseLocaleDate, + X: d3_time_parseLocaleTime, + y: d3_time_parseYear, + Y: d3_time_parseFullYear, + Z: d3_time_parseZone, + "%": d3_time_parseLiteralPercent + }; + function d3_time_parseWeekdayAbbrev(date, string, i) { + d3_time_dayAbbrevRe.lastIndex = 0; + var n = d3_time_dayAbbrevRe.exec(string.slice(i)); + return n ? (date.w = d3_time_dayAbbrevLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; + } + function d3_time_parseWeekday(date, string, i) { + d3_time_dayRe.lastIndex = 0; + var n = d3_time_dayRe.exec(string.slice(i)); + return n ? (date.w = d3_time_dayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; + } + function d3_time_parseMonthAbbrev(date, string, i) { + d3_time_monthAbbrevRe.lastIndex = 0; + var n = d3_time_monthAbbrevRe.exec(string.slice(i)); + return n ? (date.m = d3_time_monthAbbrevLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; + } + function d3_time_parseMonth(date, string, i) { + d3_time_monthRe.lastIndex = 0; + var n = d3_time_monthRe.exec(string.slice(i)); + return n ? (date.m = d3_time_monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; + } + function d3_time_parseLocaleFull(date, string, i) { + return d3_time_parse(date, d3_time_formats.c.toString(), string, i); + } + function d3_time_parseLocaleDate(date, string, i) { + return d3_time_parse(date, d3_time_formats.x.toString(), string, i); + } + function d3_time_parseLocaleTime(date, string, i) { + return d3_time_parse(date, d3_time_formats.X.toString(), string, i); + } + function d3_time_parseAmPm(date, string, i) { + var n = d3_time_periodLookup.get(string.slice(i, i += 2).toLowerCase()); + return n == null ? -1 : (date.p = n, i); + } + return d3_time_format; + } + var d3_time_formatPads = { + "-": "", + _: " ", + "0": "0" + }, d3_time_numberRe = /^\s*\d+/, d3_time_percentRe = /^%/; + function d3_time_formatPad(value, fill, width) { + var sign = value < 0 ? "-" : "", string = (sign ? -value : value) + "", length = string.length; + return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string); + } + function d3_time_formatRe(names) { + return new RegExp("^(?:" + names.map(d3.requote).join("|") + ")", "i"); + } + function d3_time_formatLookup(names) { + var map = new d3_Map(), i = -1, n = names.length; + while (++i < n) map.set(names[i].toLowerCase(), i); + return map; + } + function d3_time_parseWeekdayNumber(date, string, i) { + d3_time_numberRe.lastIndex = 0; + var n = d3_time_numberRe.exec(string.slice(i, i + 1)); + return n ? (date.w = +n[0], i + n[0].length) : -1; + } + function d3_time_parseWeekNumberSunday(date, string, i) { + d3_time_numberRe.lastIndex = 0; + var n = d3_time_numberRe.exec(string.slice(i)); + return n ? (date.U = +n[0], i + n[0].length) : -1; + } + function d3_time_parseWeekNumberMonday(date, string, i) { + d3_time_numberRe.lastIndex = 0; + var n = d3_time_numberRe.exec(string.slice(i)); + return n ? (date.W = +n[0], i + n[0].length) : -1; + } + function d3_time_parseFullYear(date, string, i) { + d3_time_numberRe.lastIndex = 0; + var n = d3_time_numberRe.exec(string.slice(i, i + 4)); + return n ? (date.y = +n[0], i + n[0].length) : -1; + } + function d3_time_parseYear(date, string, i) { + d3_time_numberRe.lastIndex = 0; + var n = d3_time_numberRe.exec(string.slice(i, i + 2)); + return n ? (date.y = d3_time_expandYear(+n[0]), i + n[0].length) : -1; + } + function d3_time_parseZone(date, string, i) { + return /^[+-]\d{4}$/.test(string = string.slice(i, i + 5)) ? (date.Z = -string, + i + 5) : -1; + } + function d3_time_expandYear(d) { + return d + (d > 68 ? 1900 : 2e3); + } + function d3_time_parseMonthNumber(date, string, i) { + d3_time_numberRe.lastIndex = 0; + var n = d3_time_numberRe.exec(string.slice(i, i + 2)); + return n ? (date.m = n[0] - 1, i + n[0].length) : -1; + } + function d3_time_parseDay(date, string, i) { + d3_time_numberRe.lastIndex = 0; + var n = d3_time_numberRe.exec(string.slice(i, i + 2)); + return n ? (date.d = +n[0], i + n[0].length) : -1; + } + function d3_time_parseDayOfYear(date, string, i) { + d3_time_numberRe.lastIndex = 0; + var n = d3_time_numberRe.exec(string.slice(i, i + 3)); + return n ? (date.j = +n[0], i + n[0].length) : -1; + } + function d3_time_parseHour24(date, string, i) { + d3_time_numberRe.lastIndex = 0; + var n = d3_time_numberRe.exec(string.slice(i, i + 2)); + return n ? (date.H = +n[0], i + n[0].length) : -1; + } + function d3_time_parseMinutes(date, string, i) { + d3_time_numberRe.lastIndex = 0; + var n = d3_time_numberRe.exec(string.slice(i, i + 2)); + return n ? (date.M = +n[0], i + n[0].length) : -1; + } + function d3_time_parseSeconds(date, string, i) { + d3_time_numberRe.lastIndex = 0; + var n = d3_time_numberRe.exec(string.slice(i, i + 2)); + return n ? (date.S = +n[0], i + n[0].length) : -1; + } + function d3_time_parseMilliseconds(date, string, i) { + d3_time_numberRe.lastIndex = 0; + var n = d3_time_numberRe.exec(string.slice(i, i + 3)); + return n ? (date.L = +n[0], i + n[0].length) : -1; + } + function d3_time_zone(d) { + var z = d.getTimezoneOffset(), zs = z > 0 ? "-" : "+", zh = abs(z) / 60 | 0, zm = abs(z) % 60; + return zs + d3_time_formatPad(zh, "0", 2) + d3_time_formatPad(zm, "0", 2); + } + function d3_time_parseLiteralPercent(date, string, i) { + d3_time_percentRe.lastIndex = 0; + var n = d3_time_percentRe.exec(string.slice(i, i + 1)); + return n ? i + n[0].length : -1; + } + function d3_time_formatMulti(formats) { + var n = formats.length, i = -1; + while (++i < n) formats[i][0] = this(formats[i][0]); + return function(date) { + var i = 0, f = formats[i]; + while (!f[1](date)) f = formats[++i]; + return f[0](date); + }; + } + d3.locale = function(locale) { + return { + numberFormat: d3_locale_numberFormat(locale), + timeFormat: d3_locale_timeFormat(locale) + }; + }; + var d3_locale_enUS = d3.locale({ + decimal: ".", + thousands: ",", + grouping: [ 3 ], + currency: [ "$", "" ], + dateTime: "%a %b %e %X %Y", + date: "%m/%d/%Y", + time: "%H:%M:%S", + periods: [ "AM", "PM" ], + days: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], + shortDays: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], + months: [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ], + shortMonths: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ] + }); + d3.format = d3_locale_enUS.numberFormat; + d3.geo = {}; + function d3_adder() {} + d3_adder.prototype = { + s: 0, + t: 0, + add: function(y) { + d3_adderSum(y, this.t, d3_adderTemp); + d3_adderSum(d3_adderTemp.s, this.s, this); + if (this.s) this.t += d3_adderTemp.t; else this.s = d3_adderTemp.t; + }, + reset: function() { + this.s = this.t = 0; + }, + valueOf: function() { + return this.s; + } + }; + var d3_adderTemp = new d3_adder(); + function d3_adderSum(a, b, o) { + var x = o.s = a + b, bv = x - a, av = x - bv; + o.t = a - av + (b - bv); + } + d3.geo.stream = function(object, listener) { + if (object && d3_geo_streamObjectType.hasOwnProperty(object.type)) { + d3_geo_streamObjectType[object.type](object, listener); + } else { + d3_geo_streamGeometry(object, listener); + } + }; + function d3_geo_streamGeometry(geometry, listener) { + if (geometry && d3_geo_streamGeometryType.hasOwnProperty(geometry.type)) { + d3_geo_streamGeometryType[geometry.type](geometry, listener); + } + } + var d3_geo_streamObjectType = { + Feature: function(feature, listener) { + d3_geo_streamGeometry(feature.geometry, listener); + }, + FeatureCollection: function(object, listener) { + var features = object.features, i = -1, n = features.length; + while (++i < n) d3_geo_streamGeometry(features[i].geometry, listener); + } + }; + var d3_geo_streamGeometryType = { + Sphere: function(object, listener) { + listener.sphere(); + }, + Point: function(object, listener) { + object = object.coordinates; + listener.point(object[0], object[1], object[2]); + }, + MultiPoint: function(object, listener) { + var coordinates = object.coordinates, i = -1, n = coordinates.length; + while (++i < n) object = coordinates[i], listener.point(object[0], object[1], object[2]); + }, + LineString: function(object, listener) { + d3_geo_streamLine(object.coordinates, listener, 0); + }, + MultiLineString: function(object, listener) { + var coordinates = object.coordinates, i = -1, n = coordinates.length; + while (++i < n) d3_geo_streamLine(coordinates[i], listener, 0); + }, + Polygon: function(object, listener) { + d3_geo_streamPolygon(object.coordinates, listener); + }, + MultiPolygon: function(object, listener) { + var coordinates = object.coordinates, i = -1, n = coordinates.length; + while (++i < n) d3_geo_streamPolygon(coordinates[i], listener); + }, + GeometryCollection: function(object, listener) { + var geometries = object.geometries, i = -1, n = geometries.length; + while (++i < n) d3_geo_streamGeometry(geometries[i], listener); + } + }; + function d3_geo_streamLine(coordinates, listener, closed) { + var i = -1, n = coordinates.length - closed, coordinate; + listener.lineStart(); + while (++i < n) coordinate = coordinates[i], listener.point(coordinate[0], coordinate[1], coordinate[2]); + listener.lineEnd(); + } + function d3_geo_streamPolygon(coordinates, listener) { + var i = -1, n = coordinates.length; + listener.polygonStart(); + while (++i < n) d3_geo_streamLine(coordinates[i], listener, 1); + listener.polygonEnd(); + } + d3.geo.area = function(object) { + d3_geo_areaSum = 0; + d3.geo.stream(object, d3_geo_area); + return d3_geo_areaSum; + }; + var d3_geo_areaSum, d3_geo_areaRingSum = new d3_adder(); + var d3_geo_area = { + sphere: function() { + d3_geo_areaSum += 4 * Ï€; + }, + point: d3_noop, + lineStart: d3_noop, + lineEnd: d3_noop, + polygonStart: function() { + d3_geo_areaRingSum.reset(); + d3_geo_area.lineStart = d3_geo_areaRingStart; + }, + polygonEnd: function() { + var area = 2 * d3_geo_areaRingSum; + d3_geo_areaSum += area < 0 ? 4 * Ï€ + area : area; + d3_geo_area.lineStart = d3_geo_area.lineEnd = d3_geo_area.point = d3_noop; + } + }; + function d3_geo_areaRingStart() { + var λ00, φ00, λ0, cosφ0, sinφ0; + d3_geo_area.point = function(λ, φ) { + d3_geo_area.point = nextPoint; + λ0 = (λ00 = λ) * d3_radians, cosφ0 = Math.cos(φ = (φ00 = φ) * d3_radians / 2 + Ï€ / 4), + sinφ0 = Math.sin(φ); + }; + function nextPoint(λ, φ) { + λ *= d3_radians; + φ = φ * d3_radians / 2 + Ï€ / 4; + var dλ = λ - λ0, sdλ = dλ >= 0 ? 1 : -1, adλ = sdλ * dλ, cosφ = Math.cos(φ), sinφ = Math.sin(φ), k = sinφ0 * sinφ, u = cosφ0 * cosφ + k * Math.cos(adλ), v = k * sdλ * Math.sin(adλ); + d3_geo_areaRingSum.add(Math.atan2(v, u)); + λ0 = λ, cosφ0 = cosφ, sinφ0 = sinφ; + } + d3_geo_area.lineEnd = function() { + nextPoint(λ00, φ00); + }; + } + function d3_geo_cartesian(spherical) { + var λ = spherical[0], φ = spherical[1], cosφ = Math.cos(φ); + return [ cosφ * Math.cos(λ), cosφ * Math.sin(λ), Math.sin(φ) ]; + } + function d3_geo_cartesianDot(a, b) { + return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; + } + function d3_geo_cartesianCross(a, b) { + return [ a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0] ]; + } + function d3_geo_cartesianAdd(a, b) { + a[0] += b[0]; + a[1] += b[1]; + a[2] += b[2]; + } + function d3_geo_cartesianScale(vector, k) { + return [ vector[0] * k, vector[1] * k, vector[2] * k ]; + } + function d3_geo_cartesianNormalize(d) { + var l = Math.sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]); + d[0] /= l; + d[1] /= l; + d[2] /= l; + } + function d3_geo_spherical(cartesian) { + return [ Math.atan2(cartesian[1], cartesian[0]), d3_asin(cartesian[2]) ]; + } + function d3_geo_sphericalEqual(a, b) { + return abs(a[0] - b[0]) < ε && abs(a[1] - b[1]) < ε; + } + d3.geo.bounds = function() { + var λ0, φ0, λ1, φ1, λ_, λ__, φ__, p0, dλSum, ranges, range; + var bound = { + point: point, + lineStart: lineStart, + lineEnd: lineEnd, + polygonStart: function() { + bound.point = ringPoint; + bound.lineStart = ringStart; + bound.lineEnd = ringEnd; + dλSum = 0; + d3_geo_area.polygonStart(); + }, + polygonEnd: function() { + d3_geo_area.polygonEnd(); + bound.point = point; + bound.lineStart = lineStart; + bound.lineEnd = lineEnd; + if (d3_geo_areaRingSum < 0) λ0 = -(λ1 = 180), φ0 = -(φ1 = 90); else if (dλSum > ε) φ1 = 90; else if (dλSum < -ε) φ0 = -90; + range[0] = λ0, range[1] = λ1; + } + }; + function point(λ, φ) { + ranges.push(range = [ λ0 = λ, λ1 = λ ]); + if (φ < φ0) φ0 = φ; + if (φ > φ1) φ1 = φ; + } + function linePoint(λ, φ) { + var p = d3_geo_cartesian([ λ * d3_radians, φ * d3_radians ]); + if (p0) { + var normal = d3_geo_cartesianCross(p0, p), equatorial = [ normal[1], -normal[0], 0 ], inflection = d3_geo_cartesianCross(equatorial, normal); + d3_geo_cartesianNormalize(inflection); + inflection = d3_geo_spherical(inflection); + var dλ = λ - λ_, s = dλ > 0 ? 1 : -1, λi = inflection[0] * d3_degrees * s, antimeridian = abs(dλ) > 180; + if (antimeridian ^ (s * λ_ < λi && λi < s * λ)) { + var φi = inflection[1] * d3_degrees; + if (φi > φ1) φ1 = φi; + } else if (λi = (λi + 360) % 360 - 180, antimeridian ^ (s * λ_ < λi && λi < s * λ)) { + var φi = -inflection[1] * d3_degrees; + if (φi < φ0) φ0 = φi; + } else { + if (φ < φ0) φ0 = φ; + if (φ > φ1) φ1 = φ; + } + if (antimeridian) { + if (λ < λ_) { + if (angle(λ0, λ) > angle(λ0, λ1)) λ1 = λ; + } else { + if (angle(λ, λ1) > angle(λ0, λ1)) λ0 = λ; + } + } else { + if (λ1 >= λ0) { + if (λ < λ0) λ0 = λ; + if (λ > λ1) λ1 = λ; + } else { + if (λ > λ_) { + if (angle(λ0, λ) > angle(λ0, λ1)) λ1 = λ; + } else { + if (angle(λ, λ1) > angle(λ0, λ1)) λ0 = λ; + } + } + } + } else { + point(λ, φ); + } + p0 = p, λ_ = λ; + } + function lineStart() { + bound.point = linePoint; + } + function lineEnd() { + range[0] = λ0, range[1] = λ1; + bound.point = point; + p0 = null; + } + function ringPoint(λ, φ) { + if (p0) { + var dλ = λ - λ_; + dλSum += abs(dλ) > 180 ? dλ + (dλ > 0 ? 360 : -360) : dλ; + } else λ__ = λ, φ__ = φ; + d3_geo_area.point(λ, φ); + linePoint(λ, φ); + } + function ringStart() { + d3_geo_area.lineStart(); + } + function ringEnd() { + ringPoint(λ__, φ__); + d3_geo_area.lineEnd(); + if (abs(dλSum) > ε) λ0 = -(λ1 = 180); + range[0] = λ0, range[1] = λ1; + p0 = null; + } + function angle(λ0, λ1) { + return (λ1 -= λ0) < 0 ? λ1 + 360 : λ1; + } + function compareRanges(a, b) { + return a[0] - b[0]; + } + function withinRange(x, range) { + return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x; + } + return function(feature) { + φ1 = λ1 = -(λ0 = φ0 = Infinity); + ranges = []; + d3.geo.stream(feature, bound); + var n = ranges.length; + if (n) { + ranges.sort(compareRanges); + for (var i = 1, a = ranges[0], b, merged = [ a ]; i < n; ++i) { + b = ranges[i]; + if (withinRange(b[0], a) || withinRange(b[1], a)) { + if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1]; + if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0]; + } else { + merged.push(a = b); + } + } + var best = -Infinity, dλ; + for (var n = merged.length - 1, i = 0, a = merged[n], b; i <= n; a = b, ++i) { + b = merged[i]; + if ((dλ = angle(a[1], b[0])) > best) best = dλ, λ0 = b[0], λ1 = a[1]; + } + } + ranges = range = null; + return λ0 === Infinity || φ0 === Infinity ? [ [ NaN, NaN ], [ NaN, NaN ] ] : [ [ λ0, φ0 ], [ λ1, φ1 ] ]; + }; + }(); + d3.geo.centroid = function(object) { + d3_geo_centroidW0 = d3_geo_centroidW1 = d3_geo_centroidX0 = d3_geo_centroidY0 = d3_geo_centroidZ0 = d3_geo_centroidX1 = d3_geo_centroidY1 = d3_geo_centroidZ1 = d3_geo_centroidX2 = d3_geo_centroidY2 = d3_geo_centroidZ2 = 0; + d3.geo.stream(object, d3_geo_centroid); + var x = d3_geo_centroidX2, y = d3_geo_centroidY2, z = d3_geo_centroidZ2, m = x * x + y * y + z * z; + if (m < ε2) { + x = d3_geo_centroidX1, y = d3_geo_centroidY1, z = d3_geo_centroidZ1; + if (d3_geo_centroidW1 < ε) x = d3_geo_centroidX0, y = d3_geo_centroidY0, z = d3_geo_centroidZ0; + m = x * x + y * y + z * z; + if (m < ε2) return [ NaN, NaN ]; + } + return [ Math.atan2(y, x) * d3_degrees, d3_asin(z / Math.sqrt(m)) * d3_degrees ]; + }; + var d3_geo_centroidW0, d3_geo_centroidW1, d3_geo_centroidX0, d3_geo_centroidY0, d3_geo_centroidZ0, d3_geo_centroidX1, d3_geo_centroidY1, d3_geo_centroidZ1, d3_geo_centroidX2, d3_geo_centroidY2, d3_geo_centroidZ2; + var d3_geo_centroid = { + sphere: d3_noop, + point: d3_geo_centroidPoint, + lineStart: d3_geo_centroidLineStart, + lineEnd: d3_geo_centroidLineEnd, + polygonStart: function() { + d3_geo_centroid.lineStart = d3_geo_centroidRingStart; + }, + polygonEnd: function() { + d3_geo_centroid.lineStart = d3_geo_centroidLineStart; + } + }; + function d3_geo_centroidPoint(λ, φ) { + λ *= d3_radians; + var cosφ = Math.cos(φ *= d3_radians); + d3_geo_centroidPointXYZ(cosφ * Math.cos(λ), cosφ * Math.sin(λ), Math.sin(φ)); + } + function d3_geo_centroidPointXYZ(x, y, z) { + ++d3_geo_centroidW0; + d3_geo_centroidX0 += (x - d3_geo_centroidX0) / d3_geo_centroidW0; + d3_geo_centroidY0 += (y - d3_geo_centroidY0) / d3_geo_centroidW0; + d3_geo_centroidZ0 += (z - d3_geo_centroidZ0) / d3_geo_centroidW0; + } + function d3_geo_centroidLineStart() { + var x0, y0, z0; + d3_geo_centroid.point = function(λ, φ) { + λ *= d3_radians; + var cosφ = Math.cos(φ *= d3_radians); + x0 = cosφ * Math.cos(λ); + y0 = cosφ * Math.sin(λ); + z0 = Math.sin(φ); + d3_geo_centroid.point = nextPoint; + d3_geo_centroidPointXYZ(x0, y0, z0); + }; + function nextPoint(λ, φ) { + λ *= d3_radians; + var cosφ = Math.cos(φ *= d3_radians), x = cosφ * Math.cos(λ), y = cosφ * Math.sin(λ), z = Math.sin(φ), w = Math.atan2(Math.sqrt((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z); + d3_geo_centroidW1 += w; + d3_geo_centroidX1 += w * (x0 + (x0 = x)); + d3_geo_centroidY1 += w * (y0 + (y0 = y)); + d3_geo_centroidZ1 += w * (z0 + (z0 = z)); + d3_geo_centroidPointXYZ(x0, y0, z0); + } + } + function d3_geo_centroidLineEnd() { + d3_geo_centroid.point = d3_geo_centroidPoint; + } + function d3_geo_centroidRingStart() { + var λ00, φ00, x0, y0, z0; + d3_geo_centroid.point = function(λ, φ) { + λ00 = λ, φ00 = φ; + d3_geo_centroid.point = nextPoint; + λ *= d3_radians; + var cosφ = Math.cos(φ *= d3_radians); + x0 = cosφ * Math.cos(λ); + y0 = cosφ * Math.sin(λ); + z0 = Math.sin(φ); + d3_geo_centroidPointXYZ(x0, y0, z0); + }; + d3_geo_centroid.lineEnd = function() { + nextPoint(λ00, φ00); + d3_geo_centroid.lineEnd = d3_geo_centroidLineEnd; + d3_geo_centroid.point = d3_geo_centroidPoint; + }; + function nextPoint(λ, φ) { + λ *= d3_radians; + var cosφ = Math.cos(φ *= d3_radians), x = cosφ * Math.cos(λ), y = cosφ * Math.sin(λ), z = Math.sin(φ), cx = y0 * z - z0 * y, cy = z0 * x - x0 * z, cz = x0 * y - y0 * x, m = Math.sqrt(cx * cx + cy * cy + cz * cz), u = x0 * x + y0 * y + z0 * z, v = m && -d3_acos(u) / m, w = Math.atan2(m, u); + d3_geo_centroidX2 += v * cx; + d3_geo_centroidY2 += v * cy; + d3_geo_centroidZ2 += v * cz; + d3_geo_centroidW1 += w; + d3_geo_centroidX1 += w * (x0 + (x0 = x)); + d3_geo_centroidY1 += w * (y0 + (y0 = y)); + d3_geo_centroidZ1 += w * (z0 + (z0 = z)); + d3_geo_centroidPointXYZ(x0, y0, z0); + } + } + function d3_geo_compose(a, b) { + function compose(x, y) { + return x = a(x, y), b(x[0], x[1]); + } + if (a.invert && b.invert) compose.invert = function(x, y) { + return x = b.invert(x, y), x && a.invert(x[0], x[1]); + }; + return compose; + } + function d3_true() { + return true; + } + function d3_geo_clipPolygon(segments, compare, clipStartInside, interpolate, listener) { + var subject = [], clip = []; + segments.forEach(function(segment) { + if ((n = segment.length - 1) <= 0) return; + var n, p0 = segment[0], p1 = segment[n]; + if (d3_geo_sphericalEqual(p0, p1)) { + listener.lineStart(); + for (var i = 0; i < n; ++i) listener.point((p0 = segment[i])[0], p0[1]); + listener.lineEnd(); + return; + } + var a = new d3_geo_clipPolygonIntersection(p0, segment, null, true), b = new d3_geo_clipPolygonIntersection(p0, null, a, false); + a.o = b; + subject.push(a); + clip.push(b); + a = new d3_geo_clipPolygonIntersection(p1, segment, null, false); + b = new d3_geo_clipPolygonIntersection(p1, null, a, true); + a.o = b; + subject.push(a); + clip.push(b); + }); + clip.sort(compare); + d3_geo_clipPolygonLinkCircular(subject); + d3_geo_clipPolygonLinkCircular(clip); + if (!subject.length) return; + for (var i = 0, entry = clipStartInside, n = clip.length; i < n; ++i) { + clip[i].e = entry = !entry; + } + var start = subject[0], points, point; + while (1) { + var current = start, isSubject = true; + while (current.v) if ((current = current.n) === start) return; + points = current.z; + listener.lineStart(); + do { + current.v = current.o.v = true; + if (current.e) { + if (isSubject) { + for (var i = 0, n = points.length; i < n; ++i) listener.point((point = points[i])[0], point[1]); + } else { + interpolate(current.x, current.n.x, 1, listener); + } + current = current.n; + } else { + if (isSubject) { + points = current.p.z; + for (var i = points.length - 1; i >= 0; --i) listener.point((point = points[i])[0], point[1]); + } else { + interpolate(current.x, current.p.x, -1, listener); + } + current = current.p; + } + current = current.o; + points = current.z; + isSubject = !isSubject; + } while (!current.v); + listener.lineEnd(); + } + } + function d3_geo_clipPolygonLinkCircular(array) { + if (!(n = array.length)) return; + var n, i = 0, a = array[0], b; + while (++i < n) { + a.n = b = array[i]; + b.p = a; + a = b; + } + a.n = b = array[0]; + b.p = a; + } + function d3_geo_clipPolygonIntersection(point, points, other, entry) { + this.x = point; + this.z = points; + this.o = other; + this.e = entry; + this.v = false; + this.n = this.p = null; + } + function d3_geo_clip(pointVisible, clipLine, interpolate, clipStart) { + return function(rotate, listener) { + var line = clipLine(listener), rotatedClipStart = rotate.invert(clipStart[0], clipStart[1]); + var clip = { + point: point, + lineStart: lineStart, + lineEnd: lineEnd, + polygonStart: function() { + clip.point = pointRing; + clip.lineStart = ringStart; + clip.lineEnd = ringEnd; + segments = []; + polygon = []; + }, + polygonEnd: function() { + clip.point = point; + clip.lineStart = lineStart; + clip.lineEnd = lineEnd; + segments = d3.merge(segments); + var clipStartInside = d3_geo_pointInPolygon(rotatedClipStart, polygon); + if (segments.length) { + if (!polygonStarted) listener.polygonStart(), polygonStarted = true; + d3_geo_clipPolygon(segments, d3_geo_clipSort, clipStartInside, interpolate, listener); + } else if (clipStartInside) { + if (!polygonStarted) listener.polygonStart(), polygonStarted = true; + listener.lineStart(); + interpolate(null, null, 1, listener); + listener.lineEnd(); + } + if (polygonStarted) listener.polygonEnd(), polygonStarted = false; + segments = polygon = null; + }, + sphere: function() { + listener.polygonStart(); + listener.lineStart(); + interpolate(null, null, 1, listener); + listener.lineEnd(); + listener.polygonEnd(); + } + }; + function point(λ, φ) { + var point = rotate(λ, φ); + if (pointVisible(λ = point[0], φ = point[1])) listener.point(λ, φ); + } + function pointLine(λ, φ) { + var point = rotate(λ, φ); + line.point(point[0], point[1]); + } + function lineStart() { + clip.point = pointLine; + line.lineStart(); + } + function lineEnd() { + clip.point = point; + line.lineEnd(); + } + var segments; + var buffer = d3_geo_clipBufferListener(), ringListener = clipLine(buffer), polygonStarted = false, polygon, ring; + function pointRing(λ, φ) { + ring.push([ λ, φ ]); + var point = rotate(λ, φ); + ringListener.point(point[0], point[1]); + } + function ringStart() { + ringListener.lineStart(); + ring = []; + } + function ringEnd() { + pointRing(ring[0][0], ring[0][1]); + ringListener.lineEnd(); + var clean = ringListener.clean(), ringSegments = buffer.buffer(), segment, n = ringSegments.length; + ring.pop(); + polygon.push(ring); + ring = null; + if (!n) return; + if (clean & 1) { + segment = ringSegments[0]; + var n = segment.length - 1, i = -1, point; + if (n > 0) { + if (!polygonStarted) listener.polygonStart(), polygonStarted = true; + listener.lineStart(); + while (++i < n) listener.point((point = segment[i])[0], point[1]); + listener.lineEnd(); + } + return; + } + if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift())); + segments.push(ringSegments.filter(d3_geo_clipSegmentLength1)); + } + return clip; + }; + } + function d3_geo_clipSegmentLength1(segment) { + return segment.length > 1; + } + function d3_geo_clipBufferListener() { + var lines = [], line; + return { + lineStart: function() { + lines.push(line = []); + }, + point: function(λ, φ) { + line.push([ λ, φ ]); + }, + lineEnd: d3_noop, + buffer: function() { + var buffer = lines; + lines = []; + line = null; + return buffer; + }, + rejoin: function() { + if (lines.length > 1) lines.push(lines.pop().concat(lines.shift())); + } + }; + } + function d3_geo_clipSort(a, b) { + return ((a = a.x)[0] < 0 ? a[1] - halfÏ€ - ε : halfÏ€ - a[1]) - ((b = b.x)[0] < 0 ? b[1] - halfÏ€ - ε : halfÏ€ - b[1]); + } + var d3_geo_clipAntimeridian = d3_geo_clip(d3_true, d3_geo_clipAntimeridianLine, d3_geo_clipAntimeridianInterpolate, [ -Ï€, -Ï€ / 2 ]); + function d3_geo_clipAntimeridianLine(listener) { + var λ0 = NaN, φ0 = NaN, sλ0 = NaN, clean; + return { + lineStart: function() { + listener.lineStart(); + clean = 1; + }, + point: function(λ1, φ1) { + var sλ1 = λ1 > 0 ? Ï€ : -Ï€, dλ = abs(λ1 - λ0); + if (abs(dλ - Ï€) < ε) { + listener.point(λ0, φ0 = (φ0 + φ1) / 2 > 0 ? halfÏ€ : -halfÏ€); + listener.point(sλ0, φ0); + listener.lineEnd(); + listener.lineStart(); + listener.point(sλ1, φ0); + listener.point(λ1, φ0); + clean = 0; + } else if (sλ0 !== sλ1 && dλ >= Ï€) { + if (abs(λ0 - sλ0) < ε) λ0 -= sλ0 * ε; + if (abs(λ1 - sλ1) < ε) λ1 -= sλ1 * ε; + φ0 = d3_geo_clipAntimeridianIntersect(λ0, φ0, λ1, φ1); + listener.point(sλ0, φ0); + listener.lineEnd(); + listener.lineStart(); + listener.point(sλ1, φ0); + clean = 0; + } + listener.point(λ0 = λ1, φ0 = φ1); + sλ0 = sλ1; + }, + lineEnd: function() { + listener.lineEnd(); + λ0 = φ0 = NaN; + }, + clean: function() { + return 2 - clean; + } + }; + } + function d3_geo_clipAntimeridianIntersect(λ0, φ0, λ1, φ1) { + var cosφ0, cosφ1, sinλ0_λ1 = Math.sin(λ0 - λ1); + return abs(sinλ0_λ1) > ε ? Math.atan((Math.sin(φ0) * (cosφ1 = Math.cos(φ1)) * Math.sin(λ1) - Math.sin(φ1) * (cosφ0 = Math.cos(φ0)) * Math.sin(λ0)) / (cosφ0 * cosφ1 * sinλ0_λ1)) : (φ0 + φ1) / 2; + } + function d3_geo_clipAntimeridianInterpolate(from, to, direction, listener) { + var φ; + if (from == null) { + φ = direction * halfÏ€; + listener.point(-Ï€, φ); + listener.point(0, φ); + listener.point(Ï€, φ); + listener.point(Ï€, 0); + listener.point(Ï€, -φ); + listener.point(0, -φ); + listener.point(-Ï€, -φ); + listener.point(-Ï€, 0); + listener.point(-Ï€, φ); + } else if (abs(from[0] - to[0]) > ε) { + var s = from[0] < to[0] ? Ï€ : -Ï€; + φ = direction * s / 2; + listener.point(-s, φ); + listener.point(0, φ); + listener.point(s, φ); + } else { + listener.point(to[0], to[1]); + } + } + function d3_geo_pointInPolygon(point, polygon) { + var meridian = point[0], parallel = point[1], meridianNormal = [ Math.sin(meridian), -Math.cos(meridian), 0 ], polarAngle = 0, winding = 0; + d3_geo_areaRingSum.reset(); + for (var i = 0, n = polygon.length; i < n; ++i) { + var ring = polygon[i], m = ring.length; + if (!m) continue; + var point0 = ring[0], λ0 = point0[0], φ0 = point0[1] / 2 + Ï€ / 4, sinφ0 = Math.sin(φ0), cosφ0 = Math.cos(φ0), j = 1; + while (true) { + if (j === m) j = 0; + point = ring[j]; + var λ = point[0], φ = point[1] / 2 + Ï€ / 4, sinφ = Math.sin(φ), cosφ = Math.cos(φ), dλ = λ - λ0, sdλ = dλ >= 0 ? 1 : -1, adλ = sdλ * dλ, antimeridian = adλ > Ï€, k = sinφ0 * sinφ; + d3_geo_areaRingSum.add(Math.atan2(k * sdλ * Math.sin(adλ), cosφ0 * cosφ + k * Math.cos(adλ))); + polarAngle += antimeridian ? dλ + sdλ * Ï„ : dλ; + if (antimeridian ^ λ0 >= meridian ^ λ >= meridian) { + var arc = d3_geo_cartesianCross(d3_geo_cartesian(point0), d3_geo_cartesian(point)); + d3_geo_cartesianNormalize(arc); + var intersection = d3_geo_cartesianCross(meridianNormal, arc); + d3_geo_cartesianNormalize(intersection); + var φarc = (antimeridian ^ dλ >= 0 ? -1 : 1) * d3_asin(intersection[2]); + if (parallel > φarc || parallel === φarc && (arc[0] || arc[1])) { + winding += antimeridian ^ dλ >= 0 ? 1 : -1; + } + } + if (!j++) break; + λ0 = λ, sinφ0 = sinφ, cosφ0 = cosφ, point0 = point; + } + } + return (polarAngle < -ε || polarAngle < ε && d3_geo_areaRingSum < -ε) ^ winding & 1; + } + function d3_geo_clipCircle(radius) { + var cr = Math.cos(radius), smallRadius = cr > 0, notHemisphere = abs(cr) > ε, interpolate = d3_geo_circleInterpolate(radius, 6 * d3_radians); + return d3_geo_clip(visible, clipLine, interpolate, smallRadius ? [ 0, -radius ] : [ -Ï€, radius - Ï€ ]); + function visible(λ, φ) { + return Math.cos(λ) * Math.cos(φ) > cr; + } + function clipLine(listener) { + var point0, c0, v0, v00, clean; + return { + lineStart: function() { + v00 = v0 = false; + clean = 1; + }, + point: function(λ, φ) { + var point1 = [ λ, φ ], point2, v = visible(λ, φ), c = smallRadius ? v ? 0 : code(λ, φ) : v ? code(λ + (λ < 0 ? Ï€ : -Ï€), φ) : 0; + if (!point0 && (v00 = v0 = v)) listener.lineStart(); + if (v !== v0) { + point2 = intersect(point0, point1); + if (d3_geo_sphericalEqual(point0, point2) || d3_geo_sphericalEqual(point1, point2)) { + point1[0] += ε; + point1[1] += ε; + v = visible(point1[0], point1[1]); + } + } + if (v !== v0) { + clean = 0; + if (v) { + listener.lineStart(); + point2 = intersect(point1, point0); + listener.point(point2[0], point2[1]); + } else { + point2 = intersect(point0, point1); + listener.point(point2[0], point2[1]); + listener.lineEnd(); + } + point0 = point2; + } else if (notHemisphere && point0 && smallRadius ^ v) { + var t; + if (!(c & c0) && (t = intersect(point1, point0, true))) { + clean = 0; + if (smallRadius) { + listener.lineStart(); + listener.point(t[0][0], t[0][1]); + listener.point(t[1][0], t[1][1]); + listener.lineEnd(); + } else { + listener.point(t[1][0], t[1][1]); + listener.lineEnd(); + listener.lineStart(); + listener.point(t[0][0], t[0][1]); + } + } + } + if (v && (!point0 || !d3_geo_sphericalEqual(point0, point1))) { + listener.point(point1[0], point1[1]); + } + point0 = point1, v0 = v, c0 = c; + }, + lineEnd: function() { + if (v0) listener.lineEnd(); + point0 = null; + }, + clean: function() { + return clean | (v00 && v0) << 1; + } + }; + } + function intersect(a, b, two) { + var pa = d3_geo_cartesian(a), pb = d3_geo_cartesian(b); + var n1 = [ 1, 0, 0 ], n2 = d3_geo_cartesianCross(pa, pb), n2n2 = d3_geo_cartesianDot(n2, n2), n1n2 = n2[0], determinant = n2n2 - n1n2 * n1n2; + if (!determinant) return !two && a; + var c1 = cr * n2n2 / determinant, c2 = -cr * n1n2 / determinant, n1xn2 = d3_geo_cartesianCross(n1, n2), A = d3_geo_cartesianScale(n1, c1), B = d3_geo_cartesianScale(n2, c2); + d3_geo_cartesianAdd(A, B); + var u = n1xn2, w = d3_geo_cartesianDot(A, u), uu = d3_geo_cartesianDot(u, u), t2 = w * w - uu * (d3_geo_cartesianDot(A, A) - 1); + if (t2 < 0) return; + var t = Math.sqrt(t2), q = d3_geo_cartesianScale(u, (-w - t) / uu); + d3_geo_cartesianAdd(q, A); + q = d3_geo_spherical(q); + if (!two) return q; + var λ0 = a[0], λ1 = b[0], φ0 = a[1], φ1 = b[1], z; + if (λ1 < λ0) z = λ0, λ0 = λ1, λ1 = z; + var δλ = λ1 - λ0, polar = abs(δλ - Ï€) < ε, meridian = polar || δλ < ε; + if (!polar && φ1 < φ0) z = φ0, φ0 = φ1, φ1 = z; + if (meridian ? polar ? φ0 + φ1 > 0 ^ q[1] < (abs(q[0] - λ0) < ε ? φ0 : φ1) : φ0 <= q[1] && q[1] <= φ1 : δλ > Ï€ ^ (λ0 <= q[0] && q[0] <= λ1)) { + var q1 = d3_geo_cartesianScale(u, (-w + t) / uu); + d3_geo_cartesianAdd(q1, A); + return [ q, d3_geo_spherical(q1) ]; + } + } + function code(λ, φ) { + var r = smallRadius ? radius : Ï€ - radius, code = 0; + if (λ < -r) code |= 1; else if (λ > r) code |= 2; + if (φ < -r) code |= 4; else if (φ > r) code |= 8; + return code; + } + } + function d3_geom_clipLine(x0, y0, x1, y1) { + return function(line) { + var a = line.a, b = line.b, ax = a.x, ay = a.y, bx = b.x, by = b.y, t0 = 0, t1 = 1, dx = bx - ax, dy = by - ay, r; + r = x0 - ax; + if (!dx && r > 0) return; + r /= dx; + if (dx < 0) { + if (r < t0) return; + if (r < t1) t1 = r; + } else if (dx > 0) { + if (r > t1) return; + if (r > t0) t0 = r; + } + r = x1 - ax; + if (!dx && r < 0) return; + r /= dx; + if (dx < 0) { + if (r > t1) return; + if (r > t0) t0 = r; + } else if (dx > 0) { + if (r < t0) return; + if (r < t1) t1 = r; + } + r = y0 - ay; + if (!dy && r > 0) return; + r /= dy; + if (dy < 0) { + if (r < t0) return; + if (r < t1) t1 = r; + } else if (dy > 0) { + if (r > t1) return; + if (r > t0) t0 = r; + } + r = y1 - ay; + if (!dy && r < 0) return; + r /= dy; + if (dy < 0) { + if (r > t1) return; + if (r > t0) t0 = r; + } else if (dy > 0) { + if (r < t0) return; + if (r < t1) t1 = r; + } + if (t0 > 0) line.a = { + x: ax + t0 * dx, + y: ay + t0 * dy + }; + if (t1 < 1) line.b = { + x: ax + t1 * dx, + y: ay + t1 * dy + }; + return line; + }; + } + var d3_geo_clipExtentMAX = 1e9; + d3.geo.clipExtent = function() { + var x0, y0, x1, y1, stream, clip, clipExtent = { + stream: function(output) { + if (stream) stream.valid = false; + stream = clip(output); + stream.valid = true; + return stream; + }, + extent: function(_) { + if (!arguments.length) return [ [ x0, y0 ], [ x1, y1 ] ]; + clip = d3_geo_clipExtent(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]); + if (stream) stream.valid = false, stream = null; + return clipExtent; + } + }; + return clipExtent.extent([ [ 0, 0 ], [ 960, 500 ] ]); + }; + function d3_geo_clipExtent(x0, y0, x1, y1) { + return function(listener) { + var listener_ = listener, bufferListener = d3_geo_clipBufferListener(), clipLine = d3_geom_clipLine(x0, y0, x1, y1), segments, polygon, ring; + var clip = { + point: point, + lineStart: lineStart, + lineEnd: lineEnd, + polygonStart: function() { + listener = bufferListener; + segments = []; + polygon = []; + clean = true; + }, + polygonEnd: function() { + listener = listener_; + segments = d3.merge(segments); + var clipStartInside = insidePolygon([ x0, y1 ]), inside = clean && clipStartInside, visible = segments.length; + if (inside || visible) { + listener.polygonStart(); + if (inside) { + listener.lineStart(); + interpolate(null, null, 1, listener); + listener.lineEnd(); + } + if (visible) { + d3_geo_clipPolygon(segments, compare, clipStartInside, interpolate, listener); + } + listener.polygonEnd(); + } + segments = polygon = ring = null; + } + }; + function insidePolygon(p) { + var wn = 0, n = polygon.length, y = p[1]; + for (var i = 0; i < n; ++i) { + for (var j = 1, v = polygon[i], m = v.length, a = v[0], b; j < m; ++j) { + b = v[j]; + if (a[1] <= y) { + if (b[1] > y && d3_cross2d(a, b, p) > 0) ++wn; + } else { + if (b[1] <= y && d3_cross2d(a, b, p) < 0) --wn; + } + a = b; + } + } + return wn !== 0; + } + function interpolate(from, to, direction, listener) { + var a = 0, a1 = 0; + if (from == null || (a = corner(from, direction)) !== (a1 = corner(to, direction)) || comparePoints(from, to) < 0 ^ direction > 0) { + do { + listener.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0); + } while ((a = (a + direction + 4) % 4) !== a1); + } else { + listener.point(to[0], to[1]); + } + } + function pointVisible(x, y) { + return x0 <= x && x <= x1 && y0 <= y && y <= y1; + } + function point(x, y) { + if (pointVisible(x, y)) listener.point(x, y); + } + var x__, y__, v__, x_, y_, v_, first, clean; + function lineStart() { + clip.point = linePoint; + if (polygon) polygon.push(ring = []); + first = true; + v_ = false; + x_ = y_ = NaN; + } + function lineEnd() { + if (segments) { + linePoint(x__, y__); + if (v__ && v_) bufferListener.rejoin(); + segments.push(bufferListener.buffer()); + } + clip.point = point; + if (v_) listener.lineEnd(); + } + function linePoint(x, y) { + x = Math.max(-d3_geo_clipExtentMAX, Math.min(d3_geo_clipExtentMAX, x)); + y = Math.max(-d3_geo_clipExtentMAX, Math.min(d3_geo_clipExtentMAX, y)); + var v = pointVisible(x, y); + if (polygon) ring.push([ x, y ]); + if (first) { + x__ = x, y__ = y, v__ = v; + first = false; + if (v) { + listener.lineStart(); + listener.point(x, y); + } + } else { + if (v && v_) listener.point(x, y); else { + var l = { + a: { + x: x_, + y: y_ + }, + b: { + x: x, + y: y + } + }; + if (clipLine(l)) { + if (!v_) { + listener.lineStart(); + listener.point(l.a.x, l.a.y); + } + listener.point(l.b.x, l.b.y); + if (!v) listener.lineEnd(); + clean = false; + } else if (v) { + listener.lineStart(); + listener.point(x, y); + clean = false; + } + } + } + x_ = x, y_ = y, v_ = v; + } + return clip; + }; + function corner(p, direction) { + return abs(p[0] - x0) < ε ? direction > 0 ? 0 : 3 : abs(p[0] - x1) < ε ? direction > 0 ? 2 : 1 : abs(p[1] - y0) < ε ? direction > 0 ? 1 : 0 : direction > 0 ? 3 : 2; + } + function compare(a, b) { + return comparePoints(a.x, b.x); + } + function comparePoints(a, b) { + var ca = corner(a, 1), cb = corner(b, 1); + return ca !== cb ? ca - cb : ca === 0 ? b[1] - a[1] : ca === 1 ? a[0] - b[0] : ca === 2 ? a[1] - b[1] : b[0] - a[0]; + } + } + function d3_geo_conic(projectAt) { + var φ0 = 0, φ1 = Ï€ / 3, m = d3_geo_projectionMutator(projectAt), p = m(φ0, φ1); + p.parallels = function(_) { + if (!arguments.length) return [ φ0 / Ï€ * 180, φ1 / Ï€ * 180 ]; + return m(φ0 = _[0] * Ï€ / 180, φ1 = _[1] * Ï€ / 180); + }; + return p; + } + function d3_geo_conicEqualArea(φ0, φ1) { + var sinφ0 = Math.sin(φ0), n = (sinφ0 + Math.sin(φ1)) / 2, C = 1 + sinφ0 * (2 * n - sinφ0), Ï0 = Math.sqrt(C) / n; + function forward(λ, φ) { + var Ï = Math.sqrt(C - 2 * n * Math.sin(φ)) / n; + return [ Ï * Math.sin(λ *= n), Ï0 - Ï * Math.cos(λ) ]; + } + forward.invert = function(x, y) { + var Ï0_y = Ï0 - y; + return [ Math.atan2(x, Ï0_y) / n, d3_asin((C - (x * x + Ï0_y * Ï0_y) * n * n) / (2 * n)) ]; + }; + return forward; + } + (d3.geo.conicEqualArea = function() { + return d3_geo_conic(d3_geo_conicEqualArea); + }).raw = d3_geo_conicEqualArea; + d3.geo.albers = function() { + return d3.geo.conicEqualArea().rotate([ 96, 0 ]).center([ -.6, 38.7 ]).parallels([ 29.5, 45.5 ]).scale(1070); + }; + d3.geo.albersUsa = function() { + var lower48 = d3.geo.albers(); + var alaska = d3.geo.conicEqualArea().rotate([ 154, 0 ]).center([ -2, 58.5 ]).parallels([ 55, 65 ]); + var hawaii = d3.geo.conicEqualArea().rotate([ 157, 0 ]).center([ -3, 19.9 ]).parallels([ 8, 18 ]); + var point, pointStream = { + point: function(x, y) { + point = [ x, y ]; + } + }, lower48Point, alaskaPoint, hawaiiPoint; + function albersUsa(coordinates) { + var x = coordinates[0], y = coordinates[1]; + point = null; + (lower48Point(x, y), point) || (alaskaPoint(x, y), point) || hawaiiPoint(x, y); + return point; + } + albersUsa.invert = function(coordinates) { + var k = lower48.scale(), t = lower48.translate(), x = (coordinates[0] - t[0]) / k, y = (coordinates[1] - t[1]) / k; + return (y >= .12 && y < .234 && x >= -.425 && x < -.214 ? alaska : y >= .166 && y < .234 && x >= -.214 && x < -.115 ? hawaii : lower48).invert(coordinates); + }; + albersUsa.stream = function(stream) { + var lower48Stream = lower48.stream(stream), alaskaStream = alaska.stream(stream), hawaiiStream = hawaii.stream(stream); + return { + point: function(x, y) { + lower48Stream.point(x, y); + alaskaStream.point(x, y); + hawaiiStream.point(x, y); + }, + sphere: function() { + lower48Stream.sphere(); + alaskaStream.sphere(); + hawaiiStream.sphere(); + }, + lineStart: function() { + lower48Stream.lineStart(); + alaskaStream.lineStart(); + hawaiiStream.lineStart(); + }, + lineEnd: function() { + lower48Stream.lineEnd(); + alaskaStream.lineEnd(); + hawaiiStream.lineEnd(); + }, + polygonStart: function() { + lower48Stream.polygonStart(); + alaskaStream.polygonStart(); + hawaiiStream.polygonStart(); + }, + polygonEnd: function() { + lower48Stream.polygonEnd(); + alaskaStream.polygonEnd(); + hawaiiStream.polygonEnd(); + } + }; + }; + albersUsa.precision = function(_) { + if (!arguments.length) return lower48.precision(); + lower48.precision(_); + alaska.precision(_); + hawaii.precision(_); + return albersUsa; + }; + albersUsa.scale = function(_) { + if (!arguments.length) return lower48.scale(); + lower48.scale(_); + alaska.scale(_ * .35); + hawaii.scale(_); + return albersUsa.translate(lower48.translate()); + }; + albersUsa.translate = function(_) { + if (!arguments.length) return lower48.translate(); + var k = lower48.scale(), x = +_[0], y = +_[1]; + lower48Point = lower48.translate(_).clipExtent([ [ x - .455 * k, y - .238 * k ], [ x + .455 * k, y + .238 * k ] ]).stream(pointStream).point; + alaskaPoint = alaska.translate([ x - .307 * k, y + .201 * k ]).clipExtent([ [ x - .425 * k + ε, y + .12 * k + ε ], [ x - .214 * k - ε, y + .234 * k - ε ] ]).stream(pointStream).point; + hawaiiPoint = hawaii.translate([ x - .205 * k, y + .212 * k ]).clipExtent([ [ x - .214 * k + ε, y + .166 * k + ε ], [ x - .115 * k - ε, y + .234 * k - ε ] ]).stream(pointStream).point; + return albersUsa; + }; + return albersUsa.scale(1070); + }; + var d3_geo_pathAreaSum, d3_geo_pathAreaPolygon, d3_geo_pathArea = { + point: d3_noop, + lineStart: d3_noop, + lineEnd: d3_noop, + polygonStart: function() { + d3_geo_pathAreaPolygon = 0; + d3_geo_pathArea.lineStart = d3_geo_pathAreaRingStart; + }, + polygonEnd: function() { + d3_geo_pathArea.lineStart = d3_geo_pathArea.lineEnd = d3_geo_pathArea.point = d3_noop; + d3_geo_pathAreaSum += abs(d3_geo_pathAreaPolygon / 2); + } + }; + function d3_geo_pathAreaRingStart() { + var x00, y00, x0, y0; + d3_geo_pathArea.point = function(x, y) { + d3_geo_pathArea.point = nextPoint; + x00 = x0 = x, y00 = y0 = y; + }; + function nextPoint(x, y) { + d3_geo_pathAreaPolygon += y0 * x - x0 * y; + x0 = x, y0 = y; + } + d3_geo_pathArea.lineEnd = function() { + nextPoint(x00, y00); + }; + } + var d3_geo_pathBoundsX0, d3_geo_pathBoundsY0, d3_geo_pathBoundsX1, d3_geo_pathBoundsY1; + var d3_geo_pathBounds = { + point: d3_geo_pathBoundsPoint, + lineStart: d3_noop, + lineEnd: d3_noop, + polygonStart: d3_noop, + polygonEnd: d3_noop + }; + function d3_geo_pathBoundsPoint(x, y) { + if (x < d3_geo_pathBoundsX0) d3_geo_pathBoundsX0 = x; + if (x > d3_geo_pathBoundsX1) d3_geo_pathBoundsX1 = x; + if (y < d3_geo_pathBoundsY0) d3_geo_pathBoundsY0 = y; + if (y > d3_geo_pathBoundsY1) d3_geo_pathBoundsY1 = y; + } + function d3_geo_pathBuffer() { + var pointCircle = d3_geo_pathBufferCircle(4.5), buffer = []; + var stream = { + point: point, + lineStart: function() { + stream.point = pointLineStart; + }, + lineEnd: lineEnd, + polygonStart: function() { + stream.lineEnd = lineEndPolygon; + }, + polygonEnd: function() { + stream.lineEnd = lineEnd; + stream.point = point; + }, + pointRadius: function(_) { + pointCircle = d3_geo_pathBufferCircle(_); + return stream; + }, + result: function() { + if (buffer.length) { + var result = buffer.join(""); + buffer = []; + return result; + } + } + }; + function point(x, y) { + buffer.push("M", x, ",", y, pointCircle); + } + function pointLineStart(x, y) { + buffer.push("M", x, ",", y); + stream.point = pointLine; + } + function pointLine(x, y) { + buffer.push("L", x, ",", y); + } + function lineEnd() { + stream.point = point; + } + function lineEndPolygon() { + buffer.push("Z"); + } + return stream; + } + function d3_geo_pathBufferCircle(radius) { + return "m0," + radius + "a" + radius + "," + radius + " 0 1,1 0," + -2 * radius + "a" + radius + "," + radius + " 0 1,1 0," + 2 * radius + "z"; + } + var d3_geo_pathCentroid = { + point: d3_geo_pathCentroidPoint, + lineStart: d3_geo_pathCentroidLineStart, + lineEnd: d3_geo_pathCentroidLineEnd, + polygonStart: function() { + d3_geo_pathCentroid.lineStart = d3_geo_pathCentroidRingStart; + }, + polygonEnd: function() { + d3_geo_pathCentroid.point = d3_geo_pathCentroidPoint; + d3_geo_pathCentroid.lineStart = d3_geo_pathCentroidLineStart; + d3_geo_pathCentroid.lineEnd = d3_geo_pathCentroidLineEnd; + } + }; + function d3_geo_pathCentroidPoint(x, y) { + d3_geo_centroidX0 += x; + d3_geo_centroidY0 += y; + ++d3_geo_centroidZ0; + } + function d3_geo_pathCentroidLineStart() { + var x0, y0; + d3_geo_pathCentroid.point = function(x, y) { + d3_geo_pathCentroid.point = nextPoint; + d3_geo_pathCentroidPoint(x0 = x, y0 = y); + }; + function nextPoint(x, y) { + var dx = x - x0, dy = y - y0, z = Math.sqrt(dx * dx + dy * dy); + d3_geo_centroidX1 += z * (x0 + x) / 2; + d3_geo_centroidY1 += z * (y0 + y) / 2; + d3_geo_centroidZ1 += z; + d3_geo_pathCentroidPoint(x0 = x, y0 = y); + } + } + function d3_geo_pathCentroidLineEnd() { + d3_geo_pathCentroid.point = d3_geo_pathCentroidPoint; + } + function d3_geo_pathCentroidRingStart() { + var x00, y00, x0, y0; + d3_geo_pathCentroid.point = function(x, y) { + d3_geo_pathCentroid.point = nextPoint; + d3_geo_pathCentroidPoint(x00 = x0 = x, y00 = y0 = y); + }; + function nextPoint(x, y) { + var dx = x - x0, dy = y - y0, z = Math.sqrt(dx * dx + dy * dy); + d3_geo_centroidX1 += z * (x0 + x) / 2; + d3_geo_centroidY1 += z * (y0 + y) / 2; + d3_geo_centroidZ1 += z; + z = y0 * x - x0 * y; + d3_geo_centroidX2 += z * (x0 + x); + d3_geo_centroidY2 += z * (y0 + y); + d3_geo_centroidZ2 += z * 3; + d3_geo_pathCentroidPoint(x0 = x, y0 = y); + } + d3_geo_pathCentroid.lineEnd = function() { + nextPoint(x00, y00); + }; + } + function d3_geo_pathContext(context) { + var pointRadius = 4.5; + var stream = { + point: point, + lineStart: function() { + stream.point = pointLineStart; + }, + lineEnd: lineEnd, + polygonStart: function() { + stream.lineEnd = lineEndPolygon; + }, + polygonEnd: function() { + stream.lineEnd = lineEnd; + stream.point = point; + }, + pointRadius: function(_) { + pointRadius = _; + return stream; + }, + result: d3_noop + }; + function point(x, y) { + context.moveTo(x + pointRadius, y); + context.arc(x, y, pointRadius, 0, Ï„); + } + function pointLineStart(x, y) { + context.moveTo(x, y); + stream.point = pointLine; + } + function pointLine(x, y) { + context.lineTo(x, y); + } + function lineEnd() { + stream.point = point; + } + function lineEndPolygon() { + context.closePath(); + } + return stream; + } + function d3_geo_resample(project) { + var δ2 = .5, cosMinDistance = Math.cos(30 * d3_radians), maxDepth = 16; + function resample(stream) { + return (maxDepth ? resampleRecursive : resampleNone)(stream); + } + function resampleNone(stream) { + return d3_geo_transformPoint(stream, function(x, y) { + x = project(x, y); + stream.point(x[0], x[1]); + }); + } + function resampleRecursive(stream) { + var λ00, φ00, x00, y00, a00, b00, c00, λ0, x0, y0, a0, b0, c0; + var resample = { + point: point, + lineStart: lineStart, + lineEnd: lineEnd, + polygonStart: function() { + stream.polygonStart(); + resample.lineStart = ringStart; + }, + polygonEnd: function() { + stream.polygonEnd(); + resample.lineStart = lineStart; + } + }; + function point(x, y) { + x = project(x, y); + stream.point(x[0], x[1]); + } + function lineStart() { + x0 = NaN; + resample.point = linePoint; + stream.lineStart(); + } + function linePoint(λ, φ) { + var c = d3_geo_cartesian([ λ, φ ]), p = project(λ, φ); + resampleLineTo(x0, y0, λ0, a0, b0, c0, x0 = p[0], y0 = p[1], λ0 = λ, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream); + stream.point(x0, y0); + } + function lineEnd() { + resample.point = point; + stream.lineEnd(); + } + function ringStart() { + lineStart(); + resample.point = ringPoint; + resample.lineEnd = ringEnd; + } + function ringPoint(λ, φ) { + linePoint(λ00 = λ, φ00 = φ), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0; + resample.point = linePoint; + } + function ringEnd() { + resampleLineTo(x0, y0, λ0, a0, b0, c0, x00, y00, λ00, a00, b00, c00, maxDepth, stream); + resample.lineEnd = lineEnd; + lineEnd(); + } + return resample; + } + function resampleLineTo(x0, y0, λ0, a0, b0, c0, x1, y1, λ1, a1, b1, c1, depth, stream) { + var dx = x1 - x0, dy = y1 - y0, d2 = dx * dx + dy * dy; + if (d2 > 4 * δ2 && depth--) { + var a = a0 + a1, b = b0 + b1, c = c0 + c1, m = Math.sqrt(a * a + b * b + c * c), φ2 = Math.asin(c /= m), λ2 = abs(abs(c) - 1) < ε || abs(λ0 - λ1) < ε ? (λ0 + λ1) / 2 : Math.atan2(b, a), p = project(λ2, φ2), x2 = p[0], y2 = p[1], dx2 = x2 - x0, dy2 = y2 - y0, dz = dy * dx2 - dx * dy2; + if (dz * dz / d2 > δ2 || abs((dx * dx2 + dy * dy2) / d2 - .5) > .3 || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { + resampleLineTo(x0, y0, λ0, a0, b0, c0, x2, y2, λ2, a /= m, b /= m, c, depth, stream); + stream.point(x2, y2); + resampleLineTo(x2, y2, λ2, a, b, c, x1, y1, λ1, a1, b1, c1, depth, stream); + } + } + } + resample.precision = function(_) { + if (!arguments.length) return Math.sqrt(δ2); + maxDepth = (δ2 = _ * _) > 0 && 16; + return resample; + }; + return resample; + } + d3.geo.path = function() { + var pointRadius = 4.5, projection, context, projectStream, contextStream, cacheStream; + function path(object) { + if (object) { + if (typeof pointRadius === "function") contextStream.pointRadius(+pointRadius.apply(this, arguments)); + if (!cacheStream || !cacheStream.valid) cacheStream = projectStream(contextStream); + d3.geo.stream(object, cacheStream); + } + return contextStream.result(); + } + path.area = function(object) { + d3_geo_pathAreaSum = 0; + d3.geo.stream(object, projectStream(d3_geo_pathArea)); + return d3_geo_pathAreaSum; + }; + path.centroid = function(object) { + d3_geo_centroidX0 = d3_geo_centroidY0 = d3_geo_centroidZ0 = d3_geo_centroidX1 = d3_geo_centroidY1 = d3_geo_centroidZ1 = d3_geo_centroidX2 = d3_geo_centroidY2 = d3_geo_centroidZ2 = 0; + d3.geo.stream(object, projectStream(d3_geo_pathCentroid)); + return d3_geo_centroidZ2 ? [ d3_geo_centroidX2 / d3_geo_centroidZ2, d3_geo_centroidY2 / d3_geo_centroidZ2 ] : d3_geo_centroidZ1 ? [ d3_geo_centroidX1 / d3_geo_centroidZ1, d3_geo_centroidY1 / d3_geo_centroidZ1 ] : d3_geo_centroidZ0 ? [ d3_geo_centroidX0 / d3_geo_centroidZ0, d3_geo_centroidY0 / d3_geo_centroidZ0 ] : [ NaN, NaN ]; + }; + path.bounds = function(object) { + d3_geo_pathBoundsX1 = d3_geo_pathBoundsY1 = -(d3_geo_pathBoundsX0 = d3_geo_pathBoundsY0 = Infinity); + d3.geo.stream(object, projectStream(d3_geo_pathBounds)); + return [ [ d3_geo_pathBoundsX0, d3_geo_pathBoundsY0 ], [ d3_geo_pathBoundsX1, d3_geo_pathBoundsY1 ] ]; + }; + path.projection = function(_) { + if (!arguments.length) return projection; + projectStream = (projection = _) ? _.stream || d3_geo_pathProjectStream(_) : d3_identity; + return reset(); + }; + path.context = function(_) { + if (!arguments.length) return context; + contextStream = (context = _) == null ? new d3_geo_pathBuffer() : new d3_geo_pathContext(_); + if (typeof pointRadius !== "function") contextStream.pointRadius(pointRadius); + return reset(); + }; + path.pointRadius = function(_) { + if (!arguments.length) return pointRadius; + pointRadius = typeof _ === "function" ? _ : (contextStream.pointRadius(+_), +_); + return path; + }; + function reset() { + cacheStream = null; + return path; + } + return path.projection(d3.geo.albersUsa()).context(null); + }; + function d3_geo_pathProjectStream(project) { + var resample = d3_geo_resample(function(x, y) { + return project([ x * d3_degrees, y * d3_degrees ]); + }); + return function(stream) { + return d3_geo_projectionRadians(resample(stream)); + }; + } + d3.geo.transform = function(methods) { + return { + stream: function(stream) { + var transform = new d3_geo_transform(stream); + for (var k in methods) transform[k] = methods[k]; + return transform; + } + }; + }; + function d3_geo_transform(stream) { + this.stream = stream; + } + d3_geo_transform.prototype = { + point: function(x, y) { + this.stream.point(x, y); + }, + sphere: function() { + this.stream.sphere(); + }, + lineStart: function() { + this.stream.lineStart(); + }, + lineEnd: function() { + this.stream.lineEnd(); + }, + polygonStart: function() { + this.stream.polygonStart(); + }, + polygonEnd: function() { + this.stream.polygonEnd(); + } + }; + function d3_geo_transformPoint(stream, point) { + return { + point: point, + sphere: function() { + stream.sphere(); + }, + lineStart: function() { + stream.lineStart(); + }, + lineEnd: function() { + stream.lineEnd(); + }, + polygonStart: function() { + stream.polygonStart(); + }, + polygonEnd: function() { + stream.polygonEnd(); + } + }; + } + d3.geo.projection = d3_geo_projection; + d3.geo.projectionMutator = d3_geo_projectionMutator; + function d3_geo_projection(project) { + return d3_geo_projectionMutator(function() { + return project; + })(); + } + function d3_geo_projectionMutator(projectAt) { + var project, rotate, projectRotate, projectResample = d3_geo_resample(function(x, y) { + x = project(x, y); + return [ x[0] * k + δx, δy - x[1] * k ]; + }), k = 150, x = 480, y = 250, λ = 0, φ = 0, δλ = 0, δφ = 0, δγ = 0, δx, δy, preclip = d3_geo_clipAntimeridian, postclip = d3_identity, clipAngle = null, clipExtent = null, stream; + function projection(point) { + point = projectRotate(point[0] * d3_radians, point[1] * d3_radians); + return [ point[0] * k + δx, δy - point[1] * k ]; + } + function invert(point) { + point = projectRotate.invert((point[0] - δx) / k, (δy - point[1]) / k); + return point && [ point[0] * d3_degrees, point[1] * d3_degrees ]; + } + projection.stream = function(output) { + if (stream) stream.valid = false; + stream = d3_geo_projectionRadians(preclip(rotate, projectResample(postclip(output)))); + stream.valid = true; + return stream; + }; + projection.clipAngle = function(_) { + if (!arguments.length) return clipAngle; + preclip = _ == null ? (clipAngle = _, d3_geo_clipAntimeridian) : d3_geo_clipCircle((clipAngle = +_) * d3_radians); + return invalidate(); + }; + projection.clipExtent = function(_) { + if (!arguments.length) return clipExtent; + clipExtent = _; + postclip = _ ? d3_geo_clipExtent(_[0][0], _[0][1], _[1][0], _[1][1]) : d3_identity; + return invalidate(); + }; + projection.scale = function(_) { + if (!arguments.length) return k; + k = +_; + return reset(); + }; + projection.translate = function(_) { + if (!arguments.length) return [ x, y ]; + x = +_[0]; + y = +_[1]; + return reset(); + }; + projection.center = function(_) { + if (!arguments.length) return [ λ * d3_degrees, φ * d3_degrees ]; + λ = _[0] % 360 * d3_radians; + φ = _[1] % 360 * d3_radians; + return reset(); + }; + projection.rotate = function(_) { + if (!arguments.length) return [ δλ * d3_degrees, δφ * d3_degrees, δγ * d3_degrees ]; + δλ = _[0] % 360 * d3_radians; + δφ = _[1] % 360 * d3_radians; + δγ = _.length > 2 ? _[2] % 360 * d3_radians : 0; + return reset(); + }; + d3.rebind(projection, projectResample, "precision"); + function reset() { + projectRotate = d3_geo_compose(rotate = d3_geo_rotation(δλ, δφ, δγ), project); + var center = project(λ, φ); + δx = x - center[0] * k; + δy = y + center[1] * k; + return invalidate(); + } + function invalidate() { + if (stream) stream.valid = false, stream = null; + return projection; + } + return function() { + project = projectAt.apply(this, arguments); + projection.invert = project.invert && invert; + return reset(); + }; + } + function d3_geo_projectionRadians(stream) { + return d3_geo_transformPoint(stream, function(x, y) { + stream.point(x * d3_radians, y * d3_radians); + }); + } + function d3_geo_equirectangular(λ, φ) { + return [ λ, φ ]; + } + (d3.geo.equirectangular = function() { + return d3_geo_projection(d3_geo_equirectangular); + }).raw = d3_geo_equirectangular.invert = d3_geo_equirectangular; + d3.geo.rotation = function(rotate) { + rotate = d3_geo_rotation(rotate[0] % 360 * d3_radians, rotate[1] * d3_radians, rotate.length > 2 ? rotate[2] * d3_radians : 0); + function forward(coordinates) { + coordinates = rotate(coordinates[0] * d3_radians, coordinates[1] * d3_radians); + return coordinates[0] *= d3_degrees, coordinates[1] *= d3_degrees, coordinates; + } + forward.invert = function(coordinates) { + coordinates = rotate.invert(coordinates[0] * d3_radians, coordinates[1] * d3_radians); + return coordinates[0] *= d3_degrees, coordinates[1] *= d3_degrees, coordinates; + }; + return forward; + }; + function d3_geo_identityRotation(λ, φ) { + return [ λ > Ï€ ? λ - Ï„ : λ < -Ï€ ? λ + Ï„ : λ, φ ]; + } + d3_geo_identityRotation.invert = d3_geo_equirectangular; + function d3_geo_rotation(δλ, δφ, δγ) { + return δλ ? δφ || δγ ? d3_geo_compose(d3_geo_rotationλ(δλ), d3_geo_rotationφγ(δφ, δγ)) : d3_geo_rotationλ(δλ) : δφ || δγ ? d3_geo_rotationφγ(δφ, δγ) : d3_geo_identityRotation; + } + function d3_geo_forwardRotationλ(δλ) { + return function(λ, φ) { + return λ += δλ, [ λ > Ï€ ? λ - Ï„ : λ < -Ï€ ? λ + Ï„ : λ, φ ]; + }; + } + function d3_geo_rotationλ(δλ) { + var rotation = d3_geo_forwardRotationλ(δλ); + rotation.invert = d3_geo_forwardRotationλ(-δλ); + return rotation; + } + function d3_geo_rotationφγ(δφ, δγ) { + var cosδφ = Math.cos(δφ), sinδφ = Math.sin(δφ), cosδγ = Math.cos(δγ), sinδγ = Math.sin(δγ); + function rotation(λ, φ) { + var cosφ = Math.cos(φ), x = Math.cos(λ) * cosφ, y = Math.sin(λ) * cosφ, z = Math.sin(φ), k = z * cosδφ + x * sinδφ; + return [ Math.atan2(y * cosδγ - k * sinδγ, x * cosδφ - z * sinδφ), d3_asin(k * cosδγ + y * sinδγ) ]; + } + rotation.invert = function(λ, φ) { + var cosφ = Math.cos(φ), x = Math.cos(λ) * cosφ, y = Math.sin(λ) * cosφ, z = Math.sin(φ), k = z * cosδγ - y * sinδγ; + return [ Math.atan2(y * cosδγ + z * sinδγ, x * cosδφ + k * sinδφ), d3_asin(k * cosδφ - x * sinδφ) ]; + }; + return rotation; + } + d3.geo.circle = function() { + var origin = [ 0, 0 ], angle, precision = 6, interpolate; + function circle() { + var center = typeof origin === "function" ? origin.apply(this, arguments) : origin, rotate = d3_geo_rotation(-center[0] * d3_radians, -center[1] * d3_radians, 0).invert, ring = []; + interpolate(null, null, 1, { + point: function(x, y) { + ring.push(x = rotate(x, y)); + x[0] *= d3_degrees, x[1] *= d3_degrees; + } + }); + return { + type: "Polygon", + coordinates: [ ring ] + }; + } + circle.origin = function(x) { + if (!arguments.length) return origin; + origin = x; + return circle; + }; + circle.angle = function(x) { + if (!arguments.length) return angle; + interpolate = d3_geo_circleInterpolate((angle = +x) * d3_radians, precision * d3_radians); + return circle; + }; + circle.precision = function(_) { + if (!arguments.length) return precision; + interpolate = d3_geo_circleInterpolate(angle * d3_radians, (precision = +_) * d3_radians); + return circle; + }; + return circle.angle(90); + }; + function d3_geo_circleInterpolate(radius, precision) { + var cr = Math.cos(radius), sr = Math.sin(radius); + return function(from, to, direction, listener) { + var step = direction * precision; + if (from != null) { + from = d3_geo_circleAngle(cr, from); + to = d3_geo_circleAngle(cr, to); + if (direction > 0 ? from < to : from > to) from += direction * Ï„; + } else { + from = radius + direction * Ï„; + to = radius - .5 * step; + } + for (var point, t = from; direction > 0 ? t > to : t < to; t -= step) { + listener.point((point = d3_geo_spherical([ cr, -sr * Math.cos(t), -sr * Math.sin(t) ]))[0], point[1]); + } + }; + } + function d3_geo_circleAngle(cr, point) { + var a = d3_geo_cartesian(point); + a[0] -= cr; + d3_geo_cartesianNormalize(a); + var angle = d3_acos(-a[1]); + return ((-a[2] < 0 ? -angle : angle) + 2 * Math.PI - ε) % (2 * Math.PI); + } + d3.geo.distance = function(a, b) { + var Δλ = (b[0] - a[0]) * d3_radians, φ0 = a[1] * d3_radians, φ1 = b[1] * d3_radians, sinΔλ = Math.sin(Δλ), cosΔλ = Math.cos(Δλ), sinφ0 = Math.sin(φ0), cosφ0 = Math.cos(φ0), sinφ1 = Math.sin(φ1), cosφ1 = Math.cos(φ1), t; + return Math.atan2(Math.sqrt((t = cosφ1 * sinΔλ) * t + (t = cosφ0 * sinφ1 - sinφ0 * cosφ1 * cosΔλ) * t), sinφ0 * sinφ1 + cosφ0 * cosφ1 * cosΔλ); + }; + d3.geo.graticule = function() { + var x1, x0, X1, X0, y1, y0, Y1, Y0, dx = 10, dy = dx, DX = 90, DY = 360, x, y, X, Y, precision = 2.5; + function graticule() { + return { + type: "MultiLineString", + coordinates: lines() + }; + } + function lines() { + return d3.range(Math.ceil(X0 / DX) * DX, X1, DX).map(X).concat(d3.range(Math.ceil(Y0 / DY) * DY, Y1, DY).map(Y)).concat(d3.range(Math.ceil(x0 / dx) * dx, x1, dx).filter(function(x) { + return abs(x % DX) > ε; + }).map(x)).concat(d3.range(Math.ceil(y0 / dy) * dy, y1, dy).filter(function(y) { + return abs(y % DY) > ε; + }).map(y)); + } + graticule.lines = function() { + return lines().map(function(coordinates) { + return { + type: "LineString", + coordinates: coordinates + }; + }); + }; + graticule.outline = function() { + return { + type: "Polygon", + coordinates: [ X(X0).concat(Y(Y1).slice(1), X(X1).reverse().slice(1), Y(Y0).reverse().slice(1)) ] + }; + }; + graticule.extent = function(_) { + if (!arguments.length) return graticule.minorExtent(); + return graticule.majorExtent(_).minorExtent(_); + }; + graticule.majorExtent = function(_) { + if (!arguments.length) return [ [ X0, Y0 ], [ X1, Y1 ] ]; + X0 = +_[0][0], X1 = +_[1][0]; + Y0 = +_[0][1], Y1 = +_[1][1]; + if (X0 > X1) _ = X0, X0 = X1, X1 = _; + if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _; + return graticule.precision(precision); + }; + graticule.minorExtent = function(_) { + if (!arguments.length) return [ [ x0, y0 ], [ x1, y1 ] ]; + x0 = +_[0][0], x1 = +_[1][0]; + y0 = +_[0][1], y1 = +_[1][1]; + if (x0 > x1) _ = x0, x0 = x1, x1 = _; + if (y0 > y1) _ = y0, y0 = y1, y1 = _; + return graticule.precision(precision); + }; + graticule.step = function(_) { + if (!arguments.length) return graticule.minorStep(); + return graticule.majorStep(_).minorStep(_); + }; + graticule.majorStep = function(_) { + if (!arguments.length) return [ DX, DY ]; + DX = +_[0], DY = +_[1]; + return graticule; + }; + graticule.minorStep = function(_) { + if (!arguments.length) return [ dx, dy ]; + dx = +_[0], dy = +_[1]; + return graticule; + }; + graticule.precision = function(_) { + if (!arguments.length) return precision; + precision = +_; + x = d3_geo_graticuleX(y0, y1, 90); + y = d3_geo_graticuleY(x0, x1, precision); + X = d3_geo_graticuleX(Y0, Y1, 90); + Y = d3_geo_graticuleY(X0, X1, precision); + return graticule; + }; + return graticule.majorExtent([ [ -180, -90 + ε ], [ 180, 90 - ε ] ]).minorExtent([ [ -180, -80 - ε ], [ 180, 80 + ε ] ]); + }; + function d3_geo_graticuleX(y0, y1, dy) { + var y = d3.range(y0, y1 - ε, dy).concat(y1); + return function(x) { + return y.map(function(y) { + return [ x, y ]; + }); + }; + } + function d3_geo_graticuleY(x0, x1, dx) { + var x = d3.range(x0, x1 - ε, dx).concat(x1); + return function(y) { + return x.map(function(x) { + return [ x, y ]; + }); + }; + } + function d3_source(d) { + return d.source; + } + function d3_target(d) { + return d.target; + } + d3.geo.greatArc = function() { + var source = d3_source, source_, target = d3_target, target_; + function greatArc() { + return { + type: "LineString", + coordinates: [ source_ || source.apply(this, arguments), target_ || target.apply(this, arguments) ] + }; + } + greatArc.distance = function() { + return d3.geo.distance(source_ || source.apply(this, arguments), target_ || target.apply(this, arguments)); + }; + greatArc.source = function(_) { + if (!arguments.length) return source; + source = _, source_ = typeof _ === "function" ? null : _; + return greatArc; + }; + greatArc.target = function(_) { + if (!arguments.length) return target; + target = _, target_ = typeof _ === "function" ? null : _; + return greatArc; + }; + greatArc.precision = function() { + return arguments.length ? greatArc : 0; + }; + return greatArc; + }; + d3.geo.interpolate = function(source, target) { + return d3_geo_interpolate(source[0] * d3_radians, source[1] * d3_radians, target[0] * d3_radians, target[1] * d3_radians); + }; + function d3_geo_interpolate(x0, y0, x1, y1) { + var cy0 = Math.cos(y0), sy0 = Math.sin(y0), cy1 = Math.cos(y1), sy1 = Math.sin(y1), kx0 = cy0 * Math.cos(x0), ky0 = cy0 * Math.sin(x0), kx1 = cy1 * Math.cos(x1), ky1 = cy1 * Math.sin(x1), d = 2 * Math.asin(Math.sqrt(d3_haversin(y1 - y0) + cy0 * cy1 * d3_haversin(x1 - x0))), k = 1 / Math.sin(d); + var interpolate = d ? function(t) { + var B = Math.sin(t *= d) * k, A = Math.sin(d - t) * k, x = A * kx0 + B * kx1, y = A * ky0 + B * ky1, z = A * sy0 + B * sy1; + return [ Math.atan2(y, x) * d3_degrees, Math.atan2(z, Math.sqrt(x * x + y * y)) * d3_degrees ]; + } : function() { + return [ x0 * d3_degrees, y0 * d3_degrees ]; + }; + interpolate.distance = d; + return interpolate; + } + d3.geo.length = function(object) { + d3_geo_lengthSum = 0; + d3.geo.stream(object, d3_geo_length); + return d3_geo_lengthSum; + }; + var d3_geo_lengthSum; + var d3_geo_length = { + sphere: d3_noop, + point: d3_noop, + lineStart: d3_geo_lengthLineStart, + lineEnd: d3_noop, + polygonStart: d3_noop, + polygonEnd: d3_noop + }; + function d3_geo_lengthLineStart() { + var λ0, sinφ0, cosφ0; + d3_geo_length.point = function(λ, φ) { + λ0 = λ * d3_radians, sinφ0 = Math.sin(φ *= d3_radians), cosφ0 = Math.cos(φ); + d3_geo_length.point = nextPoint; + }; + d3_geo_length.lineEnd = function() { + d3_geo_length.point = d3_geo_length.lineEnd = d3_noop; + }; + function nextPoint(λ, φ) { + var sinφ = Math.sin(φ *= d3_radians), cosφ = Math.cos(φ), t = abs((λ *= d3_radians) - λ0), cosΔλ = Math.cos(t); + d3_geo_lengthSum += Math.atan2(Math.sqrt((t = cosφ * Math.sin(t)) * t + (t = cosφ0 * sinφ - sinφ0 * cosφ * cosΔλ) * t), sinφ0 * sinφ + cosφ0 * cosφ * cosΔλ); + λ0 = λ, sinφ0 = sinφ, cosφ0 = cosφ; + } + } + function d3_geo_azimuthal(scale, angle) { + function azimuthal(λ, φ) { + var cosλ = Math.cos(λ), cosφ = Math.cos(φ), k = scale(cosλ * cosφ); + return [ k * cosφ * Math.sin(λ), k * Math.sin(φ) ]; + } + azimuthal.invert = function(x, y) { + var Ï = Math.sqrt(x * x + y * y), c = angle(Ï), sinc = Math.sin(c), cosc = Math.cos(c); + return [ Math.atan2(x * sinc, Ï * cosc), Math.asin(Ï && y * sinc / Ï) ]; + }; + return azimuthal; + } + var d3_geo_azimuthalEqualArea = d3_geo_azimuthal(function(cosλcosφ) { + return Math.sqrt(2 / (1 + cosλcosφ)); + }, function(Ï) { + return 2 * Math.asin(Ï / 2); + }); + (d3.geo.azimuthalEqualArea = function() { + return d3_geo_projection(d3_geo_azimuthalEqualArea); + }).raw = d3_geo_azimuthalEqualArea; + var d3_geo_azimuthalEquidistant = d3_geo_azimuthal(function(cosλcosφ) { + var c = Math.acos(cosλcosφ); + return c && c / Math.sin(c); + }, d3_identity); + (d3.geo.azimuthalEquidistant = function() { + return d3_geo_projection(d3_geo_azimuthalEquidistant); + }).raw = d3_geo_azimuthalEquidistant; + function d3_geo_conicConformal(φ0, φ1) { + var cosφ0 = Math.cos(φ0), t = function(φ) { + return Math.tan(Ï€ / 4 + φ / 2); + }, n = φ0 === φ1 ? Math.sin(φ0) : Math.log(cosφ0 / Math.cos(φ1)) / Math.log(t(φ1) / t(φ0)), F = cosφ0 * Math.pow(t(φ0), n) / n; + if (!n) return d3_geo_mercator; + function forward(λ, φ) { + if (F > 0) { + if (φ < -halfÏ€ + ε) φ = -halfÏ€ + ε; + } else { + if (φ > halfÏ€ - ε) φ = halfÏ€ - ε; + } + var Ï = F / Math.pow(t(φ), n); + return [ Ï * Math.sin(n * λ), F - Ï * Math.cos(n * λ) ]; + } + forward.invert = function(x, y) { + var Ï0_y = F - y, Ï = d3_sgn(n) * Math.sqrt(x * x + Ï0_y * Ï0_y); + return [ Math.atan2(x, Ï0_y) / n, 2 * Math.atan(Math.pow(F / Ï, 1 / n)) - halfÏ€ ]; + }; + return forward; + } + (d3.geo.conicConformal = function() { + return d3_geo_conic(d3_geo_conicConformal); + }).raw = d3_geo_conicConformal; + function d3_geo_conicEquidistant(φ0, φ1) { + var cosφ0 = Math.cos(φ0), n = φ0 === φ1 ? Math.sin(φ0) : (cosφ0 - Math.cos(φ1)) / (φ1 - φ0), G = cosφ0 / n + φ0; + if (abs(n) < ε) return d3_geo_equirectangular; + function forward(λ, φ) { + var Ï = G - φ; + return [ Ï * Math.sin(n * λ), G - Ï * Math.cos(n * λ) ]; + } + forward.invert = function(x, y) { + var Ï0_y = G - y; + return [ Math.atan2(x, Ï0_y) / n, G - d3_sgn(n) * Math.sqrt(x * x + Ï0_y * Ï0_y) ]; + }; + return forward; + } + (d3.geo.conicEquidistant = function() { + return d3_geo_conic(d3_geo_conicEquidistant); + }).raw = d3_geo_conicEquidistant; + var d3_geo_gnomonic = d3_geo_azimuthal(function(cosλcosφ) { + return 1 / cosλcosφ; + }, Math.atan); + (d3.geo.gnomonic = function() { + return d3_geo_projection(d3_geo_gnomonic); + }).raw = d3_geo_gnomonic; + function d3_geo_mercator(λ, φ) { + return [ λ, Math.log(Math.tan(Ï€ / 4 + φ / 2)) ]; + } + d3_geo_mercator.invert = function(x, y) { + return [ x, 2 * Math.atan(Math.exp(y)) - halfÏ€ ]; + }; + function d3_geo_mercatorProjection(project) { + var m = d3_geo_projection(project), scale = m.scale, translate = m.translate, clipExtent = m.clipExtent, clipAuto; + m.scale = function() { + var v = scale.apply(m, arguments); + return v === m ? clipAuto ? m.clipExtent(null) : m : v; + }; + m.translate = function() { + var v = translate.apply(m, arguments); + return v === m ? clipAuto ? m.clipExtent(null) : m : v; + }; + m.clipExtent = function(_) { + var v = clipExtent.apply(m, arguments); + if (v === m) { + if (clipAuto = _ == null) { + var k = Ï€ * scale(), t = translate(); + clipExtent([ [ t[0] - k, t[1] - k ], [ t[0] + k, t[1] + k ] ]); + } + } else if (clipAuto) { + v = null; + } + return v; + }; + return m.clipExtent(null); + } + (d3.geo.mercator = function() { + return d3_geo_mercatorProjection(d3_geo_mercator); + }).raw = d3_geo_mercator; + var d3_geo_orthographic = d3_geo_azimuthal(function() { + return 1; + }, Math.asin); + (d3.geo.orthographic = function() { + return d3_geo_projection(d3_geo_orthographic); + }).raw = d3_geo_orthographic; + var d3_geo_stereographic = d3_geo_azimuthal(function(cosλcosφ) { + return 1 / (1 + cosλcosφ); + }, function(Ï) { + return 2 * Math.atan(Ï); + }); + (d3.geo.stereographic = function() { + return d3_geo_projection(d3_geo_stereographic); + }).raw = d3_geo_stereographic; + function d3_geo_transverseMercator(λ, φ) { + return [ Math.log(Math.tan(Ï€ / 4 + φ / 2)), -λ ]; + } + d3_geo_transverseMercator.invert = function(x, y) { + return [ -y, 2 * Math.atan(Math.exp(x)) - halfÏ€ ]; + }; + (d3.geo.transverseMercator = function() { + var projection = d3_geo_mercatorProjection(d3_geo_transverseMercator), center = projection.center, rotate = projection.rotate; + projection.center = function(_) { + return _ ? center([ -_[1], _[0] ]) : (_ = center(), [ _[1], -_[0] ]); + }; + projection.rotate = function(_) { + return _ ? rotate([ _[0], _[1], _.length > 2 ? _[2] + 90 : 90 ]) : (_ = rotate(), + [ _[0], _[1], _[2] - 90 ]); + }; + return rotate([ 0, 0, 90 ]); + }).raw = d3_geo_transverseMercator; + d3.geom = {}; + function d3_geom_pointX(d) { + return d[0]; + } + function d3_geom_pointY(d) { + return d[1]; + } + d3.geom.hull = function(vertices) { + var x = d3_geom_pointX, y = d3_geom_pointY; + if (arguments.length) return hull(vertices); + function hull(data) { + if (data.length < 3) return []; + var fx = d3_functor(x), fy = d3_functor(y), i, n = data.length, points = [], flippedPoints = []; + for (i = 0; i < n; i++) { + points.push([ +fx.call(this, data[i], i), +fy.call(this, data[i], i), i ]); + } + points.sort(d3_geom_hullOrder); + for (i = 0; i < n; i++) flippedPoints.push([ points[i][0], -points[i][1] ]); + var upper = d3_geom_hullUpper(points), lower = d3_geom_hullUpper(flippedPoints); + var skipLeft = lower[0] === upper[0], skipRight = lower[lower.length - 1] === upper[upper.length - 1], polygon = []; + for (i = upper.length - 1; i >= 0; --i) polygon.push(data[points[upper[i]][2]]); + for (i = +skipLeft; i < lower.length - skipRight; ++i) polygon.push(data[points[lower[i]][2]]); + return polygon; + } + hull.x = function(_) { + return arguments.length ? (x = _, hull) : x; + }; + hull.y = function(_) { + return arguments.length ? (y = _, hull) : y; + }; + return hull; + }; + function d3_geom_hullUpper(points) { + var n = points.length, hull = [ 0, 1 ], hs = 2; + for (var i = 2; i < n; i++) { + while (hs > 1 && d3_cross2d(points[hull[hs - 2]], points[hull[hs - 1]], points[i]) <= 0) --hs; + hull[hs++] = i; + } + return hull.slice(0, hs); + } + function d3_geom_hullOrder(a, b) { + return a[0] - b[0] || a[1] - b[1]; + } + d3.geom.polygon = function(coordinates) { + d3_subclass(coordinates, d3_geom_polygonPrototype); + return coordinates; + }; + var d3_geom_polygonPrototype = d3.geom.polygon.prototype = []; + d3_geom_polygonPrototype.area = function() { + var i = -1, n = this.length, a, b = this[n - 1], area = 0; + while (++i < n) { + a = b; + b = this[i]; + area += a[1] * b[0] - a[0] * b[1]; + } + return area * .5; + }; + d3_geom_polygonPrototype.centroid = function(k) { + var i = -1, n = this.length, x = 0, y = 0, a, b = this[n - 1], c; + if (!arguments.length) k = -1 / (6 * this.area()); + while (++i < n) { + a = b; + b = this[i]; + c = a[0] * b[1] - b[0] * a[1]; + x += (a[0] + b[0]) * c; + y += (a[1] + b[1]) * c; + } + return [ x * k, y * k ]; + }; + d3_geom_polygonPrototype.clip = function(subject) { + var input, closed = d3_geom_polygonClosed(subject), i = -1, n = this.length - d3_geom_polygonClosed(this), j, m, a = this[n - 1], b, c, d; + while (++i < n) { + input = subject.slice(); + subject.length = 0; + b = this[i]; + c = input[(m = input.length - closed) - 1]; + j = -1; + while (++j < m) { + d = input[j]; + if (d3_geom_polygonInside(d, a, b)) { + if (!d3_geom_polygonInside(c, a, b)) { + subject.push(d3_geom_polygonIntersect(c, d, a, b)); + } + subject.push(d); + } else if (d3_geom_polygonInside(c, a, b)) { + subject.push(d3_geom_polygonIntersect(c, d, a, b)); + } + c = d; + } + if (closed) subject.push(subject[0]); + a = b; + } + return subject; + }; + function d3_geom_polygonInside(p, a, b) { + return (b[0] - a[0]) * (p[1] - a[1]) < (b[1] - a[1]) * (p[0] - a[0]); + } + function d3_geom_polygonIntersect(c, d, a, b) { + var x1 = c[0], x3 = a[0], x21 = d[0] - x1, x43 = b[0] - x3, y1 = c[1], y3 = a[1], y21 = d[1] - y1, y43 = b[1] - y3, ua = (x43 * (y1 - y3) - y43 * (x1 - x3)) / (y43 * x21 - x43 * y21); + return [ x1 + ua * x21, y1 + ua * y21 ]; + } + function d3_geom_polygonClosed(coordinates) { + var a = coordinates[0], b = coordinates[coordinates.length - 1]; + return !(a[0] - b[0] || a[1] - b[1]); + } + var d3_geom_voronoiEdges, d3_geom_voronoiCells, d3_geom_voronoiBeaches, d3_geom_voronoiBeachPool = [], d3_geom_voronoiFirstCircle, d3_geom_voronoiCircles, d3_geom_voronoiCirclePool = []; + function d3_geom_voronoiBeach() { + d3_geom_voronoiRedBlackNode(this); + this.edge = this.site = this.circle = null; + } + function d3_geom_voronoiCreateBeach(site) { + var beach = d3_geom_voronoiBeachPool.pop() || new d3_geom_voronoiBeach(); + beach.site = site; + return beach; + } + function d3_geom_voronoiDetachBeach(beach) { + d3_geom_voronoiDetachCircle(beach); + d3_geom_voronoiBeaches.remove(beach); + d3_geom_voronoiBeachPool.push(beach); + d3_geom_voronoiRedBlackNode(beach); + } + function d3_geom_voronoiRemoveBeach(beach) { + var circle = beach.circle, x = circle.x, y = circle.cy, vertex = { + x: x, + y: y + }, previous = beach.P, next = beach.N, disappearing = [ beach ]; + d3_geom_voronoiDetachBeach(beach); + var lArc = previous; + while (lArc.circle && abs(x - lArc.circle.x) < ε && abs(y - lArc.circle.cy) < ε) { + previous = lArc.P; + disappearing.unshift(lArc); + d3_geom_voronoiDetachBeach(lArc); + lArc = previous; + } + disappearing.unshift(lArc); + d3_geom_voronoiDetachCircle(lArc); + var rArc = next; + while (rArc.circle && abs(x - rArc.circle.x) < ε && abs(y - rArc.circle.cy) < ε) { + next = rArc.N; + disappearing.push(rArc); + d3_geom_voronoiDetachBeach(rArc); + rArc = next; + } + disappearing.push(rArc); + d3_geom_voronoiDetachCircle(rArc); + var nArcs = disappearing.length, iArc; + for (iArc = 1; iArc < nArcs; ++iArc) { + rArc = disappearing[iArc]; + lArc = disappearing[iArc - 1]; + d3_geom_voronoiSetEdgeEnd(rArc.edge, lArc.site, rArc.site, vertex); + } + lArc = disappearing[0]; + rArc = disappearing[nArcs - 1]; + rArc.edge = d3_geom_voronoiCreateEdge(lArc.site, rArc.site, null, vertex); + d3_geom_voronoiAttachCircle(lArc); + d3_geom_voronoiAttachCircle(rArc); + } + function d3_geom_voronoiAddBeach(site) { + var x = site.x, directrix = site.y, lArc, rArc, dxl, dxr, node = d3_geom_voronoiBeaches._; + while (node) { + dxl = d3_geom_voronoiLeftBreakPoint(node, directrix) - x; + if (dxl > ε) node = node.L; else { + dxr = x - d3_geom_voronoiRightBreakPoint(node, directrix); + if (dxr > ε) { + if (!node.R) { + lArc = node; + break; + } + node = node.R; + } else { + if (dxl > -ε) { + lArc = node.P; + rArc = node; + } else if (dxr > -ε) { + lArc = node; + rArc = node.N; + } else { + lArc = rArc = node; + } + break; + } + } + } + var newArc = d3_geom_voronoiCreateBeach(site); + d3_geom_voronoiBeaches.insert(lArc, newArc); + if (!lArc && !rArc) return; + if (lArc === rArc) { + d3_geom_voronoiDetachCircle(lArc); + rArc = d3_geom_voronoiCreateBeach(lArc.site); + d3_geom_voronoiBeaches.insert(newArc, rArc); + newArc.edge = rArc.edge = d3_geom_voronoiCreateEdge(lArc.site, newArc.site); + d3_geom_voronoiAttachCircle(lArc); + d3_geom_voronoiAttachCircle(rArc); + return; + } + if (!rArc) { + newArc.edge = d3_geom_voronoiCreateEdge(lArc.site, newArc.site); + return; + } + d3_geom_voronoiDetachCircle(lArc); + d3_geom_voronoiDetachCircle(rArc); + var lSite = lArc.site, ax = lSite.x, ay = lSite.y, bx = site.x - ax, by = site.y - ay, rSite = rArc.site, cx = rSite.x - ax, cy = rSite.y - ay, d = 2 * (bx * cy - by * cx), hb = bx * bx + by * by, hc = cx * cx + cy * cy, vertex = { + x: (cy * hb - by * hc) / d + ax, + y: (bx * hc - cx * hb) / d + ay + }; + d3_geom_voronoiSetEdgeEnd(rArc.edge, lSite, rSite, vertex); + newArc.edge = d3_geom_voronoiCreateEdge(lSite, site, null, vertex); + rArc.edge = d3_geom_voronoiCreateEdge(site, rSite, null, vertex); + d3_geom_voronoiAttachCircle(lArc); + d3_geom_voronoiAttachCircle(rArc); + } + function d3_geom_voronoiLeftBreakPoint(arc, directrix) { + var site = arc.site, rfocx = site.x, rfocy = site.y, pby2 = rfocy - directrix; + if (!pby2) return rfocx; + var lArc = arc.P; + if (!lArc) return -Infinity; + site = lArc.site; + var lfocx = site.x, lfocy = site.y, plby2 = lfocy - directrix; + if (!plby2) return lfocx; + var hl = lfocx - rfocx, aby2 = 1 / pby2 - 1 / plby2, b = hl / plby2; + if (aby2) return (-b + Math.sqrt(b * b - 2 * aby2 * (hl * hl / (-2 * plby2) - lfocy + plby2 / 2 + rfocy - pby2 / 2))) / aby2 + rfocx; + return (rfocx + lfocx) / 2; + } + function d3_geom_voronoiRightBreakPoint(arc, directrix) { + var rArc = arc.N; + if (rArc) return d3_geom_voronoiLeftBreakPoint(rArc, directrix); + var site = arc.site; + return site.y === directrix ? site.x : Infinity; + } + function d3_geom_voronoiCell(site) { + this.site = site; + this.edges = []; + } + d3_geom_voronoiCell.prototype.prepare = function() { + var halfEdges = this.edges, iHalfEdge = halfEdges.length, edge; + while (iHalfEdge--) { + edge = halfEdges[iHalfEdge].edge; + if (!edge.b || !edge.a) halfEdges.splice(iHalfEdge, 1); + } + halfEdges.sort(d3_geom_voronoiHalfEdgeOrder); + return halfEdges.length; + }; + function d3_geom_voronoiCloseCells(extent) { + var x0 = extent[0][0], x1 = extent[1][0], y0 = extent[0][1], y1 = extent[1][1], x2, y2, x3, y3, cells = d3_geom_voronoiCells, iCell = cells.length, cell, iHalfEdge, halfEdges, nHalfEdges, start, end; + while (iCell--) { + cell = cells[iCell]; + if (!cell || !cell.prepare()) continue; + halfEdges = cell.edges; + nHalfEdges = halfEdges.length; + iHalfEdge = 0; + while (iHalfEdge < nHalfEdges) { + end = halfEdges[iHalfEdge].end(), x3 = end.x, y3 = end.y; + start = halfEdges[++iHalfEdge % nHalfEdges].start(), x2 = start.x, y2 = start.y; + if (abs(x3 - x2) > ε || abs(y3 - y2) > ε) { + halfEdges.splice(iHalfEdge, 0, new d3_geom_voronoiHalfEdge(d3_geom_voronoiCreateBorderEdge(cell.site, end, abs(x3 - x0) < ε && y1 - y3 > ε ? { + x: x0, + y: abs(x2 - x0) < ε ? y2 : y1 + } : abs(y3 - y1) < ε && x1 - x3 > ε ? { + x: abs(y2 - y1) < ε ? x2 : x1, + y: y1 + } : abs(x3 - x1) < ε && y3 - y0 > ε ? { + x: x1, + y: abs(x2 - x1) < ε ? y2 : y0 + } : abs(y3 - y0) < ε && x3 - x0 > ε ? { + x: abs(y2 - y0) < ε ? x2 : x0, + y: y0 + } : null), cell.site, null)); + ++nHalfEdges; + } + } + } + } + function d3_geom_voronoiHalfEdgeOrder(a, b) { + return b.angle - a.angle; + } + function d3_geom_voronoiCircle() { + d3_geom_voronoiRedBlackNode(this); + this.x = this.y = this.arc = this.site = this.cy = null; + } + function d3_geom_voronoiAttachCircle(arc) { + var lArc = arc.P, rArc = arc.N; + if (!lArc || !rArc) return; + var lSite = lArc.site, cSite = arc.site, rSite = rArc.site; + if (lSite === rSite) return; + var bx = cSite.x, by = cSite.y, ax = lSite.x - bx, ay = lSite.y - by, cx = rSite.x - bx, cy = rSite.y - by; + var d = 2 * (ax * cy - ay * cx); + if (d >= -ε2) return; + var ha = ax * ax + ay * ay, hc = cx * cx + cy * cy, x = (cy * ha - ay * hc) / d, y = (ax * hc - cx * ha) / d, cy = y + by; + var circle = d3_geom_voronoiCirclePool.pop() || new d3_geom_voronoiCircle(); + circle.arc = arc; + circle.site = cSite; + circle.x = x + bx; + circle.y = cy + Math.sqrt(x * x + y * y); + circle.cy = cy; + arc.circle = circle; + var before = null, node = d3_geom_voronoiCircles._; + while (node) { + if (circle.y < node.y || circle.y === node.y && circle.x <= node.x) { + if (node.L) node = node.L; else { + before = node.P; + break; + } + } else { + if (node.R) node = node.R; else { + before = node; + break; + } + } + } + d3_geom_voronoiCircles.insert(before, circle); + if (!before) d3_geom_voronoiFirstCircle = circle; + } + function d3_geom_voronoiDetachCircle(arc) { + var circle = arc.circle; + if (circle) { + if (!circle.P) d3_geom_voronoiFirstCircle = circle.N; + d3_geom_voronoiCircles.remove(circle); + d3_geom_voronoiCirclePool.push(circle); + d3_geom_voronoiRedBlackNode(circle); + arc.circle = null; + } + } + function d3_geom_voronoiClipEdges(extent) { + var edges = d3_geom_voronoiEdges, clip = d3_geom_clipLine(extent[0][0], extent[0][1], extent[1][0], extent[1][1]), i = edges.length, e; + while (i--) { + e = edges[i]; + if (!d3_geom_voronoiConnectEdge(e, extent) || !clip(e) || abs(e.a.x - e.b.x) < ε && abs(e.a.y - e.b.y) < ε) { + e.a = e.b = null; + edges.splice(i, 1); + } + } + } + function d3_geom_voronoiConnectEdge(edge, extent) { + var vb = edge.b; + if (vb) return true; + var va = edge.a, x0 = extent[0][0], x1 = extent[1][0], y0 = extent[0][1], y1 = extent[1][1], lSite = edge.l, rSite = edge.r, lx = lSite.x, ly = lSite.y, rx = rSite.x, ry = rSite.y, fx = (lx + rx) / 2, fy = (ly + ry) / 2, fm, fb; + if (ry === ly) { + if (fx < x0 || fx >= x1) return; + if (lx > rx) { + if (!va) va = { + x: fx, + y: y0 + }; else if (va.y >= y1) return; + vb = { + x: fx, + y: y1 + }; + } else { + if (!va) va = { + x: fx, + y: y1 + }; else if (va.y < y0) return; + vb = { + x: fx, + y: y0 + }; + } + } else { + fm = (lx - rx) / (ry - ly); + fb = fy - fm * fx; + if (fm < -1 || fm > 1) { + if (lx > rx) { + if (!va) va = { + x: (y0 - fb) / fm, + y: y0 + }; else if (va.y >= y1) return; + vb = { + x: (y1 - fb) / fm, + y: y1 + }; + } else { + if (!va) va = { + x: (y1 - fb) / fm, + y: y1 + }; else if (va.y < y0) return; + vb = { + x: (y0 - fb) / fm, + y: y0 + }; + } + } else { + if (ly < ry) { + if (!va) va = { + x: x0, + y: fm * x0 + fb + }; else if (va.x >= x1) return; + vb = { + x: x1, + y: fm * x1 + fb + }; + } else { + if (!va) va = { + x: x1, + y: fm * x1 + fb + }; else if (va.x < x0) return; + vb = { + x: x0, + y: fm * x0 + fb + }; + } + } + } + edge.a = va; + edge.b = vb; + return true; + } + function d3_geom_voronoiEdge(lSite, rSite) { + this.l = lSite; + this.r = rSite; + this.a = this.b = null; + } + function d3_geom_voronoiCreateEdge(lSite, rSite, va, vb) { + var edge = new d3_geom_voronoiEdge(lSite, rSite); + d3_geom_voronoiEdges.push(edge); + if (va) d3_geom_voronoiSetEdgeEnd(edge, lSite, rSite, va); + if (vb) d3_geom_voronoiSetEdgeEnd(edge, rSite, lSite, vb); + d3_geom_voronoiCells[lSite.i].edges.push(new d3_geom_voronoiHalfEdge(edge, lSite, rSite)); + d3_geom_voronoiCells[rSite.i].edges.push(new d3_geom_voronoiHalfEdge(edge, rSite, lSite)); + return edge; + } + function d3_geom_voronoiCreateBorderEdge(lSite, va, vb) { + var edge = new d3_geom_voronoiEdge(lSite, null); + edge.a = va; + edge.b = vb; + d3_geom_voronoiEdges.push(edge); + return edge; + } + function d3_geom_voronoiSetEdgeEnd(edge, lSite, rSite, vertex) { + if (!edge.a && !edge.b) { + edge.a = vertex; + edge.l = lSite; + edge.r = rSite; + } else if (edge.l === rSite) { + edge.b = vertex; + } else { + edge.a = vertex; + } + } + function d3_geom_voronoiHalfEdge(edge, lSite, rSite) { + var va = edge.a, vb = edge.b; + this.edge = edge; + this.site = lSite; + this.angle = rSite ? Math.atan2(rSite.y - lSite.y, rSite.x - lSite.x) : edge.l === lSite ? Math.atan2(vb.x - va.x, va.y - vb.y) : Math.atan2(va.x - vb.x, vb.y - va.y); + } + d3_geom_voronoiHalfEdge.prototype = { + start: function() { + return this.edge.l === this.site ? this.edge.a : this.edge.b; + }, + end: function() { + return this.edge.l === this.site ? this.edge.b : this.edge.a; + } + }; + function d3_geom_voronoiRedBlackTree() { + this._ = null; + } + function d3_geom_voronoiRedBlackNode(node) { + node.U = node.C = node.L = node.R = node.P = node.N = null; + } + d3_geom_voronoiRedBlackTree.prototype = { + insert: function(after, node) { + var parent, grandpa, uncle; + if (after) { + node.P = after; + node.N = after.N; + if (after.N) after.N.P = node; + after.N = node; + if (after.R) { + after = after.R; + while (after.L) after = after.L; + after.L = node; + } else { + after.R = node; + } + parent = after; + } else if (this._) { + after = d3_geom_voronoiRedBlackFirst(this._); + node.P = null; + node.N = after; + after.P = after.L = node; + parent = after; + } else { + node.P = node.N = null; + this._ = node; + parent = null; + } + node.L = node.R = null; + node.U = parent; + node.C = true; + after = node; + while (parent && parent.C) { + grandpa = parent.U; + if (parent === grandpa.L) { + uncle = grandpa.R; + if (uncle && uncle.C) { + parent.C = uncle.C = false; + grandpa.C = true; + after = grandpa; + } else { + if (after === parent.R) { + d3_geom_voronoiRedBlackRotateLeft(this, parent); + after = parent; + parent = after.U; + } + parent.C = false; + grandpa.C = true; + d3_geom_voronoiRedBlackRotateRight(this, grandpa); + } + } else { + uncle = grandpa.L; + if (uncle && uncle.C) { + parent.C = uncle.C = false; + grandpa.C = true; + after = grandpa; + } else { + if (after === parent.L) { + d3_geom_voronoiRedBlackRotateRight(this, parent); + after = parent; + parent = after.U; + } + parent.C = false; + grandpa.C = true; + d3_geom_voronoiRedBlackRotateLeft(this, grandpa); + } + } + parent = after.U; + } + this._.C = false; + }, + remove: function(node) { + if (node.N) node.N.P = node.P; + if (node.P) node.P.N = node.N; + node.N = node.P = null; + var parent = node.U, sibling, left = node.L, right = node.R, next, red; + if (!left) next = right; else if (!right) next = left; else next = d3_geom_voronoiRedBlackFirst(right); + if (parent) { + if (parent.L === node) parent.L = next; else parent.R = next; + } else { + this._ = next; + } + if (left && right) { + red = next.C; + next.C = node.C; + next.L = left; + left.U = next; + if (next !== right) { + parent = next.U; + next.U = node.U; + node = next.R; + parent.L = node; + next.R = right; + right.U = next; + } else { + next.U = parent; + parent = next; + node = next.R; + } + } else { + red = node.C; + node = next; + } + if (node) node.U = parent; + if (red) return; + if (node && node.C) { + node.C = false; + return; + } + do { + if (node === this._) break; + if (node === parent.L) { + sibling = parent.R; + if (sibling.C) { + sibling.C = false; + parent.C = true; + d3_geom_voronoiRedBlackRotateLeft(this, parent); + sibling = parent.R; + } + if (sibling.L && sibling.L.C || sibling.R && sibling.R.C) { + if (!sibling.R || !sibling.R.C) { + sibling.L.C = false; + sibling.C = true; + d3_geom_voronoiRedBlackRotateRight(this, sibling); + sibling = parent.R; + } + sibling.C = parent.C; + parent.C = sibling.R.C = false; + d3_geom_voronoiRedBlackRotateLeft(this, parent); + node = this._; + break; + } + } else { + sibling = parent.L; + if (sibling.C) { + sibling.C = false; + parent.C = true; + d3_geom_voronoiRedBlackRotateRight(this, parent); + sibling = parent.L; + } + if (sibling.L && sibling.L.C || sibling.R && sibling.R.C) { + if (!sibling.L || !sibling.L.C) { + sibling.R.C = false; + sibling.C = true; + d3_geom_voronoiRedBlackRotateLeft(this, sibling); + sibling = parent.L; + } + sibling.C = parent.C; + parent.C = sibling.L.C = false; + d3_geom_voronoiRedBlackRotateRight(this, parent); + node = this._; + break; + } + } + sibling.C = true; + node = parent; + parent = parent.U; + } while (!node.C); + if (node) node.C = false; + } + }; + function d3_geom_voronoiRedBlackRotateLeft(tree, node) { + var p = node, q = node.R, parent = p.U; + if (parent) { + if (parent.L === p) parent.L = q; else parent.R = q; + } else { + tree._ = q; + } + q.U = parent; + p.U = q; + p.R = q.L; + if (p.R) p.R.U = p; + q.L = p; + } + function d3_geom_voronoiRedBlackRotateRight(tree, node) { + var p = node, q = node.L, parent = p.U; + if (parent) { + if (parent.L === p) parent.L = q; else parent.R = q; + } else { + tree._ = q; + } + q.U = parent; + p.U = q; + p.L = q.R; + if (p.L) p.L.U = p; + q.R = p; + } + function d3_geom_voronoiRedBlackFirst(node) { + while (node.L) node = node.L; + return node; + } + function d3_geom_voronoi(sites, bbox) { + var site = sites.sort(d3_geom_voronoiVertexOrder).pop(), x0, y0, circle; + d3_geom_voronoiEdges = []; + d3_geom_voronoiCells = new Array(sites.length); + d3_geom_voronoiBeaches = new d3_geom_voronoiRedBlackTree(); + d3_geom_voronoiCircles = new d3_geom_voronoiRedBlackTree(); + while (true) { + circle = d3_geom_voronoiFirstCircle; + if (site && (!circle || site.y < circle.y || site.y === circle.y && site.x < circle.x)) { + if (site.x !== x0 || site.y !== y0) { + d3_geom_voronoiCells[site.i] = new d3_geom_voronoiCell(site); + d3_geom_voronoiAddBeach(site); + x0 = site.x, y0 = site.y; + } + site = sites.pop(); + } else if (circle) { + d3_geom_voronoiRemoveBeach(circle.arc); + } else { + break; + } + } + if (bbox) d3_geom_voronoiClipEdges(bbox), d3_geom_voronoiCloseCells(bbox); + var diagram = { + cells: d3_geom_voronoiCells, + edges: d3_geom_voronoiEdges + }; + d3_geom_voronoiBeaches = d3_geom_voronoiCircles = d3_geom_voronoiEdges = d3_geom_voronoiCells = null; + return diagram; + } + function d3_geom_voronoiVertexOrder(a, b) { + return b.y - a.y || b.x - a.x; + } + d3.geom.voronoi = function(points) { + var x = d3_geom_pointX, y = d3_geom_pointY, fx = x, fy = y, clipExtent = d3_geom_voronoiClipExtent; + if (points) return voronoi(points); + function voronoi(data) { + var polygons = new Array(data.length), x0 = clipExtent[0][0], y0 = clipExtent[0][1], x1 = clipExtent[1][0], y1 = clipExtent[1][1]; + d3_geom_voronoi(sites(data), clipExtent).cells.forEach(function(cell, i) { + var edges = cell.edges, site = cell.site, polygon = polygons[i] = edges.length ? edges.map(function(e) { + var s = e.start(); + return [ s.x, s.y ]; + }) : site.x >= x0 && site.x <= x1 && site.y >= y0 && site.y <= y1 ? [ [ x0, y1 ], [ x1, y1 ], [ x1, y0 ], [ x0, y0 ] ] : []; + polygon.point = data[i]; + }); + return polygons; + } + function sites(data) { + return data.map(function(d, i) { + return { + x: Math.round(fx(d, i) / ε) * ε, + y: Math.round(fy(d, i) / ε) * ε, + i: i + }; + }); + } + voronoi.links = function(data) { + return d3_geom_voronoi(sites(data)).edges.filter(function(edge) { + return edge.l && edge.r; + }).map(function(edge) { + return { + source: data[edge.l.i], + target: data[edge.r.i] + }; + }); + }; + voronoi.triangles = function(data) { + var triangles = []; + d3_geom_voronoi(sites(data)).cells.forEach(function(cell, i) { + var site = cell.site, edges = cell.edges.sort(d3_geom_voronoiHalfEdgeOrder), j = -1, m = edges.length, e0, s0, e1 = edges[m - 1].edge, s1 = e1.l === site ? e1.r : e1.l; + while (++j < m) { + e0 = e1; + s0 = s1; + e1 = edges[j].edge; + s1 = e1.l === site ? e1.r : e1.l; + if (i < s0.i && i < s1.i && d3_geom_voronoiTriangleArea(site, s0, s1) < 0) { + triangles.push([ data[i], data[s0.i], data[s1.i] ]); + } + } + }); + return triangles; + }; + voronoi.x = function(_) { + return arguments.length ? (fx = d3_functor(x = _), voronoi) : x; + }; + voronoi.y = function(_) { + return arguments.length ? (fy = d3_functor(y = _), voronoi) : y; + }; + voronoi.clipExtent = function(_) { + if (!arguments.length) return clipExtent === d3_geom_voronoiClipExtent ? null : clipExtent; + clipExtent = _ == null ? d3_geom_voronoiClipExtent : _; + return voronoi; + }; + voronoi.size = function(_) { + if (!arguments.length) return clipExtent === d3_geom_voronoiClipExtent ? null : clipExtent && clipExtent[1]; + return voronoi.clipExtent(_ && [ [ 0, 0 ], _ ]); + }; + return voronoi; + }; + var d3_geom_voronoiClipExtent = [ [ -1e6, -1e6 ], [ 1e6, 1e6 ] ]; + function d3_geom_voronoiTriangleArea(a, b, c) { + return (a.x - c.x) * (b.y - a.y) - (a.x - b.x) * (c.y - a.y); + } + d3.geom.delaunay = function(vertices) { + return d3.geom.voronoi().triangles(vertices); + }; + d3.geom.quadtree = function(points, x1, y1, x2, y2) { + var x = d3_geom_pointX, y = d3_geom_pointY, compat; + if (compat = arguments.length) { + x = d3_geom_quadtreeCompatX; + y = d3_geom_quadtreeCompatY; + if (compat === 3) { + y2 = y1; + x2 = x1; + y1 = x1 = 0; + } + return quadtree(points); + } + function quadtree(data) { + var d, fx = d3_functor(x), fy = d3_functor(y), xs, ys, i, n, x1_, y1_, x2_, y2_; + if (x1 != null) { + x1_ = x1, y1_ = y1, x2_ = x2, y2_ = y2; + } else { + x2_ = y2_ = -(x1_ = y1_ = Infinity); + xs = [], ys = []; + n = data.length; + if (compat) for (i = 0; i < n; ++i) { + d = data[i]; + if (d.x < x1_) x1_ = d.x; + if (d.y < y1_) y1_ = d.y; + if (d.x > x2_) x2_ = d.x; + if (d.y > y2_) y2_ = d.y; + xs.push(d.x); + ys.push(d.y); + } else for (i = 0; i < n; ++i) { + var x_ = +fx(d = data[i], i), y_ = +fy(d, i); + if (x_ < x1_) x1_ = x_; + if (y_ < y1_) y1_ = y_; + if (x_ > x2_) x2_ = x_; + if (y_ > y2_) y2_ = y_; + xs.push(x_); + ys.push(y_); + } + } + var dx = x2_ - x1_, dy = y2_ - y1_; + if (dx > dy) y2_ = y1_ + dx; else x2_ = x1_ + dy; + function insert(n, d, x, y, x1, y1, x2, y2) { + if (isNaN(x) || isNaN(y)) return; + if (n.leaf) { + var nx = n.x, ny = n.y; + if (nx != null) { + if (abs(nx - x) + abs(ny - y) < .01) { + insertChild(n, d, x, y, x1, y1, x2, y2); + } else { + var nPoint = n.point; + n.x = n.y = n.point = null; + insertChild(n, nPoint, nx, ny, x1, y1, x2, y2); + insertChild(n, d, x, y, x1, y1, x2, y2); + } + } else { + n.x = x, n.y = y, n.point = d; + } + } else { + insertChild(n, d, x, y, x1, y1, x2, y2); + } + } + function insertChild(n, d, x, y, x1, y1, x2, y2) { + var xm = (x1 + x2) * .5, ym = (y1 + y2) * .5, right = x >= xm, below = y >= ym, i = below << 1 | right; + n.leaf = false; + n = n.nodes[i] || (n.nodes[i] = d3_geom_quadtreeNode()); + if (right) x1 = xm; else x2 = xm; + if (below) y1 = ym; else y2 = ym; + insert(n, d, x, y, x1, y1, x2, y2); + } + var root = d3_geom_quadtreeNode(); + root.add = function(d) { + insert(root, d, +fx(d, ++i), +fy(d, i), x1_, y1_, x2_, y2_); + }; + root.visit = function(f) { + d3_geom_quadtreeVisit(f, root, x1_, y1_, x2_, y2_); + }; + root.find = function(point) { + return d3_geom_quadtreeFind(root, point[0], point[1], x1_, y1_, x2_, y2_); + }; + i = -1; + if (x1 == null) { + while (++i < n) { + insert(root, data[i], xs[i], ys[i], x1_, y1_, x2_, y2_); + } + --i; + } else data.forEach(root.add); + xs = ys = data = d = null; + return root; + } + quadtree.x = function(_) { + return arguments.length ? (x = _, quadtree) : x; + }; + quadtree.y = function(_) { + return arguments.length ? (y = _, quadtree) : y; + }; + quadtree.extent = function(_) { + if (!arguments.length) return x1 == null ? null : [ [ x1, y1 ], [ x2, y2 ] ]; + if (_ == null) x1 = y1 = x2 = y2 = null; else x1 = +_[0][0], y1 = +_[0][1], x2 = +_[1][0], + y2 = +_[1][1]; + return quadtree; + }; + quadtree.size = function(_) { + if (!arguments.length) return x1 == null ? null : [ x2 - x1, y2 - y1 ]; + if (_ == null) x1 = y1 = x2 = y2 = null; else x1 = y1 = 0, x2 = +_[0], y2 = +_[1]; + return quadtree; + }; + return quadtree; + }; + function d3_geom_quadtreeCompatX(d) { + return d.x; + } + function d3_geom_quadtreeCompatY(d) { + return d.y; + } + function d3_geom_quadtreeNode() { + return { + leaf: true, + nodes: [], + point: null, + x: null, + y: null + }; + } + function d3_geom_quadtreeVisit(f, node, x1, y1, x2, y2) { + if (!f(node, x1, y1, x2, y2)) { + var sx = (x1 + x2) * .5, sy = (y1 + y2) * .5, children = node.nodes; + if (children[0]) d3_geom_quadtreeVisit(f, children[0], x1, y1, sx, sy); + if (children[1]) d3_geom_quadtreeVisit(f, children[1], sx, y1, x2, sy); + if (children[2]) d3_geom_quadtreeVisit(f, children[2], x1, sy, sx, y2); + if (children[3]) d3_geom_quadtreeVisit(f, children[3], sx, sy, x2, y2); + } + } + function d3_geom_quadtreeFind(root, x, y, x0, y0, x3, y3) { + var minDistance2 = Infinity, closestPoint; + (function find(node, x1, y1, x2, y2) { + if (x1 > x3 || y1 > y3 || x2 < x0 || y2 < y0) return; + if (point = node.point) { + var point, dx = x - node.x, dy = y - node.y, distance2 = dx * dx + dy * dy; + if (distance2 < minDistance2) { + var distance = Math.sqrt(minDistance2 = distance2); + x0 = x - distance, y0 = y - distance; + x3 = x + distance, y3 = y + distance; + closestPoint = point; + } + } + var children = node.nodes, xm = (x1 + x2) * .5, ym = (y1 + y2) * .5, right = x >= xm, below = y >= ym; + for (var i = below << 1 | right, j = i + 4; i < j; ++i) { + if (node = children[i & 3]) switch (i & 3) { + case 0: + find(node, x1, y1, xm, ym); + break; + + case 1: + find(node, xm, y1, x2, ym); + break; + + case 2: + find(node, x1, ym, xm, y2); + break; + + case 3: + find(node, xm, ym, x2, y2); + break; + } + } + })(root, x0, y0, x3, y3); + return closestPoint; + } + d3.interpolateRgb = d3_interpolateRgb; + function d3_interpolateRgb(a, b) { + a = d3.rgb(a); + b = d3.rgb(b); + var ar = a.r, ag = a.g, ab = a.b, br = b.r - ar, bg = b.g - ag, bb = b.b - ab; + return function(t) { + return "#" + d3_rgb_hex(Math.round(ar + br * t)) + d3_rgb_hex(Math.round(ag + bg * t)) + d3_rgb_hex(Math.round(ab + bb * t)); + }; + } + d3.interpolateObject = d3_interpolateObject; + function d3_interpolateObject(a, b) { + var i = {}, c = {}, k; + for (k in a) { + if (k in b) { + i[k] = d3_interpolate(a[k], b[k]); + } else { + c[k] = a[k]; + } + } + for (k in b) { + if (!(k in a)) { + c[k] = b[k]; + } + } + return function(t) { + for (k in i) c[k] = i[k](t); + return c; + }; + } + d3.interpolateNumber = d3_interpolateNumber; + function d3_interpolateNumber(a, b) { + a = +a, b = +b; + return function(t) { + return a * (1 - t) + b * t; + }; + } + d3.interpolateString = d3_interpolateString; + function d3_interpolateString(a, b) { + var bi = d3_interpolate_numberA.lastIndex = d3_interpolate_numberB.lastIndex = 0, am, bm, bs, i = -1, s = [], q = []; + a = a + "", b = b + ""; + while ((am = d3_interpolate_numberA.exec(a)) && (bm = d3_interpolate_numberB.exec(b))) { + if ((bs = bm.index) > bi) { + bs = b.slice(bi, bs); + if (s[i]) s[i] += bs; else s[++i] = bs; + } + if ((am = am[0]) === (bm = bm[0])) { + if (s[i]) s[i] += bm; else s[++i] = bm; + } else { + s[++i] = null; + q.push({ + i: i, + x: d3_interpolateNumber(am, bm) + }); + } + bi = d3_interpolate_numberB.lastIndex; + } + if (bi < b.length) { + bs = b.slice(bi); + if (s[i]) s[i] += bs; else s[++i] = bs; + } + return s.length < 2 ? q[0] ? (b = q[0].x, function(t) { + return b(t) + ""; + }) : function() { + return b; + } : (b = q.length, function(t) { + for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t); + return s.join(""); + }); + } + var d3_interpolate_numberA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, d3_interpolate_numberB = new RegExp(d3_interpolate_numberA.source, "g"); + d3.interpolate = d3_interpolate; + function d3_interpolate(a, b) { + var i = d3.interpolators.length, f; + while (--i >= 0 && !(f = d3.interpolators[i](a, b))) ; + return f; + } + d3.interpolators = [ function(a, b) { + var t = typeof b; + return (t === "string" ? d3_rgb_names.has(b.toLowerCase()) || /^(#|rgb\(|hsl\()/i.test(b) ? d3_interpolateRgb : d3_interpolateString : b instanceof d3_color ? d3_interpolateRgb : Array.isArray(b) ? d3_interpolateArray : t === "object" && isNaN(b) ? d3_interpolateObject : d3_interpolateNumber)(a, b); + } ]; + d3.interpolateArray = d3_interpolateArray; + function d3_interpolateArray(a, b) { + var x = [], c = [], na = a.length, nb = b.length, n0 = Math.min(a.length, b.length), i; + for (i = 0; i < n0; ++i) x.push(d3_interpolate(a[i], b[i])); + for (;i < na; ++i) c[i] = a[i]; + for (;i < nb; ++i) c[i] = b[i]; + return function(t) { + for (i = 0; i < n0; ++i) c[i] = x[i](t); + return c; + }; + } + var d3_ease_default = function() { + return d3_identity; + }; + var d3_ease = d3.map({ + linear: d3_ease_default, + poly: d3_ease_poly, + quad: function() { + return d3_ease_quad; + }, + cubic: function() { + return d3_ease_cubic; + }, + sin: function() { + return d3_ease_sin; + }, + exp: function() { + return d3_ease_exp; + }, + circle: function() { + return d3_ease_circle; + }, + elastic: d3_ease_elastic, + back: d3_ease_back, + bounce: function() { + return d3_ease_bounce; + } + }); + var d3_ease_mode = d3.map({ + "in": d3_identity, + out: d3_ease_reverse, + "in-out": d3_ease_reflect, + "out-in": function(f) { + return d3_ease_reflect(d3_ease_reverse(f)); + } + }); + d3.ease = function(name) { + var i = name.indexOf("-"), t = i >= 0 ? name.slice(0, i) : name, m = i >= 0 ? name.slice(i + 1) : "in"; + t = d3_ease.get(t) || d3_ease_default; + m = d3_ease_mode.get(m) || d3_identity; + return d3_ease_clamp(m(t.apply(null, d3_arraySlice.call(arguments, 1)))); + }; + function d3_ease_clamp(f) { + return function(t) { + return t <= 0 ? 0 : t >= 1 ? 1 : f(t); + }; + } + function d3_ease_reverse(f) { + return function(t) { + return 1 - f(1 - t); + }; + } + function d3_ease_reflect(f) { + return function(t) { + return .5 * (t < .5 ? f(2 * t) : 2 - f(2 - 2 * t)); + }; + } + function d3_ease_quad(t) { + return t * t; + } + function d3_ease_cubic(t) { + return t * t * t; + } + function d3_ease_cubicInOut(t) { + if (t <= 0) return 0; + if (t >= 1) return 1; + var t2 = t * t, t3 = t2 * t; + return 4 * (t < .5 ? t3 : 3 * (t - t2) + t3 - .75); + } + function d3_ease_poly(e) { + return function(t) { + return Math.pow(t, e); + }; + } + function d3_ease_sin(t) { + return 1 - Math.cos(t * halfÏ€); + } + function d3_ease_exp(t) { + return Math.pow(2, 10 * (t - 1)); + } + function d3_ease_circle(t) { + return 1 - Math.sqrt(1 - t * t); + } + function d3_ease_elastic(a, p) { + var s; + if (arguments.length < 2) p = .45; + if (arguments.length) s = p / Ï„ * Math.asin(1 / a); else a = 1, s = p / 4; + return function(t) { + return 1 + a * Math.pow(2, -10 * t) * Math.sin((t - s) * Ï„ / p); + }; + } + function d3_ease_back(s) { + if (!s) s = 1.70158; + return function(t) { + return t * t * ((s + 1) * t - s); + }; + } + function d3_ease_bounce(t) { + return t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375; + } + d3.interpolateHcl = d3_interpolateHcl; + function d3_interpolateHcl(a, b) { + a = d3.hcl(a); + b = d3.hcl(b); + var ah = a.h, ac = a.c, al = a.l, bh = b.h - ah, bc = b.c - ac, bl = b.l - al; + if (isNaN(bc)) bc = 0, ac = isNaN(ac) ? b.c : ac; + if (isNaN(bh)) bh = 0, ah = isNaN(ah) ? b.h : ah; else if (bh > 180) bh -= 360; else if (bh < -180) bh += 360; + return function(t) { + return d3_hcl_lab(ah + bh * t, ac + bc * t, al + bl * t) + ""; + }; + } + d3.interpolateHsl = d3_interpolateHsl; + function d3_interpolateHsl(a, b) { + a = d3.hsl(a); + b = d3.hsl(b); + var ah = a.h, as = a.s, al = a.l, bh = b.h - ah, bs = b.s - as, bl = b.l - al; + if (isNaN(bs)) bs = 0, as = isNaN(as) ? b.s : as; + if (isNaN(bh)) bh = 0, ah = isNaN(ah) ? b.h : ah; else if (bh > 180) bh -= 360; else if (bh < -180) bh += 360; + return function(t) { + return d3_hsl_rgb(ah + bh * t, as + bs * t, al + bl * t) + ""; + }; + } + d3.interpolateLab = d3_interpolateLab; + function d3_interpolateLab(a, b) { + a = d3.lab(a); + b = d3.lab(b); + var al = a.l, aa = a.a, ab = a.b, bl = b.l - al, ba = b.a - aa, bb = b.b - ab; + return function(t) { + return d3_lab_rgb(al + bl * t, aa + ba * t, ab + bb * t) + ""; + }; + } + d3.interpolateRound = d3_interpolateRound; + function d3_interpolateRound(a, b) { + b -= a; + return function(t) { + return Math.round(a + b * t); + }; + } + d3.transform = function(string) { + var g = d3_document.createElementNS(d3.ns.prefix.svg, "g"); + return (d3.transform = function(string) { + if (string != null) { + g.setAttribute("transform", string); + var t = g.transform.baseVal.consolidate(); + } + return new d3_transform(t ? t.matrix : d3_transformIdentity); + })(string); + }; + function d3_transform(m) { + var r0 = [ m.a, m.b ], r1 = [ m.c, m.d ], kx = d3_transformNormalize(r0), kz = d3_transformDot(r0, r1), ky = d3_transformNormalize(d3_transformCombine(r1, r0, -kz)) || 0; + if (r0[0] * r1[1] < r1[0] * r0[1]) { + r0[0] *= -1; + r0[1] *= -1; + kx *= -1; + kz *= -1; + } + this.rotate = (kx ? Math.atan2(r0[1], r0[0]) : Math.atan2(-r1[0], r1[1])) * d3_degrees; + this.translate = [ m.e, m.f ]; + this.scale = [ kx, ky ]; + this.skew = ky ? Math.atan2(kz, ky) * d3_degrees : 0; + } + d3_transform.prototype.toString = function() { + return "translate(" + this.translate + ")rotate(" + this.rotate + ")skewX(" + this.skew + ")scale(" + this.scale + ")"; + }; + function d3_transformDot(a, b) { + return a[0] * b[0] + a[1] * b[1]; + } + function d3_transformNormalize(a) { + var k = Math.sqrt(d3_transformDot(a, a)); + if (k) { + a[0] /= k; + a[1] /= k; + } + return k; + } + function d3_transformCombine(a, b, k) { + a[0] += k * b[0]; + a[1] += k * b[1]; + return a; + } + var d3_transformIdentity = { + a: 1, + b: 0, + c: 0, + d: 1, + e: 0, + f: 0 + }; + d3.interpolateTransform = d3_interpolateTransform; + function d3_interpolateTransformPop(s) { + return s.length ? s.pop() + "," : ""; + } + function d3_interpolateTranslate(ta, tb, s, q) { + if (ta[0] !== tb[0] || ta[1] !== tb[1]) { + var i = s.push("translate(", null, ",", null, ")"); + q.push({ + i: i - 4, + x: d3_interpolateNumber(ta[0], tb[0]) + }, { + i: i - 2, + x: d3_interpolateNumber(ta[1], tb[1]) + }); + } else if (tb[0] || tb[1]) { + s.push("translate(" + tb + ")"); + } + } + function d3_interpolateRotate(ra, rb, s, q) { + if (ra !== rb) { + if (ra - rb > 180) rb += 360; else if (rb - ra > 180) ra += 360; + q.push({ + i: s.push(d3_interpolateTransformPop(s) + "rotate(", null, ")") - 2, + x: d3_interpolateNumber(ra, rb) + }); + } else if (rb) { + s.push(d3_interpolateTransformPop(s) + "rotate(" + rb + ")"); + } + } + function d3_interpolateSkew(wa, wb, s, q) { + if (wa !== wb) { + q.push({ + i: s.push(d3_interpolateTransformPop(s) + "skewX(", null, ")") - 2, + x: d3_interpolateNumber(wa, wb) + }); + } else if (wb) { + s.push(d3_interpolateTransformPop(s) + "skewX(" + wb + ")"); + } + } + function d3_interpolateScale(ka, kb, s, q) { + if (ka[0] !== kb[0] || ka[1] !== kb[1]) { + var i = s.push(d3_interpolateTransformPop(s) + "scale(", null, ",", null, ")"); + q.push({ + i: i - 4, + x: d3_interpolateNumber(ka[0], kb[0]) + }, { + i: i - 2, + x: d3_interpolateNumber(ka[1], kb[1]) + }); + } else if (kb[0] !== 1 || kb[1] !== 1) { + s.push(d3_interpolateTransformPop(s) + "scale(" + kb + ")"); + } + } + function d3_interpolateTransform(a, b) { + var s = [], q = []; + a = d3.transform(a), b = d3.transform(b); + d3_interpolateTranslate(a.translate, b.translate, s, q); + d3_interpolateRotate(a.rotate, b.rotate, s, q); + d3_interpolateSkew(a.skew, b.skew, s, q); + d3_interpolateScale(a.scale, b.scale, s, q); + a = b = null; + return function(t) { + var i = -1, n = q.length, o; + while (++i < n) s[(o = q[i]).i] = o.x(t); + return s.join(""); + }; + } + function d3_uninterpolateNumber(a, b) { + b = (b -= a = +a) || 1 / b; + return function(x) { + return (x - a) / b; + }; + } + function d3_uninterpolateClamp(a, b) { + b = (b -= a = +a) || 1 / b; + return function(x) { + return Math.max(0, Math.min(1, (x - a) / b)); + }; + } + d3.layout = {}; + d3.layout.bundle = function() { + return function(links) { + var paths = [], i = -1, n = links.length; + while (++i < n) paths.push(d3_layout_bundlePath(links[i])); + return paths; + }; + }; + function d3_layout_bundlePath(link) { + var start = link.source, end = link.target, lca = d3_layout_bundleLeastCommonAncestor(start, end), points = [ start ]; + while (start !== lca) { + start = start.parent; + points.push(start); + } + var k = points.length; + while (end !== lca) { + points.splice(k, 0, end); + end = end.parent; + } + return points; + } + function d3_layout_bundleAncestors(node) { + var ancestors = [], parent = node.parent; + while (parent != null) { + ancestors.push(node); + node = parent; + parent = parent.parent; + } + ancestors.push(node); + return ancestors; + } + function d3_layout_bundleLeastCommonAncestor(a, b) { + if (a === b) return a; + var aNodes = d3_layout_bundleAncestors(a), bNodes = d3_layout_bundleAncestors(b), aNode = aNodes.pop(), bNode = bNodes.pop(), sharedNode = null; + while (aNode === bNode) { + sharedNode = aNode; + aNode = aNodes.pop(); + bNode = bNodes.pop(); + } + return sharedNode; + } + d3.layout.chord = function() { + var chord = {}, chords, groups, matrix, n, padding = 0, sortGroups, sortSubgroups, sortChords; + function relayout() { + var subgroups = {}, groupSums = [], groupIndex = d3.range(n), subgroupIndex = [], k, x, x0, i, j; + chords = []; + groups = []; + k = 0, i = -1; + while (++i < n) { + x = 0, j = -1; + while (++j < n) { + x += matrix[i][j]; + } + groupSums.push(x); + subgroupIndex.push(d3.range(n)); + k += x; + } + if (sortGroups) { + groupIndex.sort(function(a, b) { + return sortGroups(groupSums[a], groupSums[b]); + }); + } + if (sortSubgroups) { + subgroupIndex.forEach(function(d, i) { + d.sort(function(a, b) { + return sortSubgroups(matrix[i][a], matrix[i][b]); + }); + }); + } + k = (Ï„ - padding * n) / k; + x = 0, i = -1; + while (++i < n) { + x0 = x, j = -1; + while (++j < n) { + var di = groupIndex[i], dj = subgroupIndex[di][j], v = matrix[di][dj], a0 = x, a1 = x += v * k; + subgroups[di + "-" + dj] = { + index: di, + subindex: dj, + startAngle: a0, + endAngle: a1, + value: v + }; + } + groups[di] = { + index: di, + startAngle: x0, + endAngle: x, + value: groupSums[di] + }; + x += padding; + } + i = -1; + while (++i < n) { + j = i - 1; + while (++j < n) { + var source = subgroups[i + "-" + j], target = subgroups[j + "-" + i]; + if (source.value || target.value) { + chords.push(source.value < target.value ? { + source: target, + target: source + } : { + source: source, + target: target + }); + } + } + } + if (sortChords) resort(); + } + function resort() { + chords.sort(function(a, b) { + return sortChords((a.source.value + a.target.value) / 2, (b.source.value + b.target.value) / 2); + }); + } + chord.matrix = function(x) { + if (!arguments.length) return matrix; + n = (matrix = x) && matrix.length; + chords = groups = null; + return chord; + }; + chord.padding = function(x) { + if (!arguments.length) return padding; + padding = x; + chords = groups = null; + return chord; + }; + chord.sortGroups = function(x) { + if (!arguments.length) return sortGroups; + sortGroups = x; + chords = groups = null; + return chord; + }; + chord.sortSubgroups = function(x) { + if (!arguments.length) return sortSubgroups; + sortSubgroups = x; + chords = null; + return chord; + }; + chord.sortChords = function(x) { + if (!arguments.length) return sortChords; + sortChords = x; + if (chords) resort(); + return chord; + }; + chord.chords = function() { + if (!chords) relayout(); + return chords; + }; + chord.groups = function() { + if (!groups) relayout(); + return groups; + }; + return chord; + }; + d3.layout.force = function() { + var force = {}, event = d3.dispatch("start", "tick", "end"), timer, size = [ 1, 1 ], drag, alpha, friction = .9, linkDistance = d3_layout_forceLinkDistance, linkStrength = d3_layout_forceLinkStrength, charge = -30, chargeDistance2 = d3_layout_forceChargeDistance2, gravity = .1, theta2 = .64, nodes = [], links = [], distances, strengths, charges; + function repulse(node) { + return function(quad, x1, _, x2) { + if (quad.point !== node) { + var dx = quad.cx - node.x, dy = quad.cy - node.y, dw = x2 - x1, dn = dx * dx + dy * dy; + if (dw * dw / theta2 < dn) { + if (dn < chargeDistance2) { + var k = quad.charge / dn; + node.px -= dx * k; + node.py -= dy * k; + } + return true; + } + if (quad.point && dn && dn < chargeDistance2) { + var k = quad.pointCharge / dn; + node.px -= dx * k; + node.py -= dy * k; + } + } + return !quad.charge; + }; + } + force.tick = function() { + if ((alpha *= .99) < .005) { + timer = null; + event.end({ + type: "end", + alpha: alpha = 0 + }); + return true; + } + var n = nodes.length, m = links.length, q, i, o, s, t, l, k, x, y; + for (i = 0; i < m; ++i) { + o = links[i]; + s = o.source; + t = o.target; + x = t.x - s.x; + y = t.y - s.y; + if (l = x * x + y * y) { + l = alpha * strengths[i] * ((l = Math.sqrt(l)) - distances[i]) / l; + x *= l; + y *= l; + t.x -= x * (k = s.weight + t.weight ? s.weight / (s.weight + t.weight) : .5); + t.y -= y * k; + s.x += x * (k = 1 - k); + s.y += y * k; + } + } + if (k = alpha * gravity) { + x = size[0] / 2; + y = size[1] / 2; + i = -1; + if (k) while (++i < n) { + o = nodes[i]; + o.x += (x - o.x) * k; + o.y += (y - o.y) * k; + } + } + if (charge) { + d3_layout_forceAccumulate(q = d3.geom.quadtree(nodes), alpha, charges); + i = -1; + while (++i < n) { + if (!(o = nodes[i]).fixed) { + q.visit(repulse(o)); + } + } + } + i = -1; + while (++i < n) { + o = nodes[i]; + if (o.fixed) { + o.x = o.px; + o.y = o.py; + } else { + o.x -= (o.px - (o.px = o.x)) * friction; + o.y -= (o.py - (o.py = o.y)) * friction; + } + } + event.tick({ + type: "tick", + alpha: alpha + }); + }; + force.nodes = function(x) { + if (!arguments.length) return nodes; + nodes = x; + return force; + }; + force.links = function(x) { + if (!arguments.length) return links; + links = x; + return force; + }; + force.size = function(x) { + if (!arguments.length) return size; + size = x; + return force; + }; + force.linkDistance = function(x) { + if (!arguments.length) return linkDistance; + linkDistance = typeof x === "function" ? x : +x; + return force; + }; + force.distance = force.linkDistance; + force.linkStrength = function(x) { + if (!arguments.length) return linkStrength; + linkStrength = typeof x === "function" ? x : +x; + return force; + }; + force.friction = function(x) { + if (!arguments.length) return friction; + friction = +x; + return force; + }; + force.charge = function(x) { + if (!arguments.length) return charge; + charge = typeof x === "function" ? x : +x; + return force; + }; + force.chargeDistance = function(x) { + if (!arguments.length) return Math.sqrt(chargeDistance2); + chargeDistance2 = x * x; + return force; + }; + force.gravity = function(x) { + if (!arguments.length) return gravity; + gravity = +x; + return force; + }; + force.theta = function(x) { + if (!arguments.length) return Math.sqrt(theta2); + theta2 = x * x; + return force; + }; + force.alpha = function(x) { + if (!arguments.length) return alpha; + x = +x; + if (alpha) { + if (x > 0) { + alpha = x; + } else { + timer.c = null, timer.t = NaN, timer = null; + event.end({ + type: "end", + alpha: alpha = 0 + }); + } + } else if (x > 0) { + event.start({ + type: "start", + alpha: alpha = x + }); + timer = d3_timer(force.tick); + } + return force; + }; + force.start = function() { + var i, n = nodes.length, m = links.length, w = size[0], h = size[1], neighbors, o; + for (i = 0; i < n; ++i) { + (o = nodes[i]).index = i; + o.weight = 0; + } + for (i = 0; i < m; ++i) { + o = links[i]; + if (typeof o.source == "number") o.source = nodes[o.source]; + if (typeof o.target == "number") o.target = nodes[o.target]; + ++o.source.weight; + ++o.target.weight; + } + for (i = 0; i < n; ++i) { + o = nodes[i]; + if (isNaN(o.x)) o.x = position("x", w); + if (isNaN(o.y)) o.y = position("y", h); + if (isNaN(o.px)) o.px = o.x; + if (isNaN(o.py)) o.py = o.y; + } + distances = []; + if (typeof linkDistance === "function") for (i = 0; i < m; ++i) distances[i] = +linkDistance.call(this, links[i], i); else for (i = 0; i < m; ++i) distances[i] = linkDistance; + strengths = []; + if (typeof linkStrength === "function") for (i = 0; i < m; ++i) strengths[i] = +linkStrength.call(this, links[i], i); else for (i = 0; i < m; ++i) strengths[i] = linkStrength; + charges = []; + if (typeof charge === "function") for (i = 0; i < n; ++i) charges[i] = +charge.call(this, nodes[i], i); else for (i = 0; i < n; ++i) charges[i] = charge; + function position(dimension, size) { + if (!neighbors) { + neighbors = new Array(n); + for (j = 0; j < n; ++j) { + neighbors[j] = []; + } + for (j = 0; j < m; ++j) { + var o = links[j]; + neighbors[o.source.index].push(o.target); + neighbors[o.target.index].push(o.source); + } + } + var candidates = neighbors[i], j = -1, l = candidates.length, x; + while (++j < l) if (!isNaN(x = candidates[j][dimension])) return x; + return Math.random() * size; + } + return force.resume(); + }; + force.resume = function() { + return force.alpha(.1); + }; + force.stop = function() { + return force.alpha(0); + }; + force.drag = function() { + if (!drag) drag = d3.behavior.drag().origin(d3_identity).on("dragstart.force", d3_layout_forceDragstart).on("drag.force", dragmove).on("dragend.force", d3_layout_forceDragend); + if (!arguments.length) return drag; + this.on("mouseover.force", d3_layout_forceMouseover).on("mouseout.force", d3_layout_forceMouseout).call(drag); + }; + function dragmove(d) { + d.px = d3.event.x, d.py = d3.event.y; + force.resume(); + } + return d3.rebind(force, event, "on"); + }; + function d3_layout_forceDragstart(d) { + d.fixed |= 2; + } + function d3_layout_forceDragend(d) { + d.fixed &= ~6; + } + function d3_layout_forceMouseover(d) { + d.fixed |= 4; + d.px = d.x, d.py = d.y; + } + function d3_layout_forceMouseout(d) { + d.fixed &= ~4; + } + function d3_layout_forceAccumulate(quad, alpha, charges) { + var cx = 0, cy = 0; + quad.charge = 0; + if (!quad.leaf) { + var nodes = quad.nodes, n = nodes.length, i = -1, c; + while (++i < n) { + c = nodes[i]; + if (c == null) continue; + d3_layout_forceAccumulate(c, alpha, charges); + quad.charge += c.charge; + cx += c.charge * c.cx; + cy += c.charge * c.cy; + } + } + if (quad.point) { + if (!quad.leaf) { + quad.point.x += Math.random() - .5; + quad.point.y += Math.random() - .5; + } + var k = alpha * charges[quad.point.index]; + quad.charge += quad.pointCharge = k; + cx += k * quad.point.x; + cy += k * quad.point.y; + } + quad.cx = cx / quad.charge; + quad.cy = cy / quad.charge; + } + var d3_layout_forceLinkDistance = 20, d3_layout_forceLinkStrength = 1, d3_layout_forceChargeDistance2 = Infinity; + d3.layout.hierarchy = function() { + var sort = d3_layout_hierarchySort, children = d3_layout_hierarchyChildren, value = d3_layout_hierarchyValue; + function hierarchy(root) { + var stack = [ root ], nodes = [], node; + root.depth = 0; + while ((node = stack.pop()) != null) { + nodes.push(node); + if ((childs = children.call(hierarchy, node, node.depth)) && (n = childs.length)) { + var n, childs, child; + while (--n >= 0) { + stack.push(child = childs[n]); + child.parent = node; + child.depth = node.depth + 1; + } + if (value) node.value = 0; + node.children = childs; + } else { + if (value) node.value = +value.call(hierarchy, node, node.depth) || 0; + delete node.children; + } + } + d3_layout_hierarchyVisitAfter(root, function(node) { + var childs, parent; + if (sort && (childs = node.children)) childs.sort(sort); + if (value && (parent = node.parent)) parent.value += node.value; + }); + return nodes; + } + hierarchy.sort = function(x) { + if (!arguments.length) return sort; + sort = x; + return hierarchy; + }; + hierarchy.children = function(x) { + if (!arguments.length) return children; + children = x; + return hierarchy; + }; + hierarchy.value = function(x) { + if (!arguments.length) return value; + value = x; + return hierarchy; + }; + hierarchy.revalue = function(root) { + if (value) { + d3_layout_hierarchyVisitBefore(root, function(node) { + if (node.children) node.value = 0; + }); + d3_layout_hierarchyVisitAfter(root, function(node) { + var parent; + if (!node.children) node.value = +value.call(hierarchy, node, node.depth) || 0; + if (parent = node.parent) parent.value += node.value; + }); + } + return root; + }; + return hierarchy; + }; + function d3_layout_hierarchyRebind(object, hierarchy) { + d3.rebind(object, hierarchy, "sort", "children", "value"); + object.nodes = object; + object.links = d3_layout_hierarchyLinks; + return object; + } + function d3_layout_hierarchyVisitBefore(node, callback) { + var nodes = [ node ]; + while ((node = nodes.pop()) != null) { + callback(node); + if ((children = node.children) && (n = children.length)) { + var n, children; + while (--n >= 0) nodes.push(children[n]); + } + } + } + function d3_layout_hierarchyVisitAfter(node, callback) { + var nodes = [ node ], nodes2 = []; + while ((node = nodes.pop()) != null) { + nodes2.push(node); + if ((children = node.children) && (n = children.length)) { + var i = -1, n, children; + while (++i < n) nodes.push(children[i]); + } + } + while ((node = nodes2.pop()) != null) { + callback(node); + } + } + function d3_layout_hierarchyChildren(d) { + return d.children; + } + function d3_layout_hierarchyValue(d) { + return d.value; + } + function d3_layout_hierarchySort(a, b) { + return b.value - a.value; + } + function d3_layout_hierarchyLinks(nodes) { + return d3.merge(nodes.map(function(parent) { + return (parent.children || []).map(function(child) { + return { + source: parent, + target: child + }; + }); + })); + } + d3.layout.partition = function() { + var hierarchy = d3.layout.hierarchy(), size = [ 1, 1 ]; + function position(node, x, dx, dy) { + var children = node.children; + node.x = x; + node.y = node.depth * dy; + node.dx = dx; + node.dy = dy; + if (children && (n = children.length)) { + var i = -1, n, c, d; + dx = node.value ? dx / node.value : 0; + while (++i < n) { + position(c = children[i], x, d = c.value * dx, dy); + x += d; + } + } + } + function depth(node) { + var children = node.children, d = 0; + if (children && (n = children.length)) { + var i = -1, n; + while (++i < n) d = Math.max(d, depth(children[i])); + } + return 1 + d; + } + function partition(d, i) { + var nodes = hierarchy.call(this, d, i); + position(nodes[0], 0, size[0], size[1] / depth(nodes[0])); + return nodes; + } + partition.size = function(x) { + if (!arguments.length) return size; + size = x; + return partition; + }; + return d3_layout_hierarchyRebind(partition, hierarchy); + }; + d3.layout.pie = function() { + var value = Number, sort = d3_layout_pieSortByValue, startAngle = 0, endAngle = Ï„, padAngle = 0; + function pie(data) { + var n = data.length, values = data.map(function(d, i) { + return +value.call(pie, d, i); + }), a = +(typeof startAngle === "function" ? startAngle.apply(this, arguments) : startAngle), da = (typeof endAngle === "function" ? endAngle.apply(this, arguments) : endAngle) - a, p = Math.min(Math.abs(da) / n, +(typeof padAngle === "function" ? padAngle.apply(this, arguments) : padAngle)), pa = p * (da < 0 ? -1 : 1), sum = d3.sum(values), k = sum ? (da - n * pa) / sum : 0, index = d3.range(n), arcs = [], v; + if (sort != null) index.sort(sort === d3_layout_pieSortByValue ? function(i, j) { + return values[j] - values[i]; + } : function(i, j) { + return sort(data[i], data[j]); + }); + index.forEach(function(i) { + arcs[i] = { + data: data[i], + value: v = values[i], + startAngle: a, + endAngle: a += v * k + pa, + padAngle: p + }; + }); + return arcs; + } + pie.value = function(_) { + if (!arguments.length) return value; + value = _; + return pie; + }; + pie.sort = function(_) { + if (!arguments.length) return sort; + sort = _; + return pie; + }; + pie.startAngle = function(_) { + if (!arguments.length) return startAngle; + startAngle = _; + return pie; + }; + pie.endAngle = function(_) { + if (!arguments.length) return endAngle; + endAngle = _; + return pie; + }; + pie.padAngle = function(_) { + if (!arguments.length) return padAngle; + padAngle = _; + return pie; + }; + return pie; + }; + var d3_layout_pieSortByValue = {}; + d3.layout.stack = function() { + var values = d3_identity, order = d3_layout_stackOrderDefault, offset = d3_layout_stackOffsetZero, out = d3_layout_stackOut, x = d3_layout_stackX, y = d3_layout_stackY; + function stack(data, index) { + if (!(n = data.length)) return data; + var series = data.map(function(d, i) { + return values.call(stack, d, i); + }); + var points = series.map(function(d) { + return d.map(function(v, i) { + return [ x.call(stack, v, i), y.call(stack, v, i) ]; + }); + }); + var orders = order.call(stack, points, index); + series = d3.permute(series, orders); + points = d3.permute(points, orders); + var offsets = offset.call(stack, points, index); + var m = series[0].length, n, i, j, o; + for (j = 0; j < m; ++j) { + out.call(stack, series[0][j], o = offsets[j], points[0][j][1]); + for (i = 1; i < n; ++i) { + out.call(stack, series[i][j], o += points[i - 1][j][1], points[i][j][1]); + } + } + return data; + } + stack.values = function(x) { + if (!arguments.length) return values; + values = x; + return stack; + }; + stack.order = function(x) { + if (!arguments.length) return order; + order = typeof x === "function" ? x : d3_layout_stackOrders.get(x) || d3_layout_stackOrderDefault; + return stack; + }; + stack.offset = function(x) { + if (!arguments.length) return offset; + offset = typeof x === "function" ? x : d3_layout_stackOffsets.get(x) || d3_layout_stackOffsetZero; + return stack; + }; + stack.x = function(z) { + if (!arguments.length) return x; + x = z; + return stack; + }; + stack.y = function(z) { + if (!arguments.length) return y; + y = z; + return stack; + }; + stack.out = function(z) { + if (!arguments.length) return out; + out = z; + return stack; + }; + return stack; + }; + function d3_layout_stackX(d) { + return d.x; + } + function d3_layout_stackY(d) { + return d.y; + } + function d3_layout_stackOut(d, y0, y) { + d.y0 = y0; + d.y = y; + } + var d3_layout_stackOrders = d3.map({ + "inside-out": function(data) { + var n = data.length, i, j, max = data.map(d3_layout_stackMaxIndex), sums = data.map(d3_layout_stackReduceSum), index = d3.range(n).sort(function(a, b) { + return max[a] - max[b]; + }), top = 0, bottom = 0, tops = [], bottoms = []; + for (i = 0; i < n; ++i) { + j = index[i]; + if (top < bottom) { + top += sums[j]; + tops.push(j); + } else { + bottom += sums[j]; + bottoms.push(j); + } + } + return bottoms.reverse().concat(tops); + }, + reverse: function(data) { + return d3.range(data.length).reverse(); + }, + "default": d3_layout_stackOrderDefault + }); + var d3_layout_stackOffsets = d3.map({ + silhouette: function(data) { + var n = data.length, m = data[0].length, sums = [], max = 0, i, j, o, y0 = []; + for (j = 0; j < m; ++j) { + for (i = 0, o = 0; i < n; i++) o += data[i][j][1]; + if (o > max) max = o; + sums.push(o); + } + for (j = 0; j < m; ++j) { + y0[j] = (max - sums[j]) / 2; + } + return y0; + }, + wiggle: function(data) { + var n = data.length, x = data[0], m = x.length, i, j, k, s1, s2, s3, dx, o, o0, y0 = []; + y0[0] = o = o0 = 0; + for (j = 1; j < m; ++j) { + for (i = 0, s1 = 0; i < n; ++i) s1 += data[i][j][1]; + for (i = 0, s2 = 0, dx = x[j][0] - x[j - 1][0]; i < n; ++i) { + for (k = 0, s3 = (data[i][j][1] - data[i][j - 1][1]) / (2 * dx); k < i; ++k) { + s3 += (data[k][j][1] - data[k][j - 1][1]) / dx; + } + s2 += s3 * data[i][j][1]; + } + y0[j] = o -= s1 ? s2 / s1 * dx : 0; + if (o < o0) o0 = o; + } + for (j = 0; j < m; ++j) y0[j] -= o0; + return y0; + }, + expand: function(data) { + var n = data.length, m = data[0].length, k = 1 / n, i, j, o, y0 = []; + for (j = 0; j < m; ++j) { + for (i = 0, o = 0; i < n; i++) o += data[i][j][1]; + if (o) for (i = 0; i < n; i++) data[i][j][1] /= o; else for (i = 0; i < n; i++) data[i][j][1] = k; + } + for (j = 0; j < m; ++j) y0[j] = 0; + return y0; + }, + zero: d3_layout_stackOffsetZero + }); + function d3_layout_stackOrderDefault(data) { + return d3.range(data.length); + } + function d3_layout_stackOffsetZero(data) { + var j = -1, m = data[0].length, y0 = []; + while (++j < m) y0[j] = 0; + return y0; + } + function d3_layout_stackMaxIndex(array) { + var i = 1, j = 0, v = array[0][1], k, n = array.length; + for (;i < n; ++i) { + if ((k = array[i][1]) > v) { + j = i; + v = k; + } + } + return j; + } + function d3_layout_stackReduceSum(d) { + return d.reduce(d3_layout_stackSum, 0); + } + function d3_layout_stackSum(p, d) { + return p + d[1]; + } + d3.layout.histogram = function() { + var frequency = true, valuer = Number, ranger = d3_layout_histogramRange, binner = d3_layout_histogramBinSturges; + function histogram(data, i) { + var bins = [], values = data.map(valuer, this), range = ranger.call(this, values, i), thresholds = binner.call(this, range, values, i), bin, i = -1, n = values.length, m = thresholds.length - 1, k = frequency ? 1 : 1 / n, x; + while (++i < m) { + bin = bins[i] = []; + bin.dx = thresholds[i + 1] - (bin.x = thresholds[i]); + bin.y = 0; + } + if (m > 0) { + i = -1; + while (++i < n) { + x = values[i]; + if (x >= range[0] && x <= range[1]) { + bin = bins[d3.bisect(thresholds, x, 1, m) - 1]; + bin.y += k; + bin.push(data[i]); + } + } + } + return bins; + } + histogram.value = function(x) { + if (!arguments.length) return valuer; + valuer = x; + return histogram; + }; + histogram.range = function(x) { + if (!arguments.length) return ranger; + ranger = d3_functor(x); + return histogram; + }; + histogram.bins = function(x) { + if (!arguments.length) return binner; + binner = typeof x === "number" ? function(range) { + return d3_layout_histogramBinFixed(range, x); + } : d3_functor(x); + return histogram; + }; + histogram.frequency = function(x) { + if (!arguments.length) return frequency; + frequency = !!x; + return histogram; + }; + return histogram; + }; + function d3_layout_histogramBinSturges(range, values) { + return d3_layout_histogramBinFixed(range, Math.ceil(Math.log(values.length) / Math.LN2 + 1)); + } + function d3_layout_histogramBinFixed(range, n) { + var x = -1, b = +range[0], m = (range[1] - b) / n, f = []; + while (++x <= n) f[x] = m * x + b; + return f; + } + function d3_layout_histogramRange(values) { + return [ d3.min(values), d3.max(values) ]; + } + d3.layout.pack = function() { + var hierarchy = d3.layout.hierarchy().sort(d3_layout_packSort), padding = 0, size = [ 1, 1 ], radius; + function pack(d, i) { + var nodes = hierarchy.call(this, d, i), root = nodes[0], w = size[0], h = size[1], r = radius == null ? Math.sqrt : typeof radius === "function" ? radius : function() { + return radius; + }; + root.x = root.y = 0; + d3_layout_hierarchyVisitAfter(root, function(d) { + d.r = +r(d.value); + }); + d3_layout_hierarchyVisitAfter(root, d3_layout_packSiblings); + if (padding) { + var dr = padding * (radius ? 1 : Math.max(2 * root.r / w, 2 * root.r / h)) / 2; + d3_layout_hierarchyVisitAfter(root, function(d) { + d.r += dr; + }); + d3_layout_hierarchyVisitAfter(root, d3_layout_packSiblings); + d3_layout_hierarchyVisitAfter(root, function(d) { + d.r -= dr; + }); + } + d3_layout_packTransform(root, w / 2, h / 2, radius ? 1 : 1 / Math.max(2 * root.r / w, 2 * root.r / h)); + return nodes; + } + pack.size = function(_) { + if (!arguments.length) return size; + size = _; + return pack; + }; + pack.radius = function(_) { + if (!arguments.length) return radius; + radius = _ == null || typeof _ === "function" ? _ : +_; + return pack; + }; + pack.padding = function(_) { + if (!arguments.length) return padding; + padding = +_; + return pack; + }; + return d3_layout_hierarchyRebind(pack, hierarchy); + }; + function d3_layout_packSort(a, b) { + return a.value - b.value; + } + function d3_layout_packInsert(a, b) { + var c = a._pack_next; + a._pack_next = b; + b._pack_prev = a; + b._pack_next = c; + c._pack_prev = b; + } + function d3_layout_packSplice(a, b) { + a._pack_next = b; + b._pack_prev = a; + } + function d3_layout_packIntersects(a, b) { + var dx = b.x - a.x, dy = b.y - a.y, dr = a.r + b.r; + return .999 * dr * dr > dx * dx + dy * dy; + } + function d3_layout_packSiblings(node) { + if (!(nodes = node.children) || !(n = nodes.length)) return; + var nodes, xMin = Infinity, xMax = -Infinity, yMin = Infinity, yMax = -Infinity, a, b, c, i, j, k, n; + function bound(node) { + xMin = Math.min(node.x - node.r, xMin); + xMax = Math.max(node.x + node.r, xMax); + yMin = Math.min(node.y - node.r, yMin); + yMax = Math.max(node.y + node.r, yMax); + } + nodes.forEach(d3_layout_packLink); + a = nodes[0]; + a.x = -a.r; + a.y = 0; + bound(a); + if (n > 1) { + b = nodes[1]; + b.x = b.r; + b.y = 0; + bound(b); + if (n > 2) { + c = nodes[2]; + d3_layout_packPlace(a, b, c); + bound(c); + d3_layout_packInsert(a, c); + a._pack_prev = c; + d3_layout_packInsert(c, b); + b = a._pack_next; + for (i = 3; i < n; i++) { + d3_layout_packPlace(a, b, c = nodes[i]); + var isect = 0, s1 = 1, s2 = 1; + for (j = b._pack_next; j !== b; j = j._pack_next, s1++) { + if (d3_layout_packIntersects(j, c)) { + isect = 1; + break; + } + } + if (isect == 1) { + for (k = a._pack_prev; k !== j._pack_prev; k = k._pack_prev, s2++) { + if (d3_layout_packIntersects(k, c)) { + break; + } + } + } + if (isect) { + if (s1 < s2 || s1 == s2 && b.r < a.r) d3_layout_packSplice(a, b = j); else d3_layout_packSplice(a = k, b); + i--; + } else { + d3_layout_packInsert(a, c); + b = c; + bound(c); + } + } + } + } + var cx = (xMin + xMax) / 2, cy = (yMin + yMax) / 2, cr = 0; + for (i = 0; i < n; i++) { + c = nodes[i]; + c.x -= cx; + c.y -= cy; + cr = Math.max(cr, c.r + Math.sqrt(c.x * c.x + c.y * c.y)); + } + node.r = cr; + nodes.forEach(d3_layout_packUnlink); + } + function d3_layout_packLink(node) { + node._pack_next = node._pack_prev = node; + } + function d3_layout_packUnlink(node) { + delete node._pack_next; + delete node._pack_prev; + } + function d3_layout_packTransform(node, x, y, k) { + var children = node.children; + node.x = x += k * node.x; + node.y = y += k * node.y; + node.r *= k; + if (children) { + var i = -1, n = children.length; + while (++i < n) d3_layout_packTransform(children[i], x, y, k); + } + } + function d3_layout_packPlace(a, b, c) { + var db = a.r + c.r, dx = b.x - a.x, dy = b.y - a.y; + if (db && (dx || dy)) { + var da = b.r + c.r, dc = dx * dx + dy * dy; + da *= da; + db *= db; + var x = .5 + (db - da) / (2 * dc), y = Math.sqrt(Math.max(0, 2 * da * (db + dc) - (db -= dc) * db - da * da)) / (2 * dc); + c.x = a.x + x * dx + y * dy; + c.y = a.y + x * dy - y * dx; + } else { + c.x = a.x + db; + c.y = a.y; + } + } + d3.layout.tree = function() { + var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ], nodeSize = null; + function tree(d, i) { + var nodes = hierarchy.call(this, d, i), root0 = nodes[0], root1 = wrapTree(root0); + d3_layout_hierarchyVisitAfter(root1, firstWalk), root1.parent.m = -root1.z; + d3_layout_hierarchyVisitBefore(root1, secondWalk); + if (nodeSize) d3_layout_hierarchyVisitBefore(root0, sizeNode); else { + var left = root0, right = root0, bottom = root0; + d3_layout_hierarchyVisitBefore(root0, function(node) { + if (node.x < left.x) left = node; + if (node.x > right.x) right = node; + if (node.depth > bottom.depth) bottom = node; + }); + var tx = separation(left, right) / 2 - left.x, kx = size[0] / (right.x + separation(right, left) / 2 + tx), ky = size[1] / (bottom.depth || 1); + d3_layout_hierarchyVisitBefore(root0, function(node) { + node.x = (node.x + tx) * kx; + node.y = node.depth * ky; + }); + } + return nodes; + } + function wrapTree(root0) { + var root1 = { + A: null, + children: [ root0 ] + }, queue = [ root1 ], node1; + while ((node1 = queue.pop()) != null) { + for (var children = node1.children, child, i = 0, n = children.length; i < n; ++i) { + queue.push((children[i] = child = { + _: children[i], + parent: node1, + children: (child = children[i].children) && child.slice() || [], + A: null, + a: null, + z: 0, + m: 0, + c: 0, + s: 0, + t: null, + i: i + }).a = child); + } + } + return root1.children[0]; + } + function firstWalk(v) { + var children = v.children, siblings = v.parent.children, w = v.i ? siblings[v.i - 1] : null; + if (children.length) { + d3_layout_treeShift(v); + var midpoint = (children[0].z + children[children.length - 1].z) / 2; + if (w) { + v.z = w.z + separation(v._, w._); + v.m = v.z - midpoint; + } else { + v.z = midpoint; + } + } else if (w) { + v.z = w.z + separation(v._, w._); + } + v.parent.A = apportion(v, w, v.parent.A || siblings[0]); + } + function secondWalk(v) { + v._.x = v.z + v.parent.m; + v.m += v.parent.m; + } + function apportion(v, w, ancestor) { + if (w) { + var vip = v, vop = v, vim = w, vom = vip.parent.children[0], sip = vip.m, sop = vop.m, sim = vim.m, som = vom.m, shift; + while (vim = d3_layout_treeRight(vim), vip = d3_layout_treeLeft(vip), vim && vip) { + vom = d3_layout_treeLeft(vom); + vop = d3_layout_treeRight(vop); + vop.a = v; + shift = vim.z + sim - vip.z - sip + separation(vim._, vip._); + if (shift > 0) { + d3_layout_treeMove(d3_layout_treeAncestor(vim, v, ancestor), v, shift); + sip += shift; + sop += shift; + } + sim += vim.m; + sip += vip.m; + som += vom.m; + sop += vop.m; + } + if (vim && !d3_layout_treeRight(vop)) { + vop.t = vim; + vop.m += sim - sop; + } + if (vip && !d3_layout_treeLeft(vom)) { + vom.t = vip; + vom.m += sip - som; + ancestor = v; + } + } + return ancestor; + } + function sizeNode(node) { + node.x *= size[0]; + node.y = node.depth * size[1]; + } + tree.separation = function(x) { + if (!arguments.length) return separation; + separation = x; + return tree; + }; + tree.size = function(x) { + if (!arguments.length) return nodeSize ? null : size; + nodeSize = (size = x) == null ? sizeNode : null; + return tree; + }; + tree.nodeSize = function(x) { + if (!arguments.length) return nodeSize ? size : null; + nodeSize = (size = x) == null ? null : sizeNode; + return tree; + }; + return d3_layout_hierarchyRebind(tree, hierarchy); + }; + function d3_layout_treeSeparation(a, b) { + return a.parent == b.parent ? 1 : 2; + } + function d3_layout_treeLeft(v) { + var children = v.children; + return children.length ? children[0] : v.t; + } + function d3_layout_treeRight(v) { + var children = v.children, n; + return (n = children.length) ? children[n - 1] : v.t; + } + function d3_layout_treeMove(wm, wp, shift) { + var change = shift / (wp.i - wm.i); + wp.c -= change; + wp.s += shift; + wm.c += change; + wp.z += shift; + wp.m += shift; + } + function d3_layout_treeShift(v) { + var shift = 0, change = 0, children = v.children, i = children.length, w; + while (--i >= 0) { + w = children[i]; + w.z += shift; + w.m += shift; + shift += w.s + (change += w.c); + } + } + function d3_layout_treeAncestor(vim, v, ancestor) { + return vim.a.parent === v.parent ? vim.a : ancestor; + } + d3.layout.cluster = function() { + var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ], nodeSize = false; + function cluster(d, i) { + var nodes = hierarchy.call(this, d, i), root = nodes[0], previousNode, x = 0; + d3_layout_hierarchyVisitAfter(root, function(node) { + var children = node.children; + if (children && children.length) { + node.x = d3_layout_clusterX(children); + node.y = d3_layout_clusterY(children); + } else { + node.x = previousNode ? x += separation(node, previousNode) : 0; + node.y = 0; + previousNode = node; + } + }); + var left = d3_layout_clusterLeft(root), right = d3_layout_clusterRight(root), x0 = left.x - separation(left, right) / 2, x1 = right.x + separation(right, left) / 2; + d3_layout_hierarchyVisitAfter(root, nodeSize ? function(node) { + node.x = (node.x - root.x) * size[0]; + node.y = (root.y - node.y) * size[1]; + } : function(node) { + node.x = (node.x - x0) / (x1 - x0) * size[0]; + node.y = (1 - (root.y ? node.y / root.y : 1)) * size[1]; + }); + return nodes; + } + cluster.separation = function(x) { + if (!arguments.length) return separation; + separation = x; + return cluster; + }; + cluster.size = function(x) { + if (!arguments.length) return nodeSize ? null : size; + nodeSize = (size = x) == null; + return cluster; + }; + cluster.nodeSize = function(x) { + if (!arguments.length) return nodeSize ? size : null; + nodeSize = (size = x) != null; + return cluster; + }; + return d3_layout_hierarchyRebind(cluster, hierarchy); + }; + function d3_layout_clusterY(children) { + return 1 + d3.max(children, function(child) { + return child.y; + }); + } + function d3_layout_clusterX(children) { + return children.reduce(function(x, child) { + return x + child.x; + }, 0) / children.length; + } + function d3_layout_clusterLeft(node) { + var children = node.children; + return children && children.length ? d3_layout_clusterLeft(children[0]) : node; + } + function d3_layout_clusterRight(node) { + var children = node.children, n; + return children && (n = children.length) ? d3_layout_clusterRight(children[n - 1]) : node; + } + d3.layout.treemap = function() { + var hierarchy = d3.layout.hierarchy(), round = Math.round, size = [ 1, 1 ], padding = null, pad = d3_layout_treemapPadNull, sticky = false, stickies, mode = "squarify", ratio = .5 * (1 + Math.sqrt(5)); + function scale(children, k) { + var i = -1, n = children.length, child, area; + while (++i < n) { + area = (child = children[i]).value * (k < 0 ? 0 : k); + child.area = isNaN(area) || area <= 0 ? 0 : area; + } + } + function squarify(node) { + var children = node.children; + if (children && children.length) { + var rect = pad(node), row = [], remaining = children.slice(), child, best = Infinity, score, u = mode === "slice" ? rect.dx : mode === "dice" ? rect.dy : mode === "slice-dice" ? node.depth & 1 ? rect.dy : rect.dx : Math.min(rect.dx, rect.dy), n; + scale(remaining, rect.dx * rect.dy / node.value); + row.area = 0; + while ((n = remaining.length) > 0) { + row.push(child = remaining[n - 1]); + row.area += child.area; + if (mode !== "squarify" || (score = worst(row, u)) <= best) { + remaining.pop(); + best = score; + } else { + row.area -= row.pop().area; + position(row, u, rect, false); + u = Math.min(rect.dx, rect.dy); + row.length = row.area = 0; + best = Infinity; + } + } + if (row.length) { + position(row, u, rect, true); + row.length = row.area = 0; + } + children.forEach(squarify); + } + } + function stickify(node) { + var children = node.children; + if (children && children.length) { + var rect = pad(node), remaining = children.slice(), child, row = []; + scale(remaining, rect.dx * rect.dy / node.value); + row.area = 0; + while (child = remaining.pop()) { + row.push(child); + row.area += child.area; + if (child.z != null) { + position(row, child.z ? rect.dx : rect.dy, rect, !remaining.length); + row.length = row.area = 0; + } + } + children.forEach(stickify); + } + } + function worst(row, u) { + var s = row.area, r, rmax = 0, rmin = Infinity, i = -1, n = row.length; + while (++i < n) { + if (!(r = row[i].area)) continue; + if (r < rmin) rmin = r; + if (r > rmax) rmax = r; + } + s *= s; + u *= u; + return s ? Math.max(u * rmax * ratio / s, s / (u * rmin * ratio)) : Infinity; + } + function position(row, u, rect, flush) { + var i = -1, n = row.length, x = rect.x, y = rect.y, v = u ? round(row.area / u) : 0, o; + if (u == rect.dx) { + if (flush || v > rect.dy) v = rect.dy; + while (++i < n) { + o = row[i]; + o.x = x; + o.y = y; + o.dy = v; + x += o.dx = Math.min(rect.x + rect.dx - x, v ? round(o.area / v) : 0); + } + o.z = true; + o.dx += rect.x + rect.dx - x; + rect.y += v; + rect.dy -= v; + } else { + if (flush || v > rect.dx) v = rect.dx; + while (++i < n) { + o = row[i]; + o.x = x; + o.y = y; + o.dx = v; + y += o.dy = Math.min(rect.y + rect.dy - y, v ? round(o.area / v) : 0); + } + o.z = false; + o.dy += rect.y + rect.dy - y; + rect.x += v; + rect.dx -= v; + } + } + function treemap(d) { + var nodes = stickies || hierarchy(d), root = nodes[0]; + root.x = root.y = 0; + if (root.value) root.dx = size[0], root.dy = size[1]; else root.dx = root.dy = 0; + if (stickies) hierarchy.revalue(root); + scale([ root ], root.dx * root.dy / root.value); + (stickies ? stickify : squarify)(root); + if (sticky) stickies = nodes; + return nodes; + } + treemap.size = function(x) { + if (!arguments.length) return size; + size = x; + return treemap; + }; + treemap.padding = function(x) { + if (!arguments.length) return padding; + function padFunction(node) { + var p = x.call(treemap, node, node.depth); + return p == null ? d3_layout_treemapPadNull(node) : d3_layout_treemapPad(node, typeof p === "number" ? [ p, p, p, p ] : p); + } + function padConstant(node) { + return d3_layout_treemapPad(node, x); + } + var type; + pad = (padding = x) == null ? d3_layout_treemapPadNull : (type = typeof x) === "function" ? padFunction : type === "number" ? (x = [ x, x, x, x ], + padConstant) : padConstant; + return treemap; + }; + treemap.round = function(x) { + if (!arguments.length) return round != Number; + round = x ? Math.round : Number; + return treemap; + }; + treemap.sticky = function(x) { + if (!arguments.length) return sticky; + sticky = x; + stickies = null; + return treemap; + }; + treemap.ratio = function(x) { + if (!arguments.length) return ratio; + ratio = x; + return treemap; + }; + treemap.mode = function(x) { + if (!arguments.length) return mode; + mode = x + ""; + return treemap; + }; + return d3_layout_hierarchyRebind(treemap, hierarchy); + }; + function d3_layout_treemapPadNull(node) { + return { + x: node.x, + y: node.y, + dx: node.dx, + dy: node.dy + }; + } + function d3_layout_treemapPad(node, padding) { + var x = node.x + padding[3], y = node.y + padding[0], dx = node.dx - padding[1] - padding[3], dy = node.dy - padding[0] - padding[2]; + if (dx < 0) { + x += dx / 2; + dx = 0; + } + if (dy < 0) { + y += dy / 2; + dy = 0; + } + return { + x: x, + y: y, + dx: dx, + dy: dy + }; + } + d3.random = { + normal: function(µ, σ) { + var n = arguments.length; + if (n < 2) σ = 1; + if (n < 1) µ = 0; + return function() { + var x, y, r; + do { + x = Math.random() * 2 - 1; + y = Math.random() * 2 - 1; + r = x * x + y * y; + } while (!r || r > 1); + return µ + σ * x * Math.sqrt(-2 * Math.log(r) / r); + }; + }, + logNormal: function() { + var random = d3.random.normal.apply(d3, arguments); + return function() { + return Math.exp(random()); + }; + }, + bates: function(m) { + var random = d3.random.irwinHall(m); + return function() { + return random() / m; + }; + }, + irwinHall: function(m) { + return function() { + for (var s = 0, j = 0; j < m; j++) s += Math.random(); + return s; + }; + } + }; + d3.scale = {}; + function d3_scaleExtent(domain) { + var start = domain[0], stop = domain[domain.length - 1]; + return start < stop ? [ start, stop ] : [ stop, start ]; + } + function d3_scaleRange(scale) { + return scale.rangeExtent ? scale.rangeExtent() : d3_scaleExtent(scale.range()); + } + function d3_scale_bilinear(domain, range, uninterpolate, interpolate) { + var u = uninterpolate(domain[0], domain[1]), i = interpolate(range[0], range[1]); + return function(x) { + return i(u(x)); + }; + } + function d3_scale_nice(domain, nice) { + var i0 = 0, i1 = domain.length - 1, x0 = domain[i0], x1 = domain[i1], dx; + if (x1 < x0) { + dx = i0, i0 = i1, i1 = dx; + dx = x0, x0 = x1, x1 = dx; + } + domain[i0] = nice.floor(x0); + domain[i1] = nice.ceil(x1); + return domain; + } + function d3_scale_niceStep(step) { + return step ? { + floor: function(x) { + return Math.floor(x / step) * step; + }, + ceil: function(x) { + return Math.ceil(x / step) * step; + } + } : d3_scale_niceIdentity; + } + var d3_scale_niceIdentity = { + floor: d3_identity, + ceil: d3_identity + }; + function d3_scale_polylinear(domain, range, uninterpolate, interpolate) { + var u = [], i = [], j = 0, k = Math.min(domain.length, range.length) - 1; + if (domain[k] < domain[0]) { + domain = domain.slice().reverse(); + range = range.slice().reverse(); + } + while (++j <= k) { + u.push(uninterpolate(domain[j - 1], domain[j])); + i.push(interpolate(range[j - 1], range[j])); + } + return function(x) { + var j = d3.bisect(domain, x, 1, k) - 1; + return i[j](u[j](x)); + }; + } + d3.scale.linear = function() { + return d3_scale_linear([ 0, 1 ], [ 0, 1 ], d3_interpolate, false); + }; + function d3_scale_linear(domain, range, interpolate, clamp) { + var output, input; + function rescale() { + var linear = Math.min(domain.length, range.length) > 2 ? d3_scale_polylinear : d3_scale_bilinear, uninterpolate = clamp ? d3_uninterpolateClamp : d3_uninterpolateNumber; + output = linear(domain, range, uninterpolate, interpolate); + input = linear(range, domain, uninterpolate, d3_interpolate); + return scale; + } + function scale(x) { + return output(x); + } + scale.invert = function(y) { + return input(y); + }; + scale.domain = function(x) { + if (!arguments.length) return domain; + domain = x.map(Number); + return rescale(); + }; + scale.range = function(x) { + if (!arguments.length) return range; + range = x; + return rescale(); + }; + scale.rangeRound = function(x) { + return scale.range(x).interpolate(d3_interpolateRound); + }; + scale.clamp = function(x) { + if (!arguments.length) return clamp; + clamp = x; + return rescale(); + }; + scale.interpolate = function(x) { + if (!arguments.length) return interpolate; + interpolate = x; + return rescale(); + }; + scale.ticks = function(m) { + return d3_scale_linearTicks(domain, m); + }; + scale.tickFormat = function(m, format) { + return d3_scale_linearTickFormat(domain, m, format); + }; + scale.nice = function(m) { + d3_scale_linearNice(domain, m); + return rescale(); + }; + scale.copy = function() { + return d3_scale_linear(domain, range, interpolate, clamp); + }; + return rescale(); + } + function d3_scale_linearRebind(scale, linear) { + return d3.rebind(scale, linear, "range", "rangeRound", "interpolate", "clamp"); + } + function d3_scale_linearNice(domain, m) { + d3_scale_nice(domain, d3_scale_niceStep(d3_scale_linearTickRange(domain, m)[2])); + d3_scale_nice(domain, d3_scale_niceStep(d3_scale_linearTickRange(domain, m)[2])); + return domain; + } + function d3_scale_linearTickRange(domain, m) { + if (m == null) m = 10; + var extent = d3_scaleExtent(domain), span = extent[1] - extent[0], step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)), err = m / span * step; + if (err <= .15) step *= 10; else if (err <= .35) step *= 5; else if (err <= .75) step *= 2; + extent[0] = Math.ceil(extent[0] / step) * step; + extent[1] = Math.floor(extent[1] / step) * step + step * .5; + extent[2] = step; + return extent; + } + function d3_scale_linearTicks(domain, m) { + return d3.range.apply(d3, d3_scale_linearTickRange(domain, m)); + } + function d3_scale_linearTickFormat(domain, m, format) { + var range = d3_scale_linearTickRange(domain, m); + if (format) { + var match = d3_format_re.exec(format); + match.shift(); + if (match[8] === "s") { + var prefix = d3.formatPrefix(Math.max(abs(range[0]), abs(range[1]))); + if (!match[7]) match[7] = "." + d3_scale_linearPrecision(prefix.scale(range[2])); + match[8] = "f"; + format = d3.format(match.join("")); + return function(d) { + return format(prefix.scale(d)) + prefix.symbol; + }; + } + if (!match[7]) match[7] = "." + d3_scale_linearFormatPrecision(match[8], range); + format = match.join(""); + } else { + format = ",." + d3_scale_linearPrecision(range[2]) + "f"; + } + return d3.format(format); + } + var d3_scale_linearFormatSignificant = { + s: 1, + g: 1, + p: 1, + r: 1, + e: 1 + }; + function d3_scale_linearPrecision(value) { + return -Math.floor(Math.log(value) / Math.LN10 + .01); + } + function d3_scale_linearFormatPrecision(type, range) { + var p = d3_scale_linearPrecision(range[2]); + return type in d3_scale_linearFormatSignificant ? Math.abs(p - d3_scale_linearPrecision(Math.max(abs(range[0]), abs(range[1])))) + +(type !== "e") : p - (type === "%") * 2; + } + d3.scale.log = function() { + return d3_scale_log(d3.scale.linear().domain([ 0, 1 ]), 10, true, [ 1, 10 ]); + }; + function d3_scale_log(linear, base, positive, domain) { + function log(x) { + return (positive ? Math.log(x < 0 ? 0 : x) : -Math.log(x > 0 ? 0 : -x)) / Math.log(base); + } + function pow(x) { + return positive ? Math.pow(base, x) : -Math.pow(base, -x); + } + function scale(x) { + return linear(log(x)); + } + scale.invert = function(x) { + return pow(linear.invert(x)); + }; + scale.domain = function(x) { + if (!arguments.length) return domain; + positive = x[0] >= 0; + linear.domain((domain = x.map(Number)).map(log)); + return scale; + }; + scale.base = function(_) { + if (!arguments.length) return base; + base = +_; + linear.domain(domain.map(log)); + return scale; + }; + scale.nice = function() { + var niced = d3_scale_nice(domain.map(log), positive ? Math : d3_scale_logNiceNegative); + linear.domain(niced); + domain = niced.map(pow); + return scale; + }; + scale.ticks = function() { + var extent = d3_scaleExtent(domain), ticks = [], u = extent[0], v = extent[1], i = Math.floor(log(u)), j = Math.ceil(log(v)), n = base % 1 ? 2 : base; + if (isFinite(j - i)) { + if (positive) { + for (;i < j; i++) for (var k = 1; k < n; k++) ticks.push(pow(i) * k); + ticks.push(pow(i)); + } else { + ticks.push(pow(i)); + for (;i++ < j; ) for (var k = n - 1; k > 0; k--) ticks.push(pow(i) * k); + } + for (i = 0; ticks[i] < u; i++) {} + for (j = ticks.length; ticks[j - 1] > v; j--) {} + ticks = ticks.slice(i, j); + } + return ticks; + }; + scale.tickFormat = function(n, format) { + if (!arguments.length) return d3_scale_logFormat; + if (arguments.length < 2) format = d3_scale_logFormat; else if (typeof format !== "function") format = d3.format(format); + var k = Math.max(1, base * n / scale.ticks().length); + return function(d) { + var i = d / pow(Math.round(log(d))); + if (i * base < base - .5) i *= base; + return i <= k ? format(d) : ""; + }; + }; + scale.copy = function() { + return d3_scale_log(linear.copy(), base, positive, domain); + }; + return d3_scale_linearRebind(scale, linear); + } + var d3_scale_logFormat = d3.format(".0e"), d3_scale_logNiceNegative = { + floor: function(x) { + return -Math.ceil(-x); + }, + ceil: function(x) { + return -Math.floor(-x); + } + }; + d3.scale.pow = function() { + return d3_scale_pow(d3.scale.linear(), 1, [ 0, 1 ]); + }; + function d3_scale_pow(linear, exponent, domain) { + var powp = d3_scale_powPow(exponent), powb = d3_scale_powPow(1 / exponent); + function scale(x) { + return linear(powp(x)); + } + scale.invert = function(x) { + return powb(linear.invert(x)); + }; + scale.domain = function(x) { + if (!arguments.length) return domain; + linear.domain((domain = x.map(Number)).map(powp)); + return scale; + }; + scale.ticks = function(m) { + return d3_scale_linearTicks(domain, m); + }; + scale.tickFormat = function(m, format) { + return d3_scale_linearTickFormat(domain, m, format); + }; + scale.nice = function(m) { + return scale.domain(d3_scale_linearNice(domain, m)); + }; + scale.exponent = function(x) { + if (!arguments.length) return exponent; + powp = d3_scale_powPow(exponent = x); + powb = d3_scale_powPow(1 / exponent); + linear.domain(domain.map(powp)); + return scale; + }; + scale.copy = function() { + return d3_scale_pow(linear.copy(), exponent, domain); + }; + return d3_scale_linearRebind(scale, linear); + } + function d3_scale_powPow(e) { + return function(x) { + return x < 0 ? -Math.pow(-x, e) : Math.pow(x, e); + }; + } + d3.scale.sqrt = function() { + return d3.scale.pow().exponent(.5); + }; + d3.scale.ordinal = function() { + return d3_scale_ordinal([], { + t: "range", + a: [ [] ] + }); + }; + function d3_scale_ordinal(domain, ranger) { + var index, range, rangeBand; + function scale(x) { + return range[((index.get(x) || (ranger.t === "range" ? index.set(x, domain.push(x)) : NaN)) - 1) % range.length]; + } + function steps(start, step) { + return d3.range(domain.length).map(function(i) { + return start + step * i; + }); + } + scale.domain = function(x) { + if (!arguments.length) return domain; + domain = []; + index = new d3_Map(); + var i = -1, n = x.length, xi; + while (++i < n) if (!index.has(xi = x[i])) index.set(xi, domain.push(xi)); + return scale[ranger.t].apply(scale, ranger.a); + }; + scale.range = function(x) { + if (!arguments.length) return range; + range = x; + rangeBand = 0; + ranger = { + t: "range", + a: arguments + }; + return scale; + }; + scale.rangePoints = function(x, padding) { + if (arguments.length < 2) padding = 0; + var start = x[0], stop = x[1], step = domain.length < 2 ? (start = (start + stop) / 2, + 0) : (stop - start) / (domain.length - 1 + padding); + range = steps(start + step * padding / 2, step); + rangeBand = 0; + ranger = { + t: "rangePoints", + a: arguments + }; + return scale; + }; + scale.rangeRoundPoints = function(x, padding) { + if (arguments.length < 2) padding = 0; + var start = x[0], stop = x[1], step = domain.length < 2 ? (start = stop = Math.round((start + stop) / 2), + 0) : (stop - start) / (domain.length - 1 + padding) | 0; + range = steps(start + Math.round(step * padding / 2 + (stop - start - (domain.length - 1 + padding) * step) / 2), step); + rangeBand = 0; + ranger = { + t: "rangeRoundPoints", + a: arguments + }; + return scale; + }; + scale.rangeBands = function(x, padding, outerPadding) { + if (arguments.length < 2) padding = 0; + if (arguments.length < 3) outerPadding = padding; + var reverse = x[1] < x[0], start = x[reverse - 0], stop = x[1 - reverse], step = (stop - start) / (domain.length - padding + 2 * outerPadding); + range = steps(start + step * outerPadding, step); + if (reverse) range.reverse(); + rangeBand = step * (1 - padding); + ranger = { + t: "rangeBands", + a: arguments + }; + return scale; + }; + scale.rangeRoundBands = function(x, padding, outerPadding) { + if (arguments.length < 2) padding = 0; + if (arguments.length < 3) outerPadding = padding; + var reverse = x[1] < x[0], start = x[reverse - 0], stop = x[1 - reverse], step = Math.floor((stop - start) / (domain.length - padding + 2 * outerPadding)); + range = steps(start + Math.round((stop - start - (domain.length - padding) * step) / 2), step); + if (reverse) range.reverse(); + rangeBand = Math.round(step * (1 - padding)); + ranger = { + t: "rangeRoundBands", + a: arguments + }; + return scale; + }; + scale.rangeBand = function() { + return rangeBand; + }; + scale.rangeExtent = function() { + return d3_scaleExtent(ranger.a[0]); + }; + scale.copy = function() { + return d3_scale_ordinal(domain, ranger); + }; + return scale.domain(domain); + } + d3.scale.category10 = function() { + return d3.scale.ordinal().range(d3_category10); + }; + d3.scale.category20 = function() { + return d3.scale.ordinal().range(d3_category20); + }; + d3.scale.category20b = function() { + return d3.scale.ordinal().range(d3_category20b); + }; + d3.scale.category20c = function() { + return d3.scale.ordinal().range(d3_category20c); + }; + var d3_category10 = [ 2062260, 16744206, 2924588, 14034728, 9725885, 9197131, 14907330, 8355711, 12369186, 1556175 ].map(d3_rgbString); + var d3_category20 = [ 2062260, 11454440, 16744206, 16759672, 2924588, 10018698, 14034728, 16750742, 9725885, 12955861, 9197131, 12885140, 14907330, 16234194, 8355711, 13092807, 12369186, 14408589, 1556175, 10410725 ].map(d3_rgbString); + var d3_category20b = [ 3750777, 5395619, 7040719, 10264286, 6519097, 9216594, 11915115, 13556636, 9202993, 12426809, 15186514, 15190932, 8666169, 11356490, 14049643, 15177372, 8077683, 10834324, 13528509, 14589654 ].map(d3_rgbString); + var d3_category20c = [ 3244733, 7057110, 10406625, 13032431, 15095053, 16616764, 16625259, 16634018, 3253076, 7652470, 10607003, 13101504, 7695281, 10394312, 12369372, 14342891, 6513507, 9868950, 12434877, 14277081 ].map(d3_rgbString); + d3.scale.quantile = function() { + return d3_scale_quantile([], []); + }; + function d3_scale_quantile(domain, range) { + var thresholds; + function rescale() { + var k = 0, q = range.length; + thresholds = []; + while (++k < q) thresholds[k - 1] = d3.quantile(domain, k / q); + return scale; + } + function scale(x) { + if (!isNaN(x = +x)) return range[d3.bisect(thresholds, x)]; + } + scale.domain = function(x) { + if (!arguments.length) return domain; + domain = x.map(d3_number).filter(d3_numeric).sort(d3_ascending); + return rescale(); + }; + scale.range = function(x) { + if (!arguments.length) return range; + range = x; + return rescale(); + }; + scale.quantiles = function() { + return thresholds; + }; + scale.invertExtent = function(y) { + y = range.indexOf(y); + return y < 0 ? [ NaN, NaN ] : [ y > 0 ? thresholds[y - 1] : domain[0], y < thresholds.length ? thresholds[y] : domain[domain.length - 1] ]; + }; + scale.copy = function() { + return d3_scale_quantile(domain, range); + }; + return rescale(); + } + d3.scale.quantize = function() { + return d3_scale_quantize(0, 1, [ 0, 1 ]); + }; + function d3_scale_quantize(x0, x1, range) { + var kx, i; + function scale(x) { + return range[Math.max(0, Math.min(i, Math.floor(kx * (x - x0))))]; + } + function rescale() { + kx = range.length / (x1 - x0); + i = range.length - 1; + return scale; + } + scale.domain = function(x) { + if (!arguments.length) return [ x0, x1 ]; + x0 = +x[0]; + x1 = +x[x.length - 1]; + return rescale(); + }; + scale.range = function(x) { + if (!arguments.length) return range; + range = x; + return rescale(); + }; + scale.invertExtent = function(y) { + y = range.indexOf(y); + y = y < 0 ? NaN : y / kx + x0; + return [ y, y + 1 / kx ]; + }; + scale.copy = function() { + return d3_scale_quantize(x0, x1, range); + }; + return rescale(); + } + d3.scale.threshold = function() { + return d3_scale_threshold([ .5 ], [ 0, 1 ]); + }; + function d3_scale_threshold(domain, range) { + function scale(x) { + if (x <= x) return range[d3.bisect(domain, x)]; + } + scale.domain = function(_) { + if (!arguments.length) return domain; + domain = _; + return scale; + }; + scale.range = function(_) { + if (!arguments.length) return range; + range = _; + return scale; + }; + scale.invertExtent = function(y) { + y = range.indexOf(y); + return [ domain[y - 1], domain[y] ]; + }; + scale.copy = function() { + return d3_scale_threshold(domain, range); + }; + return scale; + } + d3.scale.identity = function() { + return d3_scale_identity([ 0, 1 ]); + }; + function d3_scale_identity(domain) { + function identity(x) { + return +x; + } + identity.invert = identity; + identity.domain = identity.range = function(x) { + if (!arguments.length) return domain; + domain = x.map(identity); + return identity; + }; + identity.ticks = function(m) { + return d3_scale_linearTicks(domain, m); + }; + identity.tickFormat = function(m, format) { + return d3_scale_linearTickFormat(domain, m, format); + }; + identity.copy = function() { + return d3_scale_identity(domain); + }; + return identity; + } + d3.svg = {}; + function d3_zero() { + return 0; + } + d3.svg.arc = function() { + var innerRadius = d3_svg_arcInnerRadius, outerRadius = d3_svg_arcOuterRadius, cornerRadius = d3_zero, padRadius = d3_svg_arcAuto, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle, padAngle = d3_svg_arcPadAngle; + function arc() { + var r0 = Math.max(0, +innerRadius.apply(this, arguments)), r1 = Math.max(0, +outerRadius.apply(this, arguments)), a0 = startAngle.apply(this, arguments) - halfÏ€, a1 = endAngle.apply(this, arguments) - halfÏ€, da = Math.abs(a1 - a0), cw = a0 > a1 ? 0 : 1; + if (r1 < r0) rc = r1, r1 = r0, r0 = rc; + if (da >= τε) return circleSegment(r1, cw) + (r0 ? circleSegment(r0, 1 - cw) : "") + "Z"; + var rc, cr, rp, ap, p0 = 0, p1 = 0, x0, y0, x1, y1, x2, y2, x3, y3, path = []; + if (ap = (+padAngle.apply(this, arguments) || 0) / 2) { + rp = padRadius === d3_svg_arcAuto ? Math.sqrt(r0 * r0 + r1 * r1) : +padRadius.apply(this, arguments); + if (!cw) p1 *= -1; + if (r1) p1 = d3_asin(rp / r1 * Math.sin(ap)); + if (r0) p0 = d3_asin(rp / r0 * Math.sin(ap)); + } + if (r1) { + x0 = r1 * Math.cos(a0 + p1); + y0 = r1 * Math.sin(a0 + p1); + x1 = r1 * Math.cos(a1 - p1); + y1 = r1 * Math.sin(a1 - p1); + var l1 = Math.abs(a1 - a0 - 2 * p1) <= Ï€ ? 0 : 1; + if (p1 && d3_svg_arcSweep(x0, y0, x1, y1) === cw ^ l1) { + var h1 = (a0 + a1) / 2; + x0 = r1 * Math.cos(h1); + y0 = r1 * Math.sin(h1); + x1 = y1 = null; + } + } else { + x0 = y0 = 0; + } + if (r0) { + x2 = r0 * Math.cos(a1 - p0); + y2 = r0 * Math.sin(a1 - p0); + x3 = r0 * Math.cos(a0 + p0); + y3 = r0 * Math.sin(a0 + p0); + var l0 = Math.abs(a0 - a1 + 2 * p0) <= Ï€ ? 0 : 1; + if (p0 && d3_svg_arcSweep(x2, y2, x3, y3) === 1 - cw ^ l0) { + var h0 = (a0 + a1) / 2; + x2 = r0 * Math.cos(h0); + y2 = r0 * Math.sin(h0); + x3 = y3 = null; + } + } else { + x2 = y2 = 0; + } + if (da > ε && (rc = Math.min(Math.abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments))) > .001) { + cr = r0 < r1 ^ cw ? 0 : 1; + var rc1 = rc, rc0 = rc; + if (da < Ï€) { + var oc = x3 == null ? [ x2, y2 ] : x1 == null ? [ x0, y0 ] : d3_geom_polygonIntersect([ x0, y0 ], [ x3, y3 ], [ x1, y1 ], [ x2, y2 ]), ax = x0 - oc[0], ay = y0 - oc[1], bx = x1 - oc[0], by = y1 - oc[1], kc = 1 / Math.sin(Math.acos((ax * bx + ay * by) / (Math.sqrt(ax * ax + ay * ay) * Math.sqrt(bx * bx + by * by))) / 2), lc = Math.sqrt(oc[0] * oc[0] + oc[1] * oc[1]); + rc0 = Math.min(rc, (r0 - lc) / (kc - 1)); + rc1 = Math.min(rc, (r1 - lc) / (kc + 1)); + } + if (x1 != null) { + var t30 = d3_svg_arcCornerTangents(x3 == null ? [ x2, y2 ] : [ x3, y3 ], [ x0, y0 ], r1, rc1, cw), t12 = d3_svg_arcCornerTangents([ x1, y1 ], [ x2, y2 ], r1, rc1, cw); + if (rc === rc1) { + path.push("M", t30[0], "A", rc1, ",", rc1, " 0 0,", cr, " ", t30[1], "A", r1, ",", r1, " 0 ", 1 - cw ^ d3_svg_arcSweep(t30[1][0], t30[1][1], t12[1][0], t12[1][1]), ",", cw, " ", t12[1], "A", rc1, ",", rc1, " 0 0,", cr, " ", t12[0]); + } else { + path.push("M", t30[0], "A", rc1, ",", rc1, " 0 1,", cr, " ", t12[0]); + } + } else { + path.push("M", x0, ",", y0); + } + if (x3 != null) { + var t03 = d3_svg_arcCornerTangents([ x0, y0 ], [ x3, y3 ], r0, -rc0, cw), t21 = d3_svg_arcCornerTangents([ x2, y2 ], x1 == null ? [ x0, y0 ] : [ x1, y1 ], r0, -rc0, cw); + if (rc === rc0) { + path.push("L", t21[0], "A", rc0, ",", rc0, " 0 0,", cr, " ", t21[1], "A", r0, ",", r0, " 0 ", cw ^ d3_svg_arcSweep(t21[1][0], t21[1][1], t03[1][0], t03[1][1]), ",", 1 - cw, " ", t03[1], "A", rc0, ",", rc0, " 0 0,", cr, " ", t03[0]); + } else { + path.push("L", t21[0], "A", rc0, ",", rc0, " 0 0,", cr, " ", t03[0]); + } + } else { + path.push("L", x2, ",", y2); + } + } else { + path.push("M", x0, ",", y0); + if (x1 != null) path.push("A", r1, ",", r1, " 0 ", l1, ",", cw, " ", x1, ",", y1); + path.push("L", x2, ",", y2); + if (x3 != null) path.push("A", r0, ",", r0, " 0 ", l0, ",", 1 - cw, " ", x3, ",", y3); + } + path.push("Z"); + return path.join(""); + } + function circleSegment(r1, cw) { + return "M0," + r1 + "A" + r1 + "," + r1 + " 0 1," + cw + " 0," + -r1 + "A" + r1 + "," + r1 + " 0 1," + cw + " 0," + r1; + } + arc.innerRadius = function(v) { + if (!arguments.length) return innerRadius; + innerRadius = d3_functor(v); + return arc; + }; + arc.outerRadius = function(v) { + if (!arguments.length) return outerRadius; + outerRadius = d3_functor(v); + return arc; + }; + arc.cornerRadius = function(v) { + if (!arguments.length) return cornerRadius; + cornerRadius = d3_functor(v); + return arc; + }; + arc.padRadius = function(v) { + if (!arguments.length) return padRadius; + padRadius = v == d3_svg_arcAuto ? d3_svg_arcAuto : d3_functor(v); + return arc; + }; + arc.startAngle = function(v) { + if (!arguments.length) return startAngle; + startAngle = d3_functor(v); + return arc; + }; + arc.endAngle = function(v) { + if (!arguments.length) return endAngle; + endAngle = d3_functor(v); + return arc; + }; + arc.padAngle = function(v) { + if (!arguments.length) return padAngle; + padAngle = d3_functor(v); + return arc; + }; + arc.centroid = function() { + var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2, a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - halfÏ€; + return [ Math.cos(a) * r, Math.sin(a) * r ]; + }; + return arc; + }; + var d3_svg_arcAuto = "auto"; + function d3_svg_arcInnerRadius(d) { + return d.innerRadius; + } + function d3_svg_arcOuterRadius(d) { + return d.outerRadius; + } + function d3_svg_arcStartAngle(d) { + return d.startAngle; + } + function d3_svg_arcEndAngle(d) { + return d.endAngle; + } + function d3_svg_arcPadAngle(d) { + return d && d.padAngle; + } + function d3_svg_arcSweep(x0, y0, x1, y1) { + return (x0 - x1) * y0 - (y0 - y1) * x0 > 0 ? 0 : 1; + } + function d3_svg_arcCornerTangents(p0, p1, r1, rc, cw) { + var x01 = p0[0] - p1[0], y01 = p0[1] - p1[1], lo = (cw ? rc : -rc) / Math.sqrt(x01 * x01 + y01 * y01), ox = lo * y01, oy = -lo * x01, x1 = p0[0] + ox, y1 = p0[1] + oy, x2 = p1[0] + ox, y2 = p1[1] + oy, x3 = (x1 + x2) / 2, y3 = (y1 + y2) / 2, dx = x2 - x1, dy = y2 - y1, d2 = dx * dx + dy * dy, r = r1 - rc, D = x1 * y2 - x2 * y1, d = (dy < 0 ? -1 : 1) * Math.sqrt(Math.max(0, r * r * d2 - D * D)), cx0 = (D * dy - dx * d) / d2, cy0 = (-D * dx - dy * d) / d2, cx1 = (D * dy + dx * d) / d2, cy1 = (-D * dx + dy * d) / d2, dx0 = cx0 - x3, dy0 = cy0 - y3, dx1 = cx1 - x3, dy1 = cy1 - y3; + if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1; + return [ [ cx0 - ox, cy0 - oy ], [ cx0 * r1 / r, cy0 * r1 / r ] ]; + } + function d3_svg_line(projection) { + var x = d3_geom_pointX, y = d3_geom_pointY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, tension = .7; + function line(data) { + var segments = [], points = [], i = -1, n = data.length, d, fx = d3_functor(x), fy = d3_functor(y); + function segment() { + segments.push("M", interpolate(projection(points), tension)); + } + while (++i < n) { + if (defined.call(this, d = data[i], i)) { + points.push([ +fx.call(this, d, i), +fy.call(this, d, i) ]); + } else if (points.length) { + segment(); + points = []; + } + } + if (points.length) segment(); + return segments.length ? segments.join("") : null; + } + line.x = function(_) { + if (!arguments.length) return x; + x = _; + return line; + }; + line.y = function(_) { + if (!arguments.length) return y; + y = _; + return line; + }; + line.defined = function(_) { + if (!arguments.length) return defined; + defined = _; + return line; + }; + line.interpolate = function(_) { + if (!arguments.length) return interpolateKey; + if (typeof _ === "function") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key; + return line; + }; + line.tension = function(_) { + if (!arguments.length) return tension; + tension = _; + return line; + }; + return line; + } + d3.svg.line = function() { + return d3_svg_line(d3_identity); + }; + var d3_svg_lineInterpolators = d3.map({ + linear: d3_svg_lineLinear, + "linear-closed": d3_svg_lineLinearClosed, + step: d3_svg_lineStep, + "step-before": d3_svg_lineStepBefore, + "step-after": d3_svg_lineStepAfter, + basis: d3_svg_lineBasis, + "basis-open": d3_svg_lineBasisOpen, + "basis-closed": d3_svg_lineBasisClosed, + bundle: d3_svg_lineBundle, + cardinal: d3_svg_lineCardinal, + "cardinal-open": d3_svg_lineCardinalOpen, + "cardinal-closed": d3_svg_lineCardinalClosed, + monotone: d3_svg_lineMonotone + }); + d3_svg_lineInterpolators.forEach(function(key, value) { + value.key = key; + value.closed = /-closed$/.test(key); + }); + function d3_svg_lineLinear(points) { + return points.length > 1 ? points.join("L") : points + "Z"; + } + function d3_svg_lineLinearClosed(points) { + return points.join("L") + "Z"; + } + function d3_svg_lineStep(points) { + var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ]; + while (++i < n) path.push("H", (p[0] + (p = points[i])[0]) / 2, "V", p[1]); + if (n > 1) path.push("H", p[0]); + return path.join(""); + } + function d3_svg_lineStepBefore(points) { + var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ]; + while (++i < n) path.push("V", (p = points[i])[1], "H", p[0]); + return path.join(""); + } + function d3_svg_lineStepAfter(points) { + var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ]; + while (++i < n) path.push("H", (p = points[i])[0], "V", p[1]); + return path.join(""); + } + function d3_svg_lineCardinalOpen(points, tension) { + return points.length < 4 ? d3_svg_lineLinear(points) : points[1] + d3_svg_lineHermite(points.slice(1, -1), d3_svg_lineCardinalTangents(points, tension)); + } + function d3_svg_lineCardinalClosed(points, tension) { + return points.length < 3 ? d3_svg_lineLinearClosed(points) : points[0] + d3_svg_lineHermite((points.push(points[0]), + points), d3_svg_lineCardinalTangents([ points[points.length - 2] ].concat(points, [ points[1] ]), tension)); + } + function d3_svg_lineCardinal(points, tension) { + return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite(points, d3_svg_lineCardinalTangents(points, tension)); + } + function d3_svg_lineHermite(points, tangents) { + if (tangents.length < 1 || points.length != tangents.length && points.length != tangents.length + 2) { + return d3_svg_lineLinear(points); + } + var quad = points.length != tangents.length, path = "", p0 = points[0], p = points[1], t0 = tangents[0], t = t0, pi = 1; + if (quad) { + path += "Q" + (p[0] - t0[0] * 2 / 3) + "," + (p[1] - t0[1] * 2 / 3) + "," + p[0] + "," + p[1]; + p0 = points[1]; + pi = 2; + } + if (tangents.length > 1) { + t = tangents[1]; + p = points[pi]; + pi++; + path += "C" + (p0[0] + t0[0]) + "," + (p0[1] + t0[1]) + "," + (p[0] - t[0]) + "," + (p[1] - t[1]) + "," + p[0] + "," + p[1]; + for (var i = 2; i < tangents.length; i++, pi++) { + p = points[pi]; + t = tangents[i]; + path += "S" + (p[0] - t[0]) + "," + (p[1] - t[1]) + "," + p[0] + "," + p[1]; + } + } + if (quad) { + var lp = points[pi]; + path += "Q" + (p[0] + t[0] * 2 / 3) + "," + (p[1] + t[1] * 2 / 3) + "," + lp[0] + "," + lp[1]; + } + return path; + } + function d3_svg_lineCardinalTangents(points, tension) { + var tangents = [], a = (1 - tension) / 2, p0, p1 = points[0], p2 = points[1], i = 1, n = points.length; + while (++i < n) { + p0 = p1; + p1 = p2; + p2 = points[i]; + tangents.push([ a * (p2[0] - p0[0]), a * (p2[1] - p0[1]) ]); + } + return tangents; + } + function d3_svg_lineBasis(points) { + if (points.length < 3) return d3_svg_lineLinear(points); + var i = 1, n = points.length, pi = points[0], x0 = pi[0], y0 = pi[1], px = [ x0, x0, x0, (pi = points[1])[0] ], py = [ y0, y0, y0, pi[1] ], path = [ x0, ",", y0, "L", d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, py) ]; + points.push(points[n - 1]); + while (++i <= n) { + pi = points[i]; + px.shift(); + px.push(pi[0]); + py.shift(); + py.push(pi[1]); + d3_svg_lineBasisBezier(path, px, py); + } + points.pop(); + path.push("L", pi); + return path.join(""); + } + function d3_svg_lineBasisOpen(points) { + if (points.length < 4) return d3_svg_lineLinear(points); + var path = [], i = -1, n = points.length, pi, px = [ 0 ], py = [ 0 ]; + while (++i < 3) { + pi = points[i]; + px.push(pi[0]); + py.push(pi[1]); + } + path.push(d3_svg_lineDot4(d3_svg_lineBasisBezier3, px) + "," + d3_svg_lineDot4(d3_svg_lineBasisBezier3, py)); + --i; + while (++i < n) { + pi = points[i]; + px.shift(); + px.push(pi[0]); + py.shift(); + py.push(pi[1]); + d3_svg_lineBasisBezier(path, px, py); + } + return path.join(""); + } + function d3_svg_lineBasisClosed(points) { + var path, i = -1, n = points.length, m = n + 4, pi, px = [], py = []; + while (++i < 4) { + pi = points[i % n]; + px.push(pi[0]); + py.push(pi[1]); + } + path = [ d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, py) ]; + --i; + while (++i < m) { + pi = points[i % n]; + px.shift(); + px.push(pi[0]); + py.shift(); + py.push(pi[1]); + d3_svg_lineBasisBezier(path, px, py); + } + return path.join(""); + } + function d3_svg_lineBundle(points, tension) { + var n = points.length - 1; + if (n) { + var x0 = points[0][0], y0 = points[0][1], dx = points[n][0] - x0, dy = points[n][1] - y0, i = -1, p, t; + while (++i <= n) { + p = points[i]; + t = i / n; + p[0] = tension * p[0] + (1 - tension) * (x0 + t * dx); + p[1] = tension * p[1] + (1 - tension) * (y0 + t * dy); + } + } + return d3_svg_lineBasis(points); + } + function d3_svg_lineDot4(a, b) { + return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3]; + } + var d3_svg_lineBasisBezier1 = [ 0, 2 / 3, 1 / 3, 0 ], d3_svg_lineBasisBezier2 = [ 0, 1 / 3, 2 / 3, 0 ], d3_svg_lineBasisBezier3 = [ 0, 1 / 6, 2 / 3, 1 / 6 ]; + function d3_svg_lineBasisBezier(path, x, y) { + path.push("C", d3_svg_lineDot4(d3_svg_lineBasisBezier1, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier1, y), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, y), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, y)); + } + function d3_svg_lineSlope(p0, p1) { + return (p1[1] - p0[1]) / (p1[0] - p0[0]); + } + function d3_svg_lineFiniteDifferences(points) { + var i = 0, j = points.length - 1, m = [], p0 = points[0], p1 = points[1], d = m[0] = d3_svg_lineSlope(p0, p1); + while (++i < j) { + m[i] = (d + (d = d3_svg_lineSlope(p0 = p1, p1 = points[i + 1]))) / 2; + } + m[i] = d; + return m; + } + function d3_svg_lineMonotoneTangents(points) { + var tangents = [], d, a, b, s, m = d3_svg_lineFiniteDifferences(points), i = -1, j = points.length - 1; + while (++i < j) { + d = d3_svg_lineSlope(points[i], points[i + 1]); + if (abs(d) < ε) { + m[i] = m[i + 1] = 0; + } else { + a = m[i] / d; + b = m[i + 1] / d; + s = a * a + b * b; + if (s > 9) { + s = d * 3 / Math.sqrt(s); + m[i] = s * a; + m[i + 1] = s * b; + } + } + } + i = -1; + while (++i <= j) { + s = (points[Math.min(j, i + 1)][0] - points[Math.max(0, i - 1)][0]) / (6 * (1 + m[i] * m[i])); + tangents.push([ s || 0, m[i] * s || 0 ]); + } + return tangents; + } + function d3_svg_lineMonotone(points) { + return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite(points, d3_svg_lineMonotoneTangents(points)); + } + d3.svg.line.radial = function() { + var line = d3_svg_line(d3_svg_lineRadial); + line.radius = line.x, delete line.x; + line.angle = line.y, delete line.y; + return line; + }; + function d3_svg_lineRadial(points) { + var point, i = -1, n = points.length, r, a; + while (++i < n) { + point = points[i]; + r = point[0]; + a = point[1] - halfÏ€; + point[0] = r * Math.cos(a); + point[1] = r * Math.sin(a); + } + return points; + } + function d3_svg_area(projection) { + var x0 = d3_geom_pointX, x1 = d3_geom_pointX, y0 = 0, y1 = d3_geom_pointY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, interpolateReverse = interpolate, L = "L", tension = .7; + function area(data) { + var segments = [], points0 = [], points1 = [], i = -1, n = data.length, d, fx0 = d3_functor(x0), fy0 = d3_functor(y0), fx1 = x0 === x1 ? function() { + return x; + } : d3_functor(x1), fy1 = y0 === y1 ? function() { + return y; + } : d3_functor(y1), x, y; + function segment() { + segments.push("M", interpolate(projection(points1), tension), L, interpolateReverse(projection(points0.reverse()), tension), "Z"); + } + while (++i < n) { + if (defined.call(this, d = data[i], i)) { + points0.push([ x = +fx0.call(this, d, i), y = +fy0.call(this, d, i) ]); + points1.push([ +fx1.call(this, d, i), +fy1.call(this, d, i) ]); + } else if (points0.length) { + segment(); + points0 = []; + points1 = []; + } + } + if (points0.length) segment(); + return segments.length ? segments.join("") : null; + } + area.x = function(_) { + if (!arguments.length) return x1; + x0 = x1 = _; + return area; + }; + area.x0 = function(_) { + if (!arguments.length) return x0; + x0 = _; + return area; + }; + area.x1 = function(_) { + if (!arguments.length) return x1; + x1 = _; + return area; + }; + area.y = function(_) { + if (!arguments.length) return y1; + y0 = y1 = _; + return area; + }; + area.y0 = function(_) { + if (!arguments.length) return y0; + y0 = _; + return area; + }; + area.y1 = function(_) { + if (!arguments.length) return y1; + y1 = _; + return area; + }; + area.defined = function(_) { + if (!arguments.length) return defined; + defined = _; + return area; + }; + area.interpolate = function(_) { + if (!arguments.length) return interpolateKey; + if (typeof _ === "function") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key; + interpolateReverse = interpolate.reverse || interpolate; + L = interpolate.closed ? "M" : "L"; + return area; + }; + area.tension = function(_) { + if (!arguments.length) return tension; + tension = _; + return area; + }; + return area; + } + d3_svg_lineStepBefore.reverse = d3_svg_lineStepAfter; + d3_svg_lineStepAfter.reverse = d3_svg_lineStepBefore; + d3.svg.area = function() { + return d3_svg_area(d3_identity); + }; + d3.svg.area.radial = function() { + var area = d3_svg_area(d3_svg_lineRadial); + area.radius = area.x, delete area.x; + area.innerRadius = area.x0, delete area.x0; + area.outerRadius = area.x1, delete area.x1; + area.angle = area.y, delete area.y; + area.startAngle = area.y0, delete area.y0; + area.endAngle = area.y1, delete area.y1; + return area; + }; + d3.svg.chord = function() { + var source = d3_source, target = d3_target, radius = d3_svg_chordRadius, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle; + function chord(d, i) { + var s = subgroup(this, source, d, i), t = subgroup(this, target, d, i); + return "M" + s.p0 + arc(s.r, s.p1, s.a1 - s.a0) + (equals(s, t) ? curve(s.r, s.p1, s.r, s.p0) : curve(s.r, s.p1, t.r, t.p0) + arc(t.r, t.p1, t.a1 - t.a0) + curve(t.r, t.p1, s.r, s.p0)) + "Z"; + } + function subgroup(self, f, d, i) { + var subgroup = f.call(self, d, i), r = radius.call(self, subgroup, i), a0 = startAngle.call(self, subgroup, i) - halfÏ€, a1 = endAngle.call(self, subgroup, i) - halfÏ€; + return { + r: r, + a0: a0, + a1: a1, + p0: [ r * Math.cos(a0), r * Math.sin(a0) ], + p1: [ r * Math.cos(a1), r * Math.sin(a1) ] + }; + } + function equals(a, b) { + return a.a0 == b.a0 && a.a1 == b.a1; + } + function arc(r, p, a) { + return "A" + r + "," + r + " 0 " + +(a > Ï€) + ",1 " + p; + } + function curve(r0, p0, r1, p1) { + return "Q 0,0 " + p1; + } + chord.radius = function(v) { + if (!arguments.length) return radius; + radius = d3_functor(v); + return chord; + }; + chord.source = function(v) { + if (!arguments.length) return source; + source = d3_functor(v); + return chord; + }; + chord.target = function(v) { + if (!arguments.length) return target; + target = d3_functor(v); + return chord; + }; + chord.startAngle = function(v) { + if (!arguments.length) return startAngle; + startAngle = d3_functor(v); + return chord; + }; + chord.endAngle = function(v) { + if (!arguments.length) return endAngle; + endAngle = d3_functor(v); + return chord; + }; + return chord; + }; + function d3_svg_chordRadius(d) { + return d.radius; + } + d3.svg.diagonal = function() { + var source = d3_source, target = d3_target, projection = d3_svg_diagonalProjection; + function diagonal(d, i) { + var p0 = source.call(this, d, i), p3 = target.call(this, d, i), m = (p0.y + p3.y) / 2, p = [ p0, { + x: p0.x, + y: m + }, { + x: p3.x, + y: m + }, p3 ]; + p = p.map(projection); + return "M" + p[0] + "C" + p[1] + " " + p[2] + " " + p[3]; + } + diagonal.source = function(x) { + if (!arguments.length) return source; + source = d3_functor(x); + return diagonal; + }; + diagonal.target = function(x) { + if (!arguments.length) return target; + target = d3_functor(x); + return diagonal; + }; + diagonal.projection = function(x) { + if (!arguments.length) return projection; + projection = x; + return diagonal; + }; + return diagonal; + }; + function d3_svg_diagonalProjection(d) { + return [ d.x, d.y ]; + } + d3.svg.diagonal.radial = function() { + var diagonal = d3.svg.diagonal(), projection = d3_svg_diagonalProjection, projection_ = diagonal.projection; + diagonal.projection = function(x) { + return arguments.length ? projection_(d3_svg_diagonalRadialProjection(projection = x)) : projection; + }; + return diagonal; + }; + function d3_svg_diagonalRadialProjection(projection) { + return function() { + var d = projection.apply(this, arguments), r = d[0], a = d[1] - halfÏ€; + return [ r * Math.cos(a), r * Math.sin(a) ]; + }; + } + d3.svg.symbol = function() { + var type = d3_svg_symbolType, size = d3_svg_symbolSize; + function symbol(d, i) { + return (d3_svg_symbols.get(type.call(this, d, i)) || d3_svg_symbolCircle)(size.call(this, d, i)); + } + symbol.type = function(x) { + if (!arguments.length) return type; + type = d3_functor(x); + return symbol; + }; + symbol.size = function(x) { + if (!arguments.length) return size; + size = d3_functor(x); + return symbol; + }; + return symbol; + }; + function d3_svg_symbolSize() { + return 64; + } + function d3_svg_symbolType() { + return "circle"; + } + function d3_svg_symbolCircle(size) { + var r = Math.sqrt(size / Ï€); + return "M0," + r + "A" + r + "," + r + " 0 1,1 0," + -r + "A" + r + "," + r + " 0 1,1 0," + r + "Z"; + } + var d3_svg_symbols = d3.map({ + circle: d3_svg_symbolCircle, + cross: function(size) { + var r = Math.sqrt(size / 5) / 2; + return "M" + -3 * r + "," + -r + "H" + -r + "V" + -3 * r + "H" + r + "V" + -r + "H" + 3 * r + "V" + r + "H" + r + "V" + 3 * r + "H" + -r + "V" + r + "H" + -3 * r + "Z"; + }, + diamond: function(size) { + var ry = Math.sqrt(size / (2 * d3_svg_symbolTan30)), rx = ry * d3_svg_symbolTan30; + return "M0," + -ry + "L" + rx + ",0" + " 0," + ry + " " + -rx + ",0" + "Z"; + }, + square: function(size) { + var r = Math.sqrt(size) / 2; + return "M" + -r + "," + -r + "L" + r + "," + -r + " " + r + "," + r + " " + -r + "," + r + "Z"; + }, + "triangle-down": function(size) { + var rx = Math.sqrt(size / d3_svg_symbolSqrt3), ry = rx * d3_svg_symbolSqrt3 / 2; + return "M0," + ry + "L" + rx + "," + -ry + " " + -rx + "," + -ry + "Z"; + }, + "triangle-up": function(size) { + var rx = Math.sqrt(size / d3_svg_symbolSqrt3), ry = rx * d3_svg_symbolSqrt3 / 2; + return "M0," + -ry + "L" + rx + "," + ry + " " + -rx + "," + ry + "Z"; + } + }); + d3.svg.symbolTypes = d3_svg_symbols.keys(); + var d3_svg_symbolSqrt3 = Math.sqrt(3), d3_svg_symbolTan30 = Math.tan(30 * d3_radians); + d3_selectionPrototype.transition = function(name) { + var id = d3_transitionInheritId || ++d3_transitionId, ns = d3_transitionNamespace(name), subgroups = [], subgroup, node, transition = d3_transitionInherit || { + time: Date.now(), + ease: d3_ease_cubicInOut, + delay: 0, + duration: 250 + }; + for (var j = -1, m = this.length; ++j < m; ) { + subgroups.push(subgroup = []); + for (var group = this[j], i = -1, n = group.length; ++i < n; ) { + if (node = group[i]) d3_transitionNode(node, i, ns, id, transition); + subgroup.push(node); + } + } + return d3_transition(subgroups, ns, id); + }; + d3_selectionPrototype.interrupt = function(name) { + return this.each(name == null ? d3_selection_interrupt : d3_selection_interruptNS(d3_transitionNamespace(name))); + }; + var d3_selection_interrupt = d3_selection_interruptNS(d3_transitionNamespace()); + function d3_selection_interruptNS(ns) { + return function() { + var lock, activeId, active; + if ((lock = this[ns]) && (active = lock[activeId = lock.active])) { + active.timer.c = null; + active.timer.t = NaN; + if (--lock.count) delete lock[activeId]; else delete this[ns]; + lock.active += .5; + active.event && active.event.interrupt.call(this, this.__data__, active.index); + } + }; + } + function d3_transition(groups, ns, id) { + d3_subclass(groups, d3_transitionPrototype); + groups.namespace = ns; + groups.id = id; + return groups; + } + var d3_transitionPrototype = [], d3_transitionId = 0, d3_transitionInheritId, d3_transitionInherit; + d3_transitionPrototype.call = d3_selectionPrototype.call; + d3_transitionPrototype.empty = d3_selectionPrototype.empty; + d3_transitionPrototype.node = d3_selectionPrototype.node; + d3_transitionPrototype.size = d3_selectionPrototype.size; + d3.transition = function(selection, name) { + return selection && selection.transition ? d3_transitionInheritId ? selection.transition(name) : selection : d3.selection().transition(selection); + }; + d3.transition.prototype = d3_transitionPrototype; + d3_transitionPrototype.select = function(selector) { + var id = this.id, ns = this.namespace, subgroups = [], subgroup, subnode, node; + selector = d3_selection_selector(selector); + for (var j = -1, m = this.length; ++j < m; ) { + subgroups.push(subgroup = []); + for (var group = this[j], i = -1, n = group.length; ++i < n; ) { + if ((node = group[i]) && (subnode = selector.call(node, node.__data__, i, j))) { + if ("__data__" in node) subnode.__data__ = node.__data__; + d3_transitionNode(subnode, i, ns, id, node[ns][id]); + subgroup.push(subnode); + } else { + subgroup.push(null); + } + } + } + return d3_transition(subgroups, ns, id); + }; + d3_transitionPrototype.selectAll = function(selector) { + var id = this.id, ns = this.namespace, subgroups = [], subgroup, subnodes, node, subnode, transition; + selector = d3_selection_selectorAll(selector); + for (var j = -1, m = this.length; ++j < m; ) { + for (var group = this[j], i = -1, n = group.length; ++i < n; ) { + if (node = group[i]) { + transition = node[ns][id]; + subnodes = selector.call(node, node.__data__, i, j); + subgroups.push(subgroup = []); + for (var k = -1, o = subnodes.length; ++k < o; ) { + if (subnode = subnodes[k]) d3_transitionNode(subnode, k, ns, id, transition); + subgroup.push(subnode); + } + } + } + } + return d3_transition(subgroups, ns, id); + }; + d3_transitionPrototype.filter = function(filter) { + var subgroups = [], subgroup, group, node; + if (typeof filter !== "function") filter = d3_selection_filter(filter); + for (var j = 0, m = this.length; j < m; j++) { + subgroups.push(subgroup = []); + for (var group = this[j], i = 0, n = group.length; i < n; i++) { + if ((node = group[i]) && filter.call(node, node.__data__, i, j)) { + subgroup.push(node); + } + } + } + return d3_transition(subgroups, this.namespace, this.id); + }; + d3_transitionPrototype.tween = function(name, tween) { + var id = this.id, ns = this.namespace; + if (arguments.length < 2) return this.node()[ns][id].tween.get(name); + return d3_selection_each(this, tween == null ? function(node) { + node[ns][id].tween.remove(name); + } : function(node) { + node[ns][id].tween.set(name, tween); + }); + }; + function d3_transition_tween(groups, name, value, tween) { + var id = groups.id, ns = groups.namespace; + return d3_selection_each(groups, typeof value === "function" ? function(node, i, j) { + node[ns][id].tween.set(name, tween(value.call(node, node.__data__, i, j))); + } : (value = tween(value), function(node) { + node[ns][id].tween.set(name, value); + })); + } + d3_transitionPrototype.attr = function(nameNS, value) { + if (arguments.length < 2) { + for (value in nameNS) this.attr(value, nameNS[value]); + return this; + } + var interpolate = nameNS == "transform" ? d3_interpolateTransform : d3_interpolate, name = d3.ns.qualify(nameNS); + function attrNull() { + this.removeAttribute(name); + } + function attrNullNS() { + this.removeAttributeNS(name.space, name.local); + } + function attrTween(b) { + return b == null ? attrNull : (b += "", function() { + var a = this.getAttribute(name), i; + return a !== b && (i = interpolate(a, b), function(t) { + this.setAttribute(name, i(t)); + }); + }); + } + function attrTweenNS(b) { + return b == null ? attrNullNS : (b += "", function() { + var a = this.getAttributeNS(name.space, name.local), i; + return a !== b && (i = interpolate(a, b), function(t) { + this.setAttributeNS(name.space, name.local, i(t)); + }); + }); + } + return d3_transition_tween(this, "attr." + nameNS, value, name.local ? attrTweenNS : attrTween); + }; + d3_transitionPrototype.attrTween = function(nameNS, tween) { + var name = d3.ns.qualify(nameNS); + function attrTween(d, i) { + var f = tween.call(this, d, i, this.getAttribute(name)); + return f && function(t) { + this.setAttribute(name, f(t)); + }; + } + function attrTweenNS(d, i) { + var f = tween.call(this, d, i, this.getAttributeNS(name.space, name.local)); + return f && function(t) { + this.setAttributeNS(name.space, name.local, f(t)); + }; + } + return this.tween("attr." + nameNS, name.local ? attrTweenNS : attrTween); + }; + d3_transitionPrototype.style = function(name, value, priority) { + var n = arguments.length; + if (n < 3) { + if (typeof name !== "string") { + if (n < 2) value = ""; + for (priority in name) this.style(priority, name[priority], value); + return this; + } + priority = ""; + } + function styleNull() { + this.style.removeProperty(name); + } + function styleString(b) { + return b == null ? styleNull : (b += "", function() { + var a = d3_window(this).getComputedStyle(this, null).getPropertyValue(name), i; + return a !== b && (i = d3_interpolate(a, b), function(t) { + this.style.setProperty(name, i(t), priority); + }); + }); + } + return d3_transition_tween(this, "style." + name, value, styleString); + }; + d3_transitionPrototype.styleTween = function(name, tween, priority) { + if (arguments.length < 3) priority = ""; + function styleTween(d, i) { + var f = tween.call(this, d, i, d3_window(this).getComputedStyle(this, null).getPropertyValue(name)); + return f && function(t) { + this.style.setProperty(name, f(t), priority); + }; + } + return this.tween("style." + name, styleTween); + }; + d3_transitionPrototype.text = function(value) { + return d3_transition_tween(this, "text", value, d3_transition_text); + }; + function d3_transition_text(b) { + if (b == null) b = ""; + return function() { + this.textContent = b; + }; + } + d3_transitionPrototype.remove = function() { + var ns = this.namespace; + return this.each("end.transition", function() { + var p; + if (this[ns].count < 2 && (p = this.parentNode)) p.removeChild(this); + }); + }; + d3_transitionPrototype.ease = function(value) { + var id = this.id, ns = this.namespace; + if (arguments.length < 1) return this.node()[ns][id].ease; + if (typeof value !== "function") value = d3.ease.apply(d3, arguments); + return d3_selection_each(this, function(node) { + node[ns][id].ease = value; + }); + }; + d3_transitionPrototype.delay = function(value) { + var id = this.id, ns = this.namespace; + if (arguments.length < 1) return this.node()[ns][id].delay; + return d3_selection_each(this, typeof value === "function" ? function(node, i, j) { + node[ns][id].delay = +value.call(node, node.__data__, i, j); + } : (value = +value, function(node) { + node[ns][id].delay = value; + })); + }; + d3_transitionPrototype.duration = function(value) { + var id = this.id, ns = this.namespace; + if (arguments.length < 1) return this.node()[ns][id].duration; + return d3_selection_each(this, typeof value === "function" ? function(node, i, j) { + node[ns][id].duration = Math.max(1, value.call(node, node.__data__, i, j)); + } : (value = Math.max(1, value), function(node) { + node[ns][id].duration = value; + })); + }; + d3_transitionPrototype.each = function(type, listener) { + var id = this.id, ns = this.namespace; + if (arguments.length < 2) { + var inherit = d3_transitionInherit, inheritId = d3_transitionInheritId; + try { + d3_transitionInheritId = id; + d3_selection_each(this, function(node, i, j) { + d3_transitionInherit = node[ns][id]; + type.call(node, node.__data__, i, j); + }); + } finally { + d3_transitionInherit = inherit; + d3_transitionInheritId = inheritId; + } + } else { + d3_selection_each(this, function(node) { + var transition = node[ns][id]; + (transition.event || (transition.event = d3.dispatch("start", "end", "interrupt"))).on(type, listener); + }); + } + return this; + }; + d3_transitionPrototype.transition = function() { + var id0 = this.id, id1 = ++d3_transitionId, ns = this.namespace, subgroups = [], subgroup, group, node, transition; + for (var j = 0, m = this.length; j < m; j++) { + subgroups.push(subgroup = []); + for (var group = this[j], i = 0, n = group.length; i < n; i++) { + if (node = group[i]) { + transition = node[ns][id0]; + d3_transitionNode(node, i, ns, id1, { + time: transition.time, + ease: transition.ease, + delay: transition.delay + transition.duration, + duration: transition.duration + }); + } + subgroup.push(node); + } + } + return d3_transition(subgroups, ns, id1); + }; + function d3_transitionNamespace(name) { + return name == null ? "__transition__" : "__transition_" + name + "__"; + } + function d3_transitionNode(node, i, ns, id, inherit) { + var lock = node[ns] || (node[ns] = { + active: 0, + count: 0 + }), transition = lock[id], time, timer, duration, ease, tweens; + function schedule(elapsed) { + var delay = transition.delay; + timer.t = delay + time; + if (delay <= elapsed) return start(elapsed - delay); + timer.c = start; + } + function start(elapsed) { + var activeId = lock.active, active = lock[activeId]; + if (active) { + active.timer.c = null; + active.timer.t = NaN; + --lock.count; + delete lock[activeId]; + active.event && active.event.interrupt.call(node, node.__data__, active.index); + } + for (var cancelId in lock) { + if (+cancelId < id) { + var cancel = lock[cancelId]; + cancel.timer.c = null; + cancel.timer.t = NaN; + --lock.count; + delete lock[cancelId]; + } + } + timer.c = tick; + d3_timer(function() { + if (timer.c && tick(elapsed || 1)) { + timer.c = null; + timer.t = NaN; + } + return 1; + }, 0, time); + lock.active = id; + transition.event && transition.event.start.call(node, node.__data__, i); + tweens = []; + transition.tween.forEach(function(key, value) { + if (value = value.call(node, node.__data__, i)) { + tweens.push(value); + } + }); + ease = transition.ease; + duration = transition.duration; + } + function tick(elapsed) { + var t = elapsed / duration, e = ease(t), n = tweens.length; + while (n > 0) { + tweens[--n].call(node, e); + } + if (t >= 1) { + transition.event && transition.event.end.call(node, node.__data__, i); + if (--lock.count) delete lock[id]; else delete node[ns]; + return 1; + } + } + if (!transition) { + time = inherit.time; + timer = d3_timer(schedule, 0, time); + transition = lock[id] = { + tween: new d3_Map(), + time: time, + timer: timer, + delay: inherit.delay, + duration: inherit.duration, + ease: inherit.ease, + index: i + }; + inherit = null; + ++lock.count; + } + } + d3.svg.axis = function() { + var scale = d3.scale.linear(), orient = d3_svg_axisDefaultOrient, innerTickSize = 6, outerTickSize = 6, tickPadding = 3, tickArguments_ = [ 10 ], tickValues = null, tickFormat_; + function axis(g) { + g.each(function() { + var g = d3.select(this); + var scale0 = this.__chart__ || scale, scale1 = this.__chart__ = scale.copy(); + var ticks = tickValues == null ? scale1.ticks ? scale1.ticks.apply(scale1, tickArguments_) : scale1.domain() : tickValues, tickFormat = tickFormat_ == null ? scale1.tickFormat ? scale1.tickFormat.apply(scale1, tickArguments_) : d3_identity : tickFormat_, tick = g.selectAll(".tick").data(ticks, scale1), tickEnter = tick.enter().insert("g", ".domain").attr("class", "tick").style("opacity", ε), tickExit = d3.transition(tick.exit()).style("opacity", ε).remove(), tickUpdate = d3.transition(tick.order()).style("opacity", 1), tickSpacing = Math.max(innerTickSize, 0) + tickPadding, tickTransform; + var range = d3_scaleRange(scale1), path = g.selectAll(".domain").data([ 0 ]), pathUpdate = (path.enter().append("path").attr("class", "domain"), + d3.transition(path)); + tickEnter.append("line"); + tickEnter.append("text"); + var lineEnter = tickEnter.select("line"), lineUpdate = tickUpdate.select("line"), text = tick.select("text").text(tickFormat), textEnter = tickEnter.select("text"), textUpdate = tickUpdate.select("text"), sign = orient === "top" || orient === "left" ? -1 : 1, x1, x2, y1, y2; + if (orient === "bottom" || orient === "top") { + tickTransform = d3_svg_axisX, x1 = "x", y1 = "y", x2 = "x2", y2 = "y2"; + text.attr("dy", sign < 0 ? "0em" : ".71em").style("text-anchor", "middle"); + pathUpdate.attr("d", "M" + range[0] + "," + sign * outerTickSize + "V0H" + range[1] + "V" + sign * outerTickSize); + } else { + tickTransform = d3_svg_axisY, x1 = "y", y1 = "x", x2 = "y2", y2 = "x2"; + text.attr("dy", ".32em").style("text-anchor", sign < 0 ? "end" : "start"); + pathUpdate.attr("d", "M" + sign * outerTickSize + "," + range[0] + "H0V" + range[1] + "H" + sign * outerTickSize); + } + lineEnter.attr(y2, sign * innerTickSize); + textEnter.attr(y1, sign * tickSpacing); + lineUpdate.attr(x2, 0).attr(y2, sign * innerTickSize); + textUpdate.attr(x1, 0).attr(y1, sign * tickSpacing); + if (scale1.rangeBand) { + var x = scale1, dx = x.rangeBand() / 2; + scale0 = scale1 = function(d) { + return x(d) + dx; + }; + } else if (scale0.rangeBand) { + scale0 = scale1; + } else { + tickExit.call(tickTransform, scale1, scale0); + } + tickEnter.call(tickTransform, scale0, scale1); + tickUpdate.call(tickTransform, scale1, scale1); + }); + } + axis.scale = function(x) { + if (!arguments.length) return scale; + scale = x; + return axis; + }; + axis.orient = function(x) { + if (!arguments.length) return orient; + orient = x in d3_svg_axisOrients ? x + "" : d3_svg_axisDefaultOrient; + return axis; + }; + axis.ticks = function() { + if (!arguments.length) return tickArguments_; + tickArguments_ = d3_array(arguments); + return axis; + }; + axis.tickValues = function(x) { + if (!arguments.length) return tickValues; + tickValues = x; + return axis; + }; + axis.tickFormat = function(x) { + if (!arguments.length) return tickFormat_; + tickFormat_ = x; + return axis; + }; + axis.tickSize = function(x) { + var n = arguments.length; + if (!n) return innerTickSize; + innerTickSize = +x; + outerTickSize = +arguments[n - 1]; + return axis; + }; + axis.innerTickSize = function(x) { + if (!arguments.length) return innerTickSize; + innerTickSize = +x; + return axis; + }; + axis.outerTickSize = function(x) { + if (!arguments.length) return outerTickSize; + outerTickSize = +x; + return axis; + }; + axis.tickPadding = function(x) { + if (!arguments.length) return tickPadding; + tickPadding = +x; + return axis; + }; + axis.tickSubdivide = function() { + return arguments.length && axis; + }; + return axis; + }; + var d3_svg_axisDefaultOrient = "bottom", d3_svg_axisOrients = { + top: 1, + right: 1, + bottom: 1, + left: 1 + }; + function d3_svg_axisX(selection, x0, x1) { + selection.attr("transform", function(d) { + var v0 = x0(d); + return "translate(" + (isFinite(v0) ? v0 : x1(d)) + ",0)"; + }); + } + function d3_svg_axisY(selection, y0, y1) { + selection.attr("transform", function(d) { + var v0 = y0(d); + return "translate(0," + (isFinite(v0) ? v0 : y1(d)) + ")"; + }); + } + d3.svg.brush = function() { + var event = d3_eventDispatch(brush, "brushstart", "brush", "brushend"), x = null, y = null, xExtent = [ 0, 0 ], yExtent = [ 0, 0 ], xExtentDomain, yExtentDomain, xClamp = true, yClamp = true, resizes = d3_svg_brushResizes[0]; + function brush(g) { + g.each(function() { + var g = d3.select(this).style("pointer-events", "all").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)").on("mousedown.brush", brushstart).on("touchstart.brush", brushstart); + var background = g.selectAll(".background").data([ 0 ]); + background.enter().append("rect").attr("class", "background").style("visibility", "hidden").style("cursor", "crosshair"); + g.selectAll(".extent").data([ 0 ]).enter().append("rect").attr("class", "extent").style("cursor", "move"); + var resize = g.selectAll(".resize").data(resizes, d3_identity); + resize.exit().remove(); + resize.enter().append("g").attr("class", function(d) { + return "resize " + d; + }).style("cursor", function(d) { + return d3_svg_brushCursor[d]; + }).append("rect").attr("x", function(d) { + return /[ew]$/.test(d) ? -3 : null; + }).attr("y", function(d) { + return /^[ns]/.test(d) ? -3 : null; + }).attr("width", 6).attr("height", 6).style("visibility", "hidden"); + resize.style("display", brush.empty() ? "none" : null); + var gUpdate = d3.transition(g), backgroundUpdate = d3.transition(background), range; + if (x) { + range = d3_scaleRange(x); + backgroundUpdate.attr("x", range[0]).attr("width", range[1] - range[0]); + redrawX(gUpdate); + } + if (y) { + range = d3_scaleRange(y); + backgroundUpdate.attr("y", range[0]).attr("height", range[1] - range[0]); + redrawY(gUpdate); + } + redraw(gUpdate); + }); + } + brush.event = function(g) { + g.each(function() { + var event_ = event.of(this, arguments), extent1 = { + x: xExtent, + y: yExtent, + i: xExtentDomain, + j: yExtentDomain + }, extent0 = this.__chart__ || extent1; + this.__chart__ = extent1; + if (d3_transitionInheritId) { + d3.select(this).transition().each("start.brush", function() { + xExtentDomain = extent0.i; + yExtentDomain = extent0.j; + xExtent = extent0.x; + yExtent = extent0.y; + event_({ + type: "brushstart" + }); + }).tween("brush:brush", function() { + var xi = d3_interpolateArray(xExtent, extent1.x), yi = d3_interpolateArray(yExtent, extent1.y); + xExtentDomain = yExtentDomain = null; + return function(t) { + xExtent = extent1.x = xi(t); + yExtent = extent1.y = yi(t); + event_({ + type: "brush", + mode: "resize" + }); + }; + }).each("end.brush", function() { + xExtentDomain = extent1.i; + yExtentDomain = extent1.j; + event_({ + type: "brush", + mode: "resize" + }); + event_({ + type: "brushend" + }); + }); + } else { + event_({ + type: "brushstart" + }); + event_({ + type: "brush", + mode: "resize" + }); + event_({ + type: "brushend" + }); + } + }); + }; + function redraw(g) { + g.selectAll(".resize").attr("transform", function(d) { + return "translate(" + xExtent[+/e$/.test(d)] + "," + yExtent[+/^s/.test(d)] + ")"; + }); + } + function redrawX(g) { + g.select(".extent").attr("x", xExtent[0]); + g.selectAll(".extent,.n>rect,.s>rect").attr("width", xExtent[1] - xExtent[0]); + } + function redrawY(g) { + g.select(".extent").attr("y", yExtent[0]); + g.selectAll(".extent,.e>rect,.w>rect").attr("height", yExtent[1] - yExtent[0]); + } + function brushstart() { + var target = this, eventTarget = d3.select(d3.event.target), event_ = event.of(target, arguments), g = d3.select(target), resizing = eventTarget.datum(), resizingX = !/^(n|s)$/.test(resizing) && x, resizingY = !/^(e|w)$/.test(resizing) && y, dragging = eventTarget.classed("extent"), dragRestore = d3_event_dragSuppress(target), center, origin = d3.mouse(target), offset; + var w = d3.select(d3_window(target)).on("keydown.brush", keydown).on("keyup.brush", keyup); + if (d3.event.changedTouches) { + w.on("touchmove.brush", brushmove).on("touchend.brush", brushend); + } else { + w.on("mousemove.brush", brushmove).on("mouseup.brush", brushend); + } + g.interrupt().selectAll("*").interrupt(); + if (dragging) { + origin[0] = xExtent[0] - origin[0]; + origin[1] = yExtent[0] - origin[1]; + } else if (resizing) { + var ex = +/w$/.test(resizing), ey = +/^n/.test(resizing); + offset = [ xExtent[1 - ex] - origin[0], yExtent[1 - ey] - origin[1] ]; + origin[0] = xExtent[ex]; + origin[1] = yExtent[ey]; + } else if (d3.event.altKey) center = origin.slice(); + g.style("pointer-events", "none").selectAll(".resize").style("display", null); + d3.select("body").style("cursor", eventTarget.style("cursor")); + event_({ + type: "brushstart" + }); + brushmove(); + function keydown() { + if (d3.event.keyCode == 32) { + if (!dragging) { + center = null; + origin[0] -= xExtent[1]; + origin[1] -= yExtent[1]; + dragging = 2; + } + d3_eventPreventDefault(); + } + } + function keyup() { + if (d3.event.keyCode == 32 && dragging == 2) { + origin[0] += xExtent[1]; + origin[1] += yExtent[1]; + dragging = 0; + d3_eventPreventDefault(); + } + } + function brushmove() { + var point = d3.mouse(target), moved = false; + if (offset) { + point[0] += offset[0]; + point[1] += offset[1]; + } + if (!dragging) { + if (d3.event.altKey) { + if (!center) center = [ (xExtent[0] + xExtent[1]) / 2, (yExtent[0] + yExtent[1]) / 2 ]; + origin[0] = xExtent[+(point[0] < center[0])]; + origin[1] = yExtent[+(point[1] < center[1])]; + } else center = null; + } + if (resizingX && move1(point, x, 0)) { + redrawX(g); + moved = true; + } + if (resizingY && move1(point, y, 1)) { + redrawY(g); + moved = true; + } + if (moved) { + redraw(g); + event_({ + type: "brush", + mode: dragging ? "move" : "resize" + }); + } + } + function move1(point, scale, i) { + var range = d3_scaleRange(scale), r0 = range[0], r1 = range[1], position = origin[i], extent = i ? yExtent : xExtent, size = extent[1] - extent[0], min, max; + if (dragging) { + r0 -= position; + r1 -= size + position; + } + min = (i ? yClamp : xClamp) ? Math.max(r0, Math.min(r1, point[i])) : point[i]; + if (dragging) { + max = (min += position) + size; + } else { + if (center) position = Math.max(r0, Math.min(r1, 2 * center[i] - min)); + if (position < min) { + max = min; + min = position; + } else { + max = position; + } + } + if (extent[0] != min || extent[1] != max) { + if (i) yExtentDomain = null; else xExtentDomain = null; + extent[0] = min; + extent[1] = max; + return true; + } + } + function brushend() { + brushmove(); + g.style("pointer-events", "all").selectAll(".resize").style("display", brush.empty() ? "none" : null); + d3.select("body").style("cursor", null); + w.on("mousemove.brush", null).on("mouseup.brush", null).on("touchmove.brush", null).on("touchend.brush", null).on("keydown.brush", null).on("keyup.brush", null); + dragRestore(); + event_({ + type: "brushend" + }); + } + } + brush.x = function(z) { + if (!arguments.length) return x; + x = z; + resizes = d3_svg_brushResizes[!x << 1 | !y]; + return brush; + }; + brush.y = function(z) { + if (!arguments.length) return y; + y = z; + resizes = d3_svg_brushResizes[!x << 1 | !y]; + return brush; + }; + brush.clamp = function(z) { + if (!arguments.length) return x && y ? [ xClamp, yClamp ] : x ? xClamp : y ? yClamp : null; + if (x && y) xClamp = !!z[0], yClamp = !!z[1]; else if (x) xClamp = !!z; else if (y) yClamp = !!z; + return brush; + }; + brush.extent = function(z) { + var x0, x1, y0, y1, t; + if (!arguments.length) { + if (x) { + if (xExtentDomain) { + x0 = xExtentDomain[0], x1 = xExtentDomain[1]; + } else { + x0 = xExtent[0], x1 = xExtent[1]; + if (x.invert) x0 = x.invert(x0), x1 = x.invert(x1); + if (x1 < x0) t = x0, x0 = x1, x1 = t; + } + } + if (y) { + if (yExtentDomain) { + y0 = yExtentDomain[0], y1 = yExtentDomain[1]; + } else { + y0 = yExtent[0], y1 = yExtent[1]; + if (y.invert) y0 = y.invert(y0), y1 = y.invert(y1); + if (y1 < y0) t = y0, y0 = y1, y1 = t; + } + } + return x && y ? [ [ x0, y0 ], [ x1, y1 ] ] : x ? [ x0, x1 ] : y && [ y0, y1 ]; + } + if (x) { + x0 = z[0], x1 = z[1]; + if (y) x0 = x0[0], x1 = x1[0]; + xExtentDomain = [ x0, x1 ]; + if (x.invert) x0 = x(x0), x1 = x(x1); + if (x1 < x0) t = x0, x0 = x1, x1 = t; + if (x0 != xExtent[0] || x1 != xExtent[1]) xExtent = [ x0, x1 ]; + } + if (y) { + y0 = z[0], y1 = z[1]; + if (x) y0 = y0[1], y1 = y1[1]; + yExtentDomain = [ y0, y1 ]; + if (y.invert) y0 = y(y0), y1 = y(y1); + if (y1 < y0) t = y0, y0 = y1, y1 = t; + if (y0 != yExtent[0] || y1 != yExtent[1]) yExtent = [ y0, y1 ]; + } + return brush; + }; + brush.clear = function() { + if (!brush.empty()) { + xExtent = [ 0, 0 ], yExtent = [ 0, 0 ]; + xExtentDomain = yExtentDomain = null; + } + return brush; + }; + brush.empty = function() { + return !!x && xExtent[0] == xExtent[1] || !!y && yExtent[0] == yExtent[1]; + }; + return d3.rebind(brush, event, "on"); + }; + var d3_svg_brushCursor = { + n: "ns-resize", + e: "ew-resize", + s: "ns-resize", + w: "ew-resize", + nw: "nwse-resize", + ne: "nesw-resize", + se: "nwse-resize", + sw: "nesw-resize" + }; + var d3_svg_brushResizes = [ [ "n", "e", "s", "w", "nw", "ne", "se", "sw" ], [ "e", "w" ], [ "n", "s" ], [] ]; + var d3_time_format = d3_time.format = d3_locale_enUS.timeFormat; + var d3_time_formatUtc = d3_time_format.utc; + var d3_time_formatIso = d3_time_formatUtc("%Y-%m-%dT%H:%M:%S.%LZ"); + d3_time_format.iso = Date.prototype.toISOString && +new Date("2000-01-01T00:00:00.000Z") ? d3_time_formatIsoNative : d3_time_formatIso; + function d3_time_formatIsoNative(date) { + return date.toISOString(); + } + d3_time_formatIsoNative.parse = function(string) { + var date = new Date(string); + return isNaN(date) ? null : date; + }; + d3_time_formatIsoNative.toString = d3_time_formatIso.toString; + d3_time.second = d3_time_interval(function(date) { + return new d3_date(Math.floor(date / 1e3) * 1e3); + }, function(date, offset) { + date.setTime(date.getTime() + Math.floor(offset) * 1e3); + }, function(date) { + return date.getSeconds(); + }); + d3_time.seconds = d3_time.second.range; + d3_time.seconds.utc = d3_time.second.utc.range; + d3_time.minute = d3_time_interval(function(date) { + return new d3_date(Math.floor(date / 6e4) * 6e4); + }, function(date, offset) { + date.setTime(date.getTime() + Math.floor(offset) * 6e4); + }, function(date) { + return date.getMinutes(); + }); + d3_time.minutes = d3_time.minute.range; + d3_time.minutes.utc = d3_time.minute.utc.range; + d3_time.hour = d3_time_interval(function(date) { + var timezone = date.getTimezoneOffset() / 60; + return new d3_date((Math.floor(date / 36e5 - timezone) + timezone) * 36e5); + }, function(date, offset) { + date.setTime(date.getTime() + Math.floor(offset) * 36e5); + }, function(date) { + return date.getHours(); + }); + d3_time.hours = d3_time.hour.range; + d3_time.hours.utc = d3_time.hour.utc.range; + d3_time.month = d3_time_interval(function(date) { + date = d3_time.day(date); + date.setDate(1); + return date; + }, function(date, offset) { + date.setMonth(date.getMonth() + offset); + }, function(date) { + return date.getMonth(); + }); + d3_time.months = d3_time.month.range; + d3_time.months.utc = d3_time.month.utc.range; + function d3_time_scale(linear, methods, format) { + function scale(x) { + return linear(x); + } + scale.invert = function(x) { + return d3_time_scaleDate(linear.invert(x)); + }; + scale.domain = function(x) { + if (!arguments.length) return linear.domain().map(d3_time_scaleDate); + linear.domain(x); + return scale; + }; + function tickMethod(extent, count) { + var span = extent[1] - extent[0], target = span / count, i = d3.bisect(d3_time_scaleSteps, target); + return i == d3_time_scaleSteps.length ? [ methods.year, d3_scale_linearTickRange(extent.map(function(d) { + return d / 31536e6; + }), count)[2] ] : !i ? [ d3_time_scaleMilliseconds, d3_scale_linearTickRange(extent, count)[2] ] : methods[target / d3_time_scaleSteps[i - 1] < d3_time_scaleSteps[i] / target ? i - 1 : i]; + } + scale.nice = function(interval, skip) { + var domain = scale.domain(), extent = d3_scaleExtent(domain), method = interval == null ? tickMethod(extent, 10) : typeof interval === "number" && tickMethod(extent, interval); + if (method) interval = method[0], skip = method[1]; + function skipped(date) { + return !isNaN(date) && !interval.range(date, d3_time_scaleDate(+date + 1), skip).length; + } + return scale.domain(d3_scale_nice(domain, skip > 1 ? { + floor: function(date) { + while (skipped(date = interval.floor(date))) date = d3_time_scaleDate(date - 1); + return date; + }, + ceil: function(date) { + while (skipped(date = interval.ceil(date))) date = d3_time_scaleDate(+date + 1); + return date; + } + } : interval)); + }; + scale.ticks = function(interval, skip) { + var extent = d3_scaleExtent(scale.domain()), method = interval == null ? tickMethod(extent, 10) : typeof interval === "number" ? tickMethod(extent, interval) : !interval.range && [ { + range: interval + }, skip ]; + if (method) interval = method[0], skip = method[1]; + return interval.range(extent[0], d3_time_scaleDate(+extent[1] + 1), skip < 1 ? 1 : skip); + }; + scale.tickFormat = function() { + return format; + }; + scale.copy = function() { + return d3_time_scale(linear.copy(), methods, format); + }; + return d3_scale_linearRebind(scale, linear); + } + function d3_time_scaleDate(t) { + return new Date(t); + } + var d3_time_scaleSteps = [ 1e3, 5e3, 15e3, 3e4, 6e4, 3e5, 9e5, 18e5, 36e5, 108e5, 216e5, 432e5, 864e5, 1728e5, 6048e5, 2592e6, 7776e6, 31536e6 ]; + var d3_time_scaleLocalMethods = [ [ d3_time.second, 1 ], [ d3_time.second, 5 ], [ d3_time.second, 15 ], [ d3_time.second, 30 ], [ d3_time.minute, 1 ], [ d3_time.minute, 5 ], [ d3_time.minute, 15 ], [ d3_time.minute, 30 ], [ d3_time.hour, 1 ], [ d3_time.hour, 3 ], [ d3_time.hour, 6 ], [ d3_time.hour, 12 ], [ d3_time.day, 1 ], [ d3_time.day, 2 ], [ d3_time.week, 1 ], [ d3_time.month, 1 ], [ d3_time.month, 3 ], [ d3_time.year, 1 ] ]; + var d3_time_scaleLocalFormat = d3_time_format.multi([ [ ".%L", function(d) { + return d.getMilliseconds(); + } ], [ ":%S", function(d) { + return d.getSeconds(); + } ], [ "%I:%M", function(d) { + return d.getMinutes(); + } ], [ "%I %p", function(d) { + return d.getHours(); + } ], [ "%a %d", function(d) { + return d.getDay() && d.getDate() != 1; + } ], [ "%b %d", function(d) { + return d.getDate() != 1; + } ], [ "%B", function(d) { + return d.getMonth(); + } ], [ "%Y", d3_true ] ]); + var d3_time_scaleMilliseconds = { + range: function(start, stop, step) { + return d3.range(Math.ceil(start / step) * step, +stop, step).map(d3_time_scaleDate); + }, + floor: d3_identity, + ceil: d3_identity + }; + d3_time_scaleLocalMethods.year = d3_time.year; + d3_time.scale = function() { + return d3_time_scale(d3.scale.linear(), d3_time_scaleLocalMethods, d3_time_scaleLocalFormat); + }; + var d3_time_scaleUtcMethods = d3_time_scaleLocalMethods.map(function(m) { + return [ m[0].utc, m[1] ]; + }); + var d3_time_scaleUtcFormat = d3_time_formatUtc.multi([ [ ".%L", function(d) { + return d.getUTCMilliseconds(); + } ], [ ":%S", function(d) { + return d.getUTCSeconds(); + } ], [ "%I:%M", function(d) { + return d.getUTCMinutes(); + } ], [ "%I %p", function(d) { + return d.getUTCHours(); + } ], [ "%a %d", function(d) { + return d.getUTCDay() && d.getUTCDate() != 1; + } ], [ "%b %d", function(d) { + return d.getUTCDate() != 1; + } ], [ "%B", function(d) { + return d.getUTCMonth(); + } ], [ "%Y", d3_true ] ]); + d3_time_scaleUtcMethods.year = d3_time.year.utc; + d3_time.scale.utc = function() { + return d3_time_scale(d3.scale.linear(), d3_time_scaleUtcMethods, d3_time_scaleUtcFormat); + }; + d3.text = d3_xhrType(function(request) { + return request.responseText; + }); + d3.json = function(url, callback) { + return d3_xhr(url, "application/json", d3_json, callback); + }; + function d3_json(request) { + return JSON.parse(request.responseText); + } + d3.html = function(url, callback) { + return d3_xhr(url, "text/html", d3_html, callback); + }; + function d3_html(request) { + var range = d3_document.createRange(); + range.selectNode(d3_document.body); + return range.createContextualFragment(request.responseText); + } + d3.xml = d3_xhrType(function(request) { + return request.responseXML; + }); + if (typeof define === "function" && define.amd) this.d3 = d3, define(d3); else if (typeof module === "object" && module.exports) module.exports = d3; else this.d3 = d3; +}(); \ No newline at end of file diff --git a/civicrm/bower_components/d3-3.5.x/d3.min.js b/civicrm/bower_components/d3-3.5.x/d3.min.js new file mode 100644 index 0000000000..166487309a --- /dev/null +++ b/civicrm/bower_components/d3-3.5.x/d3.min.js @@ -0,0 +1,5 @@ +!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function i(n){return!isNaN(n)}function u(n){return{left:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);i>r;){var u=r+i>>>1;n(t[u],e)<0?r=u+1:i=u}return r},right:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);i>r;){var u=r+i>>>1;n(t[u],e)>0?i=u:r=u+1}return r}}}function o(n){return n.length}function a(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function f(n){return(n+="")===bo||n[0]===_o?_o+n:n}function s(n){return(n+="")[0]===_o?n.slice(1):n}function h(n){return f(n)in this._}function p(n){return(n=f(n))in this._&&delete this._[n]}function g(){var n=[];for(var t in this._)n.push(s(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function y(){this._=Object.create(null)}function m(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=wo.length;r>e;++e){var i=wo[e]+t;if(i in n)return i}}function b(){}function _(){}function w(n){function t(){for(var t,r=e,i=-1,u=r.length;++i<u;)(t=r[i].on)&&t.apply(this,arguments);return n}var e=[],r=new c;return t.on=function(t,i){var u,o=r.get(t);return arguments.length<2?o&&o.on:(o&&(o.on=null,e=e.slice(0,u=e.indexOf(o)).concat(e.slice(u+1)),r.remove(t)),i&&e.push(r.set(t,{on:i})),n)},t}function S(){ao.event.preventDefault()}function k(){for(var n,t=ao.event;n=t.sourceEvent;)t=n;return t}function N(n){for(var t=new _,e=0,r=arguments.length;++e<r;)t[arguments[e]]=w(t);return t.of=function(e,r){return function(i){try{var u=i.sourceEvent=ao.event;i.target=n,ao.event=i,t[i.type].apply(e,r)}finally{ao.event=u}}},t}function E(n){return ko(n,Co),n}function A(n){return"function"==typeof n?n:function(){return No(n,this)}}function C(n){return"function"==typeof n?n:function(){return Eo(n,this)}}function z(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function i(){this.setAttribute(n,t)}function u(){this.setAttributeNS(n.space,n.local,t)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=ao.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?a:o:n.local?u:i}function L(n){return n.trim().replace(/\s+/g," ")}function q(n){return new RegExp("(?:^|\\s+)"+ao.requote(n)+"(?:\\s+|$)","g")}function T(n){return(n+"").trim().split(/^|\s+/)}function R(n,t){function e(){for(var e=-1;++e<i;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<i;)n[e](this,r)}n=T(n).map(D);var i=n.length;return"function"==typeof t?r:e}function D(n){var t=q(n);return function(e,r){if(i=e.classList)return r?i.add(n):i.remove(n);var i=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(i)||e.setAttribute("class",L(i+" "+n))):e.setAttribute("class",L(i.replace(t," ")))}}function P(n,t,e){function r(){this.style.removeProperty(n)}function i(){this.style.setProperty(n,t,e)}function u(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?u:i}function U(n,t){function e(){delete this[n]}function r(){this[n]=t}function i(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?i:r}function j(n){function t(){var t=this.ownerDocument,e=this.namespaceURI;return e===zo&&t.documentElement.namespaceURI===zo?t.createElement(n):t.createElementNS(e,n)}function e(){return this.ownerDocument.createElementNS(n.space,n.local)}return"function"==typeof n?n:(n=ao.ns.qualify(n)).local?e:t}function F(){var n=this.parentNode;n&&n.removeChild(this)}function H(n){return{__data__:n}}function O(n){return function(){return Ao(this,n)}}function I(n){return arguments.length||(n=e),function(t,e){return t&&e?n(t.__data__,e.__data__):!t-!e}}function Y(n,t){for(var e=0,r=n.length;r>e;e++)for(var i,u=n[e],o=0,a=u.length;a>o;o++)(i=u[o])&&t(i,o,e);return n}function Z(n){return ko(n,qo),n}function V(n){var t,e;return function(r,i,u){var o,a=n[u].update,l=a.length;for(u!=e&&(e=u,t=0),i>=t&&(t=i+1);!(o=a[t])&&++t<l;);return o}}function X(n,t,e){function r(){var t=this[o];t&&(this.removeEventListener(n,t,t.$),delete this[o])}function i(){var i=l(t,co(arguments));r.call(this),this.addEventListener(n,this[o]=i,i.$=e),i._=t}function u(){var t,e=new RegExp("^__on([^.]+)"+ao.requote(n)+"$");for(var r in this)if(t=r.match(e)){var i=this[r];this.removeEventListener(t[1],i,i.$),delete this[r]}}var o="__on"+n,a=n.indexOf("."),l=$;a>0&&(n=n.slice(0,a));var c=To.get(n);return c&&(n=c,l=B),a?t?i:r:t?b:u}function $(n,t){return function(e){var r=ao.event;ao.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{ao.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++Do,i="click"+r,u=ao.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==Ro&&(Ro="onselectstart"in e?!1:x(e.style,"userSelect")),Ro){var o=n(e).style,a=o[Ro];o[Ro]="none"}return function(n){if(u.on(r,null),Ro&&(o[Ro]=a),n){var t=function(){u.on(i,null)};u.on(i,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var i=r.createSVGPoint();if(0>Po){var u=t(n);if(u.scrollX||u.scrollY){r=ao.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var o=r[0][0].getScreenCTM();Po=!(o.f||o.e),r.remove()}}return Po?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),i=i.matrixTransform(n.getScreenCTM().inverse()),[i.x,i.y]}var a=n.getBoundingClientRect();return[e.clientX-a.left-n.clientLeft,e.clientY-a.top-n.clientTop]}function G(){return ao.event.changedTouches[0].identifier}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nn(n){return n>1?0:-1>n?Fo:Math.acos(n)}function tn(n){return n>1?Io:-1>n?-Io:Math.asin(n)}function en(n){return((n=Math.exp(n))-1/n)/2}function rn(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function on(n){return(n=Math.sin(n/2))*n}function an(){}function ln(n,t,e){return this instanceof ln?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof ln?new ln(n.h,n.s,n.l):_n(""+n,wn,ln):new ln(n,t,e)}function cn(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?u+(o-u)*n/60:180>n?o:240>n?u+(o-u)*(240-n)/60:u}function i(n){return Math.round(255*r(n))}var u,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,o=.5>=e?e*(1+t):e+t-e*t,u=2*e-o,new mn(i(n+120),i(n),i(n-120))}function fn(n,t,e){return this instanceof fn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof fn?new fn(n.h,n.c,n.l):n instanceof hn?gn(n.l,n.a,n.b):gn((n=Sn((n=ao.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new fn(n,t,e)}function sn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(e,Math.cos(n*=Yo)*t,Math.sin(n)*t)}function hn(n,t,e){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof fn?sn(n.h,n.c,n.l):Sn((n=mn(n)).r,n.g,n.b):new hn(n,t,e)}function pn(n,t,e){var r=(n+16)/116,i=r+t/500,u=r-e/200;return i=vn(i)*na,r=vn(r)*ta,u=vn(u)*ea,new mn(yn(3.2404542*i-1.5371385*r-.4985314*u),yn(-.969266*i+1.8760108*r+.041556*u),yn(.0556434*i-.2040259*r+1.0572252*u))}function gn(n,t,e){return n>0?new fn(Math.atan2(e,t)*Zo,Math.sqrt(t*t+e*e),n):new fn(NaN,NaN,n)}function vn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function dn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function yn(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function mn(n,t,e){return this instanceof mn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof mn?new mn(n.r,n.g,n.b):_n(""+n,mn,cn):new mn(n,t,e)}function Mn(n){return new mn(n>>16,n>>8&255,255&n)}function xn(n){return Mn(n)+""}function bn(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function _n(n,t,e){var r,i,u,o=0,a=0,l=0;if(r=/([a-z]+)\((.*)\)/.exec(n=n.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(Nn(i[0]),Nn(i[1]),Nn(i[2]))}return(u=ua.get(n))?t(u.r,u.g,u.b):(null==n||"#"!==n.charAt(0)||isNaN(u=parseInt(n.slice(1),16))||(4===n.length?(o=(3840&u)>>4,o=o>>4|o,a=240&u,a=a>>4|a,l=15&u,l=l<<4|l):7===n.length&&(o=(16711680&u)>>16,a=(65280&u)>>8,l=255&u)),t(o,a,l))}function wn(n,t,e){var r,i,u=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-u,l=(o+u)/2;return a?(i=.5>l?a/(o+u):a/(2-o-u),r=n==o?(t-e)/a+(e>t?6:0):t==o?(e-n)/a+2:(n-t)/a+4,r*=60):(r=NaN,i=l>0&&1>l?0:r),new ln(r,i,l)}function Sn(n,t,e){n=kn(n),t=kn(t),e=kn(e);var r=dn((.4124564*n+.3575761*t+.1804375*e)/na),i=dn((.2126729*n+.7151522*t+.072175*e)/ta),u=dn((.0193339*n+.119192*t+.9503041*e)/ea);return hn(116*i-16,500*(r-i),200*(i-u))}function kn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Nn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function En(n){return"function"==typeof n?n:function(){return n}}function An(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Cn(t,e,n,r)}}function Cn(n,t,e,r){function i(){var n,t=l.status;if(!t&&Ln(l)||t>=200&&300>t||304===t){try{n=e.call(u,l)}catch(r){return void o.error.call(u,r)}o.load.call(u,n)}else o.error.call(u,l)}var u={},o=ao.dispatch("beforesend","progress","load","error"),a={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(n)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=i:l.onreadystatechange=function(){l.readyState>3&&i()},l.onprogress=function(n){var t=ao.event;ao.event=n;try{o.progress.call(u,l)}finally{ao.event=t}},u.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",u)},u.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",u):t},u.responseType=function(n){return arguments.length?(c=n,u):c},u.response=function(n){return e=n,u},["get","post"].forEach(function(n){u[n]=function(){return u.send.apply(u,[n].concat(co(arguments)))}}),u.send=function(e,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),l.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),l.setRequestHeader)for(var f in a)l.setRequestHeader(f,a[f]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=i&&u.on("error",i).on("load",function(n){i(null,n)}),o.beforesend.call(u,l),l.send(null==r?null:r),u},u.abort=function(){return l.abort(),u},ao.rebind(u,o,"on"),null==r?u:u.get(zn(r))}function zn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Ln(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qn(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var i=e+t,u={c:n,t:i,n:null};return aa?aa.n=u:oa=u,aa=u,la||(ca=clearTimeout(ca),la=1,fa(Tn)),u}function Tn(){var n=Rn(),t=Dn()-n;t>24?(isFinite(t)&&(clearTimeout(ca),ca=setTimeout(Tn,t)),la=0):(la=1,fa(Tn))}function Rn(){for(var n=Date.now(),t=oa;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Dn(){for(var n,t=oa,e=1/0;t;)t.c?(t.t<e&&(e=t.t),t=(n=t).n):t=n?n.n=t.n:oa=t.n;return aa=n,e}function Pn(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Un(n,t){var e=Math.pow(10,3*xo(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function jn(n){var t=n.decimal,e=n.thousands,r=n.grouping,i=n.currency,u=r&&e?function(n,t){for(var i=n.length,u=[],o=0,a=r[0],l=0;i>0&&a>0&&(l+a+1>t&&(a=Math.max(1,t-l)),u.push(n.substring(i-=a,i+a)),!((l+=a+1)>t));)a=r[o=(o+1)%r.length];return u.reverse().join(e)}:m;return function(n){var e=ha.exec(n),r=e[1]||" ",o=e[2]||">",a=e[3]||"-",l=e[4]||"",c=e[5],f=+e[6],s=e[7],h=e[8],p=e[9],g=1,v="",d="",y=!1,m=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===o)&&(c=r="0",o="="),p){case"n":s=!0,p="g";break;case"%":g=100,d="%",p="f";break;case"p":g=100,d="%",p="r";break;case"b":case"o":case"x":case"X":"#"===l&&(v="0"+p.toLowerCase());case"c":m=!1;case"d":y=!0,h=0;break;case"s":g=-1,p="r"}"$"===l&&(v=i[0],d=i[1]),"r"!=p||h||(p="g"),null!=h&&("g"==p?h=Math.max(1,Math.min(21,h)):"e"!=p&&"f"!=p||(h=Math.max(0,Math.min(20,h)))),p=pa.get(p)||Fn;var M=c&&s;return function(n){var e=d;if(y&&n%1)return"";var i=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===a?"":a;if(0>g){var l=ao.formatPrefix(n,h);n=l.scale(n),e=l.symbol+d}else n*=g;n=p(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=m?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!c&&s&&(x=u(x,1/0));var S=v.length+x.length+b.length+(M?0:i.length),k=f>S?new Array(S=f-S+1).join(r):"";return M&&(x=u(k+x,k.length?f-b.length:1/0)),i+=v,n=x+b,("<"===o?i+n+k:">"===o?k+i+n:"^"===o?k.substring(0,S>>=1)+i+n+k.substring(S):i+(M?n:k+n))+e}}}function Fn(n){return n+""}function Hn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function On(n,t,e){function r(t){var e=n(t),r=u(e,1);return r-t>t-e?e:r}function i(e){return t(e=n(new va(e-1)),1),e}function u(n,e){return t(n=new va(+n),e),n}function o(n,r,u){var o=i(n),a=[];if(u>1)for(;r>o;)e(o)%u||a.push(new Date(+o)),t(o,1);else for(;r>o;)a.push(new Date(+o)),t(o,1);return a}function a(n,t,e){try{va=Hn;var r=new Hn;return r._=n,o(r,t,e)}finally{va=Date}}n.floor=n,n.round=r,n.ceil=i,n.offset=u,n.range=o;var l=n.utc=In(n);return l.floor=l,l.round=In(r),l.ceil=In(i),l.offset=In(u),l.range=a,n}function In(n){return function(t,e){try{va=Hn;var r=new Hn;return r._=t,n(r,e)._}finally{va=Date}}}function Yn(n){function t(n){function t(t){for(var e,i,u,o=[],a=-1,l=0;++a<r;)37===n.charCodeAt(a)&&(o.push(n.slice(l,a)),null!=(i=ya[e=n.charAt(++a)])&&(e=n.charAt(++a)),(u=A[e])&&(e=u(t,null==i?"e"===e?" ":"0":i)),o.push(e),l=a+1);return o.push(n.slice(l,a)),o.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},i=e(r,n,t,0);if(i!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var u=null!=r.Z&&va!==Hn,o=new(u?Hn:va);return"j"in r?o.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),o.setFullYear(r.y,0,1),o.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(o.getDay()+5)%7:r.w+7*r.U-(o.getDay()+6)%7)):o.setFullYear(r.y,r.m,r.d),o.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),u?o._:o},t.toString=function(){return n},t}function e(n,t,e,r){for(var i,u,o,a=0,l=t.length,c=e.length;l>a;){if(r>=c)return-1;if(i=t.charCodeAt(a++),37===i){if(o=t.charAt(a++),u=C[o in ya?t.charAt(a++):o],!u||(r=u(n,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){N.lastIndex=0;var r=N.exec(t.slice(e));return r?(n.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,A.c.toString(),t,r)}function l(n,t,r){return e(n,A.x.toString(),t,r)}function c(n,t,r){return e(n,A.X.toString(),t,r)}function f(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var s=n.dateTime,h=n.date,p=n.time,g=n.periods,v=n.days,d=n.shortDays,y=n.months,m=n.shortMonths;t.utc=function(n){function e(n){try{va=Hn;var t=new va;return t._=n,r(t)}finally{va=Date}}var r=t(n);return e.parse=function(n){try{va=Hn;var t=r.parse(n);return t&&t._}finally{va=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ct;var M=ao.map(),x=Vn(v),b=Xn(v),_=Vn(d),w=Xn(d),S=Vn(y),k=Xn(y),N=Vn(m),E=Xn(m);g.forEach(function(n,t){M.set(n.toLowerCase(),t)});var A={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return m[n.getMonth()]},B:function(n){return y[n.getMonth()]},c:t(s),d:function(n,t){return Zn(n.getDate(),t,2)},e:function(n,t){return Zn(n.getDate(),t,2)},H:function(n,t){return Zn(n.getHours(),t,2)},I:function(n,t){return Zn(n.getHours()%12||12,t,2)},j:function(n,t){return Zn(1+ga.dayOfYear(n),t,3)},L:function(n,t){return Zn(n.getMilliseconds(),t,3)},m:function(n,t){return Zn(n.getMonth()+1,t,2)},M:function(n,t){return Zn(n.getMinutes(),t,2)},p:function(n){return g[+(n.getHours()>=12)]},S:function(n,t){return Zn(n.getSeconds(),t,2)},U:function(n,t){return Zn(ga.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Zn(ga.mondayOfYear(n),t,2)},x:t(h),X:t(p),y:function(n,t){return Zn(n.getFullYear()%100,t,2)},Y:function(n,t){return Zn(n.getFullYear()%1e4,t,4)},Z:at,"%":function(){return"%"}},C={a:r,A:i,b:u,B:o,c:a,d:tt,e:tt,H:rt,I:rt,j:et,L:ot,m:nt,M:it,p:f,S:ut,U:Bn,w:$n,W:Wn,x:l,X:c,y:Gn,Y:Jn,Z:Kn,"%":lt};return t}function Zn(n,t,e){var r=0>n?"-":"",i=(r?-n:n)+"",u=i.length;return r+(e>u?new Array(e-u+1).join(t)+i:i)}function Vn(n){return new RegExp("^(?:"+n.map(ao.requote).join("|")+")","i")}function Xn(n){for(var t=new c,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function $n(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Bn(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Wn(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Jn(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Gn(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.y=Qn(+r[0]),e+r[0].length):-1}function Kn(n,t,e){return/^[+-]\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Qn(n){return n+(n>68?1900:2e3)}function nt(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function tt(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function et(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function rt(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function it(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function ut(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function ot(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function at(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=xo(t)/60|0,i=xo(t)%60;return e+Zn(r,"0",2)+Zn(i,"0",2)}function lt(n,t,e){Ma.lastIndex=0;var r=Ma.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ct(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function ft(){}function st(n,t,e){var r=e.s=n+t,i=r-n,u=r-i;e.t=n-u+(t-i)}function ht(n,t){n&&wa.hasOwnProperty(n.type)&&wa[n.type](n,t)}function pt(n,t,e){var r,i=-1,u=n.length-e;for(t.lineStart();++i<u;)r=n[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function gt(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)pt(n[e],t,1);t.polygonEnd()}function vt(){function n(n,t){n*=Yo,t=t*Yo/2+Fo/4;var e=n-r,o=e>=0?1:-1,a=o*e,l=Math.cos(t),c=Math.sin(t),f=u*c,s=i*l+f*Math.cos(a),h=f*o*Math.sin(a);ka.add(Math.atan2(h,s)),r=n,i=l,u=c}var t,e,r,i,u;Na.point=function(o,a){Na.point=n,r=(t=o)*Yo,i=Math.cos(a=(e=a)*Yo/2+Fo/4),u=Math.sin(a)},Na.lineEnd=function(){n(t,e)}}function dt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function yt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function mt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Mt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function xt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function bt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function _t(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function wt(n,t){return xo(n[0]-t[0])<Uo&&xo(n[1]-t[1])<Uo}function St(n,t){n*=Yo;var e=Math.cos(t*=Yo);kt(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function kt(n,t,e){++Ea,Ca+=(n-Ca)/Ea,za+=(t-za)/Ea,La+=(e-La)/Ea}function Nt(){function n(n,i){n*=Yo;var u=Math.cos(i*=Yo),o=u*Math.cos(n),a=u*Math.sin(n),l=Math.sin(i),c=Math.atan2(Math.sqrt((c=e*l-r*a)*c+(c=r*o-t*l)*c+(c=t*a-e*o)*c),t*o+e*a+r*l);Aa+=c,qa+=c*(t+(t=o)),Ta+=c*(e+(e=a)),Ra+=c*(r+(r=l)),kt(t,e,r)}var t,e,r;ja.point=function(i,u){i*=Yo;var o=Math.cos(u*=Yo);t=o*Math.cos(i),e=o*Math.sin(i),r=Math.sin(u),ja.point=n,kt(t,e,r)}}function Et(){ja.point=St}function At(){function n(n,t){n*=Yo;var e=Math.cos(t*=Yo),o=e*Math.cos(n),a=e*Math.sin(n),l=Math.sin(t),c=i*l-u*a,f=u*o-r*l,s=r*a-i*o,h=Math.sqrt(c*c+f*f+s*s),p=r*o+i*a+u*l,g=h&&-nn(p)/h,v=Math.atan2(h,p);Da+=g*c,Pa+=g*f,Ua+=g*s,Aa+=v,qa+=v*(r+(r=o)),Ta+=v*(i+(i=a)),Ra+=v*(u+(u=l)),kt(r,i,u)}var t,e,r,i,u;ja.point=function(o,a){t=o,e=a,ja.point=n,o*=Yo;var l=Math.cos(a*=Yo);r=l*Math.cos(o),i=l*Math.sin(o),u=Math.sin(a),kt(r,i,u)},ja.lineEnd=function(){n(t,e),ja.lineEnd=Et,ja.point=St}}function Ct(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function zt(){return!0}function Lt(n,t,e,r,i){var u=[],o=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(wt(e,r)){i.lineStart();for(var a=0;t>a;++a)i.point((e=n[a])[0],e[1]);return void i.lineEnd()}var l=new Tt(e,n,null,!0),c=new Tt(e,null,l,!1);l.o=c,u.push(l),o.push(c),l=new Tt(r,n,null,!1),c=new Tt(r,null,l,!0),l.o=c,u.push(l),o.push(c)}}),o.sort(t),qt(u),qt(o),u.length){for(var a=0,l=e,c=o.length;c>a;++a)o[a].e=l=!l;for(var f,s,h=u[0];;){for(var p=h,g=!0;p.v;)if((p=p.n)===h)return;f=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(g)for(var a=0,c=f.length;c>a;++a)i.point((s=f[a])[0],s[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(g){f=p.p.z;for(var a=f.length-1;a>=0;--a)i.point((s=f[a])[0],s[1])}else r(p.x,p.p.x,-1,i);p=p.p}p=p.o,f=p.z,g=!g}while(!p.v);i.lineEnd()}}}function qt(n){if(t=n.length){for(var t,e,r=0,i=n[0];++r<t;)i.n=e=n[r],e.p=i,i=e;i.n=e=n[0],e.p=i}}function Tt(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Rt(n,t,e,r){return function(i,u){function o(t,e){var r=i(t,e);n(t=r[0],e=r[1])&&u.point(t,e)}function a(n,t){var e=i(n,t);d.point(e[0],e[1])}function l(){m.point=a,d.lineStart()}function c(){m.point=o,d.lineEnd()}function f(n,t){v.push([n,t]);var e=i(n,t);x.point(e[0],e[1])}function s(){x.lineStart(),v=[]}function h(){f(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(v.pop(),g.push(v),v=null,r)if(1&t){n=e[0];var i,r=n.length-1,o=-1;if(r>0){for(b||(u.polygonStart(),b=!0),u.lineStart();++o<r;)u.point((i=n[o])[0],i[1]);u.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),p.push(e.filter(Dt))}var p,g,v,d=t(u),y=i.invert(r[0],r[1]),m={point:o,lineStart:l,lineEnd:c,polygonStart:function(){m.point=f,m.lineStart=s,m.lineEnd=h,p=[],g=[]},polygonEnd:function(){m.point=o,m.lineStart=l,m.lineEnd=c,p=ao.merge(p);var n=Ot(y,g);p.length?(b||(u.polygonStart(),b=!0),Lt(p,Ut,n,e,u)):n&&(b||(u.polygonStart(),b=!0),u.lineStart(),e(null,null,1,u),u.lineEnd()),b&&(u.polygonEnd(),b=!1),p=g=null},sphere:function(){u.polygonStart(),u.lineStart(),e(null,null,1,u),u.lineEnd(),u.polygonEnd()}},M=Pt(),x=t(M),b=!1;return m}}function Dt(n){return n.length>1}function Pt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ut(n,t){return((n=n.x)[0]<0?n[1]-Io-Uo:Io-n[1])-((t=t.x)[0]<0?t[1]-Io-Uo:Io-t[1])}function jt(n){var t,e=NaN,r=NaN,i=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(u,o){var a=u>0?Fo:-Fo,l=xo(u-e);xo(l-Fo)<Uo?(n.point(e,r=(r+o)/2>0?Io:-Io),n.point(i,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(u,r),t=0):i!==a&&l>=Fo&&(xo(e-i)<Uo&&(e-=i*Uo),xo(u-a)<Uo&&(u-=a*Uo),r=Ft(e,r,u,o),n.point(i,r),n.lineEnd(),n.lineStart(),n.point(a,r),t=0),n.point(e=u,r=o),i=a},lineEnd:function(){n.lineEnd(),e=r=NaN},clean:function(){return 2-t}}}function Ft(n,t,e,r){var i,u,o=Math.sin(n-e);return xo(o)>Uo?Math.atan((Math.sin(t)*(u=Math.cos(r))*Math.sin(e)-Math.sin(r)*(i=Math.cos(t))*Math.sin(n))/(i*u*o)):(t+r)/2}function Ht(n,t,e,r){var i;if(null==n)i=e*Io,r.point(-Fo,i),r.point(0,i),r.point(Fo,i),r.point(Fo,0),r.point(Fo,-i),r.point(0,-i),r.point(-Fo,-i),r.point(-Fo,0),r.point(-Fo,i);else if(xo(n[0]-t[0])>Uo){var u=n[0]<t[0]?Fo:-Fo;i=e*u/2,r.point(-u,i),r.point(0,i),r.point(u,i)}else r.point(t[0],t[1])}function Ot(n,t){var e=n[0],r=n[1],i=[Math.sin(e),-Math.cos(e),0],u=0,o=0;ka.reset();for(var a=0,l=t.length;l>a;++a){var c=t[a],f=c.length;if(f)for(var s=c[0],h=s[0],p=s[1]/2+Fo/4,g=Math.sin(p),v=Math.cos(p),d=1;;){d===f&&(d=0),n=c[d];var y=n[0],m=n[1]/2+Fo/4,M=Math.sin(m),x=Math.cos(m),b=y-h,_=b>=0?1:-1,w=_*b,S=w>Fo,k=g*M;if(ka.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),u+=S?b+_*Ho:b,S^h>=e^y>=e){var N=mt(dt(s),dt(n));bt(N);var E=mt(i,N);bt(E);var A=(S^b>=0?-1:1)*tn(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(o+=S^b>=0?1:-1)}if(!d++)break;h=y,g=M,v=x,s=n}}return(-Uo>u||Uo>u&&-Uo>ka)^1&o}function It(n){function t(n,t){return Math.cos(n)*Math.cos(t)>u}function e(n){var e,u,l,c,f;return{lineStart:function(){c=l=!1,f=1},point:function(s,h){var p,g=[s,h],v=t(s,h),d=o?v?0:i(s,h):v?i(s+(0>s?Fo:-Fo),h):0;if(!e&&(c=l=v)&&n.lineStart(),v!==l&&(p=r(e,g),(wt(e,p)||wt(g,p))&&(g[0]+=Uo,g[1]+=Uo,v=t(g[0],g[1]))),v!==l)f=0,v?(n.lineStart(),p=r(g,e),n.point(p[0],p[1])):(p=r(e,g),n.point(p[0],p[1]),n.lineEnd()),e=p;else if(a&&e&&o^v){var y;d&u||!(y=r(g,e,!0))||(f=0,o?(n.lineStart(),n.point(y[0][0],y[0][1]),n.point(y[1][0],y[1][1]),n.lineEnd()):(n.point(y[1][0],y[1][1]),n.lineEnd(),n.lineStart(),n.point(y[0][0],y[0][1])))}!v||e&&wt(e,g)||n.point(g[0],g[1]),e=g,l=v,u=d},lineEnd:function(){l&&n.lineEnd(),e=null},clean:function(){return f|(c&&l)<<1}}}function r(n,t,e){var r=dt(n),i=dt(t),o=[1,0,0],a=mt(r,i),l=yt(a,a),c=a[0],f=l-c*c;if(!f)return!e&&n;var s=u*l/f,h=-u*c/f,p=mt(o,a),g=xt(o,s),v=xt(a,h);Mt(g,v);var d=p,y=yt(g,d),m=yt(d,d),M=y*y-m*(yt(g,g)-1);if(!(0>M)){var x=Math.sqrt(M),b=xt(d,(-y-x)/m);if(Mt(b,g),b=_t(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],N=t[1];w>S&&(_=w,w=S,S=_);var E=S-w,A=xo(E-Fo)<Uo,C=A||Uo>E;if(!A&&k>N&&(_=k,k=N,N=_),C?A?k+N>0^b[1]<(xo(b[0]-w)<Uo?k:N):k<=b[1]&&b[1]<=N:E>Fo^(w<=b[0]&&b[0]<=S)){var z=xt(d,(-y+x)/m);return Mt(z,g),[b,_t(z)]}}}function i(t,e){var r=o?n:Fo-n,i=0;return-r>t?i|=1:t>r&&(i|=2),-r>e?i|=4:e>r&&(i|=8),i}var u=Math.cos(n),o=u>0,a=xo(u)>Uo,l=ve(n,6*Yo);return Rt(t,e,l,o?[0,-n]:[-Fo,n-Fo])}function Yt(n,t,e,r){return function(i){var u,o=i.a,a=i.b,l=o.x,c=o.y,f=a.x,s=a.y,h=0,p=1,g=f-l,v=s-c;if(u=n-l,g||!(u>0)){if(u/=g,0>g){if(h>u)return;p>u&&(p=u)}else if(g>0){if(u>p)return;u>h&&(h=u)}if(u=e-l,g||!(0>u)){if(u/=g,0>g){if(u>p)return;u>h&&(h=u)}else if(g>0){if(h>u)return;p>u&&(p=u)}if(u=t-c,v||!(u>0)){if(u/=v,0>v){if(h>u)return;p>u&&(p=u)}else if(v>0){if(u>p)return;u>h&&(h=u)}if(u=r-c,v||!(0>u)){if(u/=v,0>v){if(u>p)return;u>h&&(h=u)}else if(v>0){if(h>u)return;p>u&&(p=u)}return h>0&&(i.a={x:l+h*g,y:c+h*v}),1>p&&(i.b={x:l+p*g,y:c+p*v}),i}}}}}}function Zt(n,t,e,r){function i(r,i){return xo(r[0]-n)<Uo?i>0?0:3:xo(r[0]-e)<Uo?i>0?2:1:xo(r[1]-t)<Uo?i>0?1:0:i>0?3:2}function u(n,t){return o(n.x,t.x)}function o(n,t){var e=i(n,1),r=i(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function l(n){for(var t=0,e=d.length,r=n[1],i=0;e>i;++i)for(var u,o=1,a=d[i],l=a.length,c=a[0];l>o;++o)u=a[o],c[1]<=r?u[1]>r&&Q(c,u,n)>0&&++t:u[1]<=r&&Q(c,u,n)<0&&--t,c=u;return 0!==t}function c(u,a,l,c){var f=0,s=0;if(null==u||(f=i(u,l))!==(s=i(a,l))||o(u,a)<0^l>0){do c.point(0===f||3===f?n:e,f>1?r:t);while((f=(f+l+4)%4)!==s)}else c.point(a[0],a[1])}function f(i,u){return i>=n&&e>=i&&u>=t&&r>=u}function s(n,t){f(n,t)&&a.point(n,t)}function h(){C.point=g,d&&d.push(y=[]),S=!0,w=!1,b=_=NaN}function p(){v&&(g(m,M),x&&w&&E.rejoin(),v.push(E.buffer())),C.point=s,w&&a.lineEnd()}function g(n,t){n=Math.max(-Ha,Math.min(Ha,n)),t=Math.max(-Ha,Math.min(Ha,t));var e=f(n,t);if(d&&y.push([n,t]),S)m=n,M=t,x=e,S=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&w)a.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};A(r)?(w||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),k=!1):e&&(a.lineStart(),a.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,y,m,M,x,b,_,w,S,k,N=a,E=Pt(),A=Yt(n,t,e,r),C={point:s,lineStart:h,lineEnd:p,polygonStart:function(){a=E,v=[],d=[],k=!0},polygonEnd:function(){a=N,v=ao.merge(v);var t=l([n,r]),e=k&&t,i=v.length;(e||i)&&(a.polygonStart(),e&&(a.lineStart(),c(null,null,1,a),a.lineEnd()),i&&Lt(v,u,t,c,a),a.polygonEnd()),v=d=y=null}};return C}}function Vt(n){var t=0,e=Fo/3,r=ae(n),i=r(t,e);return i.parallels=function(n){return arguments.length?r(t=n[0]*Fo/180,e=n[1]*Fo/180):[t/Fo*180,e/Fo*180]},i}function Xt(n,t){function e(n,t){var e=Math.sqrt(u-2*i*Math.sin(t))/i;return[e*Math.sin(n*=i),o-e*Math.cos(n)]}var r=Math.sin(n),i=(r+Math.sin(t))/2,u=1+r*(2*i-r),o=Math.sqrt(u)/i;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/i,tn((u-(n*n+e*e)*i*i)/(2*i))]},e}function $t(){function n(n,t){Ia+=i*n-r*t,r=n,i=t}var t,e,r,i;$a.point=function(u,o){$a.point=n,t=r=u,e=i=o},$a.lineEnd=function(){n(t,e)}}function Bt(n,t){Ya>n&&(Ya=n),n>Va&&(Va=n),Za>t&&(Za=t),t>Xa&&(Xa=t)}function Wt(){function n(n,t){o.push("M",n,",",t,u)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function i(){o.push("Z")}var u=Jt(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return u=Jt(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function Jt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Gt(n,t){Ca+=n,za+=t,++La}function Kt(){function n(n,r){var i=n-t,u=r-e,o=Math.sqrt(i*i+u*u);qa+=o*(t+n)/2,Ta+=o*(e+r)/2,Ra+=o,Gt(t=n,e=r)}var t,e;Wa.point=function(r,i){Wa.point=n,Gt(t=r,e=i)}}function Qt(){Wa.point=Gt}function ne(){function n(n,t){var e=n-r,u=t-i,o=Math.sqrt(e*e+u*u);qa+=o*(r+n)/2,Ta+=o*(i+t)/2,Ra+=o,o=i*n-r*t,Da+=o*(r+n),Pa+=o*(i+t),Ua+=3*o,Gt(r=n,i=t)}var t,e,r,i;Wa.point=function(u,o){Wa.point=n,Gt(t=r=u,e=i=o)},Wa.lineEnd=function(){n(t,e)}}function te(n){function t(t,e){n.moveTo(t+o,e),n.arc(t,e,o,0,Ho)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function i(){a.point=t}function u(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:i,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=i,a.point=t},pointRadius:function(n){return o=n,a},result:b};return a}function ee(n){function t(n){return(a?r:e)(n)}function e(t){return ue(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=NaN,S.point=u,t.lineStart()}function u(e,r){var u=dt([e,r]),o=n(e,r);i(M,x,m,b,_,w,M=o[0],x=o[1],m=e,b=u[0],_=u[1],w=u[2],a,t),t.point(M,x)}function o(){S.point=e,t.lineEnd()}function l(){ +r(),S.point=c,S.lineEnd=f}function c(n,t){u(s=n,h=t),p=M,g=x,v=b,d=_,y=w,S.point=u}function f(){i(M,x,m,b,_,w,p,g,s,v,d,y,a,t),S.lineEnd=o,o()}var s,h,p,g,v,d,y,m,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=l},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function i(t,e,r,a,l,c,f,s,h,p,g,v,d,y){var m=f-t,M=s-e,x=m*m+M*M;if(x>4*u&&d--){var b=a+p,_=l+g,w=c+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),N=xo(xo(w)-1)<Uo||xo(r-h)<Uo?(r+h)/2:Math.atan2(_,b),E=n(N,k),A=E[0],C=E[1],z=A-t,L=C-e,q=M*z-m*L;(q*q/x>u||xo((m*z+M*L)/x-.5)>.3||o>a*p+l*g+c*v)&&(i(t,e,r,a,l,c,A,C,N,b/=S,_/=S,w,d,y),y.point(A,C),i(A,C,N,b,_,w,f,s,h,p,g,v,d,y))}}var u=.5,o=Math.cos(30*Yo),a=16;return t.precision=function(n){return arguments.length?(a=(u=n*n)>0&&16,t):Math.sqrt(u)},t}function re(n){var t=ee(function(t,e){return n([t*Zo,e*Zo])});return function(n){return le(t(n))}}function ie(n){this.stream=n}function ue(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function oe(n){return ae(function(){return n})()}function ae(n){function t(n){return n=a(n[0]*Yo,n[1]*Yo),[n[0]*h+l,c-n[1]*h]}function e(n){return n=a.invert((n[0]-l)/h,(c-n[1])/h),n&&[n[0]*Zo,n[1]*Zo]}function r(){a=Ct(o=se(y,M,x),u);var n=u(v,d);return l=p-n[0]*h,c=g+n[1]*h,i()}function i(){return f&&(f.valid=!1,f=null),t}var u,o,a,l,c,f,s=ee(function(n,t){return n=u(n,t),[n[0]*h+l,c-n[1]*h]}),h=150,p=480,g=250,v=0,d=0,y=0,M=0,x=0,b=Fa,_=m,w=null,S=null;return t.stream=function(n){return f&&(f.valid=!1),f=le(b(o,s(_(n)))),f.valid=!0,f},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,Fa):It((w=+n)*Yo),i()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Zt(n[0][0],n[0][1],n[1][0],n[1][1]):m,i()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(p=+n[0],g=+n[1],r()):[p,g]},t.center=function(n){return arguments.length?(v=n[0]%360*Yo,d=n[1]%360*Yo,r()):[v*Zo,d*Zo]},t.rotate=function(n){return arguments.length?(y=n[0]%360*Yo,M=n[1]%360*Yo,x=n.length>2?n[2]%360*Yo:0,r()):[y*Zo,M*Zo,x*Zo]},ao.rebind(t,s,"precision"),function(){return u=n.apply(this,arguments),t.invert=u.invert&&e,r()}}function le(n){return ue(n,function(t,e){n.point(t*Yo,e*Yo)})}function ce(n,t){return[n,t]}function fe(n,t){return[n>Fo?n-Ho:-Fo>n?n+Ho:n,t]}function se(n,t,e){return n?t||e?Ct(pe(n),ge(t,e)):pe(n):t||e?ge(t,e):fe}function he(n){return function(t,e){return t+=n,[t>Fo?t-Ho:-Fo>t?t+Ho:t,e]}}function pe(n){var t=he(n);return t.invert=he(-n),t}function ge(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),f=c*r+a*i;return[Math.atan2(l*u-f*o,a*r-c*i),tn(f*u+l*o)]}var r=Math.cos(n),i=Math.sin(n),u=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),f=c*u-l*o;return[Math.atan2(l*u+c*o,a*r+f*i),tn(f*r-a*i)]},e}function ve(n,t){var e=Math.cos(n),r=Math.sin(n);return function(i,u,o,a){var l=o*t;null!=i?(i=de(e,i),u=de(e,u),(o>0?u>i:i>u)&&(i+=o*Ho)):(i=n+o*Ho,u=n-.5*l);for(var c,f=i;o>0?f>u:u>f;f-=l)a.point((c=_t([e,-r*Math.cos(f),-r*Math.sin(f)]))[0],c[1])}}function de(n,t){var e=dt(t);e[0]-=n,bt(e);var r=nn(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Uo)%(2*Math.PI)}function ye(n,t,e){var r=ao.range(n,t-Uo,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function me(n,t,e){var r=ao.range(n,t-Uo,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function Me(n){return n.source}function xe(n){return n.target}function be(n,t,e,r){var i=Math.cos(t),u=Math.sin(t),o=Math.cos(r),a=Math.sin(r),l=i*Math.cos(n),c=i*Math.sin(n),f=o*Math.cos(e),s=o*Math.sin(e),h=2*Math.asin(Math.sqrt(on(r-t)+i*o*on(e-n))),p=1/Math.sin(h),g=h?function(n){var t=Math.sin(n*=h)*p,e=Math.sin(h-n)*p,r=e*l+t*f,i=e*c+t*s,o=e*u+t*a;return[Math.atan2(i,r)*Zo,Math.atan2(o,Math.sqrt(r*r+i*i))*Zo]}:function(){return[n*Zo,t*Zo]};return g.distance=h,g}function _e(){function n(n,i){var u=Math.sin(i*=Yo),o=Math.cos(i),a=xo((n*=Yo)-t),l=Math.cos(a);Ja+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=r*u-e*o*l)*a),e*u+r*o*l),t=n,e=u,r=o}var t,e,r;Ga.point=function(i,u){t=i*Yo,e=Math.sin(u*=Yo),r=Math.cos(u),Ga.point=n},Ga.lineEnd=function(){Ga.point=Ga.lineEnd=b}}function we(n,t){function e(t,e){var r=Math.cos(t),i=Math.cos(e),u=n(r*i);return[u*i*Math.sin(t),u*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),i=t(r),u=Math.sin(i),o=Math.cos(i);return[Math.atan2(n*u,r*o),Math.asin(r&&e*u/r)]},e}function Se(n,t){function e(n,t){o>0?-Io+Uo>t&&(t=-Io+Uo):t>Io-Uo&&(t=Io-Uo);var e=o/Math.pow(i(t),u);return[e*Math.sin(u*n),o-e*Math.cos(u*n)]}var r=Math.cos(n),i=function(n){return Math.tan(Fo/4+n/2)},u=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(i(t)/i(n)),o=r*Math.pow(i(n),u)/u;return u?(e.invert=function(n,t){var e=o-t,r=K(u)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/u,2*Math.atan(Math.pow(o/r,1/u))-Io]},e):Ne}function ke(n,t){function e(n,t){var e=u-t;return[e*Math.sin(i*n),u-e*Math.cos(i*n)]}var r=Math.cos(n),i=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),u=r/i+n;return xo(i)<Uo?ce:(e.invert=function(n,t){var e=u-t;return[Math.atan2(n,e)/i,u-K(i)*Math.sqrt(n*n+e*e)]},e)}function Ne(n,t){return[n,Math.log(Math.tan(Fo/4+t/2))]}function Ee(n){var t,e=oe(n),r=e.scale,i=e.translate,u=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=i.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var o=u.apply(e,arguments);if(o===e){if(t=null==n){var a=Fo*r(),l=i();u([[l[0]-a,l[1]-a],[l[0]+a,l[1]+a]])}}else t&&(o=null);return o},e.clipExtent(null)}function Ae(n,t){return[Math.log(Math.tan(Fo/4+t/2)),-n]}function Ce(n){return n[0]}function ze(n){return n[1]}function Le(n){for(var t=n.length,e=[0,1],r=2,i=2;t>i;i++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function qe(n,t){return n[0]-t[0]||n[1]-t[1]}function Te(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Re(n,t,e,r){var i=n[0],u=e[0],o=t[0]-i,a=r[0]-u,l=n[1],c=e[1],f=t[1]-l,s=r[1]-c,h=(a*(l-c)-s*(i-u))/(s*o-a*f);return[i+h*o,l+h*f]}function De(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Pe(){rr(this),this.edge=this.site=this.circle=null}function Ue(n){var t=cl.pop()||new Pe;return t.site=n,t}function je(n){Be(n),ol.remove(n),cl.push(n),rr(n)}function Fe(n){var t=n.circle,e=t.x,r=t.cy,i={x:e,y:r},u=n.P,o=n.N,a=[n];je(n);for(var l=u;l.circle&&xo(e-l.circle.x)<Uo&&xo(r-l.circle.cy)<Uo;)u=l.P,a.unshift(l),je(l),l=u;a.unshift(l),Be(l);for(var c=o;c.circle&&xo(e-c.circle.x)<Uo&&xo(r-c.circle.cy)<Uo;)o=c.N,a.push(c),je(c),c=o;a.push(c),Be(c);var f,s=a.length;for(f=1;s>f;++f)c=a[f],l=a[f-1],nr(c.edge,l.site,c.site,i);l=a[0],c=a[s-1],c.edge=Ke(l.site,c.site,null,i),$e(l),$e(c)}function He(n){for(var t,e,r,i,u=n.x,o=n.y,a=ol._;a;)if(r=Oe(a,o)-u,r>Uo)a=a.L;else{if(i=u-Ie(a,o),!(i>Uo)){r>-Uo?(t=a.P,e=a):i>-Uo?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var l=Ue(n);if(ol.insert(t,l),t||e){if(t===e)return Be(t),e=Ue(t.site),ol.insert(l,e),l.edge=e.edge=Ke(t.site,l.site),$e(t),void $e(e);if(!e)return void(l.edge=Ke(t.site,l.site));Be(t),Be(e);var c=t.site,f=c.x,s=c.y,h=n.x-f,p=n.y-s,g=e.site,v=g.x-f,d=g.y-s,y=2*(h*d-p*v),m=h*h+p*p,M=v*v+d*d,x={x:(d*m-p*M)/y+f,y:(h*M-v*m)/y+s};nr(e.edge,c,g,x),l.edge=Ke(c,n,null,x),e.edge=Ke(n,g,null,x),$e(t),$e(e)}}function Oe(n,t){var e=n.site,r=e.x,i=e.y,u=i-t;if(!u)return r;var o=n.P;if(!o)return-(1/0);e=o.site;var a=e.x,l=e.y,c=l-t;if(!c)return a;var f=a-r,s=1/u-1/c,h=f/c;return s?(-h+Math.sqrt(h*h-2*s*(f*f/(-2*c)-l+c/2+i-u/2)))/s+r:(r+a)/2}function Ie(n,t){var e=n.N;if(e)return Oe(e,t);var r=n.site;return r.y===t?r.x:1/0}function Ye(n){this.site=n,this.edges=[]}function Ze(n){for(var t,e,r,i,u,o,a,l,c,f,s=n[0][0],h=n[1][0],p=n[0][1],g=n[1][1],v=ul,d=v.length;d--;)if(u=v[d],u&&u.prepare())for(a=u.edges,l=a.length,o=0;l>o;)f=a[o].end(),r=f.x,i=f.y,c=a[++o%l].start(),t=c.x,e=c.y,(xo(r-t)>Uo||xo(i-e)>Uo)&&(a.splice(o,0,new tr(Qe(u.site,f,xo(r-s)<Uo&&g-i>Uo?{x:s,y:xo(t-s)<Uo?e:g}:xo(i-g)<Uo&&h-r>Uo?{x:xo(e-g)<Uo?t:h,y:g}:xo(r-h)<Uo&&i-p>Uo?{x:h,y:xo(t-h)<Uo?e:p}:xo(i-p)<Uo&&r-s>Uo?{x:xo(e-p)<Uo?t:s,y:p}:null),u.site,null)),++l)}function Ve(n,t){return t.angle-n.angle}function Xe(){rr(this),this.x=this.y=this.arc=this.site=this.cy=null}function $e(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,i=n.site,u=e.site;if(r!==u){var o=i.x,a=i.y,l=r.x-o,c=r.y-a,f=u.x-o,s=u.y-a,h=2*(l*s-c*f);if(!(h>=-jo)){var p=l*l+c*c,g=f*f+s*s,v=(s*p-c*g)/h,d=(l*g-f*p)/h,s=d+a,y=fl.pop()||new Xe;y.arc=n,y.site=i,y.x=v+o,y.y=s+Math.sqrt(v*v+d*d),y.cy=s,n.circle=y;for(var m=null,M=ll._;M;)if(y.y<M.y||y.y===M.y&&y.x<=M.x){if(!M.L){m=M.P;break}M=M.L}else{if(!M.R){m=M;break}M=M.R}ll.insert(m,y),m||(al=y)}}}}function Be(n){var t=n.circle;t&&(t.P||(al=t.N),ll.remove(t),fl.push(t),rr(t),n.circle=null)}function We(n){for(var t,e=il,r=Yt(n[0][0],n[0][1],n[1][0],n[1][1]),i=e.length;i--;)t=e[i],(!Je(t,n)||!r(t)||xo(t.a.x-t.b.x)<Uo&&xo(t.a.y-t.b.y)<Uo)&&(t.a=t.b=null,e.splice(i,1))}function Je(n,t){var e=n.b;if(e)return!0;var r,i,u=n.a,o=t[0][0],a=t[1][0],l=t[0][1],c=t[1][1],f=n.l,s=n.r,h=f.x,p=f.y,g=s.x,v=s.y,d=(h+g)/2,y=(p+v)/2;if(v===p){if(o>d||d>=a)return;if(h>g){if(u){if(u.y>=c)return}else u={x:d,y:l};e={x:d,y:c}}else{if(u){if(u.y<l)return}else u={x:d,y:c};e={x:d,y:l}}}else if(r=(h-g)/(v-p),i=y-r*d,-1>r||r>1)if(h>g){if(u){if(u.y>=c)return}else u={x:(l-i)/r,y:l};e={x:(c-i)/r,y:c}}else{if(u){if(u.y<l)return}else u={x:(c-i)/r,y:c};e={x:(l-i)/r,y:l}}else if(v>p){if(u){if(u.x>=a)return}else u={x:o,y:r*o+i};e={x:a,y:r*a+i}}else{if(u){if(u.x<o)return}else u={x:a,y:r*a+i};e={x:o,y:r*o+i}}return n.a=u,n.b=e,!0}function Ge(n,t){this.l=n,this.r=t,this.a=this.b=null}function Ke(n,t,e,r){var i=new Ge(n,t);return il.push(i),e&&nr(i,n,t,e),r&&nr(i,t,n,r),ul[n.i].edges.push(new tr(i,n,t)),ul[t.i].edges.push(new tr(i,t,n)),i}function Qe(n,t,e){var r=new Ge(n,null);return r.a=t,r.b=e,il.push(r),r}function nr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function tr(n,t,e){var r=n.a,i=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function er(){this._=null}function rr(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ir(n,t){var e=t,r=t.R,i=e.U;i?i.L===e?i.L=r:i.R=r:n._=r,r.U=i,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function ur(n,t){var e=t,r=t.L,i=e.U;i?i.L===e?i.L=r:i.R=r:n._=r,r.U=i,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function or(n){for(;n.L;)n=n.L;return n}function ar(n,t){var e,r,i,u=n.sort(lr).pop();for(il=[],ul=new Array(n.length),ol=new er,ll=new er;;)if(i=al,u&&(!i||u.y<i.y||u.y===i.y&&u.x<i.x))u.x===e&&u.y===r||(ul[u.i]=new Ye(u),He(u),e=u.x,r=u.y),u=n.pop();else{if(!i)break;Fe(i.arc)}t&&(We(t),Ze(t));var o={cells:ul,edges:il};return ol=ll=il=ul=null,o}function lr(n,t){return t.y-n.y||t.x-n.x}function cr(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function fr(n){return n.x}function sr(n){return n.y}function hr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function pr(n,t,e,r,i,u){if(!n(t,e,r,i,u)){var o=.5*(e+i),a=.5*(r+u),l=t.nodes;l[0]&&pr(n,l[0],e,r,o,a),l[1]&&pr(n,l[1],o,r,i,a),l[2]&&pr(n,l[2],e,a,o,u),l[3]&&pr(n,l[3],o,a,i,u)}}function gr(n,t,e,r,i,u,o){var a,l=1/0;return function c(n,f,s,h,p){if(!(f>u||s>o||r>h||i>p)){if(g=n.point){var g,v=t-n.x,d=e-n.y,y=v*v+d*d;if(l>y){var m=Math.sqrt(l=y);r=t-m,i=e-m,u=t+m,o=e+m,a=g}}for(var M=n.nodes,x=.5*(f+h),b=.5*(s+p),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:c(n,f,s,x,b);break;case 1:c(n,x,s,h,b);break;case 2:c(n,f,b,x,p);break;case 3:c(n,x,b,h,p)}}}(n,r,i,u,o),a}function vr(n,t){n=ao.rgb(n),t=ao.rgb(t);var e=n.r,r=n.g,i=n.b,u=t.r-e,o=t.g-r,a=t.b-i;return function(n){return"#"+bn(Math.round(e+u*n))+bn(Math.round(r+o*n))+bn(Math.round(i+a*n))}}function dr(n,t){var e,r={},i={};for(e in n)e in t?r[e]=Mr(n[e],t[e]):i[e]=n[e];for(e in t)e in n||(i[e]=t[e]);return function(n){for(e in r)i[e]=r[e](n);return i}}function yr(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function mr(n,t){var e,r,i,u=hl.lastIndex=pl.lastIndex=0,o=-1,a=[],l=[];for(n+="",t+="";(e=hl.exec(n))&&(r=pl.exec(t));)(i=r.index)>u&&(i=t.slice(u,i),a[o]?a[o]+=i:a[++o]=i),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,l.push({i:o,x:yr(e,r)})),u=pl.lastIndex;return u<t.length&&(i=t.slice(u),a[o]?a[o]+=i:a[++o]=i),a.length<2?l[0]?(t=l[0].x,function(n){return t(n)+""}):function(){return t}:(t=l.length,function(n){for(var e,r=0;t>r;++r)a[(e=l[r]).i]=e.x(n);return a.join("")})}function Mr(n,t){for(var e,r=ao.interpolators.length;--r>=0&&!(e=ao.interpolators[r](n,t)););return e}function xr(n,t){var e,r=[],i=[],u=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;a>e;++e)r.push(Mr(n[e],t[e]));for(;u>e;++e)i[e]=n[e];for(;o>e;++e)i[e]=t[e];return function(n){for(e=0;a>e;++e)i[e]=r[e](n);return i}}function br(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function _r(n){return function(t){return 1-n(1-t)}}function wr(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function Sr(n){return n*n}function kr(n){return n*n*n}function Nr(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Er(n){return function(t){return Math.pow(t,n)}}function Ar(n){return 1-Math.cos(n*Io)}function Cr(n){return Math.pow(2,10*(n-1))}function zr(n){return 1-Math.sqrt(1-n*n)}function Lr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Ho*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Ho/t)}}function qr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Tr(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Rr(n,t){n=ao.hcl(n),t=ao.hcl(t);var e=n.h,r=n.c,i=n.l,u=t.h-e,o=t.c-r,a=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(u)?(u=0,e=isNaN(e)?t.h:e):u>180?u-=360:-180>u&&(u+=360),function(n){return sn(e+u*n,r+o*n,i+a*n)+""}}function Dr(n,t){n=ao.hsl(n),t=ao.hsl(t);var e=n.h,r=n.s,i=n.l,u=t.h-e,o=t.s-r,a=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(u)?(u=0,e=isNaN(e)?t.h:e):u>180?u-=360:-180>u&&(u+=360),function(n){return cn(e+u*n,r+o*n,i+a*n)+""}}function Pr(n,t){n=ao.lab(n),t=ao.lab(t);var e=n.l,r=n.a,i=n.b,u=t.l-e,o=t.a-r,a=t.b-i;return function(n){return pn(e+u*n,r+o*n,i+a*n)+""}}function Ur(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function jr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Hr(t),i=Fr(t,e),u=Hr(Or(e,t,-i))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,i*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Zo,this.translate=[n.e,n.f],this.scale=[r,u],this.skew=u?Math.atan2(i,u)*Zo:0}function Fr(n,t){return n[0]*t[0]+n[1]*t[1]}function Hr(n){var t=Math.sqrt(Fr(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Or(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ir(n){return n.length?n.pop()+",":""}function Yr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var i=e.push("translate(",null,",",null,")");r.push({i:i-4,x:yr(n[0],t[0])},{i:i-2,x:yr(n[1],t[1])})}else(t[0]||t[1])&&e.push("translate("+t+")")}function Zr(n,t,e,r){n!==t?(n-t>180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(Ir(e)+"rotate(",null,")")-2,x:yr(n,t)})):t&&e.push(Ir(e)+"rotate("+t+")")}function Vr(n,t,e,r){n!==t?r.push({i:e.push(Ir(e)+"skewX(",null,")")-2,x:yr(n,t)}):t&&e.push(Ir(e)+"skewX("+t+")")}function Xr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var i=e.push(Ir(e)+"scale(",null,",",null,")");r.push({i:i-4,x:yr(n[0],t[0])},{i:i-2,x:yr(n[1],t[1])})}else 1===t[0]&&1===t[1]||e.push(Ir(e)+"scale("+t+")")}function $r(n,t){var e=[],r=[];return n=ao.transform(n),t=ao.transform(t),Yr(n.translate,t.translate,e,r),Zr(n.rotate,t.rotate,e,r),Vr(n.skew,t.skew,e,r),Xr(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,i=-1,u=r.length;++i<u;)e[(t=r[i]).i]=t.x(n);return e.join("")}}function Br(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Wr(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Jr(n){for(var t=n.source,e=n.target,r=Kr(t,e),i=[t];t!==r;)t=t.parent,i.push(t);for(var u=i.length;e!==r;)i.splice(u,0,e),e=e.parent;return i}function Gr(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Kr(n,t){if(n===t)return n;for(var e=Gr(n),r=Gr(t),i=e.pop(),u=r.pop(),o=null;i===u;)o=i,i=e.pop(),u=r.pop();return o}function Qr(n){n.fixed|=2}function ni(n){n.fixed&=-7}function ti(n){n.fixed|=4,n.px=n.x,n.py=n.y}function ei(n){n.fixed&=-5}function ri(n,t,e){var r=0,i=0;if(n.charge=0,!n.leaf)for(var u,o=n.nodes,a=o.length,l=-1;++l<a;)u=o[l],null!=u&&(ri(u,t,e),n.charge+=u.charge,r+=u.charge*u.cx,i+=u.charge*u.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var c=t*e[n.point.index];n.charge+=n.pointCharge=c,r+=c*n.point.x,i+=c*n.point.y}n.cx=r/n.charge,n.cy=i/n.charge}function ii(n,t){return ao.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=fi,n}function ui(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(i=n.children)&&(r=i.length))for(var r,i;--r>=0;)e.push(i[r])}function oi(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(u=n.children)&&(i=u.length))for(var i,u,o=-1;++o<i;)e.push(u[o]);for(;null!=(n=r.pop());)t(n)}function ai(n){return n.children}function li(n){return n.value}function ci(n,t){return t.value-n.value}function fi(n){return ao.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function si(n){return n.x}function hi(n){return n.y}function pi(n,t,e){n.y0=t,n.y=e}function gi(n){return ao.range(n.length)}function vi(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function di(n){for(var t,e=1,r=0,i=n[0][1],u=n.length;u>e;++e)(t=n[e][1])>i&&(r=e,i=t);return r}function yi(n){return n.reduce(mi,0)}function mi(n,t){return n+t[1]}function Mi(n,t){return xi(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function xi(n,t){for(var e=-1,r=+n[0],i=(n[1]-r)/t,u=[];++e<=t;)u[e]=i*e+r;return u}function bi(n){return[ao.min(n),ao.max(n)]}function _i(n,t){return n.value-t.value}function wi(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Si(n,t){n._pack_next=t,t._pack_prev=n}function ki(n,t){var e=t.x-n.x,r=t.y-n.y,i=n.r+t.r;return.999*i*i>e*e+r*r}function Ni(n){function t(n){f=Math.min(n.x-n.r,f),s=Math.max(n.x+n.r,s),h=Math.min(n.y-n.r,h),p=Math.max(n.y+n.r,p)}if((e=n.children)&&(c=e.length)){var e,r,i,u,o,a,l,c,f=1/0,s=-(1/0),h=1/0,p=-(1/0);if(e.forEach(Ei),r=e[0],r.x=-r.r,r.y=0,t(r),c>1&&(i=e[1],i.x=i.r,i.y=0,t(i),c>2))for(u=e[2],zi(r,i,u),t(u),wi(r,u),r._pack_prev=u,wi(u,i),i=r._pack_next,o=3;c>o;o++){zi(r,i,u=e[o]);var g=0,v=1,d=1;for(a=i._pack_next;a!==i;a=a._pack_next,v++)if(ki(a,u)){g=1;break}if(1==g)for(l=r._pack_prev;l!==a._pack_prev&&!ki(l,u);l=l._pack_prev,d++);g?(d>v||v==d&&i.r<r.r?Si(r,i=a):Si(r=l,i),o--):(wi(r,u),i=u,t(u))}var y=(f+s)/2,m=(h+p)/2,M=0;for(o=0;c>o;o++)u=e[o],u.x-=y,u.y-=m,M=Math.max(M,u.r+Math.sqrt(u.x*u.x+u.y*u.y));n.r=M,e.forEach(Ai)}}function Ei(n){n._pack_next=n._pack_prev=n}function Ai(n){delete n._pack_next,delete n._pack_prev}function Ci(n,t,e,r){var i=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,i)for(var u=-1,o=i.length;++u<o;)Ci(i[u],t,e,r)}function zi(n,t,e){var r=n.r+e.r,i=t.x-n.x,u=t.y-n.y;if(r&&(i||u)){var o=t.r+e.r,a=i*i+u*u;o*=o,r*=r;var l=.5+(r-o)/(2*a),c=Math.sqrt(Math.max(0,2*o*(r+a)-(r-=a)*r-o*o))/(2*a);e.x=n.x+l*i+c*u,e.y=n.y+l*u-c*i}else e.x=n.x+r,e.y=n.y}function Li(n,t){return n.parent==t.parent?1:2}function qi(n){var t=n.children;return t.length?t[0]:n.t}function Ti(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ri(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Di(n){for(var t,e=0,r=0,i=n.children,u=i.length;--u>=0;)t=i[u],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Pi(n,t,e){return n.a.parent===t.parent?n.a:e}function Ui(n){return 1+ao.max(n,function(n){return n.y})}function ji(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Fi(n){var t=n.children;return t&&t.length?Fi(t[0]):n}function Hi(n){var t,e=n.children;return e&&(t=e.length)?Hi(e[t-1]):n}function Oi(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Ii(n,t){var e=n.x+t[3],r=n.y+t[0],i=n.dx-t[1]-t[3],u=n.dy-t[0]-t[2];return 0>i&&(e+=i/2,i=0),0>u&&(r+=u/2,u=0),{x:e,y:r,dx:i,dy:u}}function Yi(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Zi(n){return n.rangeExtent?n.rangeExtent():Yi(n.range())}function Vi(n,t,e,r){var i=e(n[0],n[1]),u=r(t[0],t[1]);return function(n){return u(i(n))}}function Xi(n,t){var e,r=0,i=n.length-1,u=n[r],o=n[i];return u>o&&(e=r,r=i,i=e,e=u,u=o,o=e),n[r]=t.floor(u),n[i]=t.ceil(o),n}function $i(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:Sl}function Bi(n,t,e,r){var i=[],u=[],o=0,a=Math.min(n.length,t.length)-1;for(n[a]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++o<=a;)i.push(e(n[o-1],n[o])),u.push(r(t[o-1],t[o]));return function(t){var e=ao.bisect(n,t,1,a)-1;return u[e](i[e](t))}}function Wi(n,t,e,r){function i(){var i=Math.min(n.length,t.length)>2?Bi:Vi,l=r?Wr:Br;return o=i(n,t,l,e),a=i(t,n,l,Mr),u}function u(n){return o(n)}var o,a;return u.invert=function(n){return a(n)},u.domain=function(t){return arguments.length?(n=t.map(Number),i()):n},u.range=function(n){return arguments.length?(t=n,i()):t},u.rangeRound=function(n){return u.range(n).interpolate(Ur)},u.clamp=function(n){return arguments.length?(r=n,i()):r},u.interpolate=function(n){return arguments.length?(e=n,i()):e},u.ticks=function(t){return Qi(n,t)},u.tickFormat=function(t,e){return nu(n,t,e)},u.nice=function(t){return Gi(n,t),i()},u.copy=function(){return Wi(n,t,e,r)},i()}function Ji(n,t){return ao.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Gi(n,t){return Xi(n,$i(Ki(n,t)[2])),Xi(n,$i(Ki(n,t)[2])),n}function Ki(n,t){null==t&&(t=10);var e=Yi(n),r=e[1]-e[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),u=t/r*i;return.15>=u?i*=10:.35>=u?i*=5:.75>=u&&(i*=2),e[0]=Math.ceil(e[0]/i)*i,e[1]=Math.floor(e[1]/i)*i+.5*i,e[2]=i,e}function Qi(n,t){return ao.range.apply(ao,Ki(n,t))}function nu(n,t,e){var r=Ki(n,t);if(e){var i=ha.exec(e);if(i.shift(),"s"===i[8]){var u=ao.formatPrefix(Math.max(xo(r[0]),xo(r[1])));return i[7]||(i[7]="."+tu(u.scale(r[2]))),i[8]="f",e=ao.format(i.join("")),function(n){return e(u.scale(n))+u.symbol}}i[7]||(i[7]="."+eu(i[8],r)),e=i.join("")}else e=",."+tu(r[2])+"f";return ao.format(e)}function tu(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function eu(n,t){var e=tu(t[2]);return n in kl?Math.abs(e-tu(Math.max(xo(t[0]),xo(t[1]))))+ +("e"!==n):e-2*("%"===n)}function ru(n,t,e,r){function i(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function u(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(i(t))}return o.invert=function(t){return u(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(i)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(i)),o):t},o.nice=function(){var t=Xi(r.map(i),e?Math:El);return n.domain(t),r=t.map(u),o},o.ticks=function(){var n=Yi(r),o=[],a=n[0],l=n[1],c=Math.floor(i(a)),f=Math.ceil(i(l)),s=t%1?2:t;if(isFinite(f-c)){if(e){for(;f>c;c++)for(var h=1;s>h;h++)o.push(u(c)*h);o.push(u(c))}else for(o.push(u(c));c++<f;)for(var h=s-1;h>0;h--)o.push(u(c)*h);for(c=0;o[c]<a;c++);for(f=o.length;o[f-1]>l;f--);o=o.slice(c,f)}return o},o.tickFormat=function(n,e){if(!arguments.length)return Nl;arguments.length<2?e=Nl:"function"!=typeof e&&(e=ao.format(e));var r=Math.max(1,t*n/o.ticks().length);return function(n){var o=n/u(Math.round(i(n)));return t-.5>o*t&&(o*=t),r>=o?e(n):""}},o.copy=function(){return ru(n.copy(),t,e,r)},Ji(o,n)}function iu(n,t,e){function r(t){return n(i(t))}var i=uu(t),u=uu(1/t);return r.invert=function(t){return u(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(i)),r):e},r.ticks=function(n){return Qi(e,n)},r.tickFormat=function(n,t){return nu(e,n,t)},r.nice=function(n){return r.domain(Gi(e,n))},r.exponent=function(o){return arguments.length?(i=uu(t=o),u=uu(1/t),n.domain(e.map(i)),r):t},r.copy=function(){return iu(n.copy(),t,e)},Ji(r,n)}function uu(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function ou(n,t){function e(e){return u[((i.get(e)||("range"===t.t?i.set(e,n.push(e)):NaN))-1)%u.length]}function r(t,e){return ao.range(n.length).map(function(n){return t+e*n})}var i,u,o;return e.domain=function(r){if(!arguments.length)return n;n=[],i=new c;for(var u,o=-1,a=r.length;++o<a;)i.has(u=r[o])||i.set(u,n.push(u));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(u=n,o=0,t={t:"range",a:arguments},e):u},e.rangePoints=function(i,a){arguments.length<2&&(a=0);var l=i[0],c=i[1],f=n.length<2?(l=(l+c)/2,0):(c-l)/(n.length-1+a);return u=r(l+f*a/2,f),o=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(i,a){arguments.length<2&&(a=0);var l=i[0],c=i[1],f=n.length<2?(l=c=Math.round((l+c)/2),0):(c-l)/(n.length-1+a)|0;return u=r(l+Math.round(f*a/2+(c-l-(n.length-1+a)*f)/2),f),o=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(i,a,l){arguments.length<2&&(a=0),arguments.length<3&&(l=a);var c=i[1]<i[0],f=i[c-0],s=i[1-c],h=(s-f)/(n.length-a+2*l);return u=r(f+h*l,h),c&&u.reverse(),o=h*(1-a),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(i,a,l){arguments.length<2&&(a=0),arguments.length<3&&(l=a);var c=i[1]<i[0],f=i[c-0],s=i[1-c],h=Math.floor((s-f)/(n.length-a+2*l));return u=r(f+Math.round((s-f-(n.length-a)*h)/2),h),c&&u.reverse(),o=Math.round(h*(1-a)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return o},e.rangeExtent=function(){return Yi(t.a[0])},e.copy=function(){return ou(n,t)},e.domain(n)}function au(n,t){function u(){var e=0,r=t.length;for(a=[];++e<r;)a[e-1]=ao.quantile(n,e/r);return o}function o(n){return isNaN(n=+n)?void 0:t[ao.bisect(a,n)]}var a;return o.domain=function(t){return arguments.length?(n=t.map(r).filter(i).sort(e),u()):n},o.range=function(n){return arguments.length?(t=n,u()):t},o.quantiles=function(){return a},o.invertExtent=function(e){return e=t.indexOf(e),0>e?[NaN,NaN]:[e>0?a[e-1]:n[0],e<a.length?a[e]:n[n.length-1]]},o.copy=function(){return au(n,t)},u()}function lu(n,t,e){function r(t){return e[Math.max(0,Math.min(o,Math.floor(u*(t-n))))]}function i(){return u=e.length/(t-n),o=e.length-1,r}var u,o;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],i()):[n,t]},r.range=function(n){return arguments.length?(e=n,i()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?NaN:t/u+n,[t,t+1/u]},r.copy=function(){return lu(n,t,e)},i()}function cu(n,t){function e(e){return e>=e?t[ao.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return cu(n,t)},e}function fu(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Qi(n,t)},t.tickFormat=function(t,e){return nu(n,t,e)},t.copy=function(){return fu(n)},t}function su(){return 0}function hu(n){return n.innerRadius}function pu(n){return n.outerRadius}function gu(n){return n.startAngle}function vu(n){return n.endAngle}function du(n){return n&&n.padAngle}function yu(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function mu(n,t,e,r,i){var u=n[0]-t[0],o=n[1]-t[1],a=(i?r:-r)/Math.sqrt(u*u+o*o),l=a*o,c=-a*u,f=n[0]+l,s=n[1]+c,h=t[0]+l,p=t[1]+c,g=(f+h)/2,v=(s+p)/2,d=h-f,y=p-s,m=d*d+y*y,M=e-r,x=f*p-h*s,b=(0>y?-1:1)*Math.sqrt(Math.max(0,M*M*m-x*x)),_=(x*y-d*b)/m,w=(-x*d-y*b)/m,S=(x*y+d*b)/m,k=(-x*d+y*b)/m,N=_-g,E=w-v,A=S-g,C=k-v;return N*N+E*E>A*A+C*C&&(_=S,w=k),[[_-l,w-c],[_*e/M,w*e/M]]}function Mu(n){function t(t){function o(){c.push("M",u(n(f),a))}for(var l,c=[],f=[],s=-1,h=t.length,p=En(e),g=En(r);++s<h;)i.call(this,l=t[s],s)?f.push([+p.call(this,l,s),+g.call(this,l,s)]):f.length&&(o(),f=[]);return f.length&&o(),c.length?c.join(""):null}var e=Ce,r=ze,i=zt,u=xu,o=u.key,a=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(i=n,t):i},t.interpolate=function(n){return arguments.length?(o="function"==typeof n?u=n:(u=Tl.get(n)||xu).key,t):o},t.tension=function(n){return arguments.length?(a=n,t):a},t}function xu(n){return n.length>1?n.join("L"):n+"Z"}function bu(n){return n.join("L")+"Z"}function _u(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t<e;)i.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&i.push("H",r[0]),i.join("")}function wu(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t<e;)i.push("V",(r=n[t])[1],"H",r[0]);return i.join("")}function Su(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t<e;)i.push("H",(r=n[t])[0],"V",r[1]);return i.join("")}function ku(n,t){return n.length<4?xu(n):n[1]+Au(n.slice(1,-1),Cu(n,t))}function Nu(n,t){return n.length<3?bu(n):n[0]+Au((n.push(n[0]),n),Cu([n[n.length-2]].concat(n,[n[1]]),t))}function Eu(n,t){return n.length<3?xu(n):n[0]+Au(n,Cu(n,t))}function Au(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return xu(n);var e=n.length!=t.length,r="",i=n[0],u=n[1],o=t[0],a=o,l=1;if(e&&(r+="Q"+(u[0]-2*o[0]/3)+","+(u[1]-2*o[1]/3)+","+u[0]+","+u[1],i=n[1],l=2),t.length>1){a=t[1],u=n[l],l++,r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(u[0]-a[0])+","+(u[1]-a[1])+","+u[0]+","+u[1];for(var c=2;c<t.length;c++,l++)u=n[l],a=t[c],r+="S"+(u[0]-a[0])+","+(u[1]-a[1])+","+u[0]+","+u[1]}if(e){var f=n[l];r+="Q"+(u[0]+2*a[0]/3)+","+(u[1]+2*a[1]/3)+","+f[0]+","+f[1]}return r}function Cu(n,t){for(var e,r=[],i=(1-t)/2,u=n[0],o=n[1],a=1,l=n.length;++a<l;)e=u,u=o,o=n[a],r.push([i*(o[0]-e[0]),i*(o[1]-e[1])]);return r}function zu(n){if(n.length<3)return xu(n);var t=1,e=n.length,r=n[0],i=r[0],u=r[1],o=[i,i,i,(r=n[1])[0]],a=[u,u,u,r[1]],l=[i,",",u,"L",Ru(Pl,o),",",Ru(Pl,a)];for(n.push(n[e-1]);++t<=e;)r=n[t],o.shift(),o.push(r[0]),a.shift(),a.push(r[1]),Du(l,o,a);return n.pop(),l.push("L",r),l.join("")}function Lu(n){if(n.length<4)return xu(n);for(var t,e=[],r=-1,i=n.length,u=[0],o=[0];++r<3;)t=n[r],u.push(t[0]),o.push(t[1]);for(e.push(Ru(Pl,u)+","+Ru(Pl,o)),--r;++r<i;)t=n[r],u.shift(),u.push(t[0]),o.shift(),o.push(t[1]),Du(e,u,o);return e.join("")}function qu(n){for(var t,e,r=-1,i=n.length,u=i+4,o=[],a=[];++r<4;)e=n[r%i],o.push(e[0]),a.push(e[1]);for(t=[Ru(Pl,o),",",Ru(Pl,a)],--r;++r<u;)e=n[r%i],o.shift(),o.push(e[0]),a.shift(),a.push(e[1]),Du(t,o,a);return t.join("")}function Tu(n,t){var e=n.length-1;if(e)for(var r,i,u=n[0][0],o=n[0][1],a=n[e][0]-u,l=n[e][1]-o,c=-1;++c<=e;)r=n[c],i=c/e,r[0]=t*r[0]+(1-t)*(u+i*a),r[1]=t*r[1]+(1-t)*(o+i*l);return zu(n)}function Ru(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function Du(n,t,e){n.push("C",Ru(Rl,t),",",Ru(Rl,e),",",Ru(Dl,t),",",Ru(Dl,e),",",Ru(Pl,t),",",Ru(Pl,e))}function Pu(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Uu(n){for(var t=0,e=n.length-1,r=[],i=n[0],u=n[1],o=r[0]=Pu(i,u);++t<e;)r[t]=(o+(o=Pu(i=u,u=n[t+1])))/2;return r[t]=o,r}function ju(n){for(var t,e,r,i,u=[],o=Uu(n),a=-1,l=n.length-1;++a<l;)t=Pu(n[a],n[a+1]),xo(t)<Uo?o[a]=o[a+1]=0:(e=o[a]/t,r=o[a+1]/t,i=e*e+r*r,i>9&&(i=3*t/Math.sqrt(i),o[a]=i*e,o[a+1]=i*r));for(a=-1;++a<=l;)i=(n[Math.min(l,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),u.push([i||0,o[a]*i||0]);return u}function Fu(n){return n.length<3?xu(n):n[0]+Au(n,ju(n))}function Hu(n){for(var t,e,r,i=-1,u=n.length;++i<u;)t=n[i],e=t[0],r=t[1]-Io,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Ou(n){function t(t){function l(){v.push("M",a(n(y),s),f,c(n(d.reverse()),s),"Z")}for(var h,p,g,v=[],d=[],y=[],m=-1,M=t.length,x=En(e),b=En(i),_=e===r?function(){ +return p}:En(r),w=i===u?function(){return g}:En(u);++m<M;)o.call(this,h=t[m],m)?(d.push([p=+x.call(this,h,m),g=+b.call(this,h,m)]),y.push([+_.call(this,h,m),+w.call(this,h,m)])):d.length&&(l(),d=[],y=[]);return d.length&&l(),v.length?v.join(""):null}var e=Ce,r=Ce,i=0,u=ze,o=zt,a=xu,l=a.key,c=a,f="L",s=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(i=u=n,t):u},t.y0=function(n){return arguments.length?(i=n,t):i},t.y1=function(n){return arguments.length?(u=n,t):u},t.defined=function(n){return arguments.length?(o=n,t):o},t.interpolate=function(n){return arguments.length?(l="function"==typeof n?a=n:(a=Tl.get(n)||xu).key,c=a.reverse||a,f=a.closed?"M":"L",t):l},t.tension=function(n){return arguments.length?(s=n,t):s},t}function Iu(n){return n.radius}function Yu(n){return[n.x,n.y]}function Zu(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-Io;return[e*Math.cos(r),e*Math.sin(r)]}}function Vu(){return 64}function Xu(){return"circle"}function $u(n){var t=Math.sqrt(n/Fo);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Bu(n){return function(){var t,e,r;(t=this[n])&&(r=t[e=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[e]:delete this[n],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Wu(n,t,e){return ko(n,Yl),n.namespace=t,n.id=e,n}function Ju(n,t,e,r){var i=n.id,u=n.namespace;return Y(n,"function"==typeof e?function(n,o,a){n[u][i].tween.set(t,r(e.call(n,n.__data__,o,a)))}:(e=r(e),function(n){n[u][i].tween.set(t,e)}))}function Gu(n){return null==n&&(n=""),function(){this.textContent=n}}function Ku(n){return null==n?"__transition__":"__transition_"+n+"__"}function Qu(n,t,e,r,i){function u(n){var t=v.delay;return f.t=t+l,n>=t?o(n-t):void(f.c=o)}function o(e){var i=g.active,u=g[i];u&&(u.timer.c=null,u.timer.t=NaN,--g.count,delete g[i],u.event&&u.event.interrupt.call(n,n.__data__,u.index));for(var o in g)if(r>+o){var c=g[o];c.timer.c=null,c.timer.t=NaN,--g.count,delete g[o]}f.c=a,qn(function(){return f.c&&a(e||1)&&(f.c=null,f.t=NaN),1},0,l),g.active=r,v.event&&v.event.start.call(n,n.__data__,t),p=[],v.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&p.push(r)}),h=v.ease,s=v.duration}function a(i){for(var u=i/s,o=h(u),a=p.length;a>0;)p[--a].call(n,o);return u>=1?(v.event&&v.event.end.call(n,n.__data__,t),--g.count?delete g[r]:delete n[e],1):void 0}var l,f,s,h,p,g=n[e]||(n[e]={active:0,count:0}),v=g[r];v||(l=i.time,f=qn(u,0,l),v=g[r]={tween:new c,time:l,timer:f,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++g.count)}function no(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function to(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function eo(n){return n.toISOString()}function ro(n,t,e){function r(t){return n(t)}function i(n,e){var r=n[1]-n[0],i=r/e,u=ao.bisect(Kl,i);return u==Kl.length?[t.year,Ki(n.map(function(n){return n/31536e6}),e)[2]]:u?t[i/Kl[u-1]<Kl[u]/i?u-1:u]:[tc,Ki(n,e)[2]]}return r.invert=function(t){return io(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(io)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,io(+e+1),t).length}var u=r.domain(),o=Yi(u),a=null==n?i(o,10):"number"==typeof n&&i(o,n);return a&&(n=a[0],t=a[1]),r.domain(Xi(u,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=io(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=io(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Yi(r.domain()),u=null==n?i(e,10):"number"==typeof n?i(e,n):!n.range&&[{range:n},t];return u&&(n=u[0],t=u[1]),n.range(e[0],io(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return ro(n.copy(),t,e)},Ji(r,n)}function io(n){return new Date(n)}function uo(n){return JSON.parse(n.responseText)}function oo(n){var t=fo.createRange();return t.selectNode(fo.body),t.createContextualFragment(n.responseText)}var ao={version:"3.5.17"},lo=[].slice,co=function(n){return lo.call(n)},fo=this.document;if(fo)try{co(fo.documentElement.childNodes)[0].nodeType}catch(so){co=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),fo)try{fo.createElement("DIV").style.setProperty("opacity",0,"")}catch(ho){var po=this.Element.prototype,go=po.setAttribute,vo=po.setAttributeNS,yo=this.CSSStyleDeclaration.prototype,mo=yo.setProperty;po.setAttribute=function(n,t){go.call(this,n,t+"")},po.setAttributeNS=function(n,t,e){vo.call(this,n,t,e+"")},yo.setProperty=function(n,t,e){mo.call(this,n,t+"",e)}}ao.ascending=e,ao.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:NaN},ao.min=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i<u;)if(null!=(r=n[i])&&r>=r){e=r;break}for(;++i<u;)null!=(r=n[i])&&e>r&&(e=r)}else{for(;++i<u;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=r;break}for(;++i<u;)null!=(r=t.call(n,n[i],i))&&e>r&&(e=r)}return e},ao.max=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i<u;)if(null!=(r=n[i])&&r>=r){e=r;break}for(;++i<u;)null!=(r=n[i])&&r>e&&(e=r)}else{for(;++i<u;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=r;break}for(;++i<u;)null!=(r=t.call(n,n[i],i))&&r>e&&(e=r)}return e},ao.extent=function(n,t){var e,r,i,u=-1,o=n.length;if(1===arguments.length){for(;++u<o;)if(null!=(r=n[u])&&r>=r){e=i=r;break}for(;++u<o;)null!=(r=n[u])&&(e>r&&(e=r),r>i&&(i=r))}else{for(;++u<o;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=i=r;break}for(;++u<o;)null!=(r=t.call(n,n[u],u))&&(e>r&&(e=r),r>i&&(i=r))}return[e,i]},ao.sum=function(n,t){var e,r=0,u=n.length,o=-1;if(1===arguments.length)for(;++o<u;)i(e=+n[o])&&(r+=e);else for(;++o<u;)i(e=+t.call(n,n[o],o))&&(r+=e);return r},ao.mean=function(n,t){var e,u=0,o=n.length,a=-1,l=o;if(1===arguments.length)for(;++a<o;)i(e=r(n[a]))?u+=e:--l;else for(;++a<o;)i(e=r(t.call(n,n[a],a)))?u+=e:--l;return l?u/l:void 0},ao.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),i=+n[r-1],u=e-r;return u?i+u*(n[r]-i):i},ao.median=function(n,t){var u,o=[],a=n.length,l=-1;if(1===arguments.length)for(;++l<a;)i(u=r(n[l]))&&o.push(u);else for(;++l<a;)i(u=r(t.call(n,n[l],l)))&&o.push(u);return o.length?ao.quantile(o.sort(e),.5):void 0},ao.variance=function(n,t){var e,u,o=n.length,a=0,l=0,c=-1,f=0;if(1===arguments.length)for(;++c<o;)i(e=r(n[c]))&&(u=e-a,a+=u/++f,l+=u*(e-a));else for(;++c<o;)i(e=r(t.call(n,n[c],c)))&&(u=e-a,a+=u/++f,l+=u*(e-a));return f>1?l/(f-1):void 0},ao.deviation=function(){var n=ao.variance.apply(this,arguments);return n?Math.sqrt(n):n};var Mo=u(e);ao.bisectLeft=Mo.left,ao.bisect=ao.bisectRight=Mo.right,ao.bisector=function(n){return u(1===n.length?function(t,r){return e(n(t),r)}:n)},ao.shuffle=function(n,t,e){(u=arguments.length)<3&&(e=n.length,2>u&&(t=0));for(var r,i,u=e-t;u;)i=Math.random()*u--|0,r=n[u+t],n[u+t]=n[i+t],n[i+t]=r;return n},ao.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},ao.pairs=function(n){for(var t,e=0,r=n.length-1,i=n[0],u=new Array(0>r?0:r);r>e;)u[e]=[t=i,i=n[++e]];return u},ao.transpose=function(n){if(!(i=n.length))return[];for(var t=-1,e=ao.min(n,o),r=new Array(e);++t<e;)for(var i,u=-1,a=r[t]=new Array(i);++u<i;)a[u]=n[u][t];return r},ao.zip=function(){return ao.transpose(arguments)},ao.keys=function(n){var t=[];for(var e in n)t.push(e);return t},ao.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},ao.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},ao.merge=function(n){for(var t,e,r,i=n.length,u=-1,o=0;++u<i;)o+=n[u].length;for(e=new Array(o);--i>=0;)for(r=n[i],t=r.length;--t>=0;)e[--o]=r[t];return e};var xo=Math.abs;ao.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error("infinite range");var r,i=[],u=a(xo(e)),o=-1;if(n*=u,t*=u,e*=u,0>e)for(;(r=n+e*++o)>t;)i.push(r/u);else for(;(r=n+e*++o)<t;)i.push(r/u);return i},ao.map=function(n,t){var e=new c;if(n instanceof c)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,i=-1,u=n.length;if(1===arguments.length)for(;++i<u;)e.set(i,n[i]);else for(;++i<u;)e.set(t.call(n,r=n[i],i),r)}else for(var o in n)e.set(o,n[o]);return e};var bo="__proto__",_o="\x00";l(c,{has:h,get:function(n){return this._[f(n)]},set:function(n,t){return this._[f(n)]=t},remove:p,keys:g,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:s(t),value:this._[t]});return n},size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,s(t),this._[t])}}),ao.nest=function(){function n(t,o,a){if(a>=u.length)return r?r.call(i,o):e?o.sort(e):o;for(var l,f,s,h,p=-1,g=o.length,v=u[a++],d=new c;++p<g;)(h=d.get(l=v(f=o[p])))?h.push(f):d.set(l,[f]);return t?(f=t(),s=function(e,r){f.set(e,n(t,r,a))}):(f={},s=function(e,r){f[e]=n(t,r,a)}),d.forEach(s),f}function t(n,e){if(e>=u.length)return n;var r=[],i=o[e++];return n.forEach(function(n,i){r.push({key:n,values:t(i,e)})}),i?r.sort(function(n,t){return i(n.key,t.key)}):r}var e,r,i={},u=[],o=[];return i.map=function(t,e){return n(e,t,0)},i.entries=function(e){return t(n(ao.map,e,0),0)},i.key=function(n){return u.push(n),i},i.sortKeys=function(n){return o[u.length-1]=n,i},i.sortValues=function(n){return e=n,i},i.rollup=function(n){return r=n,i},i},ao.set=function(n){var t=new y;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},l(y,{has:h,add:function(n){return this._[f(n+="")]=!0,n},remove:p,values:g,size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,s(t))}}),ao.behavior={},ao.rebind=function(n,t){for(var e,r=1,i=arguments.length;++r<i;)n[e=arguments[r]]=M(n,t,t[e]);return n};var wo=["webkit","ms","moz","Moz","o","O"];ao.dispatch=function(){for(var n=new _,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=w(n);return n},_.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},ao.event=null,ao.requote=function(n){return n.replace(So,"\\$&")};var So=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,ko={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},No=function(n,t){return t.querySelector(n)},Eo=function(n,t){return t.querySelectorAll(n)},Ao=function(n,t){var e=n.matches||n[x(n,"matchesSelector")];return(Ao=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(No=function(n,t){return Sizzle(n,t)[0]||null},Eo=Sizzle,Ao=Sizzle.matchesSelector),ao.selection=function(){return ao.select(fo.documentElement)};var Co=ao.selection.prototype=[];Co.select=function(n){var t,e,r,i,u=[];n=A(n);for(var o=-1,a=this.length;++o<a;){u.push(t=[]),t.parentNode=(r=this[o]).parentNode;for(var l=-1,c=r.length;++l<c;)(i=r[l])?(t.push(e=n.call(i,i.__data__,l,o)),e&&"__data__"in i&&(e.__data__=i.__data__)):t.push(null)}return E(u)},Co.selectAll=function(n){var t,e,r=[];n=C(n);for(var i=-1,u=this.length;++i<u;)for(var o=this[i],a=-1,l=o.length;++a<l;)(e=o[a])&&(r.push(t=co(n.call(e,e.__data__,a,i))),t.parentNode=e);return E(r)};var zo="http://www.w3.org/1999/xhtml",Lo={svg:"http://www.w3.org/2000/svg",xhtml:zo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};ao.ns={prefix:Lo,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),Lo.hasOwnProperty(e)?{space:Lo[e],local:n}:n}},Co.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=ao.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},Co.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,i=-1;if(t=e.classList){for(;++i<r;)if(!t.contains(n[i]))return!1}else for(t=e.getAttribute("class");++i<r;)if(!q(n[i]).test(t))return!1;return!0}for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},Co.style=function(n,e,r){var i=arguments.length;if(3>i){if("string"!=typeof n){2>i&&(e="");for(r in n)this.each(P(r,n[r],e));return this}if(2>i){var u=this.node();return t(u).getComputedStyle(u,null).getPropertyValue(n)}r=""}return this.each(P(n,e,r))},Co.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(U(t,n[t]));return this}return this.each(U(n,t))},Co.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},Co.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},Co.append=function(n){return n=j(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},Co.insert=function(n,t){return n=j(n),t=A(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},Co.remove=function(){return this.each(F)},Co.data=function(n,t){function e(n,e){var r,i,u,o=n.length,s=e.length,h=Math.min(o,s),p=new Array(s),g=new Array(s),v=new Array(o);if(t){var d,y=new c,m=new Array(o);for(r=-1;++r<o;)(i=n[r])&&(y.has(d=t.call(i,i.__data__,r))?v[r]=i:y.set(d,i),m[r]=d);for(r=-1;++r<s;)(i=y.get(d=t.call(e,u=e[r],r)))?i!==!0&&(p[r]=i,i.__data__=u):g[r]=H(u),y.set(d,!0);for(r=-1;++r<o;)r in m&&y.get(m[r])!==!0&&(v[r]=n[r])}else{for(r=-1;++r<h;)i=n[r],u=e[r],i?(i.__data__=u,p[r]=i):g[r]=H(u);for(;s>r;++r)g[r]=H(e[r]);for(;o>r;++r)v[r]=n[r]}g.update=p,g.parentNode=p.parentNode=v.parentNode=n.parentNode,a.push(g),l.push(p),f.push(v)}var r,i,u=-1,o=this.length;if(!arguments.length){for(n=new Array(o=(r=this[0]).length);++u<o;)(i=r[u])&&(n[u]=i.__data__);return n}var a=Z([]),l=E([]),f=E([]);if("function"==typeof n)for(;++u<o;)e(r=this[u],n.call(r,r.parentNode.__data__,u));else for(;++u<o;)e(r=this[u],n);return l.enter=function(){return a},l.exit=function(){return f},l},Co.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},Co.filter=function(n){var t,e,r,i=[];"function"!=typeof n&&(n=O(n));for(var u=0,o=this.length;o>u;u++){i.push(t=[]),t.parentNode=(e=this[u]).parentNode;for(var a=0,l=e.length;l>a;a++)(r=e[a])&&n.call(r,r.__data__,a,u)&&t.push(r)}return E(i)},Co.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],i=r.length-1,u=r[i];--i>=0;)(e=r[i])&&(u&&u!==e.nextSibling&&u.parentNode.insertBefore(e,u),u=e);return this},Co.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},Co.each=function(n){return Y(this,function(t,e,r){n.call(t,t.__data__,e,r)})},Co.call=function(n){var t=co(arguments);return n.apply(t[0]=this,t),this},Co.empty=function(){return!this.node()},Co.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,i=e.length;i>r;r++){var u=e[r];if(u)return u}return null},Co.size=function(){var n=0;return Y(this,function(){++n}),n};var qo=[];ao.selection.enter=Z,ao.selection.enter.prototype=qo,qo.append=Co.append,qo.empty=Co.empty,qo.node=Co.node,qo.call=Co.call,qo.size=Co.size,qo.select=function(n){for(var t,e,r,i,u,o=[],a=-1,l=this.length;++a<l;){r=(i=this[a]).update,o.push(t=[]),t.parentNode=i.parentNode;for(var c=-1,f=i.length;++c<f;)(u=i[c])?(t.push(r[c]=e=n.call(i.parentNode,u.__data__,c,a)),e.__data__=u.__data__):t.push(null)}return E(o)},qo.insert=function(n,t){return arguments.length<2&&(t=V(this)),Co.insert.call(this,n,t)},ao.select=function(t){var e;return"string"==typeof t?(e=[No(t,fo)],e.parentNode=fo.documentElement):(e=[t],e.parentNode=n(t)),E([e])},ao.selectAll=function(n){var t;return"string"==typeof n?(t=co(Eo(n,fo)),t.parentNode=fo.documentElement):(t=co(n),t.parentNode=null),E([t])},Co.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(X(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(X(n,t,e))};var To=ao.map({mouseenter:"mouseover",mouseleave:"mouseout"});fo&&To.forEach(function(n){"on"+n in fo&&To.remove(n)});var Ro,Do=0;ao.mouse=function(n){return J(n,k())};var Po=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;ao.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=k().changedTouches),t)for(var r,i=0,u=t.length;u>i;++i)if((r=t[i]).identifier===e)return J(n,r)},ao.behavior.drag=function(){function n(){this.on("mousedown.drag",u).on("touchstart.drag",o)}function e(n,t,e,u,o){return function(){function a(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],g|=n|e,M=r,p({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:n,dy:e}))}function l(){t(h,v)&&(y.on(u+d,null).on(o+d,null),m(g),p({type:"dragend"}))}var c,f=this,s=ao.event.target.correspondingElement||ao.event.target,h=f.parentNode,p=r.of(f,arguments),g=0,v=n(),d=".drag"+(null==v?"":"-"+v),y=ao.select(e(s)).on(u+d,a).on(o+d,l),m=W(s),M=t(h,v);i?(c=i.apply(f,arguments),c=[c.x-M[0],c.y-M[1]]):c=[0,0],p({type:"dragstart"})}}var r=N(n,"drag","dragstart","dragend"),i=null,u=e(b,ao.mouse,t,"mousemove","mouseup"),o=e(G,ao.touch,m,"touchmove","touchend");return n.origin=function(t){return arguments.length?(i=t,n):i},ao.rebind(n,r,"on")},ao.touches=function(n,t){return arguments.length<2&&(t=k().touches),t?co(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var Uo=1e-6,jo=Uo*Uo,Fo=Math.PI,Ho=2*Fo,Oo=Ho-Uo,Io=Fo/2,Yo=Fo/180,Zo=180/Fo,Vo=Math.SQRT2,Xo=2,$o=4;ao.interpolateZoom=function(n,t){var e,r,i=n[0],u=n[1],o=n[2],a=t[0],l=t[1],c=t[2],f=a-i,s=l-u,h=f*f+s*s;if(jo>h)r=Math.log(c/o)/Vo,e=function(n){return[i+n*f,u+n*s,o*Math.exp(Vo*n*r)]};else{var p=Math.sqrt(h),g=(c*c-o*o+$o*h)/(2*o*Xo*p),v=(c*c-o*o-$o*h)/(2*c*Xo*p),d=Math.log(Math.sqrt(g*g+1)-g),y=Math.log(Math.sqrt(v*v+1)-v);r=(y-d)/Vo,e=function(n){var t=n*r,e=rn(d),a=o/(Xo*p)*(e*un(Vo*t+d)-en(d));return[i+a*f,u+a*s,o*e/rn(Vo*t+d)]}}return e.duration=1e3*r,e},ao.behavior.zoom=function(){function n(n){n.on(L,s).on(Wo+".zoom",p).on("dblclick.zoom",g).on(R,h)}function e(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function i(n){k.k=Math.max(A[0],Math.min(A[1],n))}function u(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function o(t,e,r,o){t.__chart__={x:k.x,y:k.y,k:k.k},i(Math.pow(2,o)),u(d=e,r),t=ao.select(t),C>0&&(t=t.transition().duration(C)),t.call(n.event)}function a(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function l(n){z++||n({type:"zoomstart"})}function c(n){a(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function f(n){--z||(n({type:"zoomend"}),d=null)}function s(){function n(){a=1,u(ao.mouse(i),h),c(o)}function r(){s.on(q,null).on(T,null),p(a),f(o)}var i=this,o=D.of(i,arguments),a=0,s=ao.select(t(i)).on(q,n).on(T,r),h=e(ao.mouse(i)),p=W(i);Il.call(i),l(o)}function h(){function n(){var n=ao.touches(g);return p=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=ao.event.target;ao.select(t).on(x,r).on(b,a),_.push(t);for(var e=ao.event.changedTouches,i=0,u=e.length;u>i;++i)d[e[i].identifier]=null;var l=n(),c=Date.now();if(1===l.length){if(500>c-M){var f=l[0];o(g,f,d[f.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}M=c}else if(l.length>1){var f=l[0],s=l[1],h=f[0]-s[0],p=f[1]-s[1];y=h*h+p*p}}function r(){var n,t,e,r,o=ao.touches(g);Il.call(g);for(var a=0,l=o.length;l>a;++a,r=null)if(e=o[a],r=d[e.identifier]){if(t)break;n=e,t=r}if(r){var f=(f=e[0]-n[0])*f+(f=e[1]-n[1])*f,s=y&&Math.sqrt(f/y);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],i(s*p)}M=null,u(n,t),c(v)}function a(){if(ao.event.touches.length){for(var t=ao.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var i in d)return void n()}ao.selectAll(_).on(m,null),w.on(L,s).on(R,h),N(),f(v)}var p,g=this,v=D.of(g,arguments),d={},y=0,m=".zoom-"+ao.event.changedTouches[0].identifier,x="touchmove"+m,b="touchend"+m,_=[],w=ao.select(g),N=W(g);t(),l(v),w.on(L,null).on(R,t)}function p(){var n=D.of(this,arguments);m?clearTimeout(m):(Il.call(this),v=e(d=y||ao.mouse(this)),l(n)),m=setTimeout(function(){m=null,f(n)},50),S(),i(Math.pow(2,.002*Bo())*k.k),u(d,v),c(n)}function g(){var n=ao.mouse(this),t=Math.log(k.k)/Math.LN2;o(this,n,e(n),ao.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,d,y,m,M,x,b,_,w,k={x:0,y:0,k:1},E=[960,500],A=Jo,C=250,z=0,L="mousedown.zoom",q="mousemove.zoom",T="mouseup.zoom",R="touchstart.zoom",D=N(n,"zoomstart","zoom","zoomend");return Wo||(Wo="onwheel"in fo?(Bo=function(){return-ao.event.deltaY*(ao.event.deltaMode?120:1)},"wheel"):"onmousewheel"in fo?(Bo=function(){return ao.event.wheelDelta},"mousewheel"):(Bo=function(){return-ao.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=D.of(this,arguments),t=k;Hl?ao.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},l(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],i=d?d[0]:e/2,u=d?d[1]:r/2,o=ao.interpolateZoom([(i-k.x)/k.k,(u-k.y)/k.k,e/k.k],[(i-t.x)/t.k,(u-t.y)/t.k,e/t.k]);return function(t){var r=o(t),a=e/r[2];this.__chart__=k={x:i-r[0]*a,y:u-r[1]*a,k:a},c(n)}}).each("interrupt.zoom",function(){f(n)}).each("end.zoom",function(){f(n)}):(this.__chart__=k,l(n),c(n),f(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},a(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:null},i(+t),a(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Jo:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(y=t&&[+t[0],+t[1]],n):y},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.duration=function(t){return arguments.length?(C=+t,n):C},n.x=function(t){return arguments.length?(b=t,x=t.copy(),k={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(w=t,_=t.copy(),k={x:0,y:0,k:1},n):w},ao.rebind(n,D,"on")};var Bo,Wo,Jo=[0,1/0];ao.color=an,an.prototype.toString=function(){return this.rgb()+""},ao.hsl=ln;var Go=ln.prototype=new an;Go.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,this.l/n)},Go.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,n*this.l)},Go.rgb=function(){return cn(this.h,this.s,this.l)},ao.hcl=fn;var Ko=fn.prototype=new an;Ko.brighter=function(n){return new fn(this.h,this.c,Math.min(100,this.l+Qo*(arguments.length?n:1)))},Ko.darker=function(n){return new fn(this.h,this.c,Math.max(0,this.l-Qo*(arguments.length?n:1)))},Ko.rgb=function(){return sn(this.h,this.c,this.l).rgb()},ao.lab=hn;var Qo=18,na=.95047,ta=1,ea=1.08883,ra=hn.prototype=new an;ra.brighter=function(n){return new hn(Math.min(100,this.l+Qo*(arguments.length?n:1)),this.a,this.b)},ra.darker=function(n){return new hn(Math.max(0,this.l-Qo*(arguments.length?n:1)),this.a,this.b)},ra.rgb=function(){return pn(this.l,this.a,this.b)},ao.rgb=mn;var ia=mn.prototype=new an;ia.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,i=30;return t||e||r?(t&&i>t&&(t=i),e&&i>e&&(e=i),r&&i>r&&(r=i),new mn(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new mn(i,i,i)},ia.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new mn(n*this.r,n*this.g,n*this.b)},ia.hsl=function(){return wn(this.r,this.g,this.b)},ia.toString=function(){return"#"+bn(this.r)+bn(this.g)+bn(this.b)};var ua=ao.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});ua.forEach(function(n,t){ua.set(n,Mn(t))}),ao.functor=En,ao.xhr=An(m),ao.dsv=function(n,t){function e(n,e,u){arguments.length<3&&(u=e,e=null);var o=Cn(n,t,null==e?r:i(e),u);return o.row=function(n){return arguments.length?o.response(null==(e=n)?r:i(n)):e},o}function r(n){return e.parse(n.responseText)}function i(n){return function(t){return e.parse(t.responseText,n)}}function u(t){return t.map(o).join(n)}function o(n){return a.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var a=new RegExp('["'+n+"\n]"),l=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var i=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(i(n),e)}:i})},e.parseRows=function(n,t){function e(){if(f>=c)return o;if(i)return i=!1,u;var t=f;if(34===n.charCodeAt(t)){for(var e=t;e++<c;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}f=e+2;var r=n.charCodeAt(e+1);return 13===r?(i=!0,10===n.charCodeAt(e+2)&&++f):10===r&&(i=!0),n.slice(t+1,e).replace(/""/g,'"')}for(;c>f;){var r=n.charCodeAt(f++),a=1;if(10===r)i=!0;else if(13===r)i=!0,10===n.charCodeAt(f)&&(++f,++a);else if(r!==l)continue;return n.slice(t,f-a)}return n.slice(t)}for(var r,i,u={},o={},a=[],c=n.length,f=0,s=0;(r=e())!==o;){for(var h=[];r!==u&&r!==o;)h.push(r),r=e();t&&null==(h=t(h,s++))||a.push(h)}return a},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new y,i=[];return t.forEach(function(n){for(var t in n)r.has(t)||i.push(r.add(t))}),[i.map(o).join(n)].concat(t.map(function(t){return i.map(function(n){return o(t[n])}).join(n)})).join("\n")},e.formatRows=function(n){return n.map(u).join("\n")},e},ao.csv=ao.dsv(",","text/csv"),ao.tsv=ao.dsv(" ","text/tab-separated-values");var oa,aa,la,ca,fa=this[x(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};ao.timer=function(){qn.apply(this,arguments)},ao.timer.flush=function(){Rn(),Dn()},ao.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var sa=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Un);ao.formatPrefix=function(n,t){var e=0;return(n=+n)&&(0>n&&(n*=-1),t&&(n=ao.round(n,Pn(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),sa[8+e/3]};var ha=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,pa=ao.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=ao.round(n,Pn(n,t))).toFixed(Math.max(0,Math.min(20,Pn(n*(1+1e-15),t))))}}),ga=ao.time={},va=Date;Hn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){da.setUTCDate.apply(this._,arguments)},setDay:function(){da.setUTCDay.apply(this._,arguments)},setFullYear:function(){da.setUTCFullYear.apply(this._,arguments)},setHours:function(){da.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){da.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){da.setUTCMinutes.apply(this._,arguments)},setMonth:function(){da.setUTCMonth.apply(this._,arguments)},setSeconds:function(){da.setUTCSeconds.apply(this._,arguments)},setTime:function(){da.setTime.apply(this._,arguments)}};var da=Date.prototype;ga.year=On(function(n){return n=ga.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),ga.years=ga.year.range,ga.years.utc=ga.year.utc.range,ga.day=On(function(n){var t=new va(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),ga.days=ga.day.range,ga.days.utc=ga.day.utc.range,ga.dayOfYear=function(n){var t=ga.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=ga[n]=On(function(n){return(n=ga.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=ga.year(n).getDay();return Math.floor((ga.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});ga[n+"s"]=e.range,ga[n+"s"].utc=e.utc.range,ga[n+"OfYear"]=function(n){var e=ga.year(n).getDay();return Math.floor((ga.dayOfYear(n)+(e+t)%7)/7)}}),ga.week=ga.sunday,ga.weeks=ga.sunday.range,ga.weeks.utc=ga.sunday.utc.range,ga.weekOfYear=ga.sundayOfYear;var ya={"-":"",_:" ",0:"0"},ma=/^\s*\d+/,Ma=/^%/;ao.locale=function(n){return{numberFormat:jn(n),timeFormat:Yn(n)}};var xa=ao.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"], +shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});ao.format=xa.numberFormat,ao.geo={},ft.prototype={s:0,t:0,add:function(n){st(n,this.t,ba),st(ba.s,this.s,this),this.s?this.t+=ba.t:this.s=ba.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var ba=new ft;ao.geo.stream=function(n,t){n&&_a.hasOwnProperty(n.type)?_a[n.type](n,t):ht(n,t)};var _a={Feature:function(n,t){ht(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++r<i;)ht(e[r].geometry,t)}},wa={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){pt(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)pt(e[r],t,0)},Polygon:function(n,t){gt(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)gt(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,i=e.length;++r<i;)ht(e[r],t)}};ao.geo.area=function(n){return Sa=0,ao.geo.stream(n,Na),Sa};var Sa,ka=new ft,Na={sphere:function(){Sa+=4*Fo},point:b,lineStart:b,lineEnd:b,polygonStart:function(){ka.reset(),Na.lineStart=vt},polygonEnd:function(){var n=2*ka;Sa+=0>n?4*Fo+n:n,Na.lineStart=Na.lineEnd=Na.point=b}};ao.geo.bounds=function(){function n(n,t){M.push(x=[f=n,h=n]),s>t&&(s=t),t>p&&(p=t)}function t(t,e){var r=dt([t*Yo,e*Yo]);if(y){var i=mt(y,r),u=[i[1],-i[0],0],o=mt(u,i);bt(o),o=_t(o);var l=t-g,c=l>0?1:-1,v=o[0]*Zo*c,d=xo(l)>180;if(d^(v>c*g&&c*t>v)){var m=o[1]*Zo;m>p&&(p=m)}else if(v=(v+360)%360-180,d^(v>c*g&&c*t>v)){var m=-o[1]*Zo;s>m&&(s=m)}else s>e&&(s=e),e>p&&(p=e);d?g>t?a(f,t)>a(f,h)&&(h=t):a(t,h)>a(f,h)&&(f=t):h>=f?(f>t&&(f=t),t>h&&(h=t)):t>g?a(f,t)>a(f,h)&&(h=t):a(t,h)>a(f,h)&&(f=t)}else n(t,e);y=r,g=t}function e(){b.point=t}function r(){x[0]=f,x[1]=h,b.point=n,y=null}function i(n,e){if(y){var r=n-g;m+=xo(r)>180?r+(r>0?360:-360):r}else v=n,d=e;Na.point(n,e),t(n,e)}function u(){Na.lineStart()}function o(){i(v,d),Na.lineEnd(),xo(m)>Uo&&(f=-(h=180)),x[0]=f,x[1]=h,y=null}function a(n,t){return(t-=n)<0?t+360:t}function l(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var f,s,h,p,g,v,d,y,m,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=i,b.lineStart=u,b.lineEnd=o,m=0,Na.polygonStart()},polygonEnd:function(){Na.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>ka?(f=-(h=180),s=-(p=90)):m>Uo?p=90:-Uo>m&&(s=-90),x[0]=f,x[1]=h}};return function(n){p=h=-(f=s=1/0),M=[],ao.geo.stream(n,b);var t=M.length;if(t){M.sort(l);for(var e,r=1,i=M[0],u=[i];t>r;++r)e=M[r],c(e[0],i)||c(e[1],i)?(a(i[0],e[1])>a(i[0],i[1])&&(i[1]=e[1]),a(e[0],i[1])>a(i[0],i[1])&&(i[0]=e[0])):u.push(i=e);for(var o,e,g=-(1/0),t=u.length-1,r=0,i=u[t];t>=r;i=e,++r)e=u[r],(o=a(i[1],e[0]))>g&&(g=o,f=e[0],h=i[1])}return M=x=null,f===1/0||s===1/0?[[NaN,NaN],[NaN,NaN]]:[[f,s],[h,p]]}}(),ao.geo.centroid=function(n){Ea=Aa=Ca=za=La=qa=Ta=Ra=Da=Pa=Ua=0,ao.geo.stream(n,ja);var t=Da,e=Pa,r=Ua,i=t*t+e*e+r*r;return jo>i&&(t=qa,e=Ta,r=Ra,Uo>Aa&&(t=Ca,e=za,r=La),i=t*t+e*e+r*r,jo>i)?[NaN,NaN]:[Math.atan2(e,t)*Zo,tn(r/Math.sqrt(i))*Zo]};var Ea,Aa,Ca,za,La,qa,Ta,Ra,Da,Pa,Ua,ja={sphere:b,point:St,lineStart:Nt,lineEnd:Et,polygonStart:function(){ja.lineStart=At},polygonEnd:function(){ja.lineStart=Nt}},Fa=Rt(zt,jt,Ht,[-Fo,-Fo/2]),Ha=1e9;ao.geo.clipExtent=function(){var n,t,e,r,i,u,o={stream:function(n){return i&&(i.valid=!1),i=u(n),i.valid=!0,i},extent:function(a){return arguments.length?(u=Zt(n=+a[0][0],t=+a[0][1],e=+a[1][0],r=+a[1][1]),i&&(i.valid=!1,i=null),o):[[n,t],[e,r]]}};return o.extent([[0,0],[960,500]])},(ao.geo.conicEqualArea=function(){return Vt(Xt)}).raw=Xt,ao.geo.albers=function(){return ao.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},ao.geo.albersUsa=function(){function n(n){var u=n[0],o=n[1];return t=null,e(u,o),t||(r(u,o),t)||i(u,o),t}var t,e,r,i,u=ao.geo.albers(),o=ao.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=ao.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=u.scale(),e=u.translate(),r=(n[0]-e[0])/t,i=(n[1]-e[1])/t;return(i>=.12&&.234>i&&r>=-.425&&-.214>r?o:i>=.166&&.234>i&&r>=-.214&&-.115>r?a:u).invert(n)},n.stream=function(n){var t=u.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,i){t.point(n,i),e.point(n,i),r.point(n,i)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(u.precision(t),o.precision(t),a.precision(t),n):u.precision()},n.scale=function(t){return arguments.length?(u.scale(t),o.scale(.35*t),a.scale(t),n.translate(u.translate())):u.scale()},n.translate=function(t){if(!arguments.length)return u.translate();var c=u.scale(),f=+t[0],s=+t[1];return e=u.translate(t).clipExtent([[f-.455*c,s-.238*c],[f+.455*c,s+.238*c]]).stream(l).point,r=o.translate([f-.307*c,s+.201*c]).clipExtent([[f-.425*c+Uo,s+.12*c+Uo],[f-.214*c-Uo,s+.234*c-Uo]]).stream(l).point,i=a.translate([f-.205*c,s+.212*c]).clipExtent([[f-.214*c+Uo,s+.166*c+Uo],[f-.115*c-Uo,s+.234*c-Uo]]).stream(l).point,n},n.scale(1070)};var Oa,Ia,Ya,Za,Va,Xa,$a={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Ia=0,$a.lineStart=$t},polygonEnd:function(){$a.lineStart=$a.lineEnd=$a.point=b,Oa+=xo(Ia/2)}},Ba={point:Bt,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Wa={point:Gt,lineStart:Kt,lineEnd:Qt,polygonStart:function(){Wa.lineStart=ne},polygonEnd:function(){Wa.point=Gt,Wa.lineStart=Kt,Wa.lineEnd=Qt}};ao.geo.path=function(){function n(n){return n&&("function"==typeof a&&u.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=i(u)),ao.geo.stream(n,o)),u.result()}function t(){return o=null,n}var e,r,i,u,o,a=4.5;return n.area=function(n){return Oa=0,ao.geo.stream(n,i($a)),Oa},n.centroid=function(n){return Ca=za=La=qa=Ta=Ra=Da=Pa=Ua=0,ao.geo.stream(n,i(Wa)),Ua?[Da/Ua,Pa/Ua]:Ra?[qa/Ra,Ta/Ra]:La?[Ca/La,za/La]:[NaN,NaN]},n.bounds=function(n){return Va=Xa=-(Ya=Za=1/0),ao.geo.stream(n,i(Ba)),[[Ya,Za],[Va,Xa]]},n.projection=function(n){return arguments.length?(i=(e=n)?n.stream||re(n):m,t()):e},n.context=function(n){return arguments.length?(u=null==(r=n)?new Wt:new te(n),"function"!=typeof a&&u.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(u.pointRadius(+t),+t),n):a},n.projection(ao.geo.albersUsa()).context(null)},ao.geo.transform=function(n){return{stream:function(t){var e=new ie(t);for(var r in n)e[r]=n[r];return e}}},ie.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},ao.geo.projection=oe,ao.geo.projectionMutator=ae,(ao.geo.equirectangular=function(){return oe(ce)}).raw=ce.invert=ce,ao.geo.rotation=function(n){function t(t){return t=n(t[0]*Yo,t[1]*Yo),t[0]*=Zo,t[1]*=Zo,t}return n=se(n[0]%360*Yo,n[1]*Yo,n.length>2?n[2]*Yo:0),t.invert=function(t){return t=n.invert(t[0]*Yo,t[1]*Yo),t[0]*=Zo,t[1]*=Zo,t},t},fe.invert=ce,ao.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=se(-n[0]*Yo,-n[1]*Yo,0).invert,i=[];return e(null,null,1,{point:function(n,e){i.push(n=t(n,e)),n[0]*=Zo,n[1]*=Zo}}),{type:"Polygon",coordinates:[i]}}var t,e,r=[0,0],i=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=ve((t=+r)*Yo,i*Yo),n):t},n.precision=function(r){return arguments.length?(e=ve(t*Yo,(i=+r)*Yo),n):i},n.angle(90)},ao.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Yo,i=n[1]*Yo,u=t[1]*Yo,o=Math.sin(r),a=Math.cos(r),l=Math.sin(i),c=Math.cos(i),f=Math.sin(u),s=Math.cos(u);return Math.atan2(Math.sqrt((e=s*o)*e+(e=c*f-l*s*a)*e),l*f+c*s*a)},ao.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return ao.range(Math.ceil(u/d)*d,i,d).map(h).concat(ao.range(Math.ceil(c/y)*y,l,y).map(p)).concat(ao.range(Math.ceil(r/g)*g,e,g).filter(function(n){return xo(n%d)>Uo}).map(f)).concat(ao.range(Math.ceil(a/v)*v,o,v).filter(function(n){return xo(n%y)>Uo}).map(s))}var e,r,i,u,o,a,l,c,f,s,h,p,g=10,v=g,d=90,y=360,m=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(u).concat(p(l).slice(1),h(i).reverse().slice(1),p(c).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(u=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],u>i&&(t=u,u=i,i=t),c>l&&(t=c,c=l,l=t),n.precision(m)):[[u,c],[i,l]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),n.precision(m)):[[r,a],[e,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],y=+t[1],n):[d,y]},n.minorStep=function(t){return arguments.length?(g=+t[0],v=+t[1],n):[g,v]},n.precision=function(t){return arguments.length?(m=+t,f=ye(a,o,90),s=me(r,e,m),h=ye(c,l,90),p=me(u,i,m),n):m},n.majorExtent([[-180,-90+Uo],[180,90-Uo]]).minorExtent([[-180,-80-Uo],[180,80+Uo]])},ao.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||i.apply(this,arguments)]}}var t,e,r=Me,i=xe;return n.distance=function(){return ao.geo.distance(t||r.apply(this,arguments),e||i.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(i=t,e="function"==typeof t?null:t,n):i},n.precision=function(){return arguments.length?n:0},n},ao.geo.interpolate=function(n,t){return be(n[0]*Yo,n[1]*Yo,t[0]*Yo,t[1]*Yo)},ao.geo.length=function(n){return Ja=0,ao.geo.stream(n,Ga),Ja};var Ja,Ga={sphere:b,point:b,lineStart:_e,lineEnd:b,polygonStart:b,polygonEnd:b},Ka=we(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(ao.geo.azimuthalEqualArea=function(){return oe(Ka)}).raw=Ka;var Qa=we(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},m);(ao.geo.azimuthalEquidistant=function(){return oe(Qa)}).raw=Qa,(ao.geo.conicConformal=function(){return Vt(Se)}).raw=Se,(ao.geo.conicEquidistant=function(){return Vt(ke)}).raw=ke;var nl=we(function(n){return 1/n},Math.atan);(ao.geo.gnomonic=function(){return oe(nl)}).raw=nl,Ne.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Io]},(ao.geo.mercator=function(){return Ee(Ne)}).raw=Ne;var tl=we(function(){return 1},Math.asin);(ao.geo.orthographic=function(){return oe(tl)}).raw=tl;var el=we(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(ao.geo.stereographic=function(){return oe(el)}).raw=el,Ae.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Io]},(ao.geo.transverseMercator=function(){var n=Ee(Ae),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ae,ao.geom={},ao.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,i=En(e),u=En(r),o=n.length,a=[],l=[];for(t=0;o>t;t++)a.push([+i.call(this,n[t],t),+u.call(this,n[t],t),t]);for(a.sort(qe),t=0;o>t;t++)l.push([a[t][0],-a[t][1]]);var c=Le(a),f=Le(l),s=f[0]===c[0],h=f[f.length-1]===c[c.length-1],p=[];for(t=c.length-1;t>=0;--t)p.push(n[a[c[t]][2]]);for(t=+s;t<f.length-h;++t)p.push(n[a[f[t]][2]]);return p}var e=Ce,r=ze;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},ao.geom.polygon=function(n){return ko(n,rl),n};var rl=ao.geom.polygon.prototype=[];rl.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],i=0;++t<e;)n=r,r=this[t],i+=n[1]*r[0]-n[0]*r[1];return.5*i},rl.centroid=function(n){var t,e,r=-1,i=this.length,u=0,o=0,a=this[i-1];for(arguments.length||(n=-1/(6*this.area()));++r<i;)t=a,a=this[r],e=t[0]*a[1]-a[0]*t[1],u+=(t[0]+a[0])*e,o+=(t[1]+a[1])*e;return[u*n,o*n]},rl.clip=function(n){for(var t,e,r,i,u,o,a=De(n),l=-1,c=this.length-De(this),f=this[c-1];++l<c;){for(t=n.slice(),n.length=0,i=this[l],u=t[(r=t.length-a)-1],e=-1;++e<r;)o=t[e],Te(o,f,i)?(Te(u,f,i)||n.push(Re(u,o,f,i)),n.push(o)):Te(u,f,i)&&n.push(Re(u,o,f,i)),u=o;a&&n.push(n[0]),f=i}return n};var il,ul,ol,al,ll,cl=[],fl=[];Ye.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Ve),t.length},tr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},er.prototype={insert:function(n,t){var e,r,i;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=or(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(i=r.R,i&&i.C?(e.C=i.C=!1,r.C=!0,n=r):(n===e.R&&(ir(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ur(this,r))):(i=r.L,i&&i.C?(e.C=i.C=!1,r.C=!0,n=r):(n===e.L&&(ur(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ir(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,i=n.U,u=n.L,o=n.R;if(e=u?o?or(o):u:o,i?i.L===n?i.L=e:i.R=e:this._=e,u&&o?(r=e.C,e.C=n.C,e.L=u,u.U=e,e!==o?(i=e.U,e.U=n.U,n=e.R,i.L=n,e.R=o,o.U=e):(e.U=i,i=e,n=e.R)):(r=n.C,n=e),n&&(n.U=i),!r){if(n&&n.C)return void(n.C=!1);do{if(n===this._)break;if(n===i.L){if(t=i.R,t.C&&(t.C=!1,i.C=!0,ir(this,i),t=i.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,ur(this,t),t=i.R),t.C=i.C,i.C=t.R.C=!1,ir(this,i),n=this._;break}}else if(t=i.L,t.C&&(t.C=!1,i.C=!0,ur(this,i),t=i.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ir(this,t),t=i.L),t.C=i.C,i.C=t.L.C=!1,ur(this,i),n=this._;break}t.C=!0,n=i,i=i.U}while(!n.C);n&&(n.C=!1)}}},ao.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=a[0][0],i=a[0][1],u=a[1][0],o=a[1][1];return ar(e(n),a).cells.forEach(function(e,a){var l=e.edges,c=e.site,f=t[a]=l.length?l.map(function(n){var t=n.start();return[t.x,t.y]}):c.x>=r&&c.x<=u&&c.y>=i&&c.y<=o?[[r,o],[u,o],[u,i],[r,i]]:[];f.point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(u(n,t)/Uo)*Uo,y:Math.round(o(n,t)/Uo)*Uo,i:t}})}var r=Ce,i=ze,u=r,o=i,a=sl;return n?t(n):(t.links=function(n){return ar(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return ar(e(n)).cells.forEach(function(e,r){for(var i,u,o=e.site,a=e.edges.sort(Ve),l=-1,c=a.length,f=a[c-1].edge,s=f.l===o?f.r:f.l;++l<c;)i=f,u=s,f=a[l].edge,s=f.l===o?f.r:f.l,r<u.i&&r<s.i&&cr(o,u,s)<0&&t.push([n[r],n[u.i],n[s.i]])}),t},t.x=function(n){return arguments.length?(u=En(r=n),t):r},t.y=function(n){return arguments.length?(o=En(i=n),t):i},t.clipExtent=function(n){return arguments.length?(a=null==n?sl:n,t):a===sl?null:a},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):a===sl?null:a&&a[1]},t)};var sl=[[-1e6,-1e6],[1e6,1e6]];ao.geom.delaunay=function(n){return ao.geom.voronoi().triangles(n)},ao.geom.quadtree=function(n,t,e,r,i){function u(n){function u(n,t,e,r,i,u,o,a){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var l=n.x,f=n.y;if(null!=l)if(xo(l-e)+xo(f-r)<.01)c(n,t,e,r,i,u,o,a);else{var s=n.point;n.x=n.y=n.point=null,c(n,s,l,f,i,u,o,a),c(n,t,e,r,i,u,o,a)}else n.x=e,n.y=r,n.point=t}else c(n,t,e,r,i,u,o,a)}function c(n,t,e,r,i,o,a,l){var c=.5*(i+a),f=.5*(o+l),s=e>=c,h=r>=f,p=h<<1|s;n.leaf=!1,n=n.nodes[p]||(n.nodes[p]=hr()),s?i=c:a=c,h?o=f:l=f,u(n,t,e,r,i,o,a,l)}var f,s,h,p,g,v,d,y,m,M=En(a),x=En(l);if(null!=t)v=t,d=e,y=r,m=i;else if(y=m=-(v=d=1/0),s=[],h=[],g=n.length,o)for(p=0;g>p;++p)f=n[p],f.x<v&&(v=f.x),f.y<d&&(d=f.y),f.x>y&&(y=f.x),f.y>m&&(m=f.y),s.push(f.x),h.push(f.y);else for(p=0;g>p;++p){var b=+M(f=n[p],p),_=+x(f,p);v>b&&(v=b),d>_&&(d=_),b>y&&(y=b),_>m&&(m=_),s.push(b),h.push(_)}var w=y-v,S=m-d;w>S?m=d+w:y=v+S;var k=hr();if(k.add=function(n){u(k,n,+M(n,++p),+x(n,p),v,d,y,m)},k.visit=function(n){pr(n,k,v,d,y,m)},k.find=function(n){return gr(k,n[0],n[1],v,d,y,m)},p=-1,null==t){for(;++p<g;)u(k,n[p],s[p],h[p],v,d,y,m);--p}else n.forEach(k.add);return s=h=n=f=null,k}var o,a=Ce,l=ze;return(o=arguments.length)?(a=fr,l=sr,3===o&&(i=e,r=t,e=t=0),u(n)):(u.x=function(n){return arguments.length?(a=n,u):a},u.y=function(n){return arguments.length?(l=n,u):l},u.extent=function(n){return arguments.length?(null==n?t=e=r=i=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],i=+n[1][1]),u):null==t?null:[[t,e],[r,i]]},u.size=function(n){return arguments.length?(null==n?t=e=r=i=null:(t=e=0,r=+n[0],i=+n[1]),u):null==t?null:[r-t,i-e]},u)},ao.interpolateRgb=vr,ao.interpolateObject=dr,ao.interpolateNumber=yr,ao.interpolateString=mr;var hl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pl=new RegExp(hl.source,"g");ao.interpolate=Mr,ao.interpolators=[function(n,t){var e=typeof t;return("string"===e?ua.has(t.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(t)?vr:mr:t instanceof an?vr:Array.isArray(t)?xr:"object"===e&&isNaN(t)?dr:yr)(n,t)}],ao.interpolateArray=xr;var gl=function(){return m},vl=ao.map({linear:gl,poly:Er,quad:function(){return Sr},cubic:function(){return kr},sin:function(){return Ar},exp:function(){return Cr},circle:function(){return zr},elastic:Lr,back:qr,bounce:function(){return Tr}}),dl=ao.map({"in":m,out:_r,"in-out":wr,"out-in":function(n){return wr(_r(n))}});ao.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=vl.get(e)||gl,r=dl.get(r)||m,br(r(e.apply(null,lo.call(arguments,1))))},ao.interpolateHcl=Rr,ao.interpolateHsl=Dr,ao.interpolateLab=Pr,ao.interpolateRound=Ur,ao.transform=function(n){var t=fo.createElementNS(ao.ns.prefix.svg,"g");return(ao.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new jr(e?e.matrix:yl)})(n)},jr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var yl={a:1,b:0,c:0,d:1,e:0,f:0};ao.interpolateTransform=$r,ao.layout={},ao.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Jr(n[e]));return t}},ao.layout.chord=function(){function n(){var n,c,s,h,p,g={},v=[],d=ao.range(u),y=[];for(e=[],r=[],n=0,h=-1;++h<u;){for(c=0,p=-1;++p<u;)c+=i[h][p];v.push(c),y.push(ao.range(u)),n+=c}for(o&&d.sort(function(n,t){return o(v[n],v[t])}),a&&y.forEach(function(n,t){n.sort(function(n,e){return a(i[t][n],i[t][e])})}),n=(Ho-f*u)/n,c=0,h=-1;++h<u;){for(s=c,p=-1;++p<u;){var m=d[h],M=y[m][p],x=i[m][M],b=c,_=c+=x*n;g[m+"-"+M]={index:m,subindex:M,startAngle:b,endAngle:_,value:x}}r[m]={index:m,startAngle:s,endAngle:c,value:v[m]},c+=f}for(h=-1;++h<u;)for(p=h-1;++p<u;){var w=g[h+"-"+p],S=g[p+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}l&&t()}function t(){e.sort(function(n,t){return l((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,i,u,o,a,l,c={},f=0;return c.matrix=function(n){return arguments.length?(u=(i=n)&&i.length,e=r=null,c):i},c.padding=function(n){return arguments.length?(f=n,e=r=null,c):f},c.sortGroups=function(n){return arguments.length?(o=n,e=r=null,c):o},c.sortSubgroups=function(n){return arguments.length?(a=n,e=null,c):a},c.sortChords=function(n){return arguments.length?(l=n,e&&t(),c):l},c.chords=function(){return e||n(),e},c.groups=function(){return r||n(),r},c},ao.layout.force=function(){function n(n){return function(t,e,r,i){if(t.point!==n){var u=t.cx-n.x,o=t.cy-n.y,a=i-e,l=u*u+o*o;if(l>a*a/y){if(v>l){var c=t.charge/l;n.px-=u*c,n.py-=o*c}return!0}if(t.point&&l&&v>l){var c=t.pointCharge/l;n.px-=u*c,n.py-=o*c}}return!t.charge}}function t(n){n.px=ao.event.x,n.py=ao.event.y,l.resume()}var e,r,i,u,o,a,l={},c=ao.dispatch("start","tick","end"),f=[1,1],s=.9,h=ml,p=Ml,g=-30,v=xl,d=.1,y=.64,M=[],x=[];return l.tick=function(){if((i*=.99)<.005)return e=null,c.end({type:"end",alpha:i=0}),!0;var t,r,l,h,p,v,y,m,b,_=M.length,w=x.length;for(r=0;w>r;++r)l=x[r],h=l.source,p=l.target,m=p.x-h.x,b=p.y-h.y,(v=m*m+b*b)&&(v=i*o[r]*((v=Math.sqrt(v))-u[r])/v,m*=v,b*=v,p.x-=m*(y=h.weight+p.weight?h.weight/(h.weight+p.weight):.5),p.y-=b*y,h.x+=m*(y=1-y),h.y+=b*y);if((y=i*d)&&(m=f[0]/2,b=f[1]/2,r=-1,y))for(;++r<_;)l=M[r],l.x+=(m-l.x)*y,l.y+=(b-l.y)*y;if(g)for(ri(t=ao.geom.quadtree(M),i,a),r=-1;++r<_;)(l=M[r]).fixed||t.visit(n(l));for(r=-1;++r<_;)l=M[r],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*s,l.y-=(l.py-(l.py=l.y))*s);c.tick({type:"tick",alpha:i})},l.nodes=function(n){return arguments.length?(M=n,l):M},l.links=function(n){return arguments.length?(x=n,l):x},l.size=function(n){return arguments.length?(f=n,l):f},l.linkDistance=function(n){return arguments.length?(h="function"==typeof n?n:+n,l):h},l.distance=l.linkDistance,l.linkStrength=function(n){return arguments.length?(p="function"==typeof n?n:+n,l):p},l.friction=function(n){return arguments.length?(s=+n,l):s},l.charge=function(n){return arguments.length?(g="function"==typeof n?n:+n,l):g},l.chargeDistance=function(n){return arguments.length?(v=n*n,l):Math.sqrt(v)},l.gravity=function(n){return arguments.length?(d=+n,l):d},l.theta=function(n){return arguments.length?(y=n*n,l):Math.sqrt(y)},l.alpha=function(n){return arguments.length?(n=+n,i?n>0?i=n:(e.c=null,e.t=NaN,e=null,c.end({type:"end",alpha:i=0})):n>0&&(c.start({type:"start",alpha:i=n}),e=qn(l.tick)),l):i},l.start=function(){function n(n,r){if(!e){for(e=new Array(i),l=0;i>l;++l)e[l]=[];for(l=0;c>l;++l){var u=x[l];e[u.source.index].push(u.target),e[u.target.index].push(u.source)}}for(var o,a=e[t],l=-1,f=a.length;++l<f;)if(!isNaN(o=a[l][n]))return o;return Math.random()*r}var t,e,r,i=M.length,c=x.length,s=f[0],v=f[1];for(t=0;i>t;++t)(r=M[t]).index=t,r.weight=0;for(t=0;c>t;++t)r=x[t],"number"==typeof r.source&&(r.source=M[r.source]),"number"==typeof r.target&&(r.target=M[r.target]),++r.source.weight,++r.target.weight;for(t=0;i>t;++t)r=M[t],isNaN(r.x)&&(r.x=n("x",s)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(u=[],"function"==typeof h)for(t=0;c>t;++t)u[t]=+h.call(this,x[t],t);else for(t=0;c>t;++t)u[t]=h;if(o=[],"function"==typeof p)for(t=0;c>t;++t)o[t]=+p.call(this,x[t],t);else for(t=0;c>t;++t)o[t]=p;if(a=[],"function"==typeof g)for(t=0;i>t;++t)a[t]=+g.call(this,M[t],t);else for(t=0;i>t;++t)a[t]=g;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){return r||(r=ao.behavior.drag().origin(m).on("dragstart.force",Qr).on("drag.force",t).on("dragend.force",ni)),arguments.length?void this.on("mouseover.force",ti).on("mouseout.force",ei).call(r):r},ao.rebind(l,c,"on")};var ml=20,Ml=1,xl=1/0;ao.layout.hierarchy=function(){function n(i){var u,o=[i],a=[];for(i.depth=0;null!=(u=o.pop());)if(a.push(u),(c=e.call(n,u,u.depth))&&(l=c.length)){for(var l,c,f;--l>=0;)o.push(f=c[l]),f.parent=u,f.depth=u.depth+1;r&&(u.value=0),u.children=c}else r&&(u.value=+r.call(n,u,u.depth)||0),delete u.children;return oi(i,function(n){var e,i;t&&(e=n.children)&&e.sort(t),r&&(i=n.parent)&&(i.value+=n.value)}),a}var t=ci,e=ai,r=li;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(ui(t,function(n){n.children&&(n.value=0)}),oi(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},ao.layout.partition=function(){function n(t,e,r,i){var u=t.children;if(t.x=e,t.y=t.depth*i,t.dx=r,t.dy=i,u&&(o=u.length)){var o,a,l,c=-1;for(r=t.value?r/t.value:0;++c<o;)n(a=u[c],e,l=a.value*r,i),e+=l}}function t(n){var e=n.children,r=0;if(e&&(i=e.length))for(var i,u=-1;++u<i;)r=Math.max(r,t(e[u]));return 1+r}function e(e,u){var o=r.call(this,e,u);return n(o[0],0,i[0],i[1]/t(o[0])),o}var r=ao.layout.hierarchy(),i=[1,1];return e.size=function(n){return arguments.length?(i=n,e):i},ii(e,r)},ao.layout.pie=function(){function n(o){var a,l=o.length,c=o.map(function(e,r){return+t.call(n,e,r)}),f=+("function"==typeof r?r.apply(this,arguments):r),s=("function"==typeof i?i.apply(this,arguments):i)-f,h=Math.min(Math.abs(s)/l,+("function"==typeof u?u.apply(this,arguments):u)),p=h*(0>s?-1:1),g=ao.sum(c),v=g?(s-l*p)/g:0,d=ao.range(l),y=[];return null!=e&&d.sort(e===bl?function(n,t){return c[t]-c[n]}:function(n,t){return e(o[n],o[t])}),d.forEach(function(n){y[n]={data:o[n],value:a=c[n],startAngle:f,endAngle:f+=a*v+p,padAngle:h}}),y}var t=Number,e=bl,r=0,i=Ho,u=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(i=t,n):i},n.padAngle=function(t){return arguments.length?(u=t,n):u},n};var bl={};ao.layout.stack=function(){function n(a,l){if(!(h=a.length))return a;var c=a.map(function(e,r){return t.call(n,e,r)}),f=c.map(function(t){return t.map(function(t,e){return[u.call(n,t,e),o.call(n,t,e)]})}),s=e.call(n,f,l);c=ao.permute(c,s),f=ao.permute(f,s);var h,p,g,v,d=r.call(n,f,l),y=c[0].length;for(g=0;y>g;++g)for(i.call(n,c[0][g],v=d[g],f[0][g][1]),p=1;h>p;++p)i.call(n,c[p][g],v+=f[p-1][g][1],f[p][g][1]);return a}var t=m,e=gi,r=vi,i=pi,u=si,o=hi;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:_l.get(t)||gi,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:wl.get(t)||vi,n):r},n.x=function(t){return arguments.length?(u=t,n):u},n.y=function(t){return arguments.length?(o=t,n):o},n.out=function(t){return arguments.length?(i=t,n):i},n};var _l=ao.map({"inside-out":function(n){var t,e,r=n.length,i=n.map(di),u=n.map(yi),o=ao.range(r).sort(function(n,t){return i[n]-i[t]}),a=0,l=0,c=[],f=[];for(t=0;r>t;++t)e=o[t],l>a?(a+=u[e],c.push(e)):(l+=u[e],f.push(e));return f.reverse().concat(c)},reverse:function(n){return ao.range(n.length).reverse()},"default":gi}),wl=ao.map({silhouette:function(n){var t,e,r,i=n.length,u=n[0].length,o=[],a=0,l=[];for(e=0;u>e;++e){for(t=0,r=0;i>t;t++)r+=n[t][e][1];r>a&&(a=r),o.push(r)}for(e=0;u>e;++e)l[e]=(a-o[e])/2;return l},wiggle:function(n){var t,e,r,i,u,o,a,l,c,f=n.length,s=n[0],h=s.length,p=[];for(p[0]=l=c=0,e=1;h>e;++e){for(t=0,i=0;f>t;++t)i+=n[t][e][1];for(t=0,u=0,a=s[e][0]-s[e-1][0];f>t;++t){for(r=0,o=(n[t][e][1]-n[t][e-1][1])/(2*a);t>r;++r)o+=(n[r][e][1]-n[r][e-1][1])/a;u+=o*n[t][e][1]}p[e]=l-=i?u/i*a:0,c>l&&(c=l)}for(e=0;h>e;++e)p[e]-=c;return p},expand:function(n){var t,e,r,i=n.length,u=n[0].length,o=1/i,a=[];for(e=0;u>e;++e){for(t=0,r=0;i>t;t++)r+=n[t][e][1];if(r)for(t=0;i>t;t++)n[t][e][1]/=r;else for(t=0;i>t;t++)n[t][e][1]=o}for(e=0;u>e;++e)a[e]=0;return a},zero:vi});ao.layout.histogram=function(){function n(n,u){for(var o,a,l=[],c=n.map(e,this),f=r.call(this,c,u),s=i.call(this,f,c,u),u=-1,h=c.length,p=s.length-1,g=t?1:1/h;++u<p;)o=l[u]=[],o.dx=s[u+1]-(o.x=s[u]),o.y=0;if(p>0)for(u=-1;++u<h;)a=c[u],a>=f[0]&&a<=f[1]&&(o=l[ao.bisect(s,a,1,p)-1],o.y+=g,o.push(n[u]));return l}var t=!0,e=Number,r=bi,i=Mi;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=En(t),n):r},n.bins=function(t){return arguments.length?(i="number"==typeof t?function(n){return xi(n,t)}:En(t),n):i},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},ao.layout.pack=function(){function n(n,u){var o=e.call(this,n,u),a=o[0],l=i[0],c=i[1],f=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,oi(a,function(n){n.r=+f(n.value)}),oi(a,Ni),r){var s=r*(t?1:Math.max(2*a.r/l,2*a.r/c))/2;oi(a,function(n){n.r+=s}),oi(a,Ni),oi(a,function(n){n.r-=s})}return Ci(a,l/2,c/2,t?1:1/Math.max(2*a.r/l,2*a.r/c)),o}var t,e=ao.layout.hierarchy().sort(_i),r=0,i=[1,1];return n.size=function(t){return arguments.length?(i=t,n):i},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},ii(n,e)},ao.layout.tree=function(){function n(n,i){var f=o.call(this,n,i),s=f[0],h=t(s);if(oi(h,e),h.parent.m=-h.z,ui(h,r),c)ui(s,u);else{var p=s,g=s,v=s;ui(s,function(n){n.x<p.x&&(p=n),n.x>g.x&&(g=n),n.depth>v.depth&&(v=n)});var d=a(p,g)/2-p.x,y=l[0]/(g.x+a(g,p)/2+d),m=l[1]/(v.depth||1);ui(s,function(n){n.x=(n.x+d)*y,n.y=n.depth*m})}return f}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var i,u=t.children,o=0,a=u.length;a>o;++o)r.push((u[o]=i={_:u[o],parent:t,children:(i=u[o].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=i);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Di(n);var u=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+a(n._,r._),n.m=n.z-u):n.z=u}else r&&(n.z=r.z+a(n._,r._));n.parent.A=i(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function i(n,t,e){if(t){for(var r,i=n,u=n,o=t,l=i.parent.children[0],c=i.m,f=u.m,s=o.m,h=l.m;o=Ti(o),i=qi(i),o&&i;)l=qi(l),u=Ti(u),u.a=n,r=o.z+s-i.z-c+a(o._,i._),r>0&&(Ri(Pi(o,n,e),n,r),c+=r,f+=r),s+=o.m,c+=i.m,h+=l.m,f+=u.m;o&&!Ti(u)&&(u.t=o,u.m+=s-f),i&&!qi(l)&&(l.t=i,l.m+=c-h,e=n)}return e}function u(n){n.x*=l[0],n.y=n.depth*l[1]}var o=ao.layout.hierarchy().sort(null).value(null),a=Li,l=[1,1],c=null;return n.separation=function(t){return arguments.length?(a=t,n):a},n.size=function(t){return arguments.length?(c=null==(l=t)?u:null,n):c?null:l},n.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:u,n):c?l:null},ii(n,o)},ao.layout.cluster=function(){function n(n,u){var o,a=t.call(this,n,u),l=a[0],c=0;oi(l,function(n){var t=n.children;t&&t.length?(n.x=ji(t),n.y=Ui(t)):(n.x=o?c+=e(n,o):0,n.y=0,o=n)});var f=Fi(l),s=Hi(l),h=f.x-e(f,s)/2,p=s.x+e(s,f)/2;return oi(l,i?function(n){n.x=(n.x-l.x)*r[0],n.y=(l.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(p-h)*r[0],n.y=(1-(l.y?n.y/l.y:1))*r[1]}),a}var t=ao.layout.hierarchy().sort(null).value(null),e=Li,r=[1,1],i=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(i=null==(r=t),n):i?null:r},n.nodeSize=function(t){return arguments.length?(i=null!=(r=t),n):i?r:null},ii(n,t)},ao.layout.treemap=function(){function n(n,t){for(var e,r,i=-1,u=n.length;++i<u;)r=(e=n[i]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var u=e.children;if(u&&u.length){var o,a,l,c=s(e),f=[],h=u.slice(),g=1/0,v="slice"===p?c.dx:"dice"===p?c.dy:"slice-dice"===p?1&e.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(n(h,c.dx*c.dy/e.value),f.area=0;(l=h.length)>0;)f.push(o=h[l-1]),f.area+=o.area,"squarify"!==p||(a=r(f,v))<=g?(h.pop(),g=a):(f.area-=f.pop().area,i(f,v,c,!1),v=Math.min(c.dx,c.dy),f.length=f.area=0,g=1/0);f.length&&(i(f,v,c,!0),f.length=f.area=0),u.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var u,o=s(t),a=r.slice(),l=[];for(n(a,o.dx*o.dy/t.value),l.area=0;u=a.pop();)l.push(u),l.area+=u.area,null!=u.z&&(i(l,u.z?o.dx:o.dy,o,!a.length),l.length=l.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,i=0,u=1/0,o=-1,a=n.length;++o<a;)(e=n[o].area)&&(u>e&&(u=e),e>i&&(i=e));return r*=r,t*=t,r?Math.max(t*i*g/r,r/(t*u*g)):1/0}function i(n,t,e,r){var i,u=-1,o=n.length,a=e.x,c=e.y,f=t?l(n.area/t):0; +if(t==e.dx){for((r||f>e.dy)&&(f=e.dy);++u<o;)i=n[u],i.x=a,i.y=c,i.dy=f,a+=i.dx=Math.min(e.x+e.dx-a,f?l(i.area/f):0);i.z=!0,i.dx+=e.x+e.dx-a,e.y+=f,e.dy-=f}else{for((r||f>e.dx)&&(f=e.dx);++u<o;)i=n[u],i.x=a,i.y=c,i.dx=f,c+=i.dy=Math.min(e.y+e.dy-c,f?l(i.area/f):0);i.z=!1,i.dy+=e.y+e.dy-c,e.x+=f,e.dx-=f}}function u(r){var i=o||a(r),u=i[0];return u.x=u.y=0,u.value?(u.dx=c[0],u.dy=c[1]):u.dx=u.dy=0,o&&a.revalue(u),n([u],u.dx*u.dy/u.value),(o?e:t)(u),h&&(o=i),i}var o,a=ao.layout.hierarchy(),l=Math.round,c=[1,1],f=null,s=Oi,h=!1,p="squarify",g=.5*(1+Math.sqrt(5));return u.size=function(n){return arguments.length?(c=n,u):c},u.padding=function(n){function t(t){var e=n.call(u,t,t.depth);return null==e?Oi(t):Ii(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Ii(t,n)}if(!arguments.length)return f;var r;return s=null==(f=n)?Oi:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,u},u.round=function(n){return arguments.length?(l=n?Math.round:Number,u):l!=Number},u.sticky=function(n){return arguments.length?(h=n,o=null,u):h},u.ratio=function(n){return arguments.length?(g=n,u):g},u.mode=function(n){return arguments.length?(p=n+"",u):p},ii(u,a)},ao.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,i;do e=2*Math.random()-1,r=2*Math.random()-1,i=e*e+r*r;while(!i||i>1);return n+t*e*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var n=ao.random.normal.apply(ao,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=ao.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},ao.scale={};var Sl={floor:m,ceil:m};ao.scale.linear=function(){return Wi([0,1],[0,1],Mr,!1)};var kl={s:1,g:1,p:1,r:1,e:1};ao.scale.log=function(){return ru(ao.scale.linear().domain([0,1]),10,!0,[1,10])};var Nl=ao.format(".0e"),El={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};ao.scale.pow=function(){return iu(ao.scale.linear(),1,[0,1])},ao.scale.sqrt=function(){return ao.scale.pow().exponent(.5)},ao.scale.ordinal=function(){return ou([],{t:"range",a:[[]]})},ao.scale.category10=function(){return ao.scale.ordinal().range(Al)},ao.scale.category20=function(){return ao.scale.ordinal().range(Cl)},ao.scale.category20b=function(){return ao.scale.ordinal().range(zl)},ao.scale.category20c=function(){return ao.scale.ordinal().range(Ll)};var Al=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(xn),Cl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(xn),zl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(xn),Ll=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(xn);ao.scale.quantile=function(){return au([],[])},ao.scale.quantize=function(){return lu(0,1,[0,1])},ao.scale.threshold=function(){return cu([.5],[0,1])},ao.scale.identity=function(){return fu([0,1])},ao.svg={},ao.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),f=o.apply(this,arguments)-Io,s=a.apply(this,arguments)-Io,h=Math.abs(s-f),p=f>s?0:1;if(n>c&&(g=c,c=n,n=g),h>=Oo)return t(c,p)+(n?t(n,1-p):"")+"Z";var g,v,d,y,m,M,x,b,_,w,S,k,N=0,E=0,A=[];if((y=(+l.apply(this,arguments)||0)/2)&&(d=u===ql?Math.sqrt(n*n+c*c):+u.apply(this,arguments),p||(E*=-1),c&&(E=tn(d/c*Math.sin(y))),n&&(N=tn(d/n*Math.sin(y)))),c){m=c*Math.cos(f+E),M=c*Math.sin(f+E),x=c*Math.cos(s-E),b=c*Math.sin(s-E);var C=Math.abs(s-f-2*E)<=Fo?0:1;if(E&&yu(m,M,x,b)===p^C){var z=(f+s)/2;m=c*Math.cos(z),M=c*Math.sin(z),x=b=null}}else m=M=0;if(n){_=n*Math.cos(s-N),w=n*Math.sin(s-N),S=n*Math.cos(f+N),k=n*Math.sin(f+N);var L=Math.abs(f-s+2*N)<=Fo?0:1;if(N&&yu(_,w,S,k)===1-p^L){var q=(f+s)/2;_=n*Math.cos(q),w=n*Math.sin(q),S=k=null}}else _=w=0;if(h>Uo&&(g=Math.min(Math.abs(c-n)/2,+i.apply(this,arguments)))>.001){v=c>n^p?0:1;var T=g,R=g;if(Fo>h){var D=null==S?[_,w]:null==x?[m,M]:Re([m,M],[S,k],[x,b],[_,w]),P=m-D[0],U=M-D[1],j=x-D[0],F=b-D[1],H=1/Math.sin(Math.acos((P*j+U*F)/(Math.sqrt(P*P+U*U)*Math.sqrt(j*j+F*F)))/2),O=Math.sqrt(D[0]*D[0]+D[1]*D[1]);R=Math.min(g,(n-O)/(H-1)),T=Math.min(g,(c-O)/(H+1))}if(null!=x){var I=mu(null==S?[_,w]:[S,k],[m,M],c,T,p),Y=mu([x,b],[_,w],c,T,p);g===T?A.push("M",I[0],"A",T,",",T," 0 0,",v," ",I[1],"A",c,",",c," 0 ",1-p^yu(I[1][0],I[1][1],Y[1][0],Y[1][1]),",",p," ",Y[1],"A",T,",",T," 0 0,",v," ",Y[0]):A.push("M",I[0],"A",T,",",T," 0 1,",v," ",Y[0])}else A.push("M",m,",",M);if(null!=S){var Z=mu([m,M],[S,k],n,-R,p),V=mu([_,w],null==x?[m,M]:[x,b],n,-R,p);g===R?A.push("L",V[0],"A",R,",",R," 0 0,",v," ",V[1],"A",n,",",n," 0 ",p^yu(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-p," ",Z[1],"A",R,",",R," 0 0,",v," ",Z[0]):A.push("L",V[0],"A",R,",",R," 0 0,",v," ",Z[0])}else A.push("L",_,",",w)}else A.push("M",m,",",M),null!=x&&A.push("A",c,",",c," 0 ",C,",",p," ",x,",",b),A.push("L",_,",",w),null!=S&&A.push("A",n,",",n," 0 ",L,",",1-p," ",S,",",k);return A.push("Z"),A.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=hu,r=pu,i=su,u=ql,o=gu,a=vu,l=du;return n.innerRadius=function(t){return arguments.length?(e=En(t),n):e},n.outerRadius=function(t){return arguments.length?(r=En(t),n):r},n.cornerRadius=function(t){return arguments.length?(i=En(t),n):i},n.padRadius=function(t){return arguments.length?(u=t==ql?ql:En(t),n):u},n.startAngle=function(t){return arguments.length?(o=En(t),n):o},n.endAngle=function(t){return arguments.length?(a=En(t),n):a},n.padAngle=function(t){return arguments.length?(l=En(t),n):l},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-Io;return[Math.cos(t)*n,Math.sin(t)*n]},n};var ql="auto";ao.svg.line=function(){return Mu(m)};var Tl=ao.map({linear:xu,"linear-closed":bu,step:_u,"step-before":wu,"step-after":Su,basis:zu,"basis-open":Lu,"basis-closed":qu,bundle:Tu,cardinal:Eu,"cardinal-open":ku,"cardinal-closed":Nu,monotone:Fu});Tl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Rl=[0,2/3,1/3,0],Dl=[0,1/3,2/3,0],Pl=[0,1/6,2/3,1/6];ao.svg.line.radial=function(){var n=Mu(Hu);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},wu.reverse=Su,Su.reverse=wu,ao.svg.area=function(){return Ou(m)},ao.svg.area.radial=function(){var n=Ou(Hu);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},ao.svg.chord=function(){function n(n,a){var l=t(this,u,n,a),c=t(this,o,n,a);return"M"+l.p0+r(l.r,l.p1,l.a1-l.a0)+(e(l,c)?i(l.r,l.p1,l.r,l.p0):i(l.r,l.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+i(c.r,c.p1,l.r,l.p0))+"Z"}function t(n,t,e,r){var i=t.call(n,e,r),u=a.call(n,i,r),o=l.call(n,i,r)-Io,f=c.call(n,i,r)-Io;return{r:u,a0:o,a1:f,p0:[u*Math.cos(o),u*Math.sin(o)],p1:[u*Math.cos(f),u*Math.sin(f)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>Fo)+",1 "+t}function i(n,t,e,r){return"Q 0,0 "+r}var u=Me,o=xe,a=Iu,l=gu,c=vu;return n.radius=function(t){return arguments.length?(a=En(t),n):a},n.source=function(t){return arguments.length?(u=En(t),n):u},n.target=function(t){return arguments.length?(o=En(t),n):o},n.startAngle=function(t){return arguments.length?(l=En(t),n):l},n.endAngle=function(t){return arguments.length?(c=En(t),n):c},n},ao.svg.diagonal=function(){function n(n,i){var u=t.call(this,n,i),o=e.call(this,n,i),a=(u.y+o.y)/2,l=[u,{x:u.x,y:a},{x:o.x,y:a},o];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=Me,e=xe,r=Yu;return n.source=function(e){return arguments.length?(t=En(e),n):t},n.target=function(t){return arguments.length?(e=En(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},ao.svg.diagonal.radial=function(){var n=ao.svg.diagonal(),t=Yu,e=n.projection;return n.projection=function(n){return arguments.length?e(Zu(t=n)):t},n},ao.svg.symbol=function(){function n(n,r){return(Ul.get(t.call(this,n,r))||$u)(e.call(this,n,r))}var t=Xu,e=Vu;return n.type=function(e){return arguments.length?(t=En(e),n):t},n.size=function(t){return arguments.length?(e=En(t),n):e},n};var Ul=ao.map({circle:$u,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Fl)),e=t*Fl;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});ao.svg.symbolTypes=Ul.keys();var jl=Math.sqrt(3),Fl=Math.tan(30*Yo);Co.transition=function(n){for(var t,e,r=Hl||++Zl,i=Ku(n),u=[],o=Ol||{time:Date.now(),ease:Nr,delay:0,duration:250},a=-1,l=this.length;++a<l;){u.push(t=[]);for(var c=this[a],f=-1,s=c.length;++f<s;)(e=c[f])&&Qu(e,f,i,r,o),t.push(e)}return Wu(u,i,r)},Co.interrupt=function(n){return this.each(null==n?Il:Bu(Ku(n)))};var Hl,Ol,Il=Bu(Ku()),Yl=[],Zl=0;Yl.call=Co.call,Yl.empty=Co.empty,Yl.node=Co.node,Yl.size=Co.size,ao.transition=function(n,t){return n&&n.transition?Hl?n.transition(t):n:ao.selection().transition(n)},ao.transition.prototype=Yl,Yl.select=function(n){var t,e,r,i=this.id,u=this.namespace,o=[];n=A(n);for(var a=-1,l=this.length;++a<l;){o.push(t=[]);for(var c=this[a],f=-1,s=c.length;++f<s;)(r=c[f])&&(e=n.call(r,r.__data__,f,a))?("__data__"in r&&(e.__data__=r.__data__),Qu(e,f,u,i,r[u][i]),t.push(e)):t.push(null)}return Wu(o,u,i)},Yl.selectAll=function(n){var t,e,r,i,u,o=this.id,a=this.namespace,l=[];n=C(n);for(var c=-1,f=this.length;++c<f;)for(var s=this[c],h=-1,p=s.length;++h<p;)if(r=s[h]){u=r[a][o],e=n.call(r,r.__data__,h,c),l.push(t=[]);for(var g=-1,v=e.length;++g<v;)(i=e[g])&&Qu(i,g,a,o,u),t.push(i)}return Wu(l,a,o)},Yl.filter=function(n){var t,e,r,i=[];"function"!=typeof n&&(n=O(n));for(var u=0,o=this.length;o>u;u++){i.push(t=[]);for(var e=this[u],a=0,l=e.length;l>a;a++)(r=e[a])&&n.call(r,r.__data__,a,u)&&t.push(r)}return Wu(i,this.namespace,this.id)},Yl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(i){i[r][e].tween.set(n,t)})},Yl.attr=function(n,t){function e(){this.removeAttribute(a)}function r(){this.removeAttributeNS(a.space,a.local)}function i(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(a);return e!==n&&(t=o(e,n),function(n){this.setAttribute(a,t(n))})})}function u(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(a.space,a.local);return e!==n&&(t=o(e,n),function(n){this.setAttributeNS(a.space,a.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var o="transform"==n?$r:Mr,a=ao.ns.qualify(n);return Ju(this,"attr."+n,t,a.local?u:i)},Yl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(i));return r&&function(n){this.setAttribute(i,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(i.space,i.local));return r&&function(n){this.setAttributeNS(i.space,i.local,r(n))}}var i=ao.ns.qualify(n);return this.tween("attr."+n,i.local?r:e)},Yl.style=function(n,e,r){function i(){this.style.removeProperty(n)}function u(e){return null==e?i:(e+="",function(){var i,u=t(this).getComputedStyle(this,null).getPropertyValue(n);return u!==e&&(i=Mr(u,e),function(t){this.style.setProperty(n,i(t),r)})})}var o=arguments.length;if(3>o){if("string"!=typeof n){2>o&&(e="");for(r in n)this.style(r,n[r],e);return this}r=""}return Ju(this,"style."+n,e,u)},Yl.styleTween=function(n,e,r){function i(i,u){var o=e.call(this,i,u,t(this).getComputedStyle(this,null).getPropertyValue(n));return o&&function(t){this.style.setProperty(n,o(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+n,i)},Yl.text=function(n){return Ju(this,"text",n,Gu)},Yl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Yl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=ao.ease.apply(ao,arguments)),Y(this,function(r){r[e][t].ease=n}))},Yl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,"function"==typeof n?function(r,i,u){r[e][t].delay=+n.call(r,r.__data__,i,u)}:(n=+n,function(r){r[e][t].delay=n}))},Yl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,"function"==typeof n?function(r,i,u){r[e][t].duration=Math.max(1,n.call(r,r.__data__,i,u))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Yl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var i=Ol,u=Hl;try{Hl=e,Y(this,function(t,i,u){Ol=t[r][e],n.call(t,t.__data__,i,u)})}finally{Ol=i,Hl=u}}else Y(this,function(i){var u=i[r][e];(u.event||(u.event=ao.dispatch("start","end","interrupt"))).on(n,t)});return this},Yl.transition=function(){for(var n,t,e,r,i=this.id,u=++Zl,o=this.namespace,a=[],l=0,c=this.length;c>l;l++){a.push(n=[]);for(var t=this[l],f=0,s=t.length;s>f;f++)(e=t[f])&&(r=e[o][i],Qu(e,f,o,u,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Wu(a,o,u)},ao.svg.axis=function(){function n(n){n.each(function(){var n,c=ao.select(this),f=this.__chart__||e,s=this.__chart__=e.copy(),h=null==l?s.ticks?s.ticks.apply(s,a):s.domain():l,p=null==t?s.tickFormat?s.tickFormat.apply(s,a):m:t,g=c.selectAll(".tick").data(h,s),v=g.enter().insert("g",".domain").attr("class","tick").style("opacity",Uo),d=ao.transition(g.exit()).style("opacity",Uo).remove(),y=ao.transition(g.order()).style("opacity",1),M=Math.max(i,0)+o,x=Zi(s),b=c.selectAll(".domain").data([0]),_=(b.enter().append("path").attr("class","domain"),ao.transition(b));v.append("line"),v.append("text");var w,S,k,N,E=v.select("line"),A=y.select("line"),C=g.select("text").text(p),z=v.select("text"),L=y.select("text"),q="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=no,w="x",k="y",S="x2",N="y2",C.attr("dy",0>q?"0em":".71em").style("text-anchor","middle"),_.attr("d","M"+x[0]+","+q*u+"V0H"+x[1]+"V"+q*u)):(n=to,w="y",k="x",S="y2",N="x2",C.attr("dy",".32em").style("text-anchor",0>q?"end":"start"),_.attr("d","M"+q*u+","+x[0]+"H0V"+x[1]+"H"+q*u)),E.attr(N,q*i),z.attr(k,q*M),A.attr(S,0).attr(N,q*i),L.attr(w,0).attr(k,q*M),s.rangeBand){var T=s,R=T.rangeBand()/2;f=s=function(n){return T(n)+R}}else f.rangeBand?f=s:d.call(n,s,f);v.call(n,f,s),y.call(n,s,s)})}var t,e=ao.scale.linear(),r=Vl,i=6,u=6,o=3,a=[10],l=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Xl?t+"":Vl,n):r},n.ticks=function(){return arguments.length?(a=co(arguments),n):a},n.tickValues=function(t){return arguments.length?(l=t,n):l},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(i=+t,u=+arguments[e-1],n):i},n.innerTickSize=function(t){return arguments.length?(i=+t,n):i},n.outerTickSize=function(t){return arguments.length?(u=+t,n):u},n.tickPadding=function(t){return arguments.length?(o=+t,n):o},n.tickSubdivide=function(){return arguments.length&&n},n};var Vl="bottom",Xl={top:1,right:1,bottom:1,left:1};ao.svg.brush=function(){function n(t){t.each(function(){var t=ao.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",u).on("touchstart.brush",u),o=t.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=t.selectAll(".resize").data(v,m);a.exit().remove(),a.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return $l[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",n.empty()?"none":null);var l,s=ao.transition(t),h=ao.transition(o);c&&(l=Zi(c),h.attr("x",l[0]).attr("width",l[1]-l[0]),r(s)),f&&(l=Zi(f),h.attr("y",l[0]).attr("height",l[1]-l[0]),i(s)),e(s)})}function e(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+s[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function r(n){n.select(".extent").attr("x",s[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",s[1]-s[0])}function i(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function u(){function u(){32==ao.event.keyCode&&(C||(M=null,L[0]-=s[1],L[1]-=h[1],C=2),S())}function v(){32==ao.event.keyCode&&2==C&&(L[0]+=s[1],L[1]+=h[1],C=0,S())}function d(){var n=ao.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(ao.event.altKey?(M||(M=[(s[0]+s[1])/2,(h[0]+h[1])/2]),L[0]=s[+(n[0]<M[0])],L[1]=h[+(n[1]<M[1])]):M=null),E&&y(n,c,0)&&(r(k),t=!0),A&&y(n,f,1)&&(i(k),t=!0),t&&(e(k),w({type:"brush",mode:C?"move":"resize"}))}function y(n,t,e){var r,i,u=Zi(t),l=u[0],c=u[1],f=L[e],v=e?h:s,d=v[1]-v[0];return C&&(l-=f,c-=d+f),r=(e?g:p)?Math.max(l,Math.min(c,n[e])):n[e],C?i=(r+=f)+d:(M&&(f=Math.max(l,Math.min(c,2*M[e]-r))),r>f?(i=r,r=f):i=f),v[0]!=r||v[1]!=i?(e?a=null:o=null,v[0]=r,v[1]=i,!0):void 0}function m(){d(),k.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),ao.select("body").style("cursor",null),q.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),z(),w({type:"brushend"})}var M,x,b=this,_=ao.select(ao.event.target),w=l.of(b,arguments),k=ao.select(b),N=_.datum(),E=!/^(n|s)$/.test(N)&&c,A=!/^(e|w)$/.test(N)&&f,C=_.classed("extent"),z=W(b),L=ao.mouse(b),q=ao.select(t(b)).on("keydown.brush",u).on("keyup.brush",v);if(ao.event.changedTouches?q.on("touchmove.brush",d).on("touchend.brush",m):q.on("mousemove.brush",d).on("mouseup.brush",m),k.interrupt().selectAll("*").interrupt(),C)L[0]=s[0]-L[0],L[1]=h[0]-L[1];else if(N){var T=+/w$/.test(N),R=+/^n/.test(N);x=[s[1-T]-L[0],h[1-R]-L[1]],L[0]=s[T],L[1]=h[R]}else ao.event.altKey&&(M=L.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),ao.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),d()}var o,a,l=N(n,"brushstart","brush","brushend"),c=null,f=null,s=[0,0],h=[0,0],p=!0,g=!0,v=Bl[0];return n.event=function(n){n.each(function(){var n=l.of(this,arguments),t={x:s,y:h,i:o,j:a},e=this.__chart__||t;this.__chart__=t,Hl?ao.select(this).transition().each("start.brush",function(){o=e.i,a=e.j,s=e.x,h=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=xr(s,t.x),r=xr(h,t.y);return o=a=null,function(i){s=t.x=e(i),h=t.y=r(i),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){o=t.i,a=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,v=Bl[!c<<1|!f],n):c},n.y=function(t){return arguments.length?(f=t,v=Bl[!c<<1|!f],n):f},n.clamp=function(t){return arguments.length?(c&&f?(p=!!t[0],g=!!t[1]):c?p=!!t:f&&(g=!!t),n):c&&f?[p,g]:c?p:f?g:null},n.extent=function(t){var e,r,i,u,l;return arguments.length?(c&&(e=t[0],r=t[1],f&&(e=e[0],r=r[0]),o=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(l=e,e=r,r=l),e==s[0]&&r==s[1]||(s=[e,r])),f&&(i=t[0],u=t[1],c&&(i=i[1],u=u[1]),a=[i,u],f.invert&&(i=f(i),u=f(u)),i>u&&(l=i,i=u,u=l),i==h[0]&&u==h[1]||(h=[i,u])),n):(c&&(o?(e=o[0],r=o[1]):(e=s[0],r=s[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(l=e,e=r,r=l))),f&&(a?(i=a[0],u=a[1]):(i=h[0],u=h[1],f.invert&&(i=f.invert(i),u=f.invert(u)),i>u&&(l=i,i=u,u=l))),c&&f?[[e,i],[r,u]]:c?[e,r]:f&&[i,u])},n.clear=function(){return n.empty()||(s=[0,0],h=[0,0],o=a=null),n},n.empty=function(){return!!c&&s[0]==s[1]||!!f&&h[0]==h[1]},ao.rebind(n,l,"on")};var $l={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Bl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Wl=ga.format=xa.timeFormat,Jl=Wl.utc,Gl=Jl("%Y-%m-%dT%H:%M:%S.%LZ");Wl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?eo:Gl,eo.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},eo.toString=Gl.toString,ga.second=On(function(n){return new va(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),ga.seconds=ga.second.range,ga.seconds.utc=ga.second.utc.range,ga.minute=On(function(n){return new va(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),ga.minutes=ga.minute.range,ga.minutes.utc=ga.minute.utc.range,ga.hour=On(function(n){var t=n.getTimezoneOffset()/60;return new va(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),ga.hours=ga.hour.range,ga.hours.utc=ga.hour.utc.range,ga.month=On(function(n){return n=ga.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),ga.months=ga.month.range,ga.months.utc=ga.month.utc.range;var Kl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ql=[[ga.second,1],[ga.second,5],[ga.second,15],[ga.second,30],[ga.minute,1],[ga.minute,5],[ga.minute,15],[ga.minute,30],[ga.hour,1],[ga.hour,3],[ga.hour,6],[ga.hour,12],[ga.day,1],[ga.day,2],[ga.week,1],[ga.month,1],[ga.month,3],[ga.year,1]],nc=Wl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",zt]]),tc={range:function(n,t,e){return ao.range(Math.ceil(n/e)*e,+t,e).map(io)},floor:m,ceil:m};Ql.year=ga.year,ga.scale=function(){return ro(ao.scale.linear(),Ql,nc)};var ec=Ql.map(function(n){return[n[0].utc,n[1]]}),rc=Jl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",zt]]);ec.year=ga.year.utc,ga.scale.utc=function(){return ro(ao.scale.linear(),ec,rc)},ao.text=An(function(n){return n.responseText}),ao.json=function(n,t){return Cn(n,"application/json",uo,t)},ao.html=function(n,t){return Cn(n,"text/html",oo,t)},ao.xml=An(function(n){return n.responseXML}),"function"==typeof define&&define.amd?(this.d3=ao,define(ao)):"object"==typeof module&&module.exports?module.exports=ao:this.d3=ao}(); \ No newline at end of file diff --git a/civicrm/bower_components/dc-2.1.x/.bower.json b/civicrm/bower_components/dc-2.1.x/.bower.json new file mode 100644 index 0000000000..aa17bc2123 --- /dev/null +++ b/civicrm/bower_components/dc-2.1.x/.bower.json @@ -0,0 +1,38 @@ +{ + "name": "dcjs", + "main": [ + "dc.js", + "dc.css" + ], + "keywords": [ + "visualization", + "svg", + "animation", + "canvas", + "chart", + "dimensional", + "crossfilter", + "d3" + ], + "ignore": [ + "*", + "!dc.*", + "!LICENSE", + "!README.md" + ], + "dependencies": { + "d3": "3.x", + "crossfilter2": "~1.3" + }, + "homepage": "https://github.com/NickQiZhu/dc.js", + "version": "2.1.9", + "_release": "2.1.9", + "_resolution": { + "type": "version", + "tag": "2.1.9", + "commit": "c3b7ee27e3b17e069bb196e730c35b37e42cf7f6" + }, + "_source": "https://github.com/NickQiZhu/dc.js.git", + "_target": "~2.1.8", + "_originalSource": "dc.js" +} \ No newline at end of file diff --git a/civicrm/bower_components/dc-2.1.x/LICENSE b/civicrm/bower_components/dc-2.1.x/LICENSE new file mode 100644 index 0000000000..bd9bebb648 --- /dev/null +++ b/civicrm/bower_components/dc-2.1.x/LICENSE @@ -0,0 +1,191 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2012-2016 Nick Zhu & the dc.js Developers + https://github.com/dc-js/dc.js/blob/master/AUTHORS + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/civicrm/bower_components/dc-2.1.x/README.md b/civicrm/bower_components/dc-2.1.x/README.md new file mode 100644 index 0000000000..55ce56e0ba --- /dev/null +++ b/civicrm/bower_components/dc-2.1.x/README.md @@ -0,0 +1,105 @@ +[](https://gemnasium.com/dc-js/dc.js) +[](http://travis-ci.org/dc-js/dc.js) +[](https://saucelabs.com/u/sclevine) +[](http://badge.fury.io/js/dc) +[](https://gitter.im/dc-js/dc.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + +dc.js +===== + +Dimensional charting built to work natively with [crossfilter](http://crossfilter.github.io/crossfilter/) +rendered using [d3.js](https://d3js.org/). In dc.js, each chart displays an aggregation of some +attributes through the position, size, and color of its elements, and also presents a dimension +which can be filtered. When the filter or brush changes, all other charts are updated dynamically, +using animated transitions. + +Check out the [example page](http://dc-js.github.com/dc.js/) +and its [annotated source](http://dc-js.github.io/dc.js/docs/stock.html) for a quick five minute +how-to guide. The detailed [API reference is here](http://dc-js.github.io/dc.js/docs/html/) +([markdown version](https://github.com/dc-js/dc.js/blob/develop/web/docs/api-latest.md)). For +more examples and hints please visit the [Wiki](https://github.com/dc-js/dc.js/wiki). + + +Support +-------------------- +* [Example Site](http://dc-js.github.com/dc.js/) +* [Changelog](https://github.com/dc-js/dc.js/blob/develop/Changelog.md) +* [Frequently Asked Questions](https://github.com/dc-js/dc.js/wiki/FAQ) and [Wiki](https://github.com/dc-js/dc.js/wiki) +* [v2.0 API Reference](http://dc-js.github.io/dc.js/docs/html/) <sup>([markdown](https://github.com/dc-js/dc.js/blob/master/web/docs/api-latest.md))</sup> <sup>([next - v2.1](https://github.com/dc-js/dc.js/blob/develop/web/docs/api-latest.md))</sup> <sup>([last - v1.7](https://github.com/dc-js/dc.js/blob/master/web/docs/api-1.7.0.md))</sup> +* [dc.js on StackOverflow](http://stackoverflow.com/questions/tagged/dc.js) - ask questions and get help +* [User Group](https://groups.google.com/forum/?fromgroups#!forum/dc-js-user-group) ("mailing list") - discussion and longer topics +* [GitHub Issues](https://github.com/dc-js/dc.js/issues) - bug reports and feature requests + +*Please direct questions and support requests to Stack Overflow or the user group. When posting to Stack Overflow, use the* `[dc.js]` *and/or* `[crossfilter]` *tags - other tags are likely to draw unwanted attention.* + +Get help faster with a working example! Fork these to get started:<br> +[example jsFiddle](https://jsfiddle.net/gordonwoodhull/1hbjwxzy/) - [blank jsFiddle](https://jsfiddle.net/gordonwoodhull/kk4j0bzn/) - [example bl.ock](http://blockbuilder.org/gordonwoodhull/ecce8e32d64c662cffd5) - [blank bl.ock](http://blockbuilder.org/gordonwoodhull/9ab997c9a8d7d3380364) + +CDN location +-------------------- +For CDN URLs, please visit [dc.js on cdnjs.com](https://cdnjs.com/libraries/dc), select the version you want (2.0 is stable, 2.1 has breaking changes), and copy the URLs from there. + +Please do not use github.io as a CDN unless you need the bleeding-edge features. + +[More info on the Wiki.](https://github.com/dc-js/dc.js/wiki#cdn-location) + + +Install with npm +-------------------- +``` +npm install dc +``` + + +Install with bower +-------------------- +``` +bower install dcjs +``` + + +Install without npm +-------------------- +Download +* [d3.js](https://github.com/mbostock/d3) +* [crossfilter.js](https://github.com/square/crossfilter) +* [dc.js - stable](https://github.com/dc-js/dc.js/releases) +* [dc.js - bleeding edge (master)](https://github.com/dc-js/dc.js) + + +How to build dc.js locally +--------------------------- + +### Prerequisite modules + +Make sure the following packages are installed on your machine +* node.js +* npm + +### Install dependencies +``` +dc.js$ npm install +``` + +### Build and Test +``` +dc.js$ grunt test +``` + +Developing dc.js +---------------- + +### Start the development server +``` +dc.js$ grunt server +``` + +* Jasmine specs are hosted at http://localhost:8888/spec +* The stock example is at http://localhost:8888/web +* More examples are at http://localhost:8888/web/examples + +License +-------------------- + +dc.js is an open source javascript library and licensed under +[Apache License v2](http://www.apache.org/licenses/LICENSE-2.0.html). diff --git a/civicrm/bower_components/dc-2.1.x/bower.json b/civicrm/bower_components/dc-2.1.x/bower.json new file mode 100644 index 0000000000..c973041e87 --- /dev/null +++ b/civicrm/bower_components/dc-2.1.x/bower.json @@ -0,0 +1,24 @@ +{ + "name": "dcjs", + "main": ["dc.js", "dc.css"], + "keywords": [ + "visualization", + "svg", + "animation", + "canvas", + "chart", + "dimensional", + "crossfilter", + "d3" + ], + "ignore": [ + "*", + "!dc.*", + "!LICENSE", + "!README.md" + ], + "dependencies": { + "d3": "3.x", + "crossfilter2": "~1.3" + } +} diff --git a/civicrm/bower_components/dc-2.1.x/dc.css b/civicrm/bower_components/dc-2.1.x/dc.css new file mode 100644 index 0000000000..284fbb8914 --- /dev/null +++ b/civicrm/bower_components/dc-2.1.x/dc.css @@ -0,0 +1,209 @@ +.dc-chart path.dc-symbol, .dc-legend g.dc-legend-item.fadeout { + fill-opacity: 0.5; + stroke-opacity: 0.5; } + +div.dc-chart { + float: left; } + +.dc-chart rect.bar { + stroke: none; + cursor: pointer; } + .dc-chart rect.bar:hover { + fill-opacity: .5; } + +.dc-chart rect.deselected { + stroke: none; + fill: #ccc; } + +.dc-chart .pie-slice { + fill: #fff; + font-size: 12px; + cursor: pointer; } + .dc-chart .pie-slice.external { + fill: #000; } + .dc-chart .pie-slice :hover, .dc-chart .pie-slice.highlight { + fill-opacity: .8; } + +.dc-chart .pie-path { + fill: none; + stroke-width: 2px; + stroke: #000; + opacity: 0.4; } + +.dc-chart .selected path, .dc-chart .selected circle { + stroke-width: 3; + stroke: #ccc; + fill-opacity: 1; } + +.dc-chart .deselected path, .dc-chart .deselected circle { + stroke: none; + fill-opacity: .5; + fill: #ccc; } + +.dc-chart .axis path, .dc-chart .axis line { + fill: none; + stroke: #000; + shape-rendering: crispEdges; } + +.dc-chart .axis text { + font: 10px sans-serif; } + +.dc-chart .grid-line, .dc-chart .axis .grid-line, .dc-chart .grid-line line, .dc-chart .axis .grid-line line { + fill: none; + stroke: #ccc; + opacity: .5; + shape-rendering: crispEdges; } + +.dc-chart .brush rect.background { + z-index: -999; } + +.dc-chart .brush rect.extent { + fill: #4682b4; + fill-opacity: .125; } + +.dc-chart .brush .resize path { + fill: #eee; + stroke: #666; } + +.dc-chart path.line { + fill: none; + stroke-width: 1.5px; } + +.dc-chart path.area { + fill-opacity: .3; + stroke: none; } + +.dc-chart path.highlight { + stroke-width: 3; + fill-opacity: 1; + stroke-opacity: 1; } + +.dc-chart g.state { + cursor: pointer; } + .dc-chart g.state :hover { + fill-opacity: .8; } + .dc-chart g.state path { + stroke: #fff; } + +.dc-chart g.deselected path { + fill: #808080; } + +.dc-chart g.deselected text { + display: none; } + +.dc-chart g.row rect { + fill-opacity: 0.8; + cursor: pointer; } + .dc-chart g.row rect:hover { + fill-opacity: 0.6; } + +.dc-chart g.row text { + fill: #fff; + font-size: 12px; + cursor: pointer; } + +.dc-chart g.dc-tooltip path { + fill: none; + stroke: #808080; + stroke-opacity: .8; } + +.dc-chart g.county path { + stroke: #fff; + fill: none; } + +.dc-chart g.debug rect { + fill: #00f; + fill-opacity: .2; } + +.dc-chart g.axis text { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + pointer-events: none; } + +.dc-chart .node { + font-size: 0.7em; + cursor: pointer; } + .dc-chart .node :hover { + fill-opacity: .8; } + +.dc-chart .bubble { + stroke: none; + fill-opacity: 0.6; } + +.dc-chart .highlight { + fill-opacity: 1; + stroke-opacity: 1; } + +.dc-chart .fadeout { + fill-opacity: 0.2; + stroke-opacity: 0.2; } + +.dc-chart .box text { + font: 10px sans-serif; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + pointer-events: none; } + +.dc-chart .box line, .dc-chart .box circle { + fill: #fff; } + +.dc-chart .box rect, .dc-chart .box line, .dc-chart .box circle { + stroke: #000; + stroke-width: 1.5px; } + +.dc-chart .box .center { + stroke-dasharray: 3, 3; } + +.dc-chart .box .outlier { + fill: none; + stroke: #ccc; } + +.dc-chart .box.deselected { + opacity: 0.5; } + .dc-chart .box.deselected .box { + fill: #ccc; } + +.dc-chart .symbol { + stroke: none; } + +.dc-chart .heatmap .box-group.deselected rect { + stroke: none; + fill-opacity: 0.5; + fill: #ccc; } + +.dc-chart .heatmap g.axis text { + pointer-events: all; + cursor: pointer; } + +.dc-chart .empty-chart .pie-slice { + cursor: default; } + .dc-chart .empty-chart .pie-slice path { + fill: #fee; + cursor: default; } + +.dc-chart circle.dot { + stroke: none; } + +.dc-data-count { + float: right; + margin-top: 15px; + margin-right: 15px; } + .dc-data-count .filter-count, .dc-data-count .total-count { + color: #3182bd; + font-weight: bold; } + +.dc-legend { + font-size: 11px; } + .dc-legend .dc-legend-item { + cursor: pointer; } + +.dc-hard .number-display { + float: none; } diff --git a/civicrm/bower_components/dc-2.1.x/dc.js b/civicrm/bower_components/dc-2.1.x/dc.js new file mode 100644 index 0000000000..dc4f1ebdcc --- /dev/null +++ b/civicrm/bower_components/dc-2.1.x/dc.js @@ -0,0 +1,11155 @@ +/*! + * dc 2.1.9 + * http://dc-js.github.io/dc.js/ + * Copyright 2012-2016 Nick Zhu & the dc.js Developers + * https://github.com/dc-js/dc.js/blob/master/AUTHORS + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +(function() { function _dc(d3, crossfilter) { +'use strict'; + +/** + * The entire dc.js library is scoped under the **dc** name space. It does not introduce + * anything else into the global name space. + * + * Most `dc` functions are designed to allow function chaining, meaning they return the current chart + * instance whenever it is appropriate. The getter forms of functions do not participate in function + * chaining because they return values that are not the chart, although some, + * such as {@link dc.baseMixin#svg .svg} and {@link dc.coordinateGridMixin#xAxis .xAxis}, + * return values that are themselves chainable d3 objects. + * @namespace dc + * @version 2.1.9 + * @example + * // Example chaining + * chart.width(300) + * .height(300) + * .filter('sunday'); + */ +/*jshint -W079*/ +var dc = { + version: '2.1.9', + constants: { + CHART_CLASS: 'dc-chart', + DEBUG_GROUP_CLASS: 'debug', + STACK_CLASS: 'stack', + DESELECTED_CLASS: 'deselected', + SELECTED_CLASS: 'selected', + NODE_INDEX_NAME: '__index__', + GROUP_INDEX_NAME: '__group_index__', + DEFAULT_CHART_GROUP: '__default_chart_group__', + EVENT_DELAY: 40, + NEGLIGIBLE_NUMBER: 1e-10 + }, + _renderlet: null +}; +/*jshint +W079*/ + +/** + * The dc.chartRegistry object maintains sets of all instantiated dc.js charts under named groups + * and the default group. + * + * A chart group often corresponds to a crossfilter instance. It specifies + * the set of charts which should be updated when a filter changes on one of the charts or when the + * global functions {@link dc.filterAll dc.filterAll}, {@link dc.refocusAll dc.refocusAll}, + * {@link dc.renderAll dc.renderAll}, {@link dc.redrawAll dc.redrawAll}, or chart functions + * {@link dc.baseMixin#renderGroup baseMixin.renderGroup}, + * {@link dc.baseMixin#redrawGroup baseMixin.redrawGroup} are called. + * + * @namespace chartRegistry + * @memberof dc + * @type {{has, register, deregister, clear, list}} + */ +dc.chartRegistry = (function () { + // chartGroup:string => charts:array + var _chartMap = {}; + + function initializeChartGroup (group) { + if (!group) { + group = dc.constants.DEFAULT_CHART_GROUP; + } + + if (!_chartMap[group]) { + _chartMap[group] = []; + } + + return group; + } + + return { + /** + * Determine if a given chart instance resides in any group in the registry. + * @method has + * @memberof dc.chartRegistry + * @param {Object} chart dc.js chart instance + * @returns {Boolean} + */ + has: function (chart) { + for (var e in _chartMap) { + if (_chartMap[e].indexOf(chart) >= 0) { + return true; + } + } + return false; + }, + + /** + * Add given chart instance to the given group, creating the group if necessary. + * If no group is provided, the default group `dc.constants.DEFAULT_CHART_GROUP` will be used. + * @method register + * @memberof dc.chartRegistry + * @param {Object} chart dc.js chart instance + * @param {String} [group] Group name + */ + register: function (chart, group) { + group = initializeChartGroup(group); + _chartMap[group].push(chart); + }, + + /** + * Remove given chart instance from the given group, creating the group if necessary. + * If no group is provided, the default group `dc.constants.DEFAULT_CHART_GROUP` will be used. + * @method deregister + * @memberof dc.chartRegistry + * @param {Object} chart dc.js chart instance + * @param {String} [group] Group name + */ + deregister: function (chart, group) { + group = initializeChartGroup(group); + for (var i = 0; i < _chartMap[group].length; i++) { + if (_chartMap[group][i].anchorName() === chart.anchorName()) { + _chartMap[group].splice(i, 1); + break; + } + } + }, + + /** + * Clear given group if one is provided, otherwise clears all groups. + * @method clear + * @memberof dc.chartRegistry + * @param {String} group Group name + */ + clear: function (group) { + if (group) { + delete _chartMap[group]; + } else { + _chartMap = {}; + } + }, + + /** + * Get an array of each chart instance in the given group. + * If no group is provided, the charts in the default group are returned. + * @method list + * @memberof dc.chartRegistry + * @param {String} [group] Group name + * @returns {Array<Object>} + */ + list: function (group) { + group = initializeChartGroup(group); + return _chartMap[group]; + } + }; +})(); + +/** + * Add given chart instance to the given group, creating the group if necessary. + * If no group is provided, the default group `dc.constants.DEFAULT_CHART_GROUP` will be used. + * @memberof dc + * @method registerChart + * @param {Object} chart dc.js chart instance + * @param {String} [group] Group name + */ +dc.registerChart = function (chart, group) { + dc.chartRegistry.register(chart, group); +}; + +/** + * Remove given chart instance from the given group, creating the group if necessary. + * If no group is provided, the default group `dc.constants.DEFAULT_CHART_GROUP` will be used. + * @memberof dc + * @method deregisterChart + * @param {Object} chart dc.js chart instance + * @param {String} [group] Group name + */ +dc.deregisterChart = function (chart, group) { + dc.chartRegistry.deregister(chart, group); +}; + +/** + * Determine if a given chart instance resides in any group in the registry. + * @memberof dc + * @method hasChart + * @param {Object} chart dc.js chart instance + * @returns {Boolean} + */ +dc.hasChart = function (chart) { + return dc.chartRegistry.has(chart); +}; + +/** + * Clear given group if one is provided, otherwise clears all groups. + * @memberof dc + * @method deregisterAllCharts + * @param {String} group Group name + */ +dc.deregisterAllCharts = function (group) { + dc.chartRegistry.clear(group); +}; + +/** + * Clear all filters on all charts within the given chart group. If the chart group is not given then + * only charts that belong to the default chart group will be reset. + * @memberof dc + * @method filterAll + * @param {String} [group] + */ +dc.filterAll = function (group) { + var charts = dc.chartRegistry.list(group); + for (var i = 0; i < charts.length; ++i) { + charts[i].filterAll(); + } +}; + +/** + * Reset zoom level / focus on all charts that belong to the given chart group. If the chart group is + * not given then only charts that belong to the default chart group will be reset. + * @memberof dc + * @method refocusAll + * @param {String} [group] + */ +dc.refocusAll = function (group) { + var charts = dc.chartRegistry.list(group); + for (var i = 0; i < charts.length; ++i) { + if (charts[i].focus) { + charts[i].focus(); + } + } +}; + +/** + * Re-render all charts belong to the given chart group. If the chart group is not given then only + * charts that belong to the default chart group will be re-rendered. + * @memberof dc + * @method renderAll + * @param {String} [group] + */ +dc.renderAll = function (group) { + var charts = dc.chartRegistry.list(group); + for (var i = 0; i < charts.length; ++i) { + charts[i].render(); + } + + if (dc._renderlet !== null) { + dc._renderlet(group); + } +}; + +/** + * Redraw all charts belong to the given chart group. If the chart group is not given then only charts + * that belong to the default chart group will be re-drawn. Redraw is different from re-render since + * when redrawing dc tries to update the graphic incrementally, using transitions, instead of starting + * from scratch. + * @memberof dc + * @method redrawAll + * @param {String} [group] + */ +dc.redrawAll = function (group) { + var charts = dc.chartRegistry.list(group); + for (var i = 0; i < charts.length; ++i) { + charts[i].redraw(); + } + + if (dc._renderlet !== null) { + dc._renderlet(group); + } +}; + +/** + * If this boolean is set truthy, all transitions will be disabled, and changes to the charts will happen + * immediately. + * @memberof dc + * @member disableTransitions + * @type {Boolean} + * @default false + */ +dc.disableTransitions = false; + +/** + * Start a transition on a selection if transitions are globally enabled + * ({@link dc.disableTransitions} is false) and the duration is greater than zero; otherwise return + * the selection. Since most operations are the same on a d3 selection and a d3 transition, this + * allows a common code path for both cases. + * @memberof dc + * @method transition + * @param {d3.selection} selection - the selection to be transitioned + * @param {Number|Function} [duration=250] - the duration of the transition in milliseconds, a + * function returning the duration, or 0 for no transition + * @param {Number|Function} [delay] - the delay of the transition in milliseconds, or a function + * returning the delay, or 0 for no delay + * @param {String} [name] - the name of the transition (if concurrent transitions on the same + * elements are needed) + * @returns {d3.transition|d3.selection} + */ +dc.transition = function (selection, duration, delay, name) { + if (dc.disableTransitions || duration <= 0) { + return selection; + } + + var s = selection.transition(name); + + if (duration >= 0 || duration !== undefined) { + s = s.duration(duration); + } + if (delay >= 0 || delay !== undefined) { + s = s.delay(delay); + } + + return s; +}; + +/* somewhat silly, but to avoid duplicating logic */ +dc.optionalTransition = function (enable, duration, delay, name) { + if (enable) { + return function (selection) { + return dc.transition(selection, duration, delay, name); + }; + } else { + return function (selection) { + return selection; + }; + } +}; + +// See http://stackoverflow.com/a/20773846 +dc.afterTransition = function (transition, callback) { + if (transition.empty() || !transition.duration) { + callback.call(transition); + } else { + var n = 0; + transition + .each(function () { ++n; }) + .each('end', function () { + if (!--n) { + callback.call(transition); + } + }); + } +}; + +/** + * @namespace units + * @memberof dc + * @type {{}} + */ +dc.units = {}; + +/** + * The default value for {@link dc.coordinateGridMixin#xUnits .xUnits} for the + * {@link dc.coordinateGridMixin Coordinate Grid Chart} and should + * be used when the x values are a sequence of integers. + * It is a function that counts the number of integers in the range supplied in its start and end parameters. + * @method integers + * @memberof dc.units + * @see {@link dc.coordinateGridMixin#xUnits coordinateGridMixin.xUnits} + * @example + * chart.xUnits(dc.units.integers) // already the default + * @param {Number} start + * @param {Number} end + * @returns {Number} + */ +dc.units.integers = function (start, end) { + return Math.abs(end - start); +}; + +/** + * This argument can be passed to the {@link dc.coordinateGridMixin#xUnits .xUnits} function of the to + * specify ordinal units for the x axis. Usually this parameter is used in combination with passing + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Ordinal-Scales.md d3.scale.ordinal} to + * {@link dc.coordinateGridMixin#x .x}. + * It just returns the domain passed to it, which for ordinal charts is an array of all values. + * @method ordinal + * @memberof dc.units + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Ordinal-Scales.md d3.scale.ordinal} + * @see {@link dc.coordinateGridMixin#xUnits coordinateGridMixin.xUnits} + * @see {@link dc.coordinateGridMixin#x coordinateGridMixin.x} + * @example + * chart.xUnits(dc.units.ordinal) + * .x(d3.scale.ordinal()) + * @param {*} start + * @param {*} end + * @param {Array<String>} domain + * @returns {Array<String>} + */ +dc.units.ordinal = function (start, end, domain) { + return domain; +}; + +/** + * @namespace fp + * @memberof dc.units + * @type {{}} + */ +dc.units.fp = {}; +/** + * This function generates an argument for the {@link dc.coordinateGridMixin Coordinate Grid Chart} + * {@link dc.coordinateGridMixin#xUnits .xUnits} function specifying that the x values are floating-point + * numbers with the given precision. + * The returned function determines how many values at the given precision will fit into the range + * supplied in its start and end parameters. + * @method precision + * @memberof dc.units.fp + * @see {@link dc.coordinateGridMixin#xUnits coordinateGridMixin.xUnits} + * @example + * // specify values (and ticks) every 0.1 units + * chart.xUnits(dc.units.fp.precision(0.1) + * // there are 500 units between 0.5 and 1 if the precision is 0.001 + * var thousandths = dc.units.fp.precision(0.001); + * thousandths(0.5, 1.0) // returns 500 + * @param {Number} precision + * @returns {Function} start-end unit function + */ +dc.units.fp.precision = function (precision) { + var _f = function (s, e) { + var d = Math.abs((e - s) / _f.resolution); + if (dc.utils.isNegligible(d - Math.floor(d))) { + return Math.floor(d); + } else { + return Math.ceil(d); + } + }; + _f.resolution = precision; + return _f; +}; + +dc.round = {}; +dc.round.floor = function (n) { + return Math.floor(n); +}; +dc.round.ceil = function (n) { + return Math.ceil(n); +}; +dc.round.round = function (n) { + return Math.round(n); +}; + +dc.override = function (obj, functionName, newFunction) { + var existingFunction = obj[functionName]; + obj['_' + functionName] = existingFunction; + obj[functionName] = newFunction; +}; + +dc.renderlet = function (_) { + if (!arguments.length) { + return dc._renderlet; + } + dc._renderlet = _; + return dc; +}; + +dc.instanceOfChart = function (o) { + return o instanceof Object && o.__dcFlag__ && true; +}; + +dc.errors = {}; + +dc.errors.Exception = function (msg) { + var _msg = msg || 'Unexpected internal error'; + + this.message = _msg; + + this.toString = function () { + return _msg; + }; + this.stack = (new Error()).stack; +}; +dc.errors.Exception.prototype = Object.create(Error.prototype); +dc.errors.Exception.prototype.constructor = dc.errors.Exception; + +dc.errors.InvalidStateException = function () { + dc.errors.Exception.apply(this, arguments); +}; + +dc.errors.InvalidStateException.prototype = Object.create(dc.errors.Exception.prototype); +dc.errors.InvalidStateException.prototype.constructor = dc.errors.InvalidStateException; + +dc.errors.BadArgumentException = function () { + dc.errors.Exception.apply(this, arguments); +}; + +dc.errors.BadArgumentException.prototype = Object.create(dc.errors.Exception.prototype); +dc.errors.BadArgumentException.prototype.constructor = dc.errors.BadArgumentException; + +/** + * The default date format for dc.js + * @name dateFormat + * @memberof dc + * @type {Function} + * @default d3.time.format('%m/%d/%Y') + */ +dc.dateFormat = d3.time.format('%m/%d/%Y'); + +/** + * @namespace printers + * @memberof dc + * @type {{}} + */ +dc.printers = {}; + +/** + * Converts a list of filters into a readable string. + * @method filters + * @memberof dc.printers + * @param {Array<dc.filters>} filters + * @returns {String} + */ +dc.printers.filters = function (filters) { + var s = ''; + + for (var i = 0; i < filters.length; ++i) { + if (i > 0) { + s += ', '; + } + s += dc.printers.filter(filters[i]); + } + + return s; +}; + +/** + * Converts a filter into a readable string. + * @method filter + * @memberof dc.printers + * @param {dc.filters|any|Array<any>} filter + * @returns {String} + */ +dc.printers.filter = function (filter) { + var s = ''; + + if (typeof filter !== 'undefined' && filter !== null) { + if (filter instanceof Array) { + if (filter.length >= 2) { + s = '[' + dc.utils.printSingleValue(filter[0]) + ' -> ' + dc.utils.printSingleValue(filter[1]) + ']'; + } else if (filter.length >= 1) { + s = dc.utils.printSingleValue(filter[0]); + } + } else { + s = dc.utils.printSingleValue(filter); + } + } + + return s; +}; + +/** + * Returns a function that given a string property name, can be used to pluck the property off an object. A function + * can be passed as the second argument to also alter the data being returned. + * + * This can be a useful shorthand method to create accessor functions. + * @method pluck + * @memberof dc + * @example + * var xPluck = dc.pluck('x'); + * var objA = {x: 1}; + * xPluck(objA) // 1 + * @example + * var xPosition = dc.pluck('x', function (x, i) { + * // `this` is the original datum, + * // `x` is the x property of the datum, + * // `i` is the position in the array + * return this.radius + x; + * }); + * dc.selectAll('.circle').data(...).x(xPosition); + * @param {String} n + * @param {Function} [f] + * @returns {Function} + */ +dc.pluck = function (n, f) { + if (!f) { + return function (d) { return d[n]; }; + } + return function (d, i) { return f.call(d, d[n], i); }; +}; + +/** + * @namespace utils + * @memberof dc + * @type {{}} + */ +dc.utils = {}; + +/** + * Print a single value filter. + * @method printSingleValue + * @memberof dc.utils + * @param {any} filter + * @returns {String} + */ +dc.utils.printSingleValue = function (filter) { + var s = '' + filter; + + if (filter instanceof Date) { + s = dc.dateFormat(filter); + } else if (typeof(filter) === 'string') { + s = filter; + } else if (dc.utils.isFloat(filter)) { + s = dc.utils.printSingleValue.fformat(filter); + } else if (dc.utils.isInteger(filter)) { + s = Math.round(filter); + } + + return s; +}; +dc.utils.printSingleValue.fformat = d3.format('.2f'); + +/** + * Arbitrary add one value to another. + * @method add + * @memberof dc.utils + * @todo + * These assume than any string r is a percentage (whether or not it includes %). + * They also generate strange results if l is a string. + * @param {String|Date|Number} l the value to modify + * @param {Number} r the amount by which to modify the value + * @param {String} [t] if `l` is a `Date`, the + * [interval](https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Intervals.md#interval) in + * the `d3.time` namespace + * @returns {String|Date|Number} + */ +dc.utils.add = function (l, r, t) { + if (typeof r === 'string') { + r = r.replace('%', ''); + } + + if (l instanceof Date) { + if (typeof r === 'string') { + r = +r; + } + if (t === 'millis') { + return new Date(l.getTime() + r); + } + t = t || 'day'; + return d3.time[t].offset(l, r); + } else if (typeof r === 'string') { + var percentage = (+r / 100); + return l > 0 ? l * (1 + percentage) : l * (1 - percentage); + } else { + return l + r; + } +}; + +/** + * Arbitrary subtract one value from another. + * @method subtract + * @memberof dc.utils + * @todo + * These assume than any string r is a percentage (whether or not it includes %). + * They also generate strange results if l is a string. + * @param {String|Date|Number} l the value to modify + * @param {Number} r the amount by which to modify the value + * @param {String} [t] if `l` is a `Date`, the + * [interval](https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Intervals.md#interval) in + * the `d3.time` namespace + * @returns {String|Date|Number} + */ +dc.utils.subtract = function (l, r, t) { + if (typeof r === 'string') { + r = r.replace('%', ''); + } + + if (l instanceof Date) { + if (typeof r === 'string') { + r = +r; + } + if (t === 'millis') { + return new Date(l.getTime() - r); + } + t = t || 'day'; + return d3.time[t].offset(l, -r); + } else if (typeof r === 'string') { + var percentage = (+r / 100); + return l < 0 ? l * (1 + percentage) : l * (1 - percentage); + } else { + return l - r; + } +}; + +/** + * Is the value a number? + * @method isNumber + * @memberof dc.utils + * @param {any} n + * @returns {Boolean} + */ +dc.utils.isNumber = function (n) { + return n === +n; +}; + +/** + * Is the value a float? + * @method isFloat + * @memberof dc.utils + * @param {any} n + * @returns {Boolean} + */ +dc.utils.isFloat = function (n) { + return n === +n && n !== (n | 0); +}; + +/** + * Is the value an integer? + * @method isInteger + * @memberof dc.utils + * @param {any} n + * @returns {Boolean} + */ +dc.utils.isInteger = function (n) { + return n === +n && n === (n | 0); +}; + +/** + * Is the value very close to zero? + * @method isNegligible + * @memberof dc.utils + * @param {any} n + * @returns {Boolean} + */ +dc.utils.isNegligible = function (n) { + return !dc.utils.isNumber(n) || (n < dc.constants.NEGLIGIBLE_NUMBER && n > -dc.constants.NEGLIGIBLE_NUMBER); +}; + +/** + * Ensure the value is no greater or less than the min/max values. If it is return the boundary value. + * @method clamp + * @memberof dc.utils + * @param {any} val + * @param {any} min + * @param {any} max + * @returns {any} + */ +dc.utils.clamp = function (val, min, max) { + return val < min ? min : (val > max ? max : val); +}; + +/** + * Using a simple static counter, provide a unique integer id. + * @method uniqueId + * @memberof dc.utils + * @returns {Number} + */ +var _idCounter = 0; +dc.utils.uniqueId = function () { + return ++_idCounter; +}; + +/** + * Convert a name to an ID. + * @method nameToId + * @memberof dc.utils + * @param {String} name + * @returns {String} + */ +dc.utils.nameToId = function (name) { + return name.toLowerCase().replace(/[\s]/g, '_').replace(/[\.']/g, ''); +}; + +/** + * Append or select an item on a parent element. + * @method appendOrSelect + * @memberof dc.utils + * @param {d3.selection} parent + * @param {String} selector + * @param {String} tag + * @returns {d3.selection} + */ +dc.utils.appendOrSelect = function (parent, selector, tag) { + tag = tag || selector; + var element = parent.select(selector); + if (element.empty()) { + element = parent.append(tag); + } + return element; +}; + +/** + * Return the number if the value is a number; else 0. + * @method safeNumber + * @memberof dc.utils + * @param {Number|any} n + * @returns {Number} + */ +dc.utils.safeNumber = function (n) { return dc.utils.isNumber(+n) ? +n : 0;}; + +dc.logger = {}; + +dc.logger.enableDebugLog = false; + +dc.logger.warn = function (msg) { + if (console) { + if (console.warn) { + console.warn(msg); + } else if (console.log) { + console.log(msg); + } + } + + return dc.logger; +}; + +dc.logger.debug = function (msg) { + if (dc.logger.enableDebugLog && console) { + if (console.debug) { + console.debug(msg); + } else if (console.log) { + console.log(msg); + } + } + + return dc.logger; +}; + +dc.logger.deprecate = function (fn, msg) { + // Allow logging of deprecation + var warned = false; + function deprecated () { + if (!warned) { + dc.logger.warn(msg); + warned = true; + } + return fn.apply(this, arguments); + } + return deprecated; +}; + +dc.events = { + current: null +}; + +/** + * This function triggers a throttled event function with a specified delay (in milli-seconds). Events + * that are triggered repetitively due to user interaction such brush dragging might flood the library + * and invoke more renders than can be executed in time. Using this function to wrap your event + * function allows the library to smooth out the rendering by throttling events and only responding to + * the most recent event. + * @name events.trigger + * @memberof dc + * @example + * chart.on('renderlet', function(chart) { + * // smooth the rendering through event throttling + * dc.events.trigger(function(){ + * // focus some other chart to the range selected by user on this chart + * someOtherChart.focus(chart.filter()); + * }); + * }) + * @param {Function} closure + * @param {Number} [delay] + */ +dc.events.trigger = function (closure, delay) { + if (!delay) { + closure(); + return; + } + + dc.events.current = closure; + + setTimeout(function () { + if (closure === dc.events.current) { + closure(); + } + }, delay); +}; + +/** + * The dc.js filters are functions which are passed into crossfilter to chose which records will be + * accumulated to produce values for the charts. In the crossfilter model, any filters applied on one + * dimension will affect all the other dimensions but not that one. dc always applies a filter + * function to the dimension; the function combines multiple filters and if any of them accept a + * record, it is filtered in. + * + * These filter constructors are used as appropriate by the various charts to implement brushing. We + * mention below which chart uses which filter. In some cases, many instances of a filter will be added. + * + * Each of the dc.js filters is an object with the following properties: + * * `isFiltered` - a function that returns true if a value is within the filter + * * `filterType` - a string identifying the filter, here the name of the constructor + * + * Currently these filter objects are also arrays, but this is not a requirement. Custom filters + * can be used as long as they have the properties above. + * @namespace filters + * @memberof dc + * @type {{}} + */ +dc.filters = {}; + +/** + * RangedFilter is a filter which accepts keys between `low` and `high`. It is used to implement X + * axis brushing for the {@link dc.coordinateGridMixin coordinate grid charts}. + * + * Its `filterType` is 'RangedFilter' + * @name RangedFilter + * @memberof dc.filters + * @param {Number} low + * @param {Number} high + * @returns {Array<Number>} + * @constructor + */ +dc.filters.RangedFilter = function (low, high) { + var range = new Array(low, high); + range.isFiltered = function (value) { + return value >= this[0] && value < this[1]; + }; + range.filterType = 'RangedFilter'; + + return range; +}; + +/** + * TwoDimensionalFilter is a filter which accepts a single two-dimensional value. It is used by the + * {@link dc.heatMap heat map chart} to include particular cells as they are clicked. (Rows and columns are + * filtered by filtering all the cells in the row or column.) + * + * Its `filterType` is 'TwoDimensionalFilter' + * @name TwoDimensionalFilter + * @memberof dc.filters + * @param {Array<Number>} filter + * @returns {Array<Number>} + * @constructor + */ +dc.filters.TwoDimensionalFilter = function (filter) { + if (filter === null) { return null; } + + var f = filter; + f.isFiltered = function (value) { + return value.length && value.length === f.length && + value[0] === f[0] && value[1] === f[1]; + }; + f.filterType = 'TwoDimensionalFilter'; + + return f; +}; + +/** + * The RangedTwoDimensionalFilter allows filtering all values which fit within a rectangular + * region. It is used by the {@link dc.scatterPlot scatter plot} to implement rectangular brushing. + * + * It takes two two-dimensional points in the form `[[x1,y1],[x2,y2]]`, and normalizes them so that + * `x1 <= x2` and `y1 <= y2`. It then returns a filter which accepts any points which are in the + * rectangular range including the lower values but excluding the higher values. + * + * If an array of two values are given to the RangedTwoDimensionalFilter, it interprets the values as + * two x coordinates `x1` and `x2` and returns a filter which accepts any points for which `x1 <= x < + * x2`. + * + * Its `filterType` is 'RangedTwoDimensionalFilter' + * @name RangedTwoDimensionalFilter + * @memberof dc.filters + * @param {Array<Array<Number>>} filter + * @returns {Array<Array<Number>>} + * @constructor + */ +dc.filters.RangedTwoDimensionalFilter = function (filter) { + if (filter === null) { return null; } + + var f = filter; + var fromBottomLeft; + + if (f[0] instanceof Array) { + fromBottomLeft = [ + [Math.min(filter[0][0], filter[1][0]), Math.min(filter[0][1], filter[1][1])], + [Math.max(filter[0][0], filter[1][0]), Math.max(filter[0][1], filter[1][1])] + ]; + } else { + fromBottomLeft = [[filter[0], -Infinity], [filter[1], Infinity]]; + } + + f.isFiltered = function (value) { + var x, y; + + if (value instanceof Array) { + x = value[0]; + y = value[1]; + } else { + x = value; + y = fromBottomLeft[0][1]; + } + + return x >= fromBottomLeft[0][0] && x < fromBottomLeft[1][0] && + y >= fromBottomLeft[0][1] && y < fromBottomLeft[1][1]; + }; + f.filterType = 'RangedTwoDimensionalFilter'; + + return f; +}; + +/** + * `dc.baseMixin` is an abstract functional object representing a basic `dc` chart object + * for all chart and widget implementations. Methods from the {@link #dc.baseMixin dc.baseMixin} are inherited + * and available on all chart implementations in the `dc` library. + * @name baseMixin + * @memberof dc + * @mixin + * @param {Object} _chart + * @returns {dc.baseMixin} + */ +dc.baseMixin = function (_chart) { + _chart.__dcFlag__ = dc.utils.uniqueId(); + + var _dimension; + var _group; + + var _anchor; + var _root; + var _svg; + var _isChild; + + var _minWidth = 200; + var _defaultWidthCalc = function (element) { + var width = element && element.getBoundingClientRect && element.getBoundingClientRect().width; + return (width && width > _minWidth) ? width : _minWidth; + }; + var _widthCalc = _defaultWidthCalc; + + var _minHeight = 200; + var _defaultHeightCalc = function (element) { + var height = element && element.getBoundingClientRect && element.getBoundingClientRect().height; + return (height && height > _minHeight) ? height : _minHeight; + }; + var _heightCalc = _defaultHeightCalc; + var _width, _height; + var _useViewBoxResizing = false; + + var _keyAccessor = dc.pluck('key'); + var _valueAccessor = dc.pluck('value'); + var _label = dc.pluck('key'); + + var _ordering = dc.pluck('key'); + var _orderSort; + + var _renderLabel = false; + + var _title = function (d) { + return _chart.keyAccessor()(d) + ': ' + _chart.valueAccessor()(d); + }; + var _renderTitle = true; + var _controlsUseVisibility = false; + + var _transitionDuration = 750; + + var _transitionDelay = 0; + + var _filterPrinter = dc.printers.filters; + + var _mandatoryAttributes = ['dimension', 'group']; + + var _chartGroup = dc.constants.DEFAULT_CHART_GROUP; + + var _listeners = d3.dispatch( + 'preRender', + 'postRender', + 'preRedraw', + 'postRedraw', + 'filtered', + 'zoomed', + 'renderlet', + 'pretransition'); + + var _legend; + var _commitHandler; + + var _filters = []; + var _filterHandler = function (dimension, filters) { + if (filters.length === 0) { + dimension.filter(null); + } else if (filters.length === 1 && !filters[0].isFiltered) { + // single value and not a function-based filter + dimension.filterExact(filters[0]); + } else if (filters.length === 1 && filters[0].filterType === 'RangedFilter') { + // single range-based filter + dimension.filterRange(filters[0]); + } else { + dimension.filterFunction(function (d) { + for (var i = 0; i < filters.length; i++) { + var filter = filters[i]; + if (filter.isFiltered && filter.isFiltered(d)) { + return true; + } else if (filter <= d && filter >= d) { + return true; + } + } + return false; + }); + } + return filters; + }; + + var _data = function (group) { + return group.all(); + }; + + /** + * Set or get the height attribute of a chart. The height is applied to the SVGElement generated by + * the chart when rendered (or re-rendered). If a value is given, then it will be used to calculate + * the new height and the chart returned for method chaining. The value can either be a numeric, a + * function, or falsy. If no value is specified then the value of the current height attribute will + * be returned. + * + * By default, without an explicit height being given, the chart will select the width of its + * anchor element. If that isn't possible it defaults to 200 (provided by the + * {@link dc.baseMixin#minHeight minHeight} property). Setting the value falsy will return + * the chart to the default behavior. + * @method height + * @memberof dc.baseMixin + * @instance + * @see {@link dc.baseMixin#minHeight minHeight} + * @example + * // Default height + * chart.height(function (element) { + * var height = element && element.getBoundingClientRect && element.getBoundingClientRect().height; + * return (height && height > chart.minHeight()) ? height : chart.minHeight(); + * }); + * + * chart.height(250); // Set the chart's height to 250px; + * chart.height(function(anchor) { return doSomethingWith(anchor); }); // set the chart's height with a function + * chart.height(null); // reset the height to the default auto calculation + * @param {Number|Function} [height] + * @returns {Number|dc.baseMixin} + */ + _chart.height = function (height) { + if (!arguments.length) { + if (!dc.utils.isNumber(_height)) { + // only calculate once + _height = _heightCalc(_root.node()); + } + return _height; + } + _heightCalc = d3.functor(height || _defaultHeightCalc); + _height = undefined; + return _chart; + }; + + /** + * Set or get the width attribute of a chart. + * @method width + * @memberof dc.baseMixin + * @instance + * @see {@link dc.baseMixin#height height} + * @see {@link dc.baseMixin#minWidth minWidth} + * @example + * // Default width + * chart.width(function (element) { + * var width = element && element.getBoundingClientRect && element.getBoundingClientRect().width; + * return (width && width > chart.minWidth()) ? width : chart.minWidth(); + * }); + * @param {Number|Function} [width] + * @returns {Number|dc.baseMixin} + */ + _chart.width = function (width) { + if (!arguments.length) { + if (!dc.utils.isNumber(_width)) { + // only calculate once + _width = _widthCalc(_root.node()); + } + return _width; + } + _widthCalc = d3.functor(width || _defaultWidthCalc); + _width = undefined; + return _chart; + }; + + /** + * Set or get the minimum width attribute of a chart. This only has effect when used with the default + * {@link dc.baseMixin#width width} function. + * @method minWidth + * @memberof dc.baseMixin + * @instance + * @see {@link dc.baseMixin#width width} + * @param {Number} [minWidth=200] + * @returns {Number|dc.baseMixin} + */ + _chart.minWidth = function (minWidth) { + if (!arguments.length) { + return _minWidth; + } + _minWidth = minWidth; + return _chart; + }; + + /** + * Set or get the minimum height attribute of a chart. This only has effect when used with the default + * {@link dc.baseMixin#height height} function. + * @method minHeight + * @memberof dc.baseMixin + * @instance + * @see {@link dc.baseMixin#height height} + * @param {Number} [minHeight=200] + * @returns {Number|dc.baseMixin} + */ + _chart.minHeight = function (minHeight) { + if (!arguments.length) { + return _minHeight; + } + _minHeight = minHeight; + return _chart; + }; + + /** + * Turn on/off using the SVG + * {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/viewBox `viewBox` attribute}. + * When enabled, `viewBox` will be set on the svg root element instead of `width` and `height`. + * Requires that the chart aspect ratio be defined using chart.width(w) and chart.height(h). + * + * This will maintain the aspect ratio while enabling the chart to resize responsively to the + * space given to the chart using CSS. For example, the chart can use `width: 100%; height: + * 100%` or absolute positioning to resize to its parent div. + * + * Since the text will be sized as if the chart is drawn according to the width and height, and + * will be resized if the chart is any other size, you need to set the chart width and height so + * that the text looks good. In practice, 600x400 seems to work pretty well for most charts. + * + * You can see examples of this resizing strategy in the [Chart Resizing + * Examples](http://dc-js.github.io/dc.js/resizing/); just add `?resize=viewbox` to any of the + * one-chart examples to enable `useViewBoxResizing`. + * @method useViewBoxResizing + * @memberof dc.baseMixin + * @instance + * @param {Boolean} [useViewBoxResizing=false] + * @returns {Boolean|dc.baseMixin} + */ + _chart.useViewBoxResizing = function (useViewBoxResizing) { + if (!arguments.length) { + return _useViewBoxResizing; + } + _useViewBoxResizing = useViewBoxResizing; + return _chart; + }; + + /** + * **mandatory** + * + * Set or get the dimension attribute of a chart. In `dc`, a dimension can be any valid + * {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#dimension crossfilter dimension} + * + * If a value is given, then it will be used as the new dimension. If no value is specified then + * the current dimension will be returned. + * @method dimension + * @memberof dc.baseMixin + * @instance + * @see {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#dimension crossfilter.dimension} + * @example + * var index = crossfilter([]); + * var dimension = index.dimension(dc.pluck('key')); + * chart.dimension(dimension); + * @param {crossfilter.dimension} [dimension] + * @returns {crossfilter.dimension|dc.baseMixin} + */ + _chart.dimension = function (dimension) { + if (!arguments.length) { + return _dimension; + } + _dimension = dimension; + _chart.expireCache(); + return _chart; + }; + + /** + * Set the data callback or retrieve the chart's data set. The data callback is passed the chart's + * group and by default will return + * {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#group_all group.all}. + * This behavior may be modified to, for instance, return only the top 5 groups. + * @method data + * @memberof dc.baseMixin + * @instance + * @example + * // Default data function + * chart.data(function (group) { return group.all(); }); + * + * chart.data(function (group) { return group.top(5); }); + * @param {Function} [callback] + * @returns {*|dc.baseMixin} + */ + _chart.data = function (callback) { + if (!arguments.length) { + return _data.call(_chart, _group); + } + _data = d3.functor(callback); + _chart.expireCache(); + return _chart; + }; + + /** + * **mandatory** + * + * Set or get the group attribute of a chart. In `dc` a group is a + * {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#group-map-reduce crossfilter group}. + * Usually the group should be created from the particular dimension associated with the same chart. If a value is + * given, then it will be used as the new group. + * + * If no value specified then the current group will be returned. + * If `name` is specified then it will be used to generate legend label. + * @method group + * @memberof dc.baseMixin + * @instance + * @see {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#group-map-reduce crossfilter.group} + * @example + * var index = crossfilter([]); + * var dimension = index.dimension(dc.pluck('key')); + * chart.dimension(dimension); + * chart.group(dimension.group(crossfilter.reduceSum())); + * @param {crossfilter.group} [group] + * @param {String} [name] + * @returns {crossfilter.group|dc.baseMixin} + */ + _chart.group = function (group, name) { + if (!arguments.length) { + return _group; + } + _group = group; + _chart._groupName = name; + _chart.expireCache(); + return _chart; + }; + + /** + * Get or set an accessor to order ordinal dimensions. The chart uses + * {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#quicksort_by crossfilter.quicksort.by} + * to sort elements; this accessor returns the value to order on. + * @method ordering + * @memberof dc.baseMixin + * @instance + * @see {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#quicksort_by crossfilter.quicksort.by} + * @example + * // Default ordering accessor + * _chart.ordering(dc.pluck('key')); + * @param {Function} [orderFunction] + * @returns {Function|dc.baseMixin} + */ + _chart.ordering = function (orderFunction) { + if (!arguments.length) { + return _ordering; + } + _ordering = orderFunction; + _orderSort = crossfilter.quicksort.by(_ordering); + _chart.expireCache(); + return _chart; + }; + + _chart._computeOrderedGroups = function (data) { + var dataCopy = data.slice(0); + + if (dataCopy.length <= 1) { + return dataCopy; + } + + if (!_orderSort) { + _orderSort = crossfilter.quicksort.by(_ordering); + } + + return _orderSort(dataCopy, 0, dataCopy.length); + }; + + /** + * Clear all filters associated with this chart. The same effect can be achieved by calling + * {@link dc.baseMixin#filter chart.filter(null)}. + * @method filterAll + * @memberof dc.baseMixin + * @instance + * @returns {dc.baseMixin} + */ + _chart.filterAll = function () { + return _chart.filter(null); + }; + + /** + * Execute d3 single selection in the chart's scope using the given selector and return the d3 + * selection. + * + * This function is **not chainable** since it does not return a chart instance; however the d3 + * selection result can be chained to d3 function calls. + * @method select + * @memberof dc.baseMixin + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#d3_select d3.select} + * @example + * // Has the same effect as d3.select('#chart-id').select(selector) + * chart.select(selector) + * @returns {d3.selection} + */ + _chart.select = function (s) { + return _root.select(s); + }; + + /** + * Execute in scope d3 selectAll using the given selector and return d3 selection result. + * + * This function is **not chainable** since it does not return a chart instance; however the d3 + * selection result can be chained to d3 function calls. + * @method selectAll + * @memberof dc.baseMixin + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#d3_selectAll d3.selectAll} + * @example + * // Has the same effect as d3.select('#chart-id').selectAll(selector) + * chart.selectAll(selector) + * @returns {d3.selection} + */ + _chart.selectAll = function (s) { + return _root ? _root.selectAll(s) : null; + }; + + /** + * Set the root SVGElement to either be an existing chart's root; or any valid [d3 single + * selector](https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements) specifying a dom + * block element such as a div; or a dom element or d3 selection. Optionally registers the chart + * within the chartGroup. This class is called internally on chart initialization, but be called + * again to relocate the chart. However, it will orphan any previously created SVGElements. + * @method anchor + * @memberof dc.baseMixin + * @instance + * @param {anchorChart|anchorSelector|anchorNode} [parent] + * @param {String} [chartGroup] + * @returns {String|node|d3.selection|dc.baseMixin} + */ + _chart.anchor = function (parent, chartGroup) { + if (!arguments.length) { + return _anchor; + } + if (dc.instanceOfChart(parent)) { + _anchor = parent.anchor(); + _root = parent.root(); + _isChild = true; + } else if (parent) { + if (parent.select && parent.classed) { // detect d3 selection + _anchor = parent.node(); + } else { + _anchor = parent; + } + _root = d3.select(_anchor); + _root.classed(dc.constants.CHART_CLASS, true); + dc.registerChart(_chart, chartGroup); + _isChild = false; + } else { + throw new dc.errors.BadArgumentException('parent must be defined'); + } + _chartGroup = chartGroup; + return _chart; + }; + + /** + * Returns the DOM id for the chart's anchored location. + * @method anchorName + * @memberof dc.baseMixin + * @instance + * @returns {String} + */ + _chart.anchorName = function () { + var a = _chart.anchor(); + if (a && a.id) { + return a.id; + } + if (a && a.replace) { + return a.replace('#', ''); + } + return 'dc-chart' + _chart.chartID(); + }; + + /** + * Returns the root element where a chart resides. Usually it will be the parent div element where + * the SVGElement was created. You can also pass in a new root element however this is usually handled by + * dc internally. Resetting the root element on a chart outside of dc internals may have + * unexpected consequences. + * @method root + * @memberof dc.baseMixin + * @instance + * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement HTMLElement} + * @param {HTMLElement} [rootElement] + * @returns {HTMLElement|dc.baseMixin} + */ + _chart.root = function (rootElement) { + if (!arguments.length) { + return _root; + } + _root = rootElement; + return _chart; + }; + + /** + * Returns the top SVGElement for this specific chart. You can also pass in a new SVGElement, + * however this is usually handled by dc internally. Resetting the SVGElement on a chart outside + * of dc internals may have unexpected consequences. + * @method svg + * @memberof dc.baseMixin + * @instance + * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/SVGElement SVGElement} + * @param {SVGElement|d3.selection} [svgElement] + * @returns {SVGElement|d3.selection|dc.baseMixin} + */ + _chart.svg = function (svgElement) { + if (!arguments.length) { + return _svg; + } + _svg = svgElement; + return _chart; + }; + + /** + * Remove the chart's SVGElements from the dom and recreate the container SVGElement. + * @method resetSvg + * @memberof dc.baseMixin + * @instance + * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/SVGElement SVGElement} + * @returns {SVGElement} + */ + _chart.resetSvg = function () { + _chart.select('svg').remove(); + return generateSvg(); + }; + + function sizeSvg () { + if (_svg) { + if (!_useViewBoxResizing) { + _svg + .attr('width', _chart.width()) + .attr('height', _chart.height()); + } else if (!_svg.attr('viewBox')) { + _svg + .attr('viewBox', '0 0 ' + _chart.width() + ' ' + _chart.height()); + } + } + } + + function generateSvg () { + _svg = _chart.root().append('svg'); + sizeSvg(); + return _svg; + } + + /** + * Set or get the filter printer function. The filter printer function is used to generate human + * friendly text for filter value(s) associated with the chart instance. The text will get shown + * in the `.filter element; see {@link dc.baseMixin#turnOnControls turnOnControls}. + * + * By default dc charts use a default filter printer {@link dc.printers.filters dc.printers.filters} + * that provides simple printing support for both single value and ranged filters. + * @method filterPrinter + * @memberof dc.baseMixin + * @instance + * @example + * // for a chart with an ordinal brush, print the filters in upper case + * chart.filterPrinter(function(filters) { + * return filters.map(function(f) { return f.toUpperCase(); }).join(', '); + * }); + * // for a chart with a range brush, print the filter as start and extent + * chart.filterPrinter(function(filters) { + * return 'start ' + dc.utils.printSingleValue(filters[0][0]) + + * ' extent ' + dc.utils.printSingleValue(filters[0][1] - filters[0][0]); + * }); + * @param {Function} [filterPrinterFunction=dc.printers.filters] + * @returns {Function|dc.baseMixin} + */ + _chart.filterPrinter = function (filterPrinterFunction) { + if (!arguments.length) { + return _filterPrinter; + } + _filterPrinter = filterPrinterFunction; + return _chart; + }; + + /** + * If set, use the `visibility` attribute instead of the `display` attribute for showing/hiding + * chart reset and filter controls, for less disruption to the layout. + * @method controlsUseVisibility + * @memberof dc.baseMixin + * @instance + * @param {Boolean} [controlsUseVisibility=false] + * @returns {Boolean|dc.baseMixin} + **/ + _chart.controlsUseVisibility = function (useVisibility) { + if (!arguments.length) { + return _controlsUseVisibility; + } + _controlsUseVisibility = useVisibility; + return _chart; + }; + + /** + * Turn on optional control elements within the root element. dc currently supports the + * following html control elements. + * * root.selectAll('.reset') - elements are turned on if the chart has an active filter. This type + * of control element is usually used to store a reset link to allow user to reset filter on a + * certain chart. This element will be turned off automatically if the filter is cleared. + * * root.selectAll('.filter') elements are turned on if the chart has an active filter. The text + * content of this element is then replaced with the current filter value using the filter printer + * function. This type of element will be turned off automatically if the filter is cleared. + * @method turnOnControls + * @memberof dc.baseMixin + * @instance + * @returns {dc.baseMixin} + */ + _chart.turnOnControls = function () { + if (_root) { + var attribute = _chart.controlsUseVisibility() ? 'visibility' : 'display'; + _chart.selectAll('.reset').style(attribute, null); + _chart.selectAll('.filter').text(_filterPrinter(_chart.filters())).style(attribute, null); + } + return _chart; + }; + + /** + * Turn off optional control elements within the root element. + * @method turnOffControls + * @memberof dc.baseMixin + * @see {@link dc.baseMixin#turnOnControls turnOnControls} + * @instance + * @returns {dc.baseMixin} + */ + _chart.turnOffControls = function () { + if (_root) { + var attribute = _chart.controlsUseVisibility() ? 'visibility' : 'display'; + var value = _chart.controlsUseVisibility() ? 'hidden' : 'none'; + _chart.selectAll('.reset').style(attribute, value); + _chart.selectAll('.filter').style(attribute, value).text(_chart.filter()); + } + return _chart; + }; + + /** + * Set or get the animation transition duration (in milliseconds) for this chart instance. + * @method transitionDuration + * @memberof dc.baseMixin + * @instance + * @param {Number} [duration=750] + * @returns {Number|dc.baseMixin} + */ + _chart.transitionDuration = function (duration) { + if (!arguments.length) { + return _transitionDuration; + } + _transitionDuration = duration; + return _chart; + }; + + /** + * Set or get the animation transition delay (in milliseconds) for this chart instance. + * @method transitionDelay + * @memberof dc.baseMixin + * @instance + * @param {Number} [delay=0] + * @returns {Number|dc.baseMixin} + */ + _chart.transitionDelay = function (delay) { + if (!arguments.length) { + return _transitionDelay; + } + _transitionDelay = delay; + return _chart; + }; + + _chart._mandatoryAttributes = function (_) { + if (!arguments.length) { + return _mandatoryAttributes; + } + _mandatoryAttributes = _; + return _chart; + }; + + function checkForMandatoryAttributes (a) { + if (!_chart[a] || !_chart[a]()) { + throw new dc.errors.InvalidStateException('Mandatory attribute chart.' + a + + ' is missing on chart[#' + _chart.anchorName() + ']'); + } + } + + /** + * Invoking this method will force the chart to re-render everything from scratch. Generally it + * should only be used to render the chart for the first time on the page or if you want to make + * sure everything is redrawn from scratch instead of relying on the default incremental redrawing + * behaviour. + * @method render + * @memberof dc.baseMixin + * @instance + * @returns {dc.baseMixin} + */ + _chart.render = function () { + _height = _width = undefined; // force recalculate + _listeners.preRender(_chart); + + if (_mandatoryAttributes) { + _mandatoryAttributes.forEach(checkForMandatoryAttributes); + } + + var result = _chart._doRender(); + + if (_legend) { + _legend.render(); + } + + _chart._activateRenderlets('postRender'); + + return result; + }; + + _chart._activateRenderlets = function (event) { + _listeners.pretransition(_chart); + if (_chart.transitionDuration() > 0 && _svg) { + _svg.transition().duration(_chart.transitionDuration()).delay(_chart.transitionDelay()) + .each('end', function () { + _listeners.renderlet(_chart); + if (event) { + _listeners[event](_chart); + } + }); + } else { + _listeners.renderlet(_chart); + if (event) { + _listeners[event](_chart); + } + } + }; + + /** + * Calling redraw will cause the chart to re-render data changes incrementally. If there is no + * change in the underlying data dimension then calling this method will have no effect on the + * chart. Most chart interaction in dc will automatically trigger this method through internal + * events (in particular {@link dc.redrawAll dc.redrawAll}); therefore, you only need to + * manually invoke this function if data is manipulated outside of dc's control (for example if + * data is loaded in the background using + * {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#crossfilter_add crossfilter.add}). + * @method redraw + * @memberof dc.baseMixin + * @instance + * @returns {dc.baseMixin} + */ + _chart.redraw = function () { + sizeSvg(); + _listeners.preRedraw(_chart); + + var result = _chart._doRedraw(); + + if (_legend) { + _legend.render(); + } + + _chart._activateRenderlets('postRedraw'); + + return result; + }; + + /** + * Gets/sets the commit handler. If the chart has a commit handler, the handler will be called when + * the chart's filters have changed, in order to send the filter data asynchronously to a server. + * + * Unlike other functions in dc.js, the commit handler is asynchronous. It takes two arguments: + * a flag indicating whether this is a render (true) or a redraw (false), and a callback to be + * triggered once the commit is filtered. The callback has the standard node.js continuation signature + * with error first and result second. + * @method commitHandler + * @memberof dc.baseMixin + * @instance + * @returns {dc.baseMixin} + */ + _chart.commitHandler = function (commitHandler) { + if (!arguments.length) { + return _commitHandler; + } + _commitHandler = commitHandler; + return _chart; + }; + + /** + * Redraws all charts in the same group as this chart, typically in reaction to a filter + * change. If the chart has a {@link dc.baseMixin.commitFilter commitHandler}, it will + * be executed and waited for. + * @method redrawGroup + * @memberof dc.baseMixin + * @instance + * @returns {dc.baseMixin} + */ + _chart.redrawGroup = function () { + if (_commitHandler) { + _commitHandler(false, function (error, result) { + if (error) { + console.log(error); + } else { + dc.redrawAll(_chart.chartGroup()); + } + }); + } else { + dc.redrawAll(_chart.chartGroup()); + } + return _chart; + }; + + /** + * Renders all charts in the same group as this chart. If the chart has a + * {@link dc.baseMixin.commitFilter commitHandler}, it will be executed and waited for + * @method renderGroup + * @memberof dc.baseMixin + * @instance + * @returns {dc.baseMixin} + */ + _chart.renderGroup = function () { + if (_commitHandler) { + _commitHandler(false, function (error, result) { + if (error) { + console.log(error); + } else { + dc.renderAll(_chart.chartGroup()); + } + }); + } else { + dc.renderAll(_chart.chartGroup()); + } + return _chart; + }; + + _chart._invokeFilteredListener = function (f) { + if (f !== undefined) { + _listeners.filtered(_chart, f); + } + }; + + _chart._invokeZoomedListener = function () { + _listeners.zoomed(_chart); + }; + + var _hasFilterHandler = function (filters, filter) { + if (filter === null || typeof(filter) === 'undefined') { + return filters.length > 0; + } + return filters.some(function (f) { + return filter <= f && filter >= f; + }); + }; + + /** + * Set or get the has-filter handler. The has-filter handler is a function that checks to see if + * the chart's current filters (first argument) include a specific filter (second argument). Using a custom has-filter handler allows + * you to change the way filters are checked for and replaced. + * @method hasFilterHandler + * @memberof dc.baseMixin + * @instance + * @example + * // default has-filter handler + * chart.hasFilterHandler(function (filters, filter) { + * if (filter === null || typeof(filter) === 'undefined') { + * return filters.length > 0; + * } + * return filters.some(function (f) { + * return filter <= f && filter >= f; + * }); + * }); + * + * // custom filter handler (no-op) + * chart.hasFilterHandler(function(filters, filter) { + * return false; + * }); + * @param {Function} [hasFilterHandler] + * @returns {Function|dc.baseMixin} + */ + _chart.hasFilterHandler = function (hasFilterHandler) { + if (!arguments.length) { + return _hasFilterHandler; + } + _hasFilterHandler = hasFilterHandler; + return _chart; + }; + + /** + * Check whether any active filter or a specific filter is associated with particular chart instance. + * This function is **not chainable**. + * @method hasFilter + * @memberof dc.baseMixin + * @instance + * @see {@link dc.baseMixin#hasFilterHandler hasFilterHandler} + * @param {*} [filter] + * @returns {Boolean} + */ + _chart.hasFilter = function (filter) { + return _hasFilterHandler(_filters, filter); + }; + + var _removeFilterHandler = function (filters, filter) { + for (var i = 0; i < filters.length; i++) { + if (filters[i] <= filter && filters[i] >= filter) { + filters.splice(i, 1); + break; + } + } + return filters; + }; + + /** + * Set or get the remove filter handler. The remove filter handler is a function that removes a + * filter from the chart's current filters. Using a custom remove filter handler allows you to + * change how filters are removed or perform additional work when removing a filter, e.g. when + * using a filter server other than crossfilter. + * + * The handler should return a new or modified array as the result. + * @method removeFilterHandler + * @memberof dc.baseMixin + * @instance + * @example + * // default remove filter handler + * chart.removeFilterHandler(function (filters, filter) { + * for (var i = 0; i < filters.length; i++) { + * if (filters[i] <= filter && filters[i] >= filter) { + * filters.splice(i, 1); + * break; + * } + * } + * return filters; + * }); + * + * // custom filter handler (no-op) + * chart.removeFilterHandler(function(filters, filter) { + * return filters; + * }); + * @param {Function} [removeFilterHandler] + * @returns {Function|dc.baseMixin} + */ + _chart.removeFilterHandler = function (removeFilterHandler) { + if (!arguments.length) { + return _removeFilterHandler; + } + _removeFilterHandler = removeFilterHandler; + return _chart; + }; + + var _addFilterHandler = function (filters, filter) { + filters.push(filter); + return filters; + }; + + /** + * Set or get the add filter handler. The add filter handler is a function that adds a filter to + * the chart's filter list. Using a custom add filter handler allows you to change the way filters + * are added or perform additional work when adding a filter, e.g. when using a filter server other + * than crossfilter. + * + * The handler should return a new or modified array as the result. + * @method addFilterHandler + * @memberof dc.baseMixin + * @instance + * @example + * // default add filter handler + * chart.addFilterHandler(function (filters, filter) { + * filters.push(filter); + * return filters; + * }); + * + * // custom filter handler (no-op) + * chart.addFilterHandler(function(filters, filter) { + * return filters; + * }); + * @param {Function} [addFilterHandler] + * @returns {Function|dc.baseMixin} + */ + _chart.addFilterHandler = function (addFilterHandler) { + if (!arguments.length) { + return _addFilterHandler; + } + _addFilterHandler = addFilterHandler; + return _chart; + }; + + var _resetFilterHandler = function (filters) { + return []; + }; + + /** + * Set or get the reset filter handler. The reset filter handler is a function that resets the + * chart's filter list by returning a new list. Using a custom reset filter handler allows you to + * change the way filters are reset, or perform additional work when resetting the filters, + * e.g. when using a filter server other than crossfilter. + * + * The handler should return a new or modified array as the result. + * @method resetFilterHandler + * @memberof dc.baseMixin + * @instance + * @example + * // default remove filter handler + * function (filters) { + * return []; + * } + * + * // custom filter handler (no-op) + * chart.resetFilterHandler(function(filters) { + * return filters; + * }); + * @param {Function} [resetFilterHandler] + * @returns {dc.baseMixin} + */ + _chart.resetFilterHandler = function (resetFilterHandler) { + if (!arguments.length) { + return _resetFilterHandler; + } + _resetFilterHandler = resetFilterHandler; + return _chart; + }; + + function applyFilters (filters) { + if (_chart.dimension() && _chart.dimension().filter) { + var fs = _filterHandler(_chart.dimension(), filters); + if (fs) { + filters = fs; + } + } + return filters; + } + + /** + * Replace the chart filter. This is equivalent to calling `chart.filter(null).filter(filter)` + * but more efficient because the filter is only applied once. + * + * @method replaceFilter + * @memberof dc.baseMixin + * @instance + * @param {*} [filter] + * @returns {dc.baseMixin} + **/ + _chart.replaceFilter = function (filter) { + _filters = _resetFilterHandler(_filters); + _chart.filter(filter); + return _chart; + }; + + /** + * Filter the chart by the given parameter, or return the current filter if no input parameter + * is given. + * + * The filter parameter can take one of these forms: + * * A single value: the value will be toggled (added if it is not present in the current + * filters, removed if it is present) + * * An array containing a single array of values (`[[value,value,value]]`): each value is + * toggled + * * When appropriate for the chart, a {@link dc.filters dc filter object} such as + * * {@link dc.filters.RangedFilter `dc.filters.RangedFilter`} for the + * {@link dc.coordinateGridMixin dc.coordinateGridMixin} charts + * * {@link dc.filters.TwoDimensionalFilter `dc.filters.TwoDimensionalFilter`} for the + * {@link dc.heatMap heat map} + * * {@link dc.filters.RangedTwoDimensionalFilter `dc.filters.RangedTwoDimensionalFilter`} + * for the {@link dc.scatterPlot scatter plot} + * * `null`: the filter will be reset using the + * {@link dc.baseMixin#resetFilterHandler resetFilterHandler} + * + * Note that this is always a toggle (even when it doesn't make sense for the filter type). If + * you wish to replace the current filter, either call `chart.filter(null)` first - or it's more + * efficient to call {@link dc.baseMixin#replaceFilter `chart.replaceFilter(filter)`} instead. + * + * Each toggle is executed by checking if the value is already present using the + * {@link dc.baseMixin#hasFilterHandler hasFilterHandler}; if it is not present, it is added + * using the {@link dc.baseMixin#addFilterHandler addFilterHandler}; if it is already present, + * it is removed using the {@link dc.baseMixin#removeFilterHandler removeFilterHandler}. + * + * Once the filters array has been updated, the filters are applied to the + * crossfilter dimension, using the {@link dc.baseMixin#filterHandler filterHandler}. + * + * Once you have set the filters, call {@link dc.baseMixin#redrawGroup `chart.redrawGroup()`} + * (or {@link dc.redrawAll `dc.redrawAll()`}) to redraw the chart's group. + * @method filter + * @memberof dc.baseMixin + * @instance + * @see {@link dc.baseMixin#addFilterHandler addFilterHandler} + * @see {@link dc.baseMixin#removeFilterHandler removeFilterHandler} + * @see {@link dc.baseMixin#resetFilterHandler resetFilterHandler} + * @see {@link dc.baseMixin#filterHandler filterHandler} + * @example + * // filter by a single string + * chart.filter('Sunday'); + * // filter by a single age + * chart.filter(18); + * // filter by a set of states + * chart.filter([['MA', 'TX', 'ND', 'WA']]); + * // filter by range -- note the use of dc.filters.RangedFilter, which is different + * // from the syntax for filtering a crossfilter dimension directly, dimension.filter([15,20]) + * chart.filter(dc.filters.RangedFilter(15,20)); + * @param {*} [filter] + * @returns {dc.baseMixin} + */ + _chart.filter = function (filter) { + if (!arguments.length) { + return _filters.length > 0 ? _filters[0] : null; + } + var filters = _filters; + if (filter instanceof Array && filter[0] instanceof Array && !filter.isFiltered) { + // toggle each filter + filter[0].forEach(function (f) { + if (_hasFilterHandler(filters, f)) { + filters = _removeFilterHandler(filters, f); + } else { + filters = _addFilterHandler(filters, f); + } + }); + } else if (filter === null) { + filters = _resetFilterHandler(filters); + } else { + if (_hasFilterHandler(filters, filter)) { + filters = _removeFilterHandler(filters, filter); + } else { + filters = _addFilterHandler(filters, filter); + } + } + _filters = applyFilters(filters); + _chart._invokeFilteredListener(filter); + + if (_root !== null && _chart.hasFilter()) { + _chart.turnOnControls(); + } else { + _chart.turnOffControls(); + } + + return _chart; + }; + + /** + * Returns all current filters. This method does not perform defensive cloning of the internal + * filter array before returning, therefore any modification of the returned array will effect the + * chart's internal filter storage. + * @method filters + * @memberof dc.baseMixin + * @instance + * @returns {Array<*>} + */ + _chart.filters = function () { + return _filters; + }; + + _chart.highlightSelected = function (e) { + d3.select(e).classed(dc.constants.SELECTED_CLASS, true); + d3.select(e).classed(dc.constants.DESELECTED_CLASS, false); + }; + + _chart.fadeDeselected = function (e) { + d3.select(e).classed(dc.constants.SELECTED_CLASS, false); + d3.select(e).classed(dc.constants.DESELECTED_CLASS, true); + }; + + _chart.resetHighlight = function (e) { + d3.select(e).classed(dc.constants.SELECTED_CLASS, false); + d3.select(e).classed(dc.constants.DESELECTED_CLASS, false); + }; + + /** + * This function is passed to d3 as the onClick handler for each chart. The default behavior is to + * filter on the clicked datum (passed to the callback) and redraw the chart group. + * @method onClick + * @memberof dc.baseMixin + * @instance + * @param {*} datum + */ + _chart.onClick = function (datum) { + var filter = _chart.keyAccessor()(datum); + dc.events.trigger(function () { + _chart.filter(filter); + _chart.redrawGroup(); + }); + }; + + /** + * Set or get the filter handler. The filter handler is a function that performs the filter action + * on a specific dimension. Using a custom filter handler allows you to perform additional logic + * before or after filtering. + * @method filterHandler + * @memberof dc.baseMixin + * @instance + * @see {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#dimension_filter crossfilter.dimension.filter} + * @example + * // the default filter handler handles all possible cases for the charts in dc.js + * // you can replace it with something more specialized for your own chart + * chart.filterHandler(function (dimension, filters) { + * if (filters.length === 0) { + * // the empty case (no filtering) + * dimension.filter(null); + * } else if (filters.length === 1 && !filters[0].isFiltered) { + * // single value and not a function-based filter + * dimension.filterExact(filters[0]); + * } else if (filters.length === 1 && filters[0].filterType === 'RangedFilter') { + * // single range-based filter + * dimension.filterRange(filters[0]); + * } else { + * // an array of values, or an array of filter objects + * dimension.filterFunction(function (d) { + * for (var i = 0; i < filters.length; i++) { + * var filter = filters[i]; + * if (filter.isFiltered && filter.isFiltered(d)) { + * return true; + * } else if (filter <= d && filter >= d) { + * return true; + * } + * } + * return false; + * }); + * } + * return filters; + * }); + * + * // custom filter handler + * chart.filterHandler(function(dimension, filter){ + * var newFilter = filter + 10; + * dimension.filter(newFilter); + * return newFilter; // set the actual filter value to the new value + * }); + * @param {Function} [filterHandler] + * @returns {Function|dc.baseMixin} + */ + _chart.filterHandler = function (filterHandler) { + if (!arguments.length) { + return _filterHandler; + } + _filterHandler = filterHandler; + return _chart; + }; + + // abstract function stub + _chart._doRender = function () { + // do nothing in base, should be overridden by sub-function + return _chart; + }; + + _chart._doRedraw = function () { + // do nothing in base, should be overridden by sub-function + return _chart; + }; + + _chart.legendables = function () { + // do nothing in base, should be overridden by sub-function + return []; + }; + + _chart.legendHighlight = function () { + // do nothing in base, should be overridden by sub-function + }; + + _chart.legendReset = function () { + // do nothing in base, should be overridden by sub-function + }; + + _chart.legendToggle = function () { + // do nothing in base, should be overriden by sub-function + }; + + _chart.isLegendableHidden = function () { + // do nothing in base, should be overridden by sub-function + return false; + }; + + /** + * Set or get the key accessor function. The key accessor function is used to retrieve the key + * value from the crossfilter group. Key values are used differently in different charts, for + * example keys correspond to slices in a pie chart and x axis positions in a grid coordinate chart. + * @method keyAccessor + * @memberof dc.baseMixin + * @instance + * @example + * // default key accessor + * chart.keyAccessor(function(d) { return d.key; }); + * // custom key accessor for a multi-value crossfilter reduction + * chart.keyAccessor(function(p) { return p.value.absGain; }); + * @param {Function} [keyAccessor] + * @returns {Function|dc.baseMixin} + */ + _chart.keyAccessor = function (keyAccessor) { + if (!arguments.length) { + return _keyAccessor; + } + _keyAccessor = keyAccessor; + return _chart; + }; + + /** + * Set or get the value accessor function. The value accessor function is used to retrieve the + * value from the crossfilter group. Group values are used differently in different charts, for + * example values correspond to slice sizes in a pie chart and y axis positions in a grid + * coordinate chart. + * @method valueAccessor + * @memberof dc.baseMixin + * @instance + * @example + * // default value accessor + * chart.valueAccessor(function(d) { return d.value; }); + * // custom value accessor for a multi-value crossfilter reduction + * chart.valueAccessor(function(p) { return p.value.percentageGain; }); + * @param {Function} [valueAccessor] + * @returns {Function|dc.baseMixin} + */ + _chart.valueAccessor = function (valueAccessor) { + if (!arguments.length) { + return _valueAccessor; + } + _valueAccessor = valueAccessor; + return _chart; + }; + + /** + * Set or get the label function. The chart class will use this function to render labels for each + * child element in the chart, e.g. slices in a pie chart or bubbles in a bubble chart. Not every + * chart supports the label function, for example line chart does not use this function + * at all. By default, enables labels; pass false for the second parameter if this is not desired. + * @method label + * @memberof dc.baseMixin + * @instance + * @example + * // default label function just return the key + * chart.label(function(d) { return d.key; }); + * // label function has access to the standard d3 data binding and can get quite complicated + * chart.label(function(d) { return d.data.key + '(' + Math.floor(d.data.value / all.value() * 100) + '%)'; }); + * @param {Function} [labelFunction] + * @param {Boolean} [enableLabels=true] + * @returns {Function|dc.baseMixin} + */ + _chart.label = function (labelFunction, enableLabels) { + if (!arguments.length) { + return _label; + } + _label = labelFunction; + if ((enableLabels === undefined) || enableLabels) { + _renderLabel = true; + } + return _chart; + }; + + /** + * Turn on/off label rendering + * @method renderLabel + * @memberof dc.baseMixin + * @instance + * @param {Boolean} [renderLabel=false] + * @returns {Boolean|dc.baseMixin} + */ + _chart.renderLabel = function (renderLabel) { + if (!arguments.length) { + return _renderLabel; + } + _renderLabel = renderLabel; + return _chart; + }; + + /** + * Set or get the title function. The chart class will use this function to render the SVGElement title + * (usually interpreted by browser as tooltips) for each child element in the chart, e.g. a slice + * in a pie chart or a bubble in a bubble chart. Almost every chart supports the title function; + * however in grid coordinate charts you need to turn off the brush in order to see titles, because + * otherwise the brush layer will block tooltip triggering. + * @method title + * @memberof dc.baseMixin + * @instance + * @example + * // default title function shows "key: value" + * chart.title(function(d) { return d.key + ': ' + d.value; }); + * // title function has access to the standard d3 data binding and can get quite complicated + * chart.title(function(p) { + * return p.key.getFullYear() + * + '\n' + * + 'Index Gain: ' + numberFormat(p.value.absGain) + '\n' + * + 'Index Gain in Percentage: ' + numberFormat(p.value.percentageGain) + '%\n' + * + 'Fluctuation / Index Ratio: ' + numberFormat(p.value.fluctuationPercentage) + '%'; + * }); + * @param {Function} [titleFunction] + * @returns {Function|dc.baseMixin} + */ + _chart.title = function (titleFunction) { + if (!arguments.length) { + return _title; + } + _title = titleFunction; + return _chart; + }; + + /** + * Turn on/off title rendering, or return the state of the render title flag if no arguments are + * given. + * @method renderTitle + * @memberof dc.baseMixin + * @instance + * @param {Boolean} [renderTitle=true] + * @returns {Boolean|dc.baseMixin} + */ + _chart.renderTitle = function (renderTitle) { + if (!arguments.length) { + return _renderTitle; + } + _renderTitle = renderTitle; + return _chart; + }; + + /** + * A renderlet is similar to an event listener on rendering event. Multiple renderlets can be added + * to an individual chart. Each time a chart is rerendered or redrawn the renderlets are invoked + * right after the chart finishes its transitions, giving you a way to modify the SVGElements. + * Renderlet functions take the chart instance as the only input parameter and you can + * use the dc API or use raw d3 to achieve pretty much any effect. + * + * Use {@link dc.baseMixin#on on} with a 'renderlet' prefix. + * Generates a random key for the renderlet, which makes it hard to remove. + * @method renderlet + * @memberof dc.baseMixin + * @instance + * @deprecated + * @example + * // do this instead of .renderlet(function(chart) { ... }) + * chart.on("renderlet", function(chart){ + * // mix of dc API and d3 manipulation + * chart.select('g.y').style('display', 'none'); + * // its a closure so you can also access other chart variable available in the closure scope + * moveChart.filter(chart.filter()); + * }); + * @param {Function} renderletFunction + * @returns {dc.baseMixin} + */ + _chart.renderlet = dc.logger.deprecate(function (renderletFunction) { + _chart.on('renderlet.' + dc.utils.uniqueId(), renderletFunction); + return _chart; + }, 'chart.renderlet has been deprecated. Please use chart.on("renderlet.<renderletKey>", renderletFunction)'); + + /** + * Get or set the chart group to which this chart belongs. Chart groups are rendered or redrawn + * together since it is expected they share the same underlying crossfilter data set. + * @method chartGroup + * @memberof dc.baseMixin + * @instance + * @param {String} [chartGroup] + * @returns {String|dc.baseMixin} + */ + _chart.chartGroup = function (chartGroup) { + if (!arguments.length) { + return _chartGroup; + } + if (!_isChild) { + dc.deregisterChart(_chart, _chartGroup); + } + _chartGroup = chartGroup; + if (!_isChild) { + dc.registerChart(_chart, _chartGroup); + } + return _chart; + }; + + /** + * Expire the internal chart cache. dc charts cache some data internally on a per chart basis to + * speed up rendering and avoid unnecessary calculation; however it might be useful to clear the + * cache if you have changed state which will affect rendering. For example, if you invoke + * {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#crossfilter_add crossfilter.add} + * function or reset group or dimension after rendering, it is a good idea to + * clear the cache to make sure charts are rendered properly. + * @method expireCache + * @memberof dc.baseMixin + * @instance + * @returns {dc.baseMixin} + */ + _chart.expireCache = function () { + // do nothing in base, should be overridden by sub-function + return _chart; + }; + + /** + * Attach a dc.legend widget to this chart. The legend widget will automatically draw legend labels + * based on the color setting and names associated with each group. + * @method legend + * @memberof dc.baseMixin + * @instance + * @example + * chart.legend(dc.legend().x(400).y(10).itemHeight(13).gap(5)) + * @param {dc.legend} [legend] + * @returns {dc.legend|dc.baseMixin} + */ + _chart.legend = function (legend) { + if (!arguments.length) { + return _legend; + } + _legend = legend; + _legend.parent(_chart); + return _chart; + }; + + /** + * Returns the internal numeric ID of the chart. + * @method chartID + * @memberof dc.baseMixin + * @instance + * @returns {String} + */ + _chart.chartID = function () { + return _chart.__dcFlag__; + }; + + /** + * Set chart options using a configuration object. Each key in the object will cause the method of + * the same name to be called with the value to set that attribute for the chart. + * @method options + * @memberof dc.baseMixin + * @instance + * @example + * chart.options({dimension: myDimension, group: myGroup}); + * @param {{}} opts + * @returns {dc.baseMixin} + */ + _chart.options = function (opts) { + var applyOptions = [ + 'anchor', + 'group', + 'xAxisLabel', + 'yAxisLabel', + 'stack', + 'title', + 'point', + 'getColor', + 'overlayGeoJson' + ]; + + for (var o in opts) { + if (typeof(_chart[o]) === 'function') { + if (opts[o] instanceof Array && applyOptions.indexOf(o) !== -1) { + _chart[o].apply(_chart, opts[o]); + } else { + _chart[o].call(_chart, opts[o]); + } + } else { + dc.logger.debug('Not a valid option setter name: ' + o); + } + } + return _chart; + }; + + /** + * All dc chart instance supports the following listeners. + * Supports the following events: + * * `renderlet` - This listener function will be invoked after transitions after redraw and render. Replaces the + * deprecated {@link dc.baseMixin#renderlet renderlet} method. + * * `pretransition` - Like `.on('renderlet', ...)` but the event is fired before transitions start. + * * `preRender` - This listener function will be invoked before chart rendering. + * * `postRender` - This listener function will be invoked after chart finish rendering including + * all renderlets' logic. + * * `preRedraw` - This listener function will be invoked before chart redrawing. + * * `postRedraw` - This listener function will be invoked after chart finish redrawing + * including all renderlets' logic. + * * `filtered` - This listener function will be invoked after a filter is applied, added or removed. + * * `zoomed` - This listener function will be invoked after a zoom is triggered. + * @method on + * @memberof dc.baseMixin + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Internals.md#dispatch_on d3.dispatch.on} + * @example + * .on('renderlet', function(chart, filter){...}) + * .on('pretransition', function(chart, filter){...}) + * .on('preRender', function(chart){...}) + * .on('postRender', function(chart){...}) + * .on('preRedraw', function(chart){...}) + * .on('postRedraw', function(chart){...}) + * .on('filtered', function(chart, filter){...}) + * .on('zoomed', function(chart, filter){...}) + * @param {String} event + * @param {Function} listener + * @returns {dc.baseMixin} + */ + _chart.on = function (event, listener) { + _listeners.on(event, listener); + return _chart; + }; + + return _chart; +}; + +/** + * Margin is a mixin that provides margin utility functions for both the Row Chart and Coordinate Grid + * Charts. + * @name marginMixin + * @memberof dc + * @mixin + * @param {Object} _chart + * @returns {dc.marginMixin} + */ +dc.marginMixin = function (_chart) { + var _margin = {top: 10, right: 50, bottom: 30, left: 30}; + + /** + * Get or set the margins for a particular coordinate grid chart instance. The margins is stored as + * an associative Javascript array. + * @method margins + * @memberof dc.marginMixin + * @instance + * @example + * var leftMargin = chart.margins().left; // 30 by default + * chart.margins().left = 50; + * leftMargin = chart.margins().left; // now 50 + * @param {{top: Number, right: Number, left: Number, bottom: Number}} [margins={top: 10, right: 50, bottom: 30, left: 30}] + * @returns {{top: Number, right: Number, left: Number, bottom: Number}|dc.marginMixin} + */ + _chart.margins = function (margins) { + if (!arguments.length) { + return _margin; + } + _margin = margins; + return _chart; + }; + + _chart.effectiveWidth = function () { + return _chart.width() - _chart.margins().left - _chart.margins().right; + }; + + _chart.effectiveHeight = function () { + return _chart.height() - _chart.margins().top - _chart.margins().bottom; + }; + + return _chart; +}; + +/** + * The Color Mixin is an abstract chart functional class providing universal coloring support + * as a mix-in for any concrete chart implementation. + * @name colorMixin + * @memberof dc + * @mixin + * @param {Object} _chart + * @returns {dc.colorMixin} + */ +dc.colorMixin = function (_chart) { + var _colors = d3.scale.category20c(); + var _defaultAccessor = true; + + var _colorAccessor = function (d) { return _chart.keyAccessor()(d); }; + + /** + * Retrieve current color scale or set a new color scale. This methods accepts any function that + * operates like a d3 scale. + * @method colors + * @memberof dc.colorMixin + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Scales.md d3.scale} + * @example + * // alternate categorical scale + * chart.colors(d3.scale.category20b()); + * // ordinal scale + * chart.colors(d3.scale.ordinal().range(['red','green','blue'])); + * // convenience method, the same as above + * chart.ordinalColors(['red','green','blue']); + * // set a linear scale + * chart.linearColors(["#4575b4", "#ffffbf", "#a50026"]); + * @param {d3.scale} [colorScale=d3.scale.category20c()] + * @returns {d3.scale|dc.colorMixin} + */ + _chart.colors = function (colorScale) { + if (!arguments.length) { + return _colors; + } + if (colorScale instanceof Array) { + _colors = d3.scale.quantize().range(colorScale); // deprecated legacy support, note: this fails for ordinal domains + } else { + _colors = d3.functor(colorScale); + } + return _chart; + }; + + /** + * Convenience method to set the color scale to + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Ordinal-Scales.md#ordinal d3.scale.ordinal} with + * range `r`. + * @method ordinalColors + * @memberof dc.colorMixin + * @instance + * @param {Array<String>} r + * @returns {dc.colorMixin} + */ + _chart.ordinalColors = function (r) { + return _chart.colors(d3.scale.ordinal().range(r)); + }; + + /** + * Convenience method to set the color scale to an Hcl interpolated linear scale with range `r`. + * @method linearColors + * @memberof dc.colorMixin + * @instance + * @param {Array<Number>} r + * @returns {dc.colorMixin} + */ + _chart.linearColors = function (r) { + return _chart.colors(d3.scale.linear() + .range(r) + .interpolate(d3.interpolateHcl)); + }; + + /** + * Set or the get color accessor function. This function will be used to map a data point in a + * crossfilter group to a color value on the color scale. The default function uses the key + * accessor. + * @method colorAccessor + * @memberof dc.colorMixin + * @instance + * @example + * // default index based color accessor + * .colorAccessor(function (d, i){return i;}) + * // color accessor for a multi-value crossfilter reduction + * .colorAccessor(function (d){return d.value.absGain;}) + * @param {Function} [colorAccessor] + * @returns {Function|dc.colorMixin} + */ + _chart.colorAccessor = function (colorAccessor) { + if (!arguments.length) { + return _colorAccessor; + } + _colorAccessor = colorAccessor; + _defaultAccessor = false; + return _chart; + }; + + // what is this? + _chart.defaultColorAccessor = function () { + return _defaultAccessor; + }; + + /** + * Set or get the current domain for the color mapping function. The domain must be supplied as an + * array. + * + * Note: previously this method accepted a callback function. Instead you may use a custom scale + * set by {@link dc.colorMixin#colors .colors}. + * @method colorDomain + * @memberof dc.colorMixin + * @instance + * @param {Array<String>} [domain] + * @returns {Array<String>|dc.colorMixin} + */ + _chart.colorDomain = function (domain) { + if (!arguments.length) { + return _colors.domain(); + } + _colors.domain(domain); + return _chart; + }; + + /** + * Set the domain by determining the min and max values as retrieved by + * {@link dc.colorMixin#colorAccessor .colorAccessor} over the chart's dataset. + * @method calculateColorDomain + * @memberof dc.colorMixin + * @instance + * @returns {dc.colorMixin} + */ + _chart.calculateColorDomain = function () { + var newDomain = [d3.min(_chart.data(), _chart.colorAccessor()), + d3.max(_chart.data(), _chart.colorAccessor())]; + _colors.domain(newDomain); + return _chart; + }; + + /** + * Get the color for the datum d and counter i. This is used internally by charts to retrieve a color. + * @method getColor + * @memberof dc.colorMixin + * @instance + * @param {*} d + * @param {Number} [i] + * @returns {String} + */ + _chart.getColor = function (d, i) { + return _colors(_colorAccessor.call(this, d, i)); + }; + + /** + * **Deprecated.** Get/set the color calculator. This actually replaces the + * {@link dc.colorMixin#getColor getColor} method! + * + * This is not recommended, since using a {@link dc.colorMixin#colorAccessor colorAccessor} and + * color scale ({@link dc.colorMixin#colors .colors}) is more powerful and idiomatic d3. + * @method colorCalculator + * @memberof dc.colorMixin + * @instance + * @param {*} [colorCalculator] + * @returns {Function|dc.colorMixin} + */ + _chart.colorCalculator = dc.logger.deprecate(function (colorCalculator) { + if (!arguments.length) { + return _chart.getColor; + } + _chart.getColor = colorCalculator; + return _chart; + }, 'colorMixin.colorCalculator has been deprecated. Please colorMixin.colors and colorMixin.colorAccessor instead'); + + return _chart; +}; + +/** + * Coordinate Grid is an abstract base chart designed to support a number of coordinate grid based + * concrete chart types, e.g. bar chart, line chart, and bubble chart. + * @name coordinateGridMixin + * @memberof dc + * @mixin + * @mixes dc.colorMixin + * @mixes dc.marginMixin + * @mixes dc.baseMixin + * @param {Object} _chart + * @returns {dc.coordinateGridMixin} + */ +dc.coordinateGridMixin = function (_chart) { + var GRID_LINE_CLASS = 'grid-line'; + var HORIZONTAL_CLASS = 'horizontal'; + var VERTICAL_CLASS = 'vertical'; + var Y_AXIS_LABEL_CLASS = 'y-axis-label'; + var X_AXIS_LABEL_CLASS = 'x-axis-label'; + var DEFAULT_AXIS_LABEL_PADDING = 12; + + _chart = dc.colorMixin(dc.marginMixin(dc.baseMixin(_chart))); + + _chart.colors(d3.scale.category10()); + _chart._mandatoryAttributes().push('x'); + var _parent; + var _g; + var _chartBodyG; + + var _x; + var _xOriginalDomain; + var _xAxis = d3.svg.axis().orient('bottom'); + var _xUnits = dc.units.integers; + var _xAxisPadding = 0; + var _xAxisPaddingUnit = 'day'; + var _xElasticity = false; + var _xAxisLabel; + var _xAxisLabelPadding = 0; + var _lastXDomain; + + var _y; + var _yAxis = d3.svg.axis().orient('left'); + var _yAxisPadding = 0; + var _yElasticity = false; + var _yAxisLabel; + var _yAxisLabelPadding = 0; + + var _brush = d3.svg.brush(); + var _brushOn = true; + var _round; + + var _renderHorizontalGridLine = false; + var _renderVerticalGridLine = false; + + var _refocused = false, _resizing = false; + var _unitCount; + + var _zoomScale = [1, Infinity]; + var _zoomOutRestrict = true; + + var _zoom = d3.behavior.zoom().on('zoom', zoomHandler); + var _nullZoom = d3.behavior.zoom().on('zoom', null); + var _hasBeenMouseZoomable = false; + + var _rangeChart; + var _focusChart; + + var _mouseZoomable = false; + var _clipPadding = 0; + + var _outerRangeBandPadding = 0.5; + var _rangeBandPadding = 0; + + var _useRightYAxis = false; + + /** + * When changing the domain of the x or y scale, it is necessary to tell the chart to recalculate + * and redraw the axes. (`.rescale()` is called automatically when the x or y scale is replaced + * with {@link dc.coordinateGridMixin+x .x()} or {@link dc.coordinateGridMixin#y .y()}, and has + * no effect on elastic scales.) + * @method rescale + * @memberof dc.coordinateGridMixin + * @instance + * @returns {dc.coordinateGridMixin} + */ + _chart.rescale = function () { + _unitCount = undefined; + _resizing = true; + return _chart; + }; + + _chart.resizing = function () { + return _resizing; + }; + + /** + * Get or set the range selection chart associated with this instance. Setting the range selection + * chart using this function will automatically update its selection brush when the current chart + * zooms in. In return the given range chart will also automatically attach this chart as its focus + * chart hence zoom in when range brush updates. + * + * Usually the range and focus charts will share a dimension. The range chart will set the zoom + * boundaries for the focus chart, so its dimension values must be compatible with the domain of + * the focus chart. + * + * See the [Nasdaq 100 Index](http://dc-js.github.com/dc.js/) example for this effect in action. + * @method rangeChart + * @memberof dc.coordinateGridMixin + * @instance + * @param {dc.coordinateGridMixin} [rangeChart] + * @returns {dc.coordinateGridMixin} + */ + _chart.rangeChart = function (rangeChart) { + if (!arguments.length) { + return _rangeChart; + } + _rangeChart = rangeChart; + _rangeChart.focusChart(_chart); + return _chart; + }; + + /** + * Get or set the scale extent for mouse zooms. + * @method zoomScale + * @memberof dc.coordinateGridMixin + * @instance + * @param {Array<Number|Date>} [extent=[1, Infinity]] + * @returns {Array<Number|Date>|dc.coordinateGridMixin} + */ + _chart.zoomScale = function (extent) { + if (!arguments.length) { + return _zoomScale; + } + _zoomScale = extent; + return _chart; + }; + + /** + * Get or set the zoom restriction for the chart. If true limits the zoom to origional domain of the chart. + * @method zoomOutRestrict + * @memberof dc.coordinateGridMixin + * @instance + * @param {Boolean} [zoomOutRestrict=true] + * @returns {Boolean|dc.coordinateGridMixin} + */ + _chart.zoomOutRestrict = function (zoomOutRestrict) { + if (!arguments.length) { + return _zoomOutRestrict; + } + _zoomScale[0] = zoomOutRestrict ? 1 : 0; + _zoomOutRestrict = zoomOutRestrict; + return _chart; + }; + + _chart._generateG = function (parent) { + if (parent === undefined) { + _parent = _chart.svg(); + } else { + _parent = parent; + } + + var href = window.location.href.split('#')[0]; + + _g = _parent.append('g'); + + _chartBodyG = _g.append('g').attr('class', 'chart-body') + .attr('transform', 'translate(' + _chart.margins().left + ', ' + _chart.margins().top + ')') + .attr('clip-path', 'url(' + href + '#' + getClipPathId() + ')'); + + return _g; + }; + + /** + * Get or set the root g element. This method is usually used to retrieve the g element in order to + * overlay custom svg drawing programatically. **Caution**: The root g element is usually generated + * by dc.js internals, and resetting it might produce unpredictable result. + * @method g + * @memberof dc.coordinateGridMixin + * @instance + * @param {SVGElement} [gElement] + * @returns {SVGElement|dc.coordinateGridMixin} + */ + _chart.g = function (gElement) { + if (!arguments.length) { + return _g; + } + _g = gElement; + return _chart; + }; + + /** + * Set or get mouse zoom capability flag (default: false). When turned on the chart will be + * zoomable using the mouse wheel. If the range selector chart is attached zooming will also update + * the range selection brush on the associated range selector chart. + * @method mouseZoomable + * @memberof dc.coordinateGridMixin + * @instance + * @param {Boolean} [mouseZoomable=false] + * @returns {Boolean|dc.coordinateGridMixin} + */ + _chart.mouseZoomable = function (mouseZoomable) { + if (!arguments.length) { + return _mouseZoomable; + } + _mouseZoomable = mouseZoomable; + return _chart; + }; + + /** + * Retrieve the svg group for the chart body. + * @method chartBodyG + * @memberof dc.coordinateGridMixin + * @instance + * @param {SVGElement} [chartBodyG] + * @returns {SVGElement} + */ + _chart.chartBodyG = function (chartBodyG) { + if (!arguments.length) { + return _chartBodyG; + } + _chartBodyG = chartBodyG; + return _chart; + }; + + /** + * **mandatory** + * + * Get or set the x scale. The x scale can be any d3 + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Quantitative-Scales.md quantitive scale} or + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Ordinal-Scales.md ordinal scale}. + * @method x + * @memberof dc.coordinateGridMixin + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Scales.md d3.scale} + * @example + * // set x to a linear scale + * chart.x(d3.scale.linear().domain([-2500, 2500])) + * // set x to a time scale to generate histogram + * chart.x(d3.time.scale().domain([new Date(1985, 0, 1), new Date(2012, 11, 31)])) + * @param {d3.scale} [xScale] + * @returns {d3.scale|dc.coordinateGridMixin} + */ + _chart.x = function (xScale) { + if (!arguments.length) { + return _x; + } + _x = xScale; + _xOriginalDomain = _x.domain(); + _chart.rescale(); + return _chart; + }; + + _chart.xOriginalDomain = function () { + return _xOriginalDomain; + }; + + /** + * Set or get the xUnits function. The coordinate grid chart uses the xUnits function to calculate + * the number of data projections on x axis such as the number of bars for a bar chart or the + * number of dots for a line chart. This function is expected to return a Javascript array of all + * data points on x axis, or the number of points on the axis. [d3 time range functions + * d3.time.days, d3.time.months, and + * d3.time.years](https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Intervals.md#aliases) are all valid xUnits + * function. dc.js also provides a few units function, see the {@link dc.units Units Namespace} for + * a list of built-in units functions. + * @method xUnits + * @memberof dc.coordinateGridMixin + * @instance + * @todo Add docs for utilities + * @example + * // set x units to count days + * chart.xUnits(d3.time.days); + * // set x units to count months + * chart.xUnits(d3.time.months); + * + * // A custom xUnits function can be used as long as it follows the following interface: + * // units in integer + * function(start, end, xDomain) { + * // simply calculates how many integers in the domain + * return Math.abs(end - start); + * }; + * + * // fixed units + * function(start, end, xDomain) { + * // be aware using fixed units will disable the focus/zoom ability on the chart + * return 1000; + * @param {Function} [xUnits=dc.units.integers] + * @returns {Function|dc.coordinateGridMixin} + */ + _chart.xUnits = function (xUnits) { + if (!arguments.length) { + return _xUnits; + } + _xUnits = xUnits; + return _chart; + }; + + /** + * Set or get the x axis used by a particular coordinate grid chart instance. This function is most + * useful when x axis customization is required. The x axis in dc.js is an instance of a + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Axes.md#axis d3 axis object}; + * therefore it supports any valid d3 axis manipulation. + * + * **Caution**: The x axis is usually generated internally by dc; resetting it may cause + * unexpected results. Note also that when used as a getter, this function is not chainable: + * it returns the axis, not the chart, + * {@link https://github.com/dc-js/dc.js/wiki/FAQ#why-does-everything-break-after-a-call-to-xaxis-or-yaxis + * so attempting to call chart functions after calling `.xAxis()` will fail}. + * @method xAxis + * @memberof dc.coordinateGridMixin + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Axes.md#axis d3.svg.axis} + * @example + * // customize x axis tick format + * chart.xAxis().tickFormat(function(v) {return v + '%';}); + * // customize x axis tick values + * chart.xAxis().tickValues([0, 100, 200, 300]); + * @param {d3.svg.axis} [xAxis=d3.svg.axis().orient('bottom')] + * @returns {d3.svg.axis|dc.coordinateGridMixin} + */ + _chart.xAxis = function (xAxis) { + if (!arguments.length) { + return _xAxis; + } + _xAxis = xAxis; + return _chart; + }; + + /** + * Turn on/off elastic x axis behavior. If x axis elasticity is turned on, then the grid chart will + * attempt to recalculate the x axis range whenever a redraw event is triggered. + * @method elasticX + * @memberof dc.coordinateGridMixin + * @instance + * @param {Boolean} [elasticX=false] + * @returns {Boolean|dc.coordinateGridMixin} + */ + _chart.elasticX = function (elasticX) { + if (!arguments.length) { + return _xElasticity; + } + _xElasticity = elasticX; + return _chart; + }; + + /** + * Set or get x axis padding for the elastic x axis. The padding will be added to both end of the x + * axis if elasticX is turned on; otherwise it is ignored. + * + * Padding can be an integer or percentage in string (e.g. '10%'). Padding can be applied to + * number or date x axes. When padding a date axis, an integer represents number of units being padded + * and a percentage string will be treated the same as an integer. The unit will be determined by the + * xAxisPaddingUnit variable. + * @method xAxisPadding + * @memberof dc.coordinateGridMixin + * @instance + * @param {Number|String} [padding=0] + * @returns {Number|String|dc.coordinateGridMixin} + */ + _chart.xAxisPadding = function (padding) { + if (!arguments.length) { + return _xAxisPadding; + } + _xAxisPadding = padding; + return _chart; + }; + + /** + * Set or get x axis padding unit for the elastic x axis. The padding unit will determine which unit to + * use when applying xAxis padding if elasticX is turned on and if x-axis uses a time dimension; + * otherwise it is ignored. + * + * Padding unit is a string that will be used when the padding is calculated. Available parameters are + * the available d3 time intervals; see + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Intervals.md#interval d3.time.interval}. + * @method xAxisPaddingUnit + * @memberof dc.coordinateGridMixin + * @instance + * @param {String} [unit='days'] + * @returns {String|dc.coordinateGridMixin} + */ + _chart.xAxisPaddingUnit = function (unit) { + if (!arguments.length) { + return _xAxisPaddingUnit; + } + _xAxisPaddingUnit = unit; + return _chart; + }; + + /** + * Returns the number of units displayed on the x axis using the unit measure configured by + * {@link dc.coordinateGridMixin#xUnits xUnits}. + * @method xUnitCount + * @memberof dc.coordinateGridMixin + * @instance + * @returns {Number} + */ + _chart.xUnitCount = function () { + if (_unitCount === undefined) { + var units = _chart.xUnits()(_chart.x().domain()[0], _chart.x().domain()[1], _chart.x().domain()); + + if (units instanceof Array) { + _unitCount = units.length; + } else { + _unitCount = units; + } + } + + return _unitCount; + }; + + /** + * Gets or sets whether the chart should be drawn with a right axis instead of a left axis. When + * used with a chart in a composite chart, allows both left and right Y axes to be shown on a + * chart. + * @method useRightYAxis + * @memberof dc.coordinateGridMixin + * @instance + * @param {Boolean} [useRightYAxis=false] + * @returns {Boolean|dc.coordinateGridMixin} + */ + _chart.useRightYAxis = function (useRightYAxis) { + if (!arguments.length) { + return _useRightYAxis; + } + _useRightYAxis = useRightYAxis; + return _chart; + }; + + /** + * Returns true if the chart is using ordinal xUnits ({@link dc.units.ordinal dc.units.ordinal}, or false + * otherwise. Most charts behave differently with ordinal data and use the result of this method to + * trigger the appropriate logic. + * @method isOrdinal + * @memberof dc.coordinateGridMixin + * @instance + * @returns {Boolean} + */ + _chart.isOrdinal = function () { + return _chart.xUnits() === dc.units.ordinal; + }; + + _chart._useOuterPadding = function () { + return true; + }; + + _chart._ordinalXDomain = function () { + var groups = _chart._computeOrderedGroups(_chart.data()); + return groups.map(_chart.keyAccessor()); + }; + + function compareDomains (d1, d2) { + return !d1 || !d2 || d1.length !== d2.length || + d1.some(function (elem, i) { return (elem && d2[i]) ? elem.toString() !== d2[i].toString() : elem === d2[i]; }); + } + + function prepareXAxis (g, render) { + if (!_chart.isOrdinal()) { + if (_chart.elasticX()) { + _x.domain([_chart.xAxisMin(), _chart.xAxisMax()]); + } + } else { // _chart.isOrdinal() + if (_chart.elasticX() || _x.domain().length === 0) { + _x.domain(_chart._ordinalXDomain()); + } + } + + // has the domain changed? + var xdom = _x.domain(); + if (render || compareDomains(_lastXDomain, xdom)) { + _chart.rescale(); + } + _lastXDomain = xdom; + + // please can't we always use rangeBands for bar charts? + if (_chart.isOrdinal()) { + _x.rangeBands([0, _chart.xAxisLength()], _rangeBandPadding, + _chart._useOuterPadding() ? _outerRangeBandPadding : 0); + } else { + _x.range([0, _chart.xAxisLength()]); + } + + _xAxis = _xAxis.scale(_chart.x()); + + renderVerticalGridLines(g); + } + + _chart.renderXAxis = function (g) { + var axisXG = g.select('g.x'); + + if (axisXG.empty()) { + axisXG = g.append('g') + .attr('class', 'axis x') + .attr('transform', 'translate(' + _chart.margins().left + ',' + _chart._xAxisY() + ')'); + } + + var axisXLab = g.select('text.' + X_AXIS_LABEL_CLASS); + if (axisXLab.empty() && _chart.xAxisLabel()) { + axisXLab = g.append('text') + .attr('class', X_AXIS_LABEL_CLASS) + .attr('transform', 'translate(' + (_chart.margins().left + _chart.xAxisLength() / 2) + ',' + + (_chart.height() - _xAxisLabelPadding) + ')') + .attr('text-anchor', 'middle'); + } + if (_chart.xAxisLabel() && axisXLab.text() !== _chart.xAxisLabel()) { + axisXLab.text(_chart.xAxisLabel()); + } + + dc.transition(axisXG, _chart.transitionDuration(), _chart.transitionDelay()) + .attr('transform', 'translate(' + _chart.margins().left + ',' + _chart._xAxisY() + ')') + .call(_xAxis); + dc.transition(axisXLab, _chart.transitionDuration(), _chart.transitionDelay()) + .attr('transform', 'translate(' + (_chart.margins().left + _chart.xAxisLength() / 2) + ',' + + (_chart.height() - _xAxisLabelPadding) + ')'); + }; + + function renderVerticalGridLines (g) { + var gridLineG = g.select('g.' + VERTICAL_CLASS); + + if (_renderVerticalGridLine) { + if (gridLineG.empty()) { + gridLineG = g.insert('g', ':first-child') + .attr('class', GRID_LINE_CLASS + ' ' + VERTICAL_CLASS) + .attr('transform', 'translate(' + _chart.margins().left + ',' + _chart.margins().top + ')'); + } + + var ticks = _xAxis.tickValues() ? _xAxis.tickValues() : + (typeof _x.ticks === 'function' ? _x.ticks(_xAxis.ticks()[0]) : _x.domain()); + + var lines = gridLineG.selectAll('line') + .data(ticks); + + // enter + var linesGEnter = lines.enter() + .append('line') + .attr('x1', function (d) { + return _x(d); + }) + .attr('y1', _chart._xAxisY() - _chart.margins().top) + .attr('x2', function (d) { + return _x(d); + }) + .attr('y2', 0) + .attr('opacity', 0); + dc.transition(linesGEnter, _chart.transitionDuration(), _chart.transitionDelay()) + .attr('opacity', 1); + + // update + dc.transition(lines, _chart.transitionDuration(), _chart.transitionDelay()) + .attr('x1', function (d) { + return _x(d); + }) + .attr('y1', _chart._xAxisY() - _chart.margins().top) + .attr('x2', function (d) { + return _x(d); + }) + .attr('y2', 0); + + // exit + lines.exit().remove(); + } else { + gridLineG.selectAll('line').remove(); + } + } + + _chart._xAxisY = function () { + return (_chart.height() - _chart.margins().bottom); + }; + + _chart.xAxisLength = function () { + return _chart.effectiveWidth(); + }; + + /** + * Set or get the x axis label. If setting the label, you may optionally include additional padding to + * the margin to make room for the label. By default the padded is set to 12 to accomodate the text height. + * @method xAxisLabel + * @memberof dc.coordinateGridMixin + * @instance + * @param {String} [labelText] + * @param {Number} [padding=12] + * @returns {String} + */ + _chart.xAxisLabel = function (labelText, padding) { + if (!arguments.length) { + return _xAxisLabel; + } + _xAxisLabel = labelText; + _chart.margins().bottom -= _xAxisLabelPadding; + _xAxisLabelPadding = (padding === undefined) ? DEFAULT_AXIS_LABEL_PADDING : padding; + _chart.margins().bottom += _xAxisLabelPadding; + return _chart; + }; + + _chart._prepareYAxis = function (g) { + if (_y === undefined || _chart.elasticY()) { + if (_y === undefined) { + _y = d3.scale.linear(); + } + var min = _chart.yAxisMin() || 0, + max = _chart.yAxisMax() || 0; + _y.domain([min, max]).rangeRound([_chart.yAxisHeight(), 0]); + } + + _y.range([_chart.yAxisHeight(), 0]); + _yAxis = _yAxis.scale(_y); + + if (_useRightYAxis) { + _yAxis.orient('right'); + } + + _chart._renderHorizontalGridLinesForAxis(g, _y, _yAxis); + }; + + _chart.renderYAxisLabel = function (axisClass, text, rotation, labelXPosition) { + labelXPosition = labelXPosition || _yAxisLabelPadding; + + var axisYLab = _chart.g().select('text.' + Y_AXIS_LABEL_CLASS + '.' + axisClass + '-label'); + var labelYPosition = (_chart.margins().top + _chart.yAxisHeight() / 2); + if (axisYLab.empty() && text) { + axisYLab = _chart.g().append('text') + .attr('transform', 'translate(' + labelXPosition + ',' + labelYPosition + '),rotate(' + rotation + ')') + .attr('class', Y_AXIS_LABEL_CLASS + ' ' + axisClass + '-label') + .attr('text-anchor', 'middle') + .text(text); + } + if (text && axisYLab.text() !== text) { + axisYLab.text(text); + } + dc.transition(axisYLab, _chart.transitionDuration(), _chart.transitionDelay()) + .attr('transform', 'translate(' + labelXPosition + ',' + labelYPosition + '),rotate(' + rotation + ')'); + }; + + _chart.renderYAxisAt = function (axisClass, axis, position) { + var axisYG = _chart.g().select('g.' + axisClass); + if (axisYG.empty()) { + axisYG = _chart.g().append('g') + .attr('class', 'axis ' + axisClass) + .attr('transform', 'translate(' + position + ',' + _chart.margins().top + ')'); + } + + dc.transition(axisYG, _chart.transitionDuration(), _chart.transitionDelay()) + .attr('transform', 'translate(' + position + ',' + _chart.margins().top + ')') + .call(axis); + }; + + _chart.renderYAxis = function () { + var axisPosition = _useRightYAxis ? (_chart.width() - _chart.margins().right) : _chart._yAxisX(); + _chart.renderYAxisAt('y', _yAxis, axisPosition); + var labelPosition = _useRightYAxis ? (_chart.width() - _yAxisLabelPadding) : _yAxisLabelPadding; + var rotation = _useRightYAxis ? 90 : -90; + _chart.renderYAxisLabel('y', _chart.yAxisLabel(), rotation, labelPosition); + }; + + _chart._renderHorizontalGridLinesForAxis = function (g, scale, axis) { + var gridLineG = g.select('g.' + HORIZONTAL_CLASS); + + if (_renderHorizontalGridLine) { + var ticks = axis.tickValues() ? axis.tickValues() : scale.ticks(axis.ticks()[0]); + + if (gridLineG.empty()) { + gridLineG = g.insert('g', ':first-child') + .attr('class', GRID_LINE_CLASS + ' ' + HORIZONTAL_CLASS) + .attr('transform', 'translate(' + _chart.margins().left + ',' + _chart.margins().top + ')'); + } + + var lines = gridLineG.selectAll('line') + .data(ticks); + + // enter + var linesGEnter = lines.enter() + .append('line') + .attr('x1', 1) + .attr('y1', function (d) { + return scale(d); + }) + .attr('x2', _chart.xAxisLength()) + .attr('y2', function (d) { + return scale(d); + }) + .attr('opacity', 0); + dc.transition(linesGEnter, _chart.transitionDuration(), _chart.transitionDelay()) + .attr('opacity', 1); + + // update + dc.transition(lines, _chart.transitionDuration(), _chart.transitionDelay()) + .attr('x1', 1) + .attr('y1', function (d) { + return scale(d); + }) + .attr('x2', _chart.xAxisLength()) + .attr('y2', function (d) { + return scale(d); + }); + + // exit + lines.exit().remove(); + } else { + gridLineG.selectAll('line').remove(); + } + }; + + _chart._yAxisX = function () { + return _chart.useRightYAxis() ? _chart.width() - _chart.margins().right : _chart.margins().left; + }; + + /** + * Set or get the y axis label. If setting the label, you may optionally include additional padding + * to the margin to make room for the label. By default the padding is set to 12 to accommodate the + * text height. + * @method yAxisLabel + * @memberof dc.coordinateGridMixin + * @instance + * @param {String} [labelText] + * @param {Number} [padding=12] + * @returns {String|dc.coordinateGridMixin} + */ + _chart.yAxisLabel = function (labelText, padding) { + if (!arguments.length) { + return _yAxisLabel; + } + _yAxisLabel = labelText; + _chart.margins().left -= _yAxisLabelPadding; + _yAxisLabelPadding = (padding === undefined) ? DEFAULT_AXIS_LABEL_PADDING : padding; + _chart.margins().left += _yAxisLabelPadding; + return _chart; + }; + + /** + * Get or set the y scale. The y scale is typically automatically determined by the chart implementation. + * @method y + * @memberof dc.coordinateGridMixin + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Scales.md d3.scale} + * @param {d3.scale} [yScale] + * @returns {d3.scale|dc.coordinateGridMixin} + */ + _chart.y = function (yScale) { + if (!arguments.length) { + return _y; + } + _y = yScale; + _chart.rescale(); + return _chart; + }; + + /** + * Set or get the y axis used by the coordinate grid chart instance. This function is most useful + * when y axis customization is required. The y axis in dc.js is simply an instance of a [d3 axis + * object](https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Axes.md#axis); therefore it supports any + * valid d3 axis manipulation. + * + * **Caution**: The y axis is usually generated internally by dc; resetting it may cause + * unexpected results. Note also that when used as a getter, this function is not chainable: it + * returns the axis, not the chart, + * {@link https://github.com/dc-js/dc.js/wiki/FAQ#why-does-everything-break-after-a-call-to-xaxis-or-yaxis + * so attempting to call chart functions after calling `.yAxis()` will fail}. + * @method yAxis + * @memberof dc.coordinateGridMixin + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Axes.md#axis d3.svg.axis} + * @example + * // customize y axis tick format + * chart.yAxis().tickFormat(function(v) {return v + '%';}); + * // customize y axis tick values + * chart.yAxis().tickValues([0, 100, 200, 300]); + * @param {d3.svg.axis} [yAxis=d3.svg.axis().orient('left')] + * @returns {d3.svg.axis|dc.coordinateGridMixin} + */ + _chart.yAxis = function (yAxis) { + if (!arguments.length) { + return _yAxis; + } + _yAxis = yAxis; + return _chart; + }; + + /** + * Turn on/off elastic y axis behavior. If y axis elasticity is turned on, then the grid chart will + * attempt to recalculate the y axis range whenever a redraw event is triggered. + * @method elasticY + * @memberof dc.coordinateGridMixin + * @instance + * @param {Boolean} [elasticY=false] + * @returns {Boolean|dc.coordinateGridMixin} + */ + _chart.elasticY = function (elasticY) { + if (!arguments.length) { + return _yElasticity; + } + _yElasticity = elasticY; + return _chart; + }; + + /** + * Turn on/off horizontal grid lines. + * @method renderHorizontalGridLines + * @memberof dc.coordinateGridMixin + * @instance + * @param {Boolean} [renderHorizontalGridLines=false] + * @returns {Boolean|dc.coordinateGridMixin} + */ + _chart.renderHorizontalGridLines = function (renderHorizontalGridLines) { + if (!arguments.length) { + return _renderHorizontalGridLine; + } + _renderHorizontalGridLine = renderHorizontalGridLines; + return _chart; + }; + + /** + * Turn on/off vertical grid lines. + * @method renderVerticalGridLines + * @memberof dc.coordinateGridMixin + * @instance + * @param {Boolean} [renderVerticalGridLines=false] + * @returns {Boolean|dc.coordinateGridMixin} + */ + _chart.renderVerticalGridLines = function (renderVerticalGridLines) { + if (!arguments.length) { + return _renderVerticalGridLine; + } + _renderVerticalGridLine = renderVerticalGridLines; + return _chart; + }; + + /** + * Calculates the minimum x value to display in the chart. Includes xAxisPadding if set. + * @method xAxisMin + * @memberof dc.coordinateGridMixin + * @instance + * @returns {*} + */ + _chart.xAxisMin = function () { + var min = d3.min(_chart.data(), function (e) { + return _chart.keyAccessor()(e); + }); + return dc.utils.subtract(min, _xAxisPadding, _xAxisPaddingUnit); + }; + + /** + * Calculates the maximum x value to display in the chart. Includes xAxisPadding if set. + * @method xAxisMax + * @memberof dc.coordinateGridMixin + * @instance + * @returns {*} + */ + _chart.xAxisMax = function () { + var max = d3.max(_chart.data(), function (e) { + return _chart.keyAccessor()(e); + }); + return dc.utils.add(max, _xAxisPadding, _xAxisPaddingUnit); + }; + + /** + * Calculates the minimum y value to display in the chart. Includes yAxisPadding if set. + * @method yAxisMin + * @memberof dc.coordinateGridMixin + * @instance + * @returns {*} + */ + _chart.yAxisMin = function () { + var min = d3.min(_chart.data(), function (e) { + return _chart.valueAccessor()(e); + }); + return dc.utils.subtract(min, _yAxisPadding); + }; + + /** + * Calculates the maximum y value to display in the chart. Includes yAxisPadding if set. + * @method yAxisMax + * @memberof dc.coordinateGridMixin + * @instance + * @returns {*} + */ + _chart.yAxisMax = function () { + var max = d3.max(_chart.data(), function (e) { + return _chart.valueAccessor()(e); + }); + return dc.utils.add(max, _yAxisPadding); + }; + + /** + * Set or get y axis padding for the elastic y axis. The padding will be added to the top and + * bottom of the y axis if elasticY is turned on; otherwise it is ignored. + * + * Padding can be an integer or percentage in string (e.g. '10%'). Padding can be applied to + * number or date axes. When padding a date axis, an integer represents number of days being padded + * and a percentage string will be treated the same as an integer. + * @method yAxisPadding + * @memberof dc.coordinateGridMixin + * @instance + * @param {Number|String} [padding=0] + * @returns {Number|dc.coordinateGridMixin} + */ + _chart.yAxisPadding = function (padding) { + if (!arguments.length) { + return _yAxisPadding; + } + _yAxisPadding = padding; + return _chart; + }; + + _chart.yAxisHeight = function () { + return _chart.effectiveHeight(); + }; + + /** + * Set or get the rounding function used to quantize the selection when brushing is enabled. + * @method round + * @memberof dc.coordinateGridMixin + * @instance + * @example + * // set x unit round to by month, this will make sure range selection brush will + * // select whole months + * chart.round(d3.time.month.round); + * @param {Function} [round] + * @returns {Function|dc.coordinateGridMixin} + */ + _chart.round = function (round) { + if (!arguments.length) { + return _round; + } + _round = round; + return _chart; + }; + + _chart._rangeBandPadding = function (_) { + if (!arguments.length) { + return _rangeBandPadding; + } + _rangeBandPadding = _; + return _chart; + }; + + _chart._outerRangeBandPadding = function (_) { + if (!arguments.length) { + return _outerRangeBandPadding; + } + _outerRangeBandPadding = _; + return _chart; + }; + + dc.override(_chart, 'filter', function (_) { + if (!arguments.length) { + return _chart._filter(); + } + + _chart._filter(_); + + if (_) { + _chart.brush().extent(_); + } else { + _chart.brush().clear(); + } + + return _chart; + }); + + _chart.brush = function (_) { + if (!arguments.length) { + return _brush; + } + _brush = _; + return _chart; + }; + + function brushHeight () { + return _chart._xAxisY() - _chart.margins().top; + } + + _chart.renderBrush = function (g) { + if (_brushOn) { + _brush.on('brush', _chart._brushing); + _brush.on('brushstart', _chart._disableMouseZoom); + _brush.on('brushend', configureMouseZoom); + + var gBrush = g.append('g') + .attr('class', 'brush') + .attr('transform', 'translate(' + _chart.margins().left + ',' + _chart.margins().top + ')') + .call(_brush.x(_chart.x())); + _chart.setBrushY(gBrush, false); + _chart.setHandlePaths(gBrush); + + if (_chart.hasFilter()) { + _chart.redrawBrush(g, false); + } + } + }; + + _chart.setHandlePaths = function (gBrush) { + gBrush.selectAll('.resize').append('path').attr('d', _chart.resizeHandlePath); + }; + + _chart.setBrushY = function (gBrush) { + gBrush.selectAll('rect') + .attr('height', brushHeight()); + gBrush.selectAll('.resize path') + .attr('d', _chart.resizeHandlePath); + }; + + _chart.extendBrush = function () { + var extent = _brush.extent(); + if (_chart.round()) { + extent[0] = extent.map(_chart.round())[0]; + extent[1] = extent.map(_chart.round())[1]; + + _g.select('.brush') + .call(_brush.extent(extent)); + } + return extent; + }; + + _chart.brushIsEmpty = function (extent) { + return _brush.empty() || !extent || extent[1] <= extent[0]; + }; + + _chart._brushing = function () { + var extent = _chart.extendBrush(); + + _chart.redrawBrush(_g, false); + + if (_chart.brushIsEmpty(extent)) { + dc.events.trigger(function () { + _chart.filter(null); + _chart.redrawGroup(); + }, dc.constants.EVENT_DELAY); + } else { + var rangedFilter = dc.filters.RangedFilter(extent[0], extent[1]); + + dc.events.trigger(function () { + _chart.replaceFilter(rangedFilter); + _chart.redrawGroup(); + }, dc.constants.EVENT_DELAY); + } + }; + + _chart.redrawBrush = function (g, doTransition) { + if (_brushOn) { + if (_chart.filter() && _chart.brush().empty()) { + _chart.brush().extent(_chart.filter()); + } + + var gBrush = dc.optionalTransition(doTransition, _chart.transitionDuration(), _chart.transitionDelay())(g.select('g.brush')); + _chart.setBrushY(gBrush); + gBrush.call(_chart.brush() + .x(_chart.x()) + .extent(_chart.brush().extent())); + } + + _chart.fadeDeselectedArea(); + }; + + _chart.fadeDeselectedArea = function () { + // do nothing, sub-chart should override this function + }; + + // borrowed from Crossfilter example + _chart.resizeHandlePath = function (d) { + var e = +(d === 'e'), x = e ? 1 : -1, y = brushHeight() / 3; + return 'M' + (0.5 * x) + ',' + y + + 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6) + + 'V' + (2 * y - 6) + + 'A6,6 0 0 ' + e + ' ' + (0.5 * x) + ',' + (2 * y) + + 'Z' + + 'M' + (2.5 * x) + ',' + (y + 8) + + 'V' + (2 * y - 8) + + 'M' + (4.5 * x) + ',' + (y + 8) + + 'V' + (2 * y - 8); + }; + + function getClipPathId () { + return _chart.anchorName().replace(/[ .#=\[\]"]/g, '-') + '-clip'; + } + + /** + * Get or set the padding in pixels for the clip path. Once set padding will be applied evenly to + * the top, left, right, and bottom when the clip path is generated. If set to zero, the clip area + * will be exactly the chart body area minus the margins. + * @method clipPadding + * @memberof dc.coordinateGridMixin + * @instance + * @param {Number} [padding=5] + * @returns {Number|dc.coordinateGridMixin} + */ + _chart.clipPadding = function (padding) { + if (!arguments.length) { + return _clipPadding; + } + _clipPadding = padding; + return _chart; + }; + + function generateClipPath () { + var defs = dc.utils.appendOrSelect(_parent, 'defs'); + // cannot select <clippath> elements; bug in WebKit, must select by id + // https://groups.google.com/forum/#!topic/d3-js/6EpAzQ2gU9I + var id = getClipPathId(); + var chartBodyClip = dc.utils.appendOrSelect(defs, '#' + id, 'clipPath').attr('id', id); + + var padding = _clipPadding * 2; + + dc.utils.appendOrSelect(chartBodyClip, 'rect') + .attr('width', _chart.xAxisLength() + padding) + .attr('height', _chart.yAxisHeight() + padding) + .attr('transform', 'translate(-' + _clipPadding + ', -' + _clipPadding + ')'); + } + + _chart._preprocessData = function () {}; + + _chart._doRender = function () { + _chart.resetSvg(); + + _chart._preprocessData(); + + _chart._generateG(); + generateClipPath(); + + drawChart(true); + + configureMouseZoom(); + + return _chart; + }; + + _chart._doRedraw = function () { + _chart._preprocessData(); + + drawChart(false); + generateClipPath(); + + return _chart; + }; + + function drawChart (render) { + if (_chart.isOrdinal()) { + _brushOn = false; + } + + prepareXAxis(_chart.g(), render); + _chart._prepareYAxis(_chart.g()); + + _chart.plotData(); + + if (_chart.elasticX() || _resizing || render) { + _chart.renderXAxis(_chart.g()); + } + + if (_chart.elasticY() || _resizing || render) { + _chart.renderYAxis(_chart.g()); + } + + if (render) { + _chart.renderBrush(_chart.g(), false); + } else { + _chart.redrawBrush(_chart.g(), _resizing); + } + _chart.fadeDeselectedArea(); + _resizing = false; + } + + function configureMouseZoom () { + if (_mouseZoomable) { + _chart._enableMouseZoom(); + } else if (_hasBeenMouseZoomable) { + _chart._disableMouseZoom(); + } + } + + _chart._enableMouseZoom = function () { + _hasBeenMouseZoomable = true; + _zoom.x(_chart.x()) + .scaleExtent(_zoomScale) + .size([_chart.width(), _chart.height()]) + .duration(_chart.transitionDuration()); + _chart.root().call(_zoom); + }; + + _chart._disableMouseZoom = function () { + _chart.root().call(_nullZoom); + }; + + function zoomHandler () { + _refocused = true; + if (_zoomOutRestrict) { + var constraint = _xOriginalDomain; + if (_rangeChart) { + constraint = intersectExtents(constraint, _rangeChart.x().domain()); + } + var constrained = constrainExtent(_chart.x().domain(), constraint); + if (constrained) { + _chart.x().domain(constrained); + } + } + + var domain = _chart.x().domain(); + var domFilter = dc.filters.RangedFilter(domain[0], domain[1]); + + _chart.replaceFilter(domFilter); + _chart.rescale(); + _chart.redraw(); + + if (_rangeChart && !rangesEqual(_chart.filter(), _rangeChart.filter())) { + dc.events.trigger(function () { + _rangeChart.replaceFilter(domFilter); + _rangeChart.redraw(); + }); + } + + _chart._invokeZoomedListener(); + + dc.events.trigger(function () { + _chart.redrawGroup(); + }, dc.constants.EVENT_DELAY); + + _refocused = !rangesEqual(domain, _xOriginalDomain); + } + + function intersectExtents (ext1, ext2) { + if (ext1[0] > ext2[1] || ext1[1] < ext2[0]) { + console.warn('could not intersect extents'); + } + return [Math.max(ext1[0], ext2[0]), Math.min(ext1[1], ext2[1])]; + } + + function constrainExtent (extent, constraint) { + var size = extent[1] - extent[0]; + if (extent[0] < constraint[0]) { + return [constraint[0], Math.min(constraint[1], dc.utils.add(constraint[0], size, 'millis'))]; + } else if (extent[1] > constraint[1]) { + return [Math.max(constraint[0], dc.utils.subtract(constraint[1], size, 'millis')), constraint[1]]; + } else { + return null; + } + } + + /** + * Zoom this chart to focus on the given range. The given range should be an array containing only + * 2 elements (`[start, end]`) defining a range in the x domain. If the range is not given or set + * to null, then the zoom will be reset. _For focus to work elasticX has to be turned off; + * otherwise focus will be ignored. + * @method focus + * @memberof dc.coordinateGridMixin + * @instance + * @example + * chart.on('renderlet', function(chart) { + * // smooth the rendering through event throttling + * dc.events.trigger(function(){ + * // focus some other chart to the range selected by user on this chart + * someOtherChart.focus(chart.filter()); + * }); + * }) + * @param {Array<Number>} [range] + */ + _chart.focus = function (range) { + if (hasRangeSelected(range)) { + _chart.x().domain(range); + } else { + _chart.x().domain(_xOriginalDomain); + } + + _zoom.x(_chart.x()); + zoomHandler(); + }; + + _chart.refocused = function () { + return _refocused; + }; + + _chart.focusChart = function (c) { + if (!arguments.length) { + return _focusChart; + } + _focusChart = c; + _chart.on('filtered', function (chart) { + if (!chart.filter()) { + dc.events.trigger(function () { + _focusChart.x().domain(_focusChart.xOriginalDomain()); + }); + } else if (!rangesEqual(chart.filter(), _focusChart.filter())) { + dc.events.trigger(function () { + _focusChart.focus(chart.filter()); + }); + } + }); + return _chart; + }; + + function rangesEqual (range1, range2) { + if (!range1 && !range2) { + return true; + } else if (!range1 || !range2) { + return false; + } else if (range1.length === 0 && range2.length === 0) { + return true; + } else if (range1[0].valueOf() === range2[0].valueOf() && + range1[1].valueOf() === range2[1].valueOf()) { + return true; + } + return false; + } + + /** + * Turn on/off the brush-based range filter. When brushing is on then user can drag the mouse + * across a chart with a quantitative scale to perform range filtering based on the extent of the + * brush, or click on the bars of an ordinal bar chart or slices of a pie chart to filter and + * un-filter them. However turning on the brush filter will disable other interactive elements on + * the chart such as highlighting, tool tips, and reference lines. Zooming will still be possible + * if enabled, but only via scrolling (panning will be disabled.) + * @method brushOn + * @memberof dc.coordinateGridMixin + * @instance + * @param {Boolean} [brushOn=true] + * @returns {Boolean|dc.coordinateGridMixin} + */ + _chart.brushOn = function (brushOn) { + if (!arguments.length) { + return _brushOn; + } + _brushOn = brushOn; + return _chart; + }; + + function hasRangeSelected (range) { + return range instanceof Array && range.length > 1; + } + + return _chart; +}; + +/** + * Stack Mixin is an mixin that provides cross-chart support of stackability using d3.layout.stack. + * @name stackMixin + * @memberof dc + * @mixin + * @param {Object} _chart + * @returns {dc.stackMixin} + */ +dc.stackMixin = function (_chart) { + + function prepareValues (layer, layerIdx) { + var valAccessor = layer.accessor || _chart.valueAccessor(); + layer.name = String(layer.name || layerIdx); + layer.values = layer.group.all().map(function (d, i) { + return { + x: _chart.keyAccessor()(d, i), + y: layer.hidden ? null : valAccessor(d, i), + data: d, + layer: layer.name, + hidden: layer.hidden + }; + }); + + layer.values = layer.values.filter(domainFilter()); + return layer.values; + } + + var _stackLayout = d3.layout.stack() + .values(prepareValues); + + var _stack = []; + var _titles = {}; + + var _hidableStacks = false; + var _evadeDomainFilter = false; + + function domainFilter () { + if (!_chart.x() || _evadeDomainFilter) { + return d3.functor(true); + } + var xDomain = _chart.x().domain(); + if (_chart.isOrdinal()) { + // TODO #416 + //var domainSet = d3.set(xDomain); + return function () { + return true; //domainSet.has(p.x); + }; + } + if (_chart.elasticX()) { + return function () { return true; }; + } + return function (p) { + //return true; + return p.x >= xDomain[0] && p.x <= xDomain[xDomain.length - 1]; + }; + } + + /** + * Stack a new crossfilter group onto this chart with an optional custom value accessor. All stacks + * in the same chart will share the same key accessor and therefore the same set of keys. + * + * For example, in a stacked bar chart, the bars of each stack will be positioned using the same set + * of keys on the x axis, while stacked vertically. If name is specified then it will be used to + * generate the legend label. + * @method stack + * @memberof dc.stackMixin + * @instance + * @see {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#group-map-reduce crossfilter.group} + * @example + * // stack group using default accessor + * chart.stack(valueSumGroup) + * // stack group using custom accessor + * .stack(avgByDayGroup, function(d){return d.value.avgByDay;}); + * @param {crossfilter.group} group + * @param {String} [name] + * @param {Function} [accessor] + * @returns {Array<{group: crossfilter.group, name: String, accessor: Function}>|dc.stackMixin} + */ + _chart.stack = function (group, name, accessor) { + if (!arguments.length) { + return _stack; + } + + if (arguments.length <= 2) { + accessor = name; + } + + var layer = {group: group}; + if (typeof name === 'string') { + layer.name = name; + } + if (typeof accessor === 'function') { + layer.accessor = accessor; + } + _stack.push(layer); + + return _chart; + }; + + dc.override(_chart, 'group', function (g, n, f) { + if (!arguments.length) { + return _chart._group(); + } + _stack = []; + _titles = {}; + _chart.stack(g, n); + if (f) { + _chart.valueAccessor(f); + } + return _chart._group(g, n); + }); + + /** + * Allow named stacks to be hidden or shown by clicking on legend items. + * This does not affect the behavior of hideStack or showStack. + * @method hidableStacks + * @memberof dc.stackMixin + * @instance + * @param {Boolean} [hidableStacks=false] + * @returns {Boolean|dc.stackMixin} + */ + _chart.hidableStacks = function (hidableStacks) { + if (!arguments.length) { + return _hidableStacks; + } + _hidableStacks = hidableStacks; + return _chart; + }; + + function findLayerByName (n) { + var i = _stack.map(dc.pluck('name')).indexOf(n); + return _stack[i]; + } + + /** + * Hide all stacks on the chart with the given name. + * The chart must be re-rendered for this change to appear. + * @method hideStack + * @memberof dc.stackMixin + * @instance + * @param {String} stackName + * @returns {dc.stackMixin} + */ + _chart.hideStack = function (stackName) { + var layer = findLayerByName(stackName); + if (layer) { + layer.hidden = true; + } + return _chart; + }; + + /** + * Show all stacks on the chart with the given name. + * The chart must be re-rendered for this change to appear. + * @method showStack + * @memberof dc.stackMixin + * @instance + * @param {String} stackName + * @returns {dc.stackMixin} + */ + _chart.showStack = function (stackName) { + var layer = findLayerByName(stackName); + if (layer) { + layer.hidden = false; + } + return _chart; + }; + + _chart.getValueAccessorByIndex = function (index) { + return _stack[index].accessor || _chart.valueAccessor(); + }; + + _chart.yAxisMin = function () { + var min = d3.min(flattenStack(), function (p) { + return (p.y < 0) ? (p.y + p.y0) : p.y0; + }); + + return dc.utils.subtract(min, _chart.yAxisPadding()); + + }; + + _chart.yAxisMax = function () { + var max = d3.max(flattenStack(), function (p) { + return (p.y > 0) ? (p.y + p.y0) : p.y0; + }); + + return dc.utils.add(max, _chart.yAxisPadding()); + }; + + function flattenStack () { + var valueses = _chart.data().map(function (layer) { return layer.values; }); + return Array.prototype.concat.apply([], valueses); + } + + _chart.xAxisMin = function () { + var min = d3.min(flattenStack(), dc.pluck('x')); + return dc.utils.subtract(min, _chart.xAxisPadding(), _chart.xAxisPaddingUnit()); + }; + + _chart.xAxisMax = function () { + var max = d3.max(flattenStack(), dc.pluck('x')); + return dc.utils.add(max, _chart.xAxisPadding(), _chart.xAxisPaddingUnit()); + }; + + /** + * Set or get the title function. Chart class will use this function to render svg title (usually interpreted by + * browser as tooltips) for each child element in the chart, i.e. a slice in a pie chart or a bubble in a bubble chart. + * Almost every chart supports title function however in grid coordinate chart you need to turn off brush in order to + * use title otherwise the brush layer will block tooltip trigger. + * + * If the first argument is a stack name, the title function will get or set the title for that stack. If stackName + * is not provided, the first stack is implied. + * @method title + * @memberof dc.stackMixin + * @instance + * @example + * // set a title function on 'first stack' + * chart.title('first stack', function(d) { return d.key + ': ' + d.value; }); + * // get a title function from 'second stack' + * var secondTitleFunction = chart.title('second stack'); + * @param {String} [stackName] + * @param {Function} [titleAccessor] + * @returns {String|dc.stackMixin} + */ + dc.override(_chart, 'title', function (stackName, titleAccessor) { + if (!stackName) { + return _chart._title(); + } + + if (typeof stackName === 'function') { + return _chart._title(stackName); + } + if (stackName === _chart._groupName && typeof titleAccessor === 'function') { + return _chart._title(titleAccessor); + } + + if (typeof titleAccessor !== 'function') { + return _titles[stackName] || _chart._title(); + } + + _titles[stackName] = titleAccessor; + + return _chart; + }); + + /** + * Gets or sets the stack layout algorithm, which computes a baseline for each stack and + * propagates it to the next. + * @method stackLayout + * @memberof dc.stackMixin + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Stack-Layout.md d3.layout.stack} + * @param {Function} [stack=d3.layout.stack] + * @returns {Function|dc.stackMixin} + */ + _chart.stackLayout = function (stack) { + if (!arguments.length) { + return _stackLayout; + } + _stackLayout = stack; + if (_stackLayout.values() === d3.layout.stack().values()) { + _stackLayout.values(prepareValues); + } + return _chart; + }; + + /** + * Since dc.js 2.0, there has been {@link https://github.com/dc-js/dc.js/issues/949 an issue} + * where points are filtered to the current domain. While this is a useful optimization, it is + * incorrectly implemented: the next point outside the domain is required in order to draw lines + * that are clipped to the bounds, as well as bars that are partly clipped. + * + * A fix will be included in dc.js 2.1.x, but a workaround is needed for dc.js 2.0 and until + * that fix is published, so set this flag to skip any filtering of points. + * + * Once the bug is fixed, this flag will have no effect, and it will be deprecated. + * @method evadeDomainFilter + * @memberof dc.stackMixin + * @instance + * @param {Boolean} [evadeDomainFilter=false] + * @returns {Boolean|dc.stackMixin} + */ + _chart.evadeDomainFilter = function (evadeDomainFilter) { + if (!arguments.length) { + return _evadeDomainFilter; + } + _evadeDomainFilter = evadeDomainFilter; + return _chart; + }; + + function visability (l) { + return !l.hidden; + } + + _chart.data(function () { + var layers = _stack.filter(visability); + return layers.length ? _chart.stackLayout()(layers) : []; + }); + + _chart._ordinalXDomain = function () { + var flat = flattenStack().map(dc.pluck('data')); + var ordered = _chart._computeOrderedGroups(flat); + return ordered.map(_chart.keyAccessor()); + }; + + _chart.colorAccessor(function (d) { + var layer = this.layer || this.name || d.name || d.layer; + return layer; + }); + + _chart.legendables = function () { + return _stack.map(function (layer, i) { + return { + chart: _chart, + name: layer.name, + hidden: layer.hidden || false, + color: _chart.getColor.call(layer, layer.values, i) + }; + }); + }; + + _chart.isLegendableHidden = function (d) { + var layer = findLayerByName(d.name); + return layer ? layer.hidden : false; + }; + + _chart.legendToggle = function (d) { + if (_hidableStacks) { + if (_chart.isLegendableHidden(d)) { + _chart.showStack(d.name); + } else { + _chart.hideStack(d.name); + } + //_chart.redraw(); + _chart.renderGroup(); + } + }; + + return _chart; +}; + +/** + * Cap is a mixin that groups small data elements below a _cap_ into an *others* grouping for both the + * Row and Pie Charts. + * + * The top ordered elements in the group up to the cap amount will be kept in the chart, and the rest + * will be replaced with an *others* element, with value equal to the sum of the replaced values. The + * keys of the elements below the cap limit are recorded in order to filter by those keys when the + * others* element is clicked. + * @name capMixin + * @memberof dc + * @mixin + * @param {Object} _chart + * @returns {dc.capMixin} + */ +dc.capMixin = function (_chart) { + var _cap = Infinity, _takeFront = true; + var _othersLabel = 'Others'; + + // emulate old group.top(N) ordering + _chart.ordering(function (kv) { + return -kv.value; + }); + + var _othersGrouper = function (topItems, restItems) { + var restItemsSum = d3.sum(restItems, _chart.valueAccessor()), + restKeys = restItems.map(_chart.keyAccessor()); + if (restItemsSum > 0) { + return topItems.concat([{ + others: restKeys, + key: _chart.othersLabel(), + value: restItemsSum + }]); + } + return topItems; + }; + + _chart.cappedKeyAccessor = function (d, i) { + if (d.others) { + return d.key; + } + return _chart.keyAccessor()(d, i); + }; + + _chart.cappedValueAccessor = function (d, i) { + if (d.others) { + return d.value; + } + return _chart.valueAccessor()(d, i); + }; + + // return N "top" groups, where N is the cap, sorted by baseMixin.ordering + // whether top means front or back depends on takeFront + _chart.data(function (group) { + if (_cap === Infinity) { + return _chart._computeOrderedGroups(group.all()); + } else { + var items = group.all(), rest; + items = _chart._computeOrderedGroups(items); // sort by baseMixin.ordering + + if (_cap) { + if (_takeFront) { + rest = items.slice(_cap); + items = items.slice(0, _cap); + } else { + var start = Math.max(0, items.length - _cap); + rest = items.slice(0, start); + items = items.slice(start); + } + } + + if (_othersGrouper) { + return _othersGrouper(items, rest); + } + return items; + } + }); + + /** + * Get or set the count of elements to that will be included in the cap. If there is an + * {@link dc.capMixin#othersGrouper othersGrouper}, any further elements will be combined in an + * extra element with its name determined by {@link dc.capMixin#othersLabel othersLabel}. + * + * As of dc.js 2.1 and onward, the capped charts use + * {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#group_all group.all()} + * and {@link dc.baseMixin#ordering baseMixin.ordering()} to determine the order of + * elements. Then `cap` and {@link dc.capMixin#takeFront takeFront} determine how many elements + * to keep, from which end of the resulting array. + * + * **Migration note:** Up through dc.js 2.0.*, capping used + * {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#group_top group.top(N)}, + * which selects the largest items according to + * {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#group_order group.order()}. + * The chart then sorted the items according to {@link dc.baseMixin#ordering baseMixin.ordering()}. + * So the two values essentially had to agree, but if the `group.order()` was incorrect (it's + * easy to forget about), the wrong rows or slices would be displayed, in the correct order. + * + * If your chart previously relied on `group.order()`, use `chart.ordering()` instead. As of + * 2.1.5, the ordering defaults to sorting from greatest to least like `group.top(N)` did. + * + * If you want to cap by one ordering but sort by another, please + * [file an issue](https://github.com/dc-js/dc.js/issues/new) - it's still possible but we'll + * need to work up an example. + * @method cap + * @memberof dc.capMixin + * @instance + * @param {Number} [count=Infinity] + * @returns {Number|dc.capMixin} + */ + _chart.cap = function (count) { + if (!arguments.length) { + return _cap; + } + _cap = count; + return _chart; + }; + + /** + * Get or set the direction of capping. If set, the chart takes the first + * {@link dc.capMixin#cap cap} elements from the sorted array of elements; otherwise + * it takes the last `cap` elements. + * @method takeFront + * @memberof dc.capMixin + * @instance + * @param {Boolean} [takeFront=true] + * @returns {Boolean|dc.capMixin} + */ + _chart.takeFront = function (takeFront) { + if (!arguments.length) { + return _takeFront; + } + _takeFront = takeFront; + return _chart; + }; + + /** + * Get or set the label for *Others* slice when slices cap is specified. + * @method othersLabel + * @memberof dc.capMixin + * @instance + * @param {String} [label="Others"] + * @returns {String|dc.capMixin} + */ + _chart.othersLabel = function (label) { + if (!arguments.length) { + return _othersLabel; + } + _othersLabel = label; + return _chart; + }; + + /** + * Get or set the grouper function that will perform the insertion of data for the *Others* slice + * if the slices cap is specified. If set to a falsy value, no others will be added. + * + * The grouper function takes an array of included ("top") items, and an array of the rest of + * the items. By default the grouper function computes the sum of the rest. + * @method othersGrouper + * @memberof dc.capMixin + * @instance + * @example + * // Do not show others + * chart.othersGrouper(null); + * // Default others grouper + * chart.othersGrouper(function (topItems, restItems) { + * var restItemsSum = d3.sum(restItems, _chart.valueAccessor()), + * restKeys = restItems.map(_chart.keyAccessor()); + * if (restItemsSum > 0) { + * return topItems.concat([{ + * others: restKeys, + * key: _chart.othersLabel(), + * value: restItemsSum + * }]); + * } + * return topItems; + * }); + * @param {Function} [grouperFunction] + * @returns {Function|dc.capMixin} + */ + _chart.othersGrouper = function (grouperFunction) { + if (!arguments.length) { + return _othersGrouper; + } + _othersGrouper = grouperFunction; + return _chart; + }; + + dc.override(_chart, 'onClick', function (d) { + if (d.others) { + _chart.filter([d.others]); + } + _chart._onClick(d); + }); + + return _chart; +}; + +/** + * This Mixin provides reusable functionalities for any chart that needs to visualize data using bubbles. + * @name bubbleMixin + * @memberof dc + * @mixin + * @mixes dc.colorMixin + * @param {Object} _chart + * @returns {dc.bubbleMixin} + */ +dc.bubbleMixin = function (_chart) { + var _maxBubbleRelativeSize = 0.3; + var _minRadiusWithLabel = 10; + var _sortBubbleSize = false; + var _elasticRadius = false; + + _chart.BUBBLE_NODE_CLASS = 'node'; + _chart.BUBBLE_CLASS = 'bubble'; + _chart.MIN_RADIUS = 10; + + _chart = dc.colorMixin(_chart); + + _chart.renderLabel(true); + + _chart.data(function (group) { + var data = group.all(); + if (_sortBubbleSize) { + // sort descending so smaller bubbles are on top + var radiusAccessor = _chart.radiusValueAccessor(); + data.sort(function (a, b) { return d3.descending(radiusAccessor(a), radiusAccessor(b)); }); + } + return data; + }); + + var _r = d3.scale.linear().domain([0, 100]); + + var _rValueAccessor = function (d) { + return d.r; + }; + + /** + * Get or set the bubble radius scale. By default the bubble chart uses + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Quantitative-Scales.md#linear d3.scale.linear().domain([0, 100])} + * as its radius scale. + * @method r + * @memberof dc.bubbleMixin + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Scales.md d3.scale} + * @param {d3.scale} [bubbleRadiusScale=d3.scale.linear().domain([0, 100])] + * @returns {d3.scale|dc.bubbleMixin} + */ + _chart.r = function (bubbleRadiusScale) { + if (!arguments.length) { + return _r; + } + _r = bubbleRadiusScale; + return _chart; + }; + + /** + * Turn on or off the elastic bubble radius feature, or return the value of the flag. If this + * feature is turned on, then bubble radii will be automatically rescaled to fit the chart better. + * @method elasticRadius + * @memberof dc.bubbleChart + * @instance + * @param {Boolean} [elasticRadius=false] + * @returns {Boolean|dc.bubbleChart} + */ + _chart.elasticRadius = function (elasticRadius) { + if (!arguments.length) { + return _elasticRadius; + } + _elasticRadius = elasticRadius; + return _chart; + }; + + _chart.calculateRadiusDomain = function () { + if (_elasticRadius) { + _chart.r().domain([_chart.rMin(), _chart.rMax()]); + } + }; + + /** + * Get or set the radius value accessor function. If set, the radius value accessor function will + * be used to retrieve a data value for each bubble. The data retrieved then will be mapped using + * the r scale to the actual bubble radius. This allows you to encode a data dimension using bubble + * size. + * @method radiusValueAccessor + * @memberof dc.bubbleMixin + * @instance + * @param {Function} [radiusValueAccessor] + * @returns {Function|dc.bubbleMixin} + */ + _chart.radiusValueAccessor = function (radiusValueAccessor) { + if (!arguments.length) { + return _rValueAccessor; + } + _rValueAccessor = radiusValueAccessor; + return _chart; + }; + + _chart.rMin = function () { + var min = d3.min(_chart.data(), function (e) { + return _chart.radiusValueAccessor()(e); + }); + return min; + }; + + _chart.rMax = function () { + var max = d3.max(_chart.data(), function (e) { + return _chart.radiusValueAccessor()(e); + }); + return max; + }; + + _chart.bubbleR = function (d) { + var value = _chart.radiusValueAccessor()(d); + var r = _chart.r()(value); + if (isNaN(r) || value <= 0) { + r = 0; + } + return r; + }; + + var labelFunction = function (d) { + return _chart.label()(d); + }; + + var shouldLabel = function (d) { + return (_chart.bubbleR(d) > _minRadiusWithLabel); + }; + + var labelOpacity = function (d) { + return shouldLabel(d) ? 1 : 0; + }; + + var labelPointerEvent = function (d) { + return shouldLabel(d) ? 'all' : 'none'; + }; + + _chart._doRenderLabel = function (bubbleGEnter) { + if (_chart.renderLabel()) { + var label = bubbleGEnter.select('text'); + + if (label.empty()) { + label = bubbleGEnter.append('text') + .attr('text-anchor', 'middle') + .attr('dy', '.3em') + .on('click', _chart.onClick); + } + + label + .attr('opacity', 0) + .attr('pointer-events', labelPointerEvent) + .text(labelFunction); + dc.transition(label, _chart.transitionDuration(), _chart.transitionDelay()) + .attr('opacity', labelOpacity); + } + }; + + _chart.doUpdateLabels = function (bubbleGEnter) { + if (_chart.renderLabel()) { + var labels = bubbleGEnter.select('text') + .attr('pointer-events', labelPointerEvent) + .text(labelFunction); + dc.transition(labels, _chart.transitionDuration(), _chart.transitionDelay()) + .attr('opacity', labelOpacity); + } + }; + + var titleFunction = function (d) { + return _chart.title()(d); + }; + + _chart._doRenderTitles = function (g) { + if (_chart.renderTitle()) { + var title = g.select('title'); + + if (title.empty()) { + g.append('title').text(titleFunction); + } + } + }; + + _chart.doUpdateTitles = function (g) { + if (_chart.renderTitle()) { + g.select('title').text(titleFunction); + } + }; + + /** + * Turn on or off the bubble sorting feature, or return the value of the flag. If enabled, + * bubbles will be sorted by their radius, with smaller bubbles in front. + * @method sortBubbleSize + * @memberof dc.bubbleChart + * @instance + * @param {Boolean} [sortBubbleSize=false] + * @returns {Boolean|dc.bubbleChart} + */ + _chart.sortBubbleSize = function (sortBubbleSize) { + if (!arguments.length) { + return _sortBubbleSize; + } + _sortBubbleSize = sortBubbleSize; + return _chart; + }; + + /** + * Get or set the minimum radius. This will be used to initialize the radius scale's range. + * @method minRadius + * @memberof dc.bubbleMixin + * @instance + * @param {Number} [radius=10] + * @returns {Number|dc.bubbleMixin} + */ + _chart.minRadius = function (radius) { + if (!arguments.length) { + return _chart.MIN_RADIUS; + } + _chart.MIN_RADIUS = radius; + return _chart; + }; + + /** + * Get or set the minimum radius for label rendering. If a bubble's radius is less than this value + * then no label will be rendered. + * @method minRadiusWithLabel + * @memberof dc.bubbleMixin + * @instance + * @param {Number} [radius=10] + * @returns {Number|dc.bubbleMixin} + */ + + _chart.minRadiusWithLabel = function (radius) { + if (!arguments.length) { + return _minRadiusWithLabel; + } + _minRadiusWithLabel = radius; + return _chart; + }; + + /** + * Get or set the maximum relative size of a bubble to the length of x axis. This value is useful + * when the difference in radius between bubbles is too great. + * @method maxBubbleRelativeSize + * @memberof dc.bubbleMixin + * @instance + * @param {Number} [relativeSize=0.3] + * @returns {Number|dc.bubbleMixin} + */ + _chart.maxBubbleRelativeSize = function (relativeSize) { + if (!arguments.length) { + return _maxBubbleRelativeSize; + } + _maxBubbleRelativeSize = relativeSize; + return _chart; + }; + + _chart.fadeDeselectedArea = function () { + if (_chart.hasFilter()) { + _chart.selectAll('g.' + _chart.BUBBLE_NODE_CLASS).each(function (d) { + if (_chart.isSelectedNode(d)) { + _chart.highlightSelected(this); + } else { + _chart.fadeDeselected(this); + } + }); + } else { + _chart.selectAll('g.' + _chart.BUBBLE_NODE_CLASS).each(function () { + _chart.resetHighlight(this); + }); + } + }; + + _chart.isSelectedNode = function (d) { + return _chart.hasFilter(d.key); + }; + + _chart.onClick = function (d) { + var filter = d.key; + dc.events.trigger(function () { + _chart.filter(filter); + _chart.redrawGroup(); + }); + }; + + return _chart; +}; + +/** + * The pie chart implementation is usually used to visualize a small categorical distribution. The pie + * chart uses keyAccessor to determine the slices, and valueAccessor to calculate the size of each + * slice relative to the sum of all values. Slices are ordered by {@link dc.baseMixin#ordering ordering} + * which defaults to sorting by key. + * + * Examples: + * - {@link http://dc-js.github.com/dc.js/ Nasdaq 100 Index} + * @class pieChart + * @memberof dc + * @mixes dc.capMixin + * @mixes dc.colorMixin + * @mixes dc.baseMixin + * @example + * // create a pie chart under #chart-container1 element using the default global chart group + * var chart1 = dc.pieChart('#chart-container1'); + * // create a pie chart under #chart-container2 element using chart group A + * var chart2 = dc.pieChart('#chart-container2', 'chartGroupA'); + * @param {String|node|d3.selection} parent - Any valid + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying + * a dom block element such as a div; or a dom element or d3 selection. + * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in. + * Interaction with a chart will only trigger events and redraws within the chart's group. + * @returns {dc.pieChart} + */ +dc.pieChart = function (parent, chartGroup) { + var DEFAULT_MIN_ANGLE_FOR_LABEL = 0.5; + + var _sliceCssClass = 'pie-slice'; + var _labelCssClass = 'pie-label'; + var _sliceGroupCssClass = 'pie-slice-group'; + var _labelGroupCssClass = 'pie-label-group'; + var _emptyCssClass = 'empty-chart'; + var _emptyTitle = 'empty'; + + var _radius, + _givenRadius, // specified radius, if any + _innerRadius = 0, + _externalRadiusPadding = 0; + + var _g; + var _cx; + var _cy; + var _minAngleForLabel = DEFAULT_MIN_ANGLE_FOR_LABEL; + var _externalLabelRadius; + var _drawPaths = false; + var _chart = dc.capMixin(dc.colorMixin(dc.baseMixin({}))); + + _chart.colorAccessor(_chart.cappedKeyAccessor); + + _chart.title(function (d) { + return _chart.cappedKeyAccessor(d) + ': ' + _chart.cappedValueAccessor(d); + }); + + /** + * Get or set the maximum number of slices the pie chart will generate. The top slices are determined by + * value from high to low. Other slices exeeding the cap will be rolled up into one single *Others* slice. + * @method slicesCap + * @memberof dc.pieChart + * @instance + * @param {Number} [cap] + * @returns {Number|dc.pieChart} + */ + _chart.slicesCap = _chart.cap; + + _chart.label(_chart.cappedKeyAccessor); + _chart.renderLabel(true); + + _chart.transitionDuration(350); + _chart.transitionDelay(0); + + _chart._doRender = function () { + _chart.resetSvg(); + + _g = _chart.svg() + .append('g') + .attr('transform', 'translate(' + _chart.cx() + ',' + _chart.cy() + ')'); + + _g.append('g').attr('class', _sliceGroupCssClass); + _g.append('g').attr('class', _labelGroupCssClass); + + drawChart(); + + return _chart; + }; + + function drawChart () { + // set radius from chart size if none given, or if given radius is too large + var maxRadius = d3.min([_chart.width(), _chart.height()]) / 2; + _radius = _givenRadius && _givenRadius < maxRadius ? _givenRadius : maxRadius; + + var arc = buildArcs(); + + var pie = pieLayout(); + var pieData; + // if we have data... + if (d3.sum(_chart.data(), _chart.valueAccessor())) { + pieData = pie(_chart.data()); + _g.classed(_emptyCssClass, false); + } else { + // otherwise we'd be getting NaNs, so override + // note: abuse others for its ignoring the value accessor + pieData = pie([{key: _emptyTitle, value: 1, others: [_emptyTitle]}]); + _g.classed(_emptyCssClass, true); + } + + if (_g) { + var slices = _g.select('g.' + _sliceGroupCssClass) + .selectAll('g.' + _sliceCssClass) + .data(pieData); + + var labels = _g.select('g.' + _labelGroupCssClass) + .selectAll('text.' + _labelCssClass) + .data(pieData); + + createElements(slices, labels, arc, pieData); + + updateElements(pieData, arc); + + removeElements(slices, labels); + + highlightFilter(); + + dc.transition(_g, _chart.transitionDuration(), _chart.transitionDelay()) + .attr('transform', 'translate(' + _chart.cx() + ',' + _chart.cy() + ')'); + } + } + + function createElements (slices, labels, arc, pieData) { + var slicesEnter = createSliceNodes(slices); + + createSlicePath(slicesEnter, arc); + + createTitles(slicesEnter); + + createLabels(labels, pieData, arc); + } + + function createSliceNodes (slices) { + var slicesEnter = slices + .enter() + .append('g') + .attr('class', function (d, i) { + return _sliceCssClass + ' _' + i; + }); + return slicesEnter; + } + + function createSlicePath (slicesEnter, arc) { + var slicePath = slicesEnter.append('path') + .attr('fill', fill) + .on('click', onClick) + .attr('d', function (d, i) { + return safeArc(d, i, arc); + }); + + var transition = dc.transition(slicePath, _chart.transitionDuration(), _chart.transitionDelay()); + if (transition.attrTween) { + transition.attrTween('d', tweenPie); + } + } + + function createTitles (slicesEnter) { + if (_chart.renderTitle()) { + slicesEnter.append('title').text(function (d) { + return _chart.title()(d.data); + }); + } + } + + _chart._applyLabelText = function (labels) { + labels + .text(function (d) { + var data = d.data; + if ((sliceHasNoData(data) || sliceTooSmall(d)) && !isSelectedSlice(d)) { + return ''; + } + return _chart.label()(d.data); + }); + }; + + function positionLabels (labels, arc) { + _chart._applyLabelText(labels); + dc.transition(labels, _chart.transitionDuration(), _chart.transitionDelay()) + .attr('transform', function (d) { + return labelPosition(d, arc); + }) + .attr('text-anchor', 'middle'); + } + + function highlightSlice (i, whether) { + _chart.select('g.pie-slice._' + i) + .classed('highlight', whether); + } + + function createLabels (labels, pieData, arc) { + if (_chart.renderLabel()) { + var labelsEnter = labels + .enter() + .append('text') + .attr('class', function (d, i) { + var classes = _sliceCssClass + ' ' + _labelCssClass + ' _' + i; + if (_externalLabelRadius) { + classes += ' external'; + } + return classes; + }) + .on('click', onClick) + .on('mouseover', function (d, i) { + highlightSlice(i, true); + }) + .on('mouseout', function (d, i) { + highlightSlice(i, false); + }); + positionLabels(labelsEnter, arc); + if (_externalLabelRadius && _drawPaths) { + updateLabelPaths(pieData, arc); + } + } + } + + function updateLabelPaths (pieData, arc) { + var polyline = _g.selectAll('polyline.' + _sliceCssClass) + .data(pieData); + + polyline + .enter() + .append('polyline') + .attr('class', function (d, i) { + return 'pie-path _' + i + ' ' + _sliceCssClass; + }) + .on('click', onClick) + .on('mouseover', function (d, i) { + highlightSlice(i, true); + }) + .on('mouseout', function (d, i) { + highlightSlice(i, false); + }); + + polyline.exit().remove(); + var arc2 = d3.svg.arc() + .outerRadius(_radius - _externalRadiusPadding + _externalLabelRadius) + .innerRadius(_radius - _externalRadiusPadding); + var transition = dc.transition(polyline, _chart.transitionDuration(), _chart.transitionDelay()); + // this is one rare case where d3.selection differs from d3.transition + if (transition.attrTween) { + transition + .attrTween('points', function (d) { + var current = this._current || d; + current = {startAngle: current.startAngle, endAngle: current.endAngle}; + var interpolate = d3.interpolate(current, d); + this._current = interpolate(0); + return function (t) { + var d2 = interpolate(t); + return [arc.centroid(d2), arc2.centroid(d2)]; + }; + }); + } else { + transition.attr('points', function (d) { + return [arc.centroid(d), arc2.centroid(d)]; + }); + } + transition.style('visibility', function (d) { + return d.endAngle - d.startAngle < 0.0001 ? 'hidden' : 'visible'; + }); + + } + + function updateElements (pieData, arc) { + updateSlicePaths(pieData, arc); + updateLabels(pieData, arc); + updateTitles(pieData); + } + + function updateSlicePaths (pieData, arc) { + var slicePaths = _g.selectAll('g.' + _sliceCssClass) + .data(pieData) + .select('path') + .attr('d', function (d, i) { + return safeArc(d, i, arc); + }); + var transition = dc.transition(slicePaths, _chart.transitionDuration(), _chart.transitionDelay()); + if (transition.attrTween) { + transition.attrTween('d', tweenPie); + } + transition.attr('fill', fill); + } + + function updateLabels (pieData, arc) { + if (_chart.renderLabel()) { + var labels = _g.selectAll('text.' + _labelCssClass) + .data(pieData); + positionLabels(labels, arc); + if (_externalLabelRadius && _drawPaths) { + updateLabelPaths(pieData, arc); + } + } + } + + function updateTitles (pieData) { + if (_chart.renderTitle()) { + _g.selectAll('g.' + _sliceCssClass) + .data(pieData) + .select('title') + .text(function (d) { + return _chart.title()(d.data); + }); + } + } + + function removeElements (slices, labels) { + slices.exit().remove(); + labels.exit().remove(); + } + + function highlightFilter () { + if (_chart.hasFilter()) { + _chart.selectAll('g.' + _sliceCssClass).each(function (d) { + if (isSelectedSlice(d)) { + _chart.highlightSelected(this); + } else { + _chart.fadeDeselected(this); + } + }); + } else { + _chart.selectAll('g.' + _sliceCssClass).each(function () { + _chart.resetHighlight(this); + }); + } + } + + /** + * Get or set the external radius padding of the pie chart. This will force the radius of the + * pie chart to become smaller or larger depending on the value. + * @method externalRadiusPadding + * @memberof dc.pieChart + * @instance + * @param {Number} [externalRadiusPadding=0] + * @returns {Number|dc.pieChart} + */ + _chart.externalRadiusPadding = function (externalRadiusPadding) { + if (!arguments.length) { + return _externalRadiusPadding; + } + _externalRadiusPadding = externalRadiusPadding; + return _chart; + }; + + /** + * Get or set the inner radius of the pie chart. If the inner radius is greater than 0px then the + * pie chart will be rendered as a doughnut chart. + * @method innerRadius + * @memberof dc.pieChart + * @instance + * @param {Number} [innerRadius=0] + * @returns {Number|dc.pieChart} + */ + _chart.innerRadius = function (innerRadius) { + if (!arguments.length) { + return _innerRadius; + } + _innerRadius = innerRadius; + return _chart; + }; + + /** + * Get or set the outer radius. If the radius is not set, it will be half of the minimum of the + * chart width and height. + * @method radius + * @memberof dc.pieChart + * @instance + * @param {Number} [radius] + * @returns {Number|dc.pieChart} + */ + _chart.radius = function (radius) { + if (!arguments.length) { + return _givenRadius; + } + _givenRadius = radius; + return _chart; + }; + + /** + * Get or set center x coordinate position. Default is center of svg. + * @method cx + * @memberof dc.pieChart + * @instance + * @param {Number} [cx] + * @returns {Number|dc.pieChart} + */ + _chart.cx = function (cx) { + if (!arguments.length) { + return (_cx || _chart.width() / 2); + } + _cx = cx; + return _chart; + }; + + /** + * Get or set center y coordinate position. Default is center of svg. + * @method cy + * @memberof dc.pieChart + * @instance + * @param {Number} [cy] + * @returns {Number|dc.pieChart} + */ + _chart.cy = function (cy) { + if (!arguments.length) { + return (_cy || _chart.height() / 2); + } + _cy = cy; + return _chart; + }; + + function buildArcs () { + return d3.svg.arc() + .outerRadius(_radius - _externalRadiusPadding) + .innerRadius(_innerRadius); + } + + function isSelectedSlice (d) { + return _chart.hasFilter(_chart.cappedKeyAccessor(d.data)); + } + + _chart._doRedraw = function () { + drawChart(); + return _chart; + }; + + /** + * Get or set the minimal slice angle for label rendering. Any slice with a smaller angle will not + * display a slice label. + * @method minAngleForLabel + * @memberof dc.pieChart + * @instance + * @param {Number} [minAngleForLabel=0.5] + * @returns {Number|dc.pieChart} + */ + _chart.minAngleForLabel = function (minAngleForLabel) { + if (!arguments.length) { + return _minAngleForLabel; + } + _minAngleForLabel = minAngleForLabel; + return _chart; + }; + + function pieLayout () { + return d3.layout.pie().sort(null).value(_chart.cappedValueAccessor); + } + + function sliceTooSmall (d) { + var angle = (d.endAngle - d.startAngle); + return isNaN(angle) || angle < _minAngleForLabel; + } + + function sliceHasNoData (d) { + return _chart.cappedValueAccessor(d) === 0; + } + + function tweenPie (b) { + b.innerRadius = _innerRadius; + var current = this._current; + if (isOffCanvas(current)) { + current = {startAngle: 0, endAngle: 0}; + } else { + // only interpolate startAngle & endAngle, not the whole data object + current = {startAngle: current.startAngle, endAngle: current.endAngle}; + } + var i = d3.interpolate(current, b); + this._current = i(0); + return function (t) { + return safeArc(i(t), 0, buildArcs()); + }; + } + + function isOffCanvas (current) { + return !current || isNaN(current.startAngle) || isNaN(current.endAngle); + } + + function fill (d, i) { + return _chart.getColor(d.data, i); + } + + function onClick (d, i) { + if (_g.attr('class') !== _emptyCssClass) { + _chart.onClick(d.data, i); + } + } + + function safeArc (d, i, arc) { + var path = arc(d, i); + if (path.indexOf('NaN') >= 0) { + path = 'M0,0'; + } + return path; + } + + /** + * Title to use for the only slice when there is no data. + * @method emptyTitle + * @memberof dc.pieChart + * @instance + * @param {String} [title] + * @returns {String|dc.pieChart} + */ + _chart.emptyTitle = function (title) { + if (arguments.length === 0) { + return _emptyTitle; + } + _emptyTitle = title; + return _chart; + }; + + /** + * Position slice labels offset from the outer edge of the chart. + * + * The argument specifies the extra radius to be added for slice labels. + * @method externalLabels + * @memberof dc.pieChart + * @instance + * @param {Number} [externalLabelRadius] + * @returns {Number|dc.pieChart} + */ + _chart.externalLabels = function (externalLabelRadius) { + if (arguments.length === 0) { + return _externalLabelRadius; + } else if (externalLabelRadius) { + _externalLabelRadius = externalLabelRadius; + } else { + _externalLabelRadius = undefined; + } + + return _chart; + }; + + /** + * Get or set whether to draw lines from pie slices to their labels. + * + * @method drawPaths + * @memberof dc.pieChart + * @instance + * @param {Boolean} [drawPaths] + * @returns {Boolean|dc.pieChart} + */ + _chart.drawPaths = function (drawPaths) { + if (arguments.length === 0) { + return _drawPaths; + } + _drawPaths = drawPaths; + return _chart; + }; + + function labelPosition (d, arc) { + var centroid; + if (_externalLabelRadius) { + centroid = d3.svg.arc() + .outerRadius(_radius - _externalRadiusPadding + _externalLabelRadius) + .innerRadius(_radius - _externalRadiusPadding + _externalLabelRadius) + .centroid(d); + } else { + centroid = arc.centroid(d); + } + if (isNaN(centroid[0]) || isNaN(centroid[1])) { + return 'translate(0,0)'; + } else { + return 'translate(' + centroid + ')'; + } + } + + _chart.legendables = function () { + return _chart.data().map(function (d, i) { + var legendable = {name: d.key, data: d.value, others: d.others, chart: _chart}; + legendable.color = _chart.getColor(d, i); + return legendable; + }); + }; + + _chart.legendHighlight = function (d) { + highlightSliceFromLegendable(d, true); + }; + + _chart.legendReset = function (d) { + highlightSliceFromLegendable(d, false); + }; + + _chart.legendToggle = function (d) { + _chart.onClick({key: d.name, others: d.others}); + }; + + function highlightSliceFromLegendable (legendable, highlighted) { + _chart.selectAll('g.pie-slice').each(function (d) { + if (legendable.name === d.data.key) { + d3.select(this).classed('highlight', highlighted); + } + }); + } + + return _chart.anchor(parent, chartGroup); +}; + +/** + * Concrete bar chart/histogram implementation. + * + * Examples: + * - {@link http://dc-js.github.com/dc.js/ Nasdaq 100 Index} + * - {@link http://dc-js.github.com/dc.js/crime/index.html Canadian City Crime Stats} + * @class barChart + * @memberof dc + * @mixes dc.stackMixin + * @mixes dc.coordinateGridMixin + * @example + * // create a bar chart under #chart-container1 element using the default global chart group + * var chart1 = dc.barChart('#chart-container1'); + * // create a bar chart under #chart-container2 element using chart group A + * var chart2 = dc.barChart('#chart-container2', 'chartGroupA'); + * // create a sub-chart under a composite parent chart + * var chart3 = dc.barChart(compositeChart); + * @param {String|node|d3.selection|dc.compositeChart} parent - Any valid + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} + * specifying a dom block element such as a div; or a dom element or d3 selection. If the bar + * chart is a sub-chart in a {@link dc.compositeChart Composite Chart} then pass in the parent + * composite chart instance instead. + * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in. + * Interaction with a chart will only trigger events and redraws within the chart's group. + * @returns {dc.barChart} + */ +dc.barChart = function (parent, chartGroup) { + var MIN_BAR_WIDTH = 1; + var DEFAULT_GAP_BETWEEN_BARS = 2; + var LABEL_PADDING = 3; + + var _chart = dc.stackMixin(dc.coordinateGridMixin({})); + + var _gap = DEFAULT_GAP_BETWEEN_BARS; + var _centerBar = false; + var _alwaysUseRounding = false; + + var _barWidth; + + dc.override(_chart, 'rescale', function () { + _chart._rescale(); + _barWidth = undefined; + return _chart; + }); + + dc.override(_chart, 'render', function () { + if (_chart.round() && _centerBar && !_alwaysUseRounding) { + dc.logger.warn('By default, brush rounding is disabled if bars are centered. ' + + 'See dc.js bar chart API documentation for details.'); + } + + return _chart._render(); + }); + + _chart.label(function (d) { + return dc.utils.printSingleValue(d.y0 + d.y); + }, false); + + _chart.plotData = function () { + var layers = _chart.chartBodyG().selectAll('g.stack') + .data(_chart.data()); + + calculateBarWidth(); + + layers + .enter() + .append('g') + .attr('class', function (d, i) { + return 'stack ' + '_' + i; + }); + + var last = layers.size() - 1; + layers.each(function (d, i) { + var layer = d3.select(this); + + renderBars(layer, i, d); + + if (_chart.renderLabel() && last === i) { + renderLabels(layer, i, d); + } + }); + }; + + function barHeight (d) { + return dc.utils.safeNumber(Math.abs(_chart.y()(d.y + d.y0) - _chart.y()(d.y0))); + } + + function renderLabels (layer, layerIndex, d) { + var labels = layer.selectAll('text.barLabel') + .data(d.values, dc.pluck('x')); + + labels.enter() + .append('text') + .attr('class', 'barLabel') + .attr('text-anchor', 'middle'); + + if (_chart.isOrdinal()) { + labels.on('click', _chart.onClick); + labels.attr('cursor', 'pointer'); + } + + dc.transition(labels, _chart.transitionDuration(), _chart.transitionDelay()) + .attr('x', function (d) { + var x = _chart.x()(d.x); + if (!_centerBar) { + x += _barWidth / 2; + } + return dc.utils.safeNumber(x); + }) + .attr('y', function (d) { + var y = _chart.y()(d.y + d.y0); + + if (d.y < 0) { + y -= barHeight(d); + } + + return dc.utils.safeNumber(y - LABEL_PADDING); + }) + .text(function (d) { + return _chart.label()(d); + }); + + dc.transition(labels.exit(), _chart.transitionDuration(), _chart.transitionDelay()) + .attr('height', 0) + .remove(); + } + + function renderBars (layer, layerIndex, d) { + var bars = layer.selectAll('rect.bar') + .data(d.values, dc.pluck('x')); + + var enter = bars.enter() + .append('rect') + .attr('class', 'bar') + .attr('fill', dc.pluck('data', _chart.getColor)) + .attr('y', _chart.yAxisHeight()) + .attr('height', 0); + + if (_chart.renderTitle()) { + enter.append('title').text(dc.pluck('data', _chart.title(d.name))); + } + + if (_chart.isOrdinal()) { + bars.on('click', _chart.onClick); + } + + dc.transition(bars, _chart.transitionDuration(), _chart.transitionDelay()) + .attr('x', function (d) { + var x = _chart.x()(d.x); + if (_centerBar) { + x -= _barWidth / 2; + } + if (_chart.isOrdinal() && _gap !== undefined) { + x += _gap / 2; + } + return dc.utils.safeNumber(x); + }) + .attr('y', function (d) { + var y = _chart.y()(d.y + d.y0); + + if (d.y < 0) { + y -= barHeight(d); + } + + return dc.utils.safeNumber(y); + }) + .attr('width', _barWidth) + .attr('height', function (d) { + return barHeight(d); + }) + .attr('fill', dc.pluck('data', _chart.getColor)) + .select('title').text(dc.pluck('data', _chart.title(d.name))); + + dc.transition(bars.exit(), _chart.transitionDuration(), _chart.transitionDelay()) + .attr('x', function (d) { return _chart.x()(d.x); }) + .attr('width', _barWidth * 0.9) + .remove(); + } + + function calculateBarWidth () { + if (_barWidth === undefined) { + var numberOfBars = _chart.xUnitCount(); + + // please can't we always use rangeBands for bar charts? + if (_chart.isOrdinal() && _gap === undefined) { + _barWidth = Math.floor(_chart.x().rangeBand()); + } else if (_gap) { + _barWidth = Math.floor((_chart.xAxisLength() - (numberOfBars - 1) * _gap) / numberOfBars); + } else { + _barWidth = Math.floor(_chart.xAxisLength() / (1 + _chart.barPadding()) / numberOfBars); + } + + if (_barWidth === Infinity || isNaN(_barWidth) || _barWidth < MIN_BAR_WIDTH) { + _barWidth = MIN_BAR_WIDTH; + } + } + } + + _chart.fadeDeselectedArea = function () { + var bars = _chart.chartBodyG().selectAll('rect.bar'); + var extent = _chart.brush().extent(); + + if (_chart.isOrdinal()) { + if (_chart.hasFilter()) { + bars.classed(dc.constants.SELECTED_CLASS, function (d) { + return _chart.hasFilter(d.x); + }); + bars.classed(dc.constants.DESELECTED_CLASS, function (d) { + return !_chart.hasFilter(d.x); + }); + } else { + bars.classed(dc.constants.SELECTED_CLASS, false); + bars.classed(dc.constants.DESELECTED_CLASS, false); + } + } else { + if (!_chart.brushIsEmpty(extent)) { + var start = extent[0]; + var end = extent[1]; + + bars.classed(dc.constants.DESELECTED_CLASS, function (d) { + return d.x < start || d.x >= end; + }); + } else { + bars.classed(dc.constants.DESELECTED_CLASS, false); + } + } + }; + + /** + * Whether the bar chart will render each bar centered around the data position on the x-axis. + * @method centerBar + * @memberof dc.barChart + * @instance + * @param {Boolean} [centerBar=false] + * @returns {Boolean|dc.barChart} + */ + _chart.centerBar = function (centerBar) { + if (!arguments.length) { + return _centerBar; + } + _centerBar = centerBar; + return _chart; + }; + + dc.override(_chart, 'onClick', function (d) { + _chart._onClick(d.data); + }); + + /** + * Get or set the spacing between bars as a fraction of bar size. Valid values are between 0-1. + * Setting this value will also remove any previously set {@link dc.barChart#gap gap}. See the + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Ordinal-Scales.md#ordinal_rangeBands d3 docs} + * for a visual description of how the padding is applied. + * @method barPadding + * @memberof dc.barChart + * @instance + * @param {Number} [barPadding=0] + * @returns {Number|dc.barChart} + */ + _chart.barPadding = function (barPadding) { + if (!arguments.length) { + return _chart._rangeBandPadding(); + } + _chart._rangeBandPadding(barPadding); + _gap = undefined; + return _chart; + }; + + _chart._useOuterPadding = function () { + return _gap === undefined; + }; + + /** + * Get or set the outer padding on an ordinal bar chart. This setting has no effect on non-ordinal charts. + * Will pad the width by `padding * barWidth` on each side of the chart. + * @method outerPadding + * @memberof dc.barChart + * @instance + * @param {Number} [padding=0.5] + * @returns {Number|dc.barChart} + */ + _chart.outerPadding = _chart._outerRangeBandPadding; + + /** + * Manually set fixed gap (in px) between bars instead of relying on the default auto-generated + * gap. By default the bar chart implementation will calculate and set the gap automatically + * based on the number of data points and the length of the x axis. + * @method gap + * @memberof dc.barChart + * @instance + * @param {Number} [gap=2] + * @returns {Number|dc.barChart} + */ + _chart.gap = function (gap) { + if (!arguments.length) { + return _gap; + } + _gap = gap; + return _chart; + }; + + _chart.extendBrush = function () { + var extent = _chart.brush().extent(); + if (_chart.round() && (!_centerBar || _alwaysUseRounding)) { + extent[0] = extent.map(_chart.round())[0]; + extent[1] = extent.map(_chart.round())[1]; + + _chart.chartBodyG().select('.brush') + .call(_chart.brush().extent(extent)); + } + + return extent; + }; + + /** + * Set or get whether rounding is enabled when bars are centered. If false, using + * rounding with centered bars will result in a warning and rounding will be ignored. This flag + * has no effect if bars are not {@link dc.barChart#centerBar centered}. + * When using standard d3.js rounding methods, the brush often doesn't align correctly with + * centered bars since the bars are offset. The rounding function must add an offset to + * compensate, such as in the following example. + * @method alwaysUseRounding + * @memberof dc.barChart + * @instance + * @example + * chart.round(function(n) { return Math.floor(n) + 0.5; }); + * @param {Boolean} [alwaysUseRounding=false] + * @returns {Boolean|dc.barChart} + */ + _chart.alwaysUseRounding = function (alwaysUseRounding) { + if (!arguments.length) { + return _alwaysUseRounding; + } + _alwaysUseRounding = alwaysUseRounding; + return _chart; + }; + + function colorFilter (color, inv) { + return function () { + var item = d3.select(this); + var match = item.attr('fill') === color; + return inv ? !match : match; + }; + } + + _chart.legendHighlight = function (d) { + if (!_chart.isLegendableHidden(d)) { + _chart.g().selectAll('rect.bar') + .classed('highlight', colorFilter(d.color)) + .classed('fadeout', colorFilter(d.color, true)); + } + }; + + _chart.legendReset = function () { + _chart.g().selectAll('rect.bar') + .classed('highlight', false) + .classed('fadeout', false); + }; + + dc.override(_chart, 'xAxisMax', function () { + var max = this._xAxisMax(); + if ('resolution' in _chart.xUnits()) { + var res = _chart.xUnits().resolution; + max += res; + } + return max; + }); + + return _chart.anchor(parent, chartGroup); +}; + +/** + * Concrete line/area chart implementation. + * + * Examples: + * - {@link http://dc-js.github.com/dc.js/ Nasdaq 100 Index} + * - {@link http://dc-js.github.com/dc.js/crime/index.html Canadian City Crime Stats} + * @class lineChart + * @memberof dc + * @mixes dc.stackMixin + * @mixes dc.coordinateGridMixin + * @example + * // create a line chart under #chart-container1 element using the default global chart group + * var chart1 = dc.lineChart('#chart-container1'); + * // create a line chart under #chart-container2 element using chart group A + * var chart2 = dc.lineChart('#chart-container2', 'chartGroupA'); + * // create a sub-chart under a composite parent chart + * var chart3 = dc.lineChart(compositeChart); + * @param {String|node|d3.selection|dc.compositeChart} parent - Any valid + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} + * specifying a dom block element such as a div; or a dom element or d3 selection. If the line + * chart is a sub-chart in a {@link dc.compositeChart Composite Chart} then pass in the parent + * composite chart instance instead. + * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in. + * Interaction with a chart will only trigger events and redraws within the chart's group. + * @returns {dc.lineChart} + */ +dc.lineChart = function (parent, chartGroup) { + var DEFAULT_DOT_RADIUS = 5; + var TOOLTIP_G_CLASS = 'dc-tooltip'; + var DOT_CIRCLE_CLASS = 'dot'; + var Y_AXIS_REF_LINE_CLASS = 'yRef'; + var X_AXIS_REF_LINE_CLASS = 'xRef'; + var DEFAULT_DOT_OPACITY = 1e-6; + var LABEL_PADDING = 3; + + var _chart = dc.stackMixin(dc.coordinateGridMixin({})); + var _renderArea = false; + var _dotRadius = DEFAULT_DOT_RADIUS; + var _dataPointRadius = null; + var _dataPointFillOpacity = DEFAULT_DOT_OPACITY; + var _dataPointStrokeOpacity = DEFAULT_DOT_OPACITY; + var _interpolate = 'linear'; + var _tension = 0.7; + var _defined; + var _dashStyle; + var _xyTipsOn = true; + + _chart.transitionDuration(500); + _chart.transitionDelay(0); + _chart._rangeBandPadding(1); + + _chart.plotData = function () { + var chartBody = _chart.chartBodyG(); + var layersList = chartBody.select('g.stack-list'); + + if (layersList.empty()) { + layersList = chartBody.append('g').attr('class', 'stack-list'); + } + + var layers = layersList.selectAll('g.stack').data(_chart.data()); + + var layersEnter = layers + .enter() + .append('g') + .attr('class', function (d, i) { + return 'stack ' + '_' + i; + }); + + drawLine(layersEnter, layers); + + drawArea(layersEnter, layers); + + drawDots(chartBody, layers); + + if (_chart.renderLabel()) { + drawLabels(layers); + } + }; + + /** + * Gets or sets the interpolator to use for lines drawn, by string name, allowing e.g. step + * functions, splines, and cubic interpolation. This is passed to + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#line_interpolate d3.svg.line.interpolate} and + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#area_interpolate d3.svg.area.interpolate}, + * where you can find a complete list of valid arguments. + * @method interpolate + * @memberof dc.lineChart + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#line_interpolate d3.svg.line.interpolate} + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#area_interpolate d3.svg.area.interpolate} + * @param {String} [interpolate='linear'] + * @returns {String|dc.lineChart} + */ + _chart.interpolate = function (interpolate) { + if (!arguments.length) { + return _interpolate; + } + _interpolate = interpolate; + return _chart; + }; + + /** + * Gets or sets the tension to use for lines drawn, in the range 0 to 1. + * This parameter further customizes the interpolation behavior. It is passed to + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#line_tension d3.svg.line.tension} and + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#area_tension d3.svg.area.tension}. + * @method tension + * @memberof dc.lineChart + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#line_interpolate d3.svg.line.interpolate} + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#area_interpolate d3.svg.area.interpolate} + * @param {Number} [tension=0.7] + * @returns {Number|dc.lineChart} + */ + _chart.tension = function (tension) { + if (!arguments.length) { + return _tension; + } + _tension = tension; + return _chart; + }; + + /** + * Gets or sets a function that will determine discontinuities in the line which should be + * skipped: the path will be broken into separate subpaths if some points are undefined. + * This function is passed to + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#line_defined d3.svg.line.defined} + * + * Note: crossfilter will sometimes coerce nulls to 0, so you may need to carefully write + * custom reduce functions to get this to work, depending on your data. See + * {@link https://github.com/dc-js/dc.js/issues/615#issuecomment-49089248 this GitHub comment} + * for more details and an example. + * @method defined + * @memberof dc.lineChart + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#line_defined d3.svg.line.defined} + * @param {Function} [defined] + * @returns {Function|dc.lineChart} + */ + _chart.defined = function (defined) { + if (!arguments.length) { + return _defined; + } + _defined = defined; + return _chart; + }; + + /** + * Set the line's d3 dashstyle. This value becomes the 'stroke-dasharray' of line. Defaults to empty + * array (solid line). + * @method dashStyle + * @memberof dc.lineChart + * @instance + * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray stroke-dasharray} + * @example + * // create a Dash Dot Dot Dot + * chart.dashStyle([3,1,1,1]); + * @param {Array<Number>} [dashStyle=[]] + * @returns {Array<Number>|dc.lineChart} + */ + _chart.dashStyle = function (dashStyle) { + if (!arguments.length) { + return _dashStyle; + } + _dashStyle = dashStyle; + return _chart; + }; + + /** + * Get or set render area flag. If the flag is set to true then the chart will render the area + * beneath each line and the line chart effectively becomes an area chart. + * @method renderArea + * @memberof dc.lineChart + * @instance + * @param {Boolean} [renderArea=false] + * @returns {Boolean|dc.lineChart} + */ + _chart.renderArea = function (renderArea) { + if (!arguments.length) { + return _renderArea; + } + _renderArea = renderArea; + return _chart; + }; + + function colors (d, i) { + return _chart.getColor.call(d, d.values, i); + } + + function drawLine (layersEnter, layers) { + var line = d3.svg.line() + .x(function (d) { + return _chart.x()(d.x); + }) + .y(function (d) { + return _chart.y()(d.y + d.y0); + }) + .interpolate(_interpolate) + .tension(_tension); + if (_defined) { + line.defined(_defined); + } + + var path = layersEnter.append('path') + .attr('class', 'line') + .attr('stroke', colors); + if (_dashStyle) { + path.attr('stroke-dasharray', _dashStyle); + } + + dc.transition(layers.select('path.line'), _chart.transitionDuration(), _chart.transitionDelay()) + //.ease('linear') + .attr('stroke', colors) + .attr('d', function (d) { + return safeD(line(d.values)); + }); + } + + function drawArea (layersEnter, layers) { + if (_renderArea) { + var area = d3.svg.area() + .x(function (d) { + return _chart.x()(d.x); + }) + .y(function (d) { + return _chart.y()(d.y + d.y0); + }) + .y0(function (d) { + return _chart.y()(d.y0); + }) + .interpolate(_interpolate) + .tension(_tension); + if (_defined) { + area.defined(_defined); + } + + layersEnter.append('path') + .attr('class', 'area') + .attr('fill', colors) + .attr('d', function (d) { + return safeD(area(d.values)); + }); + + dc.transition(layers.select('path.area'), _chart.transitionDuration(), _chart.transitionDelay()) + //.ease('linear') + .attr('fill', colors) + .attr('d', function (d) { + return safeD(area(d.values)); + }); + } + } + + function safeD (d) { + return (!d || d.indexOf('NaN') >= 0) ? 'M0,0' : d; + } + + function drawDots (chartBody, layers) { + if (_chart.xyTipsOn() === 'always' || (!_chart.brushOn() && _chart.xyTipsOn())) { + var tooltipListClass = TOOLTIP_G_CLASS + '-list'; + var tooltips = chartBody.select('g.' + tooltipListClass); + + if (tooltips.empty()) { + tooltips = chartBody.append('g').attr('class', tooltipListClass); + } + + layers.each(function (d, layerIndex) { + var points = d.values; + if (_defined) { + points = points.filter(_defined); + } + + var g = tooltips.select('g.' + TOOLTIP_G_CLASS + '._' + layerIndex); + if (g.empty()) { + g = tooltips.append('g').attr('class', TOOLTIP_G_CLASS + ' _' + layerIndex); + } + + createRefLines(g); + + var dots = g.selectAll('circle.' + DOT_CIRCLE_CLASS) + .data(points, dc.pluck('x')); + + dots.enter() + .append('circle') + .attr('class', DOT_CIRCLE_CLASS) + .attr('r', getDotRadius()) + .style('fill-opacity', _dataPointFillOpacity) + .style('stroke-opacity', _dataPointStrokeOpacity) + .attr('fill', _chart.getColor) + .on('mousemove', function () { + var dot = d3.select(this); + showDot(dot); + showRefLines(dot, g); + }) + .on('mouseout', function () { + var dot = d3.select(this); + hideDot(dot); + hideRefLines(g); + }); + + dots.call(renderTitle, d); + + dc.transition(dots, _chart.transitionDuration()) + .attr('cx', function (d) { + return dc.utils.safeNumber(_chart.x()(d.x)); + }) + .attr('cy', function (d) { + return dc.utils.safeNumber(_chart.y()(d.y + d.y0)); + }) + .attr('fill', _chart.getColor); + + dots.exit().remove(); + }); + } + } + + _chart.label(function (d) { + return dc.utils.printSingleValue(d.y0 + d.y); + }, false); + + function drawLabels (layers) { + layers.each(function (d, layerIndex) { + var layer = d3.select(this); + var labels = layer.selectAll('text.lineLabel') + .data(d.values, dc.pluck('x')); + + labels.enter() + .append('text') + .attr('class', 'lineLabel') + .attr('text-anchor', 'middle'); + + dc.transition(labels, _chart.transitionDuration()) + .attr('x', function (d) { + return dc.utils.safeNumber(_chart.x()(d.x)); + }) + .attr('y', function (d) { + var y = _chart.y()(d.y + d.y0) - LABEL_PADDING; + return dc.utils.safeNumber(y); + }) + .text(function (d) { + return _chart.label()(d); + }); + + dc.transition(labels.exit(), _chart.transitionDuration()) + .attr('height', 0) + .remove(); + }); + } + + function createRefLines (g) { + var yRefLine = g.select('path.' + Y_AXIS_REF_LINE_CLASS).empty() ? + g.append('path').attr('class', Y_AXIS_REF_LINE_CLASS) : g.select('path.' + Y_AXIS_REF_LINE_CLASS); + yRefLine.style('display', 'none').attr('stroke-dasharray', '5,5'); + + var xRefLine = g.select('path.' + X_AXIS_REF_LINE_CLASS).empty() ? + g.append('path').attr('class', X_AXIS_REF_LINE_CLASS) : g.select('path.' + X_AXIS_REF_LINE_CLASS); + xRefLine.style('display', 'none').attr('stroke-dasharray', '5,5'); + } + + function showDot (dot) { + dot.style('fill-opacity', 0.8); + dot.style('stroke-opacity', 0.8); + dot.attr('r', _dotRadius); + return dot; + } + + function showRefLines (dot, g) { + var x = dot.attr('cx'); + var y = dot.attr('cy'); + var yAxisX = (_chart._yAxisX() - _chart.margins().left); + var yAxisRefPathD = 'M' + yAxisX + ' ' + y + 'L' + (x) + ' ' + (y); + var xAxisRefPathD = 'M' + x + ' ' + _chart.yAxisHeight() + 'L' + x + ' ' + y; + g.select('path.' + Y_AXIS_REF_LINE_CLASS).style('display', '').attr('d', yAxisRefPathD); + g.select('path.' + X_AXIS_REF_LINE_CLASS).style('display', '').attr('d', xAxisRefPathD); + } + + function getDotRadius () { + return _dataPointRadius || _dotRadius; + } + + function hideDot (dot) { + dot.style('fill-opacity', _dataPointFillOpacity) + .style('stroke-opacity', _dataPointStrokeOpacity) + .attr('r', getDotRadius()); + } + + function hideRefLines (g) { + g.select('path.' + Y_AXIS_REF_LINE_CLASS).style('display', 'none'); + g.select('path.' + X_AXIS_REF_LINE_CLASS).style('display', 'none'); + } + + function renderTitle (dot, d) { + if (_chart.renderTitle()) { + dot.select('title').remove(); + dot.append('title').text(dc.pluck('data', _chart.title(d.name))); + } + } + + /** + * Turn on/off the mouseover behavior of an individual data point which renders a circle and x/y axis + * dashed lines back to each respective axis. This is ignored if the chart + * {@link dc.coordinateGridMixin#brushOn brush} is on + * @method xyTipsOn + * @memberof dc.lineChart + * @instance + * @param {Boolean} [xyTipsOn=false] + * @returns {Boolean|dc.lineChart} + */ + _chart.xyTipsOn = function (xyTipsOn) { + if (!arguments.length) { + return _xyTipsOn; + } + _xyTipsOn = xyTipsOn; + return _chart; + }; + + /** + * Get or set the radius (in px) for dots displayed on the data points. + * @method dotRadius + * @memberof dc.lineChart + * @instance + * @param {Number} [dotRadius=5] + * @returns {Number|dc.lineChart} + */ + _chart.dotRadius = function (dotRadius) { + if (!arguments.length) { + return _dotRadius; + } + _dotRadius = dotRadius; + return _chart; + }; + + /** + * Always show individual dots for each datapoint. + * + * If `options` is falsy, it disables data point rendering. If no `options` are provided, the + * current `options` values are instead returned. + * @method renderDataPoints + * @memberof dc.lineChart + * @instance + * @example + * chart.renderDataPoints({radius: 2, fillOpacity: 0.8, strokeOpacity: 0.8}) + * @param {{fillOpacity: Number, strokeOpacity: Number, radius: Number}} [options={fillOpacity: 0.8, strokeOpacity: 0.8, radius: 2}] + * @returns {{fillOpacity: Number, strokeOpacity: Number, radius: Number}|dc.lineChart} + */ + _chart.renderDataPoints = function (options) { + if (!arguments.length) { + return { + fillOpacity: _dataPointFillOpacity, + strokeOpacity: _dataPointStrokeOpacity, + radius: _dataPointRadius + }; + } else if (!options) { + _dataPointFillOpacity = DEFAULT_DOT_OPACITY; + _dataPointStrokeOpacity = DEFAULT_DOT_OPACITY; + _dataPointRadius = null; + } else { + _dataPointFillOpacity = options.fillOpacity || 0.8; + _dataPointStrokeOpacity = options.strokeOpacity || 0.8; + _dataPointRadius = options.radius || 2; + } + return _chart; + }; + + function colorFilter (color, dashstyle, inv) { + return function () { + var item = d3.select(this); + var match = (item.attr('stroke') === color && + item.attr('stroke-dasharray') === ((dashstyle instanceof Array) ? + dashstyle.join(',') : null)) || item.attr('fill') === color; + return inv ? !match : match; + }; + } + + _chart.legendHighlight = function (d) { + if (!_chart.isLegendableHidden(d)) { + _chart.g().selectAll('path.line, path.area') + .classed('highlight', colorFilter(d.color, d.dashstyle)) + .classed('fadeout', colorFilter(d.color, d.dashstyle, true)); + } + }; + + _chart.legendReset = function () { + _chart.g().selectAll('path.line, path.area') + .classed('highlight', false) + .classed('fadeout', false); + }; + + dc.override(_chart, 'legendables', function () { + var legendables = _chart._legendables(); + if (!_dashStyle) { + return legendables; + } + return legendables.map(function (l) { + l.dashstyle = _dashStyle; + return l; + }); + }); + + return _chart.anchor(parent, chartGroup); +}; + +/** + * The data count widget is a simple widget designed to display the number of records selected by the + * current filters out of the total number of records in the data set. Once created the data count widget + * will automatically update the text content of child elements with the following classes: + * + * * `.total-count` - total number of records + * * `.filter-count` - number of records matched by the current filters + * + * Note: this widget works best for the specific case of showing the number of records out of a + * total. If you want a more general-purpose numeric display, please use the + * {@link dc.numberDisplay} widget instead. + * + * Examples: + * - {@link http://dc-js.github.com/dc.js/ Nasdaq 100 Index} + * @class dataCount + * @memberof dc + * @mixes dc.baseMixin + * @example + * var ndx = crossfilter(data); + * var all = ndx.groupAll(); + * + * dc.dataCount('.dc-data-count') + * .dimension(ndx) + * .group(all); + * @param {String|node|d3.selection} parent - Any valid + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying + * a dom block element such as a div; or a dom element or d3 selection. + * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in. + * Interaction with a chart will only trigger events and redraws within the chart's group. + * @returns {dc.dataCount} + */ +dc.dataCount = function (parent, chartGroup) { + var _formatNumber = d3.format(',d'); + var _chart = dc.baseMixin({}); + var _html = {some: '', all: ''}; + + /** + * Gets or sets an optional object specifying HTML templates to use depending how many items are + * selected. The text `%total-count` will replaced with the total number of records, and the text + * `%filter-count` will be replaced with the number of selected records. + * - all: HTML template to use if all items are selected + * - some: HTML template to use if not all items are selected + * @method html + * @memberof dc.dataCount + * @instance + * @example + * counter.html({ + * some: '%filter-count out of %total-count records selected', + * all: 'All records selected. Click on charts to apply filters' + * }) + * @param {{some:String, all: String}} [options] + * @returns {{some:String, all: String}|dc.dataCount} + */ + _chart.html = function (options) { + if (!arguments.length) { + return _html; + } + if (options.all) { + _html.all = options.all; + } + if (options.some) { + _html.some = options.some; + } + return _chart; + }; + + /** + * Gets or sets an optional function to format the filter count and total count. + * @method formatNumber + * @memberof dc.dataCount + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md d3.format} + * @example + * counter.formatNumber(d3.format('.2g')) + * @param {Function} [formatter=d3.format('.2g')] + * @returns {Function|dc.dataCount} + */ + _chart.formatNumber = function (formatter) { + if (!arguments.length) { + return _formatNumber; + } + _formatNumber = formatter; + return _chart; + }; + + _chart._doRender = function () { + var tot = _chart.dimension().size(), + val = _chart.group().value(); + var all = _formatNumber(tot); + var selected = _formatNumber(val); + + if ((tot === val) && (_html.all !== '')) { + _chart.root().html(_html.all.replace('%total-count', all).replace('%filter-count', selected)); + } else if (_html.some !== '') { + _chart.root().html(_html.some.replace('%total-count', all).replace('%filter-count', selected)); + } else { + _chart.selectAll('.total-count').text(all); + _chart.selectAll('.filter-count').text(selected); + } + return _chart; + }; + + _chart._doRedraw = function () { + return _chart._doRender(); + }; + + return _chart.anchor(parent, chartGroup); +}; + +/** + * The data table is a simple widget designed to list crossfilter focused data set (rows being + * filtered) in a good old tabular fashion. + * + * Note: Unlike other charts, the data table (and data grid chart) use the {@link dc.dataTable#group group} attribute as a + * keying function for {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Arrays.md#nest nesting} the data + * together in groups. Do not pass in a crossfilter group as this will not work. + * + * Another interesting feature of the data table is that you can pass a crossfilter group to the `dimension`, as + * long as you specify the {@link dc.dataTable#order order} as `d3.descending`, since the data + * table will use `dimension.top()` to fetch the data in that case, and the method is equally + * supported on the crossfilter group as the crossfilter dimension. + * + * Examples: + * - {@link http://dc-js.github.com/dc.js/ Nasdaq 100 Index} + * - {@link http://dc-js.github.io/dc.js/examples/table-on-aggregated-data.html dataTable on a crossfilter group} + * ({@link https://github.com/dc-js/dc.js/blob/develop/web/examples/table-on-aggregated-data.html source}) + * @class dataTable + * @memberof dc + * @mixes dc.baseMixin + * @param {String|node|d3.selection} parent - Any valid + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying + * a dom block element such as a div; or a dom element or d3 selection. + * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in. + * Interaction with a chart will only trigger events and redraws within the chart's group. + * @returns {dc.dataTable} + */ +dc.dataTable = function (parent, chartGroup) { + var LABEL_CSS_CLASS = 'dc-table-label'; + var ROW_CSS_CLASS = 'dc-table-row'; + var COLUMN_CSS_CLASS = 'dc-table-column'; + var GROUP_CSS_CLASS = 'dc-table-group'; + var HEAD_CSS_CLASS = 'dc-table-head'; + + var _chart = dc.baseMixin({}); + + var _size = 25; + var _columns = []; + var _sortBy = function (d) { + return d; + }; + var _order = d3.ascending; + var _beginSlice = 0; + var _endSlice; + var _showGroups = true; + + _chart._doRender = function () { + _chart.selectAll('tbody').remove(); + + renderRows(renderGroups()); + + return _chart; + }; + + _chart._doColumnValueFormat = function (v, d) { + return ((typeof v === 'function') ? + v(d) : // v as function + ((typeof v === 'string') ? + d[v] : // v is field name string + v.format(d) // v is Object, use fn (element 2) + ) + ); + }; + + _chart._doColumnHeaderFormat = function (d) { + // if 'function', convert to string representation + // show a string capitalized + // if an object then display its label string as-is. + return (typeof d === 'function') ? + _chart._doColumnHeaderFnToString(d) : + ((typeof d === 'string') ? + _chart._doColumnHeaderCapitalize(d) : String(d.label)); + }; + + _chart._doColumnHeaderCapitalize = function (s) { + // capitalize + return s.charAt(0).toUpperCase() + s.slice(1); + }; + + _chart._doColumnHeaderFnToString = function (f) { + // columnString(f) { + var s = String(f); + var i1 = s.indexOf('return '); + if (i1 >= 0) { + var i2 = s.lastIndexOf(';'); + if (i2 >= 0) { + s = s.substring(i1 + 7, i2); + var i3 = s.indexOf('numberFormat'); + if (i3 >= 0) { + s = s.replace('numberFormat', ''); + } + } + } + return s; + }; + + function renderGroups () { + // The 'original' example uses all 'functions'. + // If all 'functions' are used, then don't remove/add a header, and leave + // the html alone. This preserves the functionality of earlier releases. + // A 2nd option is a string representing a field in the data. + // A third option is to supply an Object such as an array of 'information', and + // supply your own _doColumnHeaderFormat and _doColumnValueFormat functions to + // create what you need. + var bAllFunctions = true; + _columns.forEach(function (f) { + bAllFunctions = bAllFunctions & (typeof f === 'function'); + }); + + if (!bAllFunctions) { + // ensure one thead + var thead = _chart.selectAll('thead').data([0]); + thead.enter().append('thead'); + thead.exit().remove(); + + // with one tr + var headrow = thead.selectAll('tr').data([0]); + headrow.enter().append('tr'); + headrow.exit().remove(); + + // with a th for each column + var headcols = headrow.selectAll('th') + .data(_columns); + headcols.enter().append('th'); + headcols.exit().remove(); + + headcols + .attr('class', HEAD_CSS_CLASS) + .html(function (d) { + return (_chart._doColumnHeaderFormat(d)); + + }); + } + + var groups = _chart.root().selectAll('tbody') + .data(nestEntries(), function (d) { + return _chart.keyAccessor()(d); + }); + + var rowGroup = groups + .enter() + .append('tbody'); + + if (_showGroups === true) { + rowGroup + .append('tr') + .attr('class', GROUP_CSS_CLASS) + .append('td') + .attr('class', LABEL_CSS_CLASS) + .attr('colspan', _columns.length) + .html(function (d) { + return _chart.keyAccessor()(d); + }); + } + + groups.exit().remove(); + + return rowGroup; + } + + function nestEntries () { + var entries; + if (_order === d3.ascending) { + entries = _chart.dimension().bottom(_size); + } else { + entries = _chart.dimension().top(_size); + } + + return d3.nest() + .key(_chart.group()) + .sortKeys(_order) + .entries(entries.sort(function (a, b) { + return _order(_sortBy(a), _sortBy(b)); + }).slice(_beginSlice, _endSlice)); + } + + function renderRows (groups) { + var rows = groups.order() + .selectAll('tr.' + ROW_CSS_CLASS) + .data(function (d) { + return d.values; + }); + + var rowEnter = rows.enter() + .append('tr') + .attr('class', ROW_CSS_CLASS); + + _columns.forEach(function (v, i) { + rowEnter.append('td') + .attr('class', COLUMN_CSS_CLASS + ' _' + i) + .html(function (d) { + return _chart._doColumnValueFormat(v, d); + }); + }); + + rows.exit().remove(); + + return rows; + } + + _chart._doRedraw = function () { + return _chart._doRender(); + }; + + /** + * Get or set the group function for the data table. The group function takes a data row and + * returns the key to specify to {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Arrays.md#d3_nest d3.nest} + * to split rows into groups. + * + * Do not pass in a crossfilter group as this will not work. + * @method group + * @memberof dc.dataTable + * @instance + * @example + * // group rows by the value of their field + * chart + * .group(function(d) { return d.field; }) + * @param {Function} groupFunction Function taking a row of data and returning the nest key. + * @returns {Function|dc.dataTable} + */ + + /** + * Get or set the table size which determines the number of rows displayed by the widget. + * @method size + * @memberof dc.dataTable + * @instance + * @param {Number} [size=25] + * @returns {Number|dc.dataTable} + */ + _chart.size = function (size) { + if (!arguments.length) { + return _size; + } + _size = size; + return _chart; + }; + + /** + * Get or set the index of the beginning slice which determines which entries get displayed + * by the widget. Useful when implementing pagination. + * + * Note: the sortBy function will determine how the rows are ordered for pagination purposes. + + * See the {@link http://dc-js.github.io/dc.js/examples/table-pagination.html table pagination example} + * to see how to implement the pagination user interface using `beginSlice` and `endSlice`. + * @method beginSlice + * @memberof dc.dataTable + * @instance + * @param {Number} [beginSlice=0] + * @returns {Number|dc.dataTable} + */ + _chart.beginSlice = function (beginSlice) { + if (!arguments.length) { + return _beginSlice; + } + _beginSlice = beginSlice; + return _chart; + }; + + /** + * Get or set the index of the end slice which determines which entries get displayed by the + * widget. Useful when implementing pagination. See {@link dc.dataTable#beginSlice `beginSlice`} for more information. + * @method endSlice + * @memberof dc.dataTable + * @instance + * @param {Number|undefined} [endSlice=undefined] + * @returns {Number|dc.dataTable} + */ + _chart.endSlice = function (endSlice) { + if (!arguments.length) { + return _endSlice; + } + _endSlice = endSlice; + return _chart; + }; + + /** + * Get or set column functions. The data table widget supports several methods of specifying the + * columns to display. + * + * The original method uses an array of functions to generate dynamic columns. Column functions + * are simple javascript functions with only one input argument `d` which represents a row in + * the data set. The return value of these functions will be used to generate the content for + * each cell. However, this method requires the HTML for the table to have a fixed set of column + * headers. + * + * <pre><code>chart.columns([ + * function(d) { return d.date; }, + * function(d) { return d.open; }, + * function(d) { return d.close; }, + * function(d) { return numberFormat(d.close - d.open); }, + * function(d) { return d.volume; } + * ]); + * </code></pre> + * + * In the second method, you can list the columns to read from the data without specifying it as + * a function, except where necessary (ie, computed columns). Note the data element name is + * capitalized when displayed in the table header. You can also mix in functions as necessary, + * using the third `{label, format}` form, as shown below. + * + * <pre><code>chart.columns([ + * "date", // d["date"], ie, a field accessor; capitalized automatically + * "open", // ... + * "close", // ... + * { + * label: "Change", + * format: function (d) { + * return numberFormat(d.close - d.open); + * } + * }, + * "volume" // d["volume"], ie, a field accessor; capitalized automatically + * ]); + * </code></pre> + * + * In the third example, we specify all fields using the `{label, format}` method: + * <pre><code>chart.columns([ + * { + * label: "Date", + * format: function (d) { return d.date; } + * }, + * { + * label: "Open", + * format: function (d) { return numberFormat(d.open); } + * }, + * { + * label: "Close", + * format: function (d) { return numberFormat(d.close); } + * }, + * { + * label: "Change", + * format: function (d) { return numberFormat(d.close - d.open); } + * }, + * { + * label: "Volume", + * format: function (d) { return d.volume; } + * } + * ]); + * </code></pre> + * + * You may wish to override the dataTable functions `_doColumnHeaderCapitalize` and + * `_doColumnHeaderFnToString`, which are used internally to translate the column information or + * function into a displayed header. The first one is used on the "string" column specifier; the + * second is used to transform a stringified function into something displayable. For the Stock + * example, the function for Change becomes the table header **d.close - d.open**. + * + * Finally, you can even specify a completely different form of column definition. To do this, + * override `_chart._doColumnHeaderFormat` and `_chart._doColumnValueFormat` Be aware that + * fields without numberFormat specification will be displayed just as they are stored in the + * data, unformatted. + * @method columns + * @memberof dc.dataTable + * @instance + * @param {Array<Function>} [columns=[]] + * @returns {Array<Function>}|dc.dataTable} + */ + _chart.columns = function (columns) { + if (!arguments.length) { + return _columns; + } + _columns = columns; + return _chart; + }; + + /** + * Get or set sort-by function. This function works as a value accessor at row level and returns a + * particular field to be sorted by. + * @method sortBy + * @memberof dc.dataTable + * @instance + * @example + * chart.sortBy(function(d) { + * return d.date; + * }); + * @param {Function} [sortBy=identity function] + * @returns {Function|dc.dataTable} + */ + _chart.sortBy = function (sortBy) { + if (!arguments.length) { + return _sortBy; + } + _sortBy = sortBy; + return _chart; + }; + + /** + * Get or set sort order. If the order is `d3.ascending`, the data table will use + * `dimension().bottom()` to fetch the data; otherwise it will use `dimension().top()` + * @method order + * @memberof dc.dataTable + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Arrays.md#d3_ascending d3.ascending} + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Arrays.md#d3_descending d3.descending} + * @example + * chart.order(d3.descending); + * @param {Function} [order=d3.ascending] + * @returns {Function|dc.dataTable} + */ + _chart.order = function (order) { + if (!arguments.length) { + return _order; + } + _order = order; + return _chart; + }; + + /** + * Get or set if group rows will be shown. The dataTable {@link dc.dataTable#group group} + * function must be specified even if groups are not shown. + * @method showGroups + * @memberof dc.dataTable + * @instance + * @example + * chart + * .group([value], [name]) + * .showGroups(true|false); + * @param {Boolean} [showGroups=true] + * @returns {Boolean|dc.dataTable} + */ + _chart.showGroups = function (showGroups) { + if (!arguments.length) { + return _showGroups; + } + _showGroups = showGroups; + return _chart; + }; + + return _chart.anchor(parent, chartGroup); +}; + +/** + * Data grid is a simple widget designed to list the filtered records, providing + * a simple way to define how the items are displayed. + * + * Note: Unlike other charts, the data grid chart (and data table) use the {@link dc.dataGrid#group group} attribute as a keying function + * for {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Arrays.md#nest nesting} the data together in groups. + * Do not pass in a crossfilter group as this will not work. + * + * Examples: + * - {@link http://europarl.me/dc.js/web/ep/index.html List of members of the european parliament} + * @class dataGrid + * @memberof dc + * @mixes dc.baseMixin + * @param {String|node|d3.selection} parent - Any valid + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying + * a dom block element such as a div; or a dom element or d3 selection. + * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in. + * Interaction with a chart will only trigger events and redraws within the chart's group. + * @returns {dc.dataGrid} + */ +dc.dataGrid = function (parent, chartGroup) { + var LABEL_CSS_CLASS = 'dc-grid-label'; + var ITEM_CSS_CLASS = 'dc-grid-item'; + var GROUP_CSS_CLASS = 'dc-grid-group'; + var GRID_CSS_CLASS = 'dc-grid-top'; + + var _chart = dc.baseMixin({}); + + var _size = 999; // shouldn't be needed, but you might + var _html = function (d) { return 'you need to provide an html() handling param: ' + JSON.stringify(d); }; + var _sortBy = function (d) { + return d; + }; + var _order = d3.ascending; + var _beginSlice = 0, _endSlice; + + var _htmlGroup = function (d) { + return '<div class=\'' + GROUP_CSS_CLASS + '\'><h1 class=\'' + LABEL_CSS_CLASS + '\'>' + + _chart.keyAccessor()(d) + '</h1></div>'; + }; + + _chart._doRender = function () { + _chart.selectAll('div.' + GRID_CSS_CLASS).remove(); + + renderItems(renderGroups()); + + return _chart; + }; + + function renderGroups () { + var groups = _chart.root().selectAll('div.' + GRID_CSS_CLASS) + .data(nestEntries(), function (d) { + return _chart.keyAccessor()(d); + }); + + var itemGroup = groups + .enter() + .append('div') + .attr('class', GRID_CSS_CLASS); + + if (_htmlGroup) { + itemGroup + .html(function (d) { + return _htmlGroup(d); + }); + } + + groups.exit().remove(); + return itemGroup; + } + + function nestEntries () { + var entries = _chart.dimension().top(_size); + + return d3.nest() + .key(_chart.group()) + .sortKeys(_order) + .entries(entries.sort(function (a, b) { + return _order(_sortBy(a), _sortBy(b)); + }).slice(_beginSlice, _endSlice)); + } + + function renderItems (groups) { + var items = groups.order() + .selectAll('div.' + ITEM_CSS_CLASS) + .data(function (d) { + return d.values; + }); + + items.enter() + .append('div') + .attr('class', ITEM_CSS_CLASS) + .html(function (d) { + return _html(d); + }); + + items.exit().remove(); + + return items; + } + + _chart._doRedraw = function () { + return _chart._doRender(); + }; + + /** + * Get or set the group function for the data grid. The group function takes a data row and + * returns the key to specify to {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Arrays.md#d3_nest d3.nest} + * to split rows into groups. + * + * Do not pass in a crossfilter group as this will not work. + * @method group + * @memberof dc.dataGrid + * @instance + * @example + * // group rows by the value of their field + * chart + * .group(function(d) { return d.field; }) + * @param {Function} groupFunction Function taking a row of data and returning the nest key. + * @returns {Function|dc.dataTable} + */ + + /** + * Get or set the index of the beginning slice which determines which entries get displayed by the widget. + * Useful when implementing pagination. + * @method beginSlice + * @memberof dc.dataGrid + * @instance + * @param {Number} [beginSlice=0] + * @returns {Number|dc.dataGrid} + */ + _chart.beginSlice = function (beginSlice) { + if (!arguments.length) { + return _beginSlice; + } + _beginSlice = beginSlice; + return _chart; + }; + + /** + * Get or set the index of the end slice which determines which entries get displayed by the widget. + * Useful when implementing pagination. + * @method endSlice + * @memberof dc.dataGrid + * @instance + * @param {Number} [endSlice] + * @returns {Number|dc.dataGrid} + */ + _chart.endSlice = function (endSlice) { + if (!arguments.length) { + return _endSlice; + } + _endSlice = endSlice; + return _chart; + }; + + /** + * Get or set the grid size which determines the number of items displayed by the widget. + * @method size + * @memberof dc.dataGrid + * @instance + * @param {Number} [size=999] + * @returns {Number|dc.dataGrid} + */ + _chart.size = function (size) { + if (!arguments.length) { + return _size; + } + _size = size; + return _chart; + }; + + /** + * Get or set the function that formats an item. The data grid widget uses a + * function to generate dynamic html. Use your favourite templating engine or + * generate the string directly. + * @method html + * @memberof dc.dataGrid + * @instance + * @example + * chart.html(function (d) { return '<div class='item '+data.exampleCategory+''>'+data.exampleString+'</div>';}); + * @param {Function} [html] + * @returns {Function|dc.dataGrid} + */ + _chart.html = function (html) { + if (!arguments.length) { + return _html; + } + _html = html; + return _chart; + }; + + /** + * Get or set the function that formats a group label. + * @method htmlGroup + * @memberof dc.dataGrid + * @instance + * @example + * chart.htmlGroup (function (d) { return '<h2>'.d.key . 'with ' . d.values.length .' items</h2>'}); + * @param {Function} [htmlGroup] + * @returns {Function|dc.dataGrid} + */ + _chart.htmlGroup = function (htmlGroup) { + if (!arguments.length) { + return _htmlGroup; + } + _htmlGroup = htmlGroup; + return _chart; + }; + + /** + * Get or set sort-by function. This function works as a value accessor at the item + * level and returns a particular field to be sorted. + * @method sortBy + * @memberof dc.dataGrid + * @instance + * @example + * chart.sortBy(function(d) { + * return d.date; + * }); + * @param {Function} [sortByFunction] + * @returns {Function|dc.dataGrid} + */ + _chart.sortBy = function (sortByFunction) { + if (!arguments.length) { + return _sortBy; + } + _sortBy = sortByFunction; + return _chart; + }; + + /** + * Get or set sort the order function. + * @method order + * @memberof dc.dataGrid + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Arrays.md#d3_ascending d3.ascending} + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Arrays.md#d3_descending d3.descending} + * @example + * chart.order(d3.descending); + * @param {Function} [order=d3.ascending] + * @returns {Function|dc.dataGrid} + */ + _chart.order = function (order) { + if (!arguments.length) { + return _order; + } + _order = order; + return _chart; + }; + + return _chart.anchor(parent, chartGroup); +}; + +/** + * A concrete implementation of a general purpose bubble chart that allows data visualization using the + * following dimensions: + * - x axis position + * - y axis position + * - bubble radius + * - color + * + * Examples: + * - {@link http://dc-js.github.com/dc.js/ Nasdaq 100 Index} + * - {@link http://dc-js.github.com/dc.js/vc/index.html US Venture Capital Landscape 2011} + * @class bubbleChart + * @memberof dc + * @mixes dc.bubbleMixin + * @mixes dc.coordinateGridMixin + * @example + * // create a bubble chart under #chart-container1 element using the default global chart group + * var bubbleChart1 = dc.bubbleChart('#chart-container1'); + * // create a bubble chart under #chart-container2 element using chart group A + * var bubbleChart2 = dc.bubbleChart('#chart-container2', 'chartGroupA'); + * @param {String|node|d3.selection} parent - Any valid + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying + * a dom block element such as a div; or a dom element or d3 selection. + * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in. + * Interaction with a chart will only trigger events and redraws within the chart's group. + * @returns {dc.bubbleChart} + */ +dc.bubbleChart = function (parent, chartGroup) { + var _chart = dc.bubbleMixin(dc.coordinateGridMixin({})); + + _chart.transitionDuration(750); + + _chart.transitionDelay(0); + + var bubbleLocator = function (d) { + return 'translate(' + (bubbleX(d)) + ',' + (bubbleY(d)) + ')'; + }; + + _chart.plotData = function () { + _chart.calculateRadiusDomain(); + _chart.r().range([_chart.MIN_RADIUS, _chart.xAxisLength() * _chart.maxBubbleRelativeSize()]); + + var data = _chart.data(); + var bubbleG = _chart.chartBodyG().selectAll('g.' + _chart.BUBBLE_NODE_CLASS) + .data(data, function (d) { return d.key; }); + if (_chart.sortBubbleSize()) { + // update dom order based on sort + bubbleG.order(); + } + + renderNodes(bubbleG); + + updateNodes(bubbleG); + + removeNodes(bubbleG); + + _chart.fadeDeselectedArea(); + }; + + function renderNodes (bubbleG) { + var bubbleGEnter = bubbleG.enter().append('g'); + + bubbleGEnter + .attr('class', _chart.BUBBLE_NODE_CLASS) + .attr('transform', bubbleLocator) + .append('circle').attr('class', function (d, i) { + return _chart.BUBBLE_CLASS + ' _' + i; + }) + .on('click', _chart.onClick) + .attr('fill', _chart.getColor) + .attr('r', 0); + dc.transition(bubbleG, _chart.transitionDuration(), _chart.transitionDelay()) + .select('circle.' + _chart.BUBBLE_CLASS) + .attr('r', function (d) { + return _chart.bubbleR(d); + }) + .attr('opacity', function (d) { + return (_chart.bubbleR(d) > 0) ? 1 : 0; + }); + + _chart._doRenderLabel(bubbleGEnter); + + _chart._doRenderTitles(bubbleGEnter); + } + + function updateNodes (bubbleG) { + dc.transition(bubbleG, _chart.transitionDuration(), _chart.transitionDelay()) + .attr('transform', bubbleLocator) + .select('circle.' + _chart.BUBBLE_CLASS) + .attr('fill', _chart.getColor) + .attr('r', function (d) { + return _chart.bubbleR(d); + }) + .attr('opacity', function (d) { + return (_chart.bubbleR(d) > 0) ? 1 : 0; + }); + + _chart.doUpdateLabels(bubbleG); + _chart.doUpdateTitles(bubbleG); + } + + function removeNodes (bubbleG) { + bubbleG.exit().remove(); + } + + function bubbleX (d) { + var x = _chart.x()(_chart.keyAccessor()(d)); + if (isNaN(x)) { + x = 0; + } + return x; + } + + function bubbleY (d) { + var y = _chart.y()(_chart.valueAccessor()(d)); + if (isNaN(y)) { + y = 0; + } + return y; + } + + _chart.renderBrush = function () { + // override default x axis brush from parent chart + }; + + _chart.redrawBrush = function () { + // override default x axis brush from parent chart + _chart.fadeDeselectedArea(); + }; + + return _chart.anchor(parent, chartGroup); +}; + +/** + * Composite charts are a special kind of chart that render multiple charts on the same Coordinate + * Grid. You can overlay (compose) different bar/line/area charts in a single composite chart to + * achieve some quite flexible charting effects. + * @class compositeChart + * @memberof dc + * @mixes dc.coordinateGridMixin + * @example + * // create a composite chart under #chart-container1 element using the default global chart group + * var compositeChart1 = dc.compositeChart('#chart-container1'); + * // create a composite chart under #chart-container2 element using chart group A + * var compositeChart2 = dc.compositeChart('#chart-container2', 'chartGroupA'); + * @param {String|node|d3.selection} parent - Any valid + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying + * a dom block element such as a div; or a dom element or d3 selection. + * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in. + * Interaction with a chart will only trigger events and redraws within the chart's group. + * @returns {dc.compositeChart} + */ +dc.compositeChart = function (parent, chartGroup) { + + var SUB_CHART_CLASS = 'sub'; + var DEFAULT_RIGHT_Y_AXIS_LABEL_PADDING = 12; + + var _chart = dc.coordinateGridMixin({}); + var _children = []; + + var _childOptions = {}; + + var _shareColors = false, + _shareTitle = true, + _alignYAxes = false; + + var _rightYAxis = d3.svg.axis(), + _rightYAxisLabel = 0, + _rightYAxisLabelPadding = DEFAULT_RIGHT_Y_AXIS_LABEL_PADDING, + _rightY, + _rightAxisGridLines = false; + + _chart._mandatoryAttributes([]); + _chart.transitionDuration(500); + _chart.transitionDelay(0); + + dc.override(_chart, '_generateG', function () { + var g = this.__generateG(); + + for (var i = 0; i < _children.length; ++i) { + var child = _children[i]; + + generateChildG(child, i); + + if (!child.dimension()) { + child.dimension(_chart.dimension()); + } + if (!child.group()) { + child.group(_chart.group()); + } + + child.chartGroup(_chart.chartGroup()); + child.svg(_chart.svg()); + child.xUnits(_chart.xUnits()); + child.transitionDuration(_chart.transitionDuration(), _chart.transitionDelay()); + child.brushOn(_chart.brushOn()); + child.renderTitle(_chart.renderTitle()); + child.elasticX(_chart.elasticX()); + } + + return g; + }); + + _chart._brushing = function () { + var extent = _chart.extendBrush(); + var brushIsEmpty = _chart.brushIsEmpty(extent); + + for (var i = 0; i < _children.length; ++i) { + _children[i].replaceFilter(brushIsEmpty ? null : extent); + } + }; + + _chart._prepareYAxis = function () { + var left = (leftYAxisChildren().length !== 0); + var right = (rightYAxisChildren().length !== 0); + var ranges = calculateYAxisRanges(left, right); + + if (left) { prepareLeftYAxis(ranges); } + if (right) { prepareRightYAxis(ranges); } + + if (leftYAxisChildren().length > 0 && !_rightAxisGridLines) { + _chart._renderHorizontalGridLinesForAxis(_chart.g(), _chart.y(), _chart.yAxis()); + } else if (rightYAxisChildren().length > 0) { + _chart._renderHorizontalGridLinesForAxis(_chart.g(), _rightY, _rightYAxis); + } + }; + + _chart.renderYAxis = function () { + if (leftYAxisChildren().length !== 0) { + _chart.renderYAxisAt('y', _chart.yAxis(), _chart.margins().left); + _chart.renderYAxisLabel('y', _chart.yAxisLabel(), -90); + } + + if (rightYAxisChildren().length !== 0) { + _chart.renderYAxisAt('yr', _chart.rightYAxis(), _chart.width() - _chart.margins().right); + _chart.renderYAxisLabel('yr', _chart.rightYAxisLabel(), 90, _chart.width() - _rightYAxisLabelPadding); + } + }; + + function calculateYAxisRanges (left, right) { + var lyAxisMin, lyAxisMax, ryAxisMin, ryAxisMax; + var ranges; + + if (left) { + lyAxisMin = yAxisMin(); + lyAxisMax = yAxisMax(); + } + + if (right) { + ryAxisMin = rightYAxisMin(); + ryAxisMax = rightYAxisMax(); + } + + if (_chart.alignYAxes() && left && right) { + ranges = alignYAxisRanges(lyAxisMin, lyAxisMax, ryAxisMin, ryAxisMax); + } + + return ranges || { + lyAxisMin: lyAxisMin, + lyAxisMax: lyAxisMax, + ryAxisMin: ryAxisMin, + ryAxisMax: ryAxisMax + }; + } + + function alignYAxisRanges (lyAxisMin, lyAxisMax, ryAxisMin, ryAxisMax) { + // since the two series will share a zero, each Y is just a multiple + // of the other. and the ratio should be the ratio of the ranges of the + // input data, so that they come out the same height. so we just min/max + + // note: both ranges already include zero due to the stack mixin (#667) + // if #667 changes, we can reconsider whether we want data height or + // height from zero to be equal. and it will be possible for the axes + // to be aligned but not visible. + var extentRatio = (ryAxisMax - ryAxisMin) / (lyAxisMax - lyAxisMin); + + return { + lyAxisMin: Math.min(lyAxisMin, ryAxisMin / extentRatio), + lyAxisMax: Math.max(lyAxisMax, ryAxisMax / extentRatio), + ryAxisMin: Math.min(ryAxisMin, lyAxisMin * extentRatio), + ryAxisMax: Math.max(ryAxisMax, lyAxisMax * extentRatio) + }; + } + + function prepareRightYAxis (ranges) { + var needDomain = _chart.rightY() === undefined || _chart.elasticY(), + needRange = needDomain || _chart.resizing(); + if (_chart.rightY() === undefined) { + _chart.rightY(d3.scale.linear()); + } + if (needDomain) { + _chart.rightY().domain([ranges.ryAxisMin, ranges.ryAxisMax]); + } + if (needRange) { + _chart.rightY().rangeRound([_chart.yAxisHeight(), 0]); + } + + _chart.rightY().range([_chart.yAxisHeight(), 0]); + _chart.rightYAxis(_chart.rightYAxis().scale(_chart.rightY())); + + _chart.rightYAxis().orient('right'); + } + + function prepareLeftYAxis (ranges) { + var needDomain = _chart.y() === undefined || _chart.elasticY(), + needRange = needDomain || _chart.resizing(); + if (_chart.y() === undefined) { + _chart.y(d3.scale.linear()); + } + if (needDomain) { + _chart.y().domain([ranges.lyAxisMin, ranges.lyAxisMax]); + } + if (needRange) { + _chart.y().rangeRound([_chart.yAxisHeight(), 0]); + } + + _chart.y().range([_chart.yAxisHeight(), 0]); + _chart.yAxis(_chart.yAxis().scale(_chart.y())); + + _chart.yAxis().orient('left'); + } + + function generateChildG (child, i) { + child._generateG(_chart.g()); + child.g().attr('class', SUB_CHART_CLASS + ' _' + i); + } + + _chart.plotData = function () { + for (var i = 0; i < _children.length; ++i) { + var child = _children[i]; + + if (!child.g()) { + generateChildG(child, i); + } + + if (_shareColors) { + child.colors(_chart.colors()); + } + + child.x(_chart.x()); + + child.xAxis(_chart.xAxis()); + + if (child.useRightYAxis()) { + child.y(_chart.rightY()); + child.yAxis(_chart.rightYAxis()); + } else { + child.y(_chart.y()); + child.yAxis(_chart.yAxis()); + } + + child.plotData(); + + child._activateRenderlets(); + } + }; + + /** + * Get or set whether to draw gridlines from the right y axis. Drawing from the left y axis is the + * default behavior. This option is only respected when subcharts with both left and right y-axes + * are present. + * @method useRightAxisGridLines + * @memberof dc.compositeChart + * @instance + * @param {Boolean} [useRightAxisGridLines=false] + * @returns {Boolean|dc.compositeChart} + */ + _chart.useRightAxisGridLines = function (useRightAxisGridLines) { + if (!arguments) { + return _rightAxisGridLines; + } + + _rightAxisGridLines = useRightAxisGridLines; + return _chart; + }; + + /** + * Get or set chart-specific options for all child charts. This is equivalent to calling + * {@link dc.baseMixin#options .options} on each child chart. + * @method childOptions + * @memberof dc.compositeChart + * @instance + * @param {Object} [childOptions] + * @returns {Object|dc.compositeChart} + */ + _chart.childOptions = function (childOptions) { + if (!arguments.length) { + return _childOptions; + } + _childOptions = childOptions; + _children.forEach(function (child) { + child.options(_childOptions); + }); + return _chart; + }; + + _chart.fadeDeselectedArea = function () { + for (var i = 0; i < _children.length; ++i) { + var child = _children[i]; + child.brush(_chart.brush()); + child.fadeDeselectedArea(); + } + }; + + /** + * Set or get the right y axis label. + * @method rightYAxisLabel + * @memberof dc.compositeChart + * @instance + * @param {String} [rightYAxisLabel] + * @param {Number} [padding] + * @returns {String|dc.compositeChart} + */ + _chart.rightYAxisLabel = function (rightYAxisLabel, padding) { + if (!arguments.length) { + return _rightYAxisLabel; + } + _rightYAxisLabel = rightYAxisLabel; + _chart.margins().right -= _rightYAxisLabelPadding; + _rightYAxisLabelPadding = (padding === undefined) ? DEFAULT_RIGHT_Y_AXIS_LABEL_PADDING : padding; + _chart.margins().right += _rightYAxisLabelPadding; + return _chart; + }; + + /** + * Combine the given charts into one single composite coordinate grid chart. + * @method compose + * @memberof dc.compositeChart + * @instance + * @example + * moveChart.compose([ + * // when creating sub-chart you need to pass in the parent chart + * dc.lineChart(moveChart) + * .group(indexAvgByMonthGroup) // if group is missing then parent's group will be used + * .valueAccessor(function (d){return d.value.avg;}) + * // most of the normal functions will continue to work in a composed chart + * .renderArea(true) + * .stack(monthlyMoveGroup, function (d){return d.value;}) + * .title(function (d){ + * var value = d.value.avg?d.value.avg:d.value; + * if(isNaN(value)) value = 0; + * return dateFormat(d.key) + '\n' + numberFormat(value); + * }), + * dc.barChart(moveChart) + * .group(volumeByMonthGroup) + * .centerBar(true) + * ]); + * @param {Array<Chart>} [subChartArray] + * @returns {dc.compositeChart} + */ + _chart.compose = function (subChartArray) { + _children = subChartArray; + _children.forEach(function (child) { + child.height(_chart.height()); + child.width(_chart.width()); + child.margins(_chart.margins()); + + if (_shareTitle) { + child.title(_chart.title()); + } + + child.options(_childOptions); + }); + return _chart; + }; + + /** + * Returns the child charts which are composed into the composite chart. + * @method children + * @memberof dc.compositeChart + * @instance + * @returns {Array<dc.baseMixin>} + */ + _chart.children = function () { + return _children; + }; + + /** + * Get or set color sharing for the chart. If set, the {@link dc.colorMixin#colors .colors()} value from this chart + * will be shared with composed children. Additionally if the child chart implements + * Stackable and has not set a custom .colorAccessor, then it will generate a color + * specific to its order in the composition. + * @method shareColors + * @memberof dc.compositeChart + * @instance + * @param {Boolean} [shareColors=false] + * @returns {Boolean|dc.compositeChart} + */ + _chart.shareColors = function (shareColors) { + if (!arguments.length) { + return _shareColors; + } + _shareColors = shareColors; + return _chart; + }; + + /** + * Get or set title sharing for the chart. If set, the {@link dc.baseMixin#title .title()} value from + * this chart will be shared with composed children. + * @method shareTitle + * @memberof dc.compositeChart + * @instance + * @param {Boolean} [shareTitle=true] + * @returns {Boolean|dc.compositeChart} + */ + _chart.shareTitle = function (shareTitle) { + if (!arguments.length) { + return _shareTitle; + } + _shareTitle = shareTitle; + return _chart; + }; + + /** + * Get or set the y scale for the right axis. The right y scale is typically automatically + * generated by the chart implementation. + * @method rightY + * @memberof dc.compositeChart + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Scales.md d3.scale} + * @param {d3.scale} [yScale] + * @returns {d3.scale|dc.compositeChart} + */ + _chart.rightY = function (yScale) { + if (!arguments.length) { + return _rightY; + } + _rightY = yScale; + _chart.rescale(); + return _chart; + }; + + /** + * Get or set alignment between left and right y axes. A line connecting '0' on both y axis + * will be parallel to x axis. This only has effect when {@link #dc.coordinateGridMixin+elasticY elasticY} is true. + * @method alignYAxes + * @memberof dc.compositeChart + * @instance + * @param {Boolean} [alignYAxes=false] + * @returns {Chart} + */ + _chart.alignYAxes = function (alignYAxes) { + if (!arguments.length) { + return _alignYAxes; + } + _alignYAxes = alignYAxes; + _chart.rescale(); + return _chart; + }; + + function leftYAxisChildren () { + return _children.filter(function (child) { + return !child.useRightYAxis(); + }); + } + + function rightYAxisChildren () { + return _children.filter(function (child) { + return child.useRightYAxis(); + }); + } + + function getYAxisMin (charts) { + return charts.map(function (c) { + return c.yAxisMin(); + }); + } + + delete _chart.yAxisMin; + function yAxisMin () { + return d3.min(getYAxisMin(leftYAxisChildren())); + } + + function rightYAxisMin () { + return d3.min(getYAxisMin(rightYAxisChildren())); + } + + function getYAxisMax (charts) { + return charts.map(function (c) { + return c.yAxisMax(); + }); + } + + delete _chart.yAxisMax; + function yAxisMax () { + return dc.utils.add(d3.max(getYAxisMax(leftYAxisChildren())), _chart.yAxisPadding()); + } + + function rightYAxisMax () { + return dc.utils.add(d3.max(getYAxisMax(rightYAxisChildren())), _chart.yAxisPadding()); + } + + function getAllXAxisMinFromChildCharts () { + return _children.map(function (c) { + return c.xAxisMin(); + }); + } + + dc.override(_chart, 'xAxisMin', function () { + return dc.utils.subtract(d3.min(getAllXAxisMinFromChildCharts()), _chart.xAxisPadding()); + }); + + function getAllXAxisMaxFromChildCharts () { + return _children.map(function (c) { + return c.xAxisMax(); + }); + } + + dc.override(_chart, 'xAxisMax', function () { + return dc.utils.add(d3.max(getAllXAxisMaxFromChildCharts()), _chart.xAxisPadding()); + }); + + _chart.legendables = function () { + return _children.reduce(function (items, child) { + if (_shareColors) { + child.colors(_chart.colors()); + } + items.push.apply(items, child.legendables()); + return items; + }, []); + }; + + _chart.legendHighlight = function (d) { + for (var j = 0; j < _children.length; ++j) { + var child = _children[j]; + child.legendHighlight(d); + } + }; + + _chart.legendReset = function (d) { + for (var j = 0; j < _children.length; ++j) { + var child = _children[j]; + child.legendReset(d); + } + }; + + _chart.legendToggle = function () { + console.log('composite should not be getting legendToggle itself'); + }; + + /** + * Set or get the right y axis used by the composite chart. This function is most useful when y + * axis customization is required. The y axis in dc.js is an instance of a [d3 axis + * object](https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Axes.md#axis) therefore it supports any valid + * d3 axis manipulation. + * + * **Caution**: The y axis is usually generated internally by dc; resetting it may cause + * unexpected results. + * @method rightYAxis + * @memberof dc.compositeChart + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Axes.md#axis d3.svg.axis} + * @example + * // customize y axis tick format + * chart.rightYAxis().tickFormat(function (v) {return v + '%';}); + * // customize y axis tick values + * chart.rightYAxis().tickValues([0, 100, 200, 300]); + * @param {d3.svg.axis} [rightYAxis] + * @returns {d3.svg.axis|dc.compositeChart} + */ + _chart.rightYAxis = function (rightYAxis) { + if (!arguments.length) { + return _rightYAxis; + } + _rightYAxis = rightYAxis; + return _chart; + }; + + return _chart.anchor(parent, chartGroup); +}; + +/** + * A series chart is a chart that shows multiple series of data overlaid on one chart, where the + * series is specified in the data. It is a specialization of Composite Chart and inherits all + * composite features other than recomposing the chart. + * + * Examples: + * - {@link http://dc-js.github.io/dc.js/examples/series.html Series Chart} + * @class seriesChart + * @memberof dc + * @mixes dc.compositeChart + * @example + * // create a series chart under #chart-container1 element using the default global chart group + * var seriesChart1 = dc.seriesChart("#chart-container1"); + * // create a series chart under #chart-container2 element using chart group A + * var seriesChart2 = dc.seriesChart("#chart-container2", "chartGroupA"); + * @param {String|node|d3.selection} parent - Any valid + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying + * a dom block element such as a div; or a dom element or d3 selection. + * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in. + * Interaction with a chart will only trigger events and redraws within the chart's group. + * @returns {dc.seriesChart} + */ +dc.seriesChart = function (parent, chartGroup) { + var _chart = dc.compositeChart(parent, chartGroup); + + function keySort (a, b) { + return d3.ascending(_chart.keyAccessor()(a), _chart.keyAccessor()(b)); + } + + var _charts = {}; + var _chartFunction = dc.lineChart; + var _seriesAccessor; + var _seriesSort = d3.ascending; + var _valueSort = keySort; + + _chart._mandatoryAttributes().push('seriesAccessor', 'chart'); + _chart.shareColors(true); + + _chart._preprocessData = function () { + var keep = []; + var childrenChanged; + var nester = d3.nest().key(_seriesAccessor); + if (_seriesSort) { + nester.sortKeys(_seriesSort); + } + if (_valueSort) { + nester.sortValues(_valueSort); + } + var nesting = nester.entries(_chart.data()); + var children = + nesting.map(function (sub, i) { + var subChart = _charts[sub.key] || _chartFunction.call(_chart, _chart, chartGroup, sub.key, i); + if (!_charts[sub.key]) { + childrenChanged = true; + } + _charts[sub.key] = subChart; + keep.push(sub.key); + return subChart + .dimension(_chart.dimension()) + .group({all: d3.functor(sub.values)}, sub.key) + .keyAccessor(_chart.keyAccessor()) + .valueAccessor(_chart.valueAccessor()) + .brushOn(_chart.brushOn()); + }); + // this works around the fact compositeChart doesn't really + // have a removal interface + Object.keys(_charts) + .filter(function (c) {return keep.indexOf(c) === -1;}) + .forEach(function (c) { + clearChart(c); + childrenChanged = true; + }); + _chart._compose(children); + if (childrenChanged && _chart.legend()) { + _chart.legend().render(); + } + }; + + function clearChart (c) { + if (_charts[c].g()) { + _charts[c].g().remove(); + } + delete _charts[c]; + } + + function resetChildren () { + Object.keys(_charts).map(clearChart); + _charts = {}; + } + + /** + * Get or set the chart function, which generates the child charts. + * @method chart + * @memberof dc.seriesChart + * @instance + * @example + * // put interpolation on the line charts used for the series + * chart.chart(function(c) { return dc.lineChart(c).interpolate('basis'); }) + * // do a scatter series chart + * chart.chart(dc.scatterPlot) + * @param {Function} [chartFunction=dc.lineChart] + * @returns {Function|dc.seriesChart} + */ + _chart.chart = function (chartFunction) { + if (!arguments.length) { + return _chartFunction; + } + _chartFunction = chartFunction; + resetChildren(); + return _chart; + }; + + /** + * **mandatory** + * + * Get or set accessor function for the displayed series. Given a datum, this function + * should return the series that datum belongs to. + * @method seriesAccessor + * @memberof dc.seriesChart + * @instance + * @example + * // simple series accessor + * chart.seriesAccessor(function(d) { return "Expt: " + d.key[0]; }) + * @param {Function} [accessor] + * @returns {Function|dc.seriesChart} + */ + _chart.seriesAccessor = function (accessor) { + if (!arguments.length) { + return _seriesAccessor; + } + _seriesAccessor = accessor; + resetChildren(); + return _chart; + }; + + /** + * Get or set a function to sort the list of series by, given series values. + * @method seriesSort + * @memberof dc.seriesChart + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Arrays.md#d3_ascending d3.ascending} + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Arrays.md#d3_descending d3.descending} + * @example + * chart.seriesSort(d3.descending); + * @param {Function} [sortFunction=d3.ascending] + * @returns {Function|dc.seriesChart} + */ + _chart.seriesSort = function (sortFunction) { + if (!arguments.length) { + return _seriesSort; + } + _seriesSort = sortFunction; + resetChildren(); + return _chart; + }; + + /** + * Get or set a function to sort each series values by. By default this is the key accessor which, + * for example, will ensure a lineChart series connects its points in increasing key/x order, + * rather than haphazardly. + * @method valueSort + * @memberof dc.seriesChart + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Arrays.md#d3_ascending d3.ascending} + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Arrays.md#d3_descending d3.descending} + * @example + * // Default value sort + * _chart.valueSort(function keySort (a, b) { + * return d3.ascending(_chart.keyAccessor()(a), _chart.keyAccessor()(b)); + * }); + * @param {Function} [sortFunction] + * @returns {Function|dc.seriesChart} + */ + _chart.valueSort = function (sortFunction) { + if (!arguments.length) { + return _valueSort; + } + _valueSort = sortFunction; + resetChildren(); + return _chart; + }; + + // make compose private + _chart._compose = _chart.compose; + delete _chart.compose; + + return _chart; +}; + +/** + * The geo choropleth chart is designed as an easy way to create a crossfilter driven choropleth map + * from GeoJson data. This chart implementation was inspired by + * {@link http://bl.ocks.org/4060606 the great d3 choropleth example}. + * + * Examples: + * - {@link http://dc-js.github.com/dc.js/vc/index.html US Venture Capital Landscape 2011} + * @class geoChoroplethChart + * @memberof dc + * @mixes dc.colorMixin + * @mixes dc.baseMixin + * @example + * // create a choropleth chart under '#us-chart' element using the default global chart group + * var chart1 = dc.geoChoroplethChart('#us-chart'); + * // create a choropleth chart under '#us-chart2' element using chart group A + * var chart2 = dc.compositeChart('#us-chart2', 'chartGroupA'); + * @param {String|node|d3.selection} parent - Any valid + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying + * a dom block element such as a div; or a dom element or d3 selection. + * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in. + * Interaction with a chart will only trigger events and redraws within the chart's group. + * @returns {dc.geoChoroplethChart} + */ +dc.geoChoroplethChart = function (parent, chartGroup) { + var _chart = dc.colorMixin(dc.baseMixin({})); + + _chart.colorAccessor(function (d) { + return d || 0; + }); + + var _geoPath = d3.geo.path(); + var _projectionFlag; + + var _geoJsons = []; + + _chart._doRender = function () { + _chart.resetSvg(); + for (var layerIndex = 0; layerIndex < _geoJsons.length; ++layerIndex) { + var states = _chart.svg().append('g') + .attr('class', 'layer' + layerIndex); + + var regionG = states.selectAll('g.' + geoJson(layerIndex).name) + .data(geoJson(layerIndex).data) + .enter() + .append('g') + .attr('class', geoJson(layerIndex).name); + + regionG + .append('path') + .attr('fill', 'white') + .attr('d', _geoPath); + + regionG.append('title'); + + plotData(layerIndex); + } + _projectionFlag = false; + }; + + function plotData (layerIndex) { + var data = generateLayeredData(); + + if (isDataLayer(layerIndex)) { + var regionG = renderRegionG(layerIndex); + + renderPaths(regionG, layerIndex, data); + + renderTitle(regionG, layerIndex, data); + } + } + + function generateLayeredData () { + var data = {}; + var groupAll = _chart.data(); + for (var i = 0; i < groupAll.length; ++i) { + data[_chart.keyAccessor()(groupAll[i])] = _chart.valueAccessor()(groupAll[i]); + } + return data; + } + + function isDataLayer (layerIndex) { + return geoJson(layerIndex).keyAccessor; + } + + function renderRegionG (layerIndex) { + var regionG = _chart.svg() + .selectAll(layerSelector(layerIndex)) + .classed('selected', function (d) { + return isSelected(layerIndex, d); + }) + .classed('deselected', function (d) { + return isDeselected(layerIndex, d); + }) + .attr('class', function (d) { + var layerNameClass = geoJson(layerIndex).name; + var regionClass = dc.utils.nameToId(geoJson(layerIndex).keyAccessor(d)); + var baseClasses = layerNameClass + ' ' + regionClass; + if (isSelected(layerIndex, d)) { + baseClasses += ' selected'; + } + if (isDeselected(layerIndex, d)) { + baseClasses += ' deselected'; + } + return baseClasses; + }); + return regionG; + } + + function layerSelector (layerIndex) { + return 'g.layer' + layerIndex + ' g.' + geoJson(layerIndex).name; + } + + function isSelected (layerIndex, d) { + return _chart.hasFilter() && _chart.hasFilter(getKey(layerIndex, d)); + } + + function isDeselected (layerIndex, d) { + return _chart.hasFilter() && !_chart.hasFilter(getKey(layerIndex, d)); + } + + function getKey (layerIndex, d) { + return geoJson(layerIndex).keyAccessor(d); + } + + function geoJson (index) { + return _geoJsons[index]; + } + + function renderPaths (regionG, layerIndex, data) { + var paths = regionG + .select('path') + .attr('fill', function () { + var currentFill = d3.select(this).attr('fill'); + if (currentFill) { + return currentFill; + } + return 'none'; + }) + .on('click', function (d) { + return _chart.onClick(d, layerIndex); + }); + + dc.transition(paths, _chart.transitionDuration(), _chart.transitionDelay()).attr('fill', function (d, i) { + return _chart.getColor(data[geoJson(layerIndex).keyAccessor(d)], i); + }); + } + + _chart.onClick = function (d, layerIndex) { + var selectedRegion = geoJson(layerIndex).keyAccessor(d); + dc.events.trigger(function () { + _chart.filter(selectedRegion); + _chart.redrawGroup(); + }); + }; + + function renderTitle (regionG, layerIndex, data) { + if (_chart.renderTitle()) { + regionG.selectAll('title').text(function (d) { + var key = getKey(layerIndex, d); + var value = data[key]; + return _chart.title()({key: key, value: value}); + }); + } + } + + _chart._doRedraw = function () { + for (var layerIndex = 0; layerIndex < _geoJsons.length; ++layerIndex) { + plotData(layerIndex); + if (_projectionFlag) { + _chart.svg().selectAll('g.' + geoJson(layerIndex).name + ' path').attr('d', _geoPath); + } + } + _projectionFlag = false; + }; + + /** + * **mandatory** + * + * Use this function to insert a new GeoJson map layer. This function can be invoked multiple times + * if you have multiple GeoJson data layers to render on top of each other. If you overlay multiple + * layers with the same name the new overlay will override the existing one. + * @method overlayGeoJson + * @memberof dc.geoChoroplethChart + * @instance + * @see {@link http://geojson.org/ GeoJSON} + * @see {@link https://github.com/topojson/topojson/wiki TopoJSON} + * @see {@link https://github.com/topojson/topojson-1.x-api-reference/blob/master/API-Reference.md#wiki-feature topojson.feature} + * @example + * // insert a layer for rendering US states + * chart.overlayGeoJson(statesJson.features, 'state', function(d) { + * return d.properties.name; + * }); + * @param {geoJson} json - a geojson feed + * @param {String} name - name of the layer + * @param {Function} keyAccessor - accessor function used to extract 'key' from the GeoJson data. The key extracted by + * this function should match the keys returned by the crossfilter groups. + * @returns {dc.geoChoroplethChart} + */ + _chart.overlayGeoJson = function (json, name, keyAccessor) { + for (var i = 0; i < _geoJsons.length; ++i) { + if (_geoJsons[i].name === name) { + _geoJsons[i].data = json; + _geoJsons[i].keyAccessor = keyAccessor; + return _chart; + } + } + _geoJsons.push({name: name, data: json, keyAccessor: keyAccessor}); + return _chart; + }; + + /** + * Set custom geo projection function. See the available + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Geo-Projections.md d3 geo projection functions}. + * @method projection + * @memberof dc.geoChoroplethChart + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Geo-Projections.md d3.geo.projection} + * @see {@link https://github.com/d3/d3-geo-projection Extended d3.geo.projection} + * @param {d3.projection} [projection=d3.geo.albersUsa()] + * @returns {dc.geoChoroplethChart} + */ + _chart.projection = function (projection) { + _geoPath.projection(projection); + _projectionFlag = true; + return _chart; + }; + + /** + * Returns all GeoJson layers currently registered with this chart. The returned array is a + * reference to this chart's internal data structure, so any modification to this array will also + * modify this chart's internal registration. + * @method geoJsons + * @memberof dc.geoChoroplethChart + * @instance + * @returns {Array<{name:String, data: Object, accessor: Function}>} + */ + _chart.geoJsons = function () { + return _geoJsons; + }; + + /** + * Returns the {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Geo-Paths.md#path d3.geo.path} object used to + * render the projection and features. Can be useful for figuring out the bounding box of the + * feature set and thus a way to calculate scale and translation for the projection. + * @method geoPath + * @memberof dc.geoChoroplethChart + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Geo-Paths.md#path d3.geo.path} + * @returns {d3.geo.path} + */ + _chart.geoPath = function () { + return _geoPath; + }; + + /** + * Remove a GeoJson layer from this chart by name + * @method removeGeoJson + * @memberof dc.geoChoroplethChart + * @instance + * @param {String} name + * @returns {dc.geoChoroplethChart} + */ + _chart.removeGeoJson = function (name) { + var geoJsons = []; + + for (var i = 0; i < _geoJsons.length; ++i) { + var layer = _geoJsons[i]; + if (layer.name !== name) { + geoJsons.push(layer); + } + } + + _geoJsons = geoJsons; + + return _chart; + }; + + return _chart.anchor(parent, chartGroup); +}; + +/** + * The bubble overlay chart is quite different from the typical bubble chart. With the bubble overlay + * chart you can arbitrarily place bubbles on an existing svg or bitmap image, thus changing the + * typical x and y positioning while retaining the capability to visualize data using bubble radius + * and coloring. + * + * Examples: + * - {@link http://dc-js.github.com/dc.js/crime/index.html Canadian City Crime Stats} + * @class bubbleOverlay + * @memberof dc + * @mixes dc.bubbleMixin + * @mixes dc.baseMixin + * @example + * // create a bubble overlay chart on top of the '#chart-container1 svg' element using the default global chart group + * var bubbleChart1 = dc.bubbleOverlayChart('#chart-container1').svg(d3.select('#chart-container1 svg')); + * // create a bubble overlay chart on top of the '#chart-container2 svg' element using chart group A + * var bubbleChart2 = dc.compositeChart('#chart-container2', 'chartGroupA').svg(d3.select('#chart-container2 svg')); + * @param {String|node|d3.selection} parent - Any valid + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying + * a dom block element such as a div; or a dom element or d3 selection. + * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in. + * Interaction with a chart will only trigger events and redraws within the chart's group. + * @returns {dc.bubbleOverlay} + */ +dc.bubbleOverlay = function (parent, chartGroup) { + var BUBBLE_OVERLAY_CLASS = 'bubble-overlay'; + var BUBBLE_NODE_CLASS = 'node'; + var BUBBLE_CLASS = 'bubble'; + + /** + * **mandatory** + * + * Set the underlying svg image element. Unlike other dc charts this chart will not generate a svg + * element; therefore the bubble overlay chart will not work if this function is not invoked. If the + * underlying image is a bitmap, then an empty svg will need to be created on top of the image. + * @method svg + * @memberof dc.bubbleOverlay + * @instance + * @example + * // set up underlying svg element + * chart.svg(d3.select('#chart svg')); + * @param {SVGElement|d3.selection} [imageElement] + * @returns {dc.bubbleOverlay} + */ + var _chart = dc.bubbleMixin(dc.baseMixin({})); + var _g; + var _points = []; + + _chart.transitionDuration(750); + + _chart.transitionDelay(0); + + _chart.radiusValueAccessor(function (d) { + return d.value; + }); + + /** + * **mandatory** + * + * Set up a data point on the overlay. The name of a data point should match a specific 'key' among + * data groups generated using keyAccessor. If a match is found (point name <-> data group key) + * then a bubble will be generated at the position specified by the function. x and y + * value specified here are relative to the underlying svg. + * @method point + * @memberof dc.bubbleOverlay + * @instance + * @param {String} name + * @param {Number} x + * @param {Number} y + * @returns {dc.bubbleOverlay} + */ + _chart.point = function (name, x, y) { + _points.push({name: name, x: x, y: y}); + return _chart; + }; + + _chart._doRender = function () { + _g = initOverlayG(); + + _chart.r().range([_chart.MIN_RADIUS, _chart.width() * _chart.maxBubbleRelativeSize()]); + + initializeBubbles(); + + _chart.fadeDeselectedArea(); + + return _chart; + }; + + function initOverlayG () { + _g = _chart.select('g.' + BUBBLE_OVERLAY_CLASS); + if (_g.empty()) { + _g = _chart.svg().append('g').attr('class', BUBBLE_OVERLAY_CLASS); + } + return _g; + } + + function initializeBubbles () { + var data = mapData(); + _chart.calculateRadiusDomain(); + + _points.forEach(function (point) { + var nodeG = getNodeG(point, data); + + var circle = nodeG.select('circle.' + BUBBLE_CLASS); + + if (circle.empty()) { + circle = nodeG.append('circle') + .attr('class', BUBBLE_CLASS) + .attr('r', 0) + .attr('fill', _chart.getColor) + .on('click', _chart.onClick); + } + + dc.transition(circle, _chart.transitionDuration(), _chart.transitionDelay()) + .attr('r', function (d) { + return _chart.bubbleR(d); + }); + + _chart._doRenderLabel(nodeG); + + _chart._doRenderTitles(nodeG); + }); + } + + function mapData () { + var data = {}; + _chart.data().forEach(function (datum) { + data[_chart.keyAccessor()(datum)] = datum; + }); + return data; + } + + function getNodeG (point, data) { + var bubbleNodeClass = BUBBLE_NODE_CLASS + ' ' + dc.utils.nameToId(point.name); + + var nodeG = _g.select('g.' + dc.utils.nameToId(point.name)); + + if (nodeG.empty()) { + nodeG = _g.append('g') + .attr('class', bubbleNodeClass) + .attr('transform', 'translate(' + point.x + ',' + point.y + ')'); + } + + nodeG.datum(data[point.name]); + + return nodeG; + } + + _chart._doRedraw = function () { + updateBubbles(); + + _chart.fadeDeselectedArea(); + + return _chart; + }; + + function updateBubbles () { + var data = mapData(); + _chart.calculateRadiusDomain(); + + _points.forEach(function (point) { + var nodeG = getNodeG(point, data); + + var circle = nodeG.select('circle.' + BUBBLE_CLASS); + + dc.transition(circle, _chart.transitionDuration(), _chart.transitionDelay()) + .attr('r', function (d) { + return _chart.bubbleR(d); + }) + .attr('fill', _chart.getColor); + + _chart.doUpdateLabels(nodeG); + + _chart.doUpdateTitles(nodeG); + }); + } + + _chart.debug = function (flag) { + if (flag) { + var debugG = _chart.select('g.' + dc.constants.DEBUG_GROUP_CLASS); + + if (debugG.empty()) { + debugG = _chart.svg() + .append('g') + .attr('class', dc.constants.DEBUG_GROUP_CLASS); + } + + var debugText = debugG.append('text') + .attr('x', 10) + .attr('y', 20); + + debugG + .append('rect') + .attr('width', _chart.width()) + .attr('height', _chart.height()) + .on('mousemove', function () { + var position = d3.mouse(debugG.node()); + var msg = position[0] + ', ' + position[1]; + debugText.text(msg); + }); + } else { + _chart.selectAll('.debug').remove(); + } + + return _chart; + }; + + _chart.anchor(parent, chartGroup); + + return _chart; +}; + +/** + * Concrete row chart implementation. + * + * Examples: + * - {@link http://dc-js.github.com/dc.js/ Nasdaq 100 Index} + * @class rowChart + * @memberof dc + * @mixes dc.capMixin + * @mixes dc.marginMixin + * @mixes dc.colorMixin + * @mixes dc.baseMixin + * @example + * // create a row chart under #chart-container1 element using the default global chart group + * var chart1 = dc.rowChart('#chart-container1'); + * // create a row chart under #chart-container2 element using chart group A + * var chart2 = dc.rowChart('#chart-container2', 'chartGroupA'); + * @param {String|node|d3.selection} parent - Any valid + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying + * a dom block element such as a div; or a dom element or d3 selection. + * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in. + * Interaction with a chart will only trigger events and redraws within the chart's group. + * @returns {dc.rowChart} + */ +dc.rowChart = function (parent, chartGroup) { + + var _g; + + var _labelOffsetX = 10; + var _labelOffsetY = 15; + var _hasLabelOffsetY = false; + var _dyOffset = '0.35em'; // this helps center labels https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#svg_text + var _titleLabelOffsetX = 2; + + var _gap = 5; + + var _fixedBarHeight = false; + var _rowCssClass = 'row'; + var _titleRowCssClass = 'titlerow'; + var _renderTitleLabel = false; + + var _chart = dc.capMixin(dc.marginMixin(dc.colorMixin(dc.baseMixin({})))); + + var _x; + + var _elasticX; + + var _xAxis = d3.svg.axis().orient('bottom'); + + var _rowData; + + _chart.rowsCap = _chart.cap; + + function calculateAxisScale () { + if (!_x || _elasticX) { + var extent = d3.extent(_rowData, _chart.cappedValueAccessor); + if (extent[0] > 0) { + extent[0] = 0; + } + if (extent[1] < 0) { + extent[1] = 0; + } + _x = d3.scale.linear().domain(extent) + .range([0, _chart.effectiveWidth()]); + } + _xAxis.scale(_x); + } + + function drawAxis () { + var axisG = _g.select('g.axis'); + + calculateAxisScale(); + + if (axisG.empty()) { + axisG = _g.append('g').attr('class', 'axis'); + } + axisG.attr('transform', 'translate(0, ' + _chart.effectiveHeight() + ')'); + + dc.transition(axisG, _chart.transitionDuration(), _chart.transitionDelay()) + .call(_xAxis); + } + + _chart._doRender = function () { + _chart.resetSvg(); + + _g = _chart.svg() + .append('g') + .attr('transform', 'translate(' + _chart.margins().left + ',' + _chart.margins().top + ')'); + + drawChart(); + + return _chart; + }; + + _chart.title(function (d) { + return _chart.cappedKeyAccessor(d) + ': ' + _chart.cappedValueAccessor(d); + }); + + _chart.label(_chart.cappedKeyAccessor); + + /** + * Gets or sets the x scale. The x scale can be any d3 + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Quantitative-Scales.md quantitive scale}. + * @method x + * @memberof dc.rowChart + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Quantitative-Scales.md quantitive scale} + * @param {d3.scale} [scale] + * @returns {d3.scale|dc.rowChart} + */ + _chart.x = function (scale) { + if (!arguments.length) { + return _x; + } + _x = scale; + return _chart; + }; + + function drawGridLines () { + _g.selectAll('g.tick') + .select('line.grid-line') + .remove(); + + _g.selectAll('g.tick') + .append('line') + .attr('class', 'grid-line') + .attr('x1', 0) + .attr('y1', 0) + .attr('x2', 0) + .attr('y2', function () { + return -_chart.effectiveHeight(); + }); + } + + function drawChart () { + _rowData = _chart.data(); + + drawAxis(); + drawGridLines(); + + var rows = _g.selectAll('g.' + _rowCssClass) + .data(_rowData); + + createElements(rows); + removeElements(rows); + updateElements(rows); + } + + function createElements (rows) { + var rowEnter = rows.enter() + .append('g') + .attr('class', function (d, i) { + return _rowCssClass + ' _' + i; + }); + + rowEnter.append('rect').attr('width', 0); + + createLabels(rowEnter); + } + + function removeElements (rows) { + rows.exit().remove(); + } + + function rootValue () { + var root = _x(0); + return (root === -Infinity || root !== root) ? _x(1) : root; + } + + function updateElements (rows) { + var n = _rowData.length; + + var height; + if (!_fixedBarHeight) { + height = (_chart.effectiveHeight() - (n + 1) * _gap) / n; + } else { + height = _fixedBarHeight; + } + + // vertically align label in center unless they override the value via property setter + if (!_hasLabelOffsetY) { + _labelOffsetY = height / 2; + } + + var rect = rows.attr('transform', function (d, i) { + return 'translate(0,' + ((i + 1) * _gap + i * height) + ')'; + }).select('rect') + .attr('height', height) + .attr('fill', _chart.getColor) + .on('click', onClick) + .classed('deselected', function (d) { + return (_chart.hasFilter()) ? !isSelectedRow(d) : false; + }) + .classed('selected', function (d) { + return (_chart.hasFilter()) ? isSelectedRow(d) : false; + }); + + dc.transition(rect, _chart.transitionDuration(), _chart.transitionDelay()) + .attr('width', function (d) { + return Math.abs(rootValue() - _x(_chart.valueAccessor()(d))); + }) + .attr('transform', translateX); + + createTitles(rows); + updateLabels(rows); + } + + function createTitles (rows) { + if (_chart.renderTitle()) { + rows.select('title').remove(); + rows.append('title').text(_chart.title()); + } + } + + function createLabels (rowEnter) { + if (_chart.renderLabel()) { + rowEnter.append('text') + .on('click', onClick); + } + if (_chart.renderTitleLabel()) { + rowEnter.append('text') + .attr('class', _titleRowCssClass) + .on('click', onClick); + } + } + + function updateLabels (rows) { + if (_chart.renderLabel()) { + var lab = rows.select('text') + .attr('x', _labelOffsetX) + .attr('y', _labelOffsetY) + .attr('dy', _dyOffset) + .on('click', onClick) + .attr('class', function (d, i) { + return _rowCssClass + ' _' + i; + }) + .text(function (d) { + return _chart.label()(d); + }); + dc.transition(lab, _chart.transitionDuration(), _chart.transitionDelay()) + .attr('transform', translateX); + } + if (_chart.renderTitleLabel()) { + var titlelab = rows.select('.' + _titleRowCssClass) + .attr('x', _chart.effectiveWidth() - _titleLabelOffsetX) + .attr('y', _labelOffsetY) + .attr('dy', _dyOffset) + .attr('text-anchor', 'end') + .on('click', onClick) + .attr('class', function (d, i) { + return _titleRowCssClass + ' _' + i ; + }) + .text(function (d) { + return _chart.title()(d); + }); + dc.transition(titlelab, _chart.transitionDuration(), _chart.transitionDelay()) + .attr('transform', translateX); + } + } + + /** + * Turn on/off Title label rendering (values) using SVG style of text-anchor 'end'. + * @method renderTitleLabel + * @memberof dc.rowChart + * @instance + * @param {Boolean} [renderTitleLabel=false] + * @returns {Boolean|dc.rowChart} + */ + _chart.renderTitleLabel = function (renderTitleLabel) { + if (!arguments.length) { + return _renderTitleLabel; + } + _renderTitleLabel = renderTitleLabel; + return _chart; + }; + + function onClick (d) { + _chart.onClick(d); + } + + function translateX (d) { + var x = _x(_chart.cappedValueAccessor(d)), + x0 = rootValue(), + s = x > x0 ? x0 : x; + return 'translate(' + s + ',0)'; + } + + _chart._doRedraw = function () { + drawChart(); + return _chart; + }; + + /** + * Get the x axis for the row chart instance. Note: not settable for row charts. + * See the {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Axes.md#axis d3 axis object} + * documention for more information. + * @method xAxis + * @memberof dc.rowChart + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Axes.md#axis d3.svg.axis} + * @example + * // customize x axis tick format + * chart.xAxis().tickFormat(function (v) {return v + '%';}); + * // customize x axis tick values + * chart.xAxis().tickValues([0, 100, 200, 300]); + * @returns {d3.svg.axis} + */ + _chart.xAxis = function () { + return _xAxis; + }; + + /** + * Get or set the fixed bar height. Default is [false] which will auto-scale bars. + * For example, if you want to fix the height for a specific number of bars (useful in TopN charts) + * you could fix height as follows (where count = total number of bars in your TopN and gap is + * your vertical gap space). + * @method fixedBarHeight + * @memberof dc.rowChart + * @instance + * @example + * chart.fixedBarHeight( chartheight - (count + 1) * gap / count); + * @param {Boolean|Number} [fixedBarHeight=false] + * @returns {Boolean|Number|dc.rowChart} + */ + _chart.fixedBarHeight = function (fixedBarHeight) { + if (!arguments.length) { + return _fixedBarHeight; + } + _fixedBarHeight = fixedBarHeight; + return _chart; + }; + + /** + * Get or set the vertical gap space between rows on a particular row chart instance. + * @method gap + * @memberof dc.rowChart + * @instance + * @param {Number} [gap=5] + * @returns {Number|dc.rowChart} + */ + _chart.gap = function (gap) { + if (!arguments.length) { + return _gap; + } + _gap = gap; + return _chart; + }; + + /** + * Get or set the elasticity on x axis. If this attribute is set to true, then the x axis will rescle to auto-fit the + * data range when filtered. + * @method elasticX + * @memberof dc.rowChart + * @instance + * @param {Boolean} [elasticX] + * @returns {Boolean|dc.rowChart} + */ + _chart.elasticX = function (elasticX) { + if (!arguments.length) { + return _elasticX; + } + _elasticX = elasticX; + return _chart; + }; + + /** + * Get or set the x offset (horizontal space to the top left corner of a row) for labels on a particular row chart. + * @method labelOffsetX + * @memberof dc.rowChart + * @instance + * @param {Number} [labelOffsetX=10] + * @returns {Number|dc.rowChart} + */ + _chart.labelOffsetX = function (labelOffsetX) { + if (!arguments.length) { + return _labelOffsetX; + } + _labelOffsetX = labelOffsetX; + return _chart; + }; + + /** + * Get or set the y offset (vertical space to the top left corner of a row) for labels on a particular row chart. + * @method labelOffsetY + * @memberof dc.rowChart + * @instance + * @param {Number} [labelOffsety=15] + * @returns {Number|dc.rowChart} + */ + _chart.labelOffsetY = function (labelOffsety) { + if (!arguments.length) { + return _labelOffsetY; + } + _labelOffsetY = labelOffsety; + _hasLabelOffsetY = true; + return _chart; + }; + + /** + * Get of set the x offset (horizontal space between right edge of row and right edge or text. + * @method titleLabelOffsetX + * @memberof dc.rowChart + * @instance + * @param {Number} [titleLabelOffsetX=2] + * @returns {Number|dc.rowChart} + */ + _chart.titleLabelOffsetX = function (titleLabelOffsetX) { + if (!arguments.length) { + return _titleLabelOffsetX; + } + _titleLabelOffsetX = titleLabelOffsetX; + return _chart; + }; + + function isSelectedRow (d) { + return _chart.hasFilter(_chart.cappedKeyAccessor(d)); + } + + return _chart.anchor(parent, chartGroup); +}; + +/** + * Legend is a attachable widget that can be added to other dc charts to render horizontal legend + * labels. + * + * Examples: + * - {@link http://dc-js.github.com/dc.js/ Nasdaq 100 Index} + * - {@link http://dc-js.github.com/dc.js/crime/index.html Canadian City Crime Stats} + * @class legend + * @memberof dc + * @example + * chart.legend(dc.legend().x(400).y(10).itemHeight(13).gap(5)) + * @returns {dc.legend} + */ +dc.legend = function () { + var LABEL_GAP = 2; + + var _legend = {}, + _parent, + _x = 0, + _y = 0, + _itemHeight = 12, + _gap = 5, + _horizontal = false, + _legendWidth = 560, + _itemWidth = 70, + _autoItemWidth = false, + _legendText = dc.pluck('name'), + _maxItems; + + var _g; + + _legend.parent = function (p) { + if (!arguments.length) { + return _parent; + } + _parent = p; + return _legend; + }; + + _legend.render = function () { + _parent.svg().select('g.dc-legend').remove(); + _g = _parent.svg().append('g') + .attr('class', 'dc-legend') + .attr('transform', 'translate(' + _x + ',' + _y + ')'); + var legendables = _parent.legendables(); + + if (_maxItems !== undefined) { + legendables = legendables.slice(0, _maxItems); + } + + var itemEnter = _g.selectAll('g.dc-legend-item') + .data(legendables) + .enter() + .append('g') + .attr('class', 'dc-legend-item') + .on('mouseover', function (d) { + _parent.legendHighlight(d); + }) + .on('mouseout', function (d) { + _parent.legendReset(d); + }) + .on('click', function (d) { + d.chart.legendToggle(d); + }); + + _g.selectAll('g.dc-legend-item') + .classed('fadeout', function (d) { + return d.chart.isLegendableHidden(d); + }); + + if (legendables.some(dc.pluck('dashstyle'))) { + itemEnter + .append('line') + .attr('x1', 0) + .attr('y1', _itemHeight / 2) + .attr('x2', _itemHeight) + .attr('y2', _itemHeight / 2) + .attr('stroke-width', 2) + .attr('stroke-dasharray', dc.pluck('dashstyle')) + .attr('stroke', dc.pluck('color')); + } else { + itemEnter + .append('rect') + .attr('width', _itemHeight) + .attr('height', _itemHeight) + .attr('fill', function (d) {return d ? d.color : 'blue';}); + } + + itemEnter.append('text') + .text(_legendText) + .attr('x', _itemHeight + LABEL_GAP) + .attr('y', function () { + return _itemHeight / 2 + (this.clientHeight ? this.clientHeight : 13) / 2 - 2; + }); + + var _cumulativeLegendTextWidth = 0; + var row = 0; + itemEnter.attr('transform', function (d, i) { + if (_horizontal) { + var itemWidth = _autoItemWidth === true ? this.getBBox().width + _gap : _itemWidth; + if ((_cumulativeLegendTextWidth + itemWidth) > _legendWidth && _cumulativeLegendTextWidth > 0) { + ++row; + _cumulativeLegendTextWidth = 0; + } + var translateBy = 'translate(' + _cumulativeLegendTextWidth + ',' + row * legendItemHeight() + ')'; + _cumulativeLegendTextWidth += itemWidth; + return translateBy; + } else { + return 'translate(0,' + i * legendItemHeight() + ')'; + } + }); + }; + + function legendItemHeight () { + return _gap + _itemHeight; + } + + /** + * Set or get x coordinate for legend widget. + * @method x + * @memberof dc.legend + * @instance + * @param {Number} [x=0] + * @returns {Number|dc.legend} + */ + _legend.x = function (x) { + if (!arguments.length) { + return _x; + } + _x = x; + return _legend; + }; + + /** + * Set or get y coordinate for legend widget. + * @method y + * @memberof dc.legend + * @instance + * @param {Number} [y=0] + * @returns {Number|dc.legend} + */ + _legend.y = function (y) { + if (!arguments.length) { + return _y; + } + _y = y; + return _legend; + }; + + /** + * Set or get gap between legend items. + * @method gap + * @memberof dc.legend + * @instance + * @param {Number} [gap=5] + * @returns {Number|dc.legend} + */ + _legend.gap = function (gap) { + if (!arguments.length) { + return _gap; + } + _gap = gap; + return _legend; + }; + + /** + * Set or get legend item height. + * @method itemHeight + * @memberof dc.legend + * @instance + * @param {Number} [itemHeight=12] + * @returns {Number|dc.legend} + */ + _legend.itemHeight = function (itemHeight) { + if (!arguments.length) { + return _itemHeight; + } + _itemHeight = itemHeight; + return _legend; + }; + + /** + * Position legend horizontally instead of vertically. + * @method horizontal + * @memberof dc.legend + * @instance + * @param {Boolean} [horizontal=false] + * @returns {Boolean|dc.legend} + */ + _legend.horizontal = function (horizontal) { + if (!arguments.length) { + return _horizontal; + } + _horizontal = horizontal; + return _legend; + }; + + /** + * Maximum width for horizontal legend. + * @method legendWidth + * @memberof dc.legend + * @instance + * @param {Number} [legendWidth=500] + * @returns {Number|dc.legend} + */ + _legend.legendWidth = function (legendWidth) { + if (!arguments.length) { + return _legendWidth; + } + _legendWidth = legendWidth; + return _legend; + }; + + /** + * Legend item width for horizontal legend. + * @method itemWidth + * @memberof dc.legend + * @instance + * @param {Number} [itemWidth=70] + * @returns {Number|dc.legend} + */ + _legend.itemWidth = function (itemWidth) { + if (!arguments.length) { + return _itemWidth; + } + _itemWidth = itemWidth; + return _legend; + }; + + /** + * Turn automatic width for legend items on or off. If true, {@link dc.legend#itemWidth itemWidth} is ignored. + * This setting takes into account the {@link dc.legend#gap gap}. + * @method autoItemWidth + * @memberof dc.legend + * @instance + * @param {Boolean} [autoItemWidth=false] + * @returns {Boolean|dc.legend} + */ + _legend.autoItemWidth = function (autoItemWidth) { + if (!arguments.length) { + return _autoItemWidth; + } + _autoItemWidth = autoItemWidth; + return _legend; + }; + + /** + * Set or get the legend text function. The legend widget uses this function to render the legend + * text for each item. If no function is specified the legend widget will display the names + * associated with each group. + * @method legendText + * @memberof dc.legend + * @instance + * @param {Function} [legendText] + * @returns {Function|dc.legend} + * @example + * // default legendText + * legend.legendText(dc.pluck('name')) + * + * // create numbered legend items + * chart.legend(dc.legend().legendText(function(d, i) { return i + '. ' + d.name; })) + * + * // create legend displaying group counts + * chart.legend(dc.legend().legendText(function(d) { return d.name + ': ' d.data; })) + **/ + _legend.legendText = function (legendText) { + if (!arguments.length) { + return _legendText; + } + _legendText = legendText; + return _legend; + }; + + /** + * Maximum number of legend items to display + * @method maxItems + * @memberof dc.legend + * @instance + * @param {Number} [maxItems] + * @return {dc.legend} + */ + _legend.maxItems = function (maxItems) { + if (!arguments.length) { + return _maxItems; + } + _maxItems = dc.utils.isNumber(maxItems) ? maxItems : undefined; + return _legend; + }; + + return _legend; +}; + +/** + * A scatter plot chart + * + * Examples: + * - {@link http://dc-js.github.io/dc.js/examples/scatter.html Scatter Chart} + * - {@link http://dc-js.github.io/dc.js/examples/multi-scatter.html Multi-Scatter Chart} + * @class scatterPlot + * @memberof dc + * @mixes dc.coordinateGridMixin + * @example + * // create a scatter plot under #chart-container1 element using the default global chart group + * var chart1 = dc.scatterPlot('#chart-container1'); + * // create a scatter plot under #chart-container2 element using chart group A + * var chart2 = dc.scatterPlot('#chart-container2', 'chartGroupA'); + * // create a sub-chart under a composite parent chart + * var chart3 = dc.scatterPlot(compositeChart); + * @param {String|node|d3.selection} parent - Any valid + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying + * a dom block element such as a div; or a dom element or d3 selection. + * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in. + * Interaction with a chart will only trigger events and redraws within the chart's group. + * @returns {dc.scatterPlot} + */ +dc.scatterPlot = function (parent, chartGroup) { + var _chart = dc.coordinateGridMixin({}); + var _symbol = d3.svg.symbol(); + + var _existenceAccessor = function (d) { return d.value; }; + + var originalKeyAccessor = _chart.keyAccessor(); + _chart.keyAccessor(function (d) { return originalKeyAccessor(d)[0]; }); + _chart.valueAccessor(function (d) { return originalKeyAccessor(d)[1]; }); + _chart.colorAccessor(function () { return _chart._groupName; }); + + _chart.title(function (d) { + // this basically just counteracts the setting of its own key/value accessors + // see https://github.com/dc-js/dc.js/issues/702 + return _chart.keyAccessor()(d) + ',' + _chart.valueAccessor()(d) + ': ' + + _chart.existenceAccessor()(d); + }); + + var _locator = function (d) { + return 'translate(' + _chart.x()(_chart.keyAccessor()(d)) + ',' + + _chart.y()(_chart.valueAccessor()(d)) + ')'; + }; + + var _highlightedSize = 7; + var _symbolSize = 5; + var _excludedSize = 3; + var _excludedColor = null; + var _excludedOpacity = 1.0; + var _emptySize = 0; + var _emptyOpacity = 0; + var _nonemptyOpacity = 1; + var _emptyColor = null; + var _filtered = []; + + function elementSize (d, i) { + if (!_existenceAccessor(d)) { + return Math.pow(_emptySize, 2); + } else if (_filtered[i]) { + return Math.pow(_symbolSize, 2); + } else { + return Math.pow(_excludedSize, 2); + } + } + _symbol.size(elementSize); + + dc.override(_chart, '_filter', function (filter) { + if (!arguments.length) { + return _chart.__filter(); + } + + return _chart.__filter(dc.filters.RangedTwoDimensionalFilter(filter)); + }); + + _chart.plotData = function () { + var symbols = _chart.chartBodyG().selectAll('path.symbol') + .data(_chart.data()); + + symbols + .enter() + .append('path') + .attr('class', 'symbol') + .attr('opacity', 0) + .attr('fill', _chart.getColor) + .attr('transform', _locator); + + symbols.call(renderTitles, _chart.data()); + + symbols.each(function (d, i) { + _filtered[i] = !_chart.filter() || _chart.filter().isFiltered([d.key[0], d.key[1]]); + }); + + dc.transition(symbols, _chart.transitionDuration(), _chart.transitionDelay()) + .attr('opacity', function (d, i) { + if (!_existenceAccessor(d)) { + return _emptyOpacity; + } else if (_filtered[i]) { + return _nonemptyOpacity; + } else { + return _chart.excludedOpacity(); + } + }) + .attr('fill', function (d, i) { + if (_emptyColor && !_existenceAccessor(d)) { + return _emptyColor; + } else if (_chart.excludedColor() && !_filtered[i]) { + return _chart.excludedColor(); + } else { + return _chart.getColor(d); + } + }) + .attr('transform', _locator) + .attr('d', _symbol); + + dc.transition(symbols.exit(), _chart.transitionDuration(), _chart.transitionDelay()) + .attr('opacity', 0).remove(); + }; + + function renderTitles (symbol, d) { + if (_chart.renderTitle()) { + symbol.selectAll('title').remove(); + symbol.append('title').text(function (d) { + return _chart.title()(d); + }); + } + } + + /** + * Get or set the existence accessor. If a point exists, it is drawn with + * {@link dc.scatterPlot#symbolSize symbolSize} radius and + * opacity 1; if it does not exist, it is drawn with + * {@link dc.scatterPlot#emptySize emptySize} radius and opacity 0. By default, + * the existence accessor checks if the reduced value is truthy. + * @method existenceAccessor + * @memberof dc.scatterPlot + * @instance + * @see {@link dc.scatterPlot#symbolSize symbolSize} + * @see {@link dc.scatterPlot#emptySize emptySize} + * @example + * // default accessor + * chart.existenceAccessor(function (d) { return d.value; }); + * @param {Function} [accessor] + * @returns {Function|dc.scatterPlot} + */ + _chart.existenceAccessor = function (accessor) { + if (!arguments.length) { + return _existenceAccessor; + } + _existenceAccessor = accessor; + return this; + }; + + /** + * Get or set the symbol type used for each point. By default the symbol is a circle. + * Type can be a constant or an accessor. + * @method symbol + * @memberof dc.scatterPlot + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#symbol_type d3.svg.symbol.type} + * @example + * // Circle type + * chart.symbol('circle'); + * // Square type + * chart.symbol('square'); + * @param {String|Function} [type='circle'] + * @returns {String|Function|dc.scatterPlot} + */ + _chart.symbol = function (type) { + if (!arguments.length) { + return _symbol.type(); + } + _symbol.type(type); + return _chart; + }; + + /** + * Get or set the symbol generator. By default `dc.scatterPlot` will use + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#symbol d3.svg.symbol()} + * to generate symbols. `dc.scatterPlot` will set the + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#symbol_size size accessor} + * on the symbol generator. + * @method customSymbol + * @memberof dc.scatterPlot + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#symbol d3.svg.symbol} + * @see {@link https://stackoverflow.com/questions/25332120/create-additional-d3-js-symbols Create additional D3.js symbols} + * @param {String|Function} [customSymbol=d3.svg.symbol()] + * @returns {String|Function|dc.scatterPlot} + */ + _chart.customSymbol = function (customSymbol) { + if (!arguments.length) { + return _symbol; + } + _symbol = customSymbol; + _symbol.size(elementSize); + return _chart; + }; + + /** + * Set or get radius for symbols. + * @method symbolSize + * @memberof dc.scatterPlot + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#symbol_size d3.svg.symbol.size} + * @param {Number} [symbolSize=3] + * @returns {Number|dc.scatterPlot} + */ + _chart.symbolSize = function (symbolSize) { + if (!arguments.length) { + return _symbolSize; + } + _symbolSize = symbolSize; + return _chart; + }; + + /** + * Set or get radius for highlighted symbols. + * @method highlightedSize + * @memberof dc.scatterPlot + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#symbol_size d3.svg.symbol.size} + * @param {Number} [highlightedSize=5] + * @returns {Number|dc.scatterPlot} + */ + _chart.highlightedSize = function (highlightedSize) { + if (!arguments.length) { + return _highlightedSize; + } + _highlightedSize = highlightedSize; + return _chart; + }; + + /** + * Set or get size for symbols excluded from this chart's filter. If null, no + * special size is applied for symbols based on their filter status. + * @method excludedSize + * @memberof dc.scatterPlot + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#symbol_size d3.svg.symbol.size} + * @param {Number} [excludedSize=null] + * @returns {Number|dc.scatterPlot} + */ + _chart.excludedSize = function (excludedSize) { + if (!arguments.length) { + return _excludedSize; + } + _excludedSize = excludedSize; + return _chart; + }; + + /** + * Set or get color for symbols excluded from this chart's filter. If null, no + * special color is applied for symbols based on their filter status. + * @method excludedColor + * @memberof dc.scatterPlot + * @instance + * @param {Number} [excludedColor=null] + * @returns {Number|dc.scatterPlot} + */ + _chart.excludedColor = function (excludedColor) { + if (!arguments.length) { + return _excludedColor; + } + _excludedColor = excludedColor; + return _chart; + }; + + /** + * Set or get opacity for symbols excluded from this chart's filter. + * @method excludedOpacity + * @memberof dc.scatterPlot + * @instance + * @param {Number} [excludedOpacity=1.0] + * @returns {Number|dc.scatterPlot} + */ + _chart.excludedOpacity = function (excludedOpacity) { + if (!arguments.length) { + return _excludedOpacity; + } + _excludedOpacity = excludedOpacity; + return _chart; + }; + + /** + * Set or get radius for symbols when the group is empty. + * @method emptySize + * @memberof dc.scatterPlot + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#symbol_size d3.svg.symbol.size} + * @param {Number} [emptySize=0] + * @returns {Number|dc.scatterPlot} + */ + _chart.hiddenSize = _chart.emptySize = function (emptySize) { + if (!arguments.length) { + return _emptySize; + } + _emptySize = emptySize; + return _chart; + }; + + /** + * Set or get color for symbols when the group is empty. If null, just use the + * {@link dc.colorMixin#colors colorMixin.colors} color scale zero value. + * @name emptyColor + * @memberof dc.scatterPlot + * @instance + * @param {String} [emptyColor=null] + * @return {String} + * @return {dc.scatterPlot}/ + */ + _chart.emptyColor = function (emptyColor) { + if (!arguments.length) { + return _emptyColor; + } + _emptyColor = emptyColor; + return _chart; + }; + + /** + * Set or get opacity for symbols when the group is empty. + * @name emptyOpacity + * @memberof dc.scatterPlot + * @instance + * @param {Number} [emptyOpacity=0] + * @return {Number} + * @return {dc.scatterPlot} + */ + _chart.emptyOpacity = function (emptyOpacity) { + if (!arguments.length) { + return _emptyOpacity; + } + _emptyOpacity = emptyOpacity; + return _chart; + }; + + /** + * Set or get opacity for symbols when the group is not empty. + * @name nonemptyOpacity + * @memberof dc.scatterPlot + * @instance + * @param {Number} [nonemptyOpacity=1] + * @return {Number} + * @return {dc.scatterPlot} + */ + _chart.nonemptyOpacity = function (nonemptyOpacity) { + if (!arguments.length) { + return _emptyOpacity; + } + _nonemptyOpacity = nonemptyOpacity; + return _chart; + }; + + _chart.legendables = function () { + return [{chart: _chart, name: _chart._groupName, color: _chart.getColor()}]; + }; + + _chart.legendHighlight = function (d) { + resizeSymbolsWhere(function (symbol) { + return symbol.attr('fill') === d.color; + }, _highlightedSize); + _chart.chartBodyG().selectAll('.chart-body path.symbol').filter(function () { + return d3.select(this).attr('fill') !== d.color; + }).classed('fadeout', true); + }; + + _chart.legendReset = function (d) { + resizeSymbolsWhere(function (symbol) { + return symbol.attr('fill') === d.color; + }, _symbolSize); + _chart.chartBodyG().selectAll('.chart-body path.symbol').filter(function () { + return d3.select(this).attr('fill') !== d.color; + }).classed('fadeout', false); + }; + + function resizeSymbolsWhere (condition, size) { + var symbols = _chart.chartBodyG().selectAll('.chart-body path.symbol').filter(function () { + return condition(d3.select(this)); + }); + var oldSize = _symbol.size(); + _symbol.size(Math.pow(size, 2)); + dc.transition(symbols, _chart.transitionDuration(), _chart.transitionDelay()).attr('d', _symbol); + _symbol.size(oldSize); + } + + _chart.setHandlePaths = function () { + // no handle paths for poly-brushes + }; + + _chart.extendBrush = function () { + var extent = _chart.brush().extent(); + if (_chart.round()) { + extent[0] = extent[0].map(_chart.round()); + extent[1] = extent[1].map(_chart.round()); + + _chart.g().select('.brush') + .call(_chart.brush().extent(extent)); + } + return extent; + }; + + _chart.brushIsEmpty = function (extent) { + return _chart.brush().empty() || !extent || extent[0][0] >= extent[1][0] || extent[0][1] >= extent[1][1]; + }; + + _chart._brushing = function () { + var extent = _chart.extendBrush(); + + _chart.redrawBrush(_chart.g()); + + if (_chart.brushIsEmpty(extent)) { + dc.events.trigger(function () { + _chart.filter(null); + _chart.redrawGroup(); + }); + + } else { + var ranged2DFilter = dc.filters.RangedTwoDimensionalFilter(extent); + dc.events.trigger(function () { + _chart.filter(null); + _chart.filter(ranged2DFilter); + _chart.redrawGroup(); + }, dc.constants.EVENT_DELAY); + + } + }; + + _chart.setBrushY = function (gBrush) { + gBrush.call(_chart.brush().y(_chart.y())); + }; + + return _chart.anchor(parent, chartGroup); +}; + +/** + * A display of a single numeric value. + * Unlike other charts, you do not need to set a dimension. Instead a group object must be provided and + * a valueAccessor that returns a single value. + * @class numberDisplay + * @memberof dc + * @mixes dc.baseMixin + * @example + * // create a number display under #chart-container1 element using the default global chart group + * var display1 = dc.numberDisplay('#chart-container1'); + * @param {String|node|d3.selection} parent - Any valid + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying + * a dom block element such as a div; or a dom element or d3 selection. + * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in. + * Interaction with a chart will only trigger events and redraws within the chart's group. + * @returns {dc.numberDisplay} + */ +dc.numberDisplay = function (parent, chartGroup) { + var SPAN_CLASS = 'number-display'; + var _formatNumber = d3.format('.2s'); + var _chart = dc.baseMixin({}); + var _html = {one: '', some: '', none: ''}; + var _lastValue; + + // dimension not required + _chart._mandatoryAttributes(['group']); + + // default to ordering by value, to emulate old group.top(1) behavior when multiple groups + _chart.ordering(function (kv) { return kv.value; }); + + /** + * Gets or sets an optional object specifying HTML templates to use depending on the number + * displayed. The text `%number` will be replaced with the current value. + * - one: HTML template to use if the number is 1 + * - zero: HTML template to use if the number is 0 + * - some: HTML template to use otherwise + * @method html + * @memberof dc.numberDisplay + * @instance + * @example + * numberWidget.html({ + * one:'%number record', + * some:'%number records', + * none:'no records'}) + * @param {{one:String, some:String, none:String}} [html={one: '', some: '', none: ''}] + * @returns {{one:String, some:String, none:String}|dc.numberDisplay} + */ + _chart.html = function (html) { + if (!arguments.length) { + return _html; + } + if (html.none) { + _html.none = html.none;//if none available + } else if (html.one) { + _html.none = html.one;//if none not available use one + } else if (html.some) { + _html.none = html.some;//if none and one not available use some + } + if (html.one) { + _html.one = html.one;//if one available + } else if (html.some) { + _html.one = html.some;//if one not available use some + } + if (html.some) { + _html.some = html.some;//if some available + } else if (html.one) { + _html.some = html.one;//if some not available use one + } + return _chart; + }; + + /** + * Calculate and return the underlying value of the display. + * @method value + * @memberof dc.numberDisplay + * @instance + * @returns {Number} + */ + _chart.value = function () { + return _chart.data(); + }; + + function maxBin (all) { + if (!all.length) { + return null; + } + var sorted = _chart._computeOrderedGroups(all); + return sorted[sorted.length - 1]; + } + _chart.data(function (group) { + var valObj = group.value ? group.value() : maxBin(group.all()); + return _chart.valueAccessor()(valObj); + }); + + _chart.transitionDuration(250); // good default + _chart.transitionDelay(0); + + _chart._doRender = function () { + var newValue = _chart.value(), + span = _chart.selectAll('.' + SPAN_CLASS); + + if (span.empty()) { + span = span.data([0]) + .enter() + .append('span') + .attr('class', SPAN_CLASS); + } + + span.transition() + .duration(_chart.transitionDuration()) + .delay(_chart.transitionDelay()) + .ease('quad-out-in') + .tween('text', function () { + // [XA] don't try and interpolate from Infinity, else this breaks. + var interpStart = isFinite(_lastValue) ? _lastValue : 0; + var interp = d3.interpolateNumber(interpStart || 0, newValue); + _lastValue = newValue; + return function (t) { + var html = null, num = _chart.formatNumber()(interp(t)); + if (newValue === 0 && (_html.none !== '')) { + html = _html.none; + } else if (newValue === 1 && (_html.one !== '')) { + html = _html.one; + } else if (_html.some !== '') { + html = _html.some; + } + this.innerHTML = html ? html.replace('%number', num) : num; + }; + }); + }; + + _chart._doRedraw = function () { + return _chart._doRender(); + }; + + /** + * Get or set a function to format the value for the display. + * @method formatNumber + * @memberof dc.numberDisplay + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md d3.format} + * @param {Function} [formatter=d3.format('.2s')] + * @returns {Function|dc.numberDisplay} + */ + _chart.formatNumber = function (formatter) { + if (!arguments.length) { + return _formatNumber; + } + _formatNumber = formatter; + return _chart; + }; + + return _chart.anchor(parent, chartGroup); +}; + +/** + * A heat map is matrix that represents the values of two dimensions of data using colors. + * @class heatMap + * @memberof dc + * @mixes dc.colorMixin + * @mixes dc.marginMixin + * @mixes dc.baseMixin + * @example + * // create a heat map under #chart-container1 element using the default global chart group + * var heatMap1 = dc.heatMap('#chart-container1'); + * // create a heat map under #chart-container2 element using chart group A + * var heatMap2 = dc.heatMap('#chart-container2', 'chartGroupA'); + * @param {String|node|d3.selection} parent - Any valid + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying + * a dom block element such as a div; or a dom element or d3 selection. + * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in. + * Interaction with a chart will only trigger events and redraws within the chart's group. + * @returns {dc.heatMap} + */ +dc.heatMap = function (parent, chartGroup) { + + var DEFAULT_BORDER_RADIUS = 6.75; + + var _chartBody; + + var _cols; + var _rows; + var _colOrdering = d3.ascending; + var _rowOrdering = d3.ascending; + var _colScale = d3.scale.ordinal(); + var _rowScale = d3.scale.ordinal(); + + var _xBorderRadius = DEFAULT_BORDER_RADIUS; + var _yBorderRadius = DEFAULT_BORDER_RADIUS; + + var _chart = dc.colorMixin(dc.marginMixin(dc.baseMixin({}))); + _chart._mandatoryAttributes(['group']); + _chart.title(_chart.colorAccessor()); + + var _colsLabel = function (d) { + return d; + }; + var _rowsLabel = function (d) { + return d; + }; + + /** + * Set or get the column label function. The chart class uses this function to render + * column labels on the X axis. It is passed the column name. + * @method colsLabel + * @memberof dc.heatMap + * @instance + * @example + * // the default label function just returns the name + * chart.colsLabel(function(d) { return d; }); + * @param {Function} [labelFunction=function(d) { return d; }] + * @returns {Function|dc.heatMap} + */ + _chart.colsLabel = function (labelFunction) { + if (!arguments.length) { + return _colsLabel; + } + _colsLabel = labelFunction; + return _chart; + }; + + /** + * Set or get the row label function. The chart class uses this function to render + * row labels on the Y axis. It is passed the row name. + * @method rowsLabel + * @memberof dc.heatMap + * @instance + * @example + * // the default label function just returns the name + * chart.rowsLabel(function(d) { return d; }); + * @param {Function} [labelFunction=function(d) { return d; }] + * @returns {Function|dc.heatMap} + */ + _chart.rowsLabel = function (labelFunction) { + if (!arguments.length) { + return _rowsLabel; + } + _rowsLabel = labelFunction; + return _chart; + }; + + var _xAxisOnClick = function (d) { filterAxis(0, d); }; + var _yAxisOnClick = function (d) { filterAxis(1, d); }; + var _boxOnClick = function (d) { + var filter = d.key; + dc.events.trigger(function () { + _chart.filter(filter); + _chart.redrawGroup(); + }); + }; + + function filterAxis (axis, value) { + var cellsOnAxis = _chart.selectAll('.box-group').filter(function (d) { + return d.key[axis] === value; + }); + var unfilteredCellsOnAxis = cellsOnAxis.filter(function (d) { + return !_chart.hasFilter(d.key); + }); + dc.events.trigger(function () { + var selection = unfilteredCellsOnAxis.empty() ? cellsOnAxis : unfilteredCellsOnAxis; + var filters = selection.data().map(function (kv) { + return dc.filters.TwoDimensionalFilter(kv.key); + }); + _chart._filter([filters]); + _chart.redrawGroup(); + }); + } + + dc.override(_chart, 'filter', function (filter) { + if (!arguments.length) { + return _chart._filter(); + } + + return _chart._filter(dc.filters.TwoDimensionalFilter(filter)); + }); + + /** + * Gets or sets the values used to create the rows of the heatmap, as an array. By default, all + * the values will be fetched from the data using the value accessor. + * @method rows + * @memberof dc.heatMap + * @instance + * @param {Array<String|Number>} [rows] + * @returns {Array<String|Number>|dc.heatMap} + */ + + _chart.rows = function (rows) { + if (!arguments.length) { + return _rows; + } + _rows = rows; + return _chart; + }; + + /** + #### .rowOrdering([orderFunction]) + Get or set an accessor to order the rows. Default is d3.ascending. + */ + _chart.rowOrdering = function (_) { + if (!arguments.length) { + return _rowOrdering; + } + _rowOrdering = _; + return _chart; + }; + + /** + * Gets or sets the keys used to create the columns of the heatmap, as an array. By default, all + * the values will be fetched from the data using the key accessor. + * @method cols + * @memberof dc.heatMap + * @instance + * @param {Array<String|Number>} [cols] + * @returns {Array<String|Number>|dc.heatMap} + */ + _chart.cols = function (cols) { + if (!arguments.length) { + return _cols; + } + _cols = cols; + return _chart; + }; + + /** + #### .colOrdering([orderFunction]) + Get or set an accessor to order the cols. Default is ascending. + */ + _chart.colOrdering = function (_) { + if (!arguments.length) { + return _colOrdering; + } + _colOrdering = _; + return _chart; + }; + + _chart._doRender = function () { + _chart.resetSvg(); + + _chartBody = _chart.svg() + .append('g') + .attr('class', 'heatmap') + .attr('transform', 'translate(' + _chart.margins().left + ',' + _chart.margins().top + ')'); + + return _chart._doRedraw(); + }; + + _chart._doRedraw = function () { + var data = _chart.data(), + rows = _chart.rows() || data.map(_chart.valueAccessor()), + cols = _chart.cols() || data.map(_chart.keyAccessor()); + if (_rowOrdering) { + rows = rows.sort(_rowOrdering); + } + if (_colOrdering) { + cols = cols.sort(_colOrdering); + } + rows = _rowScale.domain(rows); + cols = _colScale.domain(cols); + + var rowCount = rows.domain().length, + colCount = cols.domain().length, + boxWidth = Math.floor(_chart.effectiveWidth() / colCount), + boxHeight = Math.floor(_chart.effectiveHeight() / rowCount); + + cols.rangeRoundBands([0, _chart.effectiveWidth()]); + rows.rangeRoundBands([_chart.effectiveHeight(), 0]); + + var boxes = _chartBody.selectAll('g.box-group').data(_chart.data(), function (d, i) { + return _chart.keyAccessor()(d, i) + '\0' + _chart.valueAccessor()(d, i); + }); + var gEnter = boxes.enter().append('g') + .attr('class', 'box-group'); + + gEnter.append('rect') + .attr('class', 'heat-box') + .attr('fill', 'white') + .on('click', _chart.boxOnClick()); + + if (_chart.renderTitle()) { + gEnter.append('title'); + boxes.select('title').text(_chart.title()); + } + + dc.transition(boxes.select('rect'), _chart.transitionDuration(), _chart.transitionDelay()) + .attr('x', function (d, i) { return cols(_chart.keyAccessor()(d, i)); }) + .attr('y', function (d, i) { return rows(_chart.valueAccessor()(d, i)); }) + .attr('rx', _xBorderRadius) + .attr('ry', _yBorderRadius) + .attr('fill', _chart.getColor) + .attr('width', boxWidth) + .attr('height', boxHeight); + + boxes.exit().remove(); + + var gCols = _chartBody.select('g.cols'); + if (gCols.empty()) { + gCols = _chartBody.append('g').attr('class', 'cols axis'); + } + var gColsText = gCols.selectAll('text').data(cols.domain()); + gColsText.enter().append('text') + .attr('x', function (d) { return cols(d) + boxWidth / 2; }) + .style('text-anchor', 'middle') + .attr('y', _chart.effectiveHeight()) + .attr('dy', 12) + .on('click', _chart.xAxisOnClick()) + .text(_chart.colsLabel()); + dc.transition(gColsText, _chart.transitionDuration(), _chart.transitionDelay()) + .text(_chart.colsLabel()) + .attr('x', function (d) { return cols(d) + boxWidth / 2; }) + .attr('y', _chart.effectiveHeight()); + gColsText.exit().remove(); + var gRows = _chartBody.select('g.rows'); + if (gRows.empty()) { + gRows = _chartBody.append('g').attr('class', 'rows axis'); + } + var gRowsText = gRows.selectAll('text').data(rows.domain()); + gRowsText.enter().append('text') + .attr('dy', 6) + .style('text-anchor', 'end') + .attr('x', 0) + .attr('dx', -2) + .on('click', _chart.yAxisOnClick()) + .text(_chart.rowsLabel()); + dc.transition(gRowsText, _chart.transitionDuration(), _chart.transitionDelay()) + .text(_chart.rowsLabel()) + .attr('y', function (d) { return rows(d) + boxHeight / 2; }); + gRowsText.exit().remove(); + + if (_chart.hasFilter()) { + _chart.selectAll('g.box-group').each(function (d) { + if (_chart.isSelectedNode(d)) { + _chart.highlightSelected(this); + } else { + _chart.fadeDeselected(this); + } + }); + } else { + _chart.selectAll('g.box-group').each(function () { + _chart.resetHighlight(this); + }); + } + return _chart; + }; + + /** + * Gets or sets the handler that fires when an individual cell is clicked in the heatmap. + * By default, filtering of the cell will be toggled. + * @method boxOnClick + * @memberof dc.heatMap + * @instance + * @example + * // default box on click handler + * chart.boxOnClick(function (d) { + * var filter = d.key; + * dc.events.trigger(function () { + * _chart.filter(filter); + * _chart.redrawGroup(); + * }); + * }); + * @param {Function} [handler] + * @returns {Function|dc.heatMap} + */ + _chart.boxOnClick = function (handler) { + if (!arguments.length) { + return _boxOnClick; + } + _boxOnClick = handler; + return _chart; + }; + + /** + * Gets or sets the handler that fires when a column tick is clicked in the x axis. + * By default, if any cells in the column are unselected, the whole column will be selected, + * otherwise the whole column will be unselected. + * @method xAxisOnClick + * @memberof dc.heatMap + * @instance + * @param {Function} [handler] + * @returns {Function|dc.heatMap} + */ + _chart.xAxisOnClick = function (handler) { + if (!arguments.length) { + return _xAxisOnClick; + } + _xAxisOnClick = handler; + return _chart; + }; + + /** + * Gets or sets the handler that fires when a row tick is clicked in the y axis. + * By default, if any cells in the row are unselected, the whole row will be selected, + * otherwise the whole row will be unselected. + * @method yAxisOnClick + * @memberof dc.heatMap + * @instance + * @param {Function} [handler] + * @returns {Function|dc.heatMap} + */ + _chart.yAxisOnClick = function (handler) { + if (!arguments.length) { + return _yAxisOnClick; + } + _yAxisOnClick = handler; + return _chart; + }; + + /** + * Gets or sets the X border radius. Set to 0 to get full rectangles. + * @method xBorderRadius + * @memberof dc.heatMap + * @instance + * @param {Number} [xBorderRadius=6.75] + * @returns {Number|dc.heatMap} + */ + _chart.xBorderRadius = function (xBorderRadius) { + if (!arguments.length) { + return _xBorderRadius; + } + _xBorderRadius = xBorderRadius; + return _chart; + }; + + /** + * Gets or sets the Y border radius. Set to 0 to get full rectangles. + * @method yBorderRadius + * @memberof dc.heatMap + * @instance + * @param {Number} [yBorderRadius=6.75] + * @returns {Number|dc.heatMap} + */ + _chart.yBorderRadius = function (yBorderRadius) { + if (!arguments.length) { + return _yBorderRadius; + } + _yBorderRadius = yBorderRadius; + return _chart; + }; + + _chart.isSelectedNode = function (d) { + return _chart.hasFilter(d.key); + }; + + return _chart.anchor(parent, chartGroup); +}; + +// https://github.com/d3/d3-plugins/blob/master/box/box.js +(function () { + + // Inspired by http://informationandvisualization.de/blog/box-plot + d3.box = function () { + var width = 1, + height = 1, + duration = 0, + delay = 0, + domain = null, + value = Number, + whiskers = boxWhiskers, + quartiles = boxQuartiles, + tickFormat = null; + + // For each small multiple… + function box (g) { + g.each(function (d, i) { + d = d.map(value).sort(d3.ascending); + var g = d3.select(this), + n = d.length, + min = d[0], + max = d[n - 1]; + + // Compute quartiles. Must return exactly 3 elements. + var quartileData = d.quartiles = quartiles(d); + + // Compute whiskers. Must return exactly 2 elements, or null. + var whiskerIndices = whiskers && whiskers.call(this, d, i), + whiskerData = whiskerIndices && whiskerIndices.map(function (i) { return d[i]; }); + + // Compute outliers. If no whiskers are specified, all data are 'outliers'. + // We compute the outliers as indices, so that we can join across transitions! + var outlierIndices = whiskerIndices ? + d3.range(0, whiskerIndices[0]).concat(d3.range(whiskerIndices[1] + 1, n)) : d3.range(n); + + // Compute the new x-scale. + var x1 = d3.scale.linear() + .domain(domain && domain.call(this, d, i) || [min, max]) + .range([height, 0]); + + // Retrieve the old x-scale, if this is an update. + var x0 = this.__chart__ || d3.scale.linear() + .domain([0, Infinity]) + .range(x1.range()); + + // Stash the new scale. + this.__chart__ = x1; + + // Note: the box, median, and box tick elements are fixed in number, + // so we only have to handle enter and update. In contrast, the outliers + // and other elements are variable, so we need to exit them! Variable + // elements also fade in and out. + + // Update center line: the vertical line spanning the whiskers. + var center = g.selectAll('line.center') + .data(whiskerData ? [whiskerData] : []); + + center.enter().insert('line', 'rect') + .attr('class', 'center') + .attr('x1', width / 2) + .attr('y1', function (d) { return x0(d[0]); }) + .attr('x2', width / 2) + .attr('y2', function (d) { return x0(d[1]); }) + .style('opacity', 1e-6) + .transition() + .duration(duration) + .delay(delay) + .style('opacity', 1) + .attr('y1', function (d) { return x1(d[0]); }) + .attr('y2', function (d) { return x1(d[1]); }); + + center.transition() + .duration(duration) + .delay(delay) + .style('opacity', 1) + .attr('x1', width / 2) + .attr('x2', width / 2) + .attr('y1', function (d) { return x1(d[0]); }) + .attr('y2', function (d) { return x1(d[1]); }); + + center.exit().transition() + .duration(duration) + .delay(delay) + .style('opacity', 1e-6) + .attr('y1', function (d) { return x1(d[0]); }) + .attr('y2', function (d) { return x1(d[1]); }) + .remove(); + + // Update innerquartile box. + var box = g.selectAll('rect.box') + .data([quartileData]); + + box.enter().append('rect') + .attr('class', 'box') + .attr('x', 0) + .attr('y', function (d) { return x0(d[2]); }) + .attr('width', width) + .attr('height', function (d) { return x0(d[0]) - x0(d[2]); }) + .transition() + .duration(duration) + .delay(delay) + .attr('y', function (d) { return x1(d[2]); }) + .attr('height', function (d) { return x1(d[0]) - x1(d[2]); }); + + box.transition() + .duration(duration) + .delay(delay) + .attr('width', width) + .attr('y', function (d) { return x1(d[2]); }) + .attr('height', function (d) { return x1(d[0]) - x1(d[2]); }); + + // Update median line. + var medianLine = g.selectAll('line.median') + .data([quartileData[1]]); + + medianLine.enter().append('line') + .attr('class', 'median') + .attr('x1', 0) + .attr('y1', x0) + .attr('x2', width) + .attr('y2', x0) + .transition() + .duration(duration) + .delay(delay) + .attr('y1', x1) + .attr('y2', x1); + + medianLine.transition() + .duration(duration) + .delay(delay) + .attr('x1', 0) + .attr('x2', width) + .attr('y1', x1) + .attr('y2', x1); + + // Update whiskers. + var whisker = g.selectAll('line.whisker') + .data(whiskerData || []); + + whisker.enter().insert('line', 'circle, text') + .attr('class', 'whisker') + .attr('x1', 0) + .attr('y1', x0) + .attr('x2', width) + .attr('y2', x0) + .style('opacity', 1e-6) + .transition() + .duration(duration) + .delay(delay) + .attr('y1', x1) + .attr('y2', x1) + .style('opacity', 1); + + whisker.transition() + .duration(duration) + .delay(delay) + .attr('x1', 0) + .attr('x2', width) + .attr('y1', x1) + .attr('y2', x1) + .style('opacity', 1); + + whisker.exit().transition() + .duration(duration) + .delay(delay) + .attr('y1', x1) + .attr('y2', x1) + .style('opacity', 1e-6) + .remove(); + + // Update outliers. + var outlier = g.selectAll('circle.outlier') + .data(outlierIndices, Number); + + outlier.enter().insert('circle', 'text') + .attr('class', 'outlier') + .attr('r', 5) + .attr('cx', width / 2) + .attr('cy', function (i) { return x0(d[i]); }) + .style('opacity', 1e-6) + .transition() + .duration(duration) + .delay(delay) + .attr('cy', function (i) { return x1(d[i]); }) + .style('opacity', 1); + + outlier.transition() + .duration(duration) + .delay(delay) + .attr('cx', width / 2) + .attr('cy', function (i) { return x1(d[i]); }) + .style('opacity', 1); + + outlier.exit().transition() + .duration(duration) + .delay(delay) + .attr('cy', function (i) { return x1(d[i]); }) + .style('opacity', 1e-6) + .remove(); + + // Compute the tick format. + var format = tickFormat || x1.tickFormat(8); + + // Update box ticks. + var boxTick = g.selectAll('text.box') + .data(quartileData); + + boxTick.enter().append('text') + .attr('class', 'box') + .attr('dy', '.3em') + .attr('dx', function (d, i) { return i & 1 ? 6 : -6; }) + .attr('x', function (d, i) { return i & 1 ? width : 0; }) + .attr('y', x0) + .attr('text-anchor', function (d, i) { return i & 1 ? 'start' : 'end'; }) + .text(format) + .transition() + .duration(duration) + .delay(delay) + .attr('y', x1); + + boxTick.transition() + .duration(duration) + .delay(delay) + .text(format) + .attr('x', function (d, i) { return i & 1 ? width : 0; }) + .attr('y', x1); + + // Update whisker ticks. These are handled separately from the box + // ticks because they may or may not exist, and we want don't want + // to join box ticks pre-transition with whisker ticks post-. + var whiskerTick = g.selectAll('text.whisker') + .data(whiskerData || []); + + whiskerTick.enter().append('text') + .attr('class', 'whisker') + .attr('dy', '.3em') + .attr('dx', 6) + .attr('x', width) + .attr('y', x0) + .text(format) + .style('opacity', 1e-6) + .transition() + .duration(duration) + .delay(delay) + .attr('y', x1) + .style('opacity', 1); + + whiskerTick.transition() + .duration(duration) + .delay(delay) + .text(format) + .attr('x', width) + .attr('y', x1) + .style('opacity', 1); + + whiskerTick.exit().transition() + .duration(duration) + .delay(delay) + .attr('y', x1) + .style('opacity', 1e-6) + .remove(); + }); + d3.timer.flush(); + } + + box.width = function (x) { + if (!arguments.length) { + return width; + } + width = x; + return box; + }; + + box.height = function (x) { + if (!arguments.length) { + return height; + } + height = x; + return box; + }; + + box.tickFormat = function (x) { + if (!arguments.length) { + return tickFormat; + } + tickFormat = x; + return box; + }; + + box.duration = function (x) { + if (!arguments.length) { + return duration; + } + duration = x; + return box; + }; + + box.domain = function (x) { + if (!arguments.length) { + return domain; + } + domain = x === null ? x : d3.functor(x); + return box; + }; + + box.value = function (x) { + if (!arguments.length) { + return value; + } + value = x; + return box; + }; + + box.whiskers = function (x) { + if (!arguments.length) { + return whiskers; + } + whiskers = x; + return box; + }; + + box.quartiles = function (x) { + if (!arguments.length) { + return quartiles; + } + quartiles = x; + return box; + }; + + return box; + }; + + function boxWhiskers (d) { + return [0, d.length - 1]; + } + + function boxQuartiles (d) { + return [ + d3.quantile(d, 0.25), + d3.quantile(d, 0.5), + d3.quantile(d, 0.75) + ]; + } + +})(); + + +/** + * A box plot is a chart that depicts numerical data via their quartile ranges. + * + * Examples: + * - {@link http://dc-js.github.io/dc.js/examples/box-plot-time.html Box plot time example} + * - {@link http://dc-js.github.io/dc.js/examples/box-plot.html Box plot example} + * @class boxPlot + * @memberof dc + * @mixes dc.coordinateGridMixin + * @example + * // create a box plot under #chart-container1 element using the default global chart group + * var boxPlot1 = dc.boxPlot('#chart-container1'); + * // create a box plot under #chart-container2 element using chart group A + * var boxPlot2 = dc.boxPlot('#chart-container2', 'chartGroupA'); + * @param {String|node|d3.selection} parent - Any valid + * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying + * a dom block element such as a div; or a dom element or d3 selection. + * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in. + * Interaction with a chart will only trigger events and redraws within the chart's group. + * @returns {dc.boxPlot} + */ +dc.boxPlot = function (parent, chartGroup) { + var _chart = dc.coordinateGridMixin({}); + + // Returns a function to compute the interquartile range. + function DEFAULT_WHISKERS_IQR (k) { + return function (d) { + var q1 = d.quartiles[0], + q3 = d.quartiles[2], + iqr = (q3 - q1) * k, + i = -1, + j = d.length; + do { ++i; } while (d[i] < q1 - iqr); + do { --j; } while (d[j] > q3 + iqr); + return [i, j]; + }; + } + + var _whiskerIqrFactor = 1.5; + var _whiskersIqr = DEFAULT_WHISKERS_IQR; + var _whiskers = _whiskersIqr(_whiskerIqrFactor); + + var _box = d3.box(); + var _tickFormat = null; + + var _boxWidth = function (innerChartWidth, xUnits) { + if (_chart.isOrdinal()) { + return _chart.x().rangeBand(); + } else { + return innerChartWidth / (1 + _chart.boxPadding()) / xUnits; + } + }; + + // default padding to handle min/max whisker text + _chart.yAxisPadding(12); + + // default to ordinal + _chart.x(d3.scale.ordinal()); + _chart.xUnits(dc.units.ordinal); + + // valueAccessor should return an array of values that can be coerced into numbers + // or if data is overloaded for a static array of arrays, it should be `Number`. + // Empty arrays are not included. + _chart.data(function (group) { + return group.all().map(function (d) { + d.map = function (accessor) { return accessor.call(d, d); }; + return d; + }).filter(function (d) { + var values = _chart.valueAccessor()(d); + return values.length !== 0; + }); + }); + + /** + * Get or set the spacing between boxes as a fraction of box size. Valid values are within 0-1. + * See the {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Ordinal-Scales.md#ordinal_rangeBands d3 docs} + * for a visual description of how the padding is applied. + * @method boxPadding + * @memberof dc.boxPlot + * @instance + * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Ordinal-Scales.md#ordinal_rangeBands d3.scale.ordinal.rangeBands} + * @param {Number} [padding=0.8] + * @returns {Number|dc.boxPlot} + */ + _chart.boxPadding = _chart._rangeBandPadding; + _chart.boxPadding(0.8); + + /** + * Get or set the outer padding on an ordinal box chart. This setting has no effect on non-ordinal charts + * or on charts with a custom {@link dc.boxPlot#boxWidth .boxWidth}. Will pad the width by + * `padding * barWidth` on each side of the chart. + * @method outerPadding + * @memberof dc.boxPlot + * @instance + * @param {Number} [padding=0.5] + * @returns {Number|dc.boxPlot} + */ + _chart.outerPadding = _chart._outerRangeBandPadding; + _chart.outerPadding(0.5); + + /** + * Get or set the numerical width of the boxplot box. The width may also be a function taking as + * parameters the chart width excluding the right and left margins, as well as the number of x + * units. + * @example + * // Using numerical parameter + * chart.boxWidth(10); + * // Using function + * chart.boxWidth((innerChartWidth, xUnits) { ... }); + * @method boxWidth + * @memberof dc.boxPlot + * @instance + * @param {Number|Function} [boxWidth=0.5] + * @returns {Number|Function|dc.boxPlot} + */ + _chart.boxWidth = function (boxWidth) { + if (!arguments.length) { + return _boxWidth; + } + _boxWidth = d3.functor(boxWidth); + return _chart; + }; + + var boxTransform = function (d, i) { + var xOffset = _chart.x()(_chart.keyAccessor()(d, i)); + return 'translate(' + xOffset + ', 0)'; + }; + + _chart._preprocessData = function () { + if (_chart.elasticX()) { + _chart.x().domain([]); + } + }; + + _chart.plotData = function () { + var _calculatedBoxWidth = _boxWidth(_chart.effectiveWidth(), _chart.xUnitCount()); + + _box.whiskers(_whiskers) + .width(_calculatedBoxWidth) + .height(_chart.effectiveHeight()) + .value(_chart.valueAccessor()) + .domain(_chart.y().domain()) + .duration(_chart.transitionDuration()) + .tickFormat(_tickFormat); + + var boxesG = _chart.chartBodyG().selectAll('g.box').data(_chart.data(), _chart.keyAccessor()); + + renderBoxes(boxesG); + updateBoxes(boxesG); + removeBoxes(boxesG); + + _chart.fadeDeselectedArea(); + }; + + function renderBoxes (boxesG) { + var boxesGEnter = boxesG.enter().append('g'); + + boxesGEnter + .attr('class', 'box') + .attr('transform', boxTransform) + .call(_box) + .on('click', function (d) { + _chart.filter(_chart.keyAccessor()(d)); + _chart.redrawGroup(); + }); + } + + function updateBoxes (boxesG) { + dc.transition(boxesG, _chart.transitionDuration(), _chart.transitionDelay()) + .attr('transform', boxTransform) + .call(_box) + .each(function () { + d3.select(this).select('rect.box').attr('fill', _chart.getColor); + }); + } + + function removeBoxes (boxesG) { + boxesG.exit().remove().call(_box); + } + + _chart.fadeDeselectedArea = function () { + if (_chart.hasFilter()) { + if (_chart.isOrdinal()) { + _chart.g().selectAll('g.box').each(function (d) { + if (_chart.isSelectedNode(d)) { + _chart.highlightSelected(this); + } else { + _chart.fadeDeselected(this); + } + }); + } else { + var extent = _chart.brush().extent(); + var start = extent[0]; + var end = extent[1]; + var keyAccessor = _chart.keyAccessor(); + _chart.g().selectAll('g.box').each(function (d) { + var key = keyAccessor(d); + if (key < start || key >= end) { + _chart.fadeDeselected(this); + } else { + _chart.highlightSelected(this); + } + }); + } + } else { + _chart.g().selectAll('g.box').each(function () { + _chart.resetHighlight(this); + }); + } + }; + + _chart.isSelectedNode = function (d) { + return _chart.hasFilter(_chart.keyAccessor()(d)); + }; + + _chart.yAxisMin = function () { + var min = d3.min(_chart.data(), function (e) { + return d3.min(_chart.valueAccessor()(e)); + }); + return dc.utils.subtract(min, _chart.yAxisPadding()); + }; + + _chart.yAxisMax = function () { + var max = d3.max(_chart.data(), function (e) { + return d3.max(_chart.valueAccessor()(e)); + }); + return dc.utils.add(max, _chart.yAxisPadding()); + }; + + /** + * Set the numerical format of the boxplot median, whiskers and quartile labels. Defaults to + * integer formatting. + * @example + * // format ticks to 2 decimal places + * chart.tickFormat(d3.format('.2f')); + * @method tickFormat + * @memberof dc.boxPlot + * @instance + * @param {Function} [tickFormat] + * @returns {Number|Function|dc.boxPlot} + */ + _chart.tickFormat = function (tickFormat) { + if (!arguments.length) { + return _tickFormat; + } + _tickFormat = tickFormat; + return _chart; + }; + + return _chart.anchor(parent, chartGroup); +}; + +/** + * The select menu is a simple widget designed to filter a dimension by selecting an option from + * an HTML `<select/>` menu. The menu can be optionally turned into a multiselect. + * @class selectMenu + * @memberof dc + * @mixes dc.baseMixin + * @example + * // create a select menu under #select-container using the default global chart group + * var select = dc.selectMenu('#select-container') + * .dimension(states) + * .group(stateGroup); + * // the option text can be set via the title() function + * // by default the option text is '`key`: `value`' + * select.title(function (d){ + * return 'STATE: ' + d.key; + * }) + * @param {String|node|d3.selection|dc.compositeChart} parent - Any valid + * [d3 single selector](https://github.com/mbostock/d3/wiki/Selections#selecting-elements) specifying + * a dom block element such as a div; or a dom element or d3 selection. + * @param {String} [chartGroup] - The name of the chart group this widget should be placed in. + * Interaction with the widget will only trigger events and redraws within its group. + * @returns {selectMenu} + **/ +dc.selectMenu = function (parent, chartGroup) { + var SELECT_CSS_CLASS = 'dc-select-menu'; + var OPTION_CSS_CLASS = 'dc-select-option'; + + var _chart = dc.baseMixin({}); + + var _select; + var _promptText = 'Select all'; + var _multiple = false; + var _promptValue = null; + var _numberVisible = null; + var _order = function (a, b) { + return _chart.keyAccessor()(a) > _chart.keyAccessor()(b) ? + 1 : _chart.keyAccessor()(b) > _chart.keyAccessor()(a) ? + -1 : 0; + }; + + var _filterDisplayed = function (d) { + return _chart.valueAccessor()(d) > 0; + }; + + _chart.data(function (group) { + return group.all().filter(_filterDisplayed); + }); + + _chart._doRender = function () { + _chart.select('select').remove(); + _select = _chart.root().append('select') + .classed(SELECT_CSS_CLASS, true); + _select.append('option').text(_promptText).attr('value', ''); + + _chart._doRedraw(); + return _chart; + }; + // Fixing IE 11 crash when redrawing the chart + // see here for list of IE user Agents : + // http://www.useragentstring.com/pages/useragentstring.php?name=Internet+Explorer + var ua = window.navigator.userAgent; + // test for IE 11 but not a lower version (which contains MSIE in UA) + if (ua.indexOf('Trident/') > 0 && ua.indexOf('MSIE') === -1) { + _chart.redraw = _chart.render; + } + + _chart._doRedraw = function () { + setAttributes(); + renderOptions(); + // select the option(s) corresponding to current filter(s) + if (_chart.hasFilter() && _multiple) { + _select.selectAll('option') + .property('selected', function (d) { + return typeof d !== 'undefined' && _chart.filters().indexOf(String(_chart.keyAccessor()(d))) >= 0; + }); + } else if (_chart.hasFilter()) { + _select.property('value', _chart.filter()); + } else { + _select.property('value', ''); + } + return _chart; + }; + + function renderOptions () { + var options = _select.selectAll('option.' + OPTION_CSS_CLASS) + .data(_chart.data(), function (d) { return _chart.keyAccessor()(d); }); + + options.enter() + .append('option') + .classed(OPTION_CSS_CLASS, true) + .attr('value', function (d) { return _chart.keyAccessor()(d); }); + + options.text(_chart.title()); + options.exit().remove(); + _select.selectAll('option.' + OPTION_CSS_CLASS).sort(_order); + + _select.on('change', onChange); + return options; + } + + function onChange (d, i) { + var values; + var target = d3.event.target; + if (target.selectedOptions) { + var selectedOptions = Array.prototype.slice.call(target.selectedOptions); + values = selectedOptions.map(function (d) { + return d.value; + }); + } else { // IE and other browsers do not support selectedOptions + // adapted from this polyfill: https://gist.github.com/brettz9/4212217 + var options = [].slice.call(d3.event.target.options); + values = options.filter(function (option) { + return option.selected; + }).map(function (option) { + return option.value; + }); + } + // console.log(values); + // check if only prompt option is selected + if (values.length === 1 && values[0] === '') { + values = _promptValue || null; + } else if (!_multiple && values.length === 1) { + values = values[0]; + } + _chart.onChange(values); + } + + _chart.onChange = function (val) { + if (val && _multiple) { + _chart.replaceFilter([val]); + } else if (val) { + _chart.replaceFilter(val); + } else { + _chart.filterAll(); + } + dc.events.trigger(function () { + _chart.redrawGroup(); + }); + }; + + function setAttributes () { + if (_multiple) { + _select.attr('multiple', true); + } else { + _select.attr('multiple', null); + } + if (_numberVisible !== null) { + _select.attr('size', _numberVisible); + } else { + _select.attr('size', null); + } + } + + /** + * Get or set the function that controls the ordering of option tags in the + * select menu. By default options are ordered by the group key in ascending + * order. + * @name order + * @memberof dc.selectMenu + * @instance + * @param {Function} [order] + * @example + * // order by the group's value + * chart.order(function (a,b) { + * return a.value > b.value ? 1 : b.value > a.value ? -1 : 0; + * }); + **/ + _chart.order = function (order) { + if (!arguments.length) { + return _order; + } + _order = order; + return _chart; + }; + + /** + * Get or set the text displayed in the options used to prompt selection. + * @name promptText + * @memberof dc.selectMenu + * @instance + * @param {String} [promptText='Select all'] + * @example + * chart.promptText('All states'); + **/ + _chart.promptText = function (_) { + if (!arguments.length) { + return _promptText; + } + _promptText = _; + return _chart; + }; + + /** + * Get or set the function that filters option tags prior to display. By default options + * with a value of < 1 are not displayed. + * @name filterDisplayed + * @memberof dc.selectMenu + * @instance + * @param {function} [filterDisplayed] + * @example + * // display all options override the `filterDisplayed` function: + * chart.filterDisplayed(function () { + * return true; + * }); + **/ + _chart.filterDisplayed = function (filterDisplayed) { + if (!arguments.length) { + return _filterDisplayed; + } + _filterDisplayed = filterDisplayed; + return _chart; + }; + + /** + * Controls the type of select menu. Setting it to true converts the underlying + * HTML tag into a multiple select. + * @name multiple + * @memberof dc.selectMenu + * @instance + * @param {boolean} [multiple=false] + * @example + * chart.multiple(true); + **/ + _chart.multiple = function (multiple) { + if (!arguments.length) { + return _multiple; + } + _multiple = multiple; + + return _chart; + }; + + /** + * Controls the default value to be used for + * [dimension.filter](https://github.com/crossfilter/crossfilter/wiki/API-Reference#dimension_filter) + * when only the prompt value is selected. If `null` (the default), no filtering will occur when + * just the prompt is selected. + * @name promptValue + * @memberof dc.selectMenu + * @instance + * @param {?*} [promptValue=null] + **/ + _chart.promptValue = function (promptValue) { + if (!arguments.length) { + return _promptValue; + } + _promptValue = promptValue; + + return _chart; + }; + + /** + * Controls the number of items to show in the select menu, when `.multiple()` is true. This + * controls the [`size` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#Attributes) of + * the `select` element. If `null` (the default), uses the browser's default height. + * @name numberItems + * @memberof dc.selectMenu + * @instance + * @param {?number} [numberVisible=null] + * @example + * chart.numberVisible(10); + **/ + _chart.numberVisible = function (numberVisible) { + if (!arguments.length) { + return _numberVisible; + } + _numberVisible = numberVisible; + + return _chart; + }; + + _chart.size = dc.logger.deprecate(_chart.numberVisible, 'selectMenu.size is ambiguous - use numberVisible instead'); + + return _chart.anchor(parent, chartGroup); +}; + +// Renamed functions + +dc.abstractBubbleChart = dc.bubbleMixin; +dc.baseChart = dc.baseMixin; +dc.capped = dc.capMixin; +dc.colorChart = dc.colorMixin; +dc.coordinateGridChart = dc.coordinateGridMixin; +dc.marginable = dc.marginMixin; +dc.stackableChart = dc.stackMixin; + +// Expose d3 and crossfilter, so that clients in browserify +// case can obtain them if they need them. +dc.d3 = d3; +dc.crossfilter = crossfilter; + +return dc;} + if(typeof define === "function" && define.amd) { + define(["d3", "crossfilter2"], _dc); + } else if(typeof module === "object" && module.exports) { + var _d3 = require('d3'); + var _crossfilter = require('crossfilter2'); + // When using npm + browserify, 'crossfilter' is a function, + // since package.json specifies index.js as main function, and it + // does special handling. When using bower + browserify, + // there's no main in bower.json (in fact, there's no bower.json), + // so we need to fix it. + if (typeof _crossfilter !== "function") { + _crossfilter = _crossfilter.crossfilter; + } + module.exports = _dc(_d3, _crossfilter); + } else { + this.dc = _dc(d3, crossfilter); + } +} +)(); + +//# sourceMappingURL=dc.js.map \ No newline at end of file diff --git a/civicrm/bower_components/dc-2.1.x/dc.js.map b/civicrm/bower_components/dc-2.1.x/dc.js.map new file mode 100644 index 0000000000..1f2e174412 --- /dev/null +++ b/civicrm/bower_components/dc-2.1.x/dc.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["src/banner.js","src/core.js","src/errors.js","src/utils.js","src/logger.js","src/events.js","src/filters.js","src/base-mixin.js","src/margin-mixin.js","src/color-mixin.js","src/coordinate-grid-mixin.js","src/stack-mixin.js","src/cap-mixin.js","src/bubble-mixin.js","src/pie-chart.js","src/bar-chart.js","src/line-chart.js","src/data-count.js","src/data-table.js","src/data-grid.js","src/bubble-chart.js","src/composite-chart.js","src/series-chart.js","src/geo-choropleth-chart.js","src/bubble-overlay.js","src/row-chart.js","src/legend.js","src/scatter-plot.js","src/number-display.js","src/heatmap.js","src/d3.box.js","src/box-plot.js","src/select-menu.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,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,EAAE;AACzE,QAAQ,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC;AAChE,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE;AAC1E,QAAQ,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;AAChC,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;AACjD,YAAY,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC;AACpD,QAAQ,CAAC;AACT,QAAQ,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE;AAChD,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AACZ,QAAQ,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE;AACvC,IAAI,CAAC;AACL,CAAC;AACD,IAAI","file":"dc.js","sourcesContent":["(function() { function _dc(d3, crossfilter) {\n'use strict';\n","/**\n * The entire dc.js library is scoped under the **dc** name space. It does not introduce\n * anything else into the global name space.\n *\n * Most `dc` functions are designed to allow function chaining, meaning they return the current chart\n * instance whenever it is appropriate. The getter forms of functions do not participate in function\n * chaining because they return values that are not the chart, although some,\n * such as {@link dc.baseMixin#svg .svg} and {@link dc.coordinateGridMixin#xAxis .xAxis},\n * return values that are themselves chainable d3 objects.\n * @namespace dc\n * @version 2.1.9\n * @example\n * // Example chaining\n * chart.width(300)\n * .height(300)\n * .filter('sunday');\n */\n/*jshint -W079*/\nvar dc = {\n version: '2.1.9',\n constants: {\n CHART_CLASS: 'dc-chart',\n DEBUG_GROUP_CLASS: 'debug',\n STACK_CLASS: 'stack',\n DESELECTED_CLASS: 'deselected',\n SELECTED_CLASS: 'selected',\n NODE_INDEX_NAME: '__index__',\n GROUP_INDEX_NAME: '__group_index__',\n DEFAULT_CHART_GROUP: '__default_chart_group__',\n EVENT_DELAY: 40,\n NEGLIGIBLE_NUMBER: 1e-10\n },\n _renderlet: null\n};\n/*jshint +W079*/\n\n/**\n * The dc.chartRegistry object maintains sets of all instantiated dc.js charts under named groups\n * and the default group.\n *\n * A chart group often corresponds to a crossfilter instance. It specifies\n * the set of charts which should be updated when a filter changes on one of the charts or when the\n * global functions {@link dc.filterAll dc.filterAll}, {@link dc.refocusAll dc.refocusAll},\n * {@link dc.renderAll dc.renderAll}, {@link dc.redrawAll dc.redrawAll}, or chart functions\n * {@link dc.baseMixin#renderGroup baseMixin.renderGroup},\n * {@link dc.baseMixin#redrawGroup baseMixin.redrawGroup} are called.\n *\n * @namespace chartRegistry\n * @memberof dc\n * @type {{has, register, deregister, clear, list}}\n */\ndc.chartRegistry = (function () {\n // chartGroup:string => charts:array\n var _chartMap = {};\n\n function initializeChartGroup (group) {\n if (!group) {\n group = dc.constants.DEFAULT_CHART_GROUP;\n }\n\n if (!_chartMap[group]) {\n _chartMap[group] = [];\n }\n\n return group;\n }\n\n return {\n /**\n * Determine if a given chart instance resides in any group in the registry.\n * @method has\n * @memberof dc.chartRegistry\n * @param {Object} chart dc.js chart instance\n * @returns {Boolean}\n */\n has: function (chart) {\n for (var e in _chartMap) {\n if (_chartMap[e].indexOf(chart) >= 0) {\n return true;\n }\n }\n return false;\n },\n\n /**\n * Add given chart instance to the given group, creating the group if necessary.\n * If no group is provided, the default group `dc.constants.DEFAULT_CHART_GROUP` will be used.\n * @method register\n * @memberof dc.chartRegistry\n * @param {Object} chart dc.js chart instance\n * @param {String} [group] Group name\n */\n register: function (chart, group) {\n group = initializeChartGroup(group);\n _chartMap[group].push(chart);\n },\n\n /**\n * Remove given chart instance from the given group, creating the group if necessary.\n * If no group is provided, the default group `dc.constants.DEFAULT_CHART_GROUP` will be used.\n * @method deregister\n * @memberof dc.chartRegistry\n * @param {Object} chart dc.js chart instance\n * @param {String} [group] Group name\n */\n deregister: function (chart, group) {\n group = initializeChartGroup(group);\n for (var i = 0; i < _chartMap[group].length; i++) {\n if (_chartMap[group][i].anchorName() === chart.anchorName()) {\n _chartMap[group].splice(i, 1);\n break;\n }\n }\n },\n\n /**\n * Clear given group if one is provided, otherwise clears all groups.\n * @method clear\n * @memberof dc.chartRegistry\n * @param {String} group Group name\n */\n clear: function (group) {\n if (group) {\n delete _chartMap[group];\n } else {\n _chartMap = {};\n }\n },\n\n /**\n * Get an array of each chart instance in the given group.\n * If no group is provided, the charts in the default group are returned.\n * @method list\n * @memberof dc.chartRegistry\n * @param {String} [group] Group name\n * @returns {Array<Object>}\n */\n list: function (group) {\n group = initializeChartGroup(group);\n return _chartMap[group];\n }\n };\n})();\n\n/**\n * Add given chart instance to the given group, creating the group if necessary.\n * If no group is provided, the default group `dc.constants.DEFAULT_CHART_GROUP` will be used.\n * @memberof dc\n * @method registerChart\n * @param {Object} chart dc.js chart instance\n * @param {String} [group] Group name\n */\ndc.registerChart = function (chart, group) {\n dc.chartRegistry.register(chart, group);\n};\n\n/**\n * Remove given chart instance from the given group, creating the group if necessary.\n * If no group is provided, the default group `dc.constants.DEFAULT_CHART_GROUP` will be used.\n * @memberof dc\n * @method deregisterChart\n * @param {Object} chart dc.js chart instance\n * @param {String} [group] Group name\n */\ndc.deregisterChart = function (chart, group) {\n dc.chartRegistry.deregister(chart, group);\n};\n\n/**\n * Determine if a given chart instance resides in any group in the registry.\n * @memberof dc\n * @method hasChart\n * @param {Object} chart dc.js chart instance\n * @returns {Boolean}\n */\ndc.hasChart = function (chart) {\n return dc.chartRegistry.has(chart);\n};\n\n/**\n * Clear given group if one is provided, otherwise clears all groups.\n * @memberof dc\n * @method deregisterAllCharts\n * @param {String} group Group name\n */\ndc.deregisterAllCharts = function (group) {\n dc.chartRegistry.clear(group);\n};\n\n/**\n * Clear all filters on all charts within the given chart group. If the chart group is not given then\n * only charts that belong to the default chart group will be reset.\n * @memberof dc\n * @method filterAll\n * @param {String} [group]\n */\ndc.filterAll = function (group) {\n var charts = dc.chartRegistry.list(group);\n for (var i = 0; i < charts.length; ++i) {\n charts[i].filterAll();\n }\n};\n\n/**\n * Reset zoom level / focus on all charts that belong to the given chart group. If the chart group is\n * not given then only charts that belong to the default chart group will be reset.\n * @memberof dc\n * @method refocusAll\n * @param {String} [group]\n */\ndc.refocusAll = function (group) {\n var charts = dc.chartRegistry.list(group);\n for (var i = 0; i < charts.length; ++i) {\n if (charts[i].focus) {\n charts[i].focus();\n }\n }\n};\n\n/**\n * Re-render all charts belong to the given chart group. If the chart group is not given then only\n * charts that belong to the default chart group will be re-rendered.\n * @memberof dc\n * @method renderAll\n * @param {String} [group]\n */\ndc.renderAll = function (group) {\n var charts = dc.chartRegistry.list(group);\n for (var i = 0; i < charts.length; ++i) {\n charts[i].render();\n }\n\n if (dc._renderlet !== null) {\n dc._renderlet(group);\n }\n};\n\n/**\n * Redraw all charts belong to the given chart group. If the chart group is not given then only charts\n * that belong to the default chart group will be re-drawn. Redraw is different from re-render since\n * when redrawing dc tries to update the graphic incrementally, using transitions, instead of starting\n * from scratch.\n * @memberof dc\n * @method redrawAll\n * @param {String} [group]\n */\ndc.redrawAll = function (group) {\n var charts = dc.chartRegistry.list(group);\n for (var i = 0; i < charts.length; ++i) {\n charts[i].redraw();\n }\n\n if (dc._renderlet !== null) {\n dc._renderlet(group);\n }\n};\n\n/**\n * If this boolean is set truthy, all transitions will be disabled, and changes to the charts will happen\n * immediately.\n * @memberof dc\n * @member disableTransitions\n * @type {Boolean}\n * @default false\n */\ndc.disableTransitions = false;\n\n/**\n * Start a transition on a selection if transitions are globally enabled\n * ({@link dc.disableTransitions} is false) and the duration is greater than zero; otherwise return\n * the selection. Since most operations are the same on a d3 selection and a d3 transition, this\n * allows a common code path for both cases.\n * @memberof dc\n * @method transition\n * @param {d3.selection} selection - the selection to be transitioned\n * @param {Number|Function} [duration=250] - the duration of the transition in milliseconds, a\n * function returning the duration, or 0 for no transition\n * @param {Number|Function} [delay] - the delay of the transition in milliseconds, or a function\n * returning the delay, or 0 for no delay\n * @param {String} [name] - the name of the transition (if concurrent transitions on the same\n * elements are needed)\n * @returns {d3.transition|d3.selection}\n */\ndc.transition = function (selection, duration, delay, name) {\n if (dc.disableTransitions || duration <= 0) {\n return selection;\n }\n\n var s = selection.transition(name);\n\n if (duration >= 0 || duration !== undefined) {\n s = s.duration(duration);\n }\n if (delay >= 0 || delay !== undefined) {\n s = s.delay(delay);\n }\n\n return s;\n};\n\n/* somewhat silly, but to avoid duplicating logic */\ndc.optionalTransition = function (enable, duration, delay, name) {\n if (enable) {\n return function (selection) {\n return dc.transition(selection, duration, delay, name);\n };\n } else {\n return function (selection) {\n return selection;\n };\n }\n};\n\n// See http://stackoverflow.com/a/20773846\ndc.afterTransition = function (transition, callback) {\n if (transition.empty() || !transition.duration) {\n callback.call(transition);\n } else {\n var n = 0;\n transition\n .each(function () { ++n; })\n .each('end', function () {\n if (!--n) {\n callback.call(transition);\n }\n });\n }\n};\n\n/**\n * @namespace units\n * @memberof dc\n * @type {{}}\n */\ndc.units = {};\n\n/**\n * The default value for {@link dc.coordinateGridMixin#xUnits .xUnits} for the\n * {@link dc.coordinateGridMixin Coordinate Grid Chart} and should\n * be used when the x values are a sequence of integers.\n * It is a function that counts the number of integers in the range supplied in its start and end parameters.\n * @method integers\n * @memberof dc.units\n * @see {@link dc.coordinateGridMixin#xUnits coordinateGridMixin.xUnits}\n * @example\n * chart.xUnits(dc.units.integers) // already the default\n * @param {Number} start\n * @param {Number} end\n * @returns {Number}\n */\ndc.units.integers = function (start, end) {\n return Math.abs(end - start);\n};\n\n/**\n * This argument can be passed to the {@link dc.coordinateGridMixin#xUnits .xUnits} function of the to\n * specify ordinal units for the x axis. Usually this parameter is used in combination with passing\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Ordinal-Scales.md d3.scale.ordinal} to\n * {@link dc.coordinateGridMixin#x .x}.\n * It just returns the domain passed to it, which for ordinal charts is an array of all values.\n * @method ordinal\n * @memberof dc.units\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Ordinal-Scales.md d3.scale.ordinal}\n * @see {@link dc.coordinateGridMixin#xUnits coordinateGridMixin.xUnits}\n * @see {@link dc.coordinateGridMixin#x coordinateGridMixin.x}\n * @example\n * chart.xUnits(dc.units.ordinal)\n * .x(d3.scale.ordinal())\n * @param {*} start\n * @param {*} end\n * @param {Array<String>} domain\n * @returns {Array<String>}\n */\ndc.units.ordinal = function (start, end, domain) {\n return domain;\n};\n\n/**\n * @namespace fp\n * @memberof dc.units\n * @type {{}}\n */\ndc.units.fp = {};\n/**\n * This function generates an argument for the {@link dc.coordinateGridMixin Coordinate Grid Chart}\n * {@link dc.coordinateGridMixin#xUnits .xUnits} function specifying that the x values are floating-point\n * numbers with the given precision.\n * The returned function determines how many values at the given precision will fit into the range\n * supplied in its start and end parameters.\n * @method precision\n * @memberof dc.units.fp\n * @see {@link dc.coordinateGridMixin#xUnits coordinateGridMixin.xUnits}\n * @example\n * // specify values (and ticks) every 0.1 units\n * chart.xUnits(dc.units.fp.precision(0.1)\n * // there are 500 units between 0.5 and 1 if the precision is 0.001\n * var thousandths = dc.units.fp.precision(0.001);\n * thousandths(0.5, 1.0) // returns 500\n * @param {Number} precision\n * @returns {Function} start-end unit function\n */\ndc.units.fp.precision = function (precision) {\n var _f = function (s, e) {\n var d = Math.abs((e - s) / _f.resolution);\n if (dc.utils.isNegligible(d - Math.floor(d))) {\n return Math.floor(d);\n } else {\n return Math.ceil(d);\n }\n };\n _f.resolution = precision;\n return _f;\n};\n\ndc.round = {};\ndc.round.floor = function (n) {\n return Math.floor(n);\n};\ndc.round.ceil = function (n) {\n return Math.ceil(n);\n};\ndc.round.round = function (n) {\n return Math.round(n);\n};\n\ndc.override = function (obj, functionName, newFunction) {\n var existingFunction = obj[functionName];\n obj['_' + functionName] = existingFunction;\n obj[functionName] = newFunction;\n};\n\ndc.renderlet = function (_) {\n if (!arguments.length) {\n return dc._renderlet;\n }\n dc._renderlet = _;\n return dc;\n};\n\ndc.instanceOfChart = function (o) {\n return o instanceof Object && o.__dcFlag__ && true;\n};\n","dc.errors = {};\n\ndc.errors.Exception = function (msg) {\n var _msg = msg || 'Unexpected internal error';\n\n this.message = _msg;\n\n this.toString = function () {\n return _msg;\n };\n this.stack = (new Error()).stack;\n};\ndc.errors.Exception.prototype = Object.create(Error.prototype);\ndc.errors.Exception.prototype.constructor = dc.errors.Exception;\n\ndc.errors.InvalidStateException = function () {\n dc.errors.Exception.apply(this, arguments);\n};\n\ndc.errors.InvalidStateException.prototype = Object.create(dc.errors.Exception.prototype);\ndc.errors.InvalidStateException.prototype.constructor = dc.errors.InvalidStateException;\n\ndc.errors.BadArgumentException = function () {\n dc.errors.Exception.apply(this, arguments);\n};\n\ndc.errors.BadArgumentException.prototype = Object.create(dc.errors.Exception.prototype);\ndc.errors.BadArgumentException.prototype.constructor = dc.errors.BadArgumentException;\n","/**\n * The default date format for dc.js\n * @name dateFormat\n * @memberof dc\n * @type {Function}\n * @default d3.time.format('%m/%d/%Y')\n */\ndc.dateFormat = d3.time.format('%m/%d/%Y');\n\n/**\n * @namespace printers\n * @memberof dc\n * @type {{}}\n */\ndc.printers = {};\n\n/**\n * Converts a list of filters into a readable string.\n * @method filters\n * @memberof dc.printers\n * @param {Array<dc.filters>} filters\n * @returns {String}\n */\ndc.printers.filters = function (filters) {\n var s = '';\n\n for (var i = 0; i < filters.length; ++i) {\n if (i > 0) {\n s += ', ';\n }\n s += dc.printers.filter(filters[i]);\n }\n\n return s;\n};\n\n/**\n * Converts a filter into a readable string.\n * @method filter\n * @memberof dc.printers\n * @param {dc.filters|any|Array<any>} filter\n * @returns {String}\n */\ndc.printers.filter = function (filter) {\n var s = '';\n\n if (typeof filter !== 'undefined' && filter !== null) {\n if (filter instanceof Array) {\n if (filter.length >= 2) {\n s = '[' + dc.utils.printSingleValue(filter[0]) + ' -> ' + dc.utils.printSingleValue(filter[1]) + ']';\n } else if (filter.length >= 1) {\n s = dc.utils.printSingleValue(filter[0]);\n }\n } else {\n s = dc.utils.printSingleValue(filter);\n }\n }\n\n return s;\n};\n\n/**\n * Returns a function that given a string property name, can be used to pluck the property off an object. A function\n * can be passed as the second argument to also alter the data being returned.\n *\n * This can be a useful shorthand method to create accessor functions.\n * @method pluck\n * @memberof dc\n * @example\n * var xPluck = dc.pluck('x');\n * var objA = {x: 1};\n * xPluck(objA) // 1\n * @example\n * var xPosition = dc.pluck('x', function (x, i) {\n * // `this` is the original datum,\n * // `x` is the x property of the datum,\n * // `i` is the position in the array\n * return this.radius + x;\n * });\n * dc.selectAll('.circle').data(...).x(xPosition);\n * @param {String} n\n * @param {Function} [f]\n * @returns {Function}\n */\ndc.pluck = function (n, f) {\n if (!f) {\n return function (d) { return d[n]; };\n }\n return function (d, i) { return f.call(d, d[n], i); };\n};\n\n/**\n * @namespace utils\n * @memberof dc\n * @type {{}}\n */\ndc.utils = {};\n\n/**\n * Print a single value filter.\n * @method printSingleValue\n * @memberof dc.utils\n * @param {any} filter\n * @returns {String}\n */\ndc.utils.printSingleValue = function (filter) {\n var s = '' + filter;\n\n if (filter instanceof Date) {\n s = dc.dateFormat(filter);\n } else if (typeof(filter) === 'string') {\n s = filter;\n } else if (dc.utils.isFloat(filter)) {\n s = dc.utils.printSingleValue.fformat(filter);\n } else if (dc.utils.isInteger(filter)) {\n s = Math.round(filter);\n }\n\n return s;\n};\ndc.utils.printSingleValue.fformat = d3.format('.2f');\n\n/**\n * Arbitrary add one value to another.\n * @method add\n * @memberof dc.utils\n * @todo\n * These assume than any string r is a percentage (whether or not it includes %).\n * They also generate strange results if l is a string.\n * @param {String|Date|Number} l the value to modify\n * @param {Number} r the amount by which to modify the value\n * @param {String} [t] if `l` is a `Date`, the\n * [interval](https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Intervals.md#interval) in\n * the `d3.time` namespace\n * @returns {String|Date|Number}\n */\ndc.utils.add = function (l, r, t) {\n if (typeof r === 'string') {\n r = r.replace('%', '');\n }\n\n if (l instanceof Date) {\n if (typeof r === 'string') {\n r = +r;\n }\n if (t === 'millis') {\n return new Date(l.getTime() + r);\n }\n t = t || 'day';\n return d3.time[t].offset(l, r);\n } else if (typeof r === 'string') {\n var percentage = (+r / 100);\n return l > 0 ? l * (1 + percentage) : l * (1 - percentage);\n } else {\n return l + r;\n }\n};\n\n/**\n * Arbitrary subtract one value from another.\n * @method subtract\n * @memberof dc.utils\n * @todo\n * These assume than any string r is a percentage (whether or not it includes %).\n * They also generate strange results if l is a string.\n * @param {String|Date|Number} l the value to modify\n * @param {Number} r the amount by which to modify the value\n * @param {String} [t] if `l` is a `Date`, the\n * [interval](https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Intervals.md#interval) in\n * the `d3.time` namespace\n * @returns {String|Date|Number}\n */\ndc.utils.subtract = function (l, r, t) {\n if (typeof r === 'string') {\n r = r.replace('%', '');\n }\n\n if (l instanceof Date) {\n if (typeof r === 'string') {\n r = +r;\n }\n if (t === 'millis') {\n return new Date(l.getTime() - r);\n }\n t = t || 'day';\n return d3.time[t].offset(l, -r);\n } else if (typeof r === 'string') {\n var percentage = (+r / 100);\n return l < 0 ? l * (1 + percentage) : l * (1 - percentage);\n } else {\n return l - r;\n }\n};\n\n/**\n * Is the value a number?\n * @method isNumber\n * @memberof dc.utils\n * @param {any} n\n * @returns {Boolean}\n */\ndc.utils.isNumber = function (n) {\n return n === +n;\n};\n\n/**\n * Is the value a float?\n * @method isFloat\n * @memberof dc.utils\n * @param {any} n\n * @returns {Boolean}\n */\ndc.utils.isFloat = function (n) {\n return n === +n && n !== (n | 0);\n};\n\n/**\n * Is the value an integer?\n * @method isInteger\n * @memberof dc.utils\n * @param {any} n\n * @returns {Boolean}\n */\ndc.utils.isInteger = function (n) {\n return n === +n && n === (n | 0);\n};\n\n/**\n * Is the value very close to zero?\n * @method isNegligible\n * @memberof dc.utils\n * @param {any} n\n * @returns {Boolean}\n */\ndc.utils.isNegligible = function (n) {\n return !dc.utils.isNumber(n) || (n < dc.constants.NEGLIGIBLE_NUMBER && n > -dc.constants.NEGLIGIBLE_NUMBER);\n};\n\n/**\n * Ensure the value is no greater or less than the min/max values. If it is return the boundary value.\n * @method clamp\n * @memberof dc.utils\n * @param {any} val\n * @param {any} min\n * @param {any} max\n * @returns {any}\n */\ndc.utils.clamp = function (val, min, max) {\n return val < min ? min : (val > max ? max : val);\n};\n\n/**\n * Using a simple static counter, provide a unique integer id.\n * @method uniqueId\n * @memberof dc.utils\n * @returns {Number}\n */\nvar _idCounter = 0;\ndc.utils.uniqueId = function () {\n return ++_idCounter;\n};\n\n/**\n * Convert a name to an ID.\n * @method nameToId\n * @memberof dc.utils\n * @param {String} name\n * @returns {String}\n */\ndc.utils.nameToId = function (name) {\n return name.toLowerCase().replace(/[\\s]/g, '_').replace(/[\\.']/g, '');\n};\n\n/**\n * Append or select an item on a parent element.\n * @method appendOrSelect\n * @memberof dc.utils\n * @param {d3.selection} parent\n * @param {String} selector\n * @param {String} tag\n * @returns {d3.selection}\n */\ndc.utils.appendOrSelect = function (parent, selector, tag) {\n tag = tag || selector;\n var element = parent.select(selector);\n if (element.empty()) {\n element = parent.append(tag);\n }\n return element;\n};\n\n/**\n * Return the number if the value is a number; else 0.\n * @method safeNumber\n * @memberof dc.utils\n * @param {Number|any} n\n * @returns {Number}\n */\ndc.utils.safeNumber = function (n) { return dc.utils.isNumber(+n) ? +n : 0;};\n","dc.logger = {};\n\ndc.logger.enableDebugLog = false;\n\ndc.logger.warn = function (msg) {\n if (console) {\n if (console.warn) {\n console.warn(msg);\n } else if (console.log) {\n console.log(msg);\n }\n }\n\n return dc.logger;\n};\n\ndc.logger.debug = function (msg) {\n if (dc.logger.enableDebugLog && console) {\n if (console.debug) {\n console.debug(msg);\n } else if (console.log) {\n console.log(msg);\n }\n }\n\n return dc.logger;\n};\n\ndc.logger.deprecate = function (fn, msg) {\n // Allow logging of deprecation\n var warned = false;\n function deprecated () {\n if (!warned) {\n dc.logger.warn(msg);\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n return deprecated;\n};\n","dc.events = {\n current: null\n};\n\n/**\n * This function triggers a throttled event function with a specified delay (in milli-seconds). Events\n * that are triggered repetitively due to user interaction such brush dragging might flood the library\n * and invoke more renders than can be executed in time. Using this function to wrap your event\n * function allows the library to smooth out the rendering by throttling events and only responding to\n * the most recent event.\n * @name events.trigger\n * @memberof dc\n * @example\n * chart.on('renderlet', function(chart) {\n * // smooth the rendering through event throttling\n * dc.events.trigger(function(){\n * // focus some other chart to the range selected by user on this chart\n * someOtherChart.focus(chart.filter());\n * });\n * })\n * @param {Function} closure\n * @param {Number} [delay]\n */\ndc.events.trigger = function (closure, delay) {\n if (!delay) {\n closure();\n return;\n }\n\n dc.events.current = closure;\n\n setTimeout(function () {\n if (closure === dc.events.current) {\n closure();\n }\n }, delay);\n};\n","/**\n * The dc.js filters are functions which are passed into crossfilter to chose which records will be\n * accumulated to produce values for the charts. In the crossfilter model, any filters applied on one\n * dimension will affect all the other dimensions but not that one. dc always applies a filter\n * function to the dimension; the function combines multiple filters and if any of them accept a\n * record, it is filtered in.\n *\n * These filter constructors are used as appropriate by the various charts to implement brushing. We\n * mention below which chart uses which filter. In some cases, many instances of a filter will be added.\n *\n * Each of the dc.js filters is an object with the following properties:\n * * `isFiltered` - a function that returns true if a value is within the filter\n * * `filterType` - a string identifying the filter, here the name of the constructor\n *\n * Currently these filter objects are also arrays, but this is not a requirement. Custom filters\n * can be used as long as they have the properties above.\n * @namespace filters\n * @memberof dc\n * @type {{}}\n */\ndc.filters = {};\n\n/**\n * RangedFilter is a filter which accepts keys between `low` and `high`. It is used to implement X\n * axis brushing for the {@link dc.coordinateGridMixin coordinate grid charts}.\n *\n * Its `filterType` is 'RangedFilter'\n * @name RangedFilter\n * @memberof dc.filters\n * @param {Number} low\n * @param {Number} high\n * @returns {Array<Number>}\n * @constructor\n */\ndc.filters.RangedFilter = function (low, high) {\n var range = new Array(low, high);\n range.isFiltered = function (value) {\n return value >= this[0] && value < this[1];\n };\n range.filterType = 'RangedFilter';\n\n return range;\n};\n\n/**\n * TwoDimensionalFilter is a filter which accepts a single two-dimensional value. It is used by the\n * {@link dc.heatMap heat map chart} to include particular cells as they are clicked. (Rows and columns are\n * filtered by filtering all the cells in the row or column.)\n *\n * Its `filterType` is 'TwoDimensionalFilter'\n * @name TwoDimensionalFilter\n * @memberof dc.filters\n * @param {Array<Number>} filter\n * @returns {Array<Number>}\n * @constructor\n */\ndc.filters.TwoDimensionalFilter = function (filter) {\n if (filter === null) { return null; }\n\n var f = filter;\n f.isFiltered = function (value) {\n return value.length && value.length === f.length &&\n value[0] === f[0] && value[1] === f[1];\n };\n f.filterType = 'TwoDimensionalFilter';\n\n return f;\n};\n\n/**\n * The RangedTwoDimensionalFilter allows filtering all values which fit within a rectangular\n * region. It is used by the {@link dc.scatterPlot scatter plot} to implement rectangular brushing.\n *\n * It takes two two-dimensional points in the form `[[x1,y1],[x2,y2]]`, and normalizes them so that\n * `x1 <= x2` and `y1 <= y2`. It then returns a filter which accepts any points which are in the\n * rectangular range including the lower values but excluding the higher values.\n *\n * If an array of two values are given to the RangedTwoDimensionalFilter, it interprets the values as\n * two x coordinates `x1` and `x2` and returns a filter which accepts any points for which `x1 <= x <\n * x2`.\n *\n * Its `filterType` is 'RangedTwoDimensionalFilter'\n * @name RangedTwoDimensionalFilter\n * @memberof dc.filters\n * @param {Array<Array<Number>>} filter\n * @returns {Array<Array<Number>>}\n * @constructor\n */\ndc.filters.RangedTwoDimensionalFilter = function (filter) {\n if (filter === null) { return null; }\n\n var f = filter;\n var fromBottomLeft;\n\n if (f[0] instanceof Array) {\n fromBottomLeft = [\n [Math.min(filter[0][0], filter[1][0]), Math.min(filter[0][1], filter[1][1])],\n [Math.max(filter[0][0], filter[1][0]), Math.max(filter[0][1], filter[1][1])]\n ];\n } else {\n fromBottomLeft = [[filter[0], -Infinity], [filter[1], Infinity]];\n }\n\n f.isFiltered = function (value) {\n var x, y;\n\n if (value instanceof Array) {\n x = value[0];\n y = value[1];\n } else {\n x = value;\n y = fromBottomLeft[0][1];\n }\n\n return x >= fromBottomLeft[0][0] && x < fromBottomLeft[1][0] &&\n y >= fromBottomLeft[0][1] && y < fromBottomLeft[1][1];\n };\n f.filterType = 'RangedTwoDimensionalFilter';\n\n return f;\n};\n","/**\n * `dc.baseMixin` is an abstract functional object representing a basic `dc` chart object\n * for all chart and widget implementations. Methods from the {@link #dc.baseMixin dc.baseMixin} are inherited\n * and available on all chart implementations in the `dc` library.\n * @name baseMixin\n * @memberof dc\n * @mixin\n * @param {Object} _chart\n * @returns {dc.baseMixin}\n */\ndc.baseMixin = function (_chart) {\n _chart.__dcFlag__ = dc.utils.uniqueId();\n\n var _dimension;\n var _group;\n\n var _anchor;\n var _root;\n var _svg;\n var _isChild;\n\n var _minWidth = 200;\n var _defaultWidthCalc = function (element) {\n var width = element && element.getBoundingClientRect && element.getBoundingClientRect().width;\n return (width && width > _minWidth) ? width : _minWidth;\n };\n var _widthCalc = _defaultWidthCalc;\n\n var _minHeight = 200;\n var _defaultHeightCalc = function (element) {\n var height = element && element.getBoundingClientRect && element.getBoundingClientRect().height;\n return (height && height > _minHeight) ? height : _minHeight;\n };\n var _heightCalc = _defaultHeightCalc;\n var _width, _height;\n var _useViewBoxResizing = false;\n\n var _keyAccessor = dc.pluck('key');\n var _valueAccessor = dc.pluck('value');\n var _label = dc.pluck('key');\n\n var _ordering = dc.pluck('key');\n var _orderSort;\n\n var _renderLabel = false;\n\n var _title = function (d) {\n return _chart.keyAccessor()(d) + ': ' + _chart.valueAccessor()(d);\n };\n var _renderTitle = true;\n var _controlsUseVisibility = false;\n\n var _transitionDuration = 750;\n\n var _transitionDelay = 0;\n\n var _filterPrinter = dc.printers.filters;\n\n var _mandatoryAttributes = ['dimension', 'group'];\n\n var _chartGroup = dc.constants.DEFAULT_CHART_GROUP;\n\n var _listeners = d3.dispatch(\n 'preRender',\n 'postRender',\n 'preRedraw',\n 'postRedraw',\n 'filtered',\n 'zoomed',\n 'renderlet',\n 'pretransition');\n\n var _legend;\n var _commitHandler;\n\n var _filters = [];\n var _filterHandler = function (dimension, filters) {\n if (filters.length === 0) {\n dimension.filter(null);\n } else if (filters.length === 1 && !filters[0].isFiltered) {\n // single value and not a function-based filter\n dimension.filterExact(filters[0]);\n } else if (filters.length === 1 && filters[0].filterType === 'RangedFilter') {\n // single range-based filter\n dimension.filterRange(filters[0]);\n } else {\n dimension.filterFunction(function (d) {\n for (var i = 0; i < filters.length; i++) {\n var filter = filters[i];\n if (filter.isFiltered && filter.isFiltered(d)) {\n return true;\n } else if (filter <= d && filter >= d) {\n return true;\n }\n }\n return false;\n });\n }\n return filters;\n };\n\n var _data = function (group) {\n return group.all();\n };\n\n /**\n * Set or get the height attribute of a chart. The height is applied to the SVGElement generated by\n * the chart when rendered (or re-rendered). If a value is given, then it will be used to calculate\n * the new height and the chart returned for method chaining. The value can either be a numeric, a\n * function, or falsy. If no value is specified then the value of the current height attribute will\n * be returned.\n *\n * By default, without an explicit height being given, the chart will select the width of its\n * anchor element. If that isn't possible it defaults to 200 (provided by the\n * {@link dc.baseMixin#minHeight minHeight} property). Setting the value falsy will return\n * the chart to the default behavior.\n * @method height\n * @memberof dc.baseMixin\n * @instance\n * @see {@link dc.baseMixin#minHeight minHeight}\n * @example\n * // Default height\n * chart.height(function (element) {\n * var height = element && element.getBoundingClientRect && element.getBoundingClientRect().height;\n * return (height && height > chart.minHeight()) ? height : chart.minHeight();\n * });\n *\n * chart.height(250); // Set the chart's height to 250px;\n * chart.height(function(anchor) { return doSomethingWith(anchor); }); // set the chart's height with a function\n * chart.height(null); // reset the height to the default auto calculation\n * @param {Number|Function} [height]\n * @returns {Number|dc.baseMixin}\n */\n _chart.height = function (height) {\n if (!arguments.length) {\n if (!dc.utils.isNumber(_height)) {\n // only calculate once\n _height = _heightCalc(_root.node());\n }\n return _height;\n }\n _heightCalc = d3.functor(height || _defaultHeightCalc);\n _height = undefined;\n return _chart;\n };\n\n /**\n * Set or get the width attribute of a chart.\n * @method width\n * @memberof dc.baseMixin\n * @instance\n * @see {@link dc.baseMixin#height height}\n * @see {@link dc.baseMixin#minWidth minWidth}\n * @example\n * // Default width\n * chart.width(function (element) {\n * var width = element && element.getBoundingClientRect && element.getBoundingClientRect().width;\n * return (width && width > chart.minWidth()) ? width : chart.minWidth();\n * });\n * @param {Number|Function} [width]\n * @returns {Number|dc.baseMixin}\n */\n _chart.width = function (width) {\n if (!arguments.length) {\n if (!dc.utils.isNumber(_width)) {\n // only calculate once\n _width = _widthCalc(_root.node());\n }\n return _width;\n }\n _widthCalc = d3.functor(width || _defaultWidthCalc);\n _width = undefined;\n return _chart;\n };\n\n /**\n * Set or get the minimum width attribute of a chart. This only has effect when used with the default\n * {@link dc.baseMixin#width width} function.\n * @method minWidth\n * @memberof dc.baseMixin\n * @instance\n * @see {@link dc.baseMixin#width width}\n * @param {Number} [minWidth=200]\n * @returns {Number|dc.baseMixin}\n */\n _chart.minWidth = function (minWidth) {\n if (!arguments.length) {\n return _minWidth;\n }\n _minWidth = minWidth;\n return _chart;\n };\n\n /**\n * Set or get the minimum height attribute of a chart. This only has effect when used with the default\n * {@link dc.baseMixin#height height} function.\n * @method minHeight\n * @memberof dc.baseMixin\n * @instance\n * @see {@link dc.baseMixin#height height}\n * @param {Number} [minHeight=200]\n * @returns {Number|dc.baseMixin}\n */\n _chart.minHeight = function (minHeight) {\n if (!arguments.length) {\n return _minHeight;\n }\n _minHeight = minHeight;\n return _chart;\n };\n\n /**\n * Turn on/off using the SVG\n * {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/viewBox `viewBox` attribute}.\n * When enabled, `viewBox` will be set on the svg root element instead of `width` and `height`.\n * Requires that the chart aspect ratio be defined using chart.width(w) and chart.height(h).\n *\n * This will maintain the aspect ratio while enabling the chart to resize responsively to the\n * space given to the chart using CSS. For example, the chart can use `width: 100%; height:\n * 100%` or absolute positioning to resize to its parent div.\n *\n * Since the text will be sized as if the chart is drawn according to the width and height, and\n * will be resized if the chart is any other size, you need to set the chart width and height so\n * that the text looks good. In practice, 600x400 seems to work pretty well for most charts.\n *\n * You can see examples of this resizing strategy in the [Chart Resizing\n * Examples](http://dc-js.github.io/dc.js/resizing/); just add `?resize=viewbox` to any of the\n * one-chart examples to enable `useViewBoxResizing`.\n * @method useViewBoxResizing\n * @memberof dc.baseMixin\n * @instance\n * @param {Boolean} [useViewBoxResizing=false]\n * @returns {Boolean|dc.baseMixin}\n */\n _chart.useViewBoxResizing = function (useViewBoxResizing) {\n if (!arguments.length) {\n return _useViewBoxResizing;\n }\n _useViewBoxResizing = useViewBoxResizing;\n return _chart;\n };\n\n /**\n * **mandatory**\n *\n * Set or get the dimension attribute of a chart. In `dc`, a dimension can be any valid\n * {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#dimension crossfilter dimension}\n *\n * If a value is given, then it will be used as the new dimension. If no value is specified then\n * the current dimension will be returned.\n * @method dimension\n * @memberof dc.baseMixin\n * @instance\n * @see {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#dimension crossfilter.dimension}\n * @example\n * var index = crossfilter([]);\n * var dimension = index.dimension(dc.pluck('key'));\n * chart.dimension(dimension);\n * @param {crossfilter.dimension} [dimension]\n * @returns {crossfilter.dimension|dc.baseMixin}\n */\n _chart.dimension = function (dimension) {\n if (!arguments.length) {\n return _dimension;\n }\n _dimension = dimension;\n _chart.expireCache();\n return _chart;\n };\n\n /**\n * Set the data callback or retrieve the chart's data set. The data callback is passed the chart's\n * group and by default will return\n * {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#group_all group.all}.\n * This behavior may be modified to, for instance, return only the top 5 groups.\n * @method data\n * @memberof dc.baseMixin\n * @instance\n * @example\n * // Default data function\n * chart.data(function (group) { return group.all(); });\n *\n * chart.data(function (group) { return group.top(5); });\n * @param {Function} [callback]\n * @returns {*|dc.baseMixin}\n */\n _chart.data = function (callback) {\n if (!arguments.length) {\n return _data.call(_chart, _group);\n }\n _data = d3.functor(callback);\n _chart.expireCache();\n return _chart;\n };\n\n /**\n * **mandatory**\n *\n * Set or get the group attribute of a chart. In `dc` a group is a\n * {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#group-map-reduce crossfilter group}.\n * Usually the group should be created from the particular dimension associated with the same chart. If a value is\n * given, then it will be used as the new group.\n *\n * If no value specified then the current group will be returned.\n * If `name` is specified then it will be used to generate legend label.\n * @method group\n * @memberof dc.baseMixin\n * @instance\n * @see {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#group-map-reduce crossfilter.group}\n * @example\n * var index = crossfilter([]);\n * var dimension = index.dimension(dc.pluck('key'));\n * chart.dimension(dimension);\n * chart.group(dimension.group(crossfilter.reduceSum()));\n * @param {crossfilter.group} [group]\n * @param {String} [name]\n * @returns {crossfilter.group|dc.baseMixin}\n */\n _chart.group = function (group, name) {\n if (!arguments.length) {\n return _group;\n }\n _group = group;\n _chart._groupName = name;\n _chart.expireCache();\n return _chart;\n };\n\n /**\n * Get or set an accessor to order ordinal dimensions. The chart uses\n * {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#quicksort_by crossfilter.quicksort.by}\n * to sort elements; this accessor returns the value to order on.\n * @method ordering\n * @memberof dc.baseMixin\n * @instance\n * @see {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#quicksort_by crossfilter.quicksort.by}\n * @example\n * // Default ordering accessor\n * _chart.ordering(dc.pluck('key'));\n * @param {Function} [orderFunction]\n * @returns {Function|dc.baseMixin}\n */\n _chart.ordering = function (orderFunction) {\n if (!arguments.length) {\n return _ordering;\n }\n _ordering = orderFunction;\n _orderSort = crossfilter.quicksort.by(_ordering);\n _chart.expireCache();\n return _chart;\n };\n\n _chart._computeOrderedGroups = function (data) {\n var dataCopy = data.slice(0);\n\n if (dataCopy.length <= 1) {\n return dataCopy;\n }\n\n if (!_orderSort) {\n _orderSort = crossfilter.quicksort.by(_ordering);\n }\n\n return _orderSort(dataCopy, 0, dataCopy.length);\n };\n\n /**\n * Clear all filters associated with this chart. The same effect can be achieved by calling\n * {@link dc.baseMixin#filter chart.filter(null)}.\n * @method filterAll\n * @memberof dc.baseMixin\n * @instance\n * @returns {dc.baseMixin}\n */\n _chart.filterAll = function () {\n return _chart.filter(null);\n };\n\n /**\n * Execute d3 single selection in the chart's scope using the given selector and return the d3\n * selection.\n *\n * This function is **not chainable** since it does not return a chart instance; however the d3\n * selection result can be chained to d3 function calls.\n * @method select\n * @memberof dc.baseMixin\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#d3_select d3.select}\n * @example\n * // Has the same effect as d3.select('#chart-id').select(selector)\n * chart.select(selector)\n * @returns {d3.selection}\n */\n _chart.select = function (s) {\n return _root.select(s);\n };\n\n /**\n * Execute in scope d3 selectAll using the given selector and return d3 selection result.\n *\n * This function is **not chainable** since it does not return a chart instance; however the d3\n * selection result can be chained to d3 function calls.\n * @method selectAll\n * @memberof dc.baseMixin\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#d3_selectAll d3.selectAll}\n * @example\n * // Has the same effect as d3.select('#chart-id').selectAll(selector)\n * chart.selectAll(selector)\n * @returns {d3.selection}\n */\n _chart.selectAll = function (s) {\n return _root ? _root.selectAll(s) : null;\n };\n\n /**\n * Set the root SVGElement to either be an existing chart's root; or any valid [d3 single\n * selector](https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements) specifying a dom\n * block element such as a div; or a dom element or d3 selection. Optionally registers the chart\n * within the chartGroup. This class is called internally on chart initialization, but be called\n * again to relocate the chart. However, it will orphan any previously created SVGElements.\n * @method anchor\n * @memberof dc.baseMixin\n * @instance\n * @param {anchorChart|anchorSelector|anchorNode} [parent]\n * @param {String} [chartGroup]\n * @returns {String|node|d3.selection|dc.baseMixin}\n */\n _chart.anchor = function (parent, chartGroup) {\n if (!arguments.length) {\n return _anchor;\n }\n if (dc.instanceOfChart(parent)) {\n _anchor = parent.anchor();\n _root = parent.root();\n _isChild = true;\n } else if (parent) {\n if (parent.select && parent.classed) { // detect d3 selection\n _anchor = parent.node();\n } else {\n _anchor = parent;\n }\n _root = d3.select(_anchor);\n _root.classed(dc.constants.CHART_CLASS, true);\n dc.registerChart(_chart, chartGroup);\n _isChild = false;\n } else {\n throw new dc.errors.BadArgumentException('parent must be defined');\n }\n _chartGroup = chartGroup;\n return _chart;\n };\n\n /**\n * Returns the DOM id for the chart's anchored location.\n * @method anchorName\n * @memberof dc.baseMixin\n * @instance\n * @returns {String}\n */\n _chart.anchorName = function () {\n var a = _chart.anchor();\n if (a && a.id) {\n return a.id;\n }\n if (a && a.replace) {\n return a.replace('#', '');\n }\n return 'dc-chart' + _chart.chartID();\n };\n\n /**\n * Returns the root element where a chart resides. Usually it will be the parent div element where\n * the SVGElement was created. You can also pass in a new root element however this is usually handled by\n * dc internally. Resetting the root element on a chart outside of dc internals may have\n * unexpected consequences.\n * @method root\n * @memberof dc.baseMixin\n * @instance\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement HTMLElement}\n * @param {HTMLElement} [rootElement]\n * @returns {HTMLElement|dc.baseMixin}\n */\n _chart.root = function (rootElement) {\n if (!arguments.length) {\n return _root;\n }\n _root = rootElement;\n return _chart;\n };\n\n /**\n * Returns the top SVGElement for this specific chart. You can also pass in a new SVGElement,\n * however this is usually handled by dc internally. Resetting the SVGElement on a chart outside\n * of dc internals may have unexpected consequences.\n * @method svg\n * @memberof dc.baseMixin\n * @instance\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/SVGElement SVGElement}\n * @param {SVGElement|d3.selection} [svgElement]\n * @returns {SVGElement|d3.selection|dc.baseMixin}\n */\n _chart.svg = function (svgElement) {\n if (!arguments.length) {\n return _svg;\n }\n _svg = svgElement;\n return _chart;\n };\n\n /**\n * Remove the chart's SVGElements from the dom and recreate the container SVGElement.\n * @method resetSvg\n * @memberof dc.baseMixin\n * @instance\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/SVGElement SVGElement}\n * @returns {SVGElement}\n */\n _chart.resetSvg = function () {\n _chart.select('svg').remove();\n return generateSvg();\n };\n\n function sizeSvg () {\n if (_svg) {\n if (!_useViewBoxResizing) {\n _svg\n .attr('width', _chart.width())\n .attr('height', _chart.height());\n } else if (!_svg.attr('viewBox')) {\n _svg\n .attr('viewBox', '0 0 ' + _chart.width() + ' ' + _chart.height());\n }\n }\n }\n\n function generateSvg () {\n _svg = _chart.root().append('svg');\n sizeSvg();\n return _svg;\n }\n\n /**\n * Set or get the filter printer function. The filter printer function is used to generate human\n * friendly text for filter value(s) associated with the chart instance. The text will get shown\n * in the `.filter element; see {@link dc.baseMixin#turnOnControls turnOnControls}.\n *\n * By default dc charts use a default filter printer {@link dc.printers.filters dc.printers.filters}\n * that provides simple printing support for both single value and ranged filters.\n * @method filterPrinter\n * @memberof dc.baseMixin\n * @instance\n * @example\n * // for a chart with an ordinal brush, print the filters in upper case\n * chart.filterPrinter(function(filters) {\n * return filters.map(function(f) { return f.toUpperCase(); }).join(', ');\n * });\n * // for a chart with a range brush, print the filter as start and extent\n * chart.filterPrinter(function(filters) {\n * return 'start ' + dc.utils.printSingleValue(filters[0][0]) +\n * ' extent ' + dc.utils.printSingleValue(filters[0][1] - filters[0][0]);\n * });\n * @param {Function} [filterPrinterFunction=dc.printers.filters]\n * @returns {Function|dc.baseMixin}\n */\n _chart.filterPrinter = function (filterPrinterFunction) {\n if (!arguments.length) {\n return _filterPrinter;\n }\n _filterPrinter = filterPrinterFunction;\n return _chart;\n };\n\n /**\n * If set, use the `visibility` attribute instead of the `display` attribute for showing/hiding\n * chart reset and filter controls, for less disruption to the layout.\n * @method controlsUseVisibility\n * @memberof dc.baseMixin\n * @instance\n * @param {Boolean} [controlsUseVisibility=false]\n * @returns {Boolean|dc.baseMixin}\n **/\n _chart.controlsUseVisibility = function (useVisibility) {\n if (!arguments.length) {\n return _controlsUseVisibility;\n }\n _controlsUseVisibility = useVisibility;\n return _chart;\n };\n\n /**\n * Turn on optional control elements within the root element. dc currently supports the\n * following html control elements.\n * * root.selectAll('.reset') - elements are turned on if the chart has an active filter. This type\n * of control element is usually used to store a reset link to allow user to reset filter on a\n * certain chart. This element will be turned off automatically if the filter is cleared.\n * * root.selectAll('.filter') elements are turned on if the chart has an active filter. The text\n * content of this element is then replaced with the current filter value using the filter printer\n * function. This type of element will be turned off automatically if the filter is cleared.\n * @method turnOnControls\n * @memberof dc.baseMixin\n * @instance\n * @returns {dc.baseMixin}\n */\n _chart.turnOnControls = function () {\n if (_root) {\n var attribute = _chart.controlsUseVisibility() ? 'visibility' : 'display';\n _chart.selectAll('.reset').style(attribute, null);\n _chart.selectAll('.filter').text(_filterPrinter(_chart.filters())).style(attribute, null);\n }\n return _chart;\n };\n\n /**\n * Turn off optional control elements within the root element.\n * @method turnOffControls\n * @memberof dc.baseMixin\n * @see {@link dc.baseMixin#turnOnControls turnOnControls}\n * @instance\n * @returns {dc.baseMixin}\n */\n _chart.turnOffControls = function () {\n if (_root) {\n var attribute = _chart.controlsUseVisibility() ? 'visibility' : 'display';\n var value = _chart.controlsUseVisibility() ? 'hidden' : 'none';\n _chart.selectAll('.reset').style(attribute, value);\n _chart.selectAll('.filter').style(attribute, value).text(_chart.filter());\n }\n return _chart;\n };\n\n /**\n * Set or get the animation transition duration (in milliseconds) for this chart instance.\n * @method transitionDuration\n * @memberof dc.baseMixin\n * @instance\n * @param {Number} [duration=750]\n * @returns {Number|dc.baseMixin}\n */\n _chart.transitionDuration = function (duration) {\n if (!arguments.length) {\n return _transitionDuration;\n }\n _transitionDuration = duration;\n return _chart;\n };\n\n /**\n * Set or get the animation transition delay (in milliseconds) for this chart instance.\n * @method transitionDelay\n * @memberof dc.baseMixin\n * @instance\n * @param {Number} [delay=0]\n * @returns {Number|dc.baseMixin}\n */\n _chart.transitionDelay = function (delay) {\n if (!arguments.length) {\n return _transitionDelay;\n }\n _transitionDelay = delay;\n return _chart;\n };\n\n _chart._mandatoryAttributes = function (_) {\n if (!arguments.length) {\n return _mandatoryAttributes;\n }\n _mandatoryAttributes = _;\n return _chart;\n };\n\n function checkForMandatoryAttributes (a) {\n if (!_chart[a] || !_chart[a]()) {\n throw new dc.errors.InvalidStateException('Mandatory attribute chart.' + a +\n ' is missing on chart[#' + _chart.anchorName() + ']');\n }\n }\n\n /**\n * Invoking this method will force the chart to re-render everything from scratch. Generally it\n * should only be used to render the chart for the first time on the page or if you want to make\n * sure everything is redrawn from scratch instead of relying on the default incremental redrawing\n * behaviour.\n * @method render\n * @memberof dc.baseMixin\n * @instance\n * @returns {dc.baseMixin}\n */\n _chart.render = function () {\n _height = _width = undefined; // force recalculate\n _listeners.preRender(_chart);\n\n if (_mandatoryAttributes) {\n _mandatoryAttributes.forEach(checkForMandatoryAttributes);\n }\n\n var result = _chart._doRender();\n\n if (_legend) {\n _legend.render();\n }\n\n _chart._activateRenderlets('postRender');\n\n return result;\n };\n\n _chart._activateRenderlets = function (event) {\n _listeners.pretransition(_chart);\n if (_chart.transitionDuration() > 0 && _svg) {\n _svg.transition().duration(_chart.transitionDuration()).delay(_chart.transitionDelay())\n .each('end', function () {\n _listeners.renderlet(_chart);\n if (event) {\n _listeners[event](_chart);\n }\n });\n } else {\n _listeners.renderlet(_chart);\n if (event) {\n _listeners[event](_chart);\n }\n }\n };\n\n /**\n * Calling redraw will cause the chart to re-render data changes incrementally. If there is no\n * change in the underlying data dimension then calling this method will have no effect on the\n * chart. Most chart interaction in dc will automatically trigger this method through internal\n * events (in particular {@link dc.redrawAll dc.redrawAll}); therefore, you only need to\n * manually invoke this function if data is manipulated outside of dc's control (for example if\n * data is loaded in the background using\n * {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#crossfilter_add crossfilter.add}).\n * @method redraw\n * @memberof dc.baseMixin\n * @instance\n * @returns {dc.baseMixin}\n */\n _chart.redraw = function () {\n sizeSvg();\n _listeners.preRedraw(_chart);\n\n var result = _chart._doRedraw();\n\n if (_legend) {\n _legend.render();\n }\n\n _chart._activateRenderlets('postRedraw');\n\n return result;\n };\n\n /**\n * Gets/sets the commit handler. If the chart has a commit handler, the handler will be called when\n * the chart's filters have changed, in order to send the filter data asynchronously to a server.\n *\n * Unlike other functions in dc.js, the commit handler is asynchronous. It takes two arguments:\n * a flag indicating whether this is a render (true) or a redraw (false), and a callback to be\n * triggered once the commit is filtered. The callback has the standard node.js continuation signature\n * with error first and result second.\n * @method commitHandler\n * @memberof dc.baseMixin\n * @instance\n * @returns {dc.baseMixin}\n */\n _chart.commitHandler = function (commitHandler) {\n if (!arguments.length) {\n return _commitHandler;\n }\n _commitHandler = commitHandler;\n return _chart;\n };\n\n /**\n * Redraws all charts in the same group as this chart, typically in reaction to a filter\n * change. If the chart has a {@link dc.baseMixin.commitFilter commitHandler}, it will\n * be executed and waited for.\n * @method redrawGroup\n * @memberof dc.baseMixin\n * @instance\n * @returns {dc.baseMixin}\n */\n _chart.redrawGroup = function () {\n if (_commitHandler) {\n _commitHandler(false, function (error, result) {\n if (error) {\n console.log(error);\n } else {\n dc.redrawAll(_chart.chartGroup());\n }\n });\n } else {\n dc.redrawAll(_chart.chartGroup());\n }\n return _chart;\n };\n\n /**\n * Renders all charts in the same group as this chart. If the chart has a\n * {@link dc.baseMixin.commitFilter commitHandler}, it will be executed and waited for\n * @method renderGroup\n * @memberof dc.baseMixin\n * @instance\n * @returns {dc.baseMixin}\n */\n _chart.renderGroup = function () {\n if (_commitHandler) {\n _commitHandler(false, function (error, result) {\n if (error) {\n console.log(error);\n } else {\n dc.renderAll(_chart.chartGroup());\n }\n });\n } else {\n dc.renderAll(_chart.chartGroup());\n }\n return _chart;\n };\n\n _chart._invokeFilteredListener = function (f) {\n if (f !== undefined) {\n _listeners.filtered(_chart, f);\n }\n };\n\n _chart._invokeZoomedListener = function () {\n _listeners.zoomed(_chart);\n };\n\n var _hasFilterHandler = function (filters, filter) {\n if (filter === null || typeof(filter) === 'undefined') {\n return filters.length > 0;\n }\n return filters.some(function (f) {\n return filter <= f && filter >= f;\n });\n };\n\n /**\n * Set or get the has-filter handler. The has-filter handler is a function that checks to see if\n * the chart's current filters (first argument) include a specific filter (second argument). Using a custom has-filter handler allows\n * you to change the way filters are checked for and replaced.\n * @method hasFilterHandler\n * @memberof dc.baseMixin\n * @instance\n * @example\n * // default has-filter handler\n * chart.hasFilterHandler(function (filters, filter) {\n * if (filter === null || typeof(filter) === 'undefined') {\n * return filters.length > 0;\n * }\n * return filters.some(function (f) {\n * return filter <= f && filter >= f;\n * });\n * });\n *\n * // custom filter handler (no-op)\n * chart.hasFilterHandler(function(filters, filter) {\n * return false;\n * });\n * @param {Function} [hasFilterHandler]\n * @returns {Function|dc.baseMixin}\n */\n _chart.hasFilterHandler = function (hasFilterHandler) {\n if (!arguments.length) {\n return _hasFilterHandler;\n }\n _hasFilterHandler = hasFilterHandler;\n return _chart;\n };\n\n /**\n * Check whether any active filter or a specific filter is associated with particular chart instance.\n * This function is **not chainable**.\n * @method hasFilter\n * @memberof dc.baseMixin\n * @instance\n * @see {@link dc.baseMixin#hasFilterHandler hasFilterHandler}\n * @param {*} [filter]\n * @returns {Boolean}\n */\n _chart.hasFilter = function (filter) {\n return _hasFilterHandler(_filters, filter);\n };\n\n var _removeFilterHandler = function (filters, filter) {\n for (var i = 0; i < filters.length; i++) {\n if (filters[i] <= filter && filters[i] >= filter) {\n filters.splice(i, 1);\n break;\n }\n }\n return filters;\n };\n\n /**\n * Set or get the remove filter handler. The remove filter handler is a function that removes a\n * filter from the chart's current filters. Using a custom remove filter handler allows you to\n * change how filters are removed or perform additional work when removing a filter, e.g. when\n * using a filter server other than crossfilter.\n *\n * The handler should return a new or modified array as the result.\n * @method removeFilterHandler\n * @memberof dc.baseMixin\n * @instance\n * @example\n * // default remove filter handler\n * chart.removeFilterHandler(function (filters, filter) {\n * for (var i = 0; i < filters.length; i++) {\n * if (filters[i] <= filter && filters[i] >= filter) {\n * filters.splice(i, 1);\n * break;\n * }\n * }\n * return filters;\n * });\n *\n * // custom filter handler (no-op)\n * chart.removeFilterHandler(function(filters, filter) {\n * return filters;\n * });\n * @param {Function} [removeFilterHandler]\n * @returns {Function|dc.baseMixin}\n */\n _chart.removeFilterHandler = function (removeFilterHandler) {\n if (!arguments.length) {\n return _removeFilterHandler;\n }\n _removeFilterHandler = removeFilterHandler;\n return _chart;\n };\n\n var _addFilterHandler = function (filters, filter) {\n filters.push(filter);\n return filters;\n };\n\n /**\n * Set or get the add filter handler. The add filter handler is a function that adds a filter to\n * the chart's filter list. Using a custom add filter handler allows you to change the way filters\n * are added or perform additional work when adding a filter, e.g. when using a filter server other\n * than crossfilter.\n *\n * The handler should return a new or modified array as the result.\n * @method addFilterHandler\n * @memberof dc.baseMixin\n * @instance\n * @example\n * // default add filter handler\n * chart.addFilterHandler(function (filters, filter) {\n * filters.push(filter);\n * return filters;\n * });\n *\n * // custom filter handler (no-op)\n * chart.addFilterHandler(function(filters, filter) {\n * return filters;\n * });\n * @param {Function} [addFilterHandler]\n * @returns {Function|dc.baseMixin}\n */\n _chart.addFilterHandler = function (addFilterHandler) {\n if (!arguments.length) {\n return _addFilterHandler;\n }\n _addFilterHandler = addFilterHandler;\n return _chart;\n };\n\n var _resetFilterHandler = function (filters) {\n return [];\n };\n\n /**\n * Set or get the reset filter handler. The reset filter handler is a function that resets the\n * chart's filter list by returning a new list. Using a custom reset filter handler allows you to\n * change the way filters are reset, or perform additional work when resetting the filters,\n * e.g. when using a filter server other than crossfilter.\n *\n * The handler should return a new or modified array as the result.\n * @method resetFilterHandler\n * @memberof dc.baseMixin\n * @instance\n * @example\n * // default remove filter handler\n * function (filters) {\n * return [];\n * }\n *\n * // custom filter handler (no-op)\n * chart.resetFilterHandler(function(filters) {\n * return filters;\n * });\n * @param {Function} [resetFilterHandler]\n * @returns {dc.baseMixin}\n */\n _chart.resetFilterHandler = function (resetFilterHandler) {\n if (!arguments.length) {\n return _resetFilterHandler;\n }\n _resetFilterHandler = resetFilterHandler;\n return _chart;\n };\n\n function applyFilters (filters) {\n if (_chart.dimension() && _chart.dimension().filter) {\n var fs = _filterHandler(_chart.dimension(), filters);\n if (fs) {\n filters = fs;\n }\n }\n return filters;\n }\n\n /**\n * Replace the chart filter. This is equivalent to calling `chart.filter(null).filter(filter)`\n * but more efficient because the filter is only applied once.\n *\n * @method replaceFilter\n * @memberof dc.baseMixin\n * @instance\n * @param {*} [filter]\n * @returns {dc.baseMixin}\n **/\n _chart.replaceFilter = function (filter) {\n _filters = _resetFilterHandler(_filters);\n _chart.filter(filter);\n return _chart;\n };\n\n /**\n * Filter the chart by the given parameter, or return the current filter if no input parameter\n * is given.\n *\n * The filter parameter can take one of these forms:\n * * A single value: the value will be toggled (added if it is not present in the current\n * filters, removed if it is present)\n * * An array containing a single array of values (`[[value,value,value]]`): each value is\n * toggled\n * * When appropriate for the chart, a {@link dc.filters dc filter object} such as\n * * {@link dc.filters.RangedFilter `dc.filters.RangedFilter`} for the\n * {@link dc.coordinateGridMixin dc.coordinateGridMixin} charts\n * * {@link dc.filters.TwoDimensionalFilter `dc.filters.TwoDimensionalFilter`} for the\n * {@link dc.heatMap heat map}\n * * {@link dc.filters.RangedTwoDimensionalFilter `dc.filters.RangedTwoDimensionalFilter`}\n * for the {@link dc.scatterPlot scatter plot}\n * * `null`: the filter will be reset using the\n * {@link dc.baseMixin#resetFilterHandler resetFilterHandler}\n *\n * Note that this is always a toggle (even when it doesn't make sense for the filter type). If\n * you wish to replace the current filter, either call `chart.filter(null)` first - or it's more\n * efficient to call {@link dc.baseMixin#replaceFilter `chart.replaceFilter(filter)`} instead.\n *\n * Each toggle is executed by checking if the value is already present using the\n * {@link dc.baseMixin#hasFilterHandler hasFilterHandler}; if it is not present, it is added\n * using the {@link dc.baseMixin#addFilterHandler addFilterHandler}; if it is already present,\n * it is removed using the {@link dc.baseMixin#removeFilterHandler removeFilterHandler}.\n *\n * Once the filters array has been updated, the filters are applied to the\n * crossfilter dimension, using the {@link dc.baseMixin#filterHandler filterHandler}.\n *\n * Once you have set the filters, call {@link dc.baseMixin#redrawGroup `chart.redrawGroup()`}\n * (or {@link dc.redrawAll `dc.redrawAll()`}) to redraw the chart's group.\n * @method filter\n * @memberof dc.baseMixin\n * @instance\n * @see {@link dc.baseMixin#addFilterHandler addFilterHandler}\n * @see {@link dc.baseMixin#removeFilterHandler removeFilterHandler}\n * @see {@link dc.baseMixin#resetFilterHandler resetFilterHandler}\n * @see {@link dc.baseMixin#filterHandler filterHandler}\n * @example\n * // filter by a single string\n * chart.filter('Sunday');\n * // filter by a single age\n * chart.filter(18);\n * // filter by a set of states\n * chart.filter([['MA', 'TX', 'ND', 'WA']]);\n * // filter by range -- note the use of dc.filters.RangedFilter, which is different\n * // from the syntax for filtering a crossfilter dimension directly, dimension.filter([15,20])\n * chart.filter(dc.filters.RangedFilter(15,20));\n * @param {*} [filter]\n * @returns {dc.baseMixin}\n */\n _chart.filter = function (filter) {\n if (!arguments.length) {\n return _filters.length > 0 ? _filters[0] : null;\n }\n var filters = _filters;\n if (filter instanceof Array && filter[0] instanceof Array && !filter.isFiltered) {\n // toggle each filter\n filter[0].forEach(function (f) {\n if (_hasFilterHandler(filters, f)) {\n filters = _removeFilterHandler(filters, f);\n } else {\n filters = _addFilterHandler(filters, f);\n }\n });\n } else if (filter === null) {\n filters = _resetFilterHandler(filters);\n } else {\n if (_hasFilterHandler(filters, filter)) {\n filters = _removeFilterHandler(filters, filter);\n } else {\n filters = _addFilterHandler(filters, filter);\n }\n }\n _filters = applyFilters(filters);\n _chart._invokeFilteredListener(filter);\n\n if (_root !== null && _chart.hasFilter()) {\n _chart.turnOnControls();\n } else {\n _chart.turnOffControls();\n }\n\n return _chart;\n };\n\n /**\n * Returns all current filters. This method does not perform defensive cloning of the internal\n * filter array before returning, therefore any modification of the returned array will effect the\n * chart's internal filter storage.\n * @method filters\n * @memberof dc.baseMixin\n * @instance\n * @returns {Array<*>}\n */\n _chart.filters = function () {\n return _filters;\n };\n\n _chart.highlightSelected = function (e) {\n d3.select(e).classed(dc.constants.SELECTED_CLASS, true);\n d3.select(e).classed(dc.constants.DESELECTED_CLASS, false);\n };\n\n _chart.fadeDeselected = function (e) {\n d3.select(e).classed(dc.constants.SELECTED_CLASS, false);\n d3.select(e).classed(dc.constants.DESELECTED_CLASS, true);\n };\n\n _chart.resetHighlight = function (e) {\n d3.select(e).classed(dc.constants.SELECTED_CLASS, false);\n d3.select(e).classed(dc.constants.DESELECTED_CLASS, false);\n };\n\n /**\n * This function is passed to d3 as the onClick handler for each chart. The default behavior is to\n * filter on the clicked datum (passed to the callback) and redraw the chart group.\n * @method onClick\n * @memberof dc.baseMixin\n * @instance\n * @param {*} datum\n */\n _chart.onClick = function (datum) {\n var filter = _chart.keyAccessor()(datum);\n dc.events.trigger(function () {\n _chart.filter(filter);\n _chart.redrawGroup();\n });\n };\n\n /**\n * Set or get the filter handler. The filter handler is a function that performs the filter action\n * on a specific dimension. Using a custom filter handler allows you to perform additional logic\n * before or after filtering.\n * @method filterHandler\n * @memberof dc.baseMixin\n * @instance\n * @see {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#dimension_filter crossfilter.dimension.filter}\n * @example\n * // the default filter handler handles all possible cases for the charts in dc.js\n * // you can replace it with something more specialized for your own chart\n * chart.filterHandler(function (dimension, filters) {\n * if (filters.length === 0) {\n * // the empty case (no filtering)\n * dimension.filter(null);\n * } else if (filters.length === 1 && !filters[0].isFiltered) {\n * // single value and not a function-based filter\n * dimension.filterExact(filters[0]);\n * } else if (filters.length === 1 && filters[0].filterType === 'RangedFilter') {\n * // single range-based filter\n * dimension.filterRange(filters[0]);\n * } else {\n * // an array of values, or an array of filter objects\n * dimension.filterFunction(function (d) {\n * for (var i = 0; i < filters.length; i++) {\n * var filter = filters[i];\n * if (filter.isFiltered && filter.isFiltered(d)) {\n * return true;\n * } else if (filter <= d && filter >= d) {\n * return true;\n * }\n * }\n * return false;\n * });\n * }\n * return filters;\n * });\n *\n * // custom filter handler\n * chart.filterHandler(function(dimension, filter){\n * var newFilter = filter + 10;\n * dimension.filter(newFilter);\n * return newFilter; // set the actual filter value to the new value\n * });\n * @param {Function} [filterHandler]\n * @returns {Function|dc.baseMixin}\n */\n _chart.filterHandler = function (filterHandler) {\n if (!arguments.length) {\n return _filterHandler;\n }\n _filterHandler = filterHandler;\n return _chart;\n };\n\n // abstract function stub\n _chart._doRender = function () {\n // do nothing in base, should be overridden by sub-function\n return _chart;\n };\n\n _chart._doRedraw = function () {\n // do nothing in base, should be overridden by sub-function\n return _chart;\n };\n\n _chart.legendables = function () {\n // do nothing in base, should be overridden by sub-function\n return [];\n };\n\n _chart.legendHighlight = function () {\n // do nothing in base, should be overridden by sub-function\n };\n\n _chart.legendReset = function () {\n // do nothing in base, should be overridden by sub-function\n };\n\n _chart.legendToggle = function () {\n // do nothing in base, should be overriden by sub-function\n };\n\n _chart.isLegendableHidden = function () {\n // do nothing in base, should be overridden by sub-function\n return false;\n };\n\n /**\n * Set or get the key accessor function. The key accessor function is used to retrieve the key\n * value from the crossfilter group. Key values are used differently in different charts, for\n * example keys correspond to slices in a pie chart and x axis positions in a grid coordinate chart.\n * @method keyAccessor\n * @memberof dc.baseMixin\n * @instance\n * @example\n * // default key accessor\n * chart.keyAccessor(function(d) { return d.key; });\n * // custom key accessor for a multi-value crossfilter reduction\n * chart.keyAccessor(function(p) { return p.value.absGain; });\n * @param {Function} [keyAccessor]\n * @returns {Function|dc.baseMixin}\n */\n _chart.keyAccessor = function (keyAccessor) {\n if (!arguments.length) {\n return _keyAccessor;\n }\n _keyAccessor = keyAccessor;\n return _chart;\n };\n\n /**\n * Set or get the value accessor function. The value accessor function is used to retrieve the\n * value from the crossfilter group. Group values are used differently in different charts, for\n * example values correspond to slice sizes in a pie chart and y axis positions in a grid\n * coordinate chart.\n * @method valueAccessor\n * @memberof dc.baseMixin\n * @instance\n * @example\n * // default value accessor\n * chart.valueAccessor(function(d) { return d.value; });\n * // custom value accessor for a multi-value crossfilter reduction\n * chart.valueAccessor(function(p) { return p.value.percentageGain; });\n * @param {Function} [valueAccessor]\n * @returns {Function|dc.baseMixin}\n */\n _chart.valueAccessor = function (valueAccessor) {\n if (!arguments.length) {\n return _valueAccessor;\n }\n _valueAccessor = valueAccessor;\n return _chart;\n };\n\n /**\n * Set or get the label function. The chart class will use this function to render labels for each\n * child element in the chart, e.g. slices in a pie chart or bubbles in a bubble chart. Not every\n * chart supports the label function, for example line chart does not use this function\n * at all. By default, enables labels; pass false for the second parameter if this is not desired.\n * @method label\n * @memberof dc.baseMixin\n * @instance\n * @example\n * // default label function just return the key\n * chart.label(function(d) { return d.key; });\n * // label function has access to the standard d3 data binding and can get quite complicated\n * chart.label(function(d) { return d.data.key + '(' + Math.floor(d.data.value / all.value() * 100) + '%)'; });\n * @param {Function} [labelFunction]\n * @param {Boolean} [enableLabels=true]\n * @returns {Function|dc.baseMixin}\n */\n _chart.label = function (labelFunction, enableLabels) {\n if (!arguments.length) {\n return _label;\n }\n _label = labelFunction;\n if ((enableLabels === undefined) || enableLabels) {\n _renderLabel = true;\n }\n return _chart;\n };\n\n /**\n * Turn on/off label rendering\n * @method renderLabel\n * @memberof dc.baseMixin\n * @instance\n * @param {Boolean} [renderLabel=false]\n * @returns {Boolean|dc.baseMixin}\n */\n _chart.renderLabel = function (renderLabel) {\n if (!arguments.length) {\n return _renderLabel;\n }\n _renderLabel = renderLabel;\n return _chart;\n };\n\n /**\n * Set or get the title function. The chart class will use this function to render the SVGElement title\n * (usually interpreted by browser as tooltips) for each child element in the chart, e.g. a slice\n * in a pie chart or a bubble in a bubble chart. Almost every chart supports the title function;\n * however in grid coordinate charts you need to turn off the brush in order to see titles, because\n * otherwise the brush layer will block tooltip triggering.\n * @method title\n * @memberof dc.baseMixin\n * @instance\n * @example\n * // default title function shows \"key: value\"\n * chart.title(function(d) { return d.key + ': ' + d.value; });\n * // title function has access to the standard d3 data binding and can get quite complicated\n * chart.title(function(p) {\n * return p.key.getFullYear()\n * + '\\n'\n * + 'Index Gain: ' + numberFormat(p.value.absGain) + '\\n'\n * + 'Index Gain in Percentage: ' + numberFormat(p.value.percentageGain) + '%\\n'\n * + 'Fluctuation / Index Ratio: ' + numberFormat(p.value.fluctuationPercentage) + '%';\n * });\n * @param {Function} [titleFunction]\n * @returns {Function|dc.baseMixin}\n */\n _chart.title = function (titleFunction) {\n if (!arguments.length) {\n return _title;\n }\n _title = titleFunction;\n return _chart;\n };\n\n /**\n * Turn on/off title rendering, or return the state of the render title flag if no arguments are\n * given.\n * @method renderTitle\n * @memberof dc.baseMixin\n * @instance\n * @param {Boolean} [renderTitle=true]\n * @returns {Boolean|dc.baseMixin}\n */\n _chart.renderTitle = function (renderTitle) {\n if (!arguments.length) {\n return _renderTitle;\n }\n _renderTitle = renderTitle;\n return _chart;\n };\n\n /**\n * A renderlet is similar to an event listener on rendering event. Multiple renderlets can be added\n * to an individual chart. Each time a chart is rerendered or redrawn the renderlets are invoked\n * right after the chart finishes its transitions, giving you a way to modify the SVGElements.\n * Renderlet functions take the chart instance as the only input parameter and you can\n * use the dc API or use raw d3 to achieve pretty much any effect.\n *\n * Use {@link dc.baseMixin#on on} with a 'renderlet' prefix.\n * Generates a random key for the renderlet, which makes it hard to remove.\n * @method renderlet\n * @memberof dc.baseMixin\n * @instance\n * @deprecated\n * @example\n * // do this instead of .renderlet(function(chart) { ... })\n * chart.on(\"renderlet\", function(chart){\n * // mix of dc API and d3 manipulation\n * chart.select('g.y').style('display', 'none');\n * // its a closure so you can also access other chart variable available in the closure scope\n * moveChart.filter(chart.filter());\n * });\n * @param {Function} renderletFunction\n * @returns {dc.baseMixin}\n */\n _chart.renderlet = dc.logger.deprecate(function (renderletFunction) {\n _chart.on('renderlet.' + dc.utils.uniqueId(), renderletFunction);\n return _chart;\n }, 'chart.renderlet has been deprecated. Please use chart.on(\"renderlet.<renderletKey>\", renderletFunction)');\n\n /**\n * Get or set the chart group to which this chart belongs. Chart groups are rendered or redrawn\n * together since it is expected they share the same underlying crossfilter data set.\n * @method chartGroup\n * @memberof dc.baseMixin\n * @instance\n * @param {String} [chartGroup]\n * @returns {String|dc.baseMixin}\n */\n _chart.chartGroup = function (chartGroup) {\n if (!arguments.length) {\n return _chartGroup;\n }\n if (!_isChild) {\n dc.deregisterChart(_chart, _chartGroup);\n }\n _chartGroup = chartGroup;\n if (!_isChild) {\n dc.registerChart(_chart, _chartGroup);\n }\n return _chart;\n };\n\n /**\n * Expire the internal chart cache. dc charts cache some data internally on a per chart basis to\n * speed up rendering and avoid unnecessary calculation; however it might be useful to clear the\n * cache if you have changed state which will affect rendering. For example, if you invoke\n * {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#crossfilter_add crossfilter.add}\n * function or reset group or dimension after rendering, it is a good idea to\n * clear the cache to make sure charts are rendered properly.\n * @method expireCache\n * @memberof dc.baseMixin\n * @instance\n * @returns {dc.baseMixin}\n */\n _chart.expireCache = function () {\n // do nothing in base, should be overridden by sub-function\n return _chart;\n };\n\n /**\n * Attach a dc.legend widget to this chart. The legend widget will automatically draw legend labels\n * based on the color setting and names associated with each group.\n * @method legend\n * @memberof dc.baseMixin\n * @instance\n * @example\n * chart.legend(dc.legend().x(400).y(10).itemHeight(13).gap(5))\n * @param {dc.legend} [legend]\n * @returns {dc.legend|dc.baseMixin}\n */\n _chart.legend = function (legend) {\n if (!arguments.length) {\n return _legend;\n }\n _legend = legend;\n _legend.parent(_chart);\n return _chart;\n };\n\n /**\n * Returns the internal numeric ID of the chart.\n * @method chartID\n * @memberof dc.baseMixin\n * @instance\n * @returns {String}\n */\n _chart.chartID = function () {\n return _chart.__dcFlag__;\n };\n\n /**\n * Set chart options using a configuration object. Each key in the object will cause the method of\n * the same name to be called with the value to set that attribute for the chart.\n * @method options\n * @memberof dc.baseMixin\n * @instance\n * @example\n * chart.options({dimension: myDimension, group: myGroup});\n * @param {{}} opts\n * @returns {dc.baseMixin}\n */\n _chart.options = function (opts) {\n var applyOptions = [\n 'anchor',\n 'group',\n 'xAxisLabel',\n 'yAxisLabel',\n 'stack',\n 'title',\n 'point',\n 'getColor',\n 'overlayGeoJson'\n ];\n\n for (var o in opts) {\n if (typeof(_chart[o]) === 'function') {\n if (opts[o] instanceof Array && applyOptions.indexOf(o) !== -1) {\n _chart[o].apply(_chart, opts[o]);\n } else {\n _chart[o].call(_chart, opts[o]);\n }\n } else {\n dc.logger.debug('Not a valid option setter name: ' + o);\n }\n }\n return _chart;\n };\n\n /**\n * All dc chart instance supports the following listeners.\n * Supports the following events:\n * * `renderlet` - This listener function will be invoked after transitions after redraw and render. Replaces the\n * deprecated {@link dc.baseMixin#renderlet renderlet} method.\n * * `pretransition` - Like `.on('renderlet', ...)` but the event is fired before transitions start.\n * * `preRender` - This listener function will be invoked before chart rendering.\n * * `postRender` - This listener function will be invoked after chart finish rendering including\n * all renderlets' logic.\n * * `preRedraw` - This listener function will be invoked before chart redrawing.\n * * `postRedraw` - This listener function will be invoked after chart finish redrawing\n * including all renderlets' logic.\n * * `filtered` - This listener function will be invoked after a filter is applied, added or removed.\n * * `zoomed` - This listener function will be invoked after a zoom is triggered.\n * @method on\n * @memberof dc.baseMixin\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Internals.md#dispatch_on d3.dispatch.on}\n * @example\n * .on('renderlet', function(chart, filter){...})\n * .on('pretransition', function(chart, filter){...})\n * .on('preRender', function(chart){...})\n * .on('postRender', function(chart){...})\n * .on('preRedraw', function(chart){...})\n * .on('postRedraw', function(chart){...})\n * .on('filtered', function(chart, filter){...})\n * .on('zoomed', function(chart, filter){...})\n * @param {String} event\n * @param {Function} listener\n * @returns {dc.baseMixin}\n */\n _chart.on = function (event, listener) {\n _listeners.on(event, listener);\n return _chart;\n };\n\n return _chart;\n};\n","/**\n * Margin is a mixin that provides margin utility functions for both the Row Chart and Coordinate Grid\n * Charts.\n * @name marginMixin\n * @memberof dc\n * @mixin\n * @param {Object} _chart\n * @returns {dc.marginMixin}\n */\ndc.marginMixin = function (_chart) {\n var _margin = {top: 10, right: 50, bottom: 30, left: 30};\n\n /**\n * Get or set the margins for a particular coordinate grid chart instance. The margins is stored as\n * an associative Javascript array.\n * @method margins\n * @memberof dc.marginMixin\n * @instance\n * @example\n * var leftMargin = chart.margins().left; // 30 by default\n * chart.margins().left = 50;\n * leftMargin = chart.margins().left; // now 50\n * @param {{top: Number, right: Number, left: Number, bottom: Number}} [margins={top: 10, right: 50, bottom: 30, left: 30}]\n * @returns {{top: Number, right: Number, left: Number, bottom: Number}|dc.marginMixin}\n */\n _chart.margins = function (margins) {\n if (!arguments.length) {\n return _margin;\n }\n _margin = margins;\n return _chart;\n };\n\n _chart.effectiveWidth = function () {\n return _chart.width() - _chart.margins().left - _chart.margins().right;\n };\n\n _chart.effectiveHeight = function () {\n return _chart.height() - _chart.margins().top - _chart.margins().bottom;\n };\n\n return _chart;\n};\n","/**\n * The Color Mixin is an abstract chart functional class providing universal coloring support\n * as a mix-in for any concrete chart implementation.\n * @name colorMixin\n * @memberof dc\n * @mixin\n * @param {Object} _chart\n * @returns {dc.colorMixin}\n */\ndc.colorMixin = function (_chart) {\n var _colors = d3.scale.category20c();\n var _defaultAccessor = true;\n\n var _colorAccessor = function (d) { return _chart.keyAccessor()(d); };\n\n /**\n * Retrieve current color scale or set a new color scale. This methods accepts any function that\n * operates like a d3 scale.\n * @method colors\n * @memberof dc.colorMixin\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Scales.md d3.scale}\n * @example\n * // alternate categorical scale\n * chart.colors(d3.scale.category20b());\n * // ordinal scale\n * chart.colors(d3.scale.ordinal().range(['red','green','blue']));\n * // convenience method, the same as above\n * chart.ordinalColors(['red','green','blue']);\n * // set a linear scale\n * chart.linearColors([\"#4575b4\", \"#ffffbf\", \"#a50026\"]);\n * @param {d3.scale} [colorScale=d3.scale.category20c()]\n * @returns {d3.scale|dc.colorMixin}\n */\n _chart.colors = function (colorScale) {\n if (!arguments.length) {\n return _colors;\n }\n if (colorScale instanceof Array) {\n _colors = d3.scale.quantize().range(colorScale); // deprecated legacy support, note: this fails for ordinal domains\n } else {\n _colors = d3.functor(colorScale);\n }\n return _chart;\n };\n\n /**\n * Convenience method to set the color scale to\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Ordinal-Scales.md#ordinal d3.scale.ordinal} with\n * range `r`.\n * @method ordinalColors\n * @memberof dc.colorMixin\n * @instance\n * @param {Array<String>} r\n * @returns {dc.colorMixin}\n */\n _chart.ordinalColors = function (r) {\n return _chart.colors(d3.scale.ordinal().range(r));\n };\n\n /**\n * Convenience method to set the color scale to an Hcl interpolated linear scale with range `r`.\n * @method linearColors\n * @memberof dc.colorMixin\n * @instance\n * @param {Array<Number>} r\n * @returns {dc.colorMixin}\n */\n _chart.linearColors = function (r) {\n return _chart.colors(d3.scale.linear()\n .range(r)\n .interpolate(d3.interpolateHcl));\n };\n\n /**\n * Set or the get color accessor function. This function will be used to map a data point in a\n * crossfilter group to a color value on the color scale. The default function uses the key\n * accessor.\n * @method colorAccessor\n * @memberof dc.colorMixin\n * @instance\n * @example\n * // default index based color accessor\n * .colorAccessor(function (d, i){return i;})\n * // color accessor for a multi-value crossfilter reduction\n * .colorAccessor(function (d){return d.value.absGain;})\n * @param {Function} [colorAccessor]\n * @returns {Function|dc.colorMixin}\n */\n _chart.colorAccessor = function (colorAccessor) {\n if (!arguments.length) {\n return _colorAccessor;\n }\n _colorAccessor = colorAccessor;\n _defaultAccessor = false;\n return _chart;\n };\n\n // what is this?\n _chart.defaultColorAccessor = function () {\n return _defaultAccessor;\n };\n\n /**\n * Set or get the current domain for the color mapping function. The domain must be supplied as an\n * array.\n *\n * Note: previously this method accepted a callback function. Instead you may use a custom scale\n * set by {@link dc.colorMixin#colors .colors}.\n * @method colorDomain\n * @memberof dc.colorMixin\n * @instance\n * @param {Array<String>} [domain]\n * @returns {Array<String>|dc.colorMixin}\n */\n _chart.colorDomain = function (domain) {\n if (!arguments.length) {\n return _colors.domain();\n }\n _colors.domain(domain);\n return _chart;\n };\n\n /**\n * Set the domain by determining the min and max values as retrieved by\n * {@link dc.colorMixin#colorAccessor .colorAccessor} over the chart's dataset.\n * @method calculateColorDomain\n * @memberof dc.colorMixin\n * @instance\n * @returns {dc.colorMixin}\n */\n _chart.calculateColorDomain = function () {\n var newDomain = [d3.min(_chart.data(), _chart.colorAccessor()),\n d3.max(_chart.data(), _chart.colorAccessor())];\n _colors.domain(newDomain);\n return _chart;\n };\n\n /**\n * Get the color for the datum d and counter i. This is used internally by charts to retrieve a color.\n * @method getColor\n * @memberof dc.colorMixin\n * @instance\n * @param {*} d\n * @param {Number} [i]\n * @returns {String}\n */\n _chart.getColor = function (d, i) {\n return _colors(_colorAccessor.call(this, d, i));\n };\n\n /**\n * **Deprecated.** Get/set the color calculator. This actually replaces the\n * {@link dc.colorMixin#getColor getColor} method!\n *\n * This is not recommended, since using a {@link dc.colorMixin#colorAccessor colorAccessor} and\n * color scale ({@link dc.colorMixin#colors .colors}) is more powerful and idiomatic d3.\n * @method colorCalculator\n * @memberof dc.colorMixin\n * @instance\n * @param {*} [colorCalculator]\n * @returns {Function|dc.colorMixin}\n */\n _chart.colorCalculator = dc.logger.deprecate(function (colorCalculator) {\n if (!arguments.length) {\n return _chart.getColor;\n }\n _chart.getColor = colorCalculator;\n return _chart;\n }, 'colorMixin.colorCalculator has been deprecated. Please colorMixin.colors and colorMixin.colorAccessor instead');\n\n return _chart;\n};\n","/**\n * Coordinate Grid is an abstract base chart designed to support a number of coordinate grid based\n * concrete chart types, e.g. bar chart, line chart, and bubble chart.\n * @name coordinateGridMixin\n * @memberof dc\n * @mixin\n * @mixes dc.colorMixin\n * @mixes dc.marginMixin\n * @mixes dc.baseMixin\n * @param {Object} _chart\n * @returns {dc.coordinateGridMixin}\n */\ndc.coordinateGridMixin = function (_chart) {\n var GRID_LINE_CLASS = 'grid-line';\n var HORIZONTAL_CLASS = 'horizontal';\n var VERTICAL_CLASS = 'vertical';\n var Y_AXIS_LABEL_CLASS = 'y-axis-label';\n var X_AXIS_LABEL_CLASS = 'x-axis-label';\n var DEFAULT_AXIS_LABEL_PADDING = 12;\n\n _chart = dc.colorMixin(dc.marginMixin(dc.baseMixin(_chart)));\n\n _chart.colors(d3.scale.category10());\n _chart._mandatoryAttributes().push('x');\n var _parent;\n var _g;\n var _chartBodyG;\n\n var _x;\n var _xOriginalDomain;\n var _xAxis = d3.svg.axis().orient('bottom');\n var _xUnits = dc.units.integers;\n var _xAxisPadding = 0;\n var _xAxisPaddingUnit = 'day';\n var _xElasticity = false;\n var _xAxisLabel;\n var _xAxisLabelPadding = 0;\n var _lastXDomain;\n\n var _y;\n var _yAxis = d3.svg.axis().orient('left');\n var _yAxisPadding = 0;\n var _yElasticity = false;\n var _yAxisLabel;\n var _yAxisLabelPadding = 0;\n\n var _brush = d3.svg.brush();\n var _brushOn = true;\n var _round;\n\n var _renderHorizontalGridLine = false;\n var _renderVerticalGridLine = false;\n\n var _refocused = false, _resizing = false;\n var _unitCount;\n\n var _zoomScale = [1, Infinity];\n var _zoomOutRestrict = true;\n\n var _zoom = d3.behavior.zoom().on('zoom', zoomHandler);\n var _nullZoom = d3.behavior.zoom().on('zoom', null);\n var _hasBeenMouseZoomable = false;\n\n var _rangeChart;\n var _focusChart;\n\n var _mouseZoomable = false;\n var _clipPadding = 0;\n\n var _outerRangeBandPadding = 0.5;\n var _rangeBandPadding = 0;\n\n var _useRightYAxis = false;\n\n /**\n * When changing the domain of the x or y scale, it is necessary to tell the chart to recalculate\n * and redraw the axes. (`.rescale()` is called automatically when the x or y scale is replaced\n * with {@link dc.coordinateGridMixin+x .x()} or {@link dc.coordinateGridMixin#y .y()}, and has\n * no effect on elastic scales.)\n * @method rescale\n * @memberof dc.coordinateGridMixin\n * @instance\n * @returns {dc.coordinateGridMixin}\n */\n _chart.rescale = function () {\n _unitCount = undefined;\n _resizing = true;\n return _chart;\n };\n\n _chart.resizing = function () {\n return _resizing;\n };\n\n /**\n * Get or set the range selection chart associated with this instance. Setting the range selection\n * chart using this function will automatically update its selection brush when the current chart\n * zooms in. In return the given range chart will also automatically attach this chart as its focus\n * chart hence zoom in when range brush updates.\n *\n * Usually the range and focus charts will share a dimension. The range chart will set the zoom\n * boundaries for the focus chart, so its dimension values must be compatible with the domain of\n * the focus chart.\n *\n * See the [Nasdaq 100 Index](http://dc-js.github.com/dc.js/) example for this effect in action.\n * @method rangeChart\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {dc.coordinateGridMixin} [rangeChart]\n * @returns {dc.coordinateGridMixin}\n */\n _chart.rangeChart = function (rangeChart) {\n if (!arguments.length) {\n return _rangeChart;\n }\n _rangeChart = rangeChart;\n _rangeChart.focusChart(_chart);\n return _chart;\n };\n\n /**\n * Get or set the scale extent for mouse zooms.\n * @method zoomScale\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {Array<Number|Date>} [extent=[1, Infinity]]\n * @returns {Array<Number|Date>|dc.coordinateGridMixin}\n */\n _chart.zoomScale = function (extent) {\n if (!arguments.length) {\n return _zoomScale;\n }\n _zoomScale = extent;\n return _chart;\n };\n\n /**\n * Get or set the zoom restriction for the chart. If true limits the zoom to origional domain of the chart.\n * @method zoomOutRestrict\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {Boolean} [zoomOutRestrict=true]\n * @returns {Boolean|dc.coordinateGridMixin}\n */\n _chart.zoomOutRestrict = function (zoomOutRestrict) {\n if (!arguments.length) {\n return _zoomOutRestrict;\n }\n _zoomScale[0] = zoomOutRestrict ? 1 : 0;\n _zoomOutRestrict = zoomOutRestrict;\n return _chart;\n };\n\n _chart._generateG = function (parent) {\n if (parent === undefined) {\n _parent = _chart.svg();\n } else {\n _parent = parent;\n }\n\n var href = window.location.href.split('#')[0];\n\n _g = _parent.append('g');\n\n _chartBodyG = _g.append('g').attr('class', 'chart-body')\n .attr('transform', 'translate(' + _chart.margins().left + ', ' + _chart.margins().top + ')')\n .attr('clip-path', 'url(' + href + '#' + getClipPathId() + ')');\n\n return _g;\n };\n\n /**\n * Get or set the root g element. This method is usually used to retrieve the g element in order to\n * overlay custom svg drawing programatically. **Caution**: The root g element is usually generated\n * by dc.js internals, and resetting it might produce unpredictable result.\n * @method g\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {SVGElement} [gElement]\n * @returns {SVGElement|dc.coordinateGridMixin}\n */\n _chart.g = function (gElement) {\n if (!arguments.length) {\n return _g;\n }\n _g = gElement;\n return _chart;\n };\n\n /**\n * Set or get mouse zoom capability flag (default: false). When turned on the chart will be\n * zoomable using the mouse wheel. If the range selector chart is attached zooming will also update\n * the range selection brush on the associated range selector chart.\n * @method mouseZoomable\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {Boolean} [mouseZoomable=false]\n * @returns {Boolean|dc.coordinateGridMixin}\n */\n _chart.mouseZoomable = function (mouseZoomable) {\n if (!arguments.length) {\n return _mouseZoomable;\n }\n _mouseZoomable = mouseZoomable;\n return _chart;\n };\n\n /**\n * Retrieve the svg group for the chart body.\n * @method chartBodyG\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {SVGElement} [chartBodyG]\n * @returns {SVGElement}\n */\n _chart.chartBodyG = function (chartBodyG) {\n if (!arguments.length) {\n return _chartBodyG;\n }\n _chartBodyG = chartBodyG;\n return _chart;\n };\n\n /**\n * **mandatory**\n *\n * Get or set the x scale. The x scale can be any d3\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Quantitative-Scales.md quantitive scale} or\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Ordinal-Scales.md ordinal scale}.\n * @method x\n * @memberof dc.coordinateGridMixin\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Scales.md d3.scale}\n * @example\n * // set x to a linear scale\n * chart.x(d3.scale.linear().domain([-2500, 2500]))\n * // set x to a time scale to generate histogram\n * chart.x(d3.time.scale().domain([new Date(1985, 0, 1), new Date(2012, 11, 31)]))\n * @param {d3.scale} [xScale]\n * @returns {d3.scale|dc.coordinateGridMixin}\n */\n _chart.x = function (xScale) {\n if (!arguments.length) {\n return _x;\n }\n _x = xScale;\n _xOriginalDomain = _x.domain();\n _chart.rescale();\n return _chart;\n };\n\n _chart.xOriginalDomain = function () {\n return _xOriginalDomain;\n };\n\n /**\n * Set or get the xUnits function. The coordinate grid chart uses the xUnits function to calculate\n * the number of data projections on x axis such as the number of bars for a bar chart or the\n * number of dots for a line chart. This function is expected to return a Javascript array of all\n * data points on x axis, or the number of points on the axis. [d3 time range functions\n * d3.time.days, d3.time.months, and\n * d3.time.years](https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Intervals.md#aliases) are all valid xUnits\n * function. dc.js also provides a few units function, see the {@link dc.units Units Namespace} for\n * a list of built-in units functions.\n * @method xUnits\n * @memberof dc.coordinateGridMixin\n * @instance\n * @todo Add docs for utilities\n * @example\n * // set x units to count days\n * chart.xUnits(d3.time.days);\n * // set x units to count months\n * chart.xUnits(d3.time.months);\n *\n * // A custom xUnits function can be used as long as it follows the following interface:\n * // units in integer\n * function(start, end, xDomain) {\n * // simply calculates how many integers in the domain\n * return Math.abs(end - start);\n * };\n *\n * // fixed units\n * function(start, end, xDomain) {\n * // be aware using fixed units will disable the focus/zoom ability on the chart\n * return 1000;\n * @param {Function} [xUnits=dc.units.integers]\n * @returns {Function|dc.coordinateGridMixin}\n */\n _chart.xUnits = function (xUnits) {\n if (!arguments.length) {\n return _xUnits;\n }\n _xUnits = xUnits;\n return _chart;\n };\n\n /**\n * Set or get the x axis used by a particular coordinate grid chart instance. This function is most\n * useful when x axis customization is required. The x axis in dc.js is an instance of a\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Axes.md#axis d3 axis object};\n * therefore it supports any valid d3 axis manipulation.\n *\n * **Caution**: The x axis is usually generated internally by dc; resetting it may cause\n * unexpected results. Note also that when used as a getter, this function is not chainable:\n * it returns the axis, not the chart,\n * {@link https://github.com/dc-js/dc.js/wiki/FAQ#why-does-everything-break-after-a-call-to-xaxis-or-yaxis\n * so attempting to call chart functions after calling `.xAxis()` will fail}.\n * @method xAxis\n * @memberof dc.coordinateGridMixin\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Axes.md#axis d3.svg.axis}\n * @example\n * // customize x axis tick format\n * chart.xAxis().tickFormat(function(v) {return v + '%';});\n * // customize x axis tick values\n * chart.xAxis().tickValues([0, 100, 200, 300]);\n * @param {d3.svg.axis} [xAxis=d3.svg.axis().orient('bottom')]\n * @returns {d3.svg.axis|dc.coordinateGridMixin}\n */\n _chart.xAxis = function (xAxis) {\n if (!arguments.length) {\n return _xAxis;\n }\n _xAxis = xAxis;\n return _chart;\n };\n\n /**\n * Turn on/off elastic x axis behavior. If x axis elasticity is turned on, then the grid chart will\n * attempt to recalculate the x axis range whenever a redraw event is triggered.\n * @method elasticX\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {Boolean} [elasticX=false]\n * @returns {Boolean|dc.coordinateGridMixin}\n */\n _chart.elasticX = function (elasticX) {\n if (!arguments.length) {\n return _xElasticity;\n }\n _xElasticity = elasticX;\n return _chart;\n };\n\n /**\n * Set or get x axis padding for the elastic x axis. The padding will be added to both end of the x\n * axis if elasticX is turned on; otherwise it is ignored.\n *\n * Padding can be an integer or percentage in string (e.g. '10%'). Padding can be applied to\n * number or date x axes. When padding a date axis, an integer represents number of units being padded\n * and a percentage string will be treated the same as an integer. The unit will be determined by the\n * xAxisPaddingUnit variable.\n * @method xAxisPadding\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {Number|String} [padding=0]\n * @returns {Number|String|dc.coordinateGridMixin}\n */\n _chart.xAxisPadding = function (padding) {\n if (!arguments.length) {\n return _xAxisPadding;\n }\n _xAxisPadding = padding;\n return _chart;\n };\n\n /**\n * Set or get x axis padding unit for the elastic x axis. The padding unit will determine which unit to\n * use when applying xAxis padding if elasticX is turned on and if x-axis uses a time dimension;\n * otherwise it is ignored.\n *\n * Padding unit is a string that will be used when the padding is calculated. Available parameters are\n * the available d3 time intervals; see\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Intervals.md#interval d3.time.interval}.\n * @method xAxisPaddingUnit\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {String} [unit='days']\n * @returns {String|dc.coordinateGridMixin}\n */\n _chart.xAxisPaddingUnit = function (unit) {\n if (!arguments.length) {\n return _xAxisPaddingUnit;\n }\n _xAxisPaddingUnit = unit;\n return _chart;\n };\n\n /**\n * Returns the number of units displayed on the x axis using the unit measure configured by\n * {@link dc.coordinateGridMixin#xUnits xUnits}.\n * @method xUnitCount\n * @memberof dc.coordinateGridMixin\n * @instance\n * @returns {Number}\n */\n _chart.xUnitCount = function () {\n if (_unitCount === undefined) {\n var units = _chart.xUnits()(_chart.x().domain()[0], _chart.x().domain()[1], _chart.x().domain());\n\n if (units instanceof Array) {\n _unitCount = units.length;\n } else {\n _unitCount = units;\n }\n }\n\n return _unitCount;\n };\n\n /**\n * Gets or sets whether the chart should be drawn with a right axis instead of a left axis. When\n * used with a chart in a composite chart, allows both left and right Y axes to be shown on a\n * chart.\n * @method useRightYAxis\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {Boolean} [useRightYAxis=false]\n * @returns {Boolean|dc.coordinateGridMixin}\n */\n _chart.useRightYAxis = function (useRightYAxis) {\n if (!arguments.length) {\n return _useRightYAxis;\n }\n _useRightYAxis = useRightYAxis;\n return _chart;\n };\n\n /**\n * Returns true if the chart is using ordinal xUnits ({@link dc.units.ordinal dc.units.ordinal}, or false\n * otherwise. Most charts behave differently with ordinal data and use the result of this method to\n * trigger the appropriate logic.\n * @method isOrdinal\n * @memberof dc.coordinateGridMixin\n * @instance\n * @returns {Boolean}\n */\n _chart.isOrdinal = function () {\n return _chart.xUnits() === dc.units.ordinal;\n };\n\n _chart._useOuterPadding = function () {\n return true;\n };\n\n _chart._ordinalXDomain = function () {\n var groups = _chart._computeOrderedGroups(_chart.data());\n return groups.map(_chart.keyAccessor());\n };\n\n function compareDomains (d1, d2) {\n return !d1 || !d2 || d1.length !== d2.length ||\n d1.some(function (elem, i) { return (elem && d2[i]) ? elem.toString() !== d2[i].toString() : elem === d2[i]; });\n }\n\n function prepareXAxis (g, render) {\n if (!_chart.isOrdinal()) {\n if (_chart.elasticX()) {\n _x.domain([_chart.xAxisMin(), _chart.xAxisMax()]);\n }\n } else { // _chart.isOrdinal()\n if (_chart.elasticX() || _x.domain().length === 0) {\n _x.domain(_chart._ordinalXDomain());\n }\n }\n\n // has the domain changed?\n var xdom = _x.domain();\n if (render || compareDomains(_lastXDomain, xdom)) {\n _chart.rescale();\n }\n _lastXDomain = xdom;\n\n // please can't we always use rangeBands for bar charts?\n if (_chart.isOrdinal()) {\n _x.rangeBands([0, _chart.xAxisLength()], _rangeBandPadding,\n _chart._useOuterPadding() ? _outerRangeBandPadding : 0);\n } else {\n _x.range([0, _chart.xAxisLength()]);\n }\n\n _xAxis = _xAxis.scale(_chart.x());\n\n renderVerticalGridLines(g);\n }\n\n _chart.renderXAxis = function (g) {\n var axisXG = g.select('g.x');\n\n if (axisXG.empty()) {\n axisXG = g.append('g')\n .attr('class', 'axis x')\n .attr('transform', 'translate(' + _chart.margins().left + ',' + _chart._xAxisY() + ')');\n }\n\n var axisXLab = g.select('text.' + X_AXIS_LABEL_CLASS);\n if (axisXLab.empty() && _chart.xAxisLabel()) {\n axisXLab = g.append('text')\n .attr('class', X_AXIS_LABEL_CLASS)\n .attr('transform', 'translate(' + (_chart.margins().left + _chart.xAxisLength() / 2) + ',' +\n (_chart.height() - _xAxisLabelPadding) + ')')\n .attr('text-anchor', 'middle');\n }\n if (_chart.xAxisLabel() && axisXLab.text() !== _chart.xAxisLabel()) {\n axisXLab.text(_chart.xAxisLabel());\n }\n\n dc.transition(axisXG, _chart.transitionDuration(), _chart.transitionDelay())\n .attr('transform', 'translate(' + _chart.margins().left + ',' + _chart._xAxisY() + ')')\n .call(_xAxis);\n dc.transition(axisXLab, _chart.transitionDuration(), _chart.transitionDelay())\n .attr('transform', 'translate(' + (_chart.margins().left + _chart.xAxisLength() / 2) + ',' +\n (_chart.height() - _xAxisLabelPadding) + ')');\n };\n\n function renderVerticalGridLines (g) {\n var gridLineG = g.select('g.' + VERTICAL_CLASS);\n\n if (_renderVerticalGridLine) {\n if (gridLineG.empty()) {\n gridLineG = g.insert('g', ':first-child')\n .attr('class', GRID_LINE_CLASS + ' ' + VERTICAL_CLASS)\n .attr('transform', 'translate(' + _chart.margins().left + ',' + _chart.margins().top + ')');\n }\n\n var ticks = _xAxis.tickValues() ? _xAxis.tickValues() :\n (typeof _x.ticks === 'function' ? _x.ticks(_xAxis.ticks()[0]) : _x.domain());\n\n var lines = gridLineG.selectAll('line')\n .data(ticks);\n\n // enter\n var linesGEnter = lines.enter()\n .append('line')\n .attr('x1', function (d) {\n return _x(d);\n })\n .attr('y1', _chart._xAxisY() - _chart.margins().top)\n .attr('x2', function (d) {\n return _x(d);\n })\n .attr('y2', 0)\n .attr('opacity', 0);\n dc.transition(linesGEnter, _chart.transitionDuration(), _chart.transitionDelay())\n .attr('opacity', 1);\n\n // update\n dc.transition(lines, _chart.transitionDuration(), _chart.transitionDelay())\n .attr('x1', function (d) {\n return _x(d);\n })\n .attr('y1', _chart._xAxisY() - _chart.margins().top)\n .attr('x2', function (d) {\n return _x(d);\n })\n .attr('y2', 0);\n\n // exit\n lines.exit().remove();\n } else {\n gridLineG.selectAll('line').remove();\n }\n }\n\n _chart._xAxisY = function () {\n return (_chart.height() - _chart.margins().bottom);\n };\n\n _chart.xAxisLength = function () {\n return _chart.effectiveWidth();\n };\n\n /**\n * Set or get the x axis label. If setting the label, you may optionally include additional padding to\n * the margin to make room for the label. By default the padded is set to 12 to accomodate the text height.\n * @method xAxisLabel\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {String} [labelText]\n * @param {Number} [padding=12]\n * @returns {String}\n */\n _chart.xAxisLabel = function (labelText, padding) {\n if (!arguments.length) {\n return _xAxisLabel;\n }\n _xAxisLabel = labelText;\n _chart.margins().bottom -= _xAxisLabelPadding;\n _xAxisLabelPadding = (padding === undefined) ? DEFAULT_AXIS_LABEL_PADDING : padding;\n _chart.margins().bottom += _xAxisLabelPadding;\n return _chart;\n };\n\n _chart._prepareYAxis = function (g) {\n if (_y === undefined || _chart.elasticY()) {\n if (_y === undefined) {\n _y = d3.scale.linear();\n }\n var min = _chart.yAxisMin() || 0,\n max = _chart.yAxisMax() || 0;\n _y.domain([min, max]).rangeRound([_chart.yAxisHeight(), 0]);\n }\n\n _y.range([_chart.yAxisHeight(), 0]);\n _yAxis = _yAxis.scale(_y);\n\n if (_useRightYAxis) {\n _yAxis.orient('right');\n }\n\n _chart._renderHorizontalGridLinesForAxis(g, _y, _yAxis);\n };\n\n _chart.renderYAxisLabel = function (axisClass, text, rotation, labelXPosition) {\n labelXPosition = labelXPosition || _yAxisLabelPadding;\n\n var axisYLab = _chart.g().select('text.' + Y_AXIS_LABEL_CLASS + '.' + axisClass + '-label');\n var labelYPosition = (_chart.margins().top + _chart.yAxisHeight() / 2);\n if (axisYLab.empty() && text) {\n axisYLab = _chart.g().append('text')\n .attr('transform', 'translate(' + labelXPosition + ',' + labelYPosition + '),rotate(' + rotation + ')')\n .attr('class', Y_AXIS_LABEL_CLASS + ' ' + axisClass + '-label')\n .attr('text-anchor', 'middle')\n .text(text);\n }\n if (text && axisYLab.text() !== text) {\n axisYLab.text(text);\n }\n dc.transition(axisYLab, _chart.transitionDuration(), _chart.transitionDelay())\n .attr('transform', 'translate(' + labelXPosition + ',' + labelYPosition + '),rotate(' + rotation + ')');\n };\n\n _chart.renderYAxisAt = function (axisClass, axis, position) {\n var axisYG = _chart.g().select('g.' + axisClass);\n if (axisYG.empty()) {\n axisYG = _chart.g().append('g')\n .attr('class', 'axis ' + axisClass)\n .attr('transform', 'translate(' + position + ',' + _chart.margins().top + ')');\n }\n\n dc.transition(axisYG, _chart.transitionDuration(), _chart.transitionDelay())\n .attr('transform', 'translate(' + position + ',' + _chart.margins().top + ')')\n .call(axis);\n };\n\n _chart.renderYAxis = function () {\n var axisPosition = _useRightYAxis ? (_chart.width() - _chart.margins().right) : _chart._yAxisX();\n _chart.renderYAxisAt('y', _yAxis, axisPosition);\n var labelPosition = _useRightYAxis ? (_chart.width() - _yAxisLabelPadding) : _yAxisLabelPadding;\n var rotation = _useRightYAxis ? 90 : -90;\n _chart.renderYAxisLabel('y', _chart.yAxisLabel(), rotation, labelPosition);\n };\n\n _chart._renderHorizontalGridLinesForAxis = function (g, scale, axis) {\n var gridLineG = g.select('g.' + HORIZONTAL_CLASS);\n\n if (_renderHorizontalGridLine) {\n var ticks = axis.tickValues() ? axis.tickValues() : scale.ticks(axis.ticks()[0]);\n\n if (gridLineG.empty()) {\n gridLineG = g.insert('g', ':first-child')\n .attr('class', GRID_LINE_CLASS + ' ' + HORIZONTAL_CLASS)\n .attr('transform', 'translate(' + _chart.margins().left + ',' + _chart.margins().top + ')');\n }\n\n var lines = gridLineG.selectAll('line')\n .data(ticks);\n\n // enter\n var linesGEnter = lines.enter()\n .append('line')\n .attr('x1', 1)\n .attr('y1', function (d) {\n return scale(d);\n })\n .attr('x2', _chart.xAxisLength())\n .attr('y2', function (d) {\n return scale(d);\n })\n .attr('opacity', 0);\n dc.transition(linesGEnter, _chart.transitionDuration(), _chart.transitionDelay())\n .attr('opacity', 1);\n\n // update\n dc.transition(lines, _chart.transitionDuration(), _chart.transitionDelay())\n .attr('x1', 1)\n .attr('y1', function (d) {\n return scale(d);\n })\n .attr('x2', _chart.xAxisLength())\n .attr('y2', function (d) {\n return scale(d);\n });\n\n // exit\n lines.exit().remove();\n } else {\n gridLineG.selectAll('line').remove();\n }\n };\n\n _chart._yAxisX = function () {\n return _chart.useRightYAxis() ? _chart.width() - _chart.margins().right : _chart.margins().left;\n };\n\n /**\n * Set or get the y axis label. If setting the label, you may optionally include additional padding\n * to the margin to make room for the label. By default the padding is set to 12 to accommodate the\n * text height.\n * @method yAxisLabel\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {String} [labelText]\n * @param {Number} [padding=12]\n * @returns {String|dc.coordinateGridMixin}\n */\n _chart.yAxisLabel = function (labelText, padding) {\n if (!arguments.length) {\n return _yAxisLabel;\n }\n _yAxisLabel = labelText;\n _chart.margins().left -= _yAxisLabelPadding;\n _yAxisLabelPadding = (padding === undefined) ? DEFAULT_AXIS_LABEL_PADDING : padding;\n _chart.margins().left += _yAxisLabelPadding;\n return _chart;\n };\n\n /**\n * Get or set the y scale. The y scale is typically automatically determined by the chart implementation.\n * @method y\n * @memberof dc.coordinateGridMixin\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Scales.md d3.scale}\n * @param {d3.scale} [yScale]\n * @returns {d3.scale|dc.coordinateGridMixin}\n */\n _chart.y = function (yScale) {\n if (!arguments.length) {\n return _y;\n }\n _y = yScale;\n _chart.rescale();\n return _chart;\n };\n\n /**\n * Set or get the y axis used by the coordinate grid chart instance. This function is most useful\n * when y axis customization is required. The y axis in dc.js is simply an instance of a [d3 axis\n * object](https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Axes.md#axis); therefore it supports any\n * valid d3 axis manipulation.\n *\n * **Caution**: The y axis is usually generated internally by dc; resetting it may cause\n * unexpected results. Note also that when used as a getter, this function is not chainable: it\n * returns the axis, not the chart,\n * {@link https://github.com/dc-js/dc.js/wiki/FAQ#why-does-everything-break-after-a-call-to-xaxis-or-yaxis\n * so attempting to call chart functions after calling `.yAxis()` will fail}.\n * @method yAxis\n * @memberof dc.coordinateGridMixin\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Axes.md#axis d3.svg.axis}\n * @example\n * // customize y axis tick format\n * chart.yAxis().tickFormat(function(v) {return v + '%';});\n * // customize y axis tick values\n * chart.yAxis().tickValues([0, 100, 200, 300]);\n * @param {d3.svg.axis} [yAxis=d3.svg.axis().orient('left')]\n * @returns {d3.svg.axis|dc.coordinateGridMixin}\n */\n _chart.yAxis = function (yAxis) {\n if (!arguments.length) {\n return _yAxis;\n }\n _yAxis = yAxis;\n return _chart;\n };\n\n /**\n * Turn on/off elastic y axis behavior. If y axis elasticity is turned on, then the grid chart will\n * attempt to recalculate the y axis range whenever a redraw event is triggered.\n * @method elasticY\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {Boolean} [elasticY=false]\n * @returns {Boolean|dc.coordinateGridMixin}\n */\n _chart.elasticY = function (elasticY) {\n if (!arguments.length) {\n return _yElasticity;\n }\n _yElasticity = elasticY;\n return _chart;\n };\n\n /**\n * Turn on/off horizontal grid lines.\n * @method renderHorizontalGridLines\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {Boolean} [renderHorizontalGridLines=false]\n * @returns {Boolean|dc.coordinateGridMixin}\n */\n _chart.renderHorizontalGridLines = function (renderHorizontalGridLines) {\n if (!arguments.length) {\n return _renderHorizontalGridLine;\n }\n _renderHorizontalGridLine = renderHorizontalGridLines;\n return _chart;\n };\n\n /**\n * Turn on/off vertical grid lines.\n * @method renderVerticalGridLines\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {Boolean} [renderVerticalGridLines=false]\n * @returns {Boolean|dc.coordinateGridMixin}\n */\n _chart.renderVerticalGridLines = function (renderVerticalGridLines) {\n if (!arguments.length) {\n return _renderVerticalGridLine;\n }\n _renderVerticalGridLine = renderVerticalGridLines;\n return _chart;\n };\n\n /**\n * Calculates the minimum x value to display in the chart. Includes xAxisPadding if set.\n * @method xAxisMin\n * @memberof dc.coordinateGridMixin\n * @instance\n * @returns {*}\n */\n _chart.xAxisMin = function () {\n var min = d3.min(_chart.data(), function (e) {\n return _chart.keyAccessor()(e);\n });\n return dc.utils.subtract(min, _xAxisPadding, _xAxisPaddingUnit);\n };\n\n /**\n * Calculates the maximum x value to display in the chart. Includes xAxisPadding if set.\n * @method xAxisMax\n * @memberof dc.coordinateGridMixin\n * @instance\n * @returns {*}\n */\n _chart.xAxisMax = function () {\n var max = d3.max(_chart.data(), function (e) {\n return _chart.keyAccessor()(e);\n });\n return dc.utils.add(max, _xAxisPadding, _xAxisPaddingUnit);\n };\n\n /**\n * Calculates the minimum y value to display in the chart. Includes yAxisPadding if set.\n * @method yAxisMin\n * @memberof dc.coordinateGridMixin\n * @instance\n * @returns {*}\n */\n _chart.yAxisMin = function () {\n var min = d3.min(_chart.data(), function (e) {\n return _chart.valueAccessor()(e);\n });\n return dc.utils.subtract(min, _yAxisPadding);\n };\n\n /**\n * Calculates the maximum y value to display in the chart. Includes yAxisPadding if set.\n * @method yAxisMax\n * @memberof dc.coordinateGridMixin\n * @instance\n * @returns {*}\n */\n _chart.yAxisMax = function () {\n var max = d3.max(_chart.data(), function (e) {\n return _chart.valueAccessor()(e);\n });\n return dc.utils.add(max, _yAxisPadding);\n };\n\n /**\n * Set or get y axis padding for the elastic y axis. The padding will be added to the top and\n * bottom of the y axis if elasticY is turned on; otherwise it is ignored.\n *\n * Padding can be an integer or percentage in string (e.g. '10%'). Padding can be applied to\n * number or date axes. When padding a date axis, an integer represents number of days being padded\n * and a percentage string will be treated the same as an integer.\n * @method yAxisPadding\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {Number|String} [padding=0]\n * @returns {Number|dc.coordinateGridMixin}\n */\n _chart.yAxisPadding = function (padding) {\n if (!arguments.length) {\n return _yAxisPadding;\n }\n _yAxisPadding = padding;\n return _chart;\n };\n\n _chart.yAxisHeight = function () {\n return _chart.effectiveHeight();\n };\n\n /**\n * Set or get the rounding function used to quantize the selection when brushing is enabled.\n * @method round\n * @memberof dc.coordinateGridMixin\n * @instance\n * @example\n * // set x unit round to by month, this will make sure range selection brush will\n * // select whole months\n * chart.round(d3.time.month.round);\n * @param {Function} [round]\n * @returns {Function|dc.coordinateGridMixin}\n */\n _chart.round = function (round) {\n if (!arguments.length) {\n return _round;\n }\n _round = round;\n return _chart;\n };\n\n _chart._rangeBandPadding = function (_) {\n if (!arguments.length) {\n return _rangeBandPadding;\n }\n _rangeBandPadding = _;\n return _chart;\n };\n\n _chart._outerRangeBandPadding = function (_) {\n if (!arguments.length) {\n return _outerRangeBandPadding;\n }\n _outerRangeBandPadding = _;\n return _chart;\n };\n\n dc.override(_chart, 'filter', function (_) {\n if (!arguments.length) {\n return _chart._filter();\n }\n\n _chart._filter(_);\n\n if (_) {\n _chart.brush().extent(_);\n } else {\n _chart.brush().clear();\n }\n\n return _chart;\n });\n\n _chart.brush = function (_) {\n if (!arguments.length) {\n return _brush;\n }\n _brush = _;\n return _chart;\n };\n\n function brushHeight () {\n return _chart._xAxisY() - _chart.margins().top;\n }\n\n _chart.renderBrush = function (g) {\n if (_brushOn) {\n _brush.on('brush', _chart._brushing);\n _brush.on('brushstart', _chart._disableMouseZoom);\n _brush.on('brushend', configureMouseZoom);\n\n var gBrush = g.append('g')\n .attr('class', 'brush')\n .attr('transform', 'translate(' + _chart.margins().left + ',' + _chart.margins().top + ')')\n .call(_brush.x(_chart.x()));\n _chart.setBrushY(gBrush, false);\n _chart.setHandlePaths(gBrush);\n\n if (_chart.hasFilter()) {\n _chart.redrawBrush(g, false);\n }\n }\n };\n\n _chart.setHandlePaths = function (gBrush) {\n gBrush.selectAll('.resize').append('path').attr('d', _chart.resizeHandlePath);\n };\n\n _chart.setBrushY = function (gBrush) {\n gBrush.selectAll('rect')\n .attr('height', brushHeight());\n gBrush.selectAll('.resize path')\n .attr('d', _chart.resizeHandlePath);\n };\n\n _chart.extendBrush = function () {\n var extent = _brush.extent();\n if (_chart.round()) {\n extent[0] = extent.map(_chart.round())[0];\n extent[1] = extent.map(_chart.round())[1];\n\n _g.select('.brush')\n .call(_brush.extent(extent));\n }\n return extent;\n };\n\n _chart.brushIsEmpty = function (extent) {\n return _brush.empty() || !extent || extent[1] <= extent[0];\n };\n\n _chart._brushing = function () {\n var extent = _chart.extendBrush();\n\n _chart.redrawBrush(_g, false);\n\n if (_chart.brushIsEmpty(extent)) {\n dc.events.trigger(function () {\n _chart.filter(null);\n _chart.redrawGroup();\n }, dc.constants.EVENT_DELAY);\n } else {\n var rangedFilter = dc.filters.RangedFilter(extent[0], extent[1]);\n\n dc.events.trigger(function () {\n _chart.replaceFilter(rangedFilter);\n _chart.redrawGroup();\n }, dc.constants.EVENT_DELAY);\n }\n };\n\n _chart.redrawBrush = function (g, doTransition) {\n if (_brushOn) {\n if (_chart.filter() && _chart.brush().empty()) {\n _chart.brush().extent(_chart.filter());\n }\n\n var gBrush = dc.optionalTransition(doTransition, _chart.transitionDuration(), _chart.transitionDelay())(g.select('g.brush'));\n _chart.setBrushY(gBrush);\n gBrush.call(_chart.brush()\n .x(_chart.x())\n .extent(_chart.brush().extent()));\n }\n\n _chart.fadeDeselectedArea();\n };\n\n _chart.fadeDeselectedArea = function () {\n // do nothing, sub-chart should override this function\n };\n\n // borrowed from Crossfilter example\n _chart.resizeHandlePath = function (d) {\n var e = +(d === 'e'), x = e ? 1 : -1, y = brushHeight() / 3;\n return 'M' + (0.5 * x) + ',' + y +\n 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6) +\n 'V' + (2 * y - 6) +\n 'A6,6 0 0 ' + e + ' ' + (0.5 * x) + ',' + (2 * y) +\n 'Z' +\n 'M' + (2.5 * x) + ',' + (y + 8) +\n 'V' + (2 * y - 8) +\n 'M' + (4.5 * x) + ',' + (y + 8) +\n 'V' + (2 * y - 8);\n };\n\n function getClipPathId () {\n return _chart.anchorName().replace(/[ .#=\\[\\]\"]/g, '-') + '-clip';\n }\n\n /**\n * Get or set the padding in pixels for the clip path. Once set padding will be applied evenly to\n * the top, left, right, and bottom when the clip path is generated. If set to zero, the clip area\n * will be exactly the chart body area minus the margins.\n * @method clipPadding\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {Number} [padding=5]\n * @returns {Number|dc.coordinateGridMixin}\n */\n _chart.clipPadding = function (padding) {\n if (!arguments.length) {\n return _clipPadding;\n }\n _clipPadding = padding;\n return _chart;\n };\n\n function generateClipPath () {\n var defs = dc.utils.appendOrSelect(_parent, 'defs');\n // cannot select <clippath> elements; bug in WebKit, must select by id\n // https://groups.google.com/forum/#!topic/d3-js/6EpAzQ2gU9I\n var id = getClipPathId();\n var chartBodyClip = dc.utils.appendOrSelect(defs, '#' + id, 'clipPath').attr('id', id);\n\n var padding = _clipPadding * 2;\n\n dc.utils.appendOrSelect(chartBodyClip, 'rect')\n .attr('width', _chart.xAxisLength() + padding)\n .attr('height', _chart.yAxisHeight() + padding)\n .attr('transform', 'translate(-' + _clipPadding + ', -' + _clipPadding + ')');\n }\n\n _chart._preprocessData = function () {};\n\n _chart._doRender = function () {\n _chart.resetSvg();\n\n _chart._preprocessData();\n\n _chart._generateG();\n generateClipPath();\n\n drawChart(true);\n\n configureMouseZoom();\n\n return _chart;\n };\n\n _chart._doRedraw = function () {\n _chart._preprocessData();\n\n drawChart(false);\n generateClipPath();\n\n return _chart;\n };\n\n function drawChart (render) {\n if (_chart.isOrdinal()) {\n _brushOn = false;\n }\n\n prepareXAxis(_chart.g(), render);\n _chart._prepareYAxis(_chart.g());\n\n _chart.plotData();\n\n if (_chart.elasticX() || _resizing || render) {\n _chart.renderXAxis(_chart.g());\n }\n\n if (_chart.elasticY() || _resizing || render) {\n _chart.renderYAxis(_chart.g());\n }\n\n if (render) {\n _chart.renderBrush(_chart.g(), false);\n } else {\n _chart.redrawBrush(_chart.g(), _resizing);\n }\n _chart.fadeDeselectedArea();\n _resizing = false;\n }\n\n function configureMouseZoom () {\n if (_mouseZoomable) {\n _chart._enableMouseZoom();\n } else if (_hasBeenMouseZoomable) {\n _chart._disableMouseZoom();\n }\n }\n\n _chart._enableMouseZoom = function () {\n _hasBeenMouseZoomable = true;\n _zoom.x(_chart.x())\n .scaleExtent(_zoomScale)\n .size([_chart.width(), _chart.height()])\n .duration(_chart.transitionDuration());\n _chart.root().call(_zoom);\n };\n\n _chart._disableMouseZoom = function () {\n _chart.root().call(_nullZoom);\n };\n\n function zoomHandler () {\n _refocused = true;\n if (_zoomOutRestrict) {\n var constraint = _xOriginalDomain;\n if (_rangeChart) {\n constraint = intersectExtents(constraint, _rangeChart.x().domain());\n }\n var constrained = constrainExtent(_chart.x().domain(), constraint);\n if (constrained) {\n _chart.x().domain(constrained);\n }\n }\n\n var domain = _chart.x().domain();\n var domFilter = dc.filters.RangedFilter(domain[0], domain[1]);\n\n _chart.replaceFilter(domFilter);\n _chart.rescale();\n _chart.redraw();\n\n if (_rangeChart && !rangesEqual(_chart.filter(), _rangeChart.filter())) {\n dc.events.trigger(function () {\n _rangeChart.replaceFilter(domFilter);\n _rangeChart.redraw();\n });\n }\n\n _chart._invokeZoomedListener();\n\n dc.events.trigger(function () {\n _chart.redrawGroup();\n }, dc.constants.EVENT_DELAY);\n\n _refocused = !rangesEqual(domain, _xOriginalDomain);\n }\n\n function intersectExtents (ext1, ext2) {\n if (ext1[0] > ext2[1] || ext1[1] < ext2[0]) {\n console.warn('could not intersect extents');\n }\n return [Math.max(ext1[0], ext2[0]), Math.min(ext1[1], ext2[1])];\n }\n\n function constrainExtent (extent, constraint) {\n var size = extent[1] - extent[0];\n if (extent[0] < constraint[0]) {\n return [constraint[0], Math.min(constraint[1], dc.utils.add(constraint[0], size, 'millis'))];\n } else if (extent[1] > constraint[1]) {\n return [Math.max(constraint[0], dc.utils.subtract(constraint[1], size, 'millis')), constraint[1]];\n } else {\n return null;\n }\n }\n\n /**\n * Zoom this chart to focus on the given range. The given range should be an array containing only\n * 2 elements (`[start, end]`) defining a range in the x domain. If the range is not given or set\n * to null, then the zoom will be reset. _For focus to work elasticX has to be turned off;\n * otherwise focus will be ignored.\n * @method focus\n * @memberof dc.coordinateGridMixin\n * @instance\n * @example\n * chart.on('renderlet', function(chart) {\n * // smooth the rendering through event throttling\n * dc.events.trigger(function(){\n * // focus some other chart to the range selected by user on this chart\n * someOtherChart.focus(chart.filter());\n * });\n * })\n * @param {Array<Number>} [range]\n */\n _chart.focus = function (range) {\n if (hasRangeSelected(range)) {\n _chart.x().domain(range);\n } else {\n _chart.x().domain(_xOriginalDomain);\n }\n\n _zoom.x(_chart.x());\n zoomHandler();\n };\n\n _chart.refocused = function () {\n return _refocused;\n };\n\n _chart.focusChart = function (c) {\n if (!arguments.length) {\n return _focusChart;\n }\n _focusChart = c;\n _chart.on('filtered', function (chart) {\n if (!chart.filter()) {\n dc.events.trigger(function () {\n _focusChart.x().domain(_focusChart.xOriginalDomain());\n });\n } else if (!rangesEqual(chart.filter(), _focusChart.filter())) {\n dc.events.trigger(function () {\n _focusChart.focus(chart.filter());\n });\n }\n });\n return _chart;\n };\n\n function rangesEqual (range1, range2) {\n if (!range1 && !range2) {\n return true;\n } else if (!range1 || !range2) {\n return false;\n } else if (range1.length === 0 && range2.length === 0) {\n return true;\n } else if (range1[0].valueOf() === range2[0].valueOf() &&\n range1[1].valueOf() === range2[1].valueOf()) {\n return true;\n }\n return false;\n }\n\n /**\n * Turn on/off the brush-based range filter. When brushing is on then user can drag the mouse\n * across a chart with a quantitative scale to perform range filtering based on the extent of the\n * brush, or click on the bars of an ordinal bar chart or slices of a pie chart to filter and\n * un-filter them. However turning on the brush filter will disable other interactive elements on\n * the chart such as highlighting, tool tips, and reference lines. Zooming will still be possible\n * if enabled, but only via scrolling (panning will be disabled.)\n * @method brushOn\n * @memberof dc.coordinateGridMixin\n * @instance\n * @param {Boolean} [brushOn=true]\n * @returns {Boolean|dc.coordinateGridMixin}\n */\n _chart.brushOn = function (brushOn) {\n if (!arguments.length) {\n return _brushOn;\n }\n _brushOn = brushOn;\n return _chart;\n };\n\n function hasRangeSelected (range) {\n return range instanceof Array && range.length > 1;\n }\n\n return _chart;\n};\n","/**\n * Stack Mixin is an mixin that provides cross-chart support of stackability using d3.layout.stack.\n * @name stackMixin\n * @memberof dc\n * @mixin\n * @param {Object} _chart\n * @returns {dc.stackMixin}\n */\ndc.stackMixin = function (_chart) {\n\n function prepareValues (layer, layerIdx) {\n var valAccessor = layer.accessor || _chart.valueAccessor();\n layer.name = String(layer.name || layerIdx);\n layer.values = layer.group.all().map(function (d, i) {\n return {\n x: _chart.keyAccessor()(d, i),\n y: layer.hidden ? null : valAccessor(d, i),\n data: d,\n layer: layer.name,\n hidden: layer.hidden\n };\n });\n\n layer.values = layer.values.filter(domainFilter());\n return layer.values;\n }\n\n var _stackLayout = d3.layout.stack()\n .values(prepareValues);\n\n var _stack = [];\n var _titles = {};\n\n var _hidableStacks = false;\n var _evadeDomainFilter = false;\n\n function domainFilter () {\n if (!_chart.x() || _evadeDomainFilter) {\n return d3.functor(true);\n }\n var xDomain = _chart.x().domain();\n if (_chart.isOrdinal()) {\n // TODO #416\n //var domainSet = d3.set(xDomain);\n return function () {\n return true; //domainSet.has(p.x);\n };\n }\n if (_chart.elasticX()) {\n return function () { return true; };\n }\n return function (p) {\n //return true;\n return p.x >= xDomain[0] && p.x <= xDomain[xDomain.length - 1];\n };\n }\n\n /**\n * Stack a new crossfilter group onto this chart with an optional custom value accessor. All stacks\n * in the same chart will share the same key accessor and therefore the same set of keys.\n *\n * For example, in a stacked bar chart, the bars of each stack will be positioned using the same set\n * of keys on the x axis, while stacked vertically. If name is specified then it will be used to\n * generate the legend label.\n * @method stack\n * @memberof dc.stackMixin\n * @instance\n * @see {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#group-map-reduce crossfilter.group}\n * @example\n * // stack group using default accessor\n * chart.stack(valueSumGroup)\n * // stack group using custom accessor\n * .stack(avgByDayGroup, function(d){return d.value.avgByDay;});\n * @param {crossfilter.group} group\n * @param {String} [name]\n * @param {Function} [accessor]\n * @returns {Array<{group: crossfilter.group, name: String, accessor: Function}>|dc.stackMixin}\n */\n _chart.stack = function (group, name, accessor) {\n if (!arguments.length) {\n return _stack;\n }\n\n if (arguments.length <= 2) {\n accessor = name;\n }\n\n var layer = {group: group};\n if (typeof name === 'string') {\n layer.name = name;\n }\n if (typeof accessor === 'function') {\n layer.accessor = accessor;\n }\n _stack.push(layer);\n\n return _chart;\n };\n\n dc.override(_chart, 'group', function (g, n, f) {\n if (!arguments.length) {\n return _chart._group();\n }\n _stack = [];\n _titles = {};\n _chart.stack(g, n);\n if (f) {\n _chart.valueAccessor(f);\n }\n return _chart._group(g, n);\n });\n\n /**\n * Allow named stacks to be hidden or shown by clicking on legend items.\n * This does not affect the behavior of hideStack or showStack.\n * @method hidableStacks\n * @memberof dc.stackMixin\n * @instance\n * @param {Boolean} [hidableStacks=false]\n * @returns {Boolean|dc.stackMixin}\n */\n _chart.hidableStacks = function (hidableStacks) {\n if (!arguments.length) {\n return _hidableStacks;\n }\n _hidableStacks = hidableStacks;\n return _chart;\n };\n\n function findLayerByName (n) {\n var i = _stack.map(dc.pluck('name')).indexOf(n);\n return _stack[i];\n }\n\n /**\n * Hide all stacks on the chart with the given name.\n * The chart must be re-rendered for this change to appear.\n * @method hideStack\n * @memberof dc.stackMixin\n * @instance\n * @param {String} stackName\n * @returns {dc.stackMixin}\n */\n _chart.hideStack = function (stackName) {\n var layer = findLayerByName(stackName);\n if (layer) {\n layer.hidden = true;\n }\n return _chart;\n };\n\n /**\n * Show all stacks on the chart with the given name.\n * The chart must be re-rendered for this change to appear.\n * @method showStack\n * @memberof dc.stackMixin\n * @instance\n * @param {String} stackName\n * @returns {dc.stackMixin}\n */\n _chart.showStack = function (stackName) {\n var layer = findLayerByName(stackName);\n if (layer) {\n layer.hidden = false;\n }\n return _chart;\n };\n\n _chart.getValueAccessorByIndex = function (index) {\n return _stack[index].accessor || _chart.valueAccessor();\n };\n\n _chart.yAxisMin = function () {\n var min = d3.min(flattenStack(), function (p) {\n return (p.y < 0) ? (p.y + p.y0) : p.y0;\n });\n\n return dc.utils.subtract(min, _chart.yAxisPadding());\n\n };\n\n _chart.yAxisMax = function () {\n var max = d3.max(flattenStack(), function (p) {\n return (p.y > 0) ? (p.y + p.y0) : p.y0;\n });\n\n return dc.utils.add(max, _chart.yAxisPadding());\n };\n\n function flattenStack () {\n var valueses = _chart.data().map(function (layer) { return layer.values; });\n return Array.prototype.concat.apply([], valueses);\n }\n\n _chart.xAxisMin = function () {\n var min = d3.min(flattenStack(), dc.pluck('x'));\n return dc.utils.subtract(min, _chart.xAxisPadding(), _chart.xAxisPaddingUnit());\n };\n\n _chart.xAxisMax = function () {\n var max = d3.max(flattenStack(), dc.pluck('x'));\n return dc.utils.add(max, _chart.xAxisPadding(), _chart.xAxisPaddingUnit());\n };\n\n /**\n * Set or get the title function. Chart class will use this function to render svg title (usually interpreted by\n * browser as tooltips) for each child element in the chart, i.e. a slice in a pie chart or a bubble in a bubble chart.\n * Almost every chart supports title function however in grid coordinate chart you need to turn off brush in order to\n * use title otherwise the brush layer will block tooltip trigger.\n *\n * If the first argument is a stack name, the title function will get or set the title for that stack. If stackName\n * is not provided, the first stack is implied.\n * @method title\n * @memberof dc.stackMixin\n * @instance\n * @example\n * // set a title function on 'first stack'\n * chart.title('first stack', function(d) { return d.key + ': ' + d.value; });\n * // get a title function from 'second stack'\n * var secondTitleFunction = chart.title('second stack');\n * @param {String} [stackName]\n * @param {Function} [titleAccessor]\n * @returns {String|dc.stackMixin}\n */\n dc.override(_chart, 'title', function (stackName, titleAccessor) {\n if (!stackName) {\n return _chart._title();\n }\n\n if (typeof stackName === 'function') {\n return _chart._title(stackName);\n }\n if (stackName === _chart._groupName && typeof titleAccessor === 'function') {\n return _chart._title(titleAccessor);\n }\n\n if (typeof titleAccessor !== 'function') {\n return _titles[stackName] || _chart._title();\n }\n\n _titles[stackName] = titleAccessor;\n\n return _chart;\n });\n\n /**\n * Gets or sets the stack layout algorithm, which computes a baseline for each stack and\n * propagates it to the next.\n * @method stackLayout\n * @memberof dc.stackMixin\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Stack-Layout.md d3.layout.stack}\n * @param {Function} [stack=d3.layout.stack]\n * @returns {Function|dc.stackMixin}\n */\n _chart.stackLayout = function (stack) {\n if (!arguments.length) {\n return _stackLayout;\n }\n _stackLayout = stack;\n if (_stackLayout.values() === d3.layout.stack().values()) {\n _stackLayout.values(prepareValues);\n }\n return _chart;\n };\n\n /**\n * Since dc.js 2.0, there has been {@link https://github.com/dc-js/dc.js/issues/949 an issue}\n * where points are filtered to the current domain. While this is a useful optimization, it is\n * incorrectly implemented: the next point outside the domain is required in order to draw lines\n * that are clipped to the bounds, as well as bars that are partly clipped.\n *\n * A fix will be included in dc.js 2.1.x, but a workaround is needed for dc.js 2.0 and until\n * that fix is published, so set this flag to skip any filtering of points.\n *\n * Once the bug is fixed, this flag will have no effect, and it will be deprecated.\n * @method evadeDomainFilter\n * @memberof dc.stackMixin\n * @instance\n * @param {Boolean} [evadeDomainFilter=false]\n * @returns {Boolean|dc.stackMixin}\n */\n _chart.evadeDomainFilter = function (evadeDomainFilter) {\n if (!arguments.length) {\n return _evadeDomainFilter;\n }\n _evadeDomainFilter = evadeDomainFilter;\n return _chart;\n };\n\n function visability (l) {\n return !l.hidden;\n }\n\n _chart.data(function () {\n var layers = _stack.filter(visability);\n return layers.length ? _chart.stackLayout()(layers) : [];\n });\n\n _chart._ordinalXDomain = function () {\n var flat = flattenStack().map(dc.pluck('data'));\n var ordered = _chart._computeOrderedGroups(flat);\n return ordered.map(_chart.keyAccessor());\n };\n\n _chart.colorAccessor(function (d) {\n var layer = this.layer || this.name || d.name || d.layer;\n return layer;\n });\n\n _chart.legendables = function () {\n return _stack.map(function (layer, i) {\n return {\n chart: _chart,\n name: layer.name,\n hidden: layer.hidden || false,\n color: _chart.getColor.call(layer, layer.values, i)\n };\n });\n };\n\n _chart.isLegendableHidden = function (d) {\n var layer = findLayerByName(d.name);\n return layer ? layer.hidden : false;\n };\n\n _chart.legendToggle = function (d) {\n if (_hidableStacks) {\n if (_chart.isLegendableHidden(d)) {\n _chart.showStack(d.name);\n } else {\n _chart.hideStack(d.name);\n }\n //_chart.redraw();\n _chart.renderGroup();\n }\n };\n\n return _chart;\n};\n","/**\n * Cap is a mixin that groups small data elements below a _cap_ into an *others* grouping for both the\n * Row and Pie Charts.\n *\n * The top ordered elements in the group up to the cap amount will be kept in the chart, and the rest\n * will be replaced with an *others* element, with value equal to the sum of the replaced values. The\n * keys of the elements below the cap limit are recorded in order to filter by those keys when the\n * others* element is clicked.\n * @name capMixin\n * @memberof dc\n * @mixin\n * @param {Object} _chart\n * @returns {dc.capMixin}\n */\ndc.capMixin = function (_chart) {\n var _cap = Infinity, _takeFront = true;\n var _othersLabel = 'Others';\n\n // emulate old group.top(N) ordering\n _chart.ordering(function (kv) {\n return -kv.value;\n });\n\n var _othersGrouper = function (topItems, restItems) {\n var restItemsSum = d3.sum(restItems, _chart.valueAccessor()),\n restKeys = restItems.map(_chart.keyAccessor());\n if (restItemsSum > 0) {\n return topItems.concat([{\n others: restKeys,\n key: _chart.othersLabel(),\n value: restItemsSum\n }]);\n }\n return topItems;\n };\n\n _chart.cappedKeyAccessor = function (d, i) {\n if (d.others) {\n return d.key;\n }\n return _chart.keyAccessor()(d, i);\n };\n\n _chart.cappedValueAccessor = function (d, i) {\n if (d.others) {\n return d.value;\n }\n return _chart.valueAccessor()(d, i);\n };\n\n // return N \"top\" groups, where N is the cap, sorted by baseMixin.ordering\n // whether top means front or back depends on takeFront\n _chart.data(function (group) {\n if (_cap === Infinity) {\n return _chart._computeOrderedGroups(group.all());\n } else {\n var items = group.all(), rest;\n items = _chart._computeOrderedGroups(items); // sort by baseMixin.ordering\n\n if (_cap) {\n if (_takeFront) {\n rest = items.slice(_cap);\n items = items.slice(0, _cap);\n } else {\n var start = Math.max(0, items.length - _cap);\n rest = items.slice(0, start);\n items = items.slice(start);\n }\n }\n\n if (_othersGrouper) {\n return _othersGrouper(items, rest);\n }\n return items;\n }\n });\n\n /**\n * Get or set the count of elements to that will be included in the cap. If there is an\n * {@link dc.capMixin#othersGrouper othersGrouper}, any further elements will be combined in an\n * extra element with its name determined by {@link dc.capMixin#othersLabel othersLabel}.\n *\n * As of dc.js 2.1 and onward, the capped charts use\n * {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#group_all group.all()}\n * and {@link dc.baseMixin#ordering baseMixin.ordering()} to determine the order of\n * elements. Then `cap` and {@link dc.capMixin#takeFront takeFront} determine how many elements\n * to keep, from which end of the resulting array.\n *\n * **Migration note:** Up through dc.js 2.0.*, capping used\n * {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#group_top group.top(N)},\n * which selects the largest items according to\n * {@link https://github.com/crossfilter/crossfilter/wiki/API-Reference#group_order group.order()}.\n * The chart then sorted the items according to {@link dc.baseMixin#ordering baseMixin.ordering()}.\n * So the two values essentially had to agree, but if the `group.order()` was incorrect (it's\n * easy to forget about), the wrong rows or slices would be displayed, in the correct order.\n *\n * If your chart previously relied on `group.order()`, use `chart.ordering()` instead. As of\n * 2.1.5, the ordering defaults to sorting from greatest to least like `group.top(N)` did.\n *\n * If you want to cap by one ordering but sort by another, please\n * [file an issue](https://github.com/dc-js/dc.js/issues/new) - it's still possible but we'll\n * need to work up an example.\n * @method cap\n * @memberof dc.capMixin\n * @instance\n * @param {Number} [count=Infinity]\n * @returns {Number|dc.capMixin}\n */\n _chart.cap = function (count) {\n if (!arguments.length) {\n return _cap;\n }\n _cap = count;\n return _chart;\n };\n\n /**\n * Get or set the direction of capping. If set, the chart takes the first\n * {@link dc.capMixin#cap cap} elements from the sorted array of elements; otherwise\n * it takes the last `cap` elements.\n * @method takeFront\n * @memberof dc.capMixin\n * @instance\n * @param {Boolean} [takeFront=true]\n * @returns {Boolean|dc.capMixin}\n */\n _chart.takeFront = function (takeFront) {\n if (!arguments.length) {\n return _takeFront;\n }\n _takeFront = takeFront;\n return _chart;\n };\n\n /**\n * Get or set the label for *Others* slice when slices cap is specified.\n * @method othersLabel\n * @memberof dc.capMixin\n * @instance\n * @param {String} [label=\"Others\"]\n * @returns {String|dc.capMixin}\n */\n _chart.othersLabel = function (label) {\n if (!arguments.length) {\n return _othersLabel;\n }\n _othersLabel = label;\n return _chart;\n };\n\n /**\n * Get or set the grouper function that will perform the insertion of data for the *Others* slice\n * if the slices cap is specified. If set to a falsy value, no others will be added.\n *\n * The grouper function takes an array of included (\"top\") items, and an array of the rest of\n * the items. By default the grouper function computes the sum of the rest.\n * @method othersGrouper\n * @memberof dc.capMixin\n * @instance\n * @example\n * // Do not show others\n * chart.othersGrouper(null);\n * // Default others grouper\n * chart.othersGrouper(function (topItems, restItems) {\n * var restItemsSum = d3.sum(restItems, _chart.valueAccessor()),\n * restKeys = restItems.map(_chart.keyAccessor());\n * if (restItemsSum > 0) {\n * return topItems.concat([{\n * others: restKeys,\n * key: _chart.othersLabel(),\n * value: restItemsSum\n * }]);\n * }\n * return topItems;\n * });\n * @param {Function} [grouperFunction]\n * @returns {Function|dc.capMixin}\n */\n _chart.othersGrouper = function (grouperFunction) {\n if (!arguments.length) {\n return _othersGrouper;\n }\n _othersGrouper = grouperFunction;\n return _chart;\n };\n\n dc.override(_chart, 'onClick', function (d) {\n if (d.others) {\n _chart.filter([d.others]);\n }\n _chart._onClick(d);\n });\n\n return _chart;\n};\n","/**\n * This Mixin provides reusable functionalities for any chart that needs to visualize data using bubbles.\n * @name bubbleMixin\n * @memberof dc\n * @mixin\n * @mixes dc.colorMixin\n * @param {Object} _chart\n * @returns {dc.bubbleMixin}\n */\ndc.bubbleMixin = function (_chart) {\n var _maxBubbleRelativeSize = 0.3;\n var _minRadiusWithLabel = 10;\n var _sortBubbleSize = false;\n var _elasticRadius = false;\n\n _chart.BUBBLE_NODE_CLASS = 'node';\n _chart.BUBBLE_CLASS = 'bubble';\n _chart.MIN_RADIUS = 10;\n\n _chart = dc.colorMixin(_chart);\n\n _chart.renderLabel(true);\n\n _chart.data(function (group) {\n var data = group.all();\n if (_sortBubbleSize) {\n // sort descending so smaller bubbles are on top\n var radiusAccessor = _chart.radiusValueAccessor();\n data.sort(function (a, b) { return d3.descending(radiusAccessor(a), radiusAccessor(b)); });\n }\n return data;\n });\n\n var _r = d3.scale.linear().domain([0, 100]);\n\n var _rValueAccessor = function (d) {\n return d.r;\n };\n\n /**\n * Get or set the bubble radius scale. By default the bubble chart uses\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Quantitative-Scales.md#linear d3.scale.linear().domain([0, 100])}\n * as its radius scale.\n * @method r\n * @memberof dc.bubbleMixin\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Scales.md d3.scale}\n * @param {d3.scale} [bubbleRadiusScale=d3.scale.linear().domain([0, 100])]\n * @returns {d3.scale|dc.bubbleMixin}\n */\n _chart.r = function (bubbleRadiusScale) {\n if (!arguments.length) {\n return _r;\n }\n _r = bubbleRadiusScale;\n return _chart;\n };\n\n /**\n * Turn on or off the elastic bubble radius feature, or return the value of the flag. If this\n * feature is turned on, then bubble radii will be automatically rescaled to fit the chart better.\n * @method elasticRadius\n * @memberof dc.bubbleChart\n * @instance\n * @param {Boolean} [elasticRadius=false]\n * @returns {Boolean|dc.bubbleChart}\n */\n _chart.elasticRadius = function (elasticRadius) {\n if (!arguments.length) {\n return _elasticRadius;\n }\n _elasticRadius = elasticRadius;\n return _chart;\n };\n\n _chart.calculateRadiusDomain = function () {\n if (_elasticRadius) {\n _chart.r().domain([_chart.rMin(), _chart.rMax()]);\n }\n };\n\n /**\n * Get or set the radius value accessor function. If set, the radius value accessor function will\n * be used to retrieve a data value for each bubble. The data retrieved then will be mapped using\n * the r scale to the actual bubble radius. This allows you to encode a data dimension using bubble\n * size.\n * @method radiusValueAccessor\n * @memberof dc.bubbleMixin\n * @instance\n * @param {Function} [radiusValueAccessor]\n * @returns {Function|dc.bubbleMixin}\n */\n _chart.radiusValueAccessor = function (radiusValueAccessor) {\n if (!arguments.length) {\n return _rValueAccessor;\n }\n _rValueAccessor = radiusValueAccessor;\n return _chart;\n };\n\n _chart.rMin = function () {\n var min = d3.min(_chart.data(), function (e) {\n return _chart.radiusValueAccessor()(e);\n });\n return min;\n };\n\n _chart.rMax = function () {\n var max = d3.max(_chart.data(), function (e) {\n return _chart.radiusValueAccessor()(e);\n });\n return max;\n };\n\n _chart.bubbleR = function (d) {\n var value = _chart.radiusValueAccessor()(d);\n var r = _chart.r()(value);\n if (isNaN(r) || value <= 0) {\n r = 0;\n }\n return r;\n };\n\n var labelFunction = function (d) {\n return _chart.label()(d);\n };\n\n var shouldLabel = function (d) {\n return (_chart.bubbleR(d) > _minRadiusWithLabel);\n };\n\n var labelOpacity = function (d) {\n return shouldLabel(d) ? 1 : 0;\n };\n\n var labelPointerEvent = function (d) {\n return shouldLabel(d) ? 'all' : 'none';\n };\n\n _chart._doRenderLabel = function (bubbleGEnter) {\n if (_chart.renderLabel()) {\n var label = bubbleGEnter.select('text');\n\n if (label.empty()) {\n label = bubbleGEnter.append('text')\n .attr('text-anchor', 'middle')\n .attr('dy', '.3em')\n .on('click', _chart.onClick);\n }\n\n label\n .attr('opacity', 0)\n .attr('pointer-events', labelPointerEvent)\n .text(labelFunction);\n dc.transition(label, _chart.transitionDuration(), _chart.transitionDelay())\n .attr('opacity', labelOpacity);\n }\n };\n\n _chart.doUpdateLabels = function (bubbleGEnter) {\n if (_chart.renderLabel()) {\n var labels = bubbleGEnter.select('text')\n .attr('pointer-events', labelPointerEvent)\n .text(labelFunction);\n dc.transition(labels, _chart.transitionDuration(), _chart.transitionDelay())\n .attr('opacity', labelOpacity);\n }\n };\n\n var titleFunction = function (d) {\n return _chart.title()(d);\n };\n\n _chart._doRenderTitles = function (g) {\n if (_chart.renderTitle()) {\n var title = g.select('title');\n\n if (title.empty()) {\n g.append('title').text(titleFunction);\n }\n }\n };\n\n _chart.doUpdateTitles = function (g) {\n if (_chart.renderTitle()) {\n g.select('title').text(titleFunction);\n }\n };\n\n /**\n * Turn on or off the bubble sorting feature, or return the value of the flag. If enabled,\n * bubbles will be sorted by their radius, with smaller bubbles in front.\n * @method sortBubbleSize\n * @memberof dc.bubbleChart\n * @instance\n * @param {Boolean} [sortBubbleSize=false]\n * @returns {Boolean|dc.bubbleChart}\n */\n _chart.sortBubbleSize = function (sortBubbleSize) {\n if (!arguments.length) {\n return _sortBubbleSize;\n }\n _sortBubbleSize = sortBubbleSize;\n return _chart;\n };\n\n /**\n * Get or set the minimum radius. This will be used to initialize the radius scale's range.\n * @method minRadius\n * @memberof dc.bubbleMixin\n * @instance\n * @param {Number} [radius=10]\n * @returns {Number|dc.bubbleMixin}\n */\n _chart.minRadius = function (radius) {\n if (!arguments.length) {\n return _chart.MIN_RADIUS;\n }\n _chart.MIN_RADIUS = radius;\n return _chart;\n };\n\n /**\n * Get or set the minimum radius for label rendering. If a bubble's radius is less than this value\n * then no label will be rendered.\n * @method minRadiusWithLabel\n * @memberof dc.bubbleMixin\n * @instance\n * @param {Number} [radius=10]\n * @returns {Number|dc.bubbleMixin}\n */\n\n _chart.minRadiusWithLabel = function (radius) {\n if (!arguments.length) {\n return _minRadiusWithLabel;\n }\n _minRadiusWithLabel = radius;\n return _chart;\n };\n\n /**\n * Get or set the maximum relative size of a bubble to the length of x axis. This value is useful\n * when the difference in radius between bubbles is too great.\n * @method maxBubbleRelativeSize\n * @memberof dc.bubbleMixin\n * @instance\n * @param {Number} [relativeSize=0.3]\n * @returns {Number|dc.bubbleMixin}\n */\n _chart.maxBubbleRelativeSize = function (relativeSize) {\n if (!arguments.length) {\n return _maxBubbleRelativeSize;\n }\n _maxBubbleRelativeSize = relativeSize;\n return _chart;\n };\n\n _chart.fadeDeselectedArea = function () {\n if (_chart.hasFilter()) {\n _chart.selectAll('g.' + _chart.BUBBLE_NODE_CLASS).each(function (d) {\n if (_chart.isSelectedNode(d)) {\n _chart.highlightSelected(this);\n } else {\n _chart.fadeDeselected(this);\n }\n });\n } else {\n _chart.selectAll('g.' + _chart.BUBBLE_NODE_CLASS).each(function () {\n _chart.resetHighlight(this);\n });\n }\n };\n\n _chart.isSelectedNode = function (d) {\n return _chart.hasFilter(d.key);\n };\n\n _chart.onClick = function (d) {\n var filter = d.key;\n dc.events.trigger(function () {\n _chart.filter(filter);\n _chart.redrawGroup();\n });\n };\n\n return _chart;\n};\n","/**\n * The pie chart implementation is usually used to visualize a small categorical distribution. The pie\n * chart uses keyAccessor to determine the slices, and valueAccessor to calculate the size of each\n * slice relative to the sum of all values. Slices are ordered by {@link dc.baseMixin#ordering ordering}\n * which defaults to sorting by key.\n *\n * Examples:\n * - {@link http://dc-js.github.com/dc.js/ Nasdaq 100 Index}\n * @class pieChart\n * @memberof dc\n * @mixes dc.capMixin\n * @mixes dc.colorMixin\n * @mixes dc.baseMixin\n * @example\n * // create a pie chart under #chart-container1 element using the default global chart group\n * var chart1 = dc.pieChart('#chart-container1');\n * // create a pie chart under #chart-container2 element using chart group A\n * var chart2 = dc.pieChart('#chart-container2', 'chartGroupA');\n * @param {String|node|d3.selection} parent - Any valid\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying\n * a dom block element such as a div; or a dom element or d3 selection.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {dc.pieChart}\n */\ndc.pieChart = function (parent, chartGroup) {\n var DEFAULT_MIN_ANGLE_FOR_LABEL = 0.5;\n\n var _sliceCssClass = 'pie-slice';\n var _labelCssClass = 'pie-label';\n var _sliceGroupCssClass = 'pie-slice-group';\n var _labelGroupCssClass = 'pie-label-group';\n var _emptyCssClass = 'empty-chart';\n var _emptyTitle = 'empty';\n\n var _radius,\n _givenRadius, // specified radius, if any\n _innerRadius = 0,\n _externalRadiusPadding = 0;\n\n var _g;\n var _cx;\n var _cy;\n var _minAngleForLabel = DEFAULT_MIN_ANGLE_FOR_LABEL;\n var _externalLabelRadius;\n var _drawPaths = false;\n var _chart = dc.capMixin(dc.colorMixin(dc.baseMixin({})));\n\n _chart.colorAccessor(_chart.cappedKeyAccessor);\n\n _chart.title(function (d) {\n return _chart.cappedKeyAccessor(d) + ': ' + _chart.cappedValueAccessor(d);\n });\n\n /**\n * Get or set the maximum number of slices the pie chart will generate. The top slices are determined by\n * value from high to low. Other slices exeeding the cap will be rolled up into one single *Others* slice.\n * @method slicesCap\n * @memberof dc.pieChart\n * @instance\n * @param {Number} [cap]\n * @returns {Number|dc.pieChart}\n */\n _chart.slicesCap = _chart.cap;\n\n _chart.label(_chart.cappedKeyAccessor);\n _chart.renderLabel(true);\n\n _chart.transitionDuration(350);\n _chart.transitionDelay(0);\n\n _chart._doRender = function () {\n _chart.resetSvg();\n\n _g = _chart.svg()\n .append('g')\n .attr('transform', 'translate(' + _chart.cx() + ',' + _chart.cy() + ')');\n\n _g.append('g').attr('class', _sliceGroupCssClass);\n _g.append('g').attr('class', _labelGroupCssClass);\n\n drawChart();\n\n return _chart;\n };\n\n function drawChart () {\n // set radius from chart size if none given, or if given radius is too large\n var maxRadius = d3.min([_chart.width(), _chart.height()]) / 2;\n _radius = _givenRadius && _givenRadius < maxRadius ? _givenRadius : maxRadius;\n\n var arc = buildArcs();\n\n var pie = pieLayout();\n var pieData;\n // if we have data...\n if (d3.sum(_chart.data(), _chart.valueAccessor())) {\n pieData = pie(_chart.data());\n _g.classed(_emptyCssClass, false);\n } else {\n // otherwise we'd be getting NaNs, so override\n // note: abuse others for its ignoring the value accessor\n pieData = pie([{key: _emptyTitle, value: 1, others: [_emptyTitle]}]);\n _g.classed(_emptyCssClass, true);\n }\n\n if (_g) {\n var slices = _g.select('g.' + _sliceGroupCssClass)\n .selectAll('g.' + _sliceCssClass)\n .data(pieData);\n\n var labels = _g.select('g.' + _labelGroupCssClass)\n .selectAll('text.' + _labelCssClass)\n .data(pieData);\n\n createElements(slices, labels, arc, pieData);\n\n updateElements(pieData, arc);\n\n removeElements(slices, labels);\n\n highlightFilter();\n\n dc.transition(_g, _chart.transitionDuration(), _chart.transitionDelay())\n .attr('transform', 'translate(' + _chart.cx() + ',' + _chart.cy() + ')');\n }\n }\n\n function createElements (slices, labels, arc, pieData) {\n var slicesEnter = createSliceNodes(slices);\n\n createSlicePath(slicesEnter, arc);\n\n createTitles(slicesEnter);\n\n createLabels(labels, pieData, arc);\n }\n\n function createSliceNodes (slices) {\n var slicesEnter = slices\n .enter()\n .append('g')\n .attr('class', function (d, i) {\n return _sliceCssClass + ' _' + i;\n });\n return slicesEnter;\n }\n\n function createSlicePath (slicesEnter, arc) {\n var slicePath = slicesEnter.append('path')\n .attr('fill', fill)\n .on('click', onClick)\n .attr('d', function (d, i) {\n return safeArc(d, i, arc);\n });\n\n var transition = dc.transition(slicePath, _chart.transitionDuration(), _chart.transitionDelay());\n if (transition.attrTween) {\n transition.attrTween('d', tweenPie);\n }\n }\n\n function createTitles (slicesEnter) {\n if (_chart.renderTitle()) {\n slicesEnter.append('title').text(function (d) {\n return _chart.title()(d.data);\n });\n }\n }\n\n _chart._applyLabelText = function (labels) {\n labels\n .text(function (d) {\n var data = d.data;\n if ((sliceHasNoData(data) || sliceTooSmall(d)) && !isSelectedSlice(d)) {\n return '';\n }\n return _chart.label()(d.data);\n });\n };\n\n function positionLabels (labels, arc) {\n _chart._applyLabelText(labels);\n dc.transition(labels, _chart.transitionDuration(), _chart.transitionDelay())\n .attr('transform', function (d) {\n return labelPosition(d, arc);\n })\n .attr('text-anchor', 'middle');\n }\n\n function highlightSlice (i, whether) {\n _chart.select('g.pie-slice._' + i)\n .classed('highlight', whether);\n }\n\n function createLabels (labels, pieData, arc) {\n if (_chart.renderLabel()) {\n var labelsEnter = labels\n .enter()\n .append('text')\n .attr('class', function (d, i) {\n var classes = _sliceCssClass + ' ' + _labelCssClass + ' _' + i;\n if (_externalLabelRadius) {\n classes += ' external';\n }\n return classes;\n })\n .on('click', onClick)\n .on('mouseover', function (d, i) {\n highlightSlice(i, true);\n })\n .on('mouseout', function (d, i) {\n highlightSlice(i, false);\n });\n positionLabels(labelsEnter, arc);\n if (_externalLabelRadius && _drawPaths) {\n updateLabelPaths(pieData, arc);\n }\n }\n }\n\n function updateLabelPaths (pieData, arc) {\n var polyline = _g.selectAll('polyline.' + _sliceCssClass)\n .data(pieData);\n\n polyline\n .enter()\n .append('polyline')\n .attr('class', function (d, i) {\n return 'pie-path _' + i + ' ' + _sliceCssClass;\n })\n .on('click', onClick)\n .on('mouseover', function (d, i) {\n highlightSlice(i, true);\n })\n .on('mouseout', function (d, i) {\n highlightSlice(i, false);\n });\n\n polyline.exit().remove();\n var arc2 = d3.svg.arc()\n .outerRadius(_radius - _externalRadiusPadding + _externalLabelRadius)\n .innerRadius(_radius - _externalRadiusPadding);\n var transition = dc.transition(polyline, _chart.transitionDuration(), _chart.transitionDelay());\n // this is one rare case where d3.selection differs from d3.transition\n if (transition.attrTween) {\n transition\n .attrTween('points', function (d) {\n var current = this._current || d;\n current = {startAngle: current.startAngle, endAngle: current.endAngle};\n var interpolate = d3.interpolate(current, d);\n this._current = interpolate(0);\n return function (t) {\n var d2 = interpolate(t);\n return [arc.centroid(d2), arc2.centroid(d2)];\n };\n });\n } else {\n transition.attr('points', function (d) {\n return [arc.centroid(d), arc2.centroid(d)];\n });\n }\n transition.style('visibility', function (d) {\n return d.endAngle - d.startAngle < 0.0001 ? 'hidden' : 'visible';\n });\n\n }\n\n function updateElements (pieData, arc) {\n updateSlicePaths(pieData, arc);\n updateLabels(pieData, arc);\n updateTitles(pieData);\n }\n\n function updateSlicePaths (pieData, arc) {\n var slicePaths = _g.selectAll('g.' + _sliceCssClass)\n .data(pieData)\n .select('path')\n .attr('d', function (d, i) {\n return safeArc(d, i, arc);\n });\n var transition = dc.transition(slicePaths, _chart.transitionDuration(), _chart.transitionDelay());\n if (transition.attrTween) {\n transition.attrTween('d', tweenPie);\n }\n transition.attr('fill', fill);\n }\n\n function updateLabels (pieData, arc) {\n if (_chart.renderLabel()) {\n var labels = _g.selectAll('text.' + _labelCssClass)\n .data(pieData);\n positionLabels(labels, arc);\n if (_externalLabelRadius && _drawPaths) {\n updateLabelPaths(pieData, arc);\n }\n }\n }\n\n function updateTitles (pieData) {\n if (_chart.renderTitle()) {\n _g.selectAll('g.' + _sliceCssClass)\n .data(pieData)\n .select('title')\n .text(function (d) {\n return _chart.title()(d.data);\n });\n }\n }\n\n function removeElements (slices, labels) {\n slices.exit().remove();\n labels.exit().remove();\n }\n\n function highlightFilter () {\n if (_chart.hasFilter()) {\n _chart.selectAll('g.' + _sliceCssClass).each(function (d) {\n if (isSelectedSlice(d)) {\n _chart.highlightSelected(this);\n } else {\n _chart.fadeDeselected(this);\n }\n });\n } else {\n _chart.selectAll('g.' + _sliceCssClass).each(function () {\n _chart.resetHighlight(this);\n });\n }\n }\n\n /**\n * Get or set the external radius padding of the pie chart. This will force the radius of the\n * pie chart to become smaller or larger depending on the value.\n * @method externalRadiusPadding\n * @memberof dc.pieChart\n * @instance\n * @param {Number} [externalRadiusPadding=0]\n * @returns {Number|dc.pieChart}\n */\n _chart.externalRadiusPadding = function (externalRadiusPadding) {\n if (!arguments.length) {\n return _externalRadiusPadding;\n }\n _externalRadiusPadding = externalRadiusPadding;\n return _chart;\n };\n\n /**\n * Get or set the inner radius of the pie chart. If the inner radius is greater than 0px then the\n * pie chart will be rendered as a doughnut chart.\n * @method innerRadius\n * @memberof dc.pieChart\n * @instance\n * @param {Number} [innerRadius=0]\n * @returns {Number|dc.pieChart}\n */\n _chart.innerRadius = function (innerRadius) {\n if (!arguments.length) {\n return _innerRadius;\n }\n _innerRadius = innerRadius;\n return _chart;\n };\n\n /**\n * Get or set the outer radius. If the radius is not set, it will be half of the minimum of the\n * chart width and height.\n * @method radius\n * @memberof dc.pieChart\n * @instance\n * @param {Number} [radius]\n * @returns {Number|dc.pieChart}\n */\n _chart.radius = function (radius) {\n if (!arguments.length) {\n return _givenRadius;\n }\n _givenRadius = radius;\n return _chart;\n };\n\n /**\n * Get or set center x coordinate position. Default is center of svg.\n * @method cx\n * @memberof dc.pieChart\n * @instance\n * @param {Number} [cx]\n * @returns {Number|dc.pieChart}\n */\n _chart.cx = function (cx) {\n if (!arguments.length) {\n return (_cx || _chart.width() / 2);\n }\n _cx = cx;\n return _chart;\n };\n\n /**\n * Get or set center y coordinate position. Default is center of svg.\n * @method cy\n * @memberof dc.pieChart\n * @instance\n * @param {Number} [cy]\n * @returns {Number|dc.pieChart}\n */\n _chart.cy = function (cy) {\n if (!arguments.length) {\n return (_cy || _chart.height() / 2);\n }\n _cy = cy;\n return _chart;\n };\n\n function buildArcs () {\n return d3.svg.arc()\n .outerRadius(_radius - _externalRadiusPadding)\n .innerRadius(_innerRadius);\n }\n\n function isSelectedSlice (d) {\n return _chart.hasFilter(_chart.cappedKeyAccessor(d.data));\n }\n\n _chart._doRedraw = function () {\n drawChart();\n return _chart;\n };\n\n /**\n * Get or set the minimal slice angle for label rendering. Any slice with a smaller angle will not\n * display a slice label.\n * @method minAngleForLabel\n * @memberof dc.pieChart\n * @instance\n * @param {Number} [minAngleForLabel=0.5]\n * @returns {Number|dc.pieChart}\n */\n _chart.minAngleForLabel = function (minAngleForLabel) {\n if (!arguments.length) {\n return _minAngleForLabel;\n }\n _minAngleForLabel = minAngleForLabel;\n return _chart;\n };\n\n function pieLayout () {\n return d3.layout.pie().sort(null).value(_chart.cappedValueAccessor);\n }\n\n function sliceTooSmall (d) {\n var angle = (d.endAngle - d.startAngle);\n return isNaN(angle) || angle < _minAngleForLabel;\n }\n\n function sliceHasNoData (d) {\n return _chart.cappedValueAccessor(d) === 0;\n }\n\n function tweenPie (b) {\n b.innerRadius = _innerRadius;\n var current = this._current;\n if (isOffCanvas(current)) {\n current = {startAngle: 0, endAngle: 0};\n } else {\n // only interpolate startAngle & endAngle, not the whole data object\n current = {startAngle: current.startAngle, endAngle: current.endAngle};\n }\n var i = d3.interpolate(current, b);\n this._current = i(0);\n return function (t) {\n return safeArc(i(t), 0, buildArcs());\n };\n }\n\n function isOffCanvas (current) {\n return !current || isNaN(current.startAngle) || isNaN(current.endAngle);\n }\n\n function fill (d, i) {\n return _chart.getColor(d.data, i);\n }\n\n function onClick (d, i) {\n if (_g.attr('class') !== _emptyCssClass) {\n _chart.onClick(d.data, i);\n }\n }\n\n function safeArc (d, i, arc) {\n var path = arc(d, i);\n if (path.indexOf('NaN') >= 0) {\n path = 'M0,0';\n }\n return path;\n }\n\n /**\n * Title to use for the only slice when there is no data.\n * @method emptyTitle\n * @memberof dc.pieChart\n * @instance\n * @param {String} [title]\n * @returns {String|dc.pieChart}\n */\n _chart.emptyTitle = function (title) {\n if (arguments.length === 0) {\n return _emptyTitle;\n }\n _emptyTitle = title;\n return _chart;\n };\n\n /**\n * Position slice labels offset from the outer edge of the chart.\n *\n * The argument specifies the extra radius to be added for slice labels.\n * @method externalLabels\n * @memberof dc.pieChart\n * @instance\n * @param {Number} [externalLabelRadius]\n * @returns {Number|dc.pieChart}\n */\n _chart.externalLabels = function (externalLabelRadius) {\n if (arguments.length === 0) {\n return _externalLabelRadius;\n } else if (externalLabelRadius) {\n _externalLabelRadius = externalLabelRadius;\n } else {\n _externalLabelRadius = undefined;\n }\n\n return _chart;\n };\n\n /**\n * Get or set whether to draw lines from pie slices to their labels.\n *\n * @method drawPaths\n * @memberof dc.pieChart\n * @instance\n * @param {Boolean} [drawPaths]\n * @returns {Boolean|dc.pieChart}\n */\n _chart.drawPaths = function (drawPaths) {\n if (arguments.length === 0) {\n return _drawPaths;\n }\n _drawPaths = drawPaths;\n return _chart;\n };\n\n function labelPosition (d, arc) {\n var centroid;\n if (_externalLabelRadius) {\n centroid = d3.svg.arc()\n .outerRadius(_radius - _externalRadiusPadding + _externalLabelRadius)\n .innerRadius(_radius - _externalRadiusPadding + _externalLabelRadius)\n .centroid(d);\n } else {\n centroid = arc.centroid(d);\n }\n if (isNaN(centroid[0]) || isNaN(centroid[1])) {\n return 'translate(0,0)';\n } else {\n return 'translate(' + centroid + ')';\n }\n }\n\n _chart.legendables = function () {\n return _chart.data().map(function (d, i) {\n var legendable = {name: d.key, data: d.value, others: d.others, chart: _chart};\n legendable.color = _chart.getColor(d, i);\n return legendable;\n });\n };\n\n _chart.legendHighlight = function (d) {\n highlightSliceFromLegendable(d, true);\n };\n\n _chart.legendReset = function (d) {\n highlightSliceFromLegendable(d, false);\n };\n\n _chart.legendToggle = function (d) {\n _chart.onClick({key: d.name, others: d.others});\n };\n\n function highlightSliceFromLegendable (legendable, highlighted) {\n _chart.selectAll('g.pie-slice').each(function (d) {\n if (legendable.name === d.data.key) {\n d3.select(this).classed('highlight', highlighted);\n }\n });\n }\n\n return _chart.anchor(parent, chartGroup);\n};\n","/**\n * Concrete bar chart/histogram implementation.\n *\n * Examples:\n * - {@link http://dc-js.github.com/dc.js/ Nasdaq 100 Index}\n * - {@link http://dc-js.github.com/dc.js/crime/index.html Canadian City Crime Stats}\n * @class barChart\n * @memberof dc\n * @mixes dc.stackMixin\n * @mixes dc.coordinateGridMixin\n * @example\n * // create a bar chart under #chart-container1 element using the default global chart group\n * var chart1 = dc.barChart('#chart-container1');\n * // create a bar chart under #chart-container2 element using chart group A\n * var chart2 = dc.barChart('#chart-container2', 'chartGroupA');\n * // create a sub-chart under a composite parent chart\n * var chart3 = dc.barChart(compositeChart);\n * @param {String|node|d3.selection|dc.compositeChart} parent - Any valid\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector}\n * specifying a dom block element such as a div; or a dom element or d3 selection. If the bar\n * chart is a sub-chart in a {@link dc.compositeChart Composite Chart} then pass in the parent\n * composite chart instance instead.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {dc.barChart}\n */\ndc.barChart = function (parent, chartGroup) {\n var MIN_BAR_WIDTH = 1;\n var DEFAULT_GAP_BETWEEN_BARS = 2;\n var LABEL_PADDING = 3;\n\n var _chart = dc.stackMixin(dc.coordinateGridMixin({}));\n\n var _gap = DEFAULT_GAP_BETWEEN_BARS;\n var _centerBar = false;\n var _alwaysUseRounding = false;\n\n var _barWidth;\n\n dc.override(_chart, 'rescale', function () {\n _chart._rescale();\n _barWidth = undefined;\n return _chart;\n });\n\n dc.override(_chart, 'render', function () {\n if (_chart.round() && _centerBar && !_alwaysUseRounding) {\n dc.logger.warn('By default, brush rounding is disabled if bars are centered. ' +\n 'See dc.js bar chart API documentation for details.');\n }\n\n return _chart._render();\n });\n\n _chart.label(function (d) {\n return dc.utils.printSingleValue(d.y0 + d.y);\n }, false);\n\n _chart.plotData = function () {\n var layers = _chart.chartBodyG().selectAll('g.stack')\n .data(_chart.data());\n\n calculateBarWidth();\n\n layers\n .enter()\n .append('g')\n .attr('class', function (d, i) {\n return 'stack ' + '_' + i;\n });\n\n var last = layers.size() - 1;\n layers.each(function (d, i) {\n var layer = d3.select(this);\n\n renderBars(layer, i, d);\n\n if (_chart.renderLabel() && last === i) {\n renderLabels(layer, i, d);\n }\n });\n };\n\n function barHeight (d) {\n return dc.utils.safeNumber(Math.abs(_chart.y()(d.y + d.y0) - _chart.y()(d.y0)));\n }\n\n function renderLabels (layer, layerIndex, d) {\n var labels = layer.selectAll('text.barLabel')\n .data(d.values, dc.pluck('x'));\n\n labels.enter()\n .append('text')\n .attr('class', 'barLabel')\n .attr('text-anchor', 'middle');\n\n if (_chart.isOrdinal()) {\n labels.on('click', _chart.onClick);\n labels.attr('cursor', 'pointer');\n }\n\n dc.transition(labels, _chart.transitionDuration(), _chart.transitionDelay())\n .attr('x', function (d) {\n var x = _chart.x()(d.x);\n if (!_centerBar) {\n x += _barWidth / 2;\n }\n return dc.utils.safeNumber(x);\n })\n .attr('y', function (d) {\n var y = _chart.y()(d.y + d.y0);\n\n if (d.y < 0) {\n y -= barHeight(d);\n }\n\n return dc.utils.safeNumber(y - LABEL_PADDING);\n })\n .text(function (d) {\n return _chart.label()(d);\n });\n\n dc.transition(labels.exit(), _chart.transitionDuration(), _chart.transitionDelay())\n .attr('height', 0)\n .remove();\n }\n\n function renderBars (layer, layerIndex, d) {\n var bars = layer.selectAll('rect.bar')\n .data(d.values, dc.pluck('x'));\n\n var enter = bars.enter()\n .append('rect')\n .attr('class', 'bar')\n .attr('fill', dc.pluck('data', _chart.getColor))\n .attr('y', _chart.yAxisHeight())\n .attr('height', 0);\n\n if (_chart.renderTitle()) {\n enter.append('title').text(dc.pluck('data', _chart.title(d.name)));\n }\n\n if (_chart.isOrdinal()) {\n bars.on('click', _chart.onClick);\n }\n\n dc.transition(bars, _chart.transitionDuration(), _chart.transitionDelay())\n .attr('x', function (d) {\n var x = _chart.x()(d.x);\n if (_centerBar) {\n x -= _barWidth / 2;\n }\n if (_chart.isOrdinal() && _gap !== undefined) {\n x += _gap / 2;\n }\n return dc.utils.safeNumber(x);\n })\n .attr('y', function (d) {\n var y = _chart.y()(d.y + d.y0);\n\n if (d.y < 0) {\n y -= barHeight(d);\n }\n\n return dc.utils.safeNumber(y);\n })\n .attr('width', _barWidth)\n .attr('height', function (d) {\n return barHeight(d);\n })\n .attr('fill', dc.pluck('data', _chart.getColor))\n .select('title').text(dc.pluck('data', _chart.title(d.name)));\n\n dc.transition(bars.exit(), _chart.transitionDuration(), _chart.transitionDelay())\n .attr('x', function (d) { return _chart.x()(d.x); })\n .attr('width', _barWidth * 0.9)\n .remove();\n }\n\n function calculateBarWidth () {\n if (_barWidth === undefined) {\n var numberOfBars = _chart.xUnitCount();\n\n // please can't we always use rangeBands for bar charts?\n if (_chart.isOrdinal() && _gap === undefined) {\n _barWidth = Math.floor(_chart.x().rangeBand());\n } else if (_gap) {\n _barWidth = Math.floor((_chart.xAxisLength() - (numberOfBars - 1) * _gap) / numberOfBars);\n } else {\n _barWidth = Math.floor(_chart.xAxisLength() / (1 + _chart.barPadding()) / numberOfBars);\n }\n\n if (_barWidth === Infinity || isNaN(_barWidth) || _barWidth < MIN_BAR_WIDTH) {\n _barWidth = MIN_BAR_WIDTH;\n }\n }\n }\n\n _chart.fadeDeselectedArea = function () {\n var bars = _chart.chartBodyG().selectAll('rect.bar');\n var extent = _chart.brush().extent();\n\n if (_chart.isOrdinal()) {\n if (_chart.hasFilter()) {\n bars.classed(dc.constants.SELECTED_CLASS, function (d) {\n return _chart.hasFilter(d.x);\n });\n bars.classed(dc.constants.DESELECTED_CLASS, function (d) {\n return !_chart.hasFilter(d.x);\n });\n } else {\n bars.classed(dc.constants.SELECTED_CLASS, false);\n bars.classed(dc.constants.DESELECTED_CLASS, false);\n }\n } else {\n if (!_chart.brushIsEmpty(extent)) {\n var start = extent[0];\n var end = extent[1];\n\n bars.classed(dc.constants.DESELECTED_CLASS, function (d) {\n return d.x < start || d.x >= end;\n });\n } else {\n bars.classed(dc.constants.DESELECTED_CLASS, false);\n }\n }\n };\n\n /**\n * Whether the bar chart will render each bar centered around the data position on the x-axis.\n * @method centerBar\n * @memberof dc.barChart\n * @instance\n * @param {Boolean} [centerBar=false]\n * @returns {Boolean|dc.barChart}\n */\n _chart.centerBar = function (centerBar) {\n if (!arguments.length) {\n return _centerBar;\n }\n _centerBar = centerBar;\n return _chart;\n };\n\n dc.override(_chart, 'onClick', function (d) {\n _chart._onClick(d.data);\n });\n\n /**\n * Get or set the spacing between bars as a fraction of bar size. Valid values are between 0-1.\n * Setting this value will also remove any previously set {@link dc.barChart#gap gap}. See the\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Ordinal-Scales.md#ordinal_rangeBands d3 docs}\n * for a visual description of how the padding is applied.\n * @method barPadding\n * @memberof dc.barChart\n * @instance\n * @param {Number} [barPadding=0]\n * @returns {Number|dc.barChart}\n */\n _chart.barPadding = function (barPadding) {\n if (!arguments.length) {\n return _chart._rangeBandPadding();\n }\n _chart._rangeBandPadding(barPadding);\n _gap = undefined;\n return _chart;\n };\n\n _chart._useOuterPadding = function () {\n return _gap === undefined;\n };\n\n /**\n * Get or set the outer padding on an ordinal bar chart. This setting has no effect on non-ordinal charts.\n * Will pad the width by `padding * barWidth` on each side of the chart.\n * @method outerPadding\n * @memberof dc.barChart\n * @instance\n * @param {Number} [padding=0.5]\n * @returns {Number|dc.barChart}\n */\n _chart.outerPadding = _chart._outerRangeBandPadding;\n\n /**\n * Manually set fixed gap (in px) between bars instead of relying on the default auto-generated\n * gap. By default the bar chart implementation will calculate and set the gap automatically\n * based on the number of data points and the length of the x axis.\n * @method gap\n * @memberof dc.barChart\n * @instance\n * @param {Number} [gap=2]\n * @returns {Number|dc.barChart}\n */\n _chart.gap = function (gap) {\n if (!arguments.length) {\n return _gap;\n }\n _gap = gap;\n return _chart;\n };\n\n _chart.extendBrush = function () {\n var extent = _chart.brush().extent();\n if (_chart.round() && (!_centerBar || _alwaysUseRounding)) {\n extent[0] = extent.map(_chart.round())[0];\n extent[1] = extent.map(_chart.round())[1];\n\n _chart.chartBodyG().select('.brush')\n .call(_chart.brush().extent(extent));\n }\n\n return extent;\n };\n\n /**\n * Set or get whether rounding is enabled when bars are centered. If false, using\n * rounding with centered bars will result in a warning and rounding will be ignored. This flag\n * has no effect if bars are not {@link dc.barChart#centerBar centered}.\n * When using standard d3.js rounding methods, the brush often doesn't align correctly with\n * centered bars since the bars are offset. The rounding function must add an offset to\n * compensate, such as in the following example.\n * @method alwaysUseRounding\n * @memberof dc.barChart\n * @instance\n * @example\n * chart.round(function(n) { return Math.floor(n) + 0.5; });\n * @param {Boolean} [alwaysUseRounding=false]\n * @returns {Boolean|dc.barChart}\n */\n _chart.alwaysUseRounding = function (alwaysUseRounding) {\n if (!arguments.length) {\n return _alwaysUseRounding;\n }\n _alwaysUseRounding = alwaysUseRounding;\n return _chart;\n };\n\n function colorFilter (color, inv) {\n return function () {\n var item = d3.select(this);\n var match = item.attr('fill') === color;\n return inv ? !match : match;\n };\n }\n\n _chart.legendHighlight = function (d) {\n if (!_chart.isLegendableHidden(d)) {\n _chart.g().selectAll('rect.bar')\n .classed('highlight', colorFilter(d.color))\n .classed('fadeout', colorFilter(d.color, true));\n }\n };\n\n _chart.legendReset = function () {\n _chart.g().selectAll('rect.bar')\n .classed('highlight', false)\n .classed('fadeout', false);\n };\n\n dc.override(_chart, 'xAxisMax', function () {\n var max = this._xAxisMax();\n if ('resolution' in _chart.xUnits()) {\n var res = _chart.xUnits().resolution;\n max += res;\n }\n return max;\n });\n\n return _chart.anchor(parent, chartGroup);\n};\n","/**\n * Concrete line/area chart implementation.\n *\n * Examples:\n * - {@link http://dc-js.github.com/dc.js/ Nasdaq 100 Index}\n * - {@link http://dc-js.github.com/dc.js/crime/index.html Canadian City Crime Stats}\n * @class lineChart\n * @memberof dc\n * @mixes dc.stackMixin\n * @mixes dc.coordinateGridMixin\n * @example\n * // create a line chart under #chart-container1 element using the default global chart group\n * var chart1 = dc.lineChart('#chart-container1');\n * // create a line chart under #chart-container2 element using chart group A\n * var chart2 = dc.lineChart('#chart-container2', 'chartGroupA');\n * // create a sub-chart under a composite parent chart\n * var chart3 = dc.lineChart(compositeChart);\n * @param {String|node|d3.selection|dc.compositeChart} parent - Any valid\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector}\n * specifying a dom block element such as a div; or a dom element or d3 selection. If the line\n * chart is a sub-chart in a {@link dc.compositeChart Composite Chart} then pass in the parent\n * composite chart instance instead.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {dc.lineChart}\n */\ndc.lineChart = function (parent, chartGroup) {\n var DEFAULT_DOT_RADIUS = 5;\n var TOOLTIP_G_CLASS = 'dc-tooltip';\n var DOT_CIRCLE_CLASS = 'dot';\n var Y_AXIS_REF_LINE_CLASS = 'yRef';\n var X_AXIS_REF_LINE_CLASS = 'xRef';\n var DEFAULT_DOT_OPACITY = 1e-6;\n var LABEL_PADDING = 3;\n\n var _chart = dc.stackMixin(dc.coordinateGridMixin({}));\n var _renderArea = false;\n var _dotRadius = DEFAULT_DOT_RADIUS;\n var _dataPointRadius = null;\n var _dataPointFillOpacity = DEFAULT_DOT_OPACITY;\n var _dataPointStrokeOpacity = DEFAULT_DOT_OPACITY;\n var _interpolate = 'linear';\n var _tension = 0.7;\n var _defined;\n var _dashStyle;\n var _xyTipsOn = true;\n\n _chart.transitionDuration(500);\n _chart.transitionDelay(0);\n _chart._rangeBandPadding(1);\n\n _chart.plotData = function () {\n var chartBody = _chart.chartBodyG();\n var layersList = chartBody.select('g.stack-list');\n\n if (layersList.empty()) {\n layersList = chartBody.append('g').attr('class', 'stack-list');\n }\n\n var layers = layersList.selectAll('g.stack').data(_chart.data());\n\n var layersEnter = layers\n .enter()\n .append('g')\n .attr('class', function (d, i) {\n return 'stack ' + '_' + i;\n });\n\n drawLine(layersEnter, layers);\n\n drawArea(layersEnter, layers);\n\n drawDots(chartBody, layers);\n\n if (_chart.renderLabel()) {\n drawLabels(layers);\n }\n };\n\n /**\n * Gets or sets the interpolator to use for lines drawn, by string name, allowing e.g. step\n * functions, splines, and cubic interpolation. This is passed to\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#line_interpolate d3.svg.line.interpolate} and\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#area_interpolate d3.svg.area.interpolate},\n * where you can find a complete list of valid arguments.\n * @method interpolate\n * @memberof dc.lineChart\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#line_interpolate d3.svg.line.interpolate}\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#area_interpolate d3.svg.area.interpolate}\n * @param {String} [interpolate='linear']\n * @returns {String|dc.lineChart}\n */\n _chart.interpolate = function (interpolate) {\n if (!arguments.length) {\n return _interpolate;\n }\n _interpolate = interpolate;\n return _chart;\n };\n\n /**\n * Gets or sets the tension to use for lines drawn, in the range 0 to 1.\n * This parameter further customizes the interpolation behavior. It is passed to\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#line_tension d3.svg.line.tension} and\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#area_tension d3.svg.area.tension}.\n * @method tension\n * @memberof dc.lineChart\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#line_interpolate d3.svg.line.interpolate}\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#area_interpolate d3.svg.area.interpolate}\n * @param {Number} [tension=0.7]\n * @returns {Number|dc.lineChart}\n */\n _chart.tension = function (tension) {\n if (!arguments.length) {\n return _tension;\n }\n _tension = tension;\n return _chart;\n };\n\n /**\n * Gets or sets a function that will determine discontinuities in the line which should be\n * skipped: the path will be broken into separate subpaths if some points are undefined.\n * This function is passed to\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#line_defined d3.svg.line.defined}\n *\n * Note: crossfilter will sometimes coerce nulls to 0, so you may need to carefully write\n * custom reduce functions to get this to work, depending on your data. See\n * {@link https://github.com/dc-js/dc.js/issues/615#issuecomment-49089248 this GitHub comment}\n * for more details and an example.\n * @method defined\n * @memberof dc.lineChart\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#line_defined d3.svg.line.defined}\n * @param {Function} [defined]\n * @returns {Function|dc.lineChart}\n */\n _chart.defined = function (defined) {\n if (!arguments.length) {\n return _defined;\n }\n _defined = defined;\n return _chart;\n };\n\n /**\n * Set the line's d3 dashstyle. This value becomes the 'stroke-dasharray' of line. Defaults to empty\n * array (solid line).\n * @method dashStyle\n * @memberof dc.lineChart\n * @instance\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray stroke-dasharray}\n * @example\n * // create a Dash Dot Dot Dot\n * chart.dashStyle([3,1,1,1]);\n * @param {Array<Number>} [dashStyle=[]]\n * @returns {Array<Number>|dc.lineChart}\n */\n _chart.dashStyle = function (dashStyle) {\n if (!arguments.length) {\n return _dashStyle;\n }\n _dashStyle = dashStyle;\n return _chart;\n };\n\n /**\n * Get or set render area flag. If the flag is set to true then the chart will render the area\n * beneath each line and the line chart effectively becomes an area chart.\n * @method renderArea\n * @memberof dc.lineChart\n * @instance\n * @param {Boolean} [renderArea=false]\n * @returns {Boolean|dc.lineChart}\n */\n _chart.renderArea = function (renderArea) {\n if (!arguments.length) {\n return _renderArea;\n }\n _renderArea = renderArea;\n return _chart;\n };\n\n function colors (d, i) {\n return _chart.getColor.call(d, d.values, i);\n }\n\n function drawLine (layersEnter, layers) {\n var line = d3.svg.line()\n .x(function (d) {\n return _chart.x()(d.x);\n })\n .y(function (d) {\n return _chart.y()(d.y + d.y0);\n })\n .interpolate(_interpolate)\n .tension(_tension);\n if (_defined) {\n line.defined(_defined);\n }\n\n var path = layersEnter.append('path')\n .attr('class', 'line')\n .attr('stroke', colors);\n if (_dashStyle) {\n path.attr('stroke-dasharray', _dashStyle);\n }\n\n dc.transition(layers.select('path.line'), _chart.transitionDuration(), _chart.transitionDelay())\n //.ease('linear')\n .attr('stroke', colors)\n .attr('d', function (d) {\n return safeD(line(d.values));\n });\n }\n\n function drawArea (layersEnter, layers) {\n if (_renderArea) {\n var area = d3.svg.area()\n .x(function (d) {\n return _chart.x()(d.x);\n })\n .y(function (d) {\n return _chart.y()(d.y + d.y0);\n })\n .y0(function (d) {\n return _chart.y()(d.y0);\n })\n .interpolate(_interpolate)\n .tension(_tension);\n if (_defined) {\n area.defined(_defined);\n }\n\n layersEnter.append('path')\n .attr('class', 'area')\n .attr('fill', colors)\n .attr('d', function (d) {\n return safeD(area(d.values));\n });\n\n dc.transition(layers.select('path.area'), _chart.transitionDuration(), _chart.transitionDelay())\n //.ease('linear')\n .attr('fill', colors)\n .attr('d', function (d) {\n return safeD(area(d.values));\n });\n }\n }\n\n function safeD (d) {\n return (!d || d.indexOf('NaN') >= 0) ? 'M0,0' : d;\n }\n\n function drawDots (chartBody, layers) {\n if (_chart.xyTipsOn() === 'always' || (!_chart.brushOn() && _chart.xyTipsOn())) {\n var tooltipListClass = TOOLTIP_G_CLASS + '-list';\n var tooltips = chartBody.select('g.' + tooltipListClass);\n\n if (tooltips.empty()) {\n tooltips = chartBody.append('g').attr('class', tooltipListClass);\n }\n\n layers.each(function (d, layerIndex) {\n var points = d.values;\n if (_defined) {\n points = points.filter(_defined);\n }\n\n var g = tooltips.select('g.' + TOOLTIP_G_CLASS + '._' + layerIndex);\n if (g.empty()) {\n g = tooltips.append('g').attr('class', TOOLTIP_G_CLASS + ' _' + layerIndex);\n }\n\n createRefLines(g);\n\n var dots = g.selectAll('circle.' + DOT_CIRCLE_CLASS)\n .data(points, dc.pluck('x'));\n\n dots.enter()\n .append('circle')\n .attr('class', DOT_CIRCLE_CLASS)\n .attr('r', getDotRadius())\n .style('fill-opacity', _dataPointFillOpacity)\n .style('stroke-opacity', _dataPointStrokeOpacity)\n .attr('fill', _chart.getColor)\n .on('mousemove', function () {\n var dot = d3.select(this);\n showDot(dot);\n showRefLines(dot, g);\n })\n .on('mouseout', function () {\n var dot = d3.select(this);\n hideDot(dot);\n hideRefLines(g);\n });\n\n dots.call(renderTitle, d);\n\n dc.transition(dots, _chart.transitionDuration())\n .attr('cx', function (d) {\n return dc.utils.safeNumber(_chart.x()(d.x));\n })\n .attr('cy', function (d) {\n return dc.utils.safeNumber(_chart.y()(d.y + d.y0));\n })\n .attr('fill', _chart.getColor);\n\n dots.exit().remove();\n });\n }\n }\n\n _chart.label(function (d) {\n return dc.utils.printSingleValue(d.y0 + d.y);\n }, false);\n\n function drawLabels (layers) {\n layers.each(function (d, layerIndex) {\n var layer = d3.select(this);\n var labels = layer.selectAll('text.lineLabel')\n .data(d.values, dc.pluck('x'));\n\n labels.enter()\n .append('text')\n .attr('class', 'lineLabel')\n .attr('text-anchor', 'middle');\n\n dc.transition(labels, _chart.transitionDuration())\n .attr('x', function (d) {\n return dc.utils.safeNumber(_chart.x()(d.x));\n })\n .attr('y', function (d) {\n var y = _chart.y()(d.y + d.y0) - LABEL_PADDING;\n return dc.utils.safeNumber(y);\n })\n .text(function (d) {\n return _chart.label()(d);\n });\n\n dc.transition(labels.exit(), _chart.transitionDuration())\n .attr('height', 0)\n .remove();\n });\n }\n\n function createRefLines (g) {\n var yRefLine = g.select('path.' + Y_AXIS_REF_LINE_CLASS).empty() ?\n g.append('path').attr('class', Y_AXIS_REF_LINE_CLASS) : g.select('path.' + Y_AXIS_REF_LINE_CLASS);\n yRefLine.style('display', 'none').attr('stroke-dasharray', '5,5');\n\n var xRefLine = g.select('path.' + X_AXIS_REF_LINE_CLASS).empty() ?\n g.append('path').attr('class', X_AXIS_REF_LINE_CLASS) : g.select('path.' + X_AXIS_REF_LINE_CLASS);\n xRefLine.style('display', 'none').attr('stroke-dasharray', '5,5');\n }\n\n function showDot (dot) {\n dot.style('fill-opacity', 0.8);\n dot.style('stroke-opacity', 0.8);\n dot.attr('r', _dotRadius);\n return dot;\n }\n\n function showRefLines (dot, g) {\n var x = dot.attr('cx');\n var y = dot.attr('cy');\n var yAxisX = (_chart._yAxisX() - _chart.margins().left);\n var yAxisRefPathD = 'M' + yAxisX + ' ' + y + 'L' + (x) + ' ' + (y);\n var xAxisRefPathD = 'M' + x + ' ' + _chart.yAxisHeight() + 'L' + x + ' ' + y;\n g.select('path.' + Y_AXIS_REF_LINE_CLASS).style('display', '').attr('d', yAxisRefPathD);\n g.select('path.' + X_AXIS_REF_LINE_CLASS).style('display', '').attr('d', xAxisRefPathD);\n }\n\n function getDotRadius () {\n return _dataPointRadius || _dotRadius;\n }\n\n function hideDot (dot) {\n dot.style('fill-opacity', _dataPointFillOpacity)\n .style('stroke-opacity', _dataPointStrokeOpacity)\n .attr('r', getDotRadius());\n }\n\n function hideRefLines (g) {\n g.select('path.' + Y_AXIS_REF_LINE_CLASS).style('display', 'none');\n g.select('path.' + X_AXIS_REF_LINE_CLASS).style('display', 'none');\n }\n\n function renderTitle (dot, d) {\n if (_chart.renderTitle()) {\n dot.select('title').remove();\n dot.append('title').text(dc.pluck('data', _chart.title(d.name)));\n }\n }\n\n /**\n * Turn on/off the mouseover behavior of an individual data point which renders a circle and x/y axis\n * dashed lines back to each respective axis. This is ignored if the chart\n * {@link dc.coordinateGridMixin#brushOn brush} is on\n * @method xyTipsOn\n * @memberof dc.lineChart\n * @instance\n * @param {Boolean} [xyTipsOn=false]\n * @returns {Boolean|dc.lineChart}\n */\n _chart.xyTipsOn = function (xyTipsOn) {\n if (!arguments.length) {\n return _xyTipsOn;\n }\n _xyTipsOn = xyTipsOn;\n return _chart;\n };\n\n /**\n * Get or set the radius (in px) for dots displayed on the data points.\n * @method dotRadius\n * @memberof dc.lineChart\n * @instance\n * @param {Number} [dotRadius=5]\n * @returns {Number|dc.lineChart}\n */\n _chart.dotRadius = function (dotRadius) {\n if (!arguments.length) {\n return _dotRadius;\n }\n _dotRadius = dotRadius;\n return _chart;\n };\n\n /**\n * Always show individual dots for each datapoint.\n *\n * If `options` is falsy, it disables data point rendering. If no `options` are provided, the\n * current `options` values are instead returned.\n * @method renderDataPoints\n * @memberof dc.lineChart\n * @instance\n * @example\n * chart.renderDataPoints({radius: 2, fillOpacity: 0.8, strokeOpacity: 0.8})\n * @param {{fillOpacity: Number, strokeOpacity: Number, radius: Number}} [options={fillOpacity: 0.8, strokeOpacity: 0.8, radius: 2}]\n * @returns {{fillOpacity: Number, strokeOpacity: Number, radius: Number}|dc.lineChart}\n */\n _chart.renderDataPoints = function (options) {\n if (!arguments.length) {\n return {\n fillOpacity: _dataPointFillOpacity,\n strokeOpacity: _dataPointStrokeOpacity,\n radius: _dataPointRadius\n };\n } else if (!options) {\n _dataPointFillOpacity = DEFAULT_DOT_OPACITY;\n _dataPointStrokeOpacity = DEFAULT_DOT_OPACITY;\n _dataPointRadius = null;\n } else {\n _dataPointFillOpacity = options.fillOpacity || 0.8;\n _dataPointStrokeOpacity = options.strokeOpacity || 0.8;\n _dataPointRadius = options.radius || 2;\n }\n return _chart;\n };\n\n function colorFilter (color, dashstyle, inv) {\n return function () {\n var item = d3.select(this);\n var match = (item.attr('stroke') === color &&\n item.attr('stroke-dasharray') === ((dashstyle instanceof Array) ?\n dashstyle.join(',') : null)) || item.attr('fill') === color;\n return inv ? !match : match;\n };\n }\n\n _chart.legendHighlight = function (d) {\n if (!_chart.isLegendableHidden(d)) {\n _chart.g().selectAll('path.line, path.area')\n .classed('highlight', colorFilter(d.color, d.dashstyle))\n .classed('fadeout', colorFilter(d.color, d.dashstyle, true));\n }\n };\n\n _chart.legendReset = function () {\n _chart.g().selectAll('path.line, path.area')\n .classed('highlight', false)\n .classed('fadeout', false);\n };\n\n dc.override(_chart, 'legendables', function () {\n var legendables = _chart._legendables();\n if (!_dashStyle) {\n return legendables;\n }\n return legendables.map(function (l) {\n l.dashstyle = _dashStyle;\n return l;\n });\n });\n\n return _chart.anchor(parent, chartGroup);\n};\n","/**\n * The data count widget is a simple widget designed to display the number of records selected by the\n * current filters out of the total number of records in the data set. Once created the data count widget\n * will automatically update the text content of child elements with the following classes:\n *\n * * `.total-count` - total number of records\n * * `.filter-count` - number of records matched by the current filters\n *\n * Note: this widget works best for the specific case of showing the number of records out of a\n * total. If you want a more general-purpose numeric display, please use the\n * {@link dc.numberDisplay} widget instead.\n *\n * Examples:\n * - {@link http://dc-js.github.com/dc.js/ Nasdaq 100 Index}\n * @class dataCount\n * @memberof dc\n * @mixes dc.baseMixin\n * @example\n * var ndx = crossfilter(data);\n * var all = ndx.groupAll();\n *\n * dc.dataCount('.dc-data-count')\n * .dimension(ndx)\n * .group(all);\n * @param {String|node|d3.selection} parent - Any valid\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying\n * a dom block element such as a div; or a dom element or d3 selection.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {dc.dataCount}\n */\ndc.dataCount = function (parent, chartGroup) {\n var _formatNumber = d3.format(',d');\n var _chart = dc.baseMixin({});\n var _html = {some: '', all: ''};\n\n /**\n * Gets or sets an optional object specifying HTML templates to use depending how many items are\n * selected. The text `%total-count` will replaced with the total number of records, and the text\n * `%filter-count` will be replaced with the number of selected records.\n * - all: HTML template to use if all items are selected\n * - some: HTML template to use if not all items are selected\n * @method html\n * @memberof dc.dataCount\n * @instance\n * @example\n * counter.html({\n * some: '%filter-count out of %total-count records selected',\n * all: 'All records selected. Click on charts to apply filters'\n * })\n * @param {{some:String, all: String}} [options]\n * @returns {{some:String, all: String}|dc.dataCount}\n */\n _chart.html = function (options) {\n if (!arguments.length) {\n return _html;\n }\n if (options.all) {\n _html.all = options.all;\n }\n if (options.some) {\n _html.some = options.some;\n }\n return _chart;\n };\n\n /**\n * Gets or sets an optional function to format the filter count and total count.\n * @method formatNumber\n * @memberof dc.dataCount\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md d3.format}\n * @example\n * counter.formatNumber(d3.format('.2g'))\n * @param {Function} [formatter=d3.format('.2g')]\n * @returns {Function|dc.dataCount}\n */\n _chart.formatNumber = function (formatter) {\n if (!arguments.length) {\n return _formatNumber;\n }\n _formatNumber = formatter;\n return _chart;\n };\n\n _chart._doRender = function () {\n var tot = _chart.dimension().size(),\n val = _chart.group().value();\n var all = _formatNumber(tot);\n var selected = _formatNumber(val);\n\n if ((tot === val) && (_html.all !== '')) {\n _chart.root().html(_html.all.replace('%total-count', all).replace('%filter-count', selected));\n } else if (_html.some !== '') {\n _chart.root().html(_html.some.replace('%total-count', all).replace('%filter-count', selected));\n } else {\n _chart.selectAll('.total-count').text(all);\n _chart.selectAll('.filter-count').text(selected);\n }\n return _chart;\n };\n\n _chart._doRedraw = function () {\n return _chart._doRender();\n };\n\n return _chart.anchor(parent, chartGroup);\n};\n","/**\n * The data table is a simple widget designed to list crossfilter focused data set (rows being\n * filtered) in a good old tabular fashion.\n *\n * Note: Unlike other charts, the data table (and data grid chart) use the {@link dc.dataTable#group group} attribute as a\n * keying function for {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Arrays.md#nest nesting} the data\n * together in groups. Do not pass in a crossfilter group as this will not work.\n *\n * Another interesting feature of the data table is that you can pass a crossfilter group to the `dimension`, as\n * long as you specify the {@link dc.dataTable#order order} as `d3.descending`, since the data\n * table will use `dimension.top()` to fetch the data in that case, and the method is equally\n * supported on the crossfilter group as the crossfilter dimension.\n *\n * Examples:\n * - {@link http://dc-js.github.com/dc.js/ Nasdaq 100 Index}\n * - {@link http://dc-js.github.io/dc.js/examples/table-on-aggregated-data.html dataTable on a crossfilter group}\n * ({@link https://github.com/dc-js/dc.js/blob/develop/web/examples/table-on-aggregated-data.html source})\n * @class dataTable\n * @memberof dc\n * @mixes dc.baseMixin\n * @param {String|node|d3.selection} parent - Any valid\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying\n * a dom block element such as a div; or a dom element or d3 selection.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {dc.dataTable}\n */\ndc.dataTable = function (parent, chartGroup) {\n var LABEL_CSS_CLASS = 'dc-table-label';\n var ROW_CSS_CLASS = 'dc-table-row';\n var COLUMN_CSS_CLASS = 'dc-table-column';\n var GROUP_CSS_CLASS = 'dc-table-group';\n var HEAD_CSS_CLASS = 'dc-table-head';\n\n var _chart = dc.baseMixin({});\n\n var _size = 25;\n var _columns = [];\n var _sortBy = function (d) {\n return d;\n };\n var _order = d3.ascending;\n var _beginSlice = 0;\n var _endSlice;\n var _showGroups = true;\n\n _chart._doRender = function () {\n _chart.selectAll('tbody').remove();\n\n renderRows(renderGroups());\n\n return _chart;\n };\n\n _chart._doColumnValueFormat = function (v, d) {\n return ((typeof v === 'function') ?\n v(d) : // v as function\n ((typeof v === 'string') ?\n d[v] : // v is field name string\n v.format(d) // v is Object, use fn (element 2)\n )\n );\n };\n\n _chart._doColumnHeaderFormat = function (d) {\n // if 'function', convert to string representation\n // show a string capitalized\n // if an object then display its label string as-is.\n return (typeof d === 'function') ?\n _chart._doColumnHeaderFnToString(d) :\n ((typeof d === 'string') ?\n _chart._doColumnHeaderCapitalize(d) : String(d.label));\n };\n\n _chart._doColumnHeaderCapitalize = function (s) {\n // capitalize\n return s.charAt(0).toUpperCase() + s.slice(1);\n };\n\n _chart._doColumnHeaderFnToString = function (f) {\n // columnString(f) {\n var s = String(f);\n var i1 = s.indexOf('return ');\n if (i1 >= 0) {\n var i2 = s.lastIndexOf(';');\n if (i2 >= 0) {\n s = s.substring(i1 + 7, i2);\n var i3 = s.indexOf('numberFormat');\n if (i3 >= 0) {\n s = s.replace('numberFormat', '');\n }\n }\n }\n return s;\n };\n\n function renderGroups () {\n // The 'original' example uses all 'functions'.\n // If all 'functions' are used, then don't remove/add a header, and leave\n // the html alone. This preserves the functionality of earlier releases.\n // A 2nd option is a string representing a field in the data.\n // A third option is to supply an Object such as an array of 'information', and\n // supply your own _doColumnHeaderFormat and _doColumnValueFormat functions to\n // create what you need.\n var bAllFunctions = true;\n _columns.forEach(function (f) {\n bAllFunctions = bAllFunctions & (typeof f === 'function');\n });\n\n if (!bAllFunctions) {\n // ensure one thead\n var thead = _chart.selectAll('thead').data([0]);\n thead.enter().append('thead');\n thead.exit().remove();\n\n // with one tr\n var headrow = thead.selectAll('tr').data([0]);\n headrow.enter().append('tr');\n headrow.exit().remove();\n\n // with a th for each column\n var headcols = headrow.selectAll('th')\n .data(_columns);\n headcols.enter().append('th');\n headcols.exit().remove();\n\n headcols\n .attr('class', HEAD_CSS_CLASS)\n .html(function (d) {\n return (_chart._doColumnHeaderFormat(d));\n\n });\n }\n\n var groups = _chart.root().selectAll('tbody')\n .data(nestEntries(), function (d) {\n return _chart.keyAccessor()(d);\n });\n\n var rowGroup = groups\n .enter()\n .append('tbody');\n\n if (_showGroups === true) {\n rowGroup\n .append('tr')\n .attr('class', GROUP_CSS_CLASS)\n .append('td')\n .attr('class', LABEL_CSS_CLASS)\n .attr('colspan', _columns.length)\n .html(function (d) {\n return _chart.keyAccessor()(d);\n });\n }\n\n groups.exit().remove();\n\n return rowGroup;\n }\n\n function nestEntries () {\n var entries;\n if (_order === d3.ascending) {\n entries = _chart.dimension().bottom(_size);\n } else {\n entries = _chart.dimension().top(_size);\n }\n\n return d3.nest()\n .key(_chart.group())\n .sortKeys(_order)\n .entries(entries.sort(function (a, b) {\n return _order(_sortBy(a), _sortBy(b));\n }).slice(_beginSlice, _endSlice));\n }\n\n function renderRows (groups) {\n var rows = groups.order()\n .selectAll('tr.' + ROW_CSS_CLASS)\n .data(function (d) {\n return d.values;\n });\n\n var rowEnter = rows.enter()\n .append('tr')\n .attr('class', ROW_CSS_CLASS);\n\n _columns.forEach(function (v, i) {\n rowEnter.append('td')\n .attr('class', COLUMN_CSS_CLASS + ' _' + i)\n .html(function (d) {\n return _chart._doColumnValueFormat(v, d);\n });\n });\n\n rows.exit().remove();\n\n return rows;\n }\n\n _chart._doRedraw = function () {\n return _chart._doRender();\n };\n\n /**\n * Get or set the group function for the data table. The group function takes a data row and\n * returns the key to specify to {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Arrays.md#d3_nest d3.nest}\n * to split rows into groups.\n *\n * Do not pass in a crossfilter group as this will not work.\n * @method group\n * @memberof dc.dataTable\n * @instance\n * @example\n * // group rows by the value of their field\n * chart\n * .group(function(d) { return d.field; })\n * @param {Function} groupFunction Function taking a row of data and returning the nest key.\n * @returns {Function|dc.dataTable}\n */\n\n /**\n * Get or set the table size which determines the number of rows displayed by the widget.\n * @method size\n * @memberof dc.dataTable\n * @instance\n * @param {Number} [size=25]\n * @returns {Number|dc.dataTable}\n */\n _chart.size = function (size) {\n if (!arguments.length) {\n return _size;\n }\n _size = size;\n return _chart;\n };\n\n /**\n * Get or set the index of the beginning slice which determines which entries get displayed\n * by the widget. Useful when implementing pagination.\n *\n * Note: the sortBy function will determine how the rows are ordered for pagination purposes.\n\n * See the {@link http://dc-js.github.io/dc.js/examples/table-pagination.html table pagination example}\n * to see how to implement the pagination user interface using `beginSlice` and `endSlice`.\n * @method beginSlice\n * @memberof dc.dataTable\n * @instance\n * @param {Number} [beginSlice=0]\n * @returns {Number|dc.dataTable}\n */\n _chart.beginSlice = function (beginSlice) {\n if (!arguments.length) {\n return _beginSlice;\n }\n _beginSlice = beginSlice;\n return _chart;\n };\n\n /**\n * Get or set the index of the end slice which determines which entries get displayed by the\n * widget. Useful when implementing pagination. See {@link dc.dataTable#beginSlice `beginSlice`} for more information.\n * @method endSlice\n * @memberof dc.dataTable\n * @instance\n * @param {Number|undefined} [endSlice=undefined]\n * @returns {Number|dc.dataTable}\n */\n _chart.endSlice = function (endSlice) {\n if (!arguments.length) {\n return _endSlice;\n }\n _endSlice = endSlice;\n return _chart;\n };\n\n /**\n * Get or set column functions. The data table widget supports several methods of specifying the\n * columns to display.\n *\n * The original method uses an array of functions to generate dynamic columns. Column functions\n * are simple javascript functions with only one input argument `d` which represents a row in\n * the data set. The return value of these functions will be used to generate the content for\n * each cell. However, this method requires the HTML for the table to have a fixed set of column\n * headers.\n *\n * <pre><code>chart.columns([\n * function(d) { return d.date; },\n * function(d) { return d.open; },\n * function(d) { return d.close; },\n * function(d) { return numberFormat(d.close - d.open); },\n * function(d) { return d.volume; }\n * ]);\n * </code></pre>\n *\n * In the second method, you can list the columns to read from the data without specifying it as\n * a function, except where necessary (ie, computed columns). Note the data element name is\n * capitalized when displayed in the table header. You can also mix in functions as necessary,\n * using the third `{label, format}` form, as shown below.\n *\n * <pre><code>chart.columns([\n * \"date\", // d[\"date\"], ie, a field accessor; capitalized automatically\n * \"open\", // ...\n * \"close\", // ...\n * {\n * label: \"Change\",\n * format: function (d) {\n * return numberFormat(d.close - d.open);\n * }\n * },\n * \"volume\" // d[\"volume\"], ie, a field accessor; capitalized automatically\n * ]);\n * </code></pre>\n *\n * In the third example, we specify all fields using the `{label, format}` method:\n * <pre><code>chart.columns([\n * {\n * label: \"Date\",\n * format: function (d) { return d.date; }\n * },\n * {\n * label: \"Open\",\n * format: function (d) { return numberFormat(d.open); }\n * },\n * {\n * label: \"Close\",\n * format: function (d) { return numberFormat(d.close); }\n * },\n * {\n * label: \"Change\",\n * format: function (d) { return numberFormat(d.close - d.open); }\n * },\n * {\n * label: \"Volume\",\n * format: function (d) { return d.volume; }\n * }\n * ]);\n * </code></pre>\n *\n * You may wish to override the dataTable functions `_doColumnHeaderCapitalize` and\n * `_doColumnHeaderFnToString`, which are used internally to translate the column information or\n * function into a displayed header. The first one is used on the \"string\" column specifier; the\n * second is used to transform a stringified function into something displayable. For the Stock\n * example, the function for Change becomes the table header **d.close - d.open**.\n *\n * Finally, you can even specify a completely different form of column definition. To do this,\n * override `_chart._doColumnHeaderFormat` and `_chart._doColumnValueFormat` Be aware that\n * fields without numberFormat specification will be displayed just as they are stored in the\n * data, unformatted.\n * @method columns\n * @memberof dc.dataTable\n * @instance\n * @param {Array<Function>} [columns=[]]\n * @returns {Array<Function>}|dc.dataTable}\n */\n _chart.columns = function (columns) {\n if (!arguments.length) {\n return _columns;\n }\n _columns = columns;\n return _chart;\n };\n\n /**\n * Get or set sort-by function. This function works as a value accessor at row level and returns a\n * particular field to be sorted by.\n * @method sortBy\n * @memberof dc.dataTable\n * @instance\n * @example\n * chart.sortBy(function(d) {\n * return d.date;\n * });\n * @param {Function} [sortBy=identity function]\n * @returns {Function|dc.dataTable}\n */\n _chart.sortBy = function (sortBy) {\n if (!arguments.length) {\n return _sortBy;\n }\n _sortBy = sortBy;\n return _chart;\n };\n\n /**\n * Get or set sort order. If the order is `d3.ascending`, the data table will use\n * `dimension().bottom()` to fetch the data; otherwise it will use `dimension().top()`\n * @method order\n * @memberof dc.dataTable\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Arrays.md#d3_ascending d3.ascending}\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Arrays.md#d3_descending d3.descending}\n * @example\n * chart.order(d3.descending);\n * @param {Function} [order=d3.ascending]\n * @returns {Function|dc.dataTable}\n */\n _chart.order = function (order) {\n if (!arguments.length) {\n return _order;\n }\n _order = order;\n return _chart;\n };\n\n /**\n * Get or set if group rows will be shown. The dataTable {@link dc.dataTable#group group}\n * function must be specified even if groups are not shown.\n * @method showGroups\n * @memberof dc.dataTable\n * @instance\n * @example\n * chart\n * .group([value], [name])\n * .showGroups(true|false);\n * @param {Boolean} [showGroups=true]\n * @returns {Boolean|dc.dataTable}\n */\n _chart.showGroups = function (showGroups) {\n if (!arguments.length) {\n return _showGroups;\n }\n _showGroups = showGroups;\n return _chart;\n };\n\n return _chart.anchor(parent, chartGroup);\n};\n","/**\n * Data grid is a simple widget designed to list the filtered records, providing\n * a simple way to define how the items are displayed.\n *\n * Note: Unlike other charts, the data grid chart (and data table) use the {@link dc.dataGrid#group group} attribute as a keying function\n * for {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Arrays.md#nest nesting} the data together in groups.\n * Do not pass in a crossfilter group as this will not work.\n *\n * Examples:\n * - {@link http://europarl.me/dc.js/web/ep/index.html List of members of the european parliament}\n * @class dataGrid\n * @memberof dc\n * @mixes dc.baseMixin\n * @param {String|node|d3.selection} parent - Any valid\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying\n * a dom block element such as a div; or a dom element or d3 selection.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {dc.dataGrid}\n */\ndc.dataGrid = function (parent, chartGroup) {\n var LABEL_CSS_CLASS = 'dc-grid-label';\n var ITEM_CSS_CLASS = 'dc-grid-item';\n var GROUP_CSS_CLASS = 'dc-grid-group';\n var GRID_CSS_CLASS = 'dc-grid-top';\n\n var _chart = dc.baseMixin({});\n\n var _size = 999; // shouldn't be needed, but you might\n var _html = function (d) { return 'you need to provide an html() handling param: ' + JSON.stringify(d); };\n var _sortBy = function (d) {\n return d;\n };\n var _order = d3.ascending;\n var _beginSlice = 0, _endSlice;\n\n var _htmlGroup = function (d) {\n return '<div class=\\'' + GROUP_CSS_CLASS + '\\'><h1 class=\\'' + LABEL_CSS_CLASS + '\\'>' +\n _chart.keyAccessor()(d) + '</h1></div>';\n };\n\n _chart._doRender = function () {\n _chart.selectAll('div.' + GRID_CSS_CLASS).remove();\n\n renderItems(renderGroups());\n\n return _chart;\n };\n\n function renderGroups () {\n var groups = _chart.root().selectAll('div.' + GRID_CSS_CLASS)\n .data(nestEntries(), function (d) {\n return _chart.keyAccessor()(d);\n });\n\n var itemGroup = groups\n .enter()\n .append('div')\n .attr('class', GRID_CSS_CLASS);\n\n if (_htmlGroup) {\n itemGroup\n .html(function (d) {\n return _htmlGroup(d);\n });\n }\n\n groups.exit().remove();\n return itemGroup;\n }\n\n function nestEntries () {\n var entries = _chart.dimension().top(_size);\n\n return d3.nest()\n .key(_chart.group())\n .sortKeys(_order)\n .entries(entries.sort(function (a, b) {\n return _order(_sortBy(a), _sortBy(b));\n }).slice(_beginSlice, _endSlice));\n }\n\n function renderItems (groups) {\n var items = groups.order()\n .selectAll('div.' + ITEM_CSS_CLASS)\n .data(function (d) {\n return d.values;\n });\n\n items.enter()\n .append('div')\n .attr('class', ITEM_CSS_CLASS)\n .html(function (d) {\n return _html(d);\n });\n\n items.exit().remove();\n\n return items;\n }\n\n _chart._doRedraw = function () {\n return _chart._doRender();\n };\n\n /**\n * Get or set the group function for the data grid. The group function takes a data row and\n * returns the key to specify to {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Arrays.md#d3_nest d3.nest}\n * to split rows into groups.\n *\n * Do not pass in a crossfilter group as this will not work.\n * @method group\n * @memberof dc.dataGrid\n * @instance\n * @example\n * // group rows by the value of their field\n * chart\n * .group(function(d) { return d.field; })\n * @param {Function} groupFunction Function taking a row of data and returning the nest key.\n * @returns {Function|dc.dataTable}\n */\n\n /**\n * Get or set the index of the beginning slice which determines which entries get displayed by the widget.\n * Useful when implementing pagination.\n * @method beginSlice\n * @memberof dc.dataGrid\n * @instance\n * @param {Number} [beginSlice=0]\n * @returns {Number|dc.dataGrid}\n */\n _chart.beginSlice = function (beginSlice) {\n if (!arguments.length) {\n return _beginSlice;\n }\n _beginSlice = beginSlice;\n return _chart;\n };\n\n /**\n * Get or set the index of the end slice which determines which entries get displayed by the widget.\n * Useful when implementing pagination.\n * @method endSlice\n * @memberof dc.dataGrid\n * @instance\n * @param {Number} [endSlice]\n * @returns {Number|dc.dataGrid}\n */\n _chart.endSlice = function (endSlice) {\n if (!arguments.length) {\n return _endSlice;\n }\n _endSlice = endSlice;\n return _chart;\n };\n\n /**\n * Get or set the grid size which determines the number of items displayed by the widget.\n * @method size\n * @memberof dc.dataGrid\n * @instance\n * @param {Number} [size=999]\n * @returns {Number|dc.dataGrid}\n */\n _chart.size = function (size) {\n if (!arguments.length) {\n return _size;\n }\n _size = size;\n return _chart;\n };\n\n /**\n * Get or set the function that formats an item. The data grid widget uses a\n * function to generate dynamic html. Use your favourite templating engine or\n * generate the string directly.\n * @method html\n * @memberof dc.dataGrid\n * @instance\n * @example\n * chart.html(function (d) { return '<div class='item '+data.exampleCategory+''>'+data.exampleString+'</div>';});\n * @param {Function} [html]\n * @returns {Function|dc.dataGrid}\n */\n _chart.html = function (html) {\n if (!arguments.length) {\n return _html;\n }\n _html = html;\n return _chart;\n };\n\n /**\n * Get or set the function that formats a group label.\n * @method htmlGroup\n * @memberof dc.dataGrid\n * @instance\n * @example\n * chart.htmlGroup (function (d) { return '<h2>'.d.key . 'with ' . d.values.length .' items</h2>'});\n * @param {Function} [htmlGroup]\n * @returns {Function|dc.dataGrid}\n */\n _chart.htmlGroup = function (htmlGroup) {\n if (!arguments.length) {\n return _htmlGroup;\n }\n _htmlGroup = htmlGroup;\n return _chart;\n };\n\n /**\n * Get or set sort-by function. This function works as a value accessor at the item\n * level and returns a particular field to be sorted.\n * @method sortBy\n * @memberof dc.dataGrid\n * @instance\n * @example\n * chart.sortBy(function(d) {\n * return d.date;\n * });\n * @param {Function} [sortByFunction]\n * @returns {Function|dc.dataGrid}\n */\n _chart.sortBy = function (sortByFunction) {\n if (!arguments.length) {\n return _sortBy;\n }\n _sortBy = sortByFunction;\n return _chart;\n };\n\n /**\n * Get or set sort the order function.\n * @method order\n * @memberof dc.dataGrid\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Arrays.md#d3_ascending d3.ascending}\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Arrays.md#d3_descending d3.descending}\n * @example\n * chart.order(d3.descending);\n * @param {Function} [order=d3.ascending]\n * @returns {Function|dc.dataGrid}\n */\n _chart.order = function (order) {\n if (!arguments.length) {\n return _order;\n }\n _order = order;\n return _chart;\n };\n\n return _chart.anchor(parent, chartGroup);\n};\n","/**\n * A concrete implementation of a general purpose bubble chart that allows data visualization using the\n * following dimensions:\n * - x axis position\n * - y axis position\n * - bubble radius\n * - color\n *\n * Examples:\n * - {@link http://dc-js.github.com/dc.js/ Nasdaq 100 Index}\n * - {@link http://dc-js.github.com/dc.js/vc/index.html US Venture Capital Landscape 2011}\n * @class bubbleChart\n * @memberof dc\n * @mixes dc.bubbleMixin\n * @mixes dc.coordinateGridMixin\n * @example\n * // create a bubble chart under #chart-container1 element using the default global chart group\n * var bubbleChart1 = dc.bubbleChart('#chart-container1');\n * // create a bubble chart under #chart-container2 element using chart group A\n * var bubbleChart2 = dc.bubbleChart('#chart-container2', 'chartGroupA');\n * @param {String|node|d3.selection} parent - Any valid\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying\n * a dom block element such as a div; or a dom element or d3 selection.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {dc.bubbleChart}\n */\ndc.bubbleChart = function (parent, chartGroup) {\n var _chart = dc.bubbleMixin(dc.coordinateGridMixin({}));\n\n _chart.transitionDuration(750);\n\n _chart.transitionDelay(0);\n\n var bubbleLocator = function (d) {\n return 'translate(' + (bubbleX(d)) + ',' + (bubbleY(d)) + ')';\n };\n\n _chart.plotData = function () {\n _chart.calculateRadiusDomain();\n _chart.r().range([_chart.MIN_RADIUS, _chart.xAxisLength() * _chart.maxBubbleRelativeSize()]);\n\n var data = _chart.data();\n var bubbleG = _chart.chartBodyG().selectAll('g.' + _chart.BUBBLE_NODE_CLASS)\n .data(data, function (d) { return d.key; });\n if (_chart.sortBubbleSize()) {\n // update dom order based on sort\n bubbleG.order();\n }\n\n renderNodes(bubbleG);\n\n updateNodes(bubbleG);\n\n removeNodes(bubbleG);\n\n _chart.fadeDeselectedArea();\n };\n\n function renderNodes (bubbleG) {\n var bubbleGEnter = bubbleG.enter().append('g');\n\n bubbleGEnter\n .attr('class', _chart.BUBBLE_NODE_CLASS)\n .attr('transform', bubbleLocator)\n .append('circle').attr('class', function (d, i) {\n return _chart.BUBBLE_CLASS + ' _' + i;\n })\n .on('click', _chart.onClick)\n .attr('fill', _chart.getColor)\n .attr('r', 0);\n dc.transition(bubbleG, _chart.transitionDuration(), _chart.transitionDelay())\n .select('circle.' + _chart.BUBBLE_CLASS)\n .attr('r', function (d) {\n return _chart.bubbleR(d);\n })\n .attr('opacity', function (d) {\n return (_chart.bubbleR(d) > 0) ? 1 : 0;\n });\n\n _chart._doRenderLabel(bubbleGEnter);\n\n _chart._doRenderTitles(bubbleGEnter);\n }\n\n function updateNodes (bubbleG) {\n dc.transition(bubbleG, _chart.transitionDuration(), _chart.transitionDelay())\n .attr('transform', bubbleLocator)\n .select('circle.' + _chart.BUBBLE_CLASS)\n .attr('fill', _chart.getColor)\n .attr('r', function (d) {\n return _chart.bubbleR(d);\n })\n .attr('opacity', function (d) {\n return (_chart.bubbleR(d) > 0) ? 1 : 0;\n });\n\n _chart.doUpdateLabels(bubbleG);\n _chart.doUpdateTitles(bubbleG);\n }\n\n function removeNodes (bubbleG) {\n bubbleG.exit().remove();\n }\n\n function bubbleX (d) {\n var x = _chart.x()(_chart.keyAccessor()(d));\n if (isNaN(x)) {\n x = 0;\n }\n return x;\n }\n\n function bubbleY (d) {\n var y = _chart.y()(_chart.valueAccessor()(d));\n if (isNaN(y)) {\n y = 0;\n }\n return y;\n }\n\n _chart.renderBrush = function () {\n // override default x axis brush from parent chart\n };\n\n _chart.redrawBrush = function () {\n // override default x axis brush from parent chart\n _chart.fadeDeselectedArea();\n };\n\n return _chart.anchor(parent, chartGroup);\n};\n","/**\n * Composite charts are a special kind of chart that render multiple charts on the same Coordinate\n * Grid. You can overlay (compose) different bar/line/area charts in a single composite chart to\n * achieve some quite flexible charting effects.\n * @class compositeChart\n * @memberof dc\n * @mixes dc.coordinateGridMixin\n * @example\n * // create a composite chart under #chart-container1 element using the default global chart group\n * var compositeChart1 = dc.compositeChart('#chart-container1');\n * // create a composite chart under #chart-container2 element using chart group A\n * var compositeChart2 = dc.compositeChart('#chart-container2', 'chartGroupA');\n * @param {String|node|d3.selection} parent - Any valid\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying\n * a dom block element such as a div; or a dom element or d3 selection.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {dc.compositeChart}\n */\ndc.compositeChart = function (parent, chartGroup) {\n\n var SUB_CHART_CLASS = 'sub';\n var DEFAULT_RIGHT_Y_AXIS_LABEL_PADDING = 12;\n\n var _chart = dc.coordinateGridMixin({});\n var _children = [];\n\n var _childOptions = {};\n\n var _shareColors = false,\n _shareTitle = true,\n _alignYAxes = false;\n\n var _rightYAxis = d3.svg.axis(),\n _rightYAxisLabel = 0,\n _rightYAxisLabelPadding = DEFAULT_RIGHT_Y_AXIS_LABEL_PADDING,\n _rightY,\n _rightAxisGridLines = false;\n\n _chart._mandatoryAttributes([]);\n _chart.transitionDuration(500);\n _chart.transitionDelay(0);\n\n dc.override(_chart, '_generateG', function () {\n var g = this.__generateG();\n\n for (var i = 0; i < _children.length; ++i) {\n var child = _children[i];\n\n generateChildG(child, i);\n\n if (!child.dimension()) {\n child.dimension(_chart.dimension());\n }\n if (!child.group()) {\n child.group(_chart.group());\n }\n\n child.chartGroup(_chart.chartGroup());\n child.svg(_chart.svg());\n child.xUnits(_chart.xUnits());\n child.transitionDuration(_chart.transitionDuration(), _chart.transitionDelay());\n child.brushOn(_chart.brushOn());\n child.renderTitle(_chart.renderTitle());\n child.elasticX(_chart.elasticX());\n }\n\n return g;\n });\n\n _chart._brushing = function () {\n var extent = _chart.extendBrush();\n var brushIsEmpty = _chart.brushIsEmpty(extent);\n\n for (var i = 0; i < _children.length; ++i) {\n _children[i].replaceFilter(brushIsEmpty ? null : extent);\n }\n };\n\n _chart._prepareYAxis = function () {\n var left = (leftYAxisChildren().length !== 0);\n var right = (rightYAxisChildren().length !== 0);\n var ranges = calculateYAxisRanges(left, right);\n\n if (left) { prepareLeftYAxis(ranges); }\n if (right) { prepareRightYAxis(ranges); }\n\n if (leftYAxisChildren().length > 0 && !_rightAxisGridLines) {\n _chart._renderHorizontalGridLinesForAxis(_chart.g(), _chart.y(), _chart.yAxis());\n } else if (rightYAxisChildren().length > 0) {\n _chart._renderHorizontalGridLinesForAxis(_chart.g(), _rightY, _rightYAxis);\n }\n };\n\n _chart.renderYAxis = function () {\n if (leftYAxisChildren().length !== 0) {\n _chart.renderYAxisAt('y', _chart.yAxis(), _chart.margins().left);\n _chart.renderYAxisLabel('y', _chart.yAxisLabel(), -90);\n }\n\n if (rightYAxisChildren().length !== 0) {\n _chart.renderYAxisAt('yr', _chart.rightYAxis(), _chart.width() - _chart.margins().right);\n _chart.renderYAxisLabel('yr', _chart.rightYAxisLabel(), 90, _chart.width() - _rightYAxisLabelPadding);\n }\n };\n\n function calculateYAxisRanges (left, right) {\n var lyAxisMin, lyAxisMax, ryAxisMin, ryAxisMax;\n var ranges;\n\n if (left) {\n lyAxisMin = yAxisMin();\n lyAxisMax = yAxisMax();\n }\n\n if (right) {\n ryAxisMin = rightYAxisMin();\n ryAxisMax = rightYAxisMax();\n }\n\n if (_chart.alignYAxes() && left && right) {\n ranges = alignYAxisRanges(lyAxisMin, lyAxisMax, ryAxisMin, ryAxisMax);\n }\n\n return ranges || {\n lyAxisMin: lyAxisMin,\n lyAxisMax: lyAxisMax,\n ryAxisMin: ryAxisMin,\n ryAxisMax: ryAxisMax\n };\n }\n\n function alignYAxisRanges (lyAxisMin, lyAxisMax, ryAxisMin, ryAxisMax) {\n // since the two series will share a zero, each Y is just a multiple\n // of the other. and the ratio should be the ratio of the ranges of the\n // input data, so that they come out the same height. so we just min/max\n\n // note: both ranges already include zero due to the stack mixin (#667)\n // if #667 changes, we can reconsider whether we want data height or\n // height from zero to be equal. and it will be possible for the axes\n // to be aligned but not visible.\n var extentRatio = (ryAxisMax - ryAxisMin) / (lyAxisMax - lyAxisMin);\n\n return {\n lyAxisMin: Math.min(lyAxisMin, ryAxisMin / extentRatio),\n lyAxisMax: Math.max(lyAxisMax, ryAxisMax / extentRatio),\n ryAxisMin: Math.min(ryAxisMin, lyAxisMin * extentRatio),\n ryAxisMax: Math.max(ryAxisMax, lyAxisMax * extentRatio)\n };\n }\n\n function prepareRightYAxis (ranges) {\n var needDomain = _chart.rightY() === undefined || _chart.elasticY(),\n needRange = needDomain || _chart.resizing();\n if (_chart.rightY() === undefined) {\n _chart.rightY(d3.scale.linear());\n }\n if (needDomain) {\n _chart.rightY().domain([ranges.ryAxisMin, ranges.ryAxisMax]);\n }\n if (needRange) {\n _chart.rightY().rangeRound([_chart.yAxisHeight(), 0]);\n }\n\n _chart.rightY().range([_chart.yAxisHeight(), 0]);\n _chart.rightYAxis(_chart.rightYAxis().scale(_chart.rightY()));\n\n _chart.rightYAxis().orient('right');\n }\n\n function prepareLeftYAxis (ranges) {\n var needDomain = _chart.y() === undefined || _chart.elasticY(),\n needRange = needDomain || _chart.resizing();\n if (_chart.y() === undefined) {\n _chart.y(d3.scale.linear());\n }\n if (needDomain) {\n _chart.y().domain([ranges.lyAxisMin, ranges.lyAxisMax]);\n }\n if (needRange) {\n _chart.y().rangeRound([_chart.yAxisHeight(), 0]);\n }\n\n _chart.y().range([_chart.yAxisHeight(), 0]);\n _chart.yAxis(_chart.yAxis().scale(_chart.y()));\n\n _chart.yAxis().orient('left');\n }\n\n function generateChildG (child, i) {\n child._generateG(_chart.g());\n child.g().attr('class', SUB_CHART_CLASS + ' _' + i);\n }\n\n _chart.plotData = function () {\n for (var i = 0; i < _children.length; ++i) {\n var child = _children[i];\n\n if (!child.g()) {\n generateChildG(child, i);\n }\n\n if (_shareColors) {\n child.colors(_chart.colors());\n }\n\n child.x(_chart.x());\n\n child.xAxis(_chart.xAxis());\n\n if (child.useRightYAxis()) {\n child.y(_chart.rightY());\n child.yAxis(_chart.rightYAxis());\n } else {\n child.y(_chart.y());\n child.yAxis(_chart.yAxis());\n }\n\n child.plotData();\n\n child._activateRenderlets();\n }\n };\n\n /**\n * Get or set whether to draw gridlines from the right y axis. Drawing from the left y axis is the\n * default behavior. This option is only respected when subcharts with both left and right y-axes\n * are present.\n * @method useRightAxisGridLines\n * @memberof dc.compositeChart\n * @instance\n * @param {Boolean} [useRightAxisGridLines=false]\n * @returns {Boolean|dc.compositeChart}\n */\n _chart.useRightAxisGridLines = function (useRightAxisGridLines) {\n if (!arguments) {\n return _rightAxisGridLines;\n }\n\n _rightAxisGridLines = useRightAxisGridLines;\n return _chart;\n };\n\n /**\n * Get or set chart-specific options for all child charts. This is equivalent to calling\n * {@link dc.baseMixin#options .options} on each child chart.\n * @method childOptions\n * @memberof dc.compositeChart\n * @instance\n * @param {Object} [childOptions]\n * @returns {Object|dc.compositeChart}\n */\n _chart.childOptions = function (childOptions) {\n if (!arguments.length) {\n return _childOptions;\n }\n _childOptions = childOptions;\n _children.forEach(function (child) {\n child.options(_childOptions);\n });\n return _chart;\n };\n\n _chart.fadeDeselectedArea = function () {\n for (var i = 0; i < _children.length; ++i) {\n var child = _children[i];\n child.brush(_chart.brush());\n child.fadeDeselectedArea();\n }\n };\n\n /**\n * Set or get the right y axis label.\n * @method rightYAxisLabel\n * @memberof dc.compositeChart\n * @instance\n * @param {String} [rightYAxisLabel]\n * @param {Number} [padding]\n * @returns {String|dc.compositeChart}\n */\n _chart.rightYAxisLabel = function (rightYAxisLabel, padding) {\n if (!arguments.length) {\n return _rightYAxisLabel;\n }\n _rightYAxisLabel = rightYAxisLabel;\n _chart.margins().right -= _rightYAxisLabelPadding;\n _rightYAxisLabelPadding = (padding === undefined) ? DEFAULT_RIGHT_Y_AXIS_LABEL_PADDING : padding;\n _chart.margins().right += _rightYAxisLabelPadding;\n return _chart;\n };\n\n /**\n * Combine the given charts into one single composite coordinate grid chart.\n * @method compose\n * @memberof dc.compositeChart\n * @instance\n * @example\n * moveChart.compose([\n * // when creating sub-chart you need to pass in the parent chart\n * dc.lineChart(moveChart)\n * .group(indexAvgByMonthGroup) // if group is missing then parent's group will be used\n * .valueAccessor(function (d){return d.value.avg;})\n * // most of the normal functions will continue to work in a composed chart\n * .renderArea(true)\n * .stack(monthlyMoveGroup, function (d){return d.value;})\n * .title(function (d){\n * var value = d.value.avg?d.value.avg:d.value;\n * if(isNaN(value)) value = 0;\n * return dateFormat(d.key) + '\\n' + numberFormat(value);\n * }),\n * dc.barChart(moveChart)\n * .group(volumeByMonthGroup)\n * .centerBar(true)\n * ]);\n * @param {Array<Chart>} [subChartArray]\n * @returns {dc.compositeChart}\n */\n _chart.compose = function (subChartArray) {\n _children = subChartArray;\n _children.forEach(function (child) {\n child.height(_chart.height());\n child.width(_chart.width());\n child.margins(_chart.margins());\n\n if (_shareTitle) {\n child.title(_chart.title());\n }\n\n child.options(_childOptions);\n });\n return _chart;\n };\n\n /**\n * Returns the child charts which are composed into the composite chart.\n * @method children\n * @memberof dc.compositeChart\n * @instance\n * @returns {Array<dc.baseMixin>}\n */\n _chart.children = function () {\n return _children;\n };\n\n /**\n * Get or set color sharing for the chart. If set, the {@link dc.colorMixin#colors .colors()} value from this chart\n * will be shared with composed children. Additionally if the child chart implements\n * Stackable and has not set a custom .colorAccessor, then it will generate a color\n * specific to its order in the composition.\n * @method shareColors\n * @memberof dc.compositeChart\n * @instance\n * @param {Boolean} [shareColors=false]\n * @returns {Boolean|dc.compositeChart}\n */\n _chart.shareColors = function (shareColors) {\n if (!arguments.length) {\n return _shareColors;\n }\n _shareColors = shareColors;\n return _chart;\n };\n\n /**\n * Get or set title sharing for the chart. If set, the {@link dc.baseMixin#title .title()} value from\n * this chart will be shared with composed children.\n * @method shareTitle\n * @memberof dc.compositeChart\n * @instance\n * @param {Boolean} [shareTitle=true]\n * @returns {Boolean|dc.compositeChart}\n */\n _chart.shareTitle = function (shareTitle) {\n if (!arguments.length) {\n return _shareTitle;\n }\n _shareTitle = shareTitle;\n return _chart;\n };\n\n /**\n * Get or set the y scale for the right axis. The right y scale is typically automatically\n * generated by the chart implementation.\n * @method rightY\n * @memberof dc.compositeChart\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Scales.md d3.scale}\n * @param {d3.scale} [yScale]\n * @returns {d3.scale|dc.compositeChart}\n */\n _chart.rightY = function (yScale) {\n if (!arguments.length) {\n return _rightY;\n }\n _rightY = yScale;\n _chart.rescale();\n return _chart;\n };\n\n /**\n * Get or set alignment between left and right y axes. A line connecting '0' on both y axis\n * will be parallel to x axis. This only has effect when {@link #dc.coordinateGridMixin+elasticY elasticY} is true.\n * @method alignYAxes\n * @memberof dc.compositeChart\n * @instance\n * @param {Boolean} [alignYAxes=false]\n * @returns {Chart}\n */\n _chart.alignYAxes = function (alignYAxes) {\n if (!arguments.length) {\n return _alignYAxes;\n }\n _alignYAxes = alignYAxes;\n _chart.rescale();\n return _chart;\n };\n\n function leftYAxisChildren () {\n return _children.filter(function (child) {\n return !child.useRightYAxis();\n });\n }\n\n function rightYAxisChildren () {\n return _children.filter(function (child) {\n return child.useRightYAxis();\n });\n }\n\n function getYAxisMin (charts) {\n return charts.map(function (c) {\n return c.yAxisMin();\n });\n }\n\n delete _chart.yAxisMin;\n function yAxisMin () {\n return d3.min(getYAxisMin(leftYAxisChildren()));\n }\n\n function rightYAxisMin () {\n return d3.min(getYAxisMin(rightYAxisChildren()));\n }\n\n function getYAxisMax (charts) {\n return charts.map(function (c) {\n return c.yAxisMax();\n });\n }\n\n delete _chart.yAxisMax;\n function yAxisMax () {\n return dc.utils.add(d3.max(getYAxisMax(leftYAxisChildren())), _chart.yAxisPadding());\n }\n\n function rightYAxisMax () {\n return dc.utils.add(d3.max(getYAxisMax(rightYAxisChildren())), _chart.yAxisPadding());\n }\n\n function getAllXAxisMinFromChildCharts () {\n return _children.map(function (c) {\n return c.xAxisMin();\n });\n }\n\n dc.override(_chart, 'xAxisMin', function () {\n return dc.utils.subtract(d3.min(getAllXAxisMinFromChildCharts()), _chart.xAxisPadding());\n });\n\n function getAllXAxisMaxFromChildCharts () {\n return _children.map(function (c) {\n return c.xAxisMax();\n });\n }\n\n dc.override(_chart, 'xAxisMax', function () {\n return dc.utils.add(d3.max(getAllXAxisMaxFromChildCharts()), _chart.xAxisPadding());\n });\n\n _chart.legendables = function () {\n return _children.reduce(function (items, child) {\n if (_shareColors) {\n child.colors(_chart.colors());\n }\n items.push.apply(items, child.legendables());\n return items;\n }, []);\n };\n\n _chart.legendHighlight = function (d) {\n for (var j = 0; j < _children.length; ++j) {\n var child = _children[j];\n child.legendHighlight(d);\n }\n };\n\n _chart.legendReset = function (d) {\n for (var j = 0; j < _children.length; ++j) {\n var child = _children[j];\n child.legendReset(d);\n }\n };\n\n _chart.legendToggle = function () {\n console.log('composite should not be getting legendToggle itself');\n };\n\n /**\n * Set or get the right y axis used by the composite chart. This function is most useful when y\n * axis customization is required. The y axis in dc.js is an instance of a [d3 axis\n * object](https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Axes.md#axis) therefore it supports any valid\n * d3 axis manipulation.\n *\n * **Caution**: The y axis is usually generated internally by dc; resetting it may cause\n * unexpected results.\n * @method rightYAxis\n * @memberof dc.compositeChart\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Axes.md#axis d3.svg.axis}\n * @example\n * // customize y axis tick format\n * chart.rightYAxis().tickFormat(function (v) {return v + '%';});\n * // customize y axis tick values\n * chart.rightYAxis().tickValues([0, 100, 200, 300]);\n * @param {d3.svg.axis} [rightYAxis]\n * @returns {d3.svg.axis|dc.compositeChart}\n */\n _chart.rightYAxis = function (rightYAxis) {\n if (!arguments.length) {\n return _rightYAxis;\n }\n _rightYAxis = rightYAxis;\n return _chart;\n };\n\n return _chart.anchor(parent, chartGroup);\n};\n","/**\n * A series chart is a chart that shows multiple series of data overlaid on one chart, where the\n * series is specified in the data. It is a specialization of Composite Chart and inherits all\n * composite features other than recomposing the chart.\n *\n * Examples:\n * - {@link http://dc-js.github.io/dc.js/examples/series.html Series Chart}\n * @class seriesChart\n * @memberof dc\n * @mixes dc.compositeChart\n * @example\n * // create a series chart under #chart-container1 element using the default global chart group\n * var seriesChart1 = dc.seriesChart(\"#chart-container1\");\n * // create a series chart under #chart-container2 element using chart group A\n * var seriesChart2 = dc.seriesChart(\"#chart-container2\", \"chartGroupA\");\n * @param {String|node|d3.selection} parent - Any valid\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying\n * a dom block element such as a div; or a dom element or d3 selection.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {dc.seriesChart}\n */\ndc.seriesChart = function (parent, chartGroup) {\n var _chart = dc.compositeChart(parent, chartGroup);\n\n function keySort (a, b) {\n return d3.ascending(_chart.keyAccessor()(a), _chart.keyAccessor()(b));\n }\n\n var _charts = {};\n var _chartFunction = dc.lineChart;\n var _seriesAccessor;\n var _seriesSort = d3.ascending;\n var _valueSort = keySort;\n\n _chart._mandatoryAttributes().push('seriesAccessor', 'chart');\n _chart.shareColors(true);\n\n _chart._preprocessData = function () {\n var keep = [];\n var childrenChanged;\n var nester = d3.nest().key(_seriesAccessor);\n if (_seriesSort) {\n nester.sortKeys(_seriesSort);\n }\n if (_valueSort) {\n nester.sortValues(_valueSort);\n }\n var nesting = nester.entries(_chart.data());\n var children =\n nesting.map(function (sub, i) {\n var subChart = _charts[sub.key] || _chartFunction.call(_chart, _chart, chartGroup, sub.key, i);\n if (!_charts[sub.key]) {\n childrenChanged = true;\n }\n _charts[sub.key] = subChart;\n keep.push(sub.key);\n return subChart\n .dimension(_chart.dimension())\n .group({all: d3.functor(sub.values)}, sub.key)\n .keyAccessor(_chart.keyAccessor())\n .valueAccessor(_chart.valueAccessor())\n .brushOn(_chart.brushOn());\n });\n // this works around the fact compositeChart doesn't really\n // have a removal interface\n Object.keys(_charts)\n .filter(function (c) {return keep.indexOf(c) === -1;})\n .forEach(function (c) {\n clearChart(c);\n childrenChanged = true;\n });\n _chart._compose(children);\n if (childrenChanged && _chart.legend()) {\n _chart.legend().render();\n }\n };\n\n function clearChart (c) {\n if (_charts[c].g()) {\n _charts[c].g().remove();\n }\n delete _charts[c];\n }\n\n function resetChildren () {\n Object.keys(_charts).map(clearChart);\n _charts = {};\n }\n\n /**\n * Get or set the chart function, which generates the child charts.\n * @method chart\n * @memberof dc.seriesChart\n * @instance\n * @example\n * // put interpolation on the line charts used for the series\n * chart.chart(function(c) { return dc.lineChart(c).interpolate('basis'); })\n * // do a scatter series chart\n * chart.chart(dc.scatterPlot)\n * @param {Function} [chartFunction=dc.lineChart]\n * @returns {Function|dc.seriesChart}\n */\n _chart.chart = function (chartFunction) {\n if (!arguments.length) {\n return _chartFunction;\n }\n _chartFunction = chartFunction;\n resetChildren();\n return _chart;\n };\n\n /**\n * **mandatory**\n *\n * Get or set accessor function for the displayed series. Given a datum, this function\n * should return the series that datum belongs to.\n * @method seriesAccessor\n * @memberof dc.seriesChart\n * @instance\n * @example\n * // simple series accessor\n * chart.seriesAccessor(function(d) { return \"Expt: \" + d.key[0]; })\n * @param {Function} [accessor]\n * @returns {Function|dc.seriesChart}\n */\n _chart.seriesAccessor = function (accessor) {\n if (!arguments.length) {\n return _seriesAccessor;\n }\n _seriesAccessor = accessor;\n resetChildren();\n return _chart;\n };\n\n /**\n * Get or set a function to sort the list of series by, given series values.\n * @method seriesSort\n * @memberof dc.seriesChart\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Arrays.md#d3_ascending d3.ascending}\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Arrays.md#d3_descending d3.descending}\n * @example\n * chart.seriesSort(d3.descending);\n * @param {Function} [sortFunction=d3.ascending]\n * @returns {Function|dc.seriesChart}\n */\n _chart.seriesSort = function (sortFunction) {\n if (!arguments.length) {\n return _seriesSort;\n }\n _seriesSort = sortFunction;\n resetChildren();\n return _chart;\n };\n\n /**\n * Get or set a function to sort each series values by. By default this is the key accessor which,\n * for example, will ensure a lineChart series connects its points in increasing key/x order,\n * rather than haphazardly.\n * @method valueSort\n * @memberof dc.seriesChart\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Arrays.md#d3_ascending d3.ascending}\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Arrays.md#d3_descending d3.descending}\n * @example\n * // Default value sort\n * _chart.valueSort(function keySort (a, b) {\n * return d3.ascending(_chart.keyAccessor()(a), _chart.keyAccessor()(b));\n * });\n * @param {Function} [sortFunction]\n * @returns {Function|dc.seriesChart}\n */\n _chart.valueSort = function (sortFunction) {\n if (!arguments.length) {\n return _valueSort;\n }\n _valueSort = sortFunction;\n resetChildren();\n return _chart;\n };\n\n // make compose private\n _chart._compose = _chart.compose;\n delete _chart.compose;\n\n return _chart;\n};\n","/**\n * The geo choropleth chart is designed as an easy way to create a crossfilter driven choropleth map\n * from GeoJson data. This chart implementation was inspired by\n * {@link http://bl.ocks.org/4060606 the great d3 choropleth example}.\n *\n * Examples:\n * - {@link http://dc-js.github.com/dc.js/vc/index.html US Venture Capital Landscape 2011}\n * @class geoChoroplethChart\n * @memberof dc\n * @mixes dc.colorMixin\n * @mixes dc.baseMixin\n * @example\n * // create a choropleth chart under '#us-chart' element using the default global chart group\n * var chart1 = dc.geoChoroplethChart('#us-chart');\n * // create a choropleth chart under '#us-chart2' element using chart group A\n * var chart2 = dc.compositeChart('#us-chart2', 'chartGroupA');\n * @param {String|node|d3.selection} parent - Any valid\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying\n * a dom block element such as a div; or a dom element or d3 selection.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {dc.geoChoroplethChart}\n */\ndc.geoChoroplethChart = function (parent, chartGroup) {\n var _chart = dc.colorMixin(dc.baseMixin({}));\n\n _chart.colorAccessor(function (d) {\n return d || 0;\n });\n\n var _geoPath = d3.geo.path();\n var _projectionFlag;\n\n var _geoJsons = [];\n\n _chart._doRender = function () {\n _chart.resetSvg();\n for (var layerIndex = 0; layerIndex < _geoJsons.length; ++layerIndex) {\n var states = _chart.svg().append('g')\n .attr('class', 'layer' + layerIndex);\n\n var regionG = states.selectAll('g.' + geoJson(layerIndex).name)\n .data(geoJson(layerIndex).data)\n .enter()\n .append('g')\n .attr('class', geoJson(layerIndex).name);\n\n regionG\n .append('path')\n .attr('fill', 'white')\n .attr('d', _geoPath);\n\n regionG.append('title');\n\n plotData(layerIndex);\n }\n _projectionFlag = false;\n };\n\n function plotData (layerIndex) {\n var data = generateLayeredData();\n\n if (isDataLayer(layerIndex)) {\n var regionG = renderRegionG(layerIndex);\n\n renderPaths(regionG, layerIndex, data);\n\n renderTitle(regionG, layerIndex, data);\n }\n }\n\n function generateLayeredData () {\n var data = {};\n var groupAll = _chart.data();\n for (var i = 0; i < groupAll.length; ++i) {\n data[_chart.keyAccessor()(groupAll[i])] = _chart.valueAccessor()(groupAll[i]);\n }\n return data;\n }\n\n function isDataLayer (layerIndex) {\n return geoJson(layerIndex).keyAccessor;\n }\n\n function renderRegionG (layerIndex) {\n var regionG = _chart.svg()\n .selectAll(layerSelector(layerIndex))\n .classed('selected', function (d) {\n return isSelected(layerIndex, d);\n })\n .classed('deselected', function (d) {\n return isDeselected(layerIndex, d);\n })\n .attr('class', function (d) {\n var layerNameClass = geoJson(layerIndex).name;\n var regionClass = dc.utils.nameToId(geoJson(layerIndex).keyAccessor(d));\n var baseClasses = layerNameClass + ' ' + regionClass;\n if (isSelected(layerIndex, d)) {\n baseClasses += ' selected';\n }\n if (isDeselected(layerIndex, d)) {\n baseClasses += ' deselected';\n }\n return baseClasses;\n });\n return regionG;\n }\n\n function layerSelector (layerIndex) {\n return 'g.layer' + layerIndex + ' g.' + geoJson(layerIndex).name;\n }\n\n function isSelected (layerIndex, d) {\n return _chart.hasFilter() && _chart.hasFilter(getKey(layerIndex, d));\n }\n\n function isDeselected (layerIndex, d) {\n return _chart.hasFilter() && !_chart.hasFilter(getKey(layerIndex, d));\n }\n\n function getKey (layerIndex, d) {\n return geoJson(layerIndex).keyAccessor(d);\n }\n\n function geoJson (index) {\n return _geoJsons[index];\n }\n\n function renderPaths (regionG, layerIndex, data) {\n var paths = regionG\n .select('path')\n .attr('fill', function () {\n var currentFill = d3.select(this).attr('fill');\n if (currentFill) {\n return currentFill;\n }\n return 'none';\n })\n .on('click', function (d) {\n return _chart.onClick(d, layerIndex);\n });\n\n dc.transition(paths, _chart.transitionDuration(), _chart.transitionDelay()).attr('fill', function (d, i) {\n return _chart.getColor(data[geoJson(layerIndex).keyAccessor(d)], i);\n });\n }\n\n _chart.onClick = function (d, layerIndex) {\n var selectedRegion = geoJson(layerIndex).keyAccessor(d);\n dc.events.trigger(function () {\n _chart.filter(selectedRegion);\n _chart.redrawGroup();\n });\n };\n\n function renderTitle (regionG, layerIndex, data) {\n if (_chart.renderTitle()) {\n regionG.selectAll('title').text(function (d) {\n var key = getKey(layerIndex, d);\n var value = data[key];\n return _chart.title()({key: key, value: value});\n });\n }\n }\n\n _chart._doRedraw = function () {\n for (var layerIndex = 0; layerIndex < _geoJsons.length; ++layerIndex) {\n plotData(layerIndex);\n if (_projectionFlag) {\n _chart.svg().selectAll('g.' + geoJson(layerIndex).name + ' path').attr('d', _geoPath);\n }\n }\n _projectionFlag = false;\n };\n\n /**\n * **mandatory**\n *\n * Use this function to insert a new GeoJson map layer. This function can be invoked multiple times\n * if you have multiple GeoJson data layers to render on top of each other. If you overlay multiple\n * layers with the same name the new overlay will override the existing one.\n * @method overlayGeoJson\n * @memberof dc.geoChoroplethChart\n * @instance\n * @see {@link http://geojson.org/ GeoJSON}\n * @see {@link https://github.com/topojson/topojson/wiki TopoJSON}\n * @see {@link https://github.com/topojson/topojson-1.x-api-reference/blob/master/API-Reference.md#wiki-feature topojson.feature}\n * @example\n * // insert a layer for rendering US states\n * chart.overlayGeoJson(statesJson.features, 'state', function(d) {\n * return d.properties.name;\n * });\n * @param {geoJson} json - a geojson feed\n * @param {String} name - name of the layer\n * @param {Function} keyAccessor - accessor function used to extract 'key' from the GeoJson data. The key extracted by\n * this function should match the keys returned by the crossfilter groups.\n * @returns {dc.geoChoroplethChart}\n */\n _chart.overlayGeoJson = function (json, name, keyAccessor) {\n for (var i = 0; i < _geoJsons.length; ++i) {\n if (_geoJsons[i].name === name) {\n _geoJsons[i].data = json;\n _geoJsons[i].keyAccessor = keyAccessor;\n return _chart;\n }\n }\n _geoJsons.push({name: name, data: json, keyAccessor: keyAccessor});\n return _chart;\n };\n\n /**\n * Set custom geo projection function. See the available\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Geo-Projections.md d3 geo projection functions}.\n * @method projection\n * @memberof dc.geoChoroplethChart\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Geo-Projections.md d3.geo.projection}\n * @see {@link https://github.com/d3/d3-geo-projection Extended d3.geo.projection}\n * @param {d3.projection} [projection=d3.geo.albersUsa()]\n * @returns {dc.geoChoroplethChart}\n */\n _chart.projection = function (projection) {\n _geoPath.projection(projection);\n _projectionFlag = true;\n return _chart;\n };\n\n /**\n * Returns all GeoJson layers currently registered with this chart. The returned array is a\n * reference to this chart's internal data structure, so any modification to this array will also\n * modify this chart's internal registration.\n * @method geoJsons\n * @memberof dc.geoChoroplethChart\n * @instance\n * @returns {Array<{name:String, data: Object, accessor: Function}>}\n */\n _chart.geoJsons = function () {\n return _geoJsons;\n };\n\n /**\n * Returns the {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Geo-Paths.md#path d3.geo.path} object used to\n * render the projection and features. Can be useful for figuring out the bounding box of the\n * feature set and thus a way to calculate scale and translation for the projection.\n * @method geoPath\n * @memberof dc.geoChoroplethChart\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Geo-Paths.md#path d3.geo.path}\n * @returns {d3.geo.path}\n */\n _chart.geoPath = function () {\n return _geoPath;\n };\n\n /**\n * Remove a GeoJson layer from this chart by name\n * @method removeGeoJson\n * @memberof dc.geoChoroplethChart\n * @instance\n * @param {String} name\n * @returns {dc.geoChoroplethChart}\n */\n _chart.removeGeoJson = function (name) {\n var geoJsons = [];\n\n for (var i = 0; i < _geoJsons.length; ++i) {\n var layer = _geoJsons[i];\n if (layer.name !== name) {\n geoJsons.push(layer);\n }\n }\n\n _geoJsons = geoJsons;\n\n return _chart;\n };\n\n return _chart.anchor(parent, chartGroup);\n};\n","/**\n * The bubble overlay chart is quite different from the typical bubble chart. With the bubble overlay\n * chart you can arbitrarily place bubbles on an existing svg or bitmap image, thus changing the\n * typical x and y positioning while retaining the capability to visualize data using bubble radius\n * and coloring.\n *\n * Examples:\n * - {@link http://dc-js.github.com/dc.js/crime/index.html Canadian City Crime Stats}\n * @class bubbleOverlay\n * @memberof dc\n * @mixes dc.bubbleMixin\n * @mixes dc.baseMixin\n * @example\n * // create a bubble overlay chart on top of the '#chart-container1 svg' element using the default global chart group\n * var bubbleChart1 = dc.bubbleOverlayChart('#chart-container1').svg(d3.select('#chart-container1 svg'));\n * // create a bubble overlay chart on top of the '#chart-container2 svg' element using chart group A\n * var bubbleChart2 = dc.compositeChart('#chart-container2', 'chartGroupA').svg(d3.select('#chart-container2 svg'));\n * @param {String|node|d3.selection} parent - Any valid\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying\n * a dom block element such as a div; or a dom element or d3 selection.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {dc.bubbleOverlay}\n */\ndc.bubbleOverlay = function (parent, chartGroup) {\n var BUBBLE_OVERLAY_CLASS = 'bubble-overlay';\n var BUBBLE_NODE_CLASS = 'node';\n var BUBBLE_CLASS = 'bubble';\n\n /**\n * **mandatory**\n *\n * Set the underlying svg image element. Unlike other dc charts this chart will not generate a svg\n * element; therefore the bubble overlay chart will not work if this function is not invoked. If the\n * underlying image is a bitmap, then an empty svg will need to be created on top of the image.\n * @method svg\n * @memberof dc.bubbleOverlay\n * @instance\n * @example\n * // set up underlying svg element\n * chart.svg(d3.select('#chart svg'));\n * @param {SVGElement|d3.selection} [imageElement]\n * @returns {dc.bubbleOverlay}\n */\n var _chart = dc.bubbleMixin(dc.baseMixin({}));\n var _g;\n var _points = [];\n\n _chart.transitionDuration(750);\n\n _chart.transitionDelay(0);\n\n _chart.radiusValueAccessor(function (d) {\n return d.value;\n });\n\n /**\n * **mandatory**\n *\n * Set up a data point on the overlay. The name of a data point should match a specific 'key' among\n * data groups generated using keyAccessor. If a match is found (point name <-> data group key)\n * then a bubble will be generated at the position specified by the function. x and y\n * value specified here are relative to the underlying svg.\n * @method point\n * @memberof dc.bubbleOverlay\n * @instance\n * @param {String} name\n * @param {Number} x\n * @param {Number} y\n * @returns {dc.bubbleOverlay}\n */\n _chart.point = function (name, x, y) {\n _points.push({name: name, x: x, y: y});\n return _chart;\n };\n\n _chart._doRender = function () {\n _g = initOverlayG();\n\n _chart.r().range([_chart.MIN_RADIUS, _chart.width() * _chart.maxBubbleRelativeSize()]);\n\n initializeBubbles();\n\n _chart.fadeDeselectedArea();\n\n return _chart;\n };\n\n function initOverlayG () {\n _g = _chart.select('g.' + BUBBLE_OVERLAY_CLASS);\n if (_g.empty()) {\n _g = _chart.svg().append('g').attr('class', BUBBLE_OVERLAY_CLASS);\n }\n return _g;\n }\n\n function initializeBubbles () {\n var data = mapData();\n _chart.calculateRadiusDomain();\n\n _points.forEach(function (point) {\n var nodeG = getNodeG(point, data);\n\n var circle = nodeG.select('circle.' + BUBBLE_CLASS);\n\n if (circle.empty()) {\n circle = nodeG.append('circle')\n .attr('class', BUBBLE_CLASS)\n .attr('r', 0)\n .attr('fill', _chart.getColor)\n .on('click', _chart.onClick);\n }\n\n dc.transition(circle, _chart.transitionDuration(), _chart.transitionDelay())\n .attr('r', function (d) {\n return _chart.bubbleR(d);\n });\n\n _chart._doRenderLabel(nodeG);\n\n _chart._doRenderTitles(nodeG);\n });\n }\n\n function mapData () {\n var data = {};\n _chart.data().forEach(function (datum) {\n data[_chart.keyAccessor()(datum)] = datum;\n });\n return data;\n }\n\n function getNodeG (point, data) {\n var bubbleNodeClass = BUBBLE_NODE_CLASS + ' ' + dc.utils.nameToId(point.name);\n\n var nodeG = _g.select('g.' + dc.utils.nameToId(point.name));\n\n if (nodeG.empty()) {\n nodeG = _g.append('g')\n .attr('class', bubbleNodeClass)\n .attr('transform', 'translate(' + point.x + ',' + point.y + ')');\n }\n\n nodeG.datum(data[point.name]);\n\n return nodeG;\n }\n\n _chart._doRedraw = function () {\n updateBubbles();\n\n _chart.fadeDeselectedArea();\n\n return _chart;\n };\n\n function updateBubbles () {\n var data = mapData();\n _chart.calculateRadiusDomain();\n\n _points.forEach(function (point) {\n var nodeG = getNodeG(point, data);\n\n var circle = nodeG.select('circle.' + BUBBLE_CLASS);\n\n dc.transition(circle, _chart.transitionDuration(), _chart.transitionDelay())\n .attr('r', function (d) {\n return _chart.bubbleR(d);\n })\n .attr('fill', _chart.getColor);\n\n _chart.doUpdateLabels(nodeG);\n\n _chart.doUpdateTitles(nodeG);\n });\n }\n\n _chart.debug = function (flag) {\n if (flag) {\n var debugG = _chart.select('g.' + dc.constants.DEBUG_GROUP_CLASS);\n\n if (debugG.empty()) {\n debugG = _chart.svg()\n .append('g')\n .attr('class', dc.constants.DEBUG_GROUP_CLASS);\n }\n\n var debugText = debugG.append('text')\n .attr('x', 10)\n .attr('y', 20);\n\n debugG\n .append('rect')\n .attr('width', _chart.width())\n .attr('height', _chart.height())\n .on('mousemove', function () {\n var position = d3.mouse(debugG.node());\n var msg = position[0] + ', ' + position[1];\n debugText.text(msg);\n });\n } else {\n _chart.selectAll('.debug').remove();\n }\n\n return _chart;\n };\n\n _chart.anchor(parent, chartGroup);\n\n return _chart;\n};\n","/**\n * Concrete row chart implementation.\n *\n * Examples:\n * - {@link http://dc-js.github.com/dc.js/ Nasdaq 100 Index}\n * @class rowChart\n * @memberof dc\n * @mixes dc.capMixin\n * @mixes dc.marginMixin\n * @mixes dc.colorMixin\n * @mixes dc.baseMixin\n * @example\n * // create a row chart under #chart-container1 element using the default global chart group\n * var chart1 = dc.rowChart('#chart-container1');\n * // create a row chart under #chart-container2 element using chart group A\n * var chart2 = dc.rowChart('#chart-container2', 'chartGroupA');\n * @param {String|node|d3.selection} parent - Any valid\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying\n * a dom block element such as a div; or a dom element or d3 selection.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {dc.rowChart}\n */\ndc.rowChart = function (parent, chartGroup) {\n\n var _g;\n\n var _labelOffsetX = 10;\n var _labelOffsetY = 15;\n var _hasLabelOffsetY = false;\n var _dyOffset = '0.35em'; // this helps center labels https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#svg_text\n var _titleLabelOffsetX = 2;\n\n var _gap = 5;\n\n var _fixedBarHeight = false;\n var _rowCssClass = 'row';\n var _titleRowCssClass = 'titlerow';\n var _renderTitleLabel = false;\n\n var _chart = dc.capMixin(dc.marginMixin(dc.colorMixin(dc.baseMixin({}))));\n\n var _x;\n\n var _elasticX;\n\n var _xAxis = d3.svg.axis().orient('bottom');\n\n var _rowData;\n\n _chart.rowsCap = _chart.cap;\n\n function calculateAxisScale () {\n if (!_x || _elasticX) {\n var extent = d3.extent(_rowData, _chart.cappedValueAccessor);\n if (extent[0] > 0) {\n extent[0] = 0;\n }\n if (extent[1] < 0) {\n extent[1] = 0;\n }\n _x = d3.scale.linear().domain(extent)\n .range([0, _chart.effectiveWidth()]);\n }\n _xAxis.scale(_x);\n }\n\n function drawAxis () {\n var axisG = _g.select('g.axis');\n\n calculateAxisScale();\n\n if (axisG.empty()) {\n axisG = _g.append('g').attr('class', 'axis');\n }\n axisG.attr('transform', 'translate(0, ' + _chart.effectiveHeight() + ')');\n\n dc.transition(axisG, _chart.transitionDuration(), _chart.transitionDelay())\n .call(_xAxis);\n }\n\n _chart._doRender = function () {\n _chart.resetSvg();\n\n _g = _chart.svg()\n .append('g')\n .attr('transform', 'translate(' + _chart.margins().left + ',' + _chart.margins().top + ')');\n\n drawChart();\n\n return _chart;\n };\n\n _chart.title(function (d) {\n return _chart.cappedKeyAccessor(d) + ': ' + _chart.cappedValueAccessor(d);\n });\n\n _chart.label(_chart.cappedKeyAccessor);\n\n /**\n * Gets or sets the x scale. The x scale can be any d3\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Quantitative-Scales.md quantitive scale}.\n * @method x\n * @memberof dc.rowChart\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Quantitative-Scales.md quantitive scale}\n * @param {d3.scale} [scale]\n * @returns {d3.scale|dc.rowChart}\n */\n _chart.x = function (scale) {\n if (!arguments.length) {\n return _x;\n }\n _x = scale;\n return _chart;\n };\n\n function drawGridLines () {\n _g.selectAll('g.tick')\n .select('line.grid-line')\n .remove();\n\n _g.selectAll('g.tick')\n .append('line')\n .attr('class', 'grid-line')\n .attr('x1', 0)\n .attr('y1', 0)\n .attr('x2', 0)\n .attr('y2', function () {\n return -_chart.effectiveHeight();\n });\n }\n\n function drawChart () {\n _rowData = _chart.data();\n\n drawAxis();\n drawGridLines();\n\n var rows = _g.selectAll('g.' + _rowCssClass)\n .data(_rowData);\n\n createElements(rows);\n removeElements(rows);\n updateElements(rows);\n }\n\n function createElements (rows) {\n var rowEnter = rows.enter()\n .append('g')\n .attr('class', function (d, i) {\n return _rowCssClass + ' _' + i;\n });\n\n rowEnter.append('rect').attr('width', 0);\n\n createLabels(rowEnter);\n }\n\n function removeElements (rows) {\n rows.exit().remove();\n }\n\n function rootValue () {\n var root = _x(0);\n return (root === -Infinity || root !== root) ? _x(1) : root;\n }\n\n function updateElements (rows) {\n var n = _rowData.length;\n\n var height;\n if (!_fixedBarHeight) {\n height = (_chart.effectiveHeight() - (n + 1) * _gap) / n;\n } else {\n height = _fixedBarHeight;\n }\n\n // vertically align label in center unless they override the value via property setter\n if (!_hasLabelOffsetY) {\n _labelOffsetY = height / 2;\n }\n\n var rect = rows.attr('transform', function (d, i) {\n return 'translate(0,' + ((i + 1) * _gap + i * height) + ')';\n }).select('rect')\n .attr('height', height)\n .attr('fill', _chart.getColor)\n .on('click', onClick)\n .classed('deselected', function (d) {\n return (_chart.hasFilter()) ? !isSelectedRow(d) : false;\n })\n .classed('selected', function (d) {\n return (_chart.hasFilter()) ? isSelectedRow(d) : false;\n });\n\n dc.transition(rect, _chart.transitionDuration(), _chart.transitionDelay())\n .attr('width', function (d) {\n return Math.abs(rootValue() - _x(_chart.valueAccessor()(d)));\n })\n .attr('transform', translateX);\n\n createTitles(rows);\n updateLabels(rows);\n }\n\n function createTitles (rows) {\n if (_chart.renderTitle()) {\n rows.select('title').remove();\n rows.append('title').text(_chart.title());\n }\n }\n\n function createLabels (rowEnter) {\n if (_chart.renderLabel()) {\n rowEnter.append('text')\n .on('click', onClick);\n }\n if (_chart.renderTitleLabel()) {\n rowEnter.append('text')\n .attr('class', _titleRowCssClass)\n .on('click', onClick);\n }\n }\n\n function updateLabels (rows) {\n if (_chart.renderLabel()) {\n var lab = rows.select('text')\n .attr('x', _labelOffsetX)\n .attr('y', _labelOffsetY)\n .attr('dy', _dyOffset)\n .on('click', onClick)\n .attr('class', function (d, i) {\n return _rowCssClass + ' _' + i;\n })\n .text(function (d) {\n return _chart.label()(d);\n });\n dc.transition(lab, _chart.transitionDuration(), _chart.transitionDelay())\n .attr('transform', translateX);\n }\n if (_chart.renderTitleLabel()) {\n var titlelab = rows.select('.' + _titleRowCssClass)\n .attr('x', _chart.effectiveWidth() - _titleLabelOffsetX)\n .attr('y', _labelOffsetY)\n .attr('dy', _dyOffset)\n .attr('text-anchor', 'end')\n .on('click', onClick)\n .attr('class', function (d, i) {\n return _titleRowCssClass + ' _' + i ;\n })\n .text(function (d) {\n return _chart.title()(d);\n });\n dc.transition(titlelab, _chart.transitionDuration(), _chart.transitionDelay())\n .attr('transform', translateX);\n }\n }\n\n /**\n * Turn on/off Title label rendering (values) using SVG style of text-anchor 'end'.\n * @method renderTitleLabel\n * @memberof dc.rowChart\n * @instance\n * @param {Boolean} [renderTitleLabel=false]\n * @returns {Boolean|dc.rowChart}\n */\n _chart.renderTitleLabel = function (renderTitleLabel) {\n if (!arguments.length) {\n return _renderTitleLabel;\n }\n _renderTitleLabel = renderTitleLabel;\n return _chart;\n };\n\n function onClick (d) {\n _chart.onClick(d);\n }\n\n function translateX (d) {\n var x = _x(_chart.cappedValueAccessor(d)),\n x0 = rootValue(),\n s = x > x0 ? x0 : x;\n return 'translate(' + s + ',0)';\n }\n\n _chart._doRedraw = function () {\n drawChart();\n return _chart;\n };\n\n /**\n * Get the x axis for the row chart instance. Note: not settable for row charts.\n * See the {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Axes.md#axis d3 axis object}\n * documention for more information.\n * @method xAxis\n * @memberof dc.rowChart\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Axes.md#axis d3.svg.axis}\n * @example\n * // customize x axis tick format\n * chart.xAxis().tickFormat(function (v) {return v + '%';});\n * // customize x axis tick values\n * chart.xAxis().tickValues([0, 100, 200, 300]);\n * @returns {d3.svg.axis}\n */\n _chart.xAxis = function () {\n return _xAxis;\n };\n\n /**\n * Get or set the fixed bar height. Default is [false] which will auto-scale bars.\n * For example, if you want to fix the height for a specific number of bars (useful in TopN charts)\n * you could fix height as follows (where count = total number of bars in your TopN and gap is\n * your vertical gap space).\n * @method fixedBarHeight\n * @memberof dc.rowChart\n * @instance\n * @example\n * chart.fixedBarHeight( chartheight - (count + 1) * gap / count);\n * @param {Boolean|Number} [fixedBarHeight=false]\n * @returns {Boolean|Number|dc.rowChart}\n */\n _chart.fixedBarHeight = function (fixedBarHeight) {\n if (!arguments.length) {\n return _fixedBarHeight;\n }\n _fixedBarHeight = fixedBarHeight;\n return _chart;\n };\n\n /**\n * Get or set the vertical gap space between rows on a particular row chart instance.\n * @method gap\n * @memberof dc.rowChart\n * @instance\n * @param {Number} [gap=5]\n * @returns {Number|dc.rowChart}\n */\n _chart.gap = function (gap) {\n if (!arguments.length) {\n return _gap;\n }\n _gap = gap;\n return _chart;\n };\n\n /**\n * Get or set the elasticity on x axis. If this attribute is set to true, then the x axis will rescle to auto-fit the\n * data range when filtered.\n * @method elasticX\n * @memberof dc.rowChart\n * @instance\n * @param {Boolean} [elasticX]\n * @returns {Boolean|dc.rowChart}\n */\n _chart.elasticX = function (elasticX) {\n if (!arguments.length) {\n return _elasticX;\n }\n _elasticX = elasticX;\n return _chart;\n };\n\n /**\n * Get or set the x offset (horizontal space to the top left corner of a row) for labels on a particular row chart.\n * @method labelOffsetX\n * @memberof dc.rowChart\n * @instance\n * @param {Number} [labelOffsetX=10]\n * @returns {Number|dc.rowChart}\n */\n _chart.labelOffsetX = function (labelOffsetX) {\n if (!arguments.length) {\n return _labelOffsetX;\n }\n _labelOffsetX = labelOffsetX;\n return _chart;\n };\n\n /**\n * Get or set the y offset (vertical space to the top left corner of a row) for labels on a particular row chart.\n * @method labelOffsetY\n * @memberof dc.rowChart\n * @instance\n * @param {Number} [labelOffsety=15]\n * @returns {Number|dc.rowChart}\n */\n _chart.labelOffsetY = function (labelOffsety) {\n if (!arguments.length) {\n return _labelOffsetY;\n }\n _labelOffsetY = labelOffsety;\n _hasLabelOffsetY = true;\n return _chart;\n };\n\n /**\n * Get of set the x offset (horizontal space between right edge of row and right edge or text.\n * @method titleLabelOffsetX\n * @memberof dc.rowChart\n * @instance\n * @param {Number} [titleLabelOffsetX=2]\n * @returns {Number|dc.rowChart}\n */\n _chart.titleLabelOffsetX = function (titleLabelOffsetX) {\n if (!arguments.length) {\n return _titleLabelOffsetX;\n }\n _titleLabelOffsetX = titleLabelOffsetX;\n return _chart;\n };\n\n function isSelectedRow (d) {\n return _chart.hasFilter(_chart.cappedKeyAccessor(d));\n }\n\n return _chart.anchor(parent, chartGroup);\n};\n","/**\n * Legend is a attachable widget that can be added to other dc charts to render horizontal legend\n * labels.\n *\n * Examples:\n * - {@link http://dc-js.github.com/dc.js/ Nasdaq 100 Index}\n * - {@link http://dc-js.github.com/dc.js/crime/index.html Canadian City Crime Stats}\n * @class legend\n * @memberof dc\n * @example\n * chart.legend(dc.legend().x(400).y(10).itemHeight(13).gap(5))\n * @returns {dc.legend}\n */\ndc.legend = function () {\n var LABEL_GAP = 2;\n\n var _legend = {},\n _parent,\n _x = 0,\n _y = 0,\n _itemHeight = 12,\n _gap = 5,\n _horizontal = false,\n _legendWidth = 560,\n _itemWidth = 70,\n _autoItemWidth = false,\n _legendText = dc.pluck('name'),\n _maxItems;\n\n var _g;\n\n _legend.parent = function (p) {\n if (!arguments.length) {\n return _parent;\n }\n _parent = p;\n return _legend;\n };\n\n _legend.render = function () {\n _parent.svg().select('g.dc-legend').remove();\n _g = _parent.svg().append('g')\n .attr('class', 'dc-legend')\n .attr('transform', 'translate(' + _x + ',' + _y + ')');\n var legendables = _parent.legendables();\n\n if (_maxItems !== undefined) {\n legendables = legendables.slice(0, _maxItems);\n }\n\n var itemEnter = _g.selectAll('g.dc-legend-item')\n .data(legendables)\n .enter()\n .append('g')\n .attr('class', 'dc-legend-item')\n .on('mouseover', function (d) {\n _parent.legendHighlight(d);\n })\n .on('mouseout', function (d) {\n _parent.legendReset(d);\n })\n .on('click', function (d) {\n d.chart.legendToggle(d);\n });\n\n _g.selectAll('g.dc-legend-item')\n .classed('fadeout', function (d) {\n return d.chart.isLegendableHidden(d);\n });\n\n if (legendables.some(dc.pluck('dashstyle'))) {\n itemEnter\n .append('line')\n .attr('x1', 0)\n .attr('y1', _itemHeight / 2)\n .attr('x2', _itemHeight)\n .attr('y2', _itemHeight / 2)\n .attr('stroke-width', 2)\n .attr('stroke-dasharray', dc.pluck('dashstyle'))\n .attr('stroke', dc.pluck('color'));\n } else {\n itemEnter\n .append('rect')\n .attr('width', _itemHeight)\n .attr('height', _itemHeight)\n .attr('fill', function (d) {return d ? d.color : 'blue';});\n }\n\n itemEnter.append('text')\n .text(_legendText)\n .attr('x', _itemHeight + LABEL_GAP)\n .attr('y', function () {\n return _itemHeight / 2 + (this.clientHeight ? this.clientHeight : 13) / 2 - 2;\n });\n\n var _cumulativeLegendTextWidth = 0;\n var row = 0;\n itemEnter.attr('transform', function (d, i) {\n if (_horizontal) {\n var itemWidth = _autoItemWidth === true ? this.getBBox().width + _gap : _itemWidth;\n if ((_cumulativeLegendTextWidth + itemWidth) > _legendWidth && _cumulativeLegendTextWidth > 0) {\n ++row;\n _cumulativeLegendTextWidth = 0;\n }\n var translateBy = 'translate(' + _cumulativeLegendTextWidth + ',' + row * legendItemHeight() + ')';\n _cumulativeLegendTextWidth += itemWidth;\n return translateBy;\n } else {\n return 'translate(0,' + i * legendItemHeight() + ')';\n }\n });\n };\n\n function legendItemHeight () {\n return _gap + _itemHeight;\n }\n\n /**\n * Set or get x coordinate for legend widget.\n * @method x\n * @memberof dc.legend\n * @instance\n * @param {Number} [x=0]\n * @returns {Number|dc.legend}\n */\n _legend.x = function (x) {\n if (!arguments.length) {\n return _x;\n }\n _x = x;\n return _legend;\n };\n\n /**\n * Set or get y coordinate for legend widget.\n * @method y\n * @memberof dc.legend\n * @instance\n * @param {Number} [y=0]\n * @returns {Number|dc.legend}\n */\n _legend.y = function (y) {\n if (!arguments.length) {\n return _y;\n }\n _y = y;\n return _legend;\n };\n\n /**\n * Set or get gap between legend items.\n * @method gap\n * @memberof dc.legend\n * @instance\n * @param {Number} [gap=5]\n * @returns {Number|dc.legend}\n */\n _legend.gap = function (gap) {\n if (!arguments.length) {\n return _gap;\n }\n _gap = gap;\n return _legend;\n };\n\n /**\n * Set or get legend item height.\n * @method itemHeight\n * @memberof dc.legend\n * @instance\n * @param {Number} [itemHeight=12]\n * @returns {Number|dc.legend}\n */\n _legend.itemHeight = function (itemHeight) {\n if (!arguments.length) {\n return _itemHeight;\n }\n _itemHeight = itemHeight;\n return _legend;\n };\n\n /**\n * Position legend horizontally instead of vertically.\n * @method horizontal\n * @memberof dc.legend\n * @instance\n * @param {Boolean} [horizontal=false]\n * @returns {Boolean|dc.legend}\n */\n _legend.horizontal = function (horizontal) {\n if (!arguments.length) {\n return _horizontal;\n }\n _horizontal = horizontal;\n return _legend;\n };\n\n /**\n * Maximum width for horizontal legend.\n * @method legendWidth\n * @memberof dc.legend\n * @instance\n * @param {Number} [legendWidth=500]\n * @returns {Number|dc.legend}\n */\n _legend.legendWidth = function (legendWidth) {\n if (!arguments.length) {\n return _legendWidth;\n }\n _legendWidth = legendWidth;\n return _legend;\n };\n\n /**\n * Legend item width for horizontal legend.\n * @method itemWidth\n * @memberof dc.legend\n * @instance\n * @param {Number} [itemWidth=70]\n * @returns {Number|dc.legend}\n */\n _legend.itemWidth = function (itemWidth) {\n if (!arguments.length) {\n return _itemWidth;\n }\n _itemWidth = itemWidth;\n return _legend;\n };\n\n /**\n * Turn automatic width for legend items on or off. If true, {@link dc.legend#itemWidth itemWidth} is ignored.\n * This setting takes into account the {@link dc.legend#gap gap}.\n * @method autoItemWidth\n * @memberof dc.legend\n * @instance\n * @param {Boolean} [autoItemWidth=false]\n * @returns {Boolean|dc.legend}\n */\n _legend.autoItemWidth = function (autoItemWidth) {\n if (!arguments.length) {\n return _autoItemWidth;\n }\n _autoItemWidth = autoItemWidth;\n return _legend;\n };\n\n /**\n * Set or get the legend text function. The legend widget uses this function to render the legend\n * text for each item. If no function is specified the legend widget will display the names\n * associated with each group.\n * @method legendText\n * @memberof dc.legend\n * @instance\n * @param {Function} [legendText]\n * @returns {Function|dc.legend}\n * @example\n * // default legendText\n * legend.legendText(dc.pluck('name'))\n *\n * // create numbered legend items\n * chart.legend(dc.legend().legendText(function(d, i) { return i + '. ' + d.name; }))\n *\n * // create legend displaying group counts\n * chart.legend(dc.legend().legendText(function(d) { return d.name + ': ' d.data; }))\n **/\n _legend.legendText = function (legendText) {\n if (!arguments.length) {\n return _legendText;\n }\n _legendText = legendText;\n return _legend;\n };\n\n /**\n * Maximum number of legend items to display\n * @method maxItems\n * @memberof dc.legend\n * @instance\n * @param {Number} [maxItems]\n * @return {dc.legend}\n */\n _legend.maxItems = function (maxItems) {\n if (!arguments.length) {\n return _maxItems;\n }\n _maxItems = dc.utils.isNumber(maxItems) ? maxItems : undefined;\n return _legend;\n };\n\n return _legend;\n};\n","/**\n * A scatter plot chart\n *\n * Examples:\n * - {@link http://dc-js.github.io/dc.js/examples/scatter.html Scatter Chart}\n * - {@link http://dc-js.github.io/dc.js/examples/multi-scatter.html Multi-Scatter Chart}\n * @class scatterPlot\n * @memberof dc\n * @mixes dc.coordinateGridMixin\n * @example\n * // create a scatter plot under #chart-container1 element using the default global chart group\n * var chart1 = dc.scatterPlot('#chart-container1');\n * // create a scatter plot under #chart-container2 element using chart group A\n * var chart2 = dc.scatterPlot('#chart-container2', 'chartGroupA');\n * // create a sub-chart under a composite parent chart\n * var chart3 = dc.scatterPlot(compositeChart);\n * @param {String|node|d3.selection} parent - Any valid\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying\n * a dom block element such as a div; or a dom element or d3 selection.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {dc.scatterPlot}\n */\ndc.scatterPlot = function (parent, chartGroup) {\n var _chart = dc.coordinateGridMixin({});\n var _symbol = d3.svg.symbol();\n\n var _existenceAccessor = function (d) { return d.value; };\n\n var originalKeyAccessor = _chart.keyAccessor();\n _chart.keyAccessor(function (d) { return originalKeyAccessor(d)[0]; });\n _chart.valueAccessor(function (d) { return originalKeyAccessor(d)[1]; });\n _chart.colorAccessor(function () { return _chart._groupName; });\n\n _chart.title(function (d) {\n // this basically just counteracts the setting of its own key/value accessors\n // see https://github.com/dc-js/dc.js/issues/702\n return _chart.keyAccessor()(d) + ',' + _chart.valueAccessor()(d) + ': ' +\n _chart.existenceAccessor()(d);\n });\n\n var _locator = function (d) {\n return 'translate(' + _chart.x()(_chart.keyAccessor()(d)) + ',' +\n _chart.y()(_chart.valueAccessor()(d)) + ')';\n };\n\n var _highlightedSize = 7;\n var _symbolSize = 5;\n var _excludedSize = 3;\n var _excludedColor = null;\n var _excludedOpacity = 1.0;\n var _emptySize = 0;\n var _emptyOpacity = 0;\n var _nonemptyOpacity = 1;\n var _emptyColor = null;\n var _filtered = [];\n\n function elementSize (d, i) {\n if (!_existenceAccessor(d)) {\n return Math.pow(_emptySize, 2);\n } else if (_filtered[i]) {\n return Math.pow(_symbolSize, 2);\n } else {\n return Math.pow(_excludedSize, 2);\n }\n }\n _symbol.size(elementSize);\n\n dc.override(_chart, '_filter', function (filter) {\n if (!arguments.length) {\n return _chart.__filter();\n }\n\n return _chart.__filter(dc.filters.RangedTwoDimensionalFilter(filter));\n });\n\n _chart.plotData = function () {\n var symbols = _chart.chartBodyG().selectAll('path.symbol')\n .data(_chart.data());\n\n symbols\n .enter()\n .append('path')\n .attr('class', 'symbol')\n .attr('opacity', 0)\n .attr('fill', _chart.getColor)\n .attr('transform', _locator);\n\n symbols.call(renderTitles, _chart.data());\n\n symbols.each(function (d, i) {\n _filtered[i] = !_chart.filter() || _chart.filter().isFiltered([d.key[0], d.key[1]]);\n });\n\n dc.transition(symbols, _chart.transitionDuration(), _chart.transitionDelay())\n .attr('opacity', function (d, i) {\n if (!_existenceAccessor(d)) {\n return _emptyOpacity;\n } else if (_filtered[i]) {\n return _nonemptyOpacity;\n } else {\n return _chart.excludedOpacity();\n }\n })\n .attr('fill', function (d, i) {\n if (_emptyColor && !_existenceAccessor(d)) {\n return _emptyColor;\n } else if (_chart.excludedColor() && !_filtered[i]) {\n return _chart.excludedColor();\n } else {\n return _chart.getColor(d);\n }\n })\n .attr('transform', _locator)\n .attr('d', _symbol);\n\n dc.transition(symbols.exit(), _chart.transitionDuration(), _chart.transitionDelay())\n .attr('opacity', 0).remove();\n };\n\n function renderTitles (symbol, d) {\n if (_chart.renderTitle()) {\n symbol.selectAll('title').remove();\n symbol.append('title').text(function (d) {\n return _chart.title()(d);\n });\n }\n }\n\n /**\n * Get or set the existence accessor. If a point exists, it is drawn with\n * {@link dc.scatterPlot#symbolSize symbolSize} radius and\n * opacity 1; if it does not exist, it is drawn with\n * {@link dc.scatterPlot#emptySize emptySize} radius and opacity 0. By default,\n * the existence accessor checks if the reduced value is truthy.\n * @method existenceAccessor\n * @memberof dc.scatterPlot\n * @instance\n * @see {@link dc.scatterPlot#symbolSize symbolSize}\n * @see {@link dc.scatterPlot#emptySize emptySize}\n * @example\n * // default accessor\n * chart.existenceAccessor(function (d) { return d.value; });\n * @param {Function} [accessor]\n * @returns {Function|dc.scatterPlot}\n */\n _chart.existenceAccessor = function (accessor) {\n if (!arguments.length) {\n return _existenceAccessor;\n }\n _existenceAccessor = accessor;\n return this;\n };\n\n /**\n * Get or set the symbol type used for each point. By default the symbol is a circle.\n * Type can be a constant or an accessor.\n * @method symbol\n * @memberof dc.scatterPlot\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#symbol_type d3.svg.symbol.type}\n * @example\n * // Circle type\n * chart.symbol('circle');\n * // Square type\n * chart.symbol('square');\n * @param {String|Function} [type='circle']\n * @returns {String|Function|dc.scatterPlot}\n */\n _chart.symbol = function (type) {\n if (!arguments.length) {\n return _symbol.type();\n }\n _symbol.type(type);\n return _chart;\n };\n\n /**\n * Get or set the symbol generator. By default `dc.scatterPlot` will use\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#symbol d3.svg.symbol()}\n * to generate symbols. `dc.scatterPlot` will set the\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#symbol_size size accessor}\n * on the symbol generator.\n * @method customSymbol\n * @memberof dc.scatterPlot\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#symbol d3.svg.symbol}\n * @see {@link https://stackoverflow.com/questions/25332120/create-additional-d3-js-symbols Create additional D3.js symbols}\n * @param {String|Function} [customSymbol=d3.svg.symbol()]\n * @returns {String|Function|dc.scatterPlot}\n */\n _chart.customSymbol = function (customSymbol) {\n if (!arguments.length) {\n return _symbol;\n }\n _symbol = customSymbol;\n _symbol.size(elementSize);\n return _chart;\n };\n\n /**\n * Set or get radius for symbols.\n * @method symbolSize\n * @memberof dc.scatterPlot\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#symbol_size d3.svg.symbol.size}\n * @param {Number} [symbolSize=3]\n * @returns {Number|dc.scatterPlot}\n */\n _chart.symbolSize = function (symbolSize) {\n if (!arguments.length) {\n return _symbolSize;\n }\n _symbolSize = symbolSize;\n return _chart;\n };\n\n /**\n * Set or get radius for highlighted symbols.\n * @method highlightedSize\n * @memberof dc.scatterPlot\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#symbol_size d3.svg.symbol.size}\n * @param {Number} [highlightedSize=5]\n * @returns {Number|dc.scatterPlot}\n */\n _chart.highlightedSize = function (highlightedSize) {\n if (!arguments.length) {\n return _highlightedSize;\n }\n _highlightedSize = highlightedSize;\n return _chart;\n };\n\n /**\n * Set or get size for symbols excluded from this chart's filter. If null, no\n * special size is applied for symbols based on their filter status.\n * @method excludedSize\n * @memberof dc.scatterPlot\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#symbol_size d3.svg.symbol.size}\n * @param {Number} [excludedSize=null]\n * @returns {Number|dc.scatterPlot}\n */\n _chart.excludedSize = function (excludedSize) {\n if (!arguments.length) {\n return _excludedSize;\n }\n _excludedSize = excludedSize;\n return _chart;\n };\n\n /**\n * Set or get color for symbols excluded from this chart's filter. If null, no\n * special color is applied for symbols based on their filter status.\n * @method excludedColor\n * @memberof dc.scatterPlot\n * @instance\n * @param {Number} [excludedColor=null]\n * @returns {Number|dc.scatterPlot}\n */\n _chart.excludedColor = function (excludedColor) {\n if (!arguments.length) {\n return _excludedColor;\n }\n _excludedColor = excludedColor;\n return _chart;\n };\n\n /**\n * Set or get opacity for symbols excluded from this chart's filter.\n * @method excludedOpacity\n * @memberof dc.scatterPlot\n * @instance\n * @param {Number} [excludedOpacity=1.0]\n * @returns {Number|dc.scatterPlot}\n */\n _chart.excludedOpacity = function (excludedOpacity) {\n if (!arguments.length) {\n return _excludedOpacity;\n }\n _excludedOpacity = excludedOpacity;\n return _chart;\n };\n\n /**\n * Set or get radius for symbols when the group is empty.\n * @method emptySize\n * @memberof dc.scatterPlot\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/SVG-Shapes.md#symbol_size d3.svg.symbol.size}\n * @param {Number} [emptySize=0]\n * @returns {Number|dc.scatterPlot}\n */\n _chart.hiddenSize = _chart.emptySize = function (emptySize) {\n if (!arguments.length) {\n return _emptySize;\n }\n _emptySize = emptySize;\n return _chart;\n };\n\n /**\n * Set or get color for symbols when the group is empty. If null, just use the\n * {@link dc.colorMixin#colors colorMixin.colors} color scale zero value.\n * @name emptyColor\n * @memberof dc.scatterPlot\n * @instance\n * @param {String} [emptyColor=null]\n * @return {String}\n * @return {dc.scatterPlot}/\n */\n _chart.emptyColor = function (emptyColor) {\n if (!arguments.length) {\n return _emptyColor;\n }\n _emptyColor = emptyColor;\n return _chart;\n };\n\n /**\n * Set or get opacity for symbols when the group is empty.\n * @name emptyOpacity\n * @memberof dc.scatterPlot\n * @instance\n * @param {Number} [emptyOpacity=0]\n * @return {Number}\n * @return {dc.scatterPlot}\n */\n _chart.emptyOpacity = function (emptyOpacity) {\n if (!arguments.length) {\n return _emptyOpacity;\n }\n _emptyOpacity = emptyOpacity;\n return _chart;\n };\n\n /**\n * Set or get opacity for symbols when the group is not empty.\n * @name nonemptyOpacity\n * @memberof dc.scatterPlot\n * @instance\n * @param {Number} [nonemptyOpacity=1]\n * @return {Number}\n * @return {dc.scatterPlot}\n */\n _chart.nonemptyOpacity = function (nonemptyOpacity) {\n if (!arguments.length) {\n return _emptyOpacity;\n }\n _nonemptyOpacity = nonemptyOpacity;\n return _chart;\n };\n\n _chart.legendables = function () {\n return [{chart: _chart, name: _chart._groupName, color: _chart.getColor()}];\n };\n\n _chart.legendHighlight = function (d) {\n resizeSymbolsWhere(function (symbol) {\n return symbol.attr('fill') === d.color;\n }, _highlightedSize);\n _chart.chartBodyG().selectAll('.chart-body path.symbol').filter(function () {\n return d3.select(this).attr('fill') !== d.color;\n }).classed('fadeout', true);\n };\n\n _chart.legendReset = function (d) {\n resizeSymbolsWhere(function (symbol) {\n return symbol.attr('fill') === d.color;\n }, _symbolSize);\n _chart.chartBodyG().selectAll('.chart-body path.symbol').filter(function () {\n return d3.select(this).attr('fill') !== d.color;\n }).classed('fadeout', false);\n };\n\n function resizeSymbolsWhere (condition, size) {\n var symbols = _chart.chartBodyG().selectAll('.chart-body path.symbol').filter(function () {\n return condition(d3.select(this));\n });\n var oldSize = _symbol.size();\n _symbol.size(Math.pow(size, 2));\n dc.transition(symbols, _chart.transitionDuration(), _chart.transitionDelay()).attr('d', _symbol);\n _symbol.size(oldSize);\n }\n\n _chart.setHandlePaths = function () {\n // no handle paths for poly-brushes\n };\n\n _chart.extendBrush = function () {\n var extent = _chart.brush().extent();\n if (_chart.round()) {\n extent[0] = extent[0].map(_chart.round());\n extent[1] = extent[1].map(_chart.round());\n\n _chart.g().select('.brush')\n .call(_chart.brush().extent(extent));\n }\n return extent;\n };\n\n _chart.brushIsEmpty = function (extent) {\n return _chart.brush().empty() || !extent || extent[0][0] >= extent[1][0] || extent[0][1] >= extent[1][1];\n };\n\n _chart._brushing = function () {\n var extent = _chart.extendBrush();\n\n _chart.redrawBrush(_chart.g());\n\n if (_chart.brushIsEmpty(extent)) {\n dc.events.trigger(function () {\n _chart.filter(null);\n _chart.redrawGroup();\n });\n\n } else {\n var ranged2DFilter = dc.filters.RangedTwoDimensionalFilter(extent);\n dc.events.trigger(function () {\n _chart.filter(null);\n _chart.filter(ranged2DFilter);\n _chart.redrawGroup();\n }, dc.constants.EVENT_DELAY);\n\n }\n };\n\n _chart.setBrushY = function (gBrush) {\n gBrush.call(_chart.brush().y(_chart.y()));\n };\n\n return _chart.anchor(parent, chartGroup);\n};\n","/**\n * A display of a single numeric value.\n * Unlike other charts, you do not need to set a dimension. Instead a group object must be provided and\n * a valueAccessor that returns a single value.\n * @class numberDisplay\n * @memberof dc\n * @mixes dc.baseMixin\n * @example\n * // create a number display under #chart-container1 element using the default global chart group\n * var display1 = dc.numberDisplay('#chart-container1');\n * @param {String|node|d3.selection} parent - Any valid\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying\n * a dom block element such as a div; or a dom element or d3 selection.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {dc.numberDisplay}\n */\ndc.numberDisplay = function (parent, chartGroup) {\n var SPAN_CLASS = 'number-display';\n var _formatNumber = d3.format('.2s');\n var _chart = dc.baseMixin({});\n var _html = {one: '', some: '', none: ''};\n var _lastValue;\n\n // dimension not required\n _chart._mandatoryAttributes(['group']);\n\n // default to ordering by value, to emulate old group.top(1) behavior when multiple groups\n _chart.ordering(function (kv) { return kv.value; });\n\n /**\n * Gets or sets an optional object specifying HTML templates to use depending on the number\n * displayed. The text `%number` will be replaced with the current value.\n * - one: HTML template to use if the number is 1\n * - zero: HTML template to use if the number is 0\n * - some: HTML template to use otherwise\n * @method html\n * @memberof dc.numberDisplay\n * @instance\n * @example\n * numberWidget.html({\n * one:'%number record',\n * some:'%number records',\n * none:'no records'})\n * @param {{one:String, some:String, none:String}} [html={one: '', some: '', none: ''}]\n * @returns {{one:String, some:String, none:String}|dc.numberDisplay}\n */\n _chart.html = function (html) {\n if (!arguments.length) {\n return _html;\n }\n if (html.none) {\n _html.none = html.none;//if none available\n } else if (html.one) {\n _html.none = html.one;//if none not available use one\n } else if (html.some) {\n _html.none = html.some;//if none and one not available use some\n }\n if (html.one) {\n _html.one = html.one;//if one available\n } else if (html.some) {\n _html.one = html.some;//if one not available use some\n }\n if (html.some) {\n _html.some = html.some;//if some available\n } else if (html.one) {\n _html.some = html.one;//if some not available use one\n }\n return _chart;\n };\n\n /**\n * Calculate and return the underlying value of the display.\n * @method value\n * @memberof dc.numberDisplay\n * @instance\n * @returns {Number}\n */\n _chart.value = function () {\n return _chart.data();\n };\n\n function maxBin (all) {\n if (!all.length) {\n return null;\n }\n var sorted = _chart._computeOrderedGroups(all);\n return sorted[sorted.length - 1];\n }\n _chart.data(function (group) {\n var valObj = group.value ? group.value() : maxBin(group.all());\n return _chart.valueAccessor()(valObj);\n });\n\n _chart.transitionDuration(250); // good default\n _chart.transitionDelay(0);\n\n _chart._doRender = function () {\n var newValue = _chart.value(),\n span = _chart.selectAll('.' + SPAN_CLASS);\n\n if (span.empty()) {\n span = span.data([0])\n .enter()\n .append('span')\n .attr('class', SPAN_CLASS);\n }\n\n span.transition()\n .duration(_chart.transitionDuration())\n .delay(_chart.transitionDelay())\n .ease('quad-out-in')\n .tween('text', function () {\n // [XA] don't try and interpolate from Infinity, else this breaks.\n var interpStart = isFinite(_lastValue) ? _lastValue : 0;\n var interp = d3.interpolateNumber(interpStart || 0, newValue);\n _lastValue = newValue;\n return function (t) {\n var html = null, num = _chart.formatNumber()(interp(t));\n if (newValue === 0 && (_html.none !== '')) {\n html = _html.none;\n } else if (newValue === 1 && (_html.one !== '')) {\n html = _html.one;\n } else if (_html.some !== '') {\n html = _html.some;\n }\n this.innerHTML = html ? html.replace('%number', num) : num;\n };\n });\n };\n\n _chart._doRedraw = function () {\n return _chart._doRender();\n };\n\n /**\n * Get or set a function to format the value for the display.\n * @method formatNumber\n * @memberof dc.numberDisplay\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md d3.format}\n * @param {Function} [formatter=d3.format('.2s')]\n * @returns {Function|dc.numberDisplay}\n */\n _chart.formatNumber = function (formatter) {\n if (!arguments.length) {\n return _formatNumber;\n }\n _formatNumber = formatter;\n return _chart;\n };\n\n return _chart.anchor(parent, chartGroup);\n};\n","/**\n * A heat map is matrix that represents the values of two dimensions of data using colors.\n * @class heatMap\n * @memberof dc\n * @mixes dc.colorMixin\n * @mixes dc.marginMixin\n * @mixes dc.baseMixin\n * @example\n * // create a heat map under #chart-container1 element using the default global chart group\n * var heatMap1 = dc.heatMap('#chart-container1');\n * // create a heat map under #chart-container2 element using chart group A\n * var heatMap2 = dc.heatMap('#chart-container2', 'chartGroupA');\n * @param {String|node|d3.selection} parent - Any valid\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying\n * a dom block element such as a div; or a dom element or d3 selection.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {dc.heatMap}\n */\ndc.heatMap = function (parent, chartGroup) {\n\n var DEFAULT_BORDER_RADIUS = 6.75;\n\n var _chartBody;\n\n var _cols;\n var _rows;\n var _colOrdering = d3.ascending;\n var _rowOrdering = d3.ascending;\n var _colScale = d3.scale.ordinal();\n var _rowScale = d3.scale.ordinal();\n\n var _xBorderRadius = DEFAULT_BORDER_RADIUS;\n var _yBorderRadius = DEFAULT_BORDER_RADIUS;\n\n var _chart = dc.colorMixin(dc.marginMixin(dc.baseMixin({})));\n _chart._mandatoryAttributes(['group']);\n _chart.title(_chart.colorAccessor());\n\n var _colsLabel = function (d) {\n return d;\n };\n var _rowsLabel = function (d) {\n return d;\n };\n\n /**\n * Set or get the column label function. The chart class uses this function to render\n * column labels on the X axis. It is passed the column name.\n * @method colsLabel\n * @memberof dc.heatMap\n * @instance\n * @example\n * // the default label function just returns the name\n * chart.colsLabel(function(d) { return d; });\n * @param {Function} [labelFunction=function(d) { return d; }]\n * @returns {Function|dc.heatMap}\n */\n _chart.colsLabel = function (labelFunction) {\n if (!arguments.length) {\n return _colsLabel;\n }\n _colsLabel = labelFunction;\n return _chart;\n };\n\n /**\n * Set or get the row label function. The chart class uses this function to render\n * row labels on the Y axis. It is passed the row name.\n * @method rowsLabel\n * @memberof dc.heatMap\n * @instance\n * @example\n * // the default label function just returns the name\n * chart.rowsLabel(function(d) { return d; });\n * @param {Function} [labelFunction=function(d) { return d; }]\n * @returns {Function|dc.heatMap}\n */\n _chart.rowsLabel = function (labelFunction) {\n if (!arguments.length) {\n return _rowsLabel;\n }\n _rowsLabel = labelFunction;\n return _chart;\n };\n\n var _xAxisOnClick = function (d) { filterAxis(0, d); };\n var _yAxisOnClick = function (d) { filterAxis(1, d); };\n var _boxOnClick = function (d) {\n var filter = d.key;\n dc.events.trigger(function () {\n _chart.filter(filter);\n _chart.redrawGroup();\n });\n };\n\n function filterAxis (axis, value) {\n var cellsOnAxis = _chart.selectAll('.box-group').filter(function (d) {\n return d.key[axis] === value;\n });\n var unfilteredCellsOnAxis = cellsOnAxis.filter(function (d) {\n return !_chart.hasFilter(d.key);\n });\n dc.events.trigger(function () {\n var selection = unfilteredCellsOnAxis.empty() ? cellsOnAxis : unfilteredCellsOnAxis;\n var filters = selection.data().map(function (kv) {\n return dc.filters.TwoDimensionalFilter(kv.key);\n });\n _chart._filter([filters]);\n _chart.redrawGroup();\n });\n }\n\n dc.override(_chart, 'filter', function (filter) {\n if (!arguments.length) {\n return _chart._filter();\n }\n\n return _chart._filter(dc.filters.TwoDimensionalFilter(filter));\n });\n\n /**\n * Gets or sets the values used to create the rows of the heatmap, as an array. By default, all\n * the values will be fetched from the data using the value accessor.\n * @method rows\n * @memberof dc.heatMap\n * @instance\n * @param {Array<String|Number>} [rows]\n * @returns {Array<String|Number>|dc.heatMap}\n */\n\n _chart.rows = function (rows) {\n if (!arguments.length) {\n return _rows;\n }\n _rows = rows;\n return _chart;\n };\n\n /**\n #### .rowOrdering([orderFunction])\n Get or set an accessor to order the rows. Default is d3.ascending.\n */\n _chart.rowOrdering = function (_) {\n if (!arguments.length) {\n return _rowOrdering;\n }\n _rowOrdering = _;\n return _chart;\n };\n\n /**\n * Gets or sets the keys used to create the columns of the heatmap, as an array. By default, all\n * the values will be fetched from the data using the key accessor.\n * @method cols\n * @memberof dc.heatMap\n * @instance\n * @param {Array<String|Number>} [cols]\n * @returns {Array<String|Number>|dc.heatMap}\n */\n _chart.cols = function (cols) {\n if (!arguments.length) {\n return _cols;\n }\n _cols = cols;\n return _chart;\n };\n\n /**\n #### .colOrdering([orderFunction])\n Get or set an accessor to order the cols. Default is ascending.\n */\n _chart.colOrdering = function (_) {\n if (!arguments.length) {\n return _colOrdering;\n }\n _colOrdering = _;\n return _chart;\n };\n\n _chart._doRender = function () {\n _chart.resetSvg();\n\n _chartBody = _chart.svg()\n .append('g')\n .attr('class', 'heatmap')\n .attr('transform', 'translate(' + _chart.margins().left + ',' + _chart.margins().top + ')');\n\n return _chart._doRedraw();\n };\n\n _chart._doRedraw = function () {\n var data = _chart.data(),\n rows = _chart.rows() || data.map(_chart.valueAccessor()),\n cols = _chart.cols() || data.map(_chart.keyAccessor());\n if (_rowOrdering) {\n rows = rows.sort(_rowOrdering);\n }\n if (_colOrdering) {\n cols = cols.sort(_colOrdering);\n }\n rows = _rowScale.domain(rows);\n cols = _colScale.domain(cols);\n\n var rowCount = rows.domain().length,\n colCount = cols.domain().length,\n boxWidth = Math.floor(_chart.effectiveWidth() / colCount),\n boxHeight = Math.floor(_chart.effectiveHeight() / rowCount);\n\n cols.rangeRoundBands([0, _chart.effectiveWidth()]);\n rows.rangeRoundBands([_chart.effectiveHeight(), 0]);\n\n var boxes = _chartBody.selectAll('g.box-group').data(_chart.data(), function (d, i) {\n return _chart.keyAccessor()(d, i) + '\\0' + _chart.valueAccessor()(d, i);\n });\n var gEnter = boxes.enter().append('g')\n .attr('class', 'box-group');\n\n gEnter.append('rect')\n .attr('class', 'heat-box')\n .attr('fill', 'white')\n .on('click', _chart.boxOnClick());\n\n if (_chart.renderTitle()) {\n gEnter.append('title');\n boxes.select('title').text(_chart.title());\n }\n\n dc.transition(boxes.select('rect'), _chart.transitionDuration(), _chart.transitionDelay())\n .attr('x', function (d, i) { return cols(_chart.keyAccessor()(d, i)); })\n .attr('y', function (d, i) { return rows(_chart.valueAccessor()(d, i)); })\n .attr('rx', _xBorderRadius)\n .attr('ry', _yBorderRadius)\n .attr('fill', _chart.getColor)\n .attr('width', boxWidth)\n .attr('height', boxHeight);\n\n boxes.exit().remove();\n\n var gCols = _chartBody.select('g.cols');\n if (gCols.empty()) {\n gCols = _chartBody.append('g').attr('class', 'cols axis');\n }\n var gColsText = gCols.selectAll('text').data(cols.domain());\n gColsText.enter().append('text')\n .attr('x', function (d) { return cols(d) + boxWidth / 2; })\n .style('text-anchor', 'middle')\n .attr('y', _chart.effectiveHeight())\n .attr('dy', 12)\n .on('click', _chart.xAxisOnClick())\n .text(_chart.colsLabel());\n dc.transition(gColsText, _chart.transitionDuration(), _chart.transitionDelay())\n .text(_chart.colsLabel())\n .attr('x', function (d) { return cols(d) + boxWidth / 2; })\n .attr('y', _chart.effectiveHeight());\n gColsText.exit().remove();\n var gRows = _chartBody.select('g.rows');\n if (gRows.empty()) {\n gRows = _chartBody.append('g').attr('class', 'rows axis');\n }\n var gRowsText = gRows.selectAll('text').data(rows.domain());\n gRowsText.enter().append('text')\n .attr('dy', 6)\n .style('text-anchor', 'end')\n .attr('x', 0)\n .attr('dx', -2)\n .on('click', _chart.yAxisOnClick())\n .text(_chart.rowsLabel());\n dc.transition(gRowsText, _chart.transitionDuration(), _chart.transitionDelay())\n .text(_chart.rowsLabel())\n .attr('y', function (d) { return rows(d) + boxHeight / 2; });\n gRowsText.exit().remove();\n\n if (_chart.hasFilter()) {\n _chart.selectAll('g.box-group').each(function (d) {\n if (_chart.isSelectedNode(d)) {\n _chart.highlightSelected(this);\n } else {\n _chart.fadeDeselected(this);\n }\n });\n } else {\n _chart.selectAll('g.box-group').each(function () {\n _chart.resetHighlight(this);\n });\n }\n return _chart;\n };\n\n /**\n * Gets or sets the handler that fires when an individual cell is clicked in the heatmap.\n * By default, filtering of the cell will be toggled.\n * @method boxOnClick\n * @memberof dc.heatMap\n * @instance\n * @example\n * // default box on click handler\n * chart.boxOnClick(function (d) {\n * var filter = d.key;\n * dc.events.trigger(function () {\n * _chart.filter(filter);\n * _chart.redrawGroup();\n * });\n * });\n * @param {Function} [handler]\n * @returns {Function|dc.heatMap}\n */\n _chart.boxOnClick = function (handler) {\n if (!arguments.length) {\n return _boxOnClick;\n }\n _boxOnClick = handler;\n return _chart;\n };\n\n /**\n * Gets or sets the handler that fires when a column tick is clicked in the x axis.\n * By default, if any cells in the column are unselected, the whole column will be selected,\n * otherwise the whole column will be unselected.\n * @method xAxisOnClick\n * @memberof dc.heatMap\n * @instance\n * @param {Function} [handler]\n * @returns {Function|dc.heatMap}\n */\n _chart.xAxisOnClick = function (handler) {\n if (!arguments.length) {\n return _xAxisOnClick;\n }\n _xAxisOnClick = handler;\n return _chart;\n };\n\n /**\n * Gets or sets the handler that fires when a row tick is clicked in the y axis.\n * By default, if any cells in the row are unselected, the whole row will be selected,\n * otherwise the whole row will be unselected.\n * @method yAxisOnClick\n * @memberof dc.heatMap\n * @instance\n * @param {Function} [handler]\n * @returns {Function|dc.heatMap}\n */\n _chart.yAxisOnClick = function (handler) {\n if (!arguments.length) {\n return _yAxisOnClick;\n }\n _yAxisOnClick = handler;\n return _chart;\n };\n\n /**\n * Gets or sets the X border radius. Set to 0 to get full rectangles.\n * @method xBorderRadius\n * @memberof dc.heatMap\n * @instance\n * @param {Number} [xBorderRadius=6.75]\n * @returns {Number|dc.heatMap}\n */\n _chart.xBorderRadius = function (xBorderRadius) {\n if (!arguments.length) {\n return _xBorderRadius;\n }\n _xBorderRadius = xBorderRadius;\n return _chart;\n };\n\n /**\n * Gets or sets the Y border radius. Set to 0 to get full rectangles.\n * @method yBorderRadius\n * @memberof dc.heatMap\n * @instance\n * @param {Number} [yBorderRadius=6.75]\n * @returns {Number|dc.heatMap}\n */\n _chart.yBorderRadius = function (yBorderRadius) {\n if (!arguments.length) {\n return _yBorderRadius;\n }\n _yBorderRadius = yBorderRadius;\n return _chart;\n };\n\n _chart.isSelectedNode = function (d) {\n return _chart.hasFilter(d.key);\n };\n\n return _chart.anchor(parent, chartGroup);\n};\n","// https://github.com/d3/d3-plugins/blob/master/box/box.js\n(function () {\n\n // Inspired by http://informationandvisualization.de/blog/box-plot\n d3.box = function () {\n var width = 1,\n height = 1,\n duration = 0,\n delay = 0,\n domain = null,\n value = Number,\n whiskers = boxWhiskers,\n quartiles = boxQuartiles,\n tickFormat = null;\n\n // For each small multiple…\n function box (g) {\n g.each(function (d, i) {\n d = d.map(value).sort(d3.ascending);\n var g = d3.select(this),\n n = d.length,\n min = d[0],\n max = d[n - 1];\n\n // Compute quartiles. Must return exactly 3 elements.\n var quartileData = d.quartiles = quartiles(d);\n\n // Compute whiskers. Must return exactly 2 elements, or null.\n var whiskerIndices = whiskers && whiskers.call(this, d, i),\n whiskerData = whiskerIndices && whiskerIndices.map(function (i) { return d[i]; });\n\n // Compute outliers. If no whiskers are specified, all data are 'outliers'.\n // We compute the outliers as indices, so that we can join across transitions!\n var outlierIndices = whiskerIndices ?\n d3.range(0, whiskerIndices[0]).concat(d3.range(whiskerIndices[1] + 1, n)) : d3.range(n);\n\n // Compute the new x-scale.\n var x1 = d3.scale.linear()\n .domain(domain && domain.call(this, d, i) || [min, max])\n .range([height, 0]);\n\n // Retrieve the old x-scale, if this is an update.\n var x0 = this.__chart__ || d3.scale.linear()\n .domain([0, Infinity])\n .range(x1.range());\n\n // Stash the new scale.\n this.__chart__ = x1;\n\n // Note: the box, median, and box tick elements are fixed in number,\n // so we only have to handle enter and update. In contrast, the outliers\n // and other elements are variable, so we need to exit them! Variable\n // elements also fade in and out.\n\n // Update center line: the vertical line spanning the whiskers.\n var center = g.selectAll('line.center')\n .data(whiskerData ? [whiskerData] : []);\n\n center.enter().insert('line', 'rect')\n .attr('class', 'center')\n .attr('x1', width / 2)\n .attr('y1', function (d) { return x0(d[0]); })\n .attr('x2', width / 2)\n .attr('y2', function (d) { return x0(d[1]); })\n .style('opacity', 1e-6)\n .transition()\n .duration(duration)\n .delay(delay)\n .style('opacity', 1)\n .attr('y1', function (d) { return x1(d[0]); })\n .attr('y2', function (d) { return x1(d[1]); });\n\n center.transition()\n .duration(duration)\n .delay(delay)\n .style('opacity', 1)\n .attr('x1', width / 2)\n .attr('x2', width / 2)\n .attr('y1', function (d) { return x1(d[0]); })\n .attr('y2', function (d) { return x1(d[1]); });\n\n center.exit().transition()\n .duration(duration)\n .delay(delay)\n .style('opacity', 1e-6)\n .attr('y1', function (d) { return x1(d[0]); })\n .attr('y2', function (d) { return x1(d[1]); })\n .remove();\n\n // Update innerquartile box.\n var box = g.selectAll('rect.box')\n .data([quartileData]);\n\n box.enter().append('rect')\n .attr('class', 'box')\n .attr('x', 0)\n .attr('y', function (d) { return x0(d[2]); })\n .attr('width', width)\n .attr('height', function (d) { return x0(d[0]) - x0(d[2]); })\n .transition()\n .duration(duration)\n .delay(delay)\n .attr('y', function (d) { return x1(d[2]); })\n .attr('height', function (d) { return x1(d[0]) - x1(d[2]); });\n\n box.transition()\n .duration(duration)\n .delay(delay)\n .attr('width', width)\n .attr('y', function (d) { return x1(d[2]); })\n .attr('height', function (d) { return x1(d[0]) - x1(d[2]); });\n\n // Update median line.\n var medianLine = g.selectAll('line.median')\n .data([quartileData[1]]);\n\n medianLine.enter().append('line')\n .attr('class', 'median')\n .attr('x1', 0)\n .attr('y1', x0)\n .attr('x2', width)\n .attr('y2', x0)\n .transition()\n .duration(duration)\n .delay(delay)\n .attr('y1', x1)\n .attr('y2', x1);\n\n medianLine.transition()\n .duration(duration)\n .delay(delay)\n .attr('x1', 0)\n .attr('x2', width)\n .attr('y1', x1)\n .attr('y2', x1);\n\n // Update whiskers.\n var whisker = g.selectAll('line.whisker')\n .data(whiskerData || []);\n\n whisker.enter().insert('line', 'circle, text')\n .attr('class', 'whisker')\n .attr('x1', 0)\n .attr('y1', x0)\n .attr('x2', width)\n .attr('y2', x0)\n .style('opacity', 1e-6)\n .transition()\n .duration(duration)\n .delay(delay)\n .attr('y1', x1)\n .attr('y2', x1)\n .style('opacity', 1);\n\n whisker.transition()\n .duration(duration)\n .delay(delay)\n .attr('x1', 0)\n .attr('x2', width)\n .attr('y1', x1)\n .attr('y2', x1)\n .style('opacity', 1);\n\n whisker.exit().transition()\n .duration(duration)\n .delay(delay)\n .attr('y1', x1)\n .attr('y2', x1)\n .style('opacity', 1e-6)\n .remove();\n\n // Update outliers.\n var outlier = g.selectAll('circle.outlier')\n .data(outlierIndices, Number);\n\n outlier.enter().insert('circle', 'text')\n .attr('class', 'outlier')\n .attr('r', 5)\n .attr('cx', width / 2)\n .attr('cy', function (i) { return x0(d[i]); })\n .style('opacity', 1e-6)\n .transition()\n .duration(duration)\n .delay(delay)\n .attr('cy', function (i) { return x1(d[i]); })\n .style('opacity', 1);\n\n outlier.transition()\n .duration(duration)\n .delay(delay)\n .attr('cx', width / 2)\n .attr('cy', function (i) { return x1(d[i]); })\n .style('opacity', 1);\n\n outlier.exit().transition()\n .duration(duration)\n .delay(delay)\n .attr('cy', function (i) { return x1(d[i]); })\n .style('opacity', 1e-6)\n .remove();\n\n // Compute the tick format.\n var format = tickFormat || x1.tickFormat(8);\n\n // Update box ticks.\n var boxTick = g.selectAll('text.box')\n .data(quartileData);\n\n boxTick.enter().append('text')\n .attr('class', 'box')\n .attr('dy', '.3em')\n .attr('dx', function (d, i) { return i & 1 ? 6 : -6; })\n .attr('x', function (d, i) { return i & 1 ? width : 0; })\n .attr('y', x0)\n .attr('text-anchor', function (d, i) { return i & 1 ? 'start' : 'end'; })\n .text(format)\n .transition()\n .duration(duration)\n .delay(delay)\n .attr('y', x1);\n\n boxTick.transition()\n .duration(duration)\n .delay(delay)\n .text(format)\n .attr('x', function (d, i) { return i & 1 ? width : 0; })\n .attr('y', x1);\n\n // Update whisker ticks. These are handled separately from the box\n // ticks because they may or may not exist, and we want don't want\n // to join box ticks pre-transition with whisker ticks post-.\n var whiskerTick = g.selectAll('text.whisker')\n .data(whiskerData || []);\n\n whiskerTick.enter().append('text')\n .attr('class', 'whisker')\n .attr('dy', '.3em')\n .attr('dx', 6)\n .attr('x', width)\n .attr('y', x0)\n .text(format)\n .style('opacity', 1e-6)\n .transition()\n .duration(duration)\n .delay(delay)\n .attr('y', x1)\n .style('opacity', 1);\n\n whiskerTick.transition()\n .duration(duration)\n .delay(delay)\n .text(format)\n .attr('x', width)\n .attr('y', x1)\n .style('opacity', 1);\n\n whiskerTick.exit().transition()\n .duration(duration)\n .delay(delay)\n .attr('y', x1)\n .style('opacity', 1e-6)\n .remove();\n });\n d3.timer.flush();\n }\n\n box.width = function (x) {\n if (!arguments.length) {\n return width;\n }\n width = x;\n return box;\n };\n\n box.height = function (x) {\n if (!arguments.length) {\n return height;\n }\n height = x;\n return box;\n };\n\n box.tickFormat = function (x) {\n if (!arguments.length) {\n return tickFormat;\n }\n tickFormat = x;\n return box;\n };\n\n box.duration = function (x) {\n if (!arguments.length) {\n return duration;\n }\n duration = x;\n return box;\n };\n\n box.domain = function (x) {\n if (!arguments.length) {\n return domain;\n }\n domain = x === null ? x : d3.functor(x);\n return box;\n };\n\n box.value = function (x) {\n if (!arguments.length) {\n return value;\n }\n value = x;\n return box;\n };\n\n box.whiskers = function (x) {\n if (!arguments.length) {\n return whiskers;\n }\n whiskers = x;\n return box;\n };\n\n box.quartiles = function (x) {\n if (!arguments.length) {\n return quartiles;\n }\n quartiles = x;\n return box;\n };\n\n return box;\n };\n\n function boxWhiskers (d) {\n return [0, d.length - 1];\n }\n\n function boxQuartiles (d) {\n return [\n d3.quantile(d, 0.25),\n d3.quantile(d, 0.5),\n d3.quantile(d, 0.75)\n ];\n }\n\n})();\n","\n/**\n * A box plot is a chart that depicts numerical data via their quartile ranges.\n *\n * Examples:\n * - {@link http://dc-js.github.io/dc.js/examples/box-plot-time.html Box plot time example}\n * - {@link http://dc-js.github.io/dc.js/examples/box-plot.html Box plot example}\n * @class boxPlot\n * @memberof dc\n * @mixes dc.coordinateGridMixin\n * @example\n * // create a box plot under #chart-container1 element using the default global chart group\n * var boxPlot1 = dc.boxPlot('#chart-container1');\n * // create a box plot under #chart-container2 element using chart group A\n * var boxPlot2 = dc.boxPlot('#chart-container2', 'chartGroupA');\n * @param {String|node|d3.selection} parent - Any valid\n * {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#selecting-elements d3 single selector} specifying\n * a dom block element such as a div; or a dom element or d3 selection.\n * @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.\n * Interaction with a chart will only trigger events and redraws within the chart's group.\n * @returns {dc.boxPlot}\n */\ndc.boxPlot = function (parent, chartGroup) {\n var _chart = dc.coordinateGridMixin({});\n\n // Returns a function to compute the interquartile range.\n function DEFAULT_WHISKERS_IQR (k) {\n return function (d) {\n var q1 = d.quartiles[0],\n q3 = d.quartiles[2],\n iqr = (q3 - q1) * k,\n i = -1,\n j = d.length;\n do { ++i; } while (d[i] < q1 - iqr);\n do { --j; } while (d[j] > q3 + iqr);\n return [i, j];\n };\n }\n\n var _whiskerIqrFactor = 1.5;\n var _whiskersIqr = DEFAULT_WHISKERS_IQR;\n var _whiskers = _whiskersIqr(_whiskerIqrFactor);\n\n var _box = d3.box();\n var _tickFormat = null;\n\n var _boxWidth = function (innerChartWidth, xUnits) {\n if (_chart.isOrdinal()) {\n return _chart.x().rangeBand();\n } else {\n return innerChartWidth / (1 + _chart.boxPadding()) / xUnits;\n }\n };\n\n // default padding to handle min/max whisker text\n _chart.yAxisPadding(12);\n\n // default to ordinal\n _chart.x(d3.scale.ordinal());\n _chart.xUnits(dc.units.ordinal);\n\n // valueAccessor should return an array of values that can be coerced into numbers\n // or if data is overloaded for a static array of arrays, it should be `Number`.\n // Empty arrays are not included.\n _chart.data(function (group) {\n return group.all().map(function (d) {\n d.map = function (accessor) { return accessor.call(d, d); };\n return d;\n }).filter(function (d) {\n var values = _chart.valueAccessor()(d);\n return values.length !== 0;\n });\n });\n\n /**\n * Get or set the spacing between boxes as a fraction of box size. Valid values are within 0-1.\n * See the {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Ordinal-Scales.md#ordinal_rangeBands d3 docs}\n * for a visual description of how the padding is applied.\n * @method boxPadding\n * @memberof dc.boxPlot\n * @instance\n * @see {@link https://github.com/d3/d3-3.x-api-reference/blob/master/Ordinal-Scales.md#ordinal_rangeBands d3.scale.ordinal.rangeBands}\n * @param {Number} [padding=0.8]\n * @returns {Number|dc.boxPlot}\n */\n _chart.boxPadding = _chart._rangeBandPadding;\n _chart.boxPadding(0.8);\n\n /**\n * Get or set the outer padding on an ordinal box chart. This setting has no effect on non-ordinal charts\n * or on charts with a custom {@link dc.boxPlot#boxWidth .boxWidth}. Will pad the width by\n * `padding * barWidth` on each side of the chart.\n * @method outerPadding\n * @memberof dc.boxPlot\n * @instance\n * @param {Number} [padding=0.5]\n * @returns {Number|dc.boxPlot}\n */\n _chart.outerPadding = _chart._outerRangeBandPadding;\n _chart.outerPadding(0.5);\n\n /**\n * Get or set the numerical width of the boxplot box. The width may also be a function taking as\n * parameters the chart width excluding the right and left margins, as well as the number of x\n * units.\n * @example\n * // Using numerical parameter\n * chart.boxWidth(10);\n * // Using function\n * chart.boxWidth((innerChartWidth, xUnits) { ... });\n * @method boxWidth\n * @memberof dc.boxPlot\n * @instance\n * @param {Number|Function} [boxWidth=0.5]\n * @returns {Number|Function|dc.boxPlot}\n */\n _chart.boxWidth = function (boxWidth) {\n if (!arguments.length) {\n return _boxWidth;\n }\n _boxWidth = d3.functor(boxWidth);\n return _chart;\n };\n\n var boxTransform = function (d, i) {\n var xOffset = _chart.x()(_chart.keyAccessor()(d, i));\n return 'translate(' + xOffset + ', 0)';\n };\n\n _chart._preprocessData = function () {\n if (_chart.elasticX()) {\n _chart.x().domain([]);\n }\n };\n\n _chart.plotData = function () {\n var _calculatedBoxWidth = _boxWidth(_chart.effectiveWidth(), _chart.xUnitCount());\n\n _box.whiskers(_whiskers)\n .width(_calculatedBoxWidth)\n .height(_chart.effectiveHeight())\n .value(_chart.valueAccessor())\n .domain(_chart.y().domain())\n .duration(_chart.transitionDuration())\n .tickFormat(_tickFormat);\n\n var boxesG = _chart.chartBodyG().selectAll('g.box').data(_chart.data(), _chart.keyAccessor());\n\n renderBoxes(boxesG);\n updateBoxes(boxesG);\n removeBoxes(boxesG);\n\n _chart.fadeDeselectedArea();\n };\n\n function renderBoxes (boxesG) {\n var boxesGEnter = boxesG.enter().append('g');\n\n boxesGEnter\n .attr('class', 'box')\n .attr('transform', boxTransform)\n .call(_box)\n .on('click', function (d) {\n _chart.filter(_chart.keyAccessor()(d));\n _chart.redrawGroup();\n });\n }\n\n function updateBoxes (boxesG) {\n dc.transition(boxesG, _chart.transitionDuration(), _chart.transitionDelay())\n .attr('transform', boxTransform)\n .call(_box)\n .each(function () {\n d3.select(this).select('rect.box').attr('fill', _chart.getColor);\n });\n }\n\n function removeBoxes (boxesG) {\n boxesG.exit().remove().call(_box);\n }\n\n _chart.fadeDeselectedArea = function () {\n if (_chart.hasFilter()) {\n if (_chart.isOrdinal()) {\n _chart.g().selectAll('g.box').each(function (d) {\n if (_chart.isSelectedNode(d)) {\n _chart.highlightSelected(this);\n } else {\n _chart.fadeDeselected(this);\n }\n });\n } else {\n var extent = _chart.brush().extent();\n var start = extent[0];\n var end = extent[1];\n var keyAccessor = _chart.keyAccessor();\n _chart.g().selectAll('g.box').each(function (d) {\n var key = keyAccessor(d);\n if (key < start || key >= end) {\n _chart.fadeDeselected(this);\n } else {\n _chart.highlightSelected(this);\n }\n });\n }\n } else {\n _chart.g().selectAll('g.box').each(function () {\n _chart.resetHighlight(this);\n });\n }\n };\n\n _chart.isSelectedNode = function (d) {\n return _chart.hasFilter(_chart.keyAccessor()(d));\n };\n\n _chart.yAxisMin = function () {\n var min = d3.min(_chart.data(), function (e) {\n return d3.min(_chart.valueAccessor()(e));\n });\n return dc.utils.subtract(min, _chart.yAxisPadding());\n };\n\n _chart.yAxisMax = function () {\n var max = d3.max(_chart.data(), function (e) {\n return d3.max(_chart.valueAccessor()(e));\n });\n return dc.utils.add(max, _chart.yAxisPadding());\n };\n\n /**\n * Set the numerical format of the boxplot median, whiskers and quartile labels. Defaults to\n * integer formatting.\n * @example\n * // format ticks to 2 decimal places\n * chart.tickFormat(d3.format('.2f'));\n * @method tickFormat\n * @memberof dc.boxPlot\n * @instance\n * @param {Function} [tickFormat]\n * @returns {Number|Function|dc.boxPlot}\n */\n _chart.tickFormat = function (tickFormat) {\n if (!arguments.length) {\n return _tickFormat;\n }\n _tickFormat = tickFormat;\n return _chart;\n };\n\n return _chart.anchor(parent, chartGroup);\n};\n","/**\n * The select menu is a simple widget designed to filter a dimension by selecting an option from\n * an HTML `<select/>` menu. The menu can be optionally turned into a multiselect.\n * @class selectMenu\n * @memberof dc\n * @mixes dc.baseMixin\n * @example\n * // create a select menu under #select-container using the default global chart group\n * var select = dc.selectMenu('#select-container')\n * .dimension(states)\n * .group(stateGroup);\n * // the option text can be set via the title() function\n * // by default the option text is '`key`: `value`'\n * select.title(function (d){\n * return 'STATE: ' + d.key;\n * })\n * @param {String|node|d3.selection|dc.compositeChart} parent - Any valid\n * [d3 single selector](https://github.com/mbostock/d3/wiki/Selections#selecting-elements) specifying\n * a dom block element such as a div; or a dom element or d3 selection.\n * @param {String} [chartGroup] - The name of the chart group this widget should be placed in.\n * Interaction with the widget will only trigger events and redraws within its group.\n * @returns {selectMenu}\n **/\ndc.selectMenu = function (parent, chartGroup) {\n var SELECT_CSS_CLASS = 'dc-select-menu';\n var OPTION_CSS_CLASS = 'dc-select-option';\n\n var _chart = dc.baseMixin({});\n\n var _select;\n var _promptText = 'Select all';\n var _multiple = false;\n var _promptValue = null;\n var _numberVisible = null;\n var _order = function (a, b) {\n return _chart.keyAccessor()(a) > _chart.keyAccessor()(b) ?\n 1 : _chart.keyAccessor()(b) > _chart.keyAccessor()(a) ?\n -1 : 0;\n };\n\n var _filterDisplayed = function (d) {\n return _chart.valueAccessor()(d) > 0;\n };\n\n _chart.data(function (group) {\n return group.all().filter(_filterDisplayed);\n });\n\n _chart._doRender = function () {\n _chart.select('select').remove();\n _select = _chart.root().append('select')\n .classed(SELECT_CSS_CLASS, true);\n _select.append('option').text(_promptText).attr('value', '');\n\n _chart._doRedraw();\n return _chart;\n };\n // Fixing IE 11 crash when redrawing the chart\n // see here for list of IE user Agents :\n // http://www.useragentstring.com/pages/useragentstring.php?name=Internet+Explorer\n var ua = window.navigator.userAgent;\n // test for IE 11 but not a lower version (which contains MSIE in UA)\n if (ua.indexOf('Trident/') > 0 && ua.indexOf('MSIE') === -1) {\n _chart.redraw = _chart.render;\n }\n\n _chart._doRedraw = function () {\n setAttributes();\n renderOptions();\n // select the option(s) corresponding to current filter(s)\n if (_chart.hasFilter() && _multiple) {\n _select.selectAll('option')\n .property('selected', function (d) {\n return typeof d !== 'undefined' && _chart.filters().indexOf(String(_chart.keyAccessor()(d))) >= 0;\n });\n } else if (_chart.hasFilter()) {\n _select.property('value', _chart.filter());\n } else {\n _select.property('value', '');\n }\n return _chart;\n };\n\n function renderOptions () {\n var options = _select.selectAll('option.' + OPTION_CSS_CLASS)\n .data(_chart.data(), function (d) { return _chart.keyAccessor()(d); });\n\n options.enter()\n .append('option')\n .classed(OPTION_CSS_CLASS, true)\n .attr('value', function (d) { return _chart.keyAccessor()(d); });\n\n options.text(_chart.title());\n options.exit().remove();\n _select.selectAll('option.' + OPTION_CSS_CLASS).sort(_order);\n\n _select.on('change', onChange);\n return options;\n }\n\n function onChange (d, i) {\n var values;\n var target = d3.event.target;\n if (target.selectedOptions) {\n var selectedOptions = Array.prototype.slice.call(target.selectedOptions);\n values = selectedOptions.map(function (d) {\n return d.value;\n });\n } else { // IE and other browsers do not support selectedOptions\n // adapted from this polyfill: https://gist.github.com/brettz9/4212217\n var options = [].slice.call(d3.event.target.options);\n values = options.filter(function (option) {\n return option.selected;\n }).map(function (option) {\n return option.value;\n });\n }\n // console.log(values);\n // check if only prompt option is selected\n if (values.length === 1 && values[0] === '') {\n values = _promptValue || null;\n } else if (!_multiple && values.length === 1) {\n values = values[0];\n }\n _chart.onChange(values);\n }\n\n _chart.onChange = function (val) {\n if (val && _multiple) {\n _chart.replaceFilter([val]);\n } else if (val) {\n _chart.replaceFilter(val);\n } else {\n _chart.filterAll();\n }\n dc.events.trigger(function () {\n _chart.redrawGroup();\n });\n };\n\n function setAttributes () {\n if (_multiple) {\n _select.attr('multiple', true);\n } else {\n _select.attr('multiple', null);\n }\n if (_numberVisible !== null) {\n _select.attr('size', _numberVisible);\n } else {\n _select.attr('size', null);\n }\n }\n\n /**\n * Get or set the function that controls the ordering of option tags in the\n * select menu. By default options are ordered by the group key in ascending\n * order.\n * @name order\n * @memberof dc.selectMenu\n * @instance\n * @param {Function} [order]\n * @example\n * // order by the group's value\n * chart.order(function (a,b) {\n * return a.value > b.value ? 1 : b.value > a.value ? -1 : 0;\n * });\n **/\n _chart.order = function (order) {\n if (!arguments.length) {\n return _order;\n }\n _order = order;\n return _chart;\n };\n\n /**\n * Get or set the text displayed in the options used to prompt selection.\n * @name promptText\n * @memberof dc.selectMenu\n * @instance\n * @param {String} [promptText='Select all']\n * @example\n * chart.promptText('All states');\n **/\n _chart.promptText = function (_) {\n if (!arguments.length) {\n return _promptText;\n }\n _promptText = _;\n return _chart;\n };\n\n /**\n * Get or set the function that filters option tags prior to display. By default options\n * with a value of < 1 are not displayed.\n * @name filterDisplayed\n * @memberof dc.selectMenu\n * @instance\n * @param {function} [filterDisplayed]\n * @example\n * // display all options override the `filterDisplayed` function:\n * chart.filterDisplayed(function () {\n * return true;\n * });\n **/\n _chart.filterDisplayed = function (filterDisplayed) {\n if (!arguments.length) {\n return _filterDisplayed;\n }\n _filterDisplayed = filterDisplayed;\n return _chart;\n };\n\n /**\n * Controls the type of select menu. Setting it to true converts the underlying\n * HTML tag into a multiple select.\n * @name multiple\n * @memberof dc.selectMenu\n * @instance\n * @param {boolean} [multiple=false]\n * @example\n * chart.multiple(true);\n **/\n _chart.multiple = function (multiple) {\n if (!arguments.length) {\n return _multiple;\n }\n _multiple = multiple;\n\n return _chart;\n };\n\n /**\n * Controls the default value to be used for\n * [dimension.filter](https://github.com/crossfilter/crossfilter/wiki/API-Reference#dimension_filter)\n * when only the prompt value is selected. If `null` (the default), no filtering will occur when\n * just the prompt is selected.\n * @name promptValue\n * @memberof dc.selectMenu\n * @instance\n * @param {?*} [promptValue=null]\n **/\n _chart.promptValue = function (promptValue) {\n if (!arguments.length) {\n return _promptValue;\n }\n _promptValue = promptValue;\n\n return _chart;\n };\n\n /**\n * Controls the number of items to show in the select menu, when `.multiple()` is true. This\n * controls the [`size` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#Attributes) of\n * the `select` element. If `null` (the default), uses the browser's default height.\n * @name numberItems\n * @memberof dc.selectMenu\n * @instance\n * @param {?number} [numberVisible=null]\n * @example\n * chart.numberVisible(10);\n **/\n _chart.numberVisible = function (numberVisible) {\n if (!arguments.length) {\n return _numberVisible;\n }\n _numberVisible = numberVisible;\n\n return _chart;\n };\n\n _chart.size = dc.logger.deprecate(_chart.numberVisible, 'selectMenu.size is ambiguous - use numberVisible instead');\n\n return _chart.anchor(parent, chartGroup);\n};\n","// Renamed functions\n\ndc.abstractBubbleChart = dc.bubbleMixin;\ndc.baseChart = dc.baseMixin;\ndc.capped = dc.capMixin;\ndc.colorChart = dc.colorMixin;\ndc.coordinateGridChart = dc.coordinateGridMixin;\ndc.marginable = dc.marginMixin;\ndc.stackableChart = dc.stackMixin;\n\n// Expose d3 and crossfilter, so that clients in browserify\n// case can obtain them if they need them.\ndc.d3 = d3;\ndc.crossfilter = crossfilter;\n\nreturn dc;}\n if(typeof define === \"function\" && define.amd) {\n define([\"d3\", \"crossfilter2\"], _dc);\n } else if(typeof module === \"object\" && module.exports) {\n var _d3 = require('d3');\n var _crossfilter = require('crossfilter2');\n // When using npm + browserify, 'crossfilter' is a function,\n // since package.json specifies index.js as main function, and it\n // does special handling. When using bower + browserify,\n // there's no main in bower.json (in fact, there's no bower.json),\n // so we need to fix it.\n if (typeof _crossfilter !== \"function\") {\n _crossfilter = _crossfilter.crossfilter;\n }\n module.exports = _dc(_d3, _crossfilter);\n } else {\n this.dc = _dc(d3, crossfilter);\n }\n}\n)();\n"]} \ No newline at end of file diff --git a/civicrm/bower_components/dc-2.1.x/dc.min.css b/civicrm/bower_components/dc-2.1.x/dc.min.css new file mode 100644 index 0000000000..642cdb0f5d --- /dev/null +++ b/civicrm/bower_components/dc-2.1.x/dc.min.css @@ -0,0 +1 @@ +.dc-chart .box text,.dc-chart g.axis text{-webkit-touch-callout:none;-khtml-user-select:none;pointer-events:none}.dc-chart path.dc-symbol,.dc-legend g.dc-legend-item.fadeout{fill-opacity:.5;stroke-opacity:.5}div.dc-chart{float:left}.dc-chart rect.bar{stroke:none;cursor:pointer}.dc-chart rect.bar:hover{fill-opacity:.5}.dc-chart rect.deselected{stroke:none;fill:#ccc}.dc-chart .pie-slice{fill:#fff;font-size:12px;cursor:pointer}.dc-chart .pie-slice.external{fill:#000}.dc-chart .pie-slice :hover,.dc-chart .pie-slice.highlight{fill-opacity:.8}.dc-chart .pie-path{fill:none;stroke-width:2px;stroke:#000;opacity:.4}.dc-chart .selected circle,.dc-chart .selected path{stroke-width:3;stroke:#ccc;fill-opacity:1}.dc-chart .deselected circle,.dc-chart .deselected path{stroke:none;fill-opacity:.5;fill:#ccc}.dc-chart .axis line,.dc-chart .axis path{fill:none;stroke:#000;shape-rendering:crispEdges}.dc-chart .axis text{font:10px sans-serif}.dc-chart .axis .grid-line,.dc-chart .axis .grid-line line,.dc-chart .grid-line,.dc-chart .grid-line line{fill:none;stroke:#ccc;opacity:.5;shape-rendering:crispEdges}.dc-chart .brush rect.background{z-index:-999}.dc-chart .brush rect.extent{fill:#4682b4;fill-opacity:.125}.dc-chart .brush .resize path{fill:#eee;stroke:#666}.dc-chart path.line{fill:none;stroke-width:1.5px}.dc-chart path.area{fill-opacity:.3;stroke:none}.dc-chart path.highlight{stroke-width:3;fill-opacity:1;stroke-opacity:1}.dc-chart g.state{cursor:pointer}.dc-chart g.state :hover{fill-opacity:.8}.dc-chart g.state path{stroke:#fff}.dc-chart g.deselected path{fill:grey}.dc-chart g.deselected text{display:none}.dc-chart g.row rect{fill-opacity:.8;cursor:pointer}.dc-chart g.row rect:hover{fill-opacity:.6}.dc-chart g.row text{fill:#fff;font-size:12px;cursor:pointer}.dc-chart g.dc-tooltip path{fill:none;stroke:grey;stroke-opacity:.8}.dc-chart g.county path{stroke:#fff;fill:none}.dc-chart g.debug rect{fill:#00f;fill-opacity:.2}.dc-chart g.axis text{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.dc-chart .node{font-size:.7em;cursor:pointer}.dc-chart .node :hover{fill-opacity:.8}.dc-chart .bubble{stroke:none;fill-opacity:.6}.dc-chart .highlight{fill-opacity:1;stroke-opacity:1}.dc-chart .fadeout{fill-opacity:.2;stroke-opacity:.2}.dc-chart .box text{font:10px sans-serif;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.dc-chart .box circle,.dc-chart .box line{fill:#fff}.dc-chart .box circle,.dc-chart .box line,.dc-chart .box rect{stroke:#000;stroke-width:1.5px}.dc-chart .box .center{stroke-dasharray:3,3}.dc-chart .box .outlier{fill:none;stroke:#ccc}.dc-chart .symbol,.dc-chart circle.dot{stroke:none}.dc-chart .box.deselected{opacity:.5}.dc-chart .box.deselected .box{fill:#ccc}.dc-chart .heatmap .box-group.deselected rect{stroke:none;fill-opacity:.5;fill:#ccc}.dc-chart .heatmap g.axis text{pointer-events:all;cursor:pointer}.dc-chart .empty-chart .pie-slice{cursor:default}.dc-chart .empty-chart .pie-slice path{fill:#fee;cursor:default}.dc-data-count{float:right;margin-top:15px;margin-right:15px}.dc-data-count .filter-count,.dc-data-count .total-count{color:#3182bd;font-weight:700}.dc-legend{font-size:11px}.dc-legend .dc-legend-item{cursor:pointer}.dc-hard .number-display{float:none} \ No newline at end of file diff --git a/civicrm/bower_components/dc-2.1.x/dc.min.js b/civicrm/bower_components/dc-2.1.x/dc.min.js new file mode 100644 index 0000000000..7051060e89 --- /dev/null +++ b/civicrm/bower_components/dc-2.1.x/dc.min.js @@ -0,0 +1,23 @@ +/*! + * dc 2.1.9 + * http://dc-js.github.io/dc.js/ + * Copyright 2012-2016 Nick Zhu & the dc.js Developers + * https://github.com/dc-js/dc.js/blob/master/AUTHORS + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +!function(){function a(a,b){"use strict";var c={version:"2.1.9",constants:{CHART_CLASS:"dc-chart",DEBUG_GROUP_CLASS:"debug",STACK_CLASS:"stack",DESELECTED_CLASS:"deselected",SELECTED_CLASS:"selected",NODE_INDEX_NAME:"__index__",GROUP_INDEX_NAME:"__group_index__",DEFAULT_CHART_GROUP:"__default_chart_group__",EVENT_DELAY:40,NEGLIGIBLE_NUMBER:1e-10},_renderlet:null};c.chartRegistry=function(){function a(a){return a||(a=c.constants.DEFAULT_CHART_GROUP),b[a]||(b[a]=[]),a}var b={};return{has:function(a){for(var c in b)if(b[c].indexOf(a)>=0)return!0;return!1},register:function(c,d){d=a(d),b[d].push(c)},deregister:function(c,d){d=a(d);for(var e=0;e<b[d].length;e++)if(b[d][e].anchorName()===c.anchorName()){b[d].splice(e,1);break}},clear:function(a){a?delete b[a]:b={}},list:function(c){return c=a(c),b[c]}}}(),c.registerChart=function(a,b){c.chartRegistry.register(a,b)},c.deregisterChart=function(a,b){c.chartRegistry.deregister(a,b)},c.hasChart=function(a){return c.chartRegistry.has(a)},c.deregisterAllCharts=function(a){c.chartRegistry.clear(a)},c.filterAll=function(a){for(var b=c.chartRegistry.list(a),d=0;d<b.length;++d)b[d].filterAll()},c.refocusAll=function(a){for(var b=c.chartRegistry.list(a),d=0;d<b.length;++d)b[d].focus&&b[d].focus()},c.renderAll=function(a){for(var b=c.chartRegistry.list(a),d=0;d<b.length;++d)b[d].render();null!==c._renderlet&&c._renderlet(a)},c.redrawAll=function(a){for(var b=c.chartRegistry.list(a),d=0;d<b.length;++d)b[d].redraw();null!==c._renderlet&&c._renderlet(a)},c.disableTransitions=!1,c.transition=function(a,b,d,e){if(c.disableTransitions||b<=0)return a;var f=a.transition(e);return(b>=0||void 0!==b)&&(f=f.duration(b)),(d>=0||void 0!==d)&&(f=f.delay(d)),f},c.optionalTransition=function(a,b,d,e){return a?function(a){return c.transition(a,b,d,e)}:function(a){return a}},c.afterTransition=function(a,b){if(a.empty()||!a.duration)b.call(a);else{var c=0;a.each(function(){++c}).each("end",function(){--c||b.call(a)})}},c.units={},c.units.integers=function(a,b){return Math.abs(b-a)},c.units.ordinal=function(a,b,c){return c},c.units.fp={},c.units.fp.precision=function(a){var b=function(a,d){var e=Math.abs((d-a)/b.resolution);return c.utils.isNegligible(e-Math.floor(e))?Math.floor(e):Math.ceil(e)};return b.resolution=a,b},c.round={},c.round.floor=function(a){return Math.floor(a)},c.round.ceil=function(a){return Math.ceil(a)},c.round.round=function(a){return Math.round(a)},c.override=function(a,b,c){var d=a[b];a["_"+b]=d,a[b]=c},c.renderlet=function(a){return arguments.length?(c._renderlet=a,c):c._renderlet},c.instanceOfChart=function(a){return a instanceof Object&&a.__dcFlag__&&!0},c.errors={},c.errors.Exception=function(a){var b=a||"Unexpected internal error";this.message=b,this.toString=function(){return b},this.stack=(new Error).stack},c.errors.Exception.prototype=Object.create(Error.prototype),c.errors.Exception.prototype.constructor=c.errors.Exception,c.errors.InvalidStateException=function(){c.errors.Exception.apply(this,arguments)},c.errors.InvalidStateException.prototype=Object.create(c.errors.Exception.prototype),c.errors.InvalidStateException.prototype.constructor=c.errors.InvalidStateException,c.errors.BadArgumentException=function(){c.errors.Exception.apply(this,arguments)},c.errors.BadArgumentException.prototype=Object.create(c.errors.Exception.prototype),c.errors.BadArgumentException.prototype.constructor=c.errors.BadArgumentException,c.dateFormat=a.time.format("%m/%d/%Y"),c.printers={},c.printers.filters=function(a){for(var b="",d=0;d<a.length;++d)d>0&&(b+=", "),b+=c.printers.filter(a[d]);return b},c.printers.filter=function(a){var b="";return"undefined"!=typeof a&&null!==a&&(a instanceof Array?a.length>=2?b="["+c.utils.printSingleValue(a[0])+" -> "+c.utils.printSingleValue(a[1])+"]":a.length>=1&&(b=c.utils.printSingleValue(a[0])):b=c.utils.printSingleValue(a)),b},c.pluck=function(a,b){return b?function(c,d){return b.call(c,c[a],d)}:function(b){return b[a]}},c.utils={},c.utils.printSingleValue=function(a){var b=""+a;return a instanceof Date?b=c.dateFormat(a):"string"==typeof a?b=a:c.utils.isFloat(a)?b=c.utils.printSingleValue.fformat(a):c.utils.isInteger(a)&&(b=Math.round(a)),b},c.utils.printSingleValue.fformat=a.format(".2f"),c.utils.add=function(b,c,d){if("string"==typeof c&&(c=c.replace("%","")),b instanceof Date)return"string"==typeof c&&(c=+c),"millis"===d?new Date(b.getTime()+c):(d=d||"day",a.time[d].offset(b,c));if("string"==typeof c){var e=+c/100;return b>0?b*(1+e):b*(1-e)}return b+c},c.utils.subtract=function(b,c,d){if("string"==typeof c&&(c=c.replace("%","")),b instanceof Date)return"string"==typeof c&&(c=+c),"millis"===d?new Date(b.getTime()-c):(d=d||"day",a.time[d].offset(b,-c));if("string"==typeof c){var e=+c/100;return b<0?b*(1+e):b*(1-e)}return b-c},c.utils.isNumber=function(a){return a===+a},c.utils.isFloat=function(a){return a===+a&&a!==(0|a)},c.utils.isInteger=function(a){return a===+a&&a===(0|a)},c.utils.isNegligible=function(a){return!c.utils.isNumber(a)||a<c.constants.NEGLIGIBLE_NUMBER&&a>-c.constants.NEGLIGIBLE_NUMBER},c.utils.clamp=function(a,b,c){return a<b?b:a>c?c:a};var d=0;return c.utils.uniqueId=function(){return++d},c.utils.nameToId=function(a){return a.toLowerCase().replace(/[\s]/g,"_").replace(/[\.']/g,"")},c.utils.appendOrSelect=function(a,b,c){c=c||b;var d=a.select(b);return d.empty()&&(d=a.append(c)),d},c.utils.safeNumber=function(a){return c.utils.isNumber(+a)?+a:0},c.logger={},c.logger.enableDebugLog=!1,c.logger.warn=function(a){return console&&(console.warn?console.warn(a):console.log&&console.log(a)),c.logger},c.logger.debug=function(a){return c.logger.enableDebugLog&&console&&(console.debug?console.debug(a):console.log&&console.log(a)),c.logger},c.logger.deprecate=function(a,b){function d(){return e||(c.logger.warn(b),e=!0),a.apply(this,arguments)}var e=!1;return d},c.events={current:null},c.events.trigger=function(a,b){return b?(c.events.current=a,void setTimeout(function(){a===c.events.current&&a()},b)):void a()},c.filters={},c.filters.RangedFilter=function(a,b){var c=new Array(a,b);return c.isFiltered=function(a){return a>=this[0]&&a<this[1]},c.filterType="RangedFilter",c},c.filters.TwoDimensionalFilter=function(a){if(null===a)return null;var b=a;return b.isFiltered=function(a){return a.length&&a.length===b.length&&a[0]===b[0]&&a[1]===b[1]},b.filterType="TwoDimensionalFilter",b},c.filters.RangedTwoDimensionalFilter=function(a){if(null===a)return null;var b,c=a;return b=c[0]instanceof Array?[[Math.min(a[0][0],a[1][0]),Math.min(a[0][1],a[1][1])],[Math.max(a[0][0],a[1][0]),Math.max(a[0][1],a[1][1])]]:[[a[0],-(1/0)],[a[1],1/0]],c.isFiltered=function(a){var c,d;return a instanceof Array?(c=a[0],d=a[1]):(c=a,d=b[0][1]),c>=b[0][0]&&c<b[1][0]&&d>=b[0][1]&&d<b[1][1]},c.filterType="RangedTwoDimensionalFilter",c},c.baseMixin=function(d){function e(){m&&(z?m.attr("viewBox")||m.attr("viewBox","0 0 "+d.width()+" "+d.height()):m.attr("width",d.width()).attr("height",d.height()))}function f(){return m=d.root().append("svg"),e(),m}function g(a){if(!d[a]||!d[a]())throw new c.errors.InvalidStateException("Mandatory attribute chart."+a+" is missing on chart[#"+d.anchorName()+"]")}function h(a){if(d.dimension()&&d.dimension().filter){var b=P(d.dimension(),a);b&&(a=b)}return a}d.__dcFlag__=c.utils.uniqueId();var i,j,k,l,m,n,o,p,q,r,s,t=200,u=function(a){var b=a&&a.getBoundingClientRect&&a.getBoundingClientRect().width;return b&&b>t?b:t},v=u,w=200,x=function(a){var b=a&&a.getBoundingClientRect&&a.getBoundingClientRect().height;return b&&b>w?b:w},y=x,z=!1,A=c.pluck("key"),B=c.pluck("value"),C=c.pluck("key"),D=c.pluck("key"),E=!1,F=function(a){return d.keyAccessor()(a)+": "+d.valueAccessor()(a)},G=!0,H=!1,I=750,J=0,K=c.printers.filters,L=["dimension","group"],M=c.constants.DEFAULT_CHART_GROUP,N=a.dispatch("preRender","postRender","preRedraw","postRedraw","filtered","zoomed","renderlet","pretransition"),O=[],P=function(a,b){return 0===b.length?a.filter(null):1!==b.length||b[0].isFiltered?1===b.length&&"RangedFilter"===b[0].filterType?a.filterRange(b[0]):a.filterFunction(function(a){for(var c=0;c<b.length;c++){var d=b[c];if(d.isFiltered&&d.isFiltered(a))return!0;if(d<=a&&d>=a)return!0}return!1}):a.filterExact(b[0]),b},Q=function(a){return a.all()};d.height=function(b){return arguments.length?(y=a.functor(b||x),p=void 0,d):(c.utils.isNumber(p)||(p=y(l.node())),p)},d.width=function(b){return arguments.length?(v=a.functor(b||u),o=void 0,d):(c.utils.isNumber(o)||(o=v(l.node())),o)},d.minWidth=function(a){return arguments.length?(t=a,d):t},d.minHeight=function(a){return arguments.length?(w=a,d):w},d.useViewBoxResizing=function(a){return arguments.length?(z=a,d):z},d.dimension=function(a){return arguments.length?(i=a,d.expireCache(),d):i},d.data=function(b){return arguments.length?(Q=a.functor(b),d.expireCache(),d):Q.call(d,j)},d.group=function(a,b){return arguments.length?(j=a,d._groupName=b,d.expireCache(),d):j},d.ordering=function(a){return arguments.length?(D=a,q=b.quicksort.by(D),d.expireCache(),d):D},d._computeOrderedGroups=function(a){var c=a.slice(0);return c.length<=1?c:(q||(q=b.quicksort.by(D)),q(c,0,c.length))},d.filterAll=function(){return d.filter(null)},d.select=function(a){return l.select(a)},d.selectAll=function(a){return l?l.selectAll(a):null},d.anchor=function(b,e){if(!arguments.length)return k;if(c.instanceOfChart(b))k=b.anchor(),l=b.root(),n=!0;else{if(!b)throw new c.errors.BadArgumentException("parent must be defined");k=b.select&&b.classed?b.node():b,l=a.select(k),l.classed(c.constants.CHART_CLASS,!0),c.registerChart(d,e),n=!1}return M=e,d},d.anchorName=function(){var a=d.anchor();return a&&a.id?a.id:a&&a.replace?a.replace("#",""):"dc-chart"+d.chartID()},d.root=function(a){return arguments.length?(l=a,d):l},d.svg=function(a){return arguments.length?(m=a,d):m},d.resetSvg=function(){return d.select("svg").remove(),f()},d.filterPrinter=function(a){return arguments.length?(K=a,d):K},d.controlsUseVisibility=function(a){return arguments.length?(H=a,d):H},d.turnOnControls=function(){if(l){var a=d.controlsUseVisibility()?"visibility":"display";d.selectAll(".reset").style(a,null),d.selectAll(".filter").text(K(d.filters())).style(a,null)}return d},d.turnOffControls=function(){if(l){var a=d.controlsUseVisibility()?"visibility":"display",b=d.controlsUseVisibility()?"hidden":"none";d.selectAll(".reset").style(a,b),d.selectAll(".filter").style(a,b).text(d.filter())}return d},d.transitionDuration=function(a){return arguments.length?(I=a,d):I},d.transitionDelay=function(a){return arguments.length?(J=a,d):J},d._mandatoryAttributes=function(a){return arguments.length?(L=a,d):L},d.render=function(){p=o=void 0,N.preRender(d),L&&L.forEach(g);var a=d._doRender();return r&&r.render(),d._activateRenderlets("postRender"),a},d._activateRenderlets=function(a){N.pretransition(d),d.transitionDuration()>0&&m?m.transition().duration(d.transitionDuration()).delay(d.transitionDelay()).each("end",function(){N.renderlet(d),a&&N[a](d)}):(N.renderlet(d),a&&N[a](d))},d.redraw=function(){e(),N.preRedraw(d);var a=d._doRedraw();return r&&r.render(),d._activateRenderlets("postRedraw"),a},d.commitHandler=function(a){return arguments.length?(s=a,d):s},d.redrawGroup=function(){return s?s(!1,function(a,b){a?console.log(a):c.redrawAll(d.chartGroup())}):c.redrawAll(d.chartGroup()),d},d.renderGroup=function(){return s?s(!1,function(a,b){a?console.log(a):c.renderAll(d.chartGroup())}):c.renderAll(d.chartGroup()),d},d._invokeFilteredListener=function(a){void 0!==a&&N.filtered(d,a)},d._invokeZoomedListener=function(){N.zoomed(d)};var R=function(a,b){return null===b||"undefined"==typeof b?a.length>0:a.some(function(a){return b<=a&&b>=a})};d.hasFilterHandler=function(a){return arguments.length?(R=a,d):R},d.hasFilter=function(a){return R(O,a)};var S=function(a,b){for(var c=0;c<a.length;c++)if(a[c]<=b&&a[c]>=b){a.splice(c,1);break}return a};d.removeFilterHandler=function(a){return arguments.length?(S=a,d):S};var T=function(a,b){return a.push(b),a};d.addFilterHandler=function(a){return arguments.length?(T=a,d):T};var U=function(a){return[]};return d.resetFilterHandler=function(a){return arguments.length?(U=a,d):U},d.replaceFilter=function(a){return O=U(O),d.filter(a),d},d.filter=function(a){if(!arguments.length)return O.length>0?O[0]:null;var b=O;return a instanceof Array&&a[0]instanceof Array&&!a.isFiltered?a[0].forEach(function(a){b=R(b,a)?S(b,a):T(b,a)}):b=null===a?U(b):R(b,a)?S(b,a):T(b,a),O=h(b),d._invokeFilteredListener(a),null!==l&&d.hasFilter()?d.turnOnControls():d.turnOffControls(),d},d.filters=function(){return O},d.highlightSelected=function(b){a.select(b).classed(c.constants.SELECTED_CLASS,!0),a.select(b).classed(c.constants.DESELECTED_CLASS,!1)},d.fadeDeselected=function(b){a.select(b).classed(c.constants.SELECTED_CLASS,!1),a.select(b).classed(c.constants.DESELECTED_CLASS,!0)},d.resetHighlight=function(b){a.select(b).classed(c.constants.SELECTED_CLASS,!1),a.select(b).classed(c.constants.DESELECTED_CLASS,!1)},d.onClick=function(a){var b=d.keyAccessor()(a);c.events.trigger(function(){d.filter(b),d.redrawGroup()})},d.filterHandler=function(a){return arguments.length?(P=a,d):P},d._doRender=function(){return d},d._doRedraw=function(){return d},d.legendables=function(){return[]},d.legendHighlight=function(){},d.legendReset=function(){},d.legendToggle=function(){},d.isLegendableHidden=function(){return!1},d.keyAccessor=function(a){return arguments.length?(A=a,d):A},d.valueAccessor=function(a){return arguments.length?(B=a,d):B},d.label=function(a,b){return arguments.length?(C=a,(void 0===b||b)&&(E=!0),d):C},d.renderLabel=function(a){return arguments.length?(E=a,d):E},d.title=function(a){return arguments.length?(F=a,d):F},d.renderTitle=function(a){return arguments.length?(G=a,d):G},d.renderlet=c.logger.deprecate(function(a){return d.on("renderlet."+c.utils.uniqueId(),a),d},'chart.renderlet has been deprecated. Please use chart.on("renderlet.<renderletKey>", renderletFunction)'),d.chartGroup=function(a){return arguments.length?(n||c.deregisterChart(d,M),M=a,n||c.registerChart(d,M),d):M},d.expireCache=function(){return d},d.legend=function(a){return arguments.length?(r=a,r.parent(d),d):r},d.chartID=function(){return d.__dcFlag__},d.options=function(a){var b=["anchor","group","xAxisLabel","yAxisLabel","stack","title","point","getColor","overlayGeoJson"];for(var e in a)"function"==typeof d[e]?a[e]instanceof Array&&b.indexOf(e)!==-1?d[e].apply(d,a[e]):d[e].call(d,a[e]):c.logger.debug("Not a valid option setter name: "+e);return d},d.on=function(a,b){return N.on(a,b),d},d},c.marginMixin=function(a){var b={top:10,right:50,bottom:30,left:30};return a.margins=function(c){return arguments.length?(b=c,a):b},a.effectiveWidth=function(){return a.width()-a.margins().left-a.margins().right},a.effectiveHeight=function(){return a.height()-a.margins().top-a.margins().bottom},a},c.colorMixin=function(b){var d=a.scale.category20c(),e=!0,f=function(a){return b.keyAccessor()(a)};return b.colors=function(c){return arguments.length?(d=c instanceof Array?a.scale.quantize().range(c):a.functor(c),b):d},b.ordinalColors=function(c){return b.colors(a.scale.ordinal().range(c))},b.linearColors=function(c){return b.colors(a.scale.linear().range(c).interpolate(a.interpolateHcl))},b.colorAccessor=function(a){return arguments.length?(f=a,e=!1,b):f},b.defaultColorAccessor=function(){return e},b.colorDomain=function(a){return arguments.length?(d.domain(a),b):d.domain()},b.calculateColorDomain=function(){var c=[a.min(b.data(),b.colorAccessor()),a.max(b.data(),b.colorAccessor())];return d.domain(c),b},b.getColor=function(a,b){return d(f.call(this,a,b))},b.colorCalculator=c.logger.deprecate(function(a){return arguments.length?(b.getColor=a,b):b.getColor},"colorMixin.colorCalculator has been deprecated. Please colorMixin.colors and colorMixin.colorAccessor instead"),b},c.coordinateGridMixin=function(b){function d(a,b){return!a||!b||a.length!==b.length||a.some(function(a,c){return a&&b[c]?a.toString()!==b[c].toString():a===b[c]})}function e(a,c){b.isOrdinal()?(b.elasticX()||0===z.domain().length)&&z.domain(b._ordinalXDomain()):b.elasticX()&&z.domain([b.xAxisMin(),b.xAxisMax()]);var e=z.domain();(c||d(C,e))&&b.rescale(),C=e,b.isOrdinal()?z.rangeBands([0,b.xAxisLength()],fa,b._useOuterPadding()?ea:0):z.range([0,b.xAxisLength()]),J=J.scale(b.x()),f(a)}function f(a){var d=a.select("g."+s);if(W){d.empty()&&(d=a.insert("g",":first-child").attr("class",q+" "+s).attr("transform","translate("+b.margins().left+","+b.margins().top+")"));var e=J.tickValues()?J.tickValues():"function"==typeof z.ticks?z.ticks(J.ticks()[0]):z.domain(),f=d.selectAll("line").data(e),g=f.enter().append("line").attr("x1",function(a){return z(a)}).attr("y1",b._xAxisY()-b.margins().top).attr("x2",function(a){return z(a)}).attr("y2",0).attr("opacity",0);c.transition(g,b.transitionDuration(),b.transitionDelay()).attr("opacity",1),c.transition(f,b.transitionDuration(),b.transitionDelay()).attr("x1",function(a){return z(a)}).attr("y1",b._xAxisY()-b.margins().top).attr("x2",function(a){return z(a)}).attr("y2",0),f.exit().remove()}else d.selectAll("line").remove()}function g(){return b._xAxisY()-b.margins().top}function h(){return b.anchorName().replace(/[ .#=\[\]"]/g,"-")+"-clip"}function i(){var a=c.utils.appendOrSelect(w,"defs"),d=h(),e=c.utils.appendOrSelect(a,"#"+d,"clipPath").attr("id",d),f=2*da;c.utils.appendOrSelect(e,"rect").attr("width",b.xAxisLength()+f).attr("height",b.yAxisHeight()+f).attr("transform","translate(-"+da+", -"+da+")")}function j(a){b.isOrdinal()&&(U=!1),e(b.g(),a),b._prepareYAxis(b.g()),b.plotData(),(b.elasticX()||Y||a)&&b.renderXAxis(b.g()),(b.elasticY()||Y||a)&&b.renderYAxis(b.g()),a?b.renderBrush(b.g(),!1):b.redrawBrush(b.g(),Y),b.fadeDeselectedArea(),Y=!1}function k(){ca?b._enableMouseZoom():ba&&b._disableMouseZoom()}function l(){if(X=!0,$){var a=A;H&&(a=m(a,H.x().domain()));var d=n(b.x().domain(),a);d&&b.x().domain(d)}var e=b.x().domain(),f=c.filters.RangedFilter(e[0],e[1]);b.replaceFilter(f),b.rescale(),b.redraw(),H&&!o(b.filter(),H.filter())&&c.events.trigger(function(){H.replaceFilter(f),H.redraw()}),b._invokeZoomedListener(),c.events.trigger(function(){b.redrawGroup()},c.constants.EVENT_DELAY),X=!o(e,A)}function m(a,b){return(a[0]>b[1]||a[1]<b[0])&&console.warn("could not intersect extents"),[Math.max(a[0],b[0]),Math.min(a[1],b[1])]}function n(a,b){var d=a[1]-a[0];return a[0]<b[0]?[b[0],Math.min(b[1],c.utils.add(b[0],d,"millis"))]:a[1]>b[1]?[Math.max(b[0],c.utils.subtract(b[1],d,"millis")),b[1]]:null}function o(a,b){return!a&&!b||!(!a||!b)&&(0===a.length&&0===b.length||a[0].valueOf()===b[0].valueOf()&&a[1].valueOf()===b[1].valueOf())}function p(a){return a instanceof Array&&a.length>1}var q="grid-line",r="horizontal",s="vertical",t="y-axis-label",u="x-axis-label",v=12;b=c.colorMixin(c.marginMixin(c.baseMixin(b))),b.colors(a.scale.category10()),b._mandatoryAttributes().push("x");var w,x,y,z,A,B,C,D,E,F,G,H,I,J=a.svg.axis().orient("bottom"),K=c.units.integers,L=0,M="day",N=!1,O=0,P=a.svg.axis().orient("left"),Q=0,R=!1,S=0,T=a.svg.brush(),U=!0,V=!1,W=!1,X=!1,Y=!1,Z=[1,1/0],$=!0,_=a.behavior.zoom().on("zoom",l),aa=a.behavior.zoom().on("zoom",null),ba=!1,ca=!1,da=0,ea=.5,fa=0,ga=!1;return b.rescale=function(){return G=void 0,Y=!0,b},b.resizing=function(){return Y},b.rangeChart=function(a){return arguments.length?(H=a,H.focusChart(b),b):H},b.zoomScale=function(a){return arguments.length?(Z=a,b):Z},b.zoomOutRestrict=function(a){return arguments.length?(Z[0]=a?1:0,$=a,b):$},b._generateG=function(a){w=void 0===a?b.svg():a;var c=window.location.href.split("#")[0];return x=w.append("g"),y=x.append("g").attr("class","chart-body").attr("transform","translate("+b.margins().left+", "+b.margins().top+")").attr("clip-path","url("+c+"#"+h()+")"),x},b.g=function(a){return arguments.length?(x=a,b):x},b.mouseZoomable=function(a){return arguments.length?(ca=a,b):ca},b.chartBodyG=function(a){return arguments.length?(y=a,b):y},b.x=function(a){return arguments.length?(z=a,A=z.domain(),b.rescale(),b):z},b.xOriginalDomain=function(){return A},b.xUnits=function(a){return arguments.length?(K=a,b):K},b.xAxis=function(a){return arguments.length?(J=a,b):J},b.elasticX=function(a){return arguments.length?(N=a,b):N},b.xAxisPadding=function(a){return arguments.length?(L=a,b):L},b.xAxisPaddingUnit=function(a){return arguments.length?(M=a,b):M},b.xUnitCount=function(){if(void 0===G){var a=b.xUnits()(b.x().domain()[0],b.x().domain()[1],b.x().domain());G=a instanceof Array?a.length:a}return G},b.useRightYAxis=function(a){return arguments.length?(ga=a,b):ga},b.isOrdinal=function(){return b.xUnits()===c.units.ordinal},b._useOuterPadding=function(){return!0},b._ordinalXDomain=function(){var a=b._computeOrderedGroups(b.data());return a.map(b.keyAccessor())},b.renderXAxis=function(a){var d=a.select("g.x");d.empty()&&(d=a.append("g").attr("class","axis x").attr("transform","translate("+b.margins().left+","+b._xAxisY()+")"));var e=a.select("text."+u);e.empty()&&b.xAxisLabel()&&(e=a.append("text").attr("class",u).attr("transform","translate("+(b.margins().left+b.xAxisLength()/2)+","+(b.height()-O)+")").attr("text-anchor","middle")),b.xAxisLabel()&&e.text()!==b.xAxisLabel()&&e.text(b.xAxisLabel()),c.transition(d,b.transitionDuration(),b.transitionDelay()).attr("transform","translate("+b.margins().left+","+b._xAxisY()+")").call(J),c.transition(e,b.transitionDuration(),b.transitionDelay()).attr("transform","translate("+(b.margins().left+b.xAxisLength()/2)+","+(b.height()-O)+")")},b._xAxisY=function(){return b.height()-b.margins().bottom},b.xAxisLength=function(){return b.effectiveWidth()},b.xAxisLabel=function(a,c){return arguments.length?(B=a,b.margins().bottom-=O,O=void 0===c?v:c,b.margins().bottom+=O,b):B},b._prepareYAxis=function(c){if(void 0===D||b.elasticY()){void 0===D&&(D=a.scale.linear());var d=b.yAxisMin()||0,e=b.yAxisMax()||0;D.domain([d,e]).rangeRound([b.yAxisHeight(),0])}D.range([b.yAxisHeight(),0]),P=P.scale(D),ga&&P.orient("right"),b._renderHorizontalGridLinesForAxis(c,D,P)},b.renderYAxisLabel=function(a,d,e,f){f=f||S;var g=b.g().select("text."+t+"."+a+"-label"),h=b.margins().top+b.yAxisHeight()/2;g.empty()&&d&&(g=b.g().append("text").attr("transform","translate("+f+","+h+"),rotate("+e+")").attr("class",t+" "+a+"-label").attr("text-anchor","middle").text(d)),d&&g.text()!==d&&g.text(d),c.transition(g,b.transitionDuration(),b.transitionDelay()).attr("transform","translate("+f+","+h+"),rotate("+e+")")},b.renderYAxisAt=function(a,d,e){var f=b.g().select("g."+a);f.empty()&&(f=b.g().append("g").attr("class","axis "+a).attr("transform","translate("+e+","+b.margins().top+")")),c.transition(f,b.transitionDuration(),b.transitionDelay()).attr("transform","translate("+e+","+b.margins().top+")").call(d)},b.renderYAxis=function(){var a=ga?b.width()-b.margins().right:b._yAxisX();b.renderYAxisAt("y",P,a);var c=ga?b.width()-S:S,d=ga?90:-90;b.renderYAxisLabel("y",b.yAxisLabel(),d,c)},b._renderHorizontalGridLinesForAxis=function(a,d,e){var f=a.select("g."+r);if(V){var g=e.tickValues()?e.tickValues():d.ticks(e.ticks()[0]);f.empty()&&(f=a.insert("g",":first-child").attr("class",q+" "+r).attr("transform","translate("+b.margins().left+","+b.margins().top+")"));var h=f.selectAll("line").data(g),i=h.enter().append("line").attr("x1",1).attr("y1",function(a){return d(a)}).attr("x2",b.xAxisLength()).attr("y2",function(a){return d(a)}).attr("opacity",0);c.transition(i,b.transitionDuration(),b.transitionDelay()).attr("opacity",1),c.transition(h,b.transitionDuration(),b.transitionDelay()).attr("x1",1).attr("y1",function(a){return d(a)}).attr("x2",b.xAxisLength()).attr("y2",function(a){return d(a)}),h.exit().remove()}else f.selectAll("line").remove()},b._yAxisX=function(){return b.useRightYAxis()?b.width()-b.margins().right:b.margins().left},b.yAxisLabel=function(a,c){return arguments.length?(E=a,b.margins().left-=S,S=void 0===c?v:c,b.margins().left+=S,b):E},b.y=function(a){return arguments.length?(D=a,b.rescale(),b):D},b.yAxis=function(a){return arguments.length?(P=a,b):P},b.elasticY=function(a){return arguments.length?(R=a,b):R},b.renderHorizontalGridLines=function(a){return arguments.length?(V=a,b):V},b.renderVerticalGridLines=function(a){return arguments.length?(W=a,b):W},b.xAxisMin=function(){var d=a.min(b.data(),function(a){return b.keyAccessor()(a)});return c.utils.subtract(d,L,M)},b.xAxisMax=function(){var d=a.max(b.data(),function(a){return b.keyAccessor()(a)});return c.utils.add(d,L,M)},b.yAxisMin=function(){var d=a.min(b.data(),function(a){return b.valueAccessor()(a)});return c.utils.subtract(d,Q)},b.yAxisMax=function(){var d=a.max(b.data(),function(a){return b.valueAccessor()(a)});return c.utils.add(d,Q)},b.yAxisPadding=function(a){return arguments.length?(Q=a,b):Q},b.yAxisHeight=function(){return b.effectiveHeight()},b.round=function(a){return arguments.length?(F=a,b):F},b._rangeBandPadding=function(a){return arguments.length?(fa=a,b):fa},b._outerRangeBandPadding=function(a){return arguments.length?(ea=a,b):ea},c.override(b,"filter",function(a){return arguments.length?(b._filter(a),a?b.brush().extent(a):b.brush().clear(),b):b._filter()}),b.brush=function(a){return arguments.length?(T=a,b):T},b.renderBrush=function(a){if(U){T.on("brush",b._brushing),T.on("brushstart",b._disableMouseZoom),T.on("brushend",k);var c=a.append("g").attr("class","brush").attr("transform","translate("+b.margins().left+","+b.margins().top+")").call(T.x(b.x()));b.setBrushY(c,!1),b.setHandlePaths(c),b.hasFilter()&&b.redrawBrush(a,!1)}},b.setHandlePaths=function(a){a.selectAll(".resize").append("path").attr("d",b.resizeHandlePath)},b.setBrushY=function(a){a.selectAll("rect").attr("height",g()),a.selectAll(".resize path").attr("d",b.resizeHandlePath)},b.extendBrush=function(){var a=T.extent();return b.round()&&(a[0]=a.map(b.round())[0],a[1]=a.map(b.round())[1],x.select(".brush").call(T.extent(a))),a},b.brushIsEmpty=function(a){return T.empty()||!a||a[1]<=a[0]},b._brushing=function(){var a=b.extendBrush();if(b.redrawBrush(x,!1),b.brushIsEmpty(a))c.events.trigger(function(){b.filter(null),b.redrawGroup()},c.constants.EVENT_DELAY);else{var d=c.filters.RangedFilter(a[0],a[1]);c.events.trigger(function(){b.replaceFilter(d),b.redrawGroup()},c.constants.EVENT_DELAY)}},b.redrawBrush=function(a,d){if(U){b.filter()&&b.brush().empty()&&b.brush().extent(b.filter());var e=c.optionalTransition(d,b.transitionDuration(),b.transitionDelay())(a.select("g.brush"));b.setBrushY(e),e.call(b.brush().x(b.x()).extent(b.brush().extent()))}b.fadeDeselectedArea()},b.fadeDeselectedArea=function(){},b.resizeHandlePath=function(a){var b=+("e"===a),c=b?1:-1,d=g()/3;return"M"+.5*c+","+d+"A6,6 0 0 "+b+" "+6.5*c+","+(d+6)+"V"+(2*d-6)+"A6,6 0 0 "+b+" "+.5*c+","+2*d+"ZM"+2.5*c+","+(d+8)+"V"+(2*d-8)+"M"+4.5*c+","+(d+8)+"V"+(2*d-8)},b.clipPadding=function(a){return arguments.length?(da=a,b):da},b._preprocessData=function(){},b._doRender=function(){return b.resetSvg(),b._preprocessData(),b._generateG(),i(),j(!0),k(),b},b._doRedraw=function(){return b._preprocessData(),j(!1),i(),b},b._enableMouseZoom=function(){ba=!0,_.x(b.x()).scaleExtent(Z).size([b.width(),b.height()]).duration(b.transitionDuration()),b.root().call(_)},b._disableMouseZoom=function(){b.root().call(aa)},b.focus=function(a){p(a)?b.x().domain(a):b.x().domain(A),_.x(b.x()),l()},b.refocused=function(){return X},b.focusChart=function(a){return arguments.length?(I=a,b.on("filtered",function(a){a.filter()?o(a.filter(),I.filter())||c.events.trigger(function(){I.focus(a.filter())}):c.events.trigger(function(){I.x().domain(I.xOriginalDomain())})}),b):I},b.brushOn=function(a){return arguments.length?(U=a,b):U},b},c.stackMixin=function(b){function d(a,c){var d=a.accessor||b.valueAccessor();return a.name=String(a.name||c),a.values=a.group.all().map(function(c,e){return{x:b.keyAccessor()(c,e),y:a.hidden?null:d(c,e),data:c,layer:a.name,hidden:a.hidden}}),a.values=a.values.filter(e()),a.values}function e(){if(!b.x()||m)return a.functor(!0);var c=b.x().domain();return b.isOrdinal()?function(){return!0}:b.elasticX()?function(){return!0}:function(a){return a.x>=c[0]&&a.x<=c[c.length-1]}}function f(a){var b=j.map(c.pluck("name")).indexOf(a);return j[b]}function g(){var a=b.data().map(function(a){return a.values});return Array.prototype.concat.apply([],a)}function h(a){return!a.hidden}var i=a.layout.stack().values(d),j=[],k={},l=!1,m=!1;return b.stack=function(a,c,d){if(!arguments.length)return j;arguments.length<=2&&(d=c);var e={group:a};return"string"==typeof c&&(e.name=c),"function"==typeof d&&(e.accessor=d),j.push(e),b},c.override(b,"group",function(a,c,d){return arguments.length?(j=[],k={},b.stack(a,c),d&&b.valueAccessor(d),b._group(a,c)):b._group()}),b.hidableStacks=function(a){return arguments.length?(l=a,b):l},b.hideStack=function(a){var c=f(a);return c&&(c.hidden=!0),b},b.showStack=function(a){var c=f(a);return c&&(c.hidden=!1),b},b.getValueAccessorByIndex=function(a){return j[a].accessor||b.valueAccessor()},b.yAxisMin=function(){var d=a.min(g(),function(a){return a.y<0?a.y+a.y0:a.y0});return c.utils.subtract(d,b.yAxisPadding())},b.yAxisMax=function(){var d=a.max(g(),function(a){return a.y>0?a.y+a.y0:a.y0});return c.utils.add(d,b.yAxisPadding())},b.xAxisMin=function(){var d=a.min(g(),c.pluck("x"));return c.utils.subtract(d,b.xAxisPadding(),b.xAxisPaddingUnit())},b.xAxisMax=function(){var d=a.max(g(),c.pluck("x"));return c.utils.add(d,b.xAxisPadding(),b.xAxisPaddingUnit())},c.override(b,"title",function(a,c){return a?"function"==typeof a?b._title(a):a===b._groupName&&"function"==typeof c?b._title(c):"function"!=typeof c?k[a]||b._title():(k[a]=c,b):b._title()}),b.stackLayout=function(c){return arguments.length?(i=c,i.values()===a.layout.stack().values()&&i.values(d),b):i},b.evadeDomainFilter=function(a){return arguments.length?(m=a,b):m},b.data(function(){var a=j.filter(h);return a.length?b.stackLayout()(a):[]}),b._ordinalXDomain=function(){var a=g().map(c.pluck("data")),d=b._computeOrderedGroups(a);return d.map(b.keyAccessor())},b.colorAccessor(function(a){var b=this.layer||this.name||a.name||a.layer;return b}),b.legendables=function(){return j.map(function(a,c){return{chart:b,name:a.name,hidden:a.hidden||!1,color:b.getColor.call(a,a.values,c)}})},b.isLegendableHidden=function(a){var b=f(a.name);return!!b&&b.hidden},b.legendToggle=function(a){l&&(b.isLegendableHidden(a)?b.showStack(a.name):b.hideStack(a.name),b.renderGroup())},b},c.capMixin=function(b){var d=1/0,e=!0,f="Others";b.ordering(function(a){return-a.value});var g=function(c,d){var e=a.sum(d,b.valueAccessor()),f=d.map(b.keyAccessor());return e>0?c.concat([{others:f,key:b.othersLabel(),value:e}]):c};return b.cappedKeyAccessor=function(a,c){return a.others?a.key:b.keyAccessor()(a,c)},b.cappedValueAccessor=function(a,c){return a.others?a.value:b.valueAccessor()(a,c)},b.data(function(a){if(d===1/0)return b._computeOrderedGroups(a.all());var c,f=a.all();if(f=b._computeOrderedGroups(f),d)if(e)c=f.slice(d),f=f.slice(0,d);else{var h=Math.max(0,f.length-d);c=f.slice(0,h),f=f.slice(h)}return g?g(f,c):f}),b.cap=function(a){return arguments.length?(d=a,b):d},b.takeFront=function(a){return arguments.length?(e=a,b):e},b.othersLabel=function(a){return arguments.length?(f=a,b):f},b.othersGrouper=function(a){return arguments.length?(g=a,b):g},c.override(b,"onClick",function(a){a.others&&b.filter([a.others]),b._onClick(a)}),b},c.bubbleMixin=function(b){var d=.3,e=10,f=!1,g=!1;b.BUBBLE_NODE_CLASS="node",b.BUBBLE_CLASS="bubble",b.MIN_RADIUS=10,b=c.colorMixin(b),b.renderLabel(!0),b.data(function(c){var d=c.all();if(f){var e=b.radiusValueAccessor();d.sort(function(b,c){return a.descending(e(b),e(c))})}return d});var h=a.scale.linear().domain([0,100]),i=function(a){return a.r};b.r=function(a){return arguments.length?(h=a,b):h},b.elasticRadius=function(a){return arguments.length?(g=a,b):g},b.calculateRadiusDomain=function(){g&&b.r().domain([b.rMin(),b.rMax()])},b.radiusValueAccessor=function(a){return arguments.length?(i=a,b):i},b.rMin=function(){var c=a.min(b.data(),function(a){ +return b.radiusValueAccessor()(a)});return c},b.rMax=function(){var c=a.max(b.data(),function(a){return b.radiusValueAccessor()(a)});return c},b.bubbleR=function(a){var c=b.radiusValueAccessor()(a),d=b.r()(c);return(isNaN(d)||c<=0)&&(d=0),d};var j=function(a){return b.label()(a)},k=function(a){return b.bubbleR(a)>e},l=function(a){return k(a)?1:0},m=function(a){return k(a)?"all":"none"};b._doRenderLabel=function(a){if(b.renderLabel()){var d=a.select("text");d.empty()&&(d=a.append("text").attr("text-anchor","middle").attr("dy",".3em").on("click",b.onClick)),d.attr("opacity",0).attr("pointer-events",m).text(j),c.transition(d,b.transitionDuration(),b.transitionDelay()).attr("opacity",l)}},b.doUpdateLabels=function(a){if(b.renderLabel()){var d=a.select("text").attr("pointer-events",m).text(j);c.transition(d,b.transitionDuration(),b.transitionDelay()).attr("opacity",l)}};var n=function(a){return b.title()(a)};return b._doRenderTitles=function(a){if(b.renderTitle()){var c=a.select("title");c.empty()&&a.append("title").text(n)}},b.doUpdateTitles=function(a){b.renderTitle()&&a.select("title").text(n)},b.sortBubbleSize=function(a){return arguments.length?(f=a,b):f},b.minRadius=function(a){return arguments.length?(b.MIN_RADIUS=a,b):b.MIN_RADIUS},b.minRadiusWithLabel=function(a){return arguments.length?(e=a,b):e},b.maxBubbleRelativeSize=function(a){return arguments.length?(d=a,b):d},b.fadeDeselectedArea=function(){b.hasFilter()?b.selectAll("g."+b.BUBBLE_NODE_CLASS).each(function(a){b.isSelectedNode(a)?b.highlightSelected(this):b.fadeDeselected(this)}):b.selectAll("g."+b.BUBBLE_NODE_CLASS).each(function(){b.resetHighlight(this)})},b.isSelectedNode=function(a){return b.hasFilter(a.key)},b.onClick=function(a){var d=a.key;c.events.trigger(function(){b.filter(d),b.redrawGroup()})},b},c.pieChart=function(b,d){function e(){var b=a.min([W.width(),W.height()])/2;F=G&&G<b?G:b;var d,e=t(),g=v();if(a.sum(W.data(),W.valueAccessor())?(d=g(W.data()),H.classed(Q,!1)):(d=g([{key:R,value:1,others:[R]}]),H.classed(Q,!0)),H){var h=H.select("g."+O).selectAll("g."+M).data(d),i=H.select("g."+P).selectAll("text."+N).data(d);f(h,i,e,d),n(d,e),r(h,i),s(),c.transition(H,W.transitionDuration(),W.transitionDelay()).attr("transform","translate("+W.cx()+","+W.cy()+")")}}function f(a,b,c,d){var e=g(a);h(e,c),i(e),l(b,d,c)}function g(a){var b=a.enter().append("g").attr("class",function(a,b){return M+" _"+b});return b}function h(a,b){var d=a.append("path").attr("fill",A).on("click",B).attr("d",function(a,c){return C(a,c,b)}),e=c.transition(d,W.transitionDuration(),W.transitionDelay());e.attrTween&&e.attrTween("d",y)}function i(a){W.renderTitle()&&a.append("title").text(function(a){return W.title()(a.data)})}function j(a,b){W._applyLabelText(a),c.transition(a,W.transitionDuration(),W.transitionDelay()).attr("transform",function(a){return D(a,b)}).attr("text-anchor","middle")}function k(a,b){W.select("g.pie-slice._"+a).classed("highlight",b)}function l(a,b,c){if(W.renderLabel()){var d=a.enter().append("text").attr("class",function(a,b){var c=M+" "+N+" _"+b;return K&&(c+=" external"),c}).on("click",B).on("mouseover",function(a,b){k(b,!0)}).on("mouseout",function(a,b){k(b,!1)});j(d,c),K&&V&&m(b,c)}}function m(b,d){var e=H.selectAll("polyline."+M).data(b);e.enter().append("polyline").attr("class",function(a,b){return"pie-path _"+b+" "+M}).on("click",B).on("mouseover",function(a,b){k(b,!0)}).on("mouseout",function(a,b){k(b,!1)}),e.exit().remove();var f=a.svg.arc().outerRadius(F-T+K).innerRadius(F-T),g=c.transition(e,W.transitionDuration(),W.transitionDelay());g.attrTween?g.attrTween("points",function(b){var c=this._current||b;c={startAngle:c.startAngle,endAngle:c.endAngle};var e=a.interpolate(c,b);return this._current=e(0),function(a){var b=e(a);return[d.centroid(b),f.centroid(b)]}}):g.attr("points",function(a){return[d.centroid(a),f.centroid(a)]}),g.style("visibility",function(a){return a.endAngle-a.startAngle<1e-4?"hidden":"visible"})}function n(a,b){o(a,b),p(a,b),q(a)}function o(a,b){var d=H.selectAll("g."+M).data(a).select("path").attr("d",function(a,c){return C(a,c,b)}),e=c.transition(d,W.transitionDuration(),W.transitionDelay());e.attrTween&&e.attrTween("d",y),e.attr("fill",A)}function p(a,b){if(W.renderLabel()){var c=H.selectAll("text."+N).data(a);j(c,b),K&&V&&m(a,b)}}function q(a){W.renderTitle()&&H.selectAll("g."+M).data(a).select("title").text(function(a){return W.title()(a.data)})}function r(a,b){a.exit().remove(),b.exit().remove()}function s(){W.hasFilter()?W.selectAll("g."+M).each(function(a){u(a)?W.highlightSelected(this):W.fadeDeselected(this)}):W.selectAll("g."+M).each(function(){W.resetHighlight(this)})}function t(){return a.svg.arc().outerRadius(F-T).innerRadius(S)}function u(a){return W.hasFilter(W.cappedKeyAccessor(a.data))}function v(){return a.layout.pie().sort(null).value(W.cappedValueAccessor)}function w(a){var b=a.endAngle-a.startAngle;return isNaN(b)||b<U}function x(a){return 0===W.cappedValueAccessor(a)}function y(b){b.innerRadius=S;var c=this._current;c=z(c)?{startAngle:0,endAngle:0}:{startAngle:c.startAngle,endAngle:c.endAngle};var d=a.interpolate(c,b);return this._current=d(0),function(a){return C(d(a),0,t())}}function z(a){return!a||isNaN(a.startAngle)||isNaN(a.endAngle)}function A(a,b){return W.getColor(a.data,b)}function B(a,b){H.attr("class")!==Q&&W.onClick(a.data,b)}function C(a,b,c){var d=c(a,b);return d.indexOf("NaN")>=0&&(d="M0,0"),d}function D(b,c){var d;return d=K?a.svg.arc().outerRadius(F-T+K).innerRadius(F-T+K).centroid(b):c.centroid(b),isNaN(d[0])||isNaN(d[1])?"translate(0,0)":"translate("+d+")"}function E(b,c){W.selectAll("g.pie-slice").each(function(d){b.name===d.data.key&&a.select(this).classed("highlight",c)})}var F,G,H,I,J,K,L=.5,M="pie-slice",N="pie-label",O="pie-slice-group",P="pie-label-group",Q="empty-chart",R="empty",S=0,T=0,U=L,V=!1,W=c.capMixin(c.colorMixin(c.baseMixin({})));return W.colorAccessor(W.cappedKeyAccessor),W.title(function(a){return W.cappedKeyAccessor(a)+": "+W.cappedValueAccessor(a)}),W.slicesCap=W.cap,W.label(W.cappedKeyAccessor),W.renderLabel(!0),W.transitionDuration(350),W.transitionDelay(0),W._doRender=function(){return W.resetSvg(),H=W.svg().append("g").attr("transform","translate("+W.cx()+","+W.cy()+")"),H.append("g").attr("class",O),H.append("g").attr("class",P),e(),W},W._applyLabelText=function(a){a.text(function(a){var b=a.data;return!x(b)&&!w(a)||u(a)?W.label()(a.data):""})},W.externalRadiusPadding=function(a){return arguments.length?(T=a,W):T},W.innerRadius=function(a){return arguments.length?(S=a,W):S},W.radius=function(a){return arguments.length?(G=a,W):G},W.cx=function(a){return arguments.length?(I=a,W):I||W.width()/2},W.cy=function(a){return arguments.length?(J=a,W):J||W.height()/2},W._doRedraw=function(){return e(),W},W.minAngleForLabel=function(a){return arguments.length?(U=a,W):U},W.emptyTitle=function(a){return 0===arguments.length?R:(R=a,W)},W.externalLabels=function(a){return 0===arguments.length?K:(K=a?a:void 0,W)},W.drawPaths=function(a){return 0===arguments.length?V:(V=a,W)},W.legendables=function(){return W.data().map(function(a,b){var c={name:a.key,data:a.value,others:a.others,chart:W};return c.color=W.getColor(a,b),c})},W.legendHighlight=function(a){E(a,!0)},W.legendReset=function(a){E(a,!1)},W.legendToggle=function(a){W.onClick({key:a.name,others:a.others})},W.anchor(b,d)},c.barChart=function(b,d){function e(a){return c.utils.safeNumber(Math.abs(n.y()(a.y+a.y0)-n.y()(a.y0)))}function f(a,b,d){var f=a.selectAll("text.barLabel").data(d.values,c.pluck("x"));f.enter().append("text").attr("class","barLabel").attr("text-anchor","middle"),n.isOrdinal()&&(f.on("click",n.onClick),f.attr("cursor","pointer")),c.transition(f,n.transitionDuration(),n.transitionDelay()).attr("x",function(a){var b=n.x()(a.x);return p||(b+=j/2),c.utils.safeNumber(b)}).attr("y",function(a){var b=n.y()(a.y+a.y0);return a.y<0&&(b-=e(a)),c.utils.safeNumber(b-m)}).text(function(a){return n.label()(a)}),c.transition(f.exit(),n.transitionDuration(),n.transitionDelay()).attr("height",0).remove()}function g(a,b,d){var f=a.selectAll("rect.bar").data(d.values,c.pluck("x")),g=f.enter().append("rect").attr("class","bar").attr("fill",c.pluck("data",n.getColor)).attr("y",n.yAxisHeight()).attr("height",0);n.renderTitle()&&g.append("title").text(c.pluck("data",n.title(d.name))),n.isOrdinal()&&f.on("click",n.onClick),c.transition(f,n.transitionDuration(),n.transitionDelay()).attr("x",function(a){var b=n.x()(a.x);return p&&(b-=j/2),n.isOrdinal()&&void 0!==o&&(b+=o/2),c.utils.safeNumber(b)}).attr("y",function(a){var b=n.y()(a.y+a.y0);return a.y<0&&(b-=e(a)),c.utils.safeNumber(b)}).attr("width",j).attr("height",function(a){return e(a)}).attr("fill",c.pluck("data",n.getColor)).select("title").text(c.pluck("data",n.title(d.name))),c.transition(f.exit(),n.transitionDuration(),n.transitionDelay()).attr("x",function(a){return n.x()(a.x)}).attr("width",.9*j).remove()}function h(){if(void 0===j){var a=n.xUnitCount();j=n.isOrdinal()&&void 0===o?Math.floor(n.x().rangeBand()):o?Math.floor((n.xAxisLength()-(a-1)*o)/a):Math.floor(n.xAxisLength()/(1+n.barPadding())/a),(j===1/0||isNaN(j)||j<k)&&(j=k)}}function i(b,c){return function(){var d=a.select(this),e=d.attr("fill")===b;return c?!e:e}}var j,k=1,l=2,m=3,n=c.stackMixin(c.coordinateGridMixin({})),o=l,p=!1,q=!1;return c.override(n,"rescale",function(){return n._rescale(),j=void 0,n}),c.override(n,"render",function(){return n.round()&&p&&!q&&c.logger.warn("By default, brush rounding is disabled if bars are centered. See dc.js bar chart API documentation for details."),n._render()}),n.label(function(a){return c.utils.printSingleValue(a.y0+a.y)},!1),n.plotData=function(){var b=n.chartBodyG().selectAll("g.stack").data(n.data());h(),b.enter().append("g").attr("class",function(a,b){return"stack _"+b});var c=b.size()-1;b.each(function(b,d){var e=a.select(this);g(e,d,b),n.renderLabel()&&c===d&&f(e,d,b)})},n.fadeDeselectedArea=function(){var a=n.chartBodyG().selectAll("rect.bar"),b=n.brush().extent();if(n.isOrdinal())n.hasFilter()?(a.classed(c.constants.SELECTED_CLASS,function(a){return n.hasFilter(a.x)}),a.classed(c.constants.DESELECTED_CLASS,function(a){return!n.hasFilter(a.x)})):(a.classed(c.constants.SELECTED_CLASS,!1),a.classed(c.constants.DESELECTED_CLASS,!1));else if(n.brushIsEmpty(b))a.classed(c.constants.DESELECTED_CLASS,!1);else{var d=b[0],e=b[1];a.classed(c.constants.DESELECTED_CLASS,function(a){return a.x<d||a.x>=e})}},n.centerBar=function(a){return arguments.length?(p=a,n):p},c.override(n,"onClick",function(a){n._onClick(a.data)}),n.barPadding=function(a){return arguments.length?(n._rangeBandPadding(a),o=void 0,n):n._rangeBandPadding()},n._useOuterPadding=function(){return void 0===o},n.outerPadding=n._outerRangeBandPadding,n.gap=function(a){return arguments.length?(o=a,n):o},n.extendBrush=function(){var a=n.brush().extent();return!n.round()||p&&!q||(a[0]=a.map(n.round())[0],a[1]=a.map(n.round())[1],n.chartBodyG().select(".brush").call(n.brush().extent(a))),a},n.alwaysUseRounding=function(a){return arguments.length?(q=a,n):q},n.legendHighlight=function(a){n.isLegendableHidden(a)||n.g().selectAll("rect.bar").classed("highlight",i(a.color)).classed("fadeout",i(a.color,!0))},n.legendReset=function(){n.g().selectAll("rect.bar").classed("highlight",!1).classed("fadeout",!1)},c.override(n,"xAxisMax",function(){var a=this._xAxisMax();if("resolution"in n.xUnits()){var b=n.xUnits().resolution;a+=b}return a}),n.anchor(b,d)},c.lineChart=function(b,d){function e(a,b){return B.getColor.call(a,a.values,b)}function f(b,d){var f=a.svg.line().x(function(a){return B.x()(a.x)}).y(function(a){return B.y()(a.y+a.y0)}).interpolate(H).tension(I);s&&f.defined(s);var g=b.append("path").attr("class","line").attr("stroke",e);t&&g.attr("stroke-dasharray",t),c.transition(d.select("path.line"),B.transitionDuration(),B.transitionDelay()).attr("stroke",e).attr("d",function(a){return h(f(a.values))})}function g(b,d){if(C){var f=a.svg.area().x(function(a){return B.x()(a.x)}).y(function(a){return B.y()(a.y+a.y0)}).y0(function(a){return B.y()(a.y0)}).interpolate(H).tension(I);s&&f.defined(s),b.append("path").attr("class","area").attr("fill",e).attr("d",function(a){return h(f(a.values))}),c.transition(d.select("path.area"),B.transitionDuration(),B.transitionDelay()).attr("fill",e).attr("d",function(a){return h(f(a.values))})}}function h(a){return!a||a.indexOf("NaN")>=0?"M0,0":a}function i(b,d){if("always"===B.xyTipsOn()||!B.brushOn()&&B.xyTipsOn()){var e=v+"-list",f=b.select("g."+e);f.empty()&&(f=b.append("g").attr("class",e)),d.each(function(b,d){var e=b.values;s&&(e=e.filter(s));var g=f.select("g."+v+"._"+d);g.empty()&&(g=f.append("g").attr("class",v+" _"+d)),k(g);var h=g.selectAll("circle."+w).data(e,c.pluck("x"));h.enter().append("circle").attr("class",w).attr("r",n()).style("fill-opacity",F).style("stroke-opacity",G).attr("fill",B.getColor).on("mousemove",function(){var b=a.select(this);l(b),m(b,g)}).on("mouseout",function(){var b=a.select(this);o(b),p(g)}),h.call(q,b),c.transition(h,B.transitionDuration()).attr("cx",function(a){return c.utils.safeNumber(B.x()(a.x))}).attr("cy",function(a){return c.utils.safeNumber(B.y()(a.y+a.y0))}).attr("fill",B.getColor),h.exit().remove()})}}function j(b){b.each(function(b,d){var e=a.select(this),f=e.selectAll("text.lineLabel").data(b.values,c.pluck("x"));f.enter().append("text").attr("class","lineLabel").attr("text-anchor","middle"),c.transition(f,B.transitionDuration()).attr("x",function(a){return c.utils.safeNumber(B.x()(a.x))}).attr("y",function(a){var b=B.y()(a.y+a.y0)-A;return c.utils.safeNumber(b)}).text(function(a){return B.label()(a)}),c.transition(f.exit(),B.transitionDuration()).attr("height",0).remove()})}function k(a){var b=a.select("path."+x).empty()?a.append("path").attr("class",x):a.select("path."+x);b.style("display","none").attr("stroke-dasharray","5,5");var c=a.select("path."+y).empty()?a.append("path").attr("class",y):a.select("path."+y);c.style("display","none").attr("stroke-dasharray","5,5")}function l(a){return a.style("fill-opacity",.8),a.style("stroke-opacity",.8),a.attr("r",D),a}function m(a,b){var c=a.attr("cx"),d=a.attr("cy"),e=B._yAxisX()-B.margins().left,f="M"+e+" "+d+"L"+c+" "+d,g="M"+c+" "+B.yAxisHeight()+"L"+c+" "+d;b.select("path."+x).style("display","").attr("d",f),b.select("path."+y).style("display","").attr("d",g)}function n(){return E||D}function o(a){a.style("fill-opacity",F).style("stroke-opacity",G).attr("r",n())}function p(a){a.select("path."+x).style("display","none"),a.select("path."+y).style("display","none")}function q(a,b){B.renderTitle()&&(a.select("title").remove(),a.append("title").text(c.pluck("data",B.title(b.name))))}function r(b,c,d){return function(){var e=a.select(this),f=e.attr("stroke")===b&&e.attr("stroke-dasharray")===(c instanceof Array?c.join(","):null)||e.attr("fill")===b;return d?!f:f}}var s,t,u=5,v="dc-tooltip",w="dot",x="yRef",y="xRef",z=1e-6,A=3,B=c.stackMixin(c.coordinateGridMixin({})),C=!1,D=u,E=null,F=z,G=z,H="linear",I=.7,J=!0;return B.transitionDuration(500),B.transitionDelay(0),B._rangeBandPadding(1),B.plotData=function(){var a=B.chartBodyG(),b=a.select("g.stack-list");b.empty()&&(b=a.append("g").attr("class","stack-list"));var c=b.selectAll("g.stack").data(B.data()),d=c.enter().append("g").attr("class",function(a,b){return"stack _"+b});f(d,c),g(d,c),i(a,c),B.renderLabel()&&j(c)},B.interpolate=function(a){return arguments.length?(H=a,B):H},B.tension=function(a){return arguments.length?(I=a,B):I},B.defined=function(a){return arguments.length?(s=a,B):s},B.dashStyle=function(a){return arguments.length?(t=a,B):t},B.renderArea=function(a){return arguments.length?(C=a,B):C},B.label(function(a){return c.utils.printSingleValue(a.y0+a.y)},!1),B.xyTipsOn=function(a){return arguments.length?(J=a,B):J},B.dotRadius=function(a){return arguments.length?(D=a,B):D},B.renderDataPoints=function(a){return arguments.length?(a?(F=a.fillOpacity||.8,G=a.strokeOpacity||.8,E=a.radius||2):(F=z,G=z,E=null),B):{fillOpacity:F,strokeOpacity:G,radius:E}},B.legendHighlight=function(a){B.isLegendableHidden(a)||B.g().selectAll("path.line, path.area").classed("highlight",r(a.color,a.dashstyle)).classed("fadeout",r(a.color,a.dashstyle,!0))},B.legendReset=function(){B.g().selectAll("path.line, path.area").classed("highlight",!1).classed("fadeout",!1)},c.override(B,"legendables",function(){var a=B._legendables();return t?a.map(function(a){return a.dashstyle=t,a}):a}),B.anchor(b,d)},c.dataCount=function(b,d){var e=a.format(",d"),f=c.baseMixin({}),g={some:"",all:""};return f.html=function(a){return arguments.length?(a.all&&(g.all=a.all),a.some&&(g.some=a.some),f):g},f.formatNumber=function(a){return arguments.length?(e=a,f):e},f._doRender=function(){var a=f.dimension().size(),b=f.group().value(),c=e(a),d=e(b);return a===b&&""!==g.all?f.root().html(g.all.replace("%total-count",c).replace("%filter-count",d)):""!==g.some?f.root().html(g.some.replace("%total-count",c).replace("%filter-count",d)):(f.selectAll(".total-count").text(c),f.selectAll(".filter-count").text(d)),f},f._doRedraw=function(){return f._doRender()},f.anchor(b,d)},c.dataTable=function(b,d){function e(){var a=!0;if(p.forEach(function(b){a&="function"==typeof b}),!a){var b=n.selectAll("thead").data([0]);b.enter().append("thead"),b.exit().remove();var c=b.selectAll("tr").data([0]);c.enter().append("tr"),c.exit().remove();var d=c.selectAll("th").data(p);d.enter().append("th"),d.exit().remove(),d.attr("class",m).html(function(a){return n._doColumnHeaderFormat(a)})}var e=n.root().selectAll("tbody").data(f(),function(a){return n.keyAccessor()(a)}),g=e.enter().append("tbody");return t===!0&&g.append("tr").attr("class",l).append("td").attr("class",i).attr("colspan",p.length).html(function(a){return n.keyAccessor()(a)}),e.exit().remove(),g}function f(){var b;return b=r===a.ascending?n.dimension().bottom(o):n.dimension().top(o),a.nest().key(n.group()).sortKeys(r).entries(b.sort(function(a,b){return r(q(a),q(b))}).slice(s,h))}function g(a){var b=a.order().selectAll("tr."+j).data(function(a){return a.values}),c=b.enter().append("tr").attr("class",j);return p.forEach(function(a,b){c.append("td").attr("class",k+" _"+b).html(function(b){return n._doColumnValueFormat(a,b)})}),b.exit().remove(),b}var h,i="dc-table-label",j="dc-table-row",k="dc-table-column",l="dc-table-group",m="dc-table-head",n=c.baseMixin({}),o=25,p=[],q=function(a){return a},r=a.ascending,s=0,t=!0;return n._doRender=function(){return n.selectAll("tbody").remove(),g(e()),n},n._doColumnValueFormat=function(a,b){return"function"==typeof a?a(b):"string"==typeof a?b[a]:a.format(b)},n._doColumnHeaderFormat=function(a){return"function"==typeof a?n._doColumnHeaderFnToString(a):"string"==typeof a?n._doColumnHeaderCapitalize(a):String(a.label)},n._doColumnHeaderCapitalize=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},n._doColumnHeaderFnToString=function(a){var b=String(a),c=b.indexOf("return ");if(c>=0){var d=b.lastIndexOf(";");if(d>=0){b=b.substring(c+7,d);var e=b.indexOf("numberFormat");e>=0&&(b=b.replace("numberFormat",""))}}return b},n._doRedraw=function(){return n._doRender()},n.size=function(a){return arguments.length?(o=a,n):o},n.beginSlice=function(a){return arguments.length?(s=a,n):s},n.endSlice=function(a){return arguments.length?(h=a,n):h},n.columns=function(a){return arguments.length?(p=a,n):p},n.sortBy=function(a){return arguments.length?(q=a,n):q},n.order=function(a){return arguments.length?(r=a,n):r},n.showGroups=function(a){return arguments.length?(t=a,n):t},n.anchor(b,d)},c.dataGrid=function(b,d){function e(){var a=m.root().selectAll("div."+l).data(f(),function(a){return m.keyAccessor()(a)}),b=a.enter().append("div").attr("class",l);return s&&b.html(function(a){return s(a)}),a.exit().remove(),b}function f(){var b=m.dimension().top(n);return a.nest().key(m.group()).sortKeys(q).entries(b.sort(function(a,b){return q(p(a),p(b))}).slice(r,h))}function g(a){var b=a.order().selectAll("div."+j).data(function(a){return a.values});return b.enter().append("div").attr("class",j).html(function(a){return o(a)}),b.exit().remove(),b}var h,i="dc-grid-label",j="dc-grid-item",k="dc-grid-group",l="dc-grid-top",m=c.baseMixin({}),n=999,o=function(a){return"you need to provide an html() handling param: "+JSON.stringify(a)},p=function(a){return a},q=a.ascending,r=0,s=function(a){return"<div class='"+k+"'><h1 class='"+i+"'>"+m.keyAccessor()(a)+"</h1></div>"};return m._doRender=function(){return m.selectAll("div."+l).remove(),g(e()),m},m._doRedraw=function(){return m._doRender()},m.beginSlice=function(a){return arguments.length?(r=a,m):r},m.endSlice=function(a){return arguments.length?(h=a,m):h},m.size=function(a){return arguments.length?(n=a,m):n},m.html=function(a){return arguments.length?(o=a,m):o},m.htmlGroup=function(a){return arguments.length?(s=a,m):s},m.sortBy=function(a){return arguments.length?(p=a,m):p},m.order=function(a){return arguments.length?(q=a,m):q},m.anchor(b,d)},c.bubbleChart=function(a,b){function d(a){var b=a.enter().append("g");b.attr("class",i.BUBBLE_NODE_CLASS).attr("transform",j).append("circle").attr("class",function(a,b){return i.BUBBLE_CLASS+" _"+b}).on("click",i.onClick).attr("fill",i.getColor).attr("r",0),c.transition(a,i.transitionDuration(),i.transitionDelay()).select("circle."+i.BUBBLE_CLASS).attr("r",function(a){return i.bubbleR(a)}).attr("opacity",function(a){return i.bubbleR(a)>0?1:0}),i._doRenderLabel(b),i._doRenderTitles(b)}function e(a){c.transition(a,i.transitionDuration(),i.transitionDelay()).attr("transform",j).select("circle."+i.BUBBLE_CLASS).attr("fill",i.getColor).attr("r",function(a){return i.bubbleR(a)}).attr("opacity",function(a){return i.bubbleR(a)>0?1:0}),i.doUpdateLabels(a),i.doUpdateTitles(a)}function f(a){a.exit().remove()}function g(a){var b=i.x()(i.keyAccessor()(a));return isNaN(b)&&(b=0),b}function h(a){var b=i.y()(i.valueAccessor()(a));return isNaN(b)&&(b=0),b}var i=c.bubbleMixin(c.coordinateGridMixin({}));i.transitionDuration(750),i.transitionDelay(0);var j=function(a){return"translate("+g(a)+","+h(a)+")"};return i.plotData=function(){i.calculateRadiusDomain(),i.r().range([i.MIN_RADIUS,i.xAxisLength()*i.maxBubbleRelativeSize()]);var a=i.data(),b=i.chartBodyG().selectAll("g."+i.BUBBLE_NODE_CLASS).data(a,function(a){return a.key});i.sortBubbleSize()&&b.order(),d(b),e(b),f(b),i.fadeDeselectedArea()},i.renderBrush=function(){},i.redrawBrush=function(){i.fadeDeselectedArea()},i.anchor(a,b)},c.compositeChart=function(b,d){function e(a,b){var c,d,e,g,h;return a&&(c=m(),d=p()),b&&(e=n(),g=q()),w.alignYAxes()&&a&&b&&(h=f(c,d,e,g)),h||{lyAxisMin:c,lyAxisMax:d,ryAxisMin:e,ryAxisMax:g}}function f(a,b,c,d){var e=(d-c)/(b-a);return{lyAxisMin:Math.min(a,c/e),lyAxisMax:Math.max(b,d/e),ryAxisMin:Math.min(c,a*e),ryAxisMax:Math.max(d,b*e)}}function g(b){var c=void 0===w.rightY()||w.elasticY(),d=c||w.resizing();void 0===w.rightY()&&w.rightY(a.scale.linear()),c&&w.rightY().domain([b.ryAxisMin,b.ryAxisMax]),d&&w.rightY().rangeRound([w.yAxisHeight(),0]),w.rightY().range([w.yAxisHeight(),0]),w.rightYAxis(w.rightYAxis().scale(w.rightY())),w.rightYAxis().orient("right")}function h(b){var c=void 0===w.y()||w.elasticY(),d=c||w.resizing();void 0===w.y()&&w.y(a.scale.linear()),c&&w.y().domain([b.lyAxisMin,b.lyAxisMax]),d&&w.y().rangeRound([w.yAxisHeight(),0]),w.y().range([w.yAxisHeight(),0]),w.yAxis(w.yAxis().scale(w.y())),w.yAxis().orient("left")}function i(a,b){a._generateG(w.g()),a.g().attr("class",u+" _"+b)}function j(){return x.filter(function(a){return!a.useRightYAxis()})}function k(){return x.filter(function(a){return a.useRightYAxis()})}function l(a){return a.map(function(a){return a.yAxisMin()})}function m(){return a.min(l(j()))}function n(){return a.min(l(k()))}function o(a){return a.map(function(a){return a.yAxisMax()})}function p(){return c.utils.add(a.max(o(j())),w.yAxisPadding())}function q(){return c.utils.add(a.max(o(k())),w.yAxisPadding())}function r(){return x.map(function(a){return a.xAxisMin()})}function s(){return x.map(function(a){return a.xAxisMax()})}var t,u="sub",v=12,w=c.coordinateGridMixin({}),x=[],y={},z=!1,A=!0,B=!1,C=a.svg.axis(),D=0,E=v,F=!1;return w._mandatoryAttributes([]),w.transitionDuration(500),w.transitionDelay(0),c.override(w,"_generateG",function(){for(var a=this.__generateG(),b=0;b<x.length;++b){var c=x[b];i(c,b),c.dimension()||c.dimension(w.dimension()),c.group()||c.group(w.group()),c.chartGroup(w.chartGroup()),c.svg(w.svg()),c.xUnits(w.xUnits()),c.transitionDuration(w.transitionDuration(),w.transitionDelay()),c.brushOn(w.brushOn()),c.renderTitle(w.renderTitle()),c.elasticX(w.elasticX())}return a}),w._brushing=function(){for(var a=w.extendBrush(),b=w.brushIsEmpty(a),c=0;c<x.length;++c)x[c].replaceFilter(b?null:a)},w._prepareYAxis=function(){var a=0!==j().length,b=0!==k().length,c=e(a,b);a&&h(c),b&&g(c),j().length>0&&!F?w._renderHorizontalGridLinesForAxis(w.g(),w.y(),w.yAxis()):k().length>0&&w._renderHorizontalGridLinesForAxis(w.g(),t,C)},w.renderYAxis=function(){0!==j().length&&(w.renderYAxisAt("y",w.yAxis(),w.margins().left),w.renderYAxisLabel("y",w.yAxisLabel(),-90)),0!==k().length&&(w.renderYAxisAt("yr",w.rightYAxis(),w.width()-w.margins().right),w.renderYAxisLabel("yr",w.rightYAxisLabel(),90,w.width()-E))},w.plotData=function(){for(var a=0;a<x.length;++a){var b=x[a];b.g()||i(b,a),z&&b.colors(w.colors()),b.x(w.x()),b.xAxis(w.xAxis()),b.useRightYAxis()?(b.y(w.rightY()),b.yAxis(w.rightYAxis())):(b.y(w.y()),b.yAxis(w.yAxis())),b.plotData(),b._activateRenderlets()}},w.useRightAxisGridLines=function(a){return arguments?(F=a,w):F},w.childOptions=function(a){return arguments.length?(y=a,x.forEach(function(a){a.options(y)}),w):y},w.fadeDeselectedArea=function(){for(var a=0;a<x.length;++a){var b=x[a];b.brush(w.brush()),b.fadeDeselectedArea()}},w.rightYAxisLabel=function(a,b){return arguments.length?(D=a,w.margins().right-=E,E=void 0===b?v:b,w.margins().right+=E,w):D},w.compose=function(a){return x=a,x.forEach(function(a){a.height(w.height()),a.width(w.width()),a.margins(w.margins()),A&&a.title(w.title()),a.options(y)}),w},w.children=function(){return x},w.shareColors=function(a){return arguments.length?(z=a,w):z},w.shareTitle=function(a){return arguments.length?(A=a,w):A},w.rightY=function(a){return arguments.length?(t=a,w.rescale(),w):t},w.alignYAxes=function(a){return arguments.length?(B=a,w.rescale(),w):B},delete w.yAxisMin,delete w.yAxisMax,c.override(w,"xAxisMin",function(){return c.utils.subtract(a.min(r()),w.xAxisPadding())}),c.override(w,"xAxisMax",function(){return c.utils.add(a.max(s()),w.xAxisPadding())}),w.legendables=function(){return x.reduce(function(a,b){return z&&b.colors(w.colors()),a.push.apply(a,b.legendables()),a},[])},w.legendHighlight=function(a){for(var b=0;b<x.length;++b){var c=x[b];c.legendHighlight(a)}},w.legendReset=function(a){for(var b=0;b<x.length;++b){var c=x[b];c.legendReset(a)}},w.legendToggle=function(){console.log("composite should not be getting legendToggle itself")},w.rightYAxis=function(a){return arguments.length?(C=a,w):C},w.anchor(b,d)},c.seriesChart=function(b,d){function e(b,c){return a.ascending(i.keyAccessor()(b),i.keyAccessor()(c))}function f(a){j[a].g()&&j[a].g().remove(),delete j[a]}function g(){Object.keys(j).map(f),j={}}var h,i=c.compositeChart(b,d),j={},k=c.lineChart,l=a.ascending,m=e;return i._mandatoryAttributes().push("seriesAccessor","chart"),i.shareColors(!0),i._preprocessData=function(){var b,c=[],e=a.nest().key(h);l&&e.sortKeys(l),m&&e.sortValues(m);var g=e.entries(i.data()),n=g.map(function(e,f){var g=j[e.key]||k.call(i,i,d,e.key,f);return j[e.key]||(b=!0),j[e.key]=g,c.push(e.key),g.dimension(i.dimension()).group({all:a.functor(e.values)},e.key).keyAccessor(i.keyAccessor()).valueAccessor(i.valueAccessor()).brushOn(i.brushOn())});Object.keys(j).filter(function(a){return c.indexOf(a)===-1}).forEach(function(a){f(a),b=!0}),i._compose(n),b&&i.legend()&&i.legend().render()},i.chart=function(a){return arguments.length?(k=a,g(),i):k},i.seriesAccessor=function(a){return arguments.length?(h=a,g(),i):h},i.seriesSort=function(a){return arguments.length?(l=a,g(),i):l},i.valueSort=function(a){return arguments.length?(m=a,g(),i):m},i._compose=i.compose,delete i.compose,i},c.geoChoroplethChart=function(b,d){function e(a){var b=f();if(g(a)){var c=h(a);n(c,a,b),o(c,a,b)}}function f(){for(var a={},b=p.data(),c=0;c<b.length;++c)a[p.keyAccessor()(b[c])]=p.valueAccessor()(b[c]);return a}function g(a){return m(a).keyAccessor}function h(a){var b=p.svg().selectAll(i(a)).classed("selected",function(b){return j(a,b)}).classed("deselected",function(b){return k(a,b)}).attr("class",function(b){var d=m(a).name,e=c.utils.nameToId(m(a).keyAccessor(b)),f=d+" "+e;return j(a,b)&&(f+=" selected"),k(a,b)&&(f+=" deselected"),f});return b}function i(a){return"g.layer"+a+" g."+m(a).name}function j(a,b){return p.hasFilter()&&p.hasFilter(l(a,b))}function k(a,b){return p.hasFilter()&&!p.hasFilter(l(a,b))}function l(a,b){return m(a).keyAccessor(b)}function m(a){return s[a]}function n(b,d,e){var f=b.select("path").attr("fill",function(){var b=a.select(this).attr("fill");return b?b:"none"}).on("click",function(a){return p.onClick(a,d)});c.transition(f,p.transitionDuration(),p.transitionDelay()).attr("fill",function(a,b){return p.getColor(e[m(d).keyAccessor(a)],b)})}function o(a,b,c){p.renderTitle()&&a.selectAll("title").text(function(a){var d=l(b,a),e=c[d];return p.title()({key:d,value:e})})}var p=c.colorMixin(c.baseMixin({}));p.colorAccessor(function(a){return a||0});var q,r=a.geo.path(),s=[];return p._doRender=function(){p.resetSvg();for(var a=0;a<s.length;++a){var b=p.svg().append("g").attr("class","layer"+a),c=b.selectAll("g."+m(a).name).data(m(a).data).enter().append("g").attr("class",m(a).name);c.append("path").attr("fill","white").attr("d",r),c.append("title"),e(a)}q=!1},p.onClick=function(a,b){var d=m(b).keyAccessor(a);c.events.trigger(function(){p.filter(d),p.redrawGroup()})},p._doRedraw=function(){for(var a=0;a<s.length;++a)e(a),q&&p.svg().selectAll("g."+m(a).name+" path").attr("d",r);q=!1},p.overlayGeoJson=function(a,b,c){for(var d=0;d<s.length;++d)if(s[d].name===b)return s[d].data=a,s[d].keyAccessor=c,p;return s.push({name:b,data:a,keyAccessor:c}),p},p.projection=function(a){return r.projection(a),q=!0,p},p.geoJsons=function(){return s},p.geoPath=function(){return r},p.removeGeoJson=function(a){for(var b=[],c=0;c<s.length;++c){var d=s[c];d.name!==a&&b.push(d)}return s=b,p},p.anchor(b,d)},c.bubbleOverlay=function(b,d){function e(){return j=n.select("g."+k),j.empty()&&(j=n.svg().append("g").attr("class",k)),j}function f(){var a=g();n.calculateRadiusDomain(),o.forEach(function(b){var d=h(b,a),e=d.select("circle."+m);e.empty()&&(e=d.append("circle").attr("class",m).attr("r",0).attr("fill",n.getColor).on("click",n.onClick)),c.transition(e,n.transitionDuration(),n.transitionDelay()).attr("r",function(a){return n.bubbleR(a)}),n._doRenderLabel(d),n._doRenderTitles(d)})}function g(){var a={};return n.data().forEach(function(b){a[n.keyAccessor()(b)]=b}),a}function h(a,b){var d=l+" "+c.utils.nameToId(a.name),e=j.select("g."+c.utils.nameToId(a.name));return e.empty()&&(e=j.append("g").attr("class",d).attr("transform","translate("+a.x+","+a.y+")")),e.datum(b[a.name]),e}function i(){var a=g();n.calculateRadiusDomain(),o.forEach(function(b){var d=h(b,a),e=d.select("circle."+m);c.transition(e,n.transitionDuration(),n.transitionDelay()).attr("r",function(a){return n.bubbleR(a)}).attr("fill",n.getColor),n.doUpdateLabels(d),n.doUpdateTitles(d)})}var j,k="bubble-overlay",l="node",m="bubble",n=c.bubbleMixin(c.baseMixin({})),o=[];return n.transitionDuration(750),n.transitionDelay(0),n.radiusValueAccessor(function(a){return a.value}),n.point=function(a,b,c){return o.push({name:a,x:b,y:c}),n},n._doRender=function(){return j=e(),n.r().range([n.MIN_RADIUS,n.width()*n.maxBubbleRelativeSize()]),f(),n.fadeDeselectedArea(),n},n._doRedraw=function(){return i(),n.fadeDeselectedArea(),n},n.debug=function(b){if(b){var d=n.select("g."+c.constants.DEBUG_GROUP_CLASS); +d.empty()&&(d=n.svg().append("g").attr("class",c.constants.DEBUG_GROUP_CLASS));var e=d.append("text").attr("x",10).attr("y",20);d.append("rect").attr("width",n.width()).attr("height",n.height()).on("mousemove",function(){var b=a.mouse(d.node()),c=b[0]+", "+b[1];e.text(c)})}else n.selectAll(".debug").remove();return n},n.anchor(b,d),n},c.rowChart=function(b,d){function e(){if(!t||u){var b=a.extent(v,G.cappedValueAccessor);b[0]>0&&(b[0]=0),b[1]<0&&(b[1]=0),t=a.scale.linear().domain(b).range([0,G.effectiveWidth()])}H.scale(t)}function f(){var a=s.select("g.axis");e(),a.empty()&&(a=s.append("g").attr("class","axis")),a.attr("transform","translate(0, "+G.effectiveHeight()+")"),c.transition(a,G.transitionDuration(),G.transitionDelay()).call(H)}function g(){s.selectAll("g.tick").select("line.grid-line").remove(),s.selectAll("g.tick").append("line").attr("class","grid-line").attr("x1",0).attr("y1",0).attr("x2",0).attr("y2",function(){return-G.effectiveHeight()})}function h(){v=G.data(),f(),g();var a=s.selectAll("g."+D).data(v);i(a),j(a),l(a)}function i(a){var b=a.enter().append("g").attr("class",function(a,b){return D+" _"+b});b.append("rect").attr("width",0),n(b)}function j(a){a.exit().remove()}function k(){var a=t(0);return a===-(1/0)||a!==a?t(1):a}function l(a){var b,d=v.length;b=C?C:(G.effectiveHeight()-(d+1)*B)/d,y||(x=b/2);var e=a.attr("transform",function(a,c){return"translate(0,"+((c+1)*B+c*b)+")"}).select("rect").attr("height",b).attr("fill",G.getColor).on("click",p).classed("deselected",function(a){return!!G.hasFilter()&&!r(a)}).classed("selected",function(a){return!!G.hasFilter()&&r(a)});c.transition(e,G.transitionDuration(),G.transitionDelay()).attr("width",function(a){return Math.abs(k()-t(G.valueAccessor()(a)))}).attr("transform",q),m(a),o(a)}function m(a){G.renderTitle()&&(a.select("title").remove(),a.append("title").text(G.title()))}function n(a){G.renderLabel()&&a.append("text").on("click",p),G.renderTitleLabel()&&a.append("text").attr("class",E).on("click",p)}function o(a){if(G.renderLabel()){var b=a.select("text").attr("x",w).attr("y",x).attr("dy",z).on("click",p).attr("class",function(a,b){return D+" _"+b}).text(function(a){return G.label()(a)});c.transition(b,G.transitionDuration(),G.transitionDelay()).attr("transform",q)}if(G.renderTitleLabel()){var d=a.select("."+E).attr("x",G.effectiveWidth()-A).attr("y",x).attr("dy",z).attr("text-anchor","end").on("click",p).attr("class",function(a,b){return E+" _"+b}).text(function(a){return G.title()(a)});c.transition(d,G.transitionDuration(),G.transitionDelay()).attr("transform",q)}}function p(a){G.onClick(a)}function q(a){var b=t(G.cappedValueAccessor(a)),c=k(),d=b>c?c:b;return"translate("+d+",0)"}function r(a){return G.hasFilter(G.cappedKeyAccessor(a))}var s,t,u,v,w=10,x=15,y=!1,z="0.35em",A=2,B=5,C=!1,D="row",E="titlerow",F=!1,G=c.capMixin(c.marginMixin(c.colorMixin(c.baseMixin({})))),H=a.svg.axis().orient("bottom");return G.rowsCap=G.cap,G._doRender=function(){return G.resetSvg(),s=G.svg().append("g").attr("transform","translate("+G.margins().left+","+G.margins().top+")"),h(),G},G.title(function(a){return G.cappedKeyAccessor(a)+": "+G.cappedValueAccessor(a)}),G.label(G.cappedKeyAccessor),G.x=function(a){return arguments.length?(t=a,G):t},G.renderTitleLabel=function(a){return arguments.length?(F=a,G):F},G._doRedraw=function(){return h(),G},G.xAxis=function(){return H},G.fixedBarHeight=function(a){return arguments.length?(C=a,G):C},G.gap=function(a){return arguments.length?(B=a,G):B},G.elasticX=function(a){return arguments.length?(u=a,G):u},G.labelOffsetX=function(a){return arguments.length?(w=a,G):w},G.labelOffsetY=function(a){return arguments.length?(x=a,y=!0,G):x},G.titleLabelOffsetX=function(a){return arguments.length?(A=a,G):A},G.anchor(b,d)},c.legend=function(){function a(){return k+j}var b,d,e,f=2,g={},h=0,i=0,j=12,k=5,l=!1,m=560,n=70,o=!1,p=c.pluck("name");return g.parent=function(a){return arguments.length?(b=a,g):b},g.render=function(){b.svg().select("g.dc-legend").remove(),e=b.svg().append("g").attr("class","dc-legend").attr("transform","translate("+h+","+i+")");var g=b.legendables();void 0!==d&&(g=g.slice(0,d));var q=e.selectAll("g.dc-legend-item").data(g).enter().append("g").attr("class","dc-legend-item").on("mouseover",function(a){b.legendHighlight(a)}).on("mouseout",function(a){b.legendReset(a)}).on("click",function(a){a.chart.legendToggle(a)});e.selectAll("g.dc-legend-item").classed("fadeout",function(a){return a.chart.isLegendableHidden(a)}),g.some(c.pluck("dashstyle"))?q.append("line").attr("x1",0).attr("y1",j/2).attr("x2",j).attr("y2",j/2).attr("stroke-width",2).attr("stroke-dasharray",c.pluck("dashstyle")).attr("stroke",c.pluck("color")):q.append("rect").attr("width",j).attr("height",j).attr("fill",function(a){return a?a.color:"blue"}),q.append("text").text(p).attr("x",j+f).attr("y",function(){return j/2+(this.clientHeight?this.clientHeight:13)/2-2});var r=0,s=0;q.attr("transform",function(b,c){if(l){var d=o===!0?this.getBBox().width+k:n;r+d>m&&r>0&&(++s,r=0);var e="translate("+r+","+s*a()+")";return r+=d,e}return"translate(0,"+c*a()+")"})},g.x=function(a){return arguments.length?(h=a,g):h},g.y=function(a){return arguments.length?(i=a,g):i},g.gap=function(a){return arguments.length?(k=a,g):k},g.itemHeight=function(a){return arguments.length?(j=a,g):j},g.horizontal=function(a){return arguments.length?(l=a,g):l},g.legendWidth=function(a){return arguments.length?(m=a,g):m},g.itemWidth=function(a){return arguments.length?(n=a,g):n},g.autoItemWidth=function(a){return arguments.length?(o=a,g):o},g.legendText=function(a){return arguments.length?(p=a,g):p},g.maxItems=function(a){return arguments.length?(d=c.utils.isNumber(a)?a:void 0,g):d},g},c.scatterPlot=function(b,d){function e(a,b){return j(a)?v[b]?Math.pow(n,2):Math.pow(o,2):Math.pow(r,2)}function f(a,b){h.renderTitle()&&(a.selectAll("title").remove(),a.append("title").text(function(a){return h.title()(a)}))}function g(b,d){var e=h.chartBodyG().selectAll(".chart-body path.symbol").filter(function(){return b(a.select(this))}),f=i.size();i.size(Math.pow(d,2)),c.transition(e,h.transitionDuration(),h.transitionDelay()).attr("d",i),i.size(f)}var h=c.coordinateGridMixin({}),i=a.svg.symbol(),j=function(a){return a.value},k=h.keyAccessor();h.keyAccessor(function(a){return k(a)[0]}),h.valueAccessor(function(a){return k(a)[1]}),h.colorAccessor(function(){return h._groupName}),h.title(function(a){return h.keyAccessor()(a)+","+h.valueAccessor()(a)+": "+h.existenceAccessor()(a)});var l=function(a){return"translate("+h.x()(h.keyAccessor()(a))+","+h.y()(h.valueAccessor()(a))+")"},m=7,n=5,o=3,p=null,q=1,r=0,s=0,t=1,u=null,v=[];return i.size(e),c.override(h,"_filter",function(a){return arguments.length?h.__filter(c.filters.RangedTwoDimensionalFilter(a)):h.__filter()}),h.plotData=function(){var a=h.chartBodyG().selectAll("path.symbol").data(h.data());a.enter().append("path").attr("class","symbol").attr("opacity",0).attr("fill",h.getColor).attr("transform",l),a.call(f,h.data()),a.each(function(a,b){v[b]=!h.filter()||h.filter().isFiltered([a.key[0],a.key[1]])}),c.transition(a,h.transitionDuration(),h.transitionDelay()).attr("opacity",function(a,b){return j(a)?v[b]?t:h.excludedOpacity():s}).attr("fill",function(a,b){return u&&!j(a)?u:h.excludedColor()&&!v[b]?h.excludedColor():h.getColor(a)}).attr("transform",l).attr("d",i),c.transition(a.exit(),h.transitionDuration(),h.transitionDelay()).attr("opacity",0).remove()},h.existenceAccessor=function(a){return arguments.length?(j=a,this):j},h.symbol=function(a){return arguments.length?(i.type(a),h):i.type()},h.customSymbol=function(a){return arguments.length?(i=a,i.size(e),h):i},h.symbolSize=function(a){return arguments.length?(n=a,h):n},h.highlightedSize=function(a){return arguments.length?(m=a,h):m},h.excludedSize=function(a){return arguments.length?(o=a,h):o},h.excludedColor=function(a){return arguments.length?(p=a,h):p},h.excludedOpacity=function(a){return arguments.length?(q=a,h):q},h.hiddenSize=h.emptySize=function(a){return arguments.length?(r=a,h):r},h.emptyColor=function(a){return arguments.length?(u=a,h):u},h.emptyOpacity=function(a){return arguments.length?(s=a,h):s},h.nonemptyOpacity=function(a){return arguments.length?(t=a,h):s},h.legendables=function(){return[{chart:h,name:h._groupName,color:h.getColor()}]},h.legendHighlight=function(b){g(function(a){return a.attr("fill")===b.color},m),h.chartBodyG().selectAll(".chart-body path.symbol").filter(function(){return a.select(this).attr("fill")!==b.color}).classed("fadeout",!0)},h.legendReset=function(b){g(function(a){return a.attr("fill")===b.color},n),h.chartBodyG().selectAll(".chart-body path.symbol").filter(function(){return a.select(this).attr("fill")!==b.color}).classed("fadeout",!1)},h.setHandlePaths=function(){},h.extendBrush=function(){var a=h.brush().extent();return h.round()&&(a[0]=a[0].map(h.round()),a[1]=a[1].map(h.round()),h.g().select(".brush").call(h.brush().extent(a))),a},h.brushIsEmpty=function(a){return h.brush().empty()||!a||a[0][0]>=a[1][0]||a[0][1]>=a[1][1]},h._brushing=function(){var a=h.extendBrush();if(h.redrawBrush(h.g()),h.brushIsEmpty(a))c.events.trigger(function(){h.filter(null),h.redrawGroup()});else{var b=c.filters.RangedTwoDimensionalFilter(a);c.events.trigger(function(){h.filter(null),h.filter(b),h.redrawGroup()},c.constants.EVENT_DELAY)}},h.setBrushY=function(a){a.call(h.brush().y(h.y()))},h.anchor(b,d)},c.numberDisplay=function(b,d){function e(a){if(!a.length)return null;var b=i._computeOrderedGroups(a);return b[b.length-1]}var f,g="number-display",h=a.format(".2s"),i=c.baseMixin({}),j={one:"",some:"",none:""};return i._mandatoryAttributes(["group"]),i.ordering(function(a){return a.value}),i.html=function(a){return arguments.length?(a.none?j.none=a.none:a.one?j.none=a.one:a.some&&(j.none=a.some),a.one?j.one=a.one:a.some&&(j.one=a.some),a.some?j.some=a.some:a.one&&(j.some=a.one),i):j},i.value=function(){return i.data()},i.data(function(a){var b=a.value?a.value():e(a.all());return i.valueAccessor()(b)}),i.transitionDuration(250),i.transitionDelay(0),i._doRender=function(){var b=i.value(),c=i.selectAll("."+g);c.empty()&&(c=c.data([0]).enter().append("span").attr("class",g)),c.transition().duration(i.transitionDuration()).delay(i.transitionDelay()).ease("quad-out-in").tween("text",function(){var c=isFinite(f)?f:0,d=a.interpolateNumber(c||0,b);return f=b,function(a){var c=null,e=i.formatNumber()(d(a));0===b&&""!==j.none?c=j.none:1===b&&""!==j.one?c=j.one:""!==j.some&&(c=j.some),this.innerHTML=c?c.replace("%number",e):e}})},i._doRedraw=function(){return i._doRender()},i.formatNumber=function(a){return arguments.length?(h=a,i):h},i.anchor(b,d)},c.heatMap=function(b,d){function e(a,b){var d=p.selectAll(".box-group").filter(function(c){return c.key[a]===b}),e=d.filter(function(a){return!p.hasFilter(a.key)});c.events.trigger(function(){var a=e.empty()?d:e,b=a.data().map(function(a){return c.filters.TwoDimensionalFilter(a.key)});p._filter([b]),p.redrawGroup()})}var f,g,h,i=6.75,j=a.ascending,k=a.ascending,l=a.scale.ordinal(),m=a.scale.ordinal(),n=i,o=i,p=c.colorMixin(c.marginMixin(c.baseMixin({})));p._mandatoryAttributes(["group"]),p.title(p.colorAccessor());var q=function(a){return a},r=function(a){return a};p.colsLabel=function(a){return arguments.length?(q=a,p):q},p.rowsLabel=function(a){return arguments.length?(r=a,p):r};var s=function(a){e(0,a)},t=function(a){e(1,a)},u=function(a){var b=a.key;c.events.trigger(function(){p.filter(b),p.redrawGroup()})};return c.override(p,"filter",function(a){return arguments.length?p._filter(c.filters.TwoDimensionalFilter(a)):p._filter()}),p.rows=function(a){return arguments.length?(h=a,p):h},p.rowOrdering=function(a){return arguments.length?(k=a,p):k},p.cols=function(a){return arguments.length?(g=a,p):g},p.colOrdering=function(a){return arguments.length?(j=a,p):j},p._doRender=function(){return p.resetSvg(),f=p.svg().append("g").attr("class","heatmap").attr("transform","translate("+p.margins().left+","+p.margins().top+")"),p._doRedraw()},p._doRedraw=function(){var a=p.data(),b=p.rows()||a.map(p.valueAccessor()),d=p.cols()||a.map(p.keyAccessor());k&&(b=b.sort(k)),j&&(d=d.sort(j)),b=m.domain(b),d=l.domain(d);var e=b.domain().length,g=d.domain().length,h=Math.floor(p.effectiveWidth()/g),i=Math.floor(p.effectiveHeight()/e);d.rangeRoundBands([0,p.effectiveWidth()]),b.rangeRoundBands([p.effectiveHeight(),0]);var q=f.selectAll("g.box-group").data(p.data(),function(a,b){return p.keyAccessor()(a,b)+"\0"+p.valueAccessor()(a,b)}),r=q.enter().append("g").attr("class","box-group");r.append("rect").attr("class","heat-box").attr("fill","white").on("click",p.boxOnClick()),p.renderTitle()&&(r.append("title"),q.select("title").text(p.title())),c.transition(q.select("rect"),p.transitionDuration(),p.transitionDelay()).attr("x",function(a,b){return d(p.keyAccessor()(a,b))}).attr("y",function(a,c){return b(p.valueAccessor()(a,c))}).attr("rx",n).attr("ry",o).attr("fill",p.getColor).attr("width",h).attr("height",i),q.exit().remove();var s=f.select("g.cols");s.empty()&&(s=f.append("g").attr("class","cols axis"));var t=s.selectAll("text").data(d.domain());t.enter().append("text").attr("x",function(a){return d(a)+h/2}).style("text-anchor","middle").attr("y",p.effectiveHeight()).attr("dy",12).on("click",p.xAxisOnClick()).text(p.colsLabel()),c.transition(t,p.transitionDuration(),p.transitionDelay()).text(p.colsLabel()).attr("x",function(a){return d(a)+h/2}).attr("y",p.effectiveHeight()),t.exit().remove();var u=f.select("g.rows");u.empty()&&(u=f.append("g").attr("class","rows axis"));var v=u.selectAll("text").data(b.domain());return v.enter().append("text").attr("dy",6).style("text-anchor","end").attr("x",0).attr("dx",-2).on("click",p.yAxisOnClick()).text(p.rowsLabel()),c.transition(v,p.transitionDuration(),p.transitionDelay()).text(p.rowsLabel()).attr("y",function(a){return b(a)+i/2}),v.exit().remove(),p.hasFilter()?p.selectAll("g.box-group").each(function(a){p.isSelectedNode(a)?p.highlightSelected(this):p.fadeDeselected(this)}):p.selectAll("g.box-group").each(function(){p.resetHighlight(this)}),p},p.boxOnClick=function(a){return arguments.length?(u=a,p):u},p.xAxisOnClick=function(a){return arguments.length?(s=a,p):s},p.yAxisOnClick=function(a){return arguments.length?(t=a,p):t},p.xBorderRadius=function(a){return arguments.length?(n=a,p):n},p.yBorderRadius=function(a){return arguments.length?(o=a,p):o},p.isSelectedNode=function(a){return p.hasFilter(a.key)},p.anchor(b,d)},function(){function b(a){return[0,a.length-1]}function c(b){return[a.quantile(b,.25),a.quantile(b,.5),a.quantile(b,.75)]}a.box=function(){function d(b){b.each(function(b,c){b=b.map(j).sort(a.ascending);var d=a.select(this),n=b.length,o=b[0],p=b[n-1],q=b.quartiles=l(b),r=k&&k.call(this,b,c),s=r&&r.map(function(a){return b[a]}),t=r?a.range(0,r[0]).concat(a.range(r[1]+1,n)):a.range(n),u=a.scale.linear().domain(i&&i.call(this,b,c)||[o,p]).range([f,0]),v=this.__chart__||a.scale.linear().domain([0,1/0]).range(u.range());this.__chart__=u;var w=d.selectAll("line.center").data(s?[s]:[]);w.enter().insert("line","rect").attr("class","center").attr("x1",e/2).attr("y1",function(a){return v(a[0])}).attr("x2",e/2).attr("y2",function(a){return v(a[1])}).style("opacity",1e-6).transition().duration(g).delay(h).style("opacity",1).attr("y1",function(a){return u(a[0])}).attr("y2",function(a){return u(a[1])}),w.transition().duration(g).delay(h).style("opacity",1).attr("x1",e/2).attr("x2",e/2).attr("y1",function(a){return u(a[0])}).attr("y2",function(a){return u(a[1])}),w.exit().transition().duration(g).delay(h).style("opacity",1e-6).attr("y1",function(a){return u(a[0])}).attr("y2",function(a){return u(a[1])}).remove();var x=d.selectAll("rect.box").data([q]);x.enter().append("rect").attr("class","box").attr("x",0).attr("y",function(a){return v(a[2])}).attr("width",e).attr("height",function(a){return v(a[0])-v(a[2])}).transition().duration(g).delay(h).attr("y",function(a){return u(a[2])}).attr("height",function(a){return u(a[0])-u(a[2])}),x.transition().duration(g).delay(h).attr("width",e).attr("y",function(a){return u(a[2])}).attr("height",function(a){return u(a[0])-u(a[2])});var y=d.selectAll("line.median").data([q[1]]);y.enter().append("line").attr("class","median").attr("x1",0).attr("y1",v).attr("x2",e).attr("y2",v).transition().duration(g).delay(h).attr("y1",u).attr("y2",u),y.transition().duration(g).delay(h).attr("x1",0).attr("x2",e).attr("y1",u).attr("y2",u);var z=d.selectAll("line.whisker").data(s||[]);z.enter().insert("line","circle, text").attr("class","whisker").attr("x1",0).attr("y1",v).attr("x2",e).attr("y2",v).style("opacity",1e-6).transition().duration(g).delay(h).attr("y1",u).attr("y2",u).style("opacity",1),z.transition().duration(g).delay(h).attr("x1",0).attr("x2",e).attr("y1",u).attr("y2",u).style("opacity",1),z.exit().transition().duration(g).delay(h).attr("y1",u).attr("y2",u).style("opacity",1e-6).remove();var A=d.selectAll("circle.outlier").data(t,Number);A.enter().insert("circle","text").attr("class","outlier").attr("r",5).attr("cx",e/2).attr("cy",function(a){return v(b[a])}).style("opacity",1e-6).transition().duration(g).delay(h).attr("cy",function(a){return u(b[a])}).style("opacity",1),A.transition().duration(g).delay(h).attr("cx",e/2).attr("cy",function(a){return u(b[a])}).style("opacity",1),A.exit().transition().duration(g).delay(h).attr("cy",function(a){return u(b[a])}).style("opacity",1e-6).remove();var B=m||u.tickFormat(8),C=d.selectAll("text.box").data(q);C.enter().append("text").attr("class","box").attr("dy",".3em").attr("dx",function(a,b){return 1&b?6:-6}).attr("x",function(a,b){return 1&b?e:0}).attr("y",v).attr("text-anchor",function(a,b){return 1&b?"start":"end"}).text(B).transition().duration(g).delay(h).attr("y",u),C.transition().duration(g).delay(h).text(B).attr("x",function(a,b){return 1&b?e:0}).attr("y",u);var D=d.selectAll("text.whisker").data(s||[]);D.enter().append("text").attr("class","whisker").attr("dy",".3em").attr("dx",6).attr("x",e).attr("y",v).text(B).style("opacity",1e-6).transition().duration(g).delay(h).attr("y",u).style("opacity",1),D.transition().duration(g).delay(h).text(B).attr("x",e).attr("y",u).style("opacity",1),D.exit().transition().duration(g).delay(h).attr("y",u).style("opacity",1e-6).remove()}),a.timer.flush()}var e=1,f=1,g=0,h=0,i=null,j=Number,k=b,l=c,m=null;return d.width=function(a){return arguments.length?(e=a,d):e},d.height=function(a){return arguments.length?(f=a,d):f},d.tickFormat=function(a){return arguments.length?(m=a,d):m},d.duration=function(a){return arguments.length?(g=a,d):g},d.domain=function(b){return arguments.length?(i=null===b?b:a.functor(b),d):i},d.value=function(a){return arguments.length?(j=a,d):j},d.whiskers=function(a){return arguments.length?(k=a,d):k},d.quartiles=function(a){return arguments.length?(l=a,d):l},d}}(),c.boxPlot=function(b,d){function e(a){return function(b){var c=b.quartiles[0],d=b.quartiles[2],e=(d-c)*a,f=-1,g=b.length;do++f;while(b[f]<c-e);do--g;while(b[g]>d+e);return[f,g]}}function f(a){var b=a.enter().append("g");b.attr("class","box").attr("transform",p).call(m).on("click",function(a){i.filter(i.keyAccessor()(a)),i.redrawGroup()})}function g(b){c.transition(b,i.transitionDuration(),i.transitionDelay()).attr("transform",p).call(m).each(function(){a.select(this).select("rect.box").attr("fill",i.getColor)})}function h(a){a.exit().remove().call(m)}var i=c.coordinateGridMixin({}),j=1.5,k=e,l=k(j),m=a.box(),n=null,o=function(a,b){return i.isOrdinal()?i.x().rangeBand():a/(1+i.boxPadding())/b};i.yAxisPadding(12),i.x(a.scale.ordinal()),i.xUnits(c.units.ordinal),i.data(function(a){return a.all().map(function(a){return a.map=function(b){return b.call(a,a)},a}).filter(function(a){var b=i.valueAccessor()(a);return 0!==b.length})}),i.boxPadding=i._rangeBandPadding,i.boxPadding(.8),i.outerPadding=i._outerRangeBandPadding,i.outerPadding(.5),i.boxWidth=function(b){return arguments.length?(o=a.functor(b),i):o};var p=function(a,b){var c=i.x()(i.keyAccessor()(a,b));return"translate("+c+", 0)"};return i._preprocessData=function(){i.elasticX()&&i.x().domain([])},i.plotData=function(){var a=o(i.effectiveWidth(),i.xUnitCount());m.whiskers(l).width(a).height(i.effectiveHeight()).value(i.valueAccessor()).domain(i.y().domain()).duration(i.transitionDuration()).tickFormat(n);var b=i.chartBodyG().selectAll("g.box").data(i.data(),i.keyAccessor());f(b),g(b),h(b),i.fadeDeselectedArea()},i.fadeDeselectedArea=function(){if(i.hasFilter())if(i.isOrdinal())i.g().selectAll("g.box").each(function(a){i.isSelectedNode(a)?i.highlightSelected(this):i.fadeDeselected(this)});else{var a=i.brush().extent(),b=a[0],c=a[1],d=i.keyAccessor();i.g().selectAll("g.box").each(function(a){var e=d(a);e<b||e>=c?i.fadeDeselected(this):i.highlightSelected(this)})}else i.g().selectAll("g.box").each(function(){i.resetHighlight(this)})},i.isSelectedNode=function(a){return i.hasFilter(i.keyAccessor()(a))},i.yAxisMin=function(){var b=a.min(i.data(),function(b){return a.min(i.valueAccessor()(b))});return c.utils.subtract(b,i.yAxisPadding())},i.yAxisMax=function(){var b=a.max(i.data(),function(b){return a.max(i.valueAccessor()(b))});return c.utils.add(b,i.yAxisPadding())},i.tickFormat=function(a){return arguments.length?(n=a,i):n},i.anchor(b,d)},c.selectMenu=function(b,d){function e(){var a=h.selectAll("option."+j).data(k.data(),function(a){return k.keyAccessor()(a)});return a.enter().append("option").classed(j,!0).attr("value",function(a){return k.keyAccessor()(a)}),a.text(k.title()),a.exit().remove(),h.selectAll("option."+j).sort(p),h.on("change",f),a}function f(b,c){var d,e=a.event.target;if(e.selectedOptions){var f=Array.prototype.slice.call(e.selectedOptions);d=f.map(function(a){return a.value})}else{var g=[].slice.call(a.event.target.options);d=g.filter(function(a){return a.selected}).map(function(a){return a.value})}1===d.length&&""===d[0]?d=n||null:m||1!==d.length||(d=d[0]),k.onChange(d)}function g(){m?h.attr("multiple",!0):h.attr("multiple",null),null!==o?h.attr("size",o):h.attr("size",null)}var h,i="dc-select-menu",j="dc-select-option",k=c.baseMixin({}),l="Select all",m=!1,n=null,o=null,p=function(a,b){return k.keyAccessor()(a)>k.keyAccessor()(b)?1:k.keyAccessor()(b)>k.keyAccessor()(a)?-1:0},q=function(a){return k.valueAccessor()(a)>0};k.data(function(a){return a.all().filter(q)}),k._doRender=function(){return k.select("select").remove(),h=k.root().append("select").classed(i,!0),h.append("option").text(l).attr("value",""),k._doRedraw(),k};var r=window.navigator.userAgent;return r.indexOf("Trident/")>0&&r.indexOf("MSIE")===-1&&(k.redraw=k.render),k._doRedraw=function(){return g(),e(),k.hasFilter()&&m?h.selectAll("option").property("selected",function(a){return"undefined"!=typeof a&&k.filters().indexOf(String(k.keyAccessor()(a)))>=0}):k.hasFilter()?h.property("value",k.filter()):h.property("value",""),k},k.onChange=function(a){a&&m?k.replaceFilter([a]):a?k.replaceFilter(a):k.filterAll(),c.events.trigger(function(){k.redrawGroup()})},k.order=function(a){return arguments.length?(p=a,k):p},k.promptText=function(a){return arguments.length?(l=a,k):l},k.filterDisplayed=function(a){return arguments.length?(q=a,k):q},k.multiple=function(a){return arguments.length?(m=a,k):m},k.promptValue=function(a){return arguments.length?(n=a,k):n},k.numberVisible=function(a){return arguments.length?(o=a,k):o},k.size=c.logger.deprecate(k.numberVisible,"selectMenu.size is ambiguous - use numberVisible instead"),k.anchor(b,d)},c.abstractBubbleChart=c.bubbleMixin,c.baseChart=c.baseMixin,c.capped=c.capMixin,c.colorChart=c.colorMixin,c.coordinateGridChart=c.coordinateGridMixin,c.marginable=c.marginMixin,c.stackableChart=c.stackMixin,c.d3=a,c.crossfilter=b,c}if("function"==typeof define&&define.amd)define(["d3","crossfilter2"],a);else if("object"==typeof module&&module.exports){var b=require("d3"),c=require("crossfilter2");"function"!=typeof c&&(c=c.crossfilter),module.exports=a(b,c)}else this.dc=a(d3,crossfilter)}(); +//# sourceMappingURL=dc.min.js.map \ No newline at end of file diff --git a/civicrm/bower_components/dc-2.1.x/dc.min.js.map b/civicrm/bower_components/dc-2.1.x/dc.min.js.map new file mode 100644 index 0000000000..fd1ba36702 --- /dev/null +++ b/civicrm/bower_components/dc-2.1.x/dc.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["dc.js"],"names":["_dc","d3","crossfilter","dc","version","constants","CHART_CLASS","DEBUG_GROUP_CLASS","STACK_CLASS","DESELECTED_CLASS","SELECTED_CLASS","NODE_INDEX_NAME","GROUP_INDEX_NAME","DEFAULT_CHART_GROUP","EVENT_DELAY","NEGLIGIBLE_NUMBER","_renderlet","chartRegistry","initializeChartGroup","group","_chartMap","has","chart","e","indexOf","register","push","deregister","i","length","anchorName","splice","clear","list","registerChart","deregisterChart","hasChart","deregisterAllCharts","filterAll","charts","refocusAll","focus","renderAll","render","redrawAll","redraw","disableTransitions","transition","selection","duration","delay","name","s","undefined","optionalTransition","enable","afterTransition","callback","empty","call","n","each","units","integers","start","end","Math","abs","ordinal","domain","fp","precision","_f","d","resolution","utils","isNegligible","floor","ceil","round","override","obj","functionName","newFunction","existingFunction","renderlet","_","arguments","instanceOfChart","o","Object","__dcFlag__","errors","Exception","msg","_msg","this","message","toString","stack","Error","prototype","create","constructor","InvalidStateException","apply","BadArgumentException","dateFormat","time","format","printers","filters","filter","Array","printSingleValue","pluck","f","Date","isFloat","fformat","isInteger","add","l","r","t","replace","getTime","offset","percentage","subtract","isNumber","clamp","val","min","max","_idCounter","uniqueId","nameToId","toLowerCase","appendOrSelect","parent","selector","tag","element","select","append","safeNumber","logger","enableDebugLog","warn","console","log","debug","deprecate","fn","deprecated","warned","events","current","trigger","closure","setTimeout","RangedFilter","low","high","range","isFiltered","value","filterType","TwoDimensionalFilter","RangedTwoDimensionalFilter","fromBottomLeft","Infinity","x","y","baseMixin","_chart","sizeSvg","_svg","_useViewBoxResizing","attr","width","height","generateSvg","root","checkForMandatoryAttributes","a","applyFilters","dimension","fs","_filterHandler","_dimension","_group","_anchor","_root","_isChild","_width","_height","_orderSort","_legend","_commitHandler","_minWidth","_defaultWidthCalc","getBoundingClientRect","_widthCalc","_minHeight","_defaultHeightCalc","_heightCalc","_keyAccessor","_valueAccessor","_label","_ordering","_renderLabel","_title","keyAccessor","valueAccessor","_renderTitle","_controlsUseVisibility","_transitionDuration","_transitionDelay","_filterPrinter","_mandatoryAttributes","_chartGroup","_listeners","dispatch","_filters","filterRange","filterFunction","filterExact","_data","all","functor","node","minWidth","minHeight","useViewBoxResizing","expireCache","data","_groupName","ordering","orderFunction","quicksort","by","_computeOrderedGroups","dataCopy","slice","selectAll","anchor","chartGroup","classed","id","chartID","rootElement","svg","svgElement","resetSvg","remove","filterPrinter","filterPrinterFunction","controlsUseVisibility","useVisibility","turnOnControls","attribute","style","text","turnOffControls","transitionDuration","transitionDelay","preRender","forEach","result","_doRender","_activateRenderlets","event","pretransition","preRedraw","_doRedraw","commitHandler","redrawGroup","error","renderGroup","_invokeFilteredListener","filtered","_invokeZoomedListener","zoomed","_hasFilterHandler","some","hasFilterHandler","hasFilter","_removeFilterHandler","removeFilterHandler","_addFilterHandler","addFilterHandler","_resetFilterHandler","resetFilterHandler","replaceFilter","highlightSelected","fadeDeselected","resetHighlight","onClick","datum","filterHandler","legendables","legendHighlight","legendReset","legendToggle","isLegendableHidden","label","labelFunction","enableLabels","renderLabel","title","titleFunction","renderTitle","renderletFunction","on","legend","options","opts","applyOptions","listener","marginMixin","_margin","top","right","bottom","left","margins","effectiveWidth","effectiveHeight","colorMixin","_colors","scale","category20c","_defaultAccessor","_colorAccessor","colors","colorScale","quantize","ordinalColors","linearColors","linear","interpolate","interpolateHcl","colorAccessor","defaultColorAccessor","colorDomain","calculateColorDomain","newDomain","getColor","colorCalculator","coordinateGridMixin","compareDomains","d1","d2","elem","prepareXAxis","g","isOrdinal","elasticX","_x","_ordinalXDomain","xAxisMin","xAxisMax","xdom","_lastXDomain","rescale","rangeBands","xAxisLength","_rangeBandPadding","_useOuterPadding","_outerRangeBandPadding","_xAxis","renderVerticalGridLines","gridLineG","VERTICAL_CLASS","_renderVerticalGridLine","insert","GRID_LINE_CLASS","ticks","tickValues","lines","linesGEnter","enter","_xAxisY","exit","brushHeight","getClipPathId","generateClipPath","defs","_parent","chartBodyClip","padding","_clipPadding","yAxisHeight","drawChart","_brushOn","_prepareYAxis","plotData","_resizing","renderXAxis","elasticY","renderYAxis","renderBrush","redrawBrush","fadeDeselectedArea","configureMouseZoom","_mouseZoomable","_enableMouseZoom","_hasBeenMouseZoomable","_disableMouseZoom","zoomHandler","_refocused","_zoomOutRestrict","constraint","_xOriginalDomain","_rangeChart","intersectExtents","constrained","constrainExtent","domFilter","rangesEqual","ext1","ext2","extent","size","range1","range2","valueOf","hasRangeSelected","HORIZONTAL_CLASS","Y_AXIS_LABEL_CLASS","X_AXIS_LABEL_CLASS","DEFAULT_AXIS_LABEL_PADDING","category10","_g","_chartBodyG","_xAxisLabel","_y","_yAxisLabel","_round","_unitCount","_focusChart","axis","orient","_xUnits","_xAxisPadding","_xAxisPaddingUnit","_xElasticity","_xAxisLabelPadding","_yAxis","_yAxisPadding","_yElasticity","_yAxisLabelPadding","_brush","brush","_renderHorizontalGridLine","_zoomScale","_zoom","behavior","zoom","_nullZoom","_useRightYAxis","resizing","rangeChart","focusChart","zoomScale","zoomOutRestrict","_generateG","href","window","location","split","gElement","mouseZoomable","chartBodyG","xScale","xOriginalDomain","xUnits","xAxis","xAxisPadding","xAxisPaddingUnit","unit","xUnitCount","useRightYAxis","groups","map","axisXG","axisXLab","xAxisLabel","labelText","yAxisMin","yAxisMax","rangeRound","_renderHorizontalGridLinesForAxis","renderYAxisLabel","axisClass","rotation","labelXPosition","axisYLab","labelYPosition","renderYAxisAt","position","axisYG","axisPosition","_yAxisX","labelPosition","yAxisLabel","yScale","yAxis","renderHorizontalGridLines","yAxisPadding","_filter","_brushing","gBrush","setBrushY","setHandlePaths","resizeHandlePath","extendBrush","brushIsEmpty","rangedFilter","doTransition","clipPadding","_preprocessData","scaleExtent","refocused","c","brushOn","stackMixin","prepareValues","layer","layerIdx","valAccessor","accessor","String","values","hidden","domainFilter","_evadeDomainFilter","xDomain","p","findLayerByName","_stack","flattenStack","valueses","concat","visability","_stackLayout","layout","_titles","_hidableStacks","hidableStacks","hideStack","stackName","showStack","getValueAccessorByIndex","index","y0","titleAccessor","stackLayout","evadeDomainFilter","layers","flat","ordered","color","capMixin","_cap","_takeFront","_othersLabel","kv","_othersGrouper","topItems","restItems","restItemsSum","sum","restKeys","others","key","othersLabel","cappedKeyAccessor","cappedValueAccessor","rest","items","cap","count","takeFront","othersGrouper","grouperFunction","_onClick","bubbleMixin","_maxBubbleRelativeSize","_minRadiusWithLabel","_sortBubbleSize","_elasticRadius","BUBBLE_NODE_CLASS","BUBBLE_CLASS","MIN_RADIUS","radiusAccessor","radiusValueAccessor","sort","b","descending","_r","_rValueAccessor","bubbleRadiusScale","elasticRadius","calculateRadiusDomain","rMin","rMax","bubbleR","isNaN","shouldLabel","labelOpacity","labelPointerEvent","_doRenderLabel","bubbleGEnter","doUpdateLabels","labels","_doRenderTitles","doUpdateTitles","sortBubbleSize","minRadius","radius","minRadiusWithLabel","maxBubbleRelativeSize","relativeSize","isSelectedNode","pieChart","maxRadius","_radius","_givenRadius","pieData","arc","buildArcs","pie","pieLayout","_emptyCssClass","_emptyTitle","slices","_sliceGroupCssClass","_sliceCssClass","_labelGroupCssClass","_labelCssClass","createElements","updateElements","removeElements","highlightFilter","cx","cy","slicesEnter","createSliceNodes","createSlicePath","createTitles","createLabels","slicePath","fill","safeArc","attrTween","tweenPie","positionLabels","_applyLabelText","highlightSlice","whether","labelsEnter","classes","_externalLabelRadius","_drawPaths","updateLabelPaths","polyline","arc2","outerRadius","_externalRadiusPadding","innerRadius","_current","startAngle","endAngle","centroid","updateSlicePaths","updateLabels","updateTitles","slicePaths","isSelectedSlice","_innerRadius","sliceTooSmall","angle","_minAngleForLabel","sliceHasNoData","isOffCanvas","path","highlightSliceFromLegendable","legendable","highlighted","_cx","_cy","DEFAULT_MIN_ANGLE_FOR_LABEL","slicesCap","externalRadiusPadding","minAngleForLabel","emptyTitle","externalLabels","externalLabelRadius","drawPaths","barChart","barHeight","renderLabels","layerIndex","_centerBar","_barWidth","LABEL_PADDING","renderBars","bars","_gap","calculateBarWidth","numberOfBars","rangeBand","barPadding","MIN_BAR_WIDTH","colorFilter","inv","item","match","DEFAULT_GAP_BETWEEN_BARS","_alwaysUseRounding","_rescale","_render","last","centerBar","outerPadding","gap","alwaysUseRounding","_xAxisMax","res","lineChart","drawLine","layersEnter","line","_interpolate","tension","_tension","_defined","defined","_dashStyle","safeD","drawArea","_renderArea","area","drawDots","chartBody","xyTipsOn","tooltipListClass","TOOLTIP_G_CLASS","tooltips","points","createRefLines","dots","DOT_CIRCLE_CLASS","getDotRadius","_dataPointFillOpacity","_dataPointStrokeOpacity","dot","showDot","showRefLines","hideDot","hideRefLines","drawLabels","yRefLine","Y_AXIS_REF_LINE_CLASS","xRefLine","X_AXIS_REF_LINE_CLASS","_dotRadius","yAxisX","yAxisRefPathD","xAxisRefPathD","_dataPointRadius","dashstyle","join","DEFAULT_DOT_RADIUS","DEFAULT_DOT_OPACITY","_xyTipsOn","layersList","dashStyle","renderArea","dotRadius","renderDataPoints","fillOpacity","strokeOpacity","_legendables","dataCount","_formatNumber","_html","html","formatNumber","formatter","tot","selected","dataTable","renderGroups","bAllFunctions","_columns","thead","headrow","headcols","HEAD_CSS_CLASS","_doColumnHeaderFormat","nestEntries","rowGroup","_showGroups","GROUP_CSS_CLASS","LABEL_CSS_CLASS","entries","_order","ascending","_size","nest","sortKeys","_sortBy","_beginSlice","_endSlice","renderRows","rows","order","ROW_CSS_CLASS","rowEnter","v","COLUMN_CSS_CLASS","_doColumnValueFormat","_doColumnHeaderFnToString","_doColumnHeaderCapitalize","charAt","toUpperCase","i1","i2","lastIndexOf","substring","i3","beginSlice","endSlice","columns","sortBy","showGroups","dataGrid","GRID_CSS_CLASS","itemGroup","_htmlGroup","renderItems","ITEM_CSS_CLASS","JSON","stringify","htmlGroup","sortByFunction","bubbleChart","renderNodes","bubbleG","bubbleLocator","updateNodes","removeNodes","bubbleX","bubbleY","compositeChart","calculateYAxisRanges","lyAxisMin","lyAxisMax","ryAxisMin","ryAxisMax","ranges","rightYAxisMin","rightYAxisMax","alignYAxes","alignYAxisRanges","extentRatio","prepareRightYAxis","needDomain","rightY","needRange","rightYAxis","prepareLeftYAxis","generateChildG","child","SUB_CHART_CLASS","leftYAxisChildren","_children","rightYAxisChildren","getYAxisMin","getYAxisMax","getAllXAxisMinFromChildCharts","getAllXAxisMaxFromChildCharts","_rightY","DEFAULT_RIGHT_Y_AXIS_LABEL_PADDING","_childOptions","_shareColors","_shareTitle","_alignYAxes","_rightYAxis","_rightYAxisLabel","_rightYAxisLabelPadding","_rightAxisGridLines","__generateG","rightYAxisLabel","useRightAxisGridLines","childOptions","compose","subChartArray","children","shareColors","shareTitle","reduce","j","seriesChart","keySort","clearChart","_charts","resetChildren","keys","_seriesAccessor","_chartFunction","_seriesSort","_valueSort","childrenChanged","keep","nester","sortValues","nesting","sub","subChart","_compose","chartFunction","seriesAccessor","seriesSort","sortFunction","valueSort","geoChoroplethChart","generateLayeredData","isDataLayer","regionG","renderRegionG","renderPaths","groupAll","geoJson","layerSelector","isSelected","isDeselected","layerNameClass","regionClass","baseClasses","getKey","_geoJsons","paths","currentFill","_projectionFlag","_geoPath","geo","states","selectedRegion","overlayGeoJson","json","projection","geoJsons","geoPath","removeGeoJson","bubbleOverlay","initOverlayG","BUBBLE_OVERLAY_CLASS","initializeBubbles","mapData","_points","point","nodeG","getNodeG","circle","bubbleNodeClass","updateBubbles","flag","debugG","debugText","mouse","rowChart","calculateAxisScale","_elasticX","_rowData","drawAxis","axisG","drawGridLines","_rowCssClass","rootValue","_fixedBarHeight","_hasLabelOffsetY","_labelOffsetY","rect","isSelectedRow","translateX","renderTitleLabel","_titleRowCssClass","lab","_labelOffsetX","_dyOffset","titlelab","_titleLabelOffsetX","x0","_renderTitleLabel","rowsCap","fixedBarHeight","labelOffsetX","labelOffsetY","labelOffsety","titleLabelOffsetX","legendItemHeight","_itemHeight","_maxItems","LABEL_GAP","_horizontal","_legendWidth","_itemWidth","_autoItemWidth","_legendText","itemEnter","clientHeight","_cumulativeLegendTextWidth","row","itemWidth","getBBox","translateBy","itemHeight","horizontal","legendWidth","autoItemWidth","legendText","maxItems","scatterPlot","elementSize","_existenceAccessor","_filtered","pow","_symbolSize","_excludedSize","_emptySize","renderTitles","symbol","resizeSymbolsWhere","condition","symbols","oldSize","_symbol","originalKeyAccessor","existenceAccessor","_locator","_highlightedSize","_excludedColor","_excludedOpacity","_emptyOpacity","_nonemptyOpacity","_emptyColor","__filter","excludedOpacity","excludedColor","type","customSymbol","symbolSize","highlightedSize","excludedSize","hiddenSize","emptySize","emptyColor","emptyOpacity","nonemptyOpacity","ranged2DFilter","numberDisplay","maxBin","sorted","_lastValue","SPAN_CLASS","one","none","valObj","newValue","span","ease","tween","interpStart","isFinite","interp","interpolateNumber","num","innerHTML","heatMap","filterAxis","cellsOnAxis","unfilteredCellsOnAxis","_chartBody","_cols","_rows","DEFAULT_BORDER_RADIUS","_colOrdering","_rowOrdering","_colScale","_rowScale","_xBorderRadius","_yBorderRadius","_colsLabel","_rowsLabel","colsLabel","rowsLabel","_xAxisOnClick","_yAxisOnClick","_boxOnClick","rowOrdering","cols","colOrdering","rowCount","colCount","boxWidth","boxHeight","rangeRoundBands","boxes","gEnter","boxOnClick","gCols","gColsText","xAxisOnClick","gRows","gRowsText","yAxisOnClick","handler","xBorderRadius","yBorderRadius","boxWhiskers","boxQuartiles","quantile","box","quartileData","quartiles","whiskerIndices","whiskers","whiskerData","outlierIndices","x1","__chart__","center","medianLine","whisker","outlier","Number","tickFormat","boxTick","whiskerTick","timer","flush","boxPlot","DEFAULT_WHISKERS_IQR","k","q1","q3","iqr","renderBoxes","boxesG","boxesGEnter","boxTransform","_box","updateBoxes","removeBoxes","_whiskerIqrFactor","_whiskersIqr","_whiskers","_tickFormat","_boxWidth","innerChartWidth","boxPadding","xOffset","_calculatedBoxWidth","selectMenu","renderOptions","_select","OPTION_CSS_CLASS","onChange","target","selectedOptions","option","_promptValue","_multiple","setAttributes","_numberVisible","SELECT_CSS_CLASS","_promptText","_filterDisplayed","ua","navigator","userAgent","property","promptText","filterDisplayed","multiple","promptValue","numberVisible","abstractBubbleChart","baseChart","capped","colorChart","coordinateGridChart","marginable","stackableChart","define","amd","module","exports","_d3","require","_crossfilter"],"mappings":";;;;;;;;;;;;;;;;;;;CAkBA,WAAc,QAASA,GAAIC,EAAIC,GAC/B,YAoBA,IAAIC,IACAC,QAAS,QACTC,WACIC,YAAa,WACbC,kBAAmB,QACnBC,YAAa,QACbC,iBAAkB,aAClBC,eAAgB,WAChBC,gBAAiB,YACjBC,iBAAkB,kBAClBC,oBAAqB,0BACrBC,YAAa,GACbC,kBAAmB,OAEvBC,WAAY,KAmBhBb,GAAGc,cAAgB,WAIf,QAASC,GAAsBC,GAS3B,MARKA,KACDA,EAAQhB,EAAGE,UAAUQ,qBAGpBO,EAAUD,KACXC,EAAUD,OAGP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AAUlrC,EAAImrC,EAAKE,OAE1BrlC,MAAK7F,GAAKH,EAAIC,GAAIC","file":"dc.min.js"} \ No newline at end of file diff --git a/civicrm/civicrm-version.php b/civicrm/civicrm-version.php index 2c777358b4..dfe26c0bf4 100644 --- a/civicrm/civicrm-version.php +++ b/civicrm/civicrm-version.php @@ -1,6 +1,6 @@ <?php function civicrmVersion( ) { - return array( 'version' => '4.7.27', + return array( 'version' => '4.7.28', 'cms' => 'Wordpress', 'revision' => '' ); } diff --git a/civicrm/composer.json b/civicrm/composer.json index 93a42a17a6..a8b02c8401 100644 --- a/civicrm/composer.json +++ b/civicrm/composer.json @@ -47,6 +47,7 @@ "totten/ca-config": "~17.05", "zetacomponents/base": "1.7.*", "zetacomponents/mail": "dev-1.7-civi", + "marcj/topsort": "dev-1.0-php53", "phpoffice/phpword": "^0.13.0", "pear/Validate_Finance_CreditCard": "dev-master", "civicrm/civicrm-cxn-rpc": "~0.17.07.01", @@ -58,6 +59,10 @@ { "type": "git", "url": "https://github.com/civicrm/zetacomponents-mail.git" + }, + { + "type": "git", + "url": "https://github.com/totten/topsort.php.git" } ], "scripts": { diff --git a/civicrm/composer.lock b/civicrm/composer.lock index b3ae637ec6..0612c9af39 100644 --- a/civicrm/composer.lock +++ b/civicrm/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "1d0ba40a540772d8ca8b73f72fff02d8", + "content-hash": "6abd711477a577550967549258a7aec0", "packages": [ { "name": "civicrm/civicrm-cxn-rpc", @@ -145,6 +145,46 @@ "homepage": "http://code.google.com/p/phpquery/", "time": "2013-03-21T12:39:33+00:00" }, + { + "name": "marcj/topsort", + "version": "dev-1.0-php53", + "source": { + "type": "git", + "url": "https://github.com/totten/topsort.php.git", + "reference": "2765723d36f0e536d987e42cbc60de52209212bd" + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "codeclimate/php-test-reporter": "dev-master", + "phpunit/phpunit": "~4.0", + "symfony/console": "~2.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "MJS\\TopSort\\": "src/", + "MJS\\TopSort\\Tests\\": "tests/Tests/" + } + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marc J. Schmidt", + "email": "marc@marcjschmidt.de" + } + ], + "description": "High-Performance TopSort/Dependency resolving algorithm", + "keywords": [ + "dependency resolving", + "topological sort", + "topsort" + ], + "time": "2016-03-25 21:38:05" + }, { "name": "pclzip/pclzip", "version": "2.8.2", @@ -1567,6 +1607,7 @@ "minimum-stability": "stable", "stability-flags": { "zetacomponents/mail": 20, + "marcj/topsort": 20, "pear/validate_finance_creditcard": 20 }, "prefer-stable": false, diff --git a/civicrm/css/civicrmNavigation.css b/civicrm/css/civicrmNavigation.css index 1ec8ce4956..990b6e2810 100644 --- a/civicrm/css/civicrmNavigation.css +++ b/civicrm/css/civicrmNavigation.css @@ -120,6 +120,9 @@ img.menu-item-arrow{ right: 4px; top: 8px; } +#civicrm-menu i { + margin-right: 5px; +} li.menu-separator{ border-bottom: 1px solid #000; font-size: 0; /* for ie */ diff --git a/civicrm/install/index.php b/civicrm/install/index.php index 778899163a..b32c4f530d 100644 --- a/civicrm/install/index.php +++ b/civicrm/install/index.php @@ -54,35 +54,25 @@ else { define('CIVICRM_WINDOWS', 0); } -// set installation type - drupal -if (!session_id()) { - if (defined('PANTHEON_ENVIRONMENT')) { - ini_set('session.save_handler', 'files'); - } - session_start(); -} - -// unset civicrm session if any -if (array_key_exists('CiviCRM', $_SESSION)) { - unset($_SESSION['CiviCRM']); -} - -if (isset($_GET['civicrm_install_type'])) { - $_SESSION['civicrm_install_type'] = $_GET['civicrm_install_type']; -} -else { - if (!isset($_SESSION['civicrm_install_type'])) { - $_SESSION['civicrm_install_type'] = "drupal"; - } -} - global $installType; global $crmPath; global $pkgPath; global $installDirPath; global $installURLPath; -$installType = strtolower($_SESSION['civicrm_install_type']); +// Set the install type +// this is sent as a query string when the page is first loaded +// and subsequently posted to the page as a hidden field +if (isset($_POST['civicrm_install_type'])) { + $installType = $_POST['civicrm_install_type']; +} +elseif (isset($_GET['civicrm_install_type'])) { + $installType = strtolower($_GET['civicrm_install_type']); +} +else { + // default value if not set + $installType = "drupal"; +} if ($installType == 'drupal' || $installType == 'backdrop') { $crmPath = dirname(dirname($_SERVER['SCRIPT_FILENAME'])); @@ -104,64 +94,6 @@ $pkgPath = $crmPath . DIRECTORY_SEPARATOR . 'packages'; require_once $crmPath . '/CRM/Core/ClassLoader.php'; CRM_Core_ClassLoader::singleton()->register(); -// Load civicrm database config -if (isset($_POST['mysql'])) { - $databaseConfig = $_POST['mysql']; -} -else { - $databaseConfig = array( - "server" => "localhost", - "username" => "civicrm", - "password" => "", - "database" => "civicrm", - ); -} - -if ($installType == 'wordpress') { - // Load WP database config - if (isset($_POST['mysql'])) { - $databaseConfig = $_POST['mysql']; - } - else { - $databaseConfig = array( - "server" => DB_HOST, - "username" => DB_USER, - "password" => DB_PASSWORD, - "database" => DB_NAME, - ); - } -} - -if ($installType == 'drupal') { - // Load drupal database config - if (isset($_POST['drupal'])) { - $drupalConfig = $_POST['drupal']; - } - else { - $drupalConfig = array( - "server" => "localhost", - "username" => "drupal", - "password" => "", - "database" => "drupal", - ); - } -} - -if ($installType == 'backdrop') { - // Load backdrop database config - if (isset($_POST['backdrop'])) { - $backdropConfig = $_POST['backdrop']; - } - else { - $backdropConfig = array( - "server" => "localhost", - "username" => "backdrop", - "password" => "", - "database" => "backdrop", - ); - } -} - $loadGenerated = 0; if (isset($_POST['loadGenerated'])) { $loadGenerated = 1; @@ -325,6 +257,21 @@ if ($installType == 'drupal') { } } + // Bootstrap Drupal to get settings and user + $base_root = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http'; + $base_root .= '://' . $_SERVER['HTTP_HOST']; + $base_url = $base_root; + drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); + + // Check that user is logged in and has administrative permissions + // This is necessary because the script exposes the database settings in the form and these could be viewed by unauthorised users + if ((!function_exists('user_access')) || (!user_access('administer site configuration'))) { + $errorTitle = ts("You don't have permission to access this page"); + $errorMsg = ts("The installer can only be run by a user with the permission to administer site configuration."); + errorDisplayPage($errorTitle, $errorMsg); + exit(); + } + if (!defined('VERSION') or version_compare(VERSION, '6.0') < 0) { $errorTitle = ts("Oops! Incorrect Drupal version"); $errorMsg = ts("This version of CiviCRM can only be used with Drupal 6.x or 7.x. Please ensure that '%1' exists if you are running Drupal 7.0 and over.", array(1 => implode("' or '", $drupalVersionFiles))); @@ -368,6 +315,70 @@ elseif ($installType == 'wordpress') { } } +// Load CiviCRM database config +if (isset($_POST['mysql'])) { + $databaseConfig = $_POST['mysql']; +} + +if ($installType == 'wordpress') { + // Load WP database config + if (isset($_POST['mysql'])) { + $databaseConfig = $_POST['mysql']; + } + else { + $databaseConfig = array( + "server" => DB_HOST, + "username" => DB_USER, + "password" => DB_PASSWORD, + "database" => DB_NAME, + ); + } +} + +if ($installType == 'drupal') { + // Load drupal database config + if (isset($_POST['drupal'])) { + $drupalConfig = $_POST['drupal']; + } + else { + $dbServer = $databases['default']['default']['host']; + if (!empty($databases['default']['default']['port'])) { + $dbServer .= ':' . $databases['default']['default']['port']; + } + $drupalConfig = array( + "server" => $dbServer, + "username" => $databases['default']['default']['username'], + "password" => $databases['default']['default']['password'], + "database" => $databases['default']['default']['database'], + ); + } +} + +if ($installType == 'backdrop') { + // Load backdrop database config + if (isset($_POST['backdrop'])) { + $backdropConfig = $_POST['backdrop']; + } + else { + $backdropConfig = array( + "server" => "localhost", + "username" => "backdrop", + "password" => "", + "database" => "backdrop", + ); + } +} + +// By default set CiviCRM database to be same as CMS database +if (!isset($databaseConfig)) { + if (($installType == 'drupal') && (isset($drupalConfig))) { + $databaseConfig = $drupalConfig; + } + if (($installType == 'backdrop') && (isset($backdropConfig))) { + $databaseConfig = $backdropConfig; + } +} + // Check requirements $req = new InstallRequirements(); $req->check(); @@ -1697,12 +1708,13 @@ class Installer extends InstallRequirements { $output .= "<li>" . ts("Use the <a %1>Configuration Checklist</a> to review and configure settings for your new site", array(1 => "target='_blank' href='$cmsURL'")) . "</li>"; $output .= $commonOutputMessage; - echo '</ul>'; - echo '</div>'; + $output .= '</ul>'; + $output .= '</div>'; + echo $output; $c = CRM_Core_Config::singleton(FALSE); $c->free(); - $wpInstallRedirect = admin_url("?page=CiviCRM&q=civicrm&reset=1"); + $wpInstallRedirect = admin_url('admin.php?page=CiviCRM&q=civicrm&reset=1'); echo "<script> window.location = '$wpInstallRedirect'; </script>"; diff --git a/civicrm/install/template.html b/civicrm/install/template.html index 493da9c9fc..e95165536b 100644 --- a/civicrm/install/template.html +++ b/civicrm/install/template.html @@ -22,6 +22,8 @@ if ($text_direction == 'rtl') { <form name="civicrm_form" method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>"> + <input type="hidden" name="civicrm_install_type" value="<?php echo $installType; ?>" /> + <?php if (isset($hasErrorOtherThanDatabase)) { ?> <p class="error"><?php echo ts('We are not able to install the software. Please <a href="#requirements">see below</a> for details.'); ?></p> <?php } else { ?> diff --git a/civicrm/js/crm.ajax.js b/civicrm/js/crm.ajax.js index 262227ea89..9cb5eb601e 100644 --- a/civicrm/js/crm.ajax.js +++ b/civicrm/js/crm.ajax.js @@ -498,7 +498,7 @@ settings = $el.data('popup-settings') || {}, formData = false; settings.dialog = settings.dialog || {}; - if (e.isDefaultPrevented() || !CRM.config.ajaxPopupsEnabled || !url || $el.is(exclude)) { + if (e.isDefaultPrevented() || !CRM.config.ajaxPopupsEnabled || !url || $el.is(exclude + ', .open-inline, .open-inline-noreturn')) { return; } // Sized based on css class diff --git a/civicrm/release-notes.md b/civicrm/release-notes.md index 78d0955784..9777c84c6c 100644 --- a/civicrm/release-notes.md +++ b/civicrm/release-notes.md @@ -14,6 +14,17 @@ Other resources for identifying changes are: * https://github.com/civicrm/civicrm-joomla * https://github.com/civicrm/civicrm-wordpress +## CiviCRM 4.7.28 + +Released December 6, 2017 + +- **[Synopsis](release-notes/4.7.28.md#synopsis)** +- **[Features](release-notes/4.7.28.md#features)** +- **[Bugs resolved](release-notes/4.7.28.md#bugs)** +- **[Miscellany](release-notes/4.7.28.md#misc)** +- **[Credits](release-notes/4.7.28.md#credits)** +- **[Feedback](release-notes/4.7.28.md#feedback)** + ## CiviCRM 4.7.27 Released November 1, 2017 diff --git a/civicrm/release-notes/4.7.28.md b/civicrm/release-notes/4.7.28.md new file mode 100644 index 0000000000..e75d0bb083 --- /dev/null +++ b/civicrm/release-notes/4.7.28.md @@ -0,0 +1,662 @@ +# CiviCRM 4.7.28 + +Released December 6, 2017 + +- **[Synopsis](#synopsis)** +- **[Features](#features)** +- **[Bugs resolved](#bugs)** +- **[Miscellany](#misc)** +- **[Credits](#credits)** +- **[Feedback](#feedback)** + +## <a name="synopsis"></a>Synopsis + +| *Does this version...?* | | +|:----------------------------------------------------------- |:-------:| +| Fix security vulnerabilities? | no | +| **Change the database schema?** | **yes** | +| **Alter the API?** | **yes** | +| Require attention to configuration options? | no | +| Fix problems installing or upgrading to a previous version? | no | +| **Introduce features?** | **yes** | +| **Fix bugs?** | **yes** | + +## <a name="features"></a>Features + +### Core CiviCRM + +- **[CRM-16243](https://issues.civicrm.org/jira/browse/CRM-16243) Dependency + management for extensions + ([11173](https://github.com/civicrm/civicrm-core/pull/11173) and + [11101](https://github.com/civicrm/civicrm-core/pull/11101))** + + Extensions can now specify other extensions they depend on. When enabling an + extension, the requisite extensions will be automatically enabled first. + However, for now at least, this does not automatically download those + extensions. + +- **[CRM-20769](https://issues.civicrm.org/jira/browse/CRM-20769) Allow for + Button Text on profiles to be overriden in settings + ([10557](https://github.com/civicrm/civicrm-core/pull/10557))** + + You can now enter custom labels for the Save and Cancel buttons on profiles in + Create or Edit modes. + +- **[CRM-21322](https://issues.civicrm.org/jira/browse/CRM-21322) create hook to + modify entityRef fields + ([11192](https://github.com/civicrm/civicrm-core/pull/11192))** + + A [new + hook](https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_alterEntityRefParams/) + allows extension developers to modify the parameters for entity reference + fields that appear in a form. + +- **[CRM-21195](https://issues.civicrm.org/jira/browse/CRM-21195) Adding the + ability to add icons to menu items + ([11054](https://github.com/civicrm/civicrm-core/pull/11054)) (follow-up work)** + + This offers a slight adjustment to the markup for menu item icons. + +- **[CRM-21262](https://issues.civicrm.org/jira/browse/CRM-21262) Add a check + for incorrect Resource URL + ([11067](https://github.com/civicrm/civicrm-core/pull/11067))** + + A message will now appear on the Status Report if a site's CiviCRM Resource + URL is set incorrectly. + +- **[CRM-20903](https://issues.civicrm.org/jira/browse/CRM-20903) Improve + ordering of dedupe rules + ([11109](https://github.com/civicrm/civicrm-core/pull/11109) and + [11098](https://github.com/civicrm/civicrm-core/pull/11098))** + + Duplicate matching rules are now displayed in a consistent order: first the + supervised and unsupervised rules, and then the general use rules in + alphabetical order by title. + +- **[CRM-20304](https://issues.civicrm.org/jira/browse/CRM-20304) Add option to + alphabetize option values + ([11045](https://github.com/civicrm/civicrm-core/pull/11045))** + + Custom field options can now be alphabetized in one click. + +- **[CRM-21179](https://issues.civicrm.org/jira/browse/CRM-21179) Dashlet - + Charts ([11005](https://github.com/civicrm/civicrm-core/pull/11005)) + (preliminary work)** + + CiviCRM now ships with the dc.js, d3.js, and crossfilter.js libraries. These + historically have been provided by the Civisualize extension, but they are now + available for report developers who don't want the full set of Civisualize + features. + +- **[CRM-21122](https://issues.civicrm.org/jira/browse/CRM-21122) Support + selection of smart groups on Contact Dashboard + ([10925](https://github.com/civicrm/civicrm-core/pull/10925))** + + Smart Groups with Public Pages visibility are now available for users to join + them through the User Dashboard. + +- **[CRM-21379](https://issues.civicrm.org/jira/browse/CRM-21379) Fix Activity + dashlet issues ([11221](https://github.com/civicrm/civicrm-core/pull/11221))** + + The Activities dashlet now has the option to display all activities regardless + of status. The default is the legacy behavior of only displaying scheduled + activities. Legacy users should note that the default order is reversed, with + the newest activities displayed first. + +- **Hw 390 fixed iframe popup + ([11075](https://github.com/civicrm/civicrm-core/pull/11075))** + + iframe popups on AngularJS pages now have a default height. + +### CiviCase + +- **[CRM-20078](https://issues.civicrm.org/jira/browse/CRM-20078) Activity card - + General ([11159](https://github.com/civicrm/civicrm-core/pull/11159))** + + The "File on case" button is improved so that it does not appear when an + activity is being viewed in the context of a case. In addition, when using + "File on case", the case defaults to an open case for the activity target + contact if one is available. + +### CiviContribute + +- **[CRM-20868](https://issues.civicrm.org/jira/browse/CRM-20868), + [CRM-21480](https://issues.civicrm.org/jira/browse/CRM-21480), and + [CRM-21479](https://issues.civicrm.org/jira/browse/CRM-21479) set + invoice_number at contribution->create, not invoice creation + ([10681](https://github.com/civicrm/civicrm-core/pull/10681), + [11341](https://github.com/civicrm/civicrm-core/pull/11341), and + [11321](https://github.com/civicrm/civicrm-core/pull/11321))** + + Every contribution now comes with an invoice number regardless of whether an + invoice has been generated. + +- **[CRM-21354](https://issues.civicrm.org/jira/browse/CRM-21354) Allow + "Advanced Search" to search for recurring contribution status + ([11080](https://github.com/civicrm/civicrm-core/pull/11080))** + + Recurring contribution status is now searchable in Advanced Search. + +- **[CRM-21346](https://issues.civicrm.org/jira/browse/CRM-21346) Make pledge + installment count & amount exportable + ([11194](https://github.com/civicrm/civicrm-core/pull/11194))** + + The number of installments and original installment amount fields for pledges + are now exportable from the pledge search. + +- **[CRM-21287](https://issues.civicrm.org/jira/browse/CRM-21287) Add Financial + Type to "Contributions by Household" report + ([11106](https://github.com/civicrm/civicrm-core/pull/11106))** + + The "Contributions by Household" report now has the option to display and/or + filter by financial type. + +### CiviMail + +- **[CRM-20919](https://issues.civicrm.org/jira/browse/CRM-20919) Adjust + Mailing.create api for creating Completed mailings + ([10707](https://github.com/civicrm/civicrm-core/pull/10707))** + + Completed mailings can now be imported via the API. + +- **[CRM-21231](https://issues.civicrm.org/jira/browse/CRM-21231) On CiviMail + screen make 'Review and Schedule' tab active if required fields are filled + ([11035](https://github.com/civicrm/civicrm-core/pull/11035))** + + When composing a message in CiviMail, the second tab, "Review and Schedule", + is disabled at first. Now, the tab link becomes active when the first tab is + complete. + +- **[CRM-21282](https://issues.civicrm.org/jira/browse/CRM-21282) Improve + ordering of CiviMail click reporting + ([11099](https://github.com/civicrm/civicrm-core/pull/11099))** + + The click report summary now orders links by the descending number of clicks. + +### Drupal Integration + +- **[CRM-21297](https://issues.civicrm.org/jira/browse/CRM-21297) Automatically + fill database details in installer for Drupal + ([11113](https://github.com/civicrm/civicrm-core/pull/11113))** + + The database connection fields when installing CiviCRM on Drupal now default + to the CMS database connection details. This matches the process on + WordPress. + +### WordPress Integration + +- **[CRM-18754](https://issues.civicrm.org/jira/browse/CRM-18754) Process + extension parameters in shortcodes + ([112](https://github.com/civicrm/civicrm-wordpress/pull/112))** + + Extensions and WordPress plugins can now process custom parameters in the + `civicrm` shortcode. + +- **[CRM-21212](https://issues.civicrm.org/jira/browse/CRM-21212) Get E2E Tests + working on wordpress + ([11017](https://github.com/civicrm/civicrm-core/pull/11017)) (preliminary + work)** + + A new function retrives the WordPress user ID from a user name. + +## <a name="bugs"></a>Bugs resolved + +### CiviMail + +- **[CRM-21335](https://issues.civicrm.org/jira/browse/CRM-21335) CiviMail + recipient field isn't marked as required + ([11185](https://github.com/civicrm/civicrm-core/pull/11185))** + +- **[CRM-21508](https://issues.civicrm.org/jira/browse/CRM-21508) + civicrm_mailing.created_date information passed to Doctor When is incorrect + ([11361](https://github.com/civicrm/civicrm-core/pull/11361))** + + The mailing date would default to the current timestamp when null. + +- **[CRM-21411](https://issues.civicrm.org/jira/browse/CRM-21411) When Sending a + CiviMail from an advanced search no unsubscribe group field shows + ([11258](https://github.com/civicrm/civicrm-core/pull/11258))** + +- **[CRM-21284](https://issues.civicrm.org/jira/browse/CRM-21284) Outdated link + to mail setup documentation + ([11104](https://github.com/civicrm/civicrm-core/pull/11104))** + +- **[CRM-20892](https://issues.civicrm.org/jira/browse/CRM-20892) Same mailing + open in two windows can overwrite data on scheduled mailings + ([10965](https://github.com/civicrm/civicrm-core/pull/10965))** + +- **[CRM-21362](https://issues.civicrm.org/jira/browse/CRM-21362) Mailing + summary report group by MySQL 5.7 error + ([11206](https://github.com/civicrm/civicrm-core/pull/11206))** + +- **[CRM-20397](https://issues.civicrm.org/jira/browse/CRM-20397) CiviMail send + immediately date/time check too sensitive + ([11093](https://github.com/civicrm/civicrm-core/pull/11093) and + [11092](https://github.com/civicrm/civicrm-core/pull/11092))** + + Users would get errors that they were attempting to schedule mailings in the + past. + +### Core CiviCRM + +- **[CRM-21275](https://issues.civicrm.org/jira/browse/CRM-21275) Fatal error + without message should recommend bug-reporting page, instead of deprecated + forum ([11084](https://github.com/civicrm/civicrm-core/pull/11084))** + +- **[CRM-21336](https://issues.civicrm.org/jira/browse/CRM-21336) Custom file + fields should display file name without hash + ([11166](https://github.com/civicrm/civicrm-core/pull/11166))** + +- **[CRM-21268](https://issues.civicrm.org/jira/browse/CRM-21268) Missing French + overseas departments. + ([11076](https://github.com/civicrm/civicrm-core/pull/11076))** + + The French overseas departments Wallis-et-Futuna and Nouvelle-Calédonie are + now available in the State/Province list. + +- **[CRM-21481](https://issues.civicrm.org/jira/browse/CRM-21481) 4.7.28-rc: + needs to call rebuildMultilingualSchema() + ([11322](https://github.com/civicrm/civicrm-core/pull/11322))** + + The introduction of multilingual columns means that the multilingual schema + must be rebuilt. Otherwise, multilingual sites will encounter an error when + upgrading. + +- **[CRM-21363](https://issues.civicrm.org/jira/browse/CRM-21363) and + [CRM-21455](https://issues.civicrm.org/jira/browse/CRM-21455) Ensure that + tests run using ONLY_FULL_GROUP_BY sql_mode for mysql 5.7 + ([11249](https://github.com/civicrm/civicrm-core/pull/11249), + [10934](https://github.com/civicrm/civicrm-core/pull/10934), + [11339](https://github.com/civicrm/civicrm-core/pull/11339), and + [11346](https://github.com/civicrm/civicrm-core/pull/11346))** + +- **[CRM-21364](https://issues.civicrm.org/jira/browse/CRM-21364) Fix Tests + which fail on ONLY_FULL_GROUP_BY + ([11229](https://github.com/civicrm/civicrm-core/pull/11229), + [11219](https://github.com/civicrm/civicrm-core/pull/11219), and + [11209](https://github.com/civicrm/civicrm-core/pull/11209))** + + This resolves a variety of problems that may occur if the MySQL `sql_mode` is + set to `ONLY_FULL_GROUP_BY`. + +- **[CRM-21388](https://issues.civicrm.org/jira/browse/CRM-21388) Extension Page + should only throw exception if key is set + ([11234](https://github.com/civicrm/civicrm-core/pull/11234))** + + When checking that an extension's key follows the expected standard, the + extension page should not throw an exception if the key is blank or missing. + +- **[CRM-20934](https://issues.civicrm.org/jira/browse/CRM-20934) Child groups + not present in group list selector + ([10717](https://github.com/civicrm/civicrm-core/pull/10717))** + + This resolves a problem where having a disabled parent group would prevent a + group from appearing in a group selection field even if another parent group + is active. + +- **[CRM-21351](https://issues.civicrm.org/jira/browse/CRM-21351) Contact + deceased date does not respect the localisation date format + ([11200](https://github.com/civicrm/civicrm-core/pull/11200))** + +- **[CRM-21306](https://issues.civicrm.org/jira/browse/CRM-21306) DoctorWhen + extension looses the comments from columns when converting + ([11129](https://github.com/civicrm/civicrm-core/pull/11129))** + + When replacing columns to resolve date fields, Doctor When now restores the + field comments to the database. + +- **[CRM-21337](https://issues.civicrm.org/jira/browse/CRM-21337) ISO compliance + for Romanian and Bulgarian counties + ([11168](https://github.com/civicrm/civicrm-core/pull/11168))** + + This fixes the spelling of a Bulgarian province and a number of Romanian + counties in the state/province list. + +- **[CRM-21283](https://issues.civicrm.org/jira/browse/CRM-21283) Incorporate + Barbados and Antigua and Barbuda Parishes into States list + ([11100](https://github.com/civicrm/civicrm-core/pull/11100))** + + This adds parishes of Barbados and Antigua and Barbuda to the state/province + list. + +- **[CRM-21267](https://issues.civicrm.org/jira/browse/CRM-21267) Error 500 - + Call to undefined method CRM_Contact_Import_Parser::formatCustomDate + ([11124](https://github.com/civicrm/civicrm-core/pull/11124))** + + Some code reorganization resulted in a method being called from within the + wrong class during import of custom date fields, resulting in a fatal error. + This calls it correctly. + +- **Navigation - Fix serialization error + ([11107](https://github.com/civicrm/civicrm-core/pull/11107))** + +- **[CRM-19346](https://issues.civicrm.org/jira/browse/CRM-19346) gender_id + uniqueness not enforced on option groups edit form + ([11089](https://github.com/civicrm/civicrm-core/pull/11089))** + + Now each value in an option group must be unique. + +- **[CRM-21214](https://issues.civicrm.org/jira/browse/CRM-21214) Chaining + shared addresses doesn't work correctly + ([11019](https://github.com/civicrm/civicrm-core/pull/11019))** + + This prevents complex address inheritance cases such as second-degree address + sharing and recursive address sharing. + +- **[CRM-20779](https://issues.civicrm.org/jira/browse/CRM-20779) Incorrect + files showing in Tab for custom field + ([11082](https://github.com/civicrm/civicrm-core/pull/11082))** + + On file custom fields in multiple-entry custom data sets, the first entry's + file would display for all entries. + +- **[CRM-20468](https://issues.civicrm.org/jira/browse/CRM-20468) + Attachment.create API HTML escapes the uploaded content + ([10876](https://github.com/civicrm/civicrm-core/pull/10876))** + +- **[CRM-19620](https://issues.civicrm.org/jira/browse/CRM-19620) importing + record with external_identifier that matches with a deleted contact results in + traceback ([11133](https://github.com/civicrm/civicrm-core/pull/11133))** + + Now the External ID value is stripped from the contact in the trash and a new + contact is created. + +- **[CRM-20545](https://issues.civicrm.org/jira/browse/CRM-20545) contact report + lists contacts that have been 'soft' deleted (placed in Trash) + ([11136](https://github.com/civicrm/civicrm-core/pull/11136))** + +- **[CRM-21303](https://issues.civicrm.org/jira/browse/CRM-21303) Dedupe + datatable incorrectly calculates rows + ([11121](https://github.com/civicrm/civicrm-core/pull/11121))** + + This fixes a problem where no more than 25 rows would display on the conflicts + screen. + +- **[CRM-21294](https://issues.civicrm.org/jira/browse/CRM-21294) js error when + selecting & unselecting merge contacts + ([11117](https://github.com/civicrm/civicrm-core/pull/11117))** + +- **[CRM-21246](https://issues.civicrm.org/jira/browse/CRM-21246) Problem + 'double chaining', e.g. Contact.get - Relationship.get - Contact.get + ([11056](https://github.com/civicrm/civicrm-core/pull/11056))** + + This fixes problems due to ambiguity of the `value` syntax when using API + chaining inside another chained API call. + +- **[CRM-21258](https://issues.civicrm.org/jira/browse/CRM-21258) Display name + fatal error if names are too long + ([11063](https://github.com/civicrm/civicrm-core/pull/11063))** + + Display name and sort name will now be truncated rather than cause a fatal + error if the length is too long. + +### CiviMember + +- **[CRM-21321](https://issues.civicrm.org/jira/browse/CRM-21321) Membership + fields not loading in 'On behalf of' profile + ([11148](https://github.com/civicrm/civicrm-core/pull/11148))** + + You can now add membership fields to the profile for contributions on behalf + of an organization, and they will display in the on-behalf section of the + contribution page. + +- **[CRM-20227](https://issues.civicrm.org/jira/browse/CRM-20227) Regression - + Membership status override gets 'stuck' + ([11188](https://github.com/civicrm/civicrm-core/pull/11188))** + + This resolves a bug that would keep the membership status set by a status + override when the override was disabled. + +- **[CRM-20955](https://issues.civicrm.org/jira/browse/CRM-20955) Contact's + second membership fails to inherit when created in back end using price set + ([11184](https://github.com/civicrm/civicrm-core/pull/11184)) (follow-up)** + + Test coverage was added. + +- **[CRM-19998](https://issues.civicrm.org/jira/browse/CRM-19998) Membership + start / end date have no effect in Search Builder + ([11134](https://github.com/civicrm/civicrm-core/pull/11134))** + +- **[CRM-20432](https://issues.civicrm.org/jira/browse/CRM-20432) Pending + Contributions which have a Payment recorded and are Completed do not trigger + the related Membership to become current, status remains pending + ([11125](https://github.com/civicrm/civicrm-core/pull/11125))** + +- **[CRM-19060](https://issues.civicrm.org/jira/browse/CRM-19060) Membership + Detailed Report Payment Amount (most recent) not reporting correct + contribution ([8837](https://github.com/civicrm/civicrm-core/pull/8837))** + +### CiviCase + +- **[CRM-21367](https://issues.civicrm.org/jira/browse/CRM-21367) Get help + section out of container + ([11096](https://github.com/civicrm/civicrm-core/pull/11096), + [11156](https://github.com/civicrm/civicrm-core/pull/11156), and + [11220](https://github.com/civicrm/civicrm-core/pull/11220))** + + Help text on the case types screens is now outside of the CiviCRM content + block. + +- **[CRM-21373](https://issues.civicrm.org/jira/browse/CRM-21373) Notice error + on creating cases + ([11217](https://github.com/civicrm/civicrm-core/pull/11217))** + + This resolves a PHP notice that would appear upon creating a case. + +- **[CRM-21255](https://issues.civicrm.org/jira/browse/CRM-21255) Error when + downloading document from case activity + ([11186](https://github.com/civicrm/civicrm-core/pull/11186))** + + This resolves a bug in CiviCase 5.0 (org.civicrm.civicase) when printing a + case document. + +- **HW-380: Remove spacer div + ([11071](https://github.com/civicrm/civicrm-core/pull/11071))** + + This makes a slight adjustment to the case type editing form. + +### CiviContribute + +- **[CRM-21062](https://issues.civicrm.org/jira/browse/CRM-21062) Remove Tax + Rate trailing zeros for display in Confirm / Thankyou forms + ([10856](https://github.com/civicrm/civicrm-core/pull/10856))** + + This resolves a bug where tax rates would always display 8 decimal places on + contribution page confirmation and thank-you pages. + +- **[CRM-21436](https://issues.civicrm.org/jira/browse/CRM-21436) Fatal error on + contribution page with only pay later enabled. + ([11286](https://github.com/civicrm/civicrm-core/pull/11286))** + +- **Fix Recurring contribution sql so that it doesen't use group by as there + doesn't appear to be a reason to do so given that we have a where id = x + clause and we were grouping on the same field + ([11231](https://github.com/civicrm/civicrm-core/pull/11231))** + + This resolves a test failure on retrieving the related contact for a recurring + contribution. + +- **[CRM-21340](https://issues.civicrm.org/jira/browse/CRM-21340) make "view my + invoices" permission cms agnostic + ([11172](https://github.com/civicrm/civicrm-core/pull/11172))** + + This removes the use of a Drupal-specific global when checking permissions to + download an invoice. + +- **[CRM-21305](https://issues.civicrm.org/jira/browse/CRM-21305) Sorting not + working on Batch listing page + ([11127](https://github.com/civicrm/civicrm-core/pull/11127))** + +- **[CRM-21281](https://issues.civicrm.org/jira/browse/CRM-21281) Post Hook for + LineItem does not receive entity_id and entity_table + ([11108](https://github.com/civicrm/civicrm-core/pull/11108) and + [11097](https://github.com/civicrm/civicrm-core/pull/11097))** + + When editing a line item, `hook_civicrm_post` now specifies the ID and table + of the line item that was modified. + +- **[CRM-20772](https://issues.civicrm.org/jira/browse/CRM-20772) Price set + calculation precision when sales tax enabled + ([11016](https://github.com/civicrm/civicrm-core/pull/11016)) (initial work)** + + This adds additional decimal places for a price field value's amount field and + a membership type's minimum fee field in order to accommodate future changes. + +- **[CRM-20572](https://issues.civicrm.org/jira/browse/CRM-20572) Remove + jcalendar from Contrib Sybunt custom Search + ([10355](https://github.com/civicrm/civicrm-core/pull/10355))** + + This removes a deprecated library. + +- **[CRM-21319](https://issues.civicrm.org/jira/browse/CRM-21319) Total Amount + not translated on Contribution Page + ([11147](https://github.com/civicrm/civicrm-core/pull/11147))** + +### CiviEvent + +- **[CRM-21149](https://issues.civicrm.org/jira/browse/CRM-21149) On Event + Registration Form, cannot target the text "(including yourself)" using word + replacement because the parenthesis is outside the ts markers + ([10942](https://github.com/civicrm/civicrm-core/pull/10942))** + +- **[CRM-21339](https://issues.civicrm.org/jira/browse/CRM-21339) Fix fatal js + error on cart checkout when pay later not enabled + ([11170](https://github.com/civicrm/civicrm-core/pull/11170))** + +- **[CRM-21009](https://issues.civicrm.org/jira/browse/CRM-21009) Removing event + selection from participant does not free up capacity + ([10805](https://github.com/civicrm/civicrm-core/pull/10805))** + +- **[CRM-21327](https://issues.civicrm.org/jira/browse/CRM-21327) Not able to + change Payment Processor in event fees + ([11153](https://github.com/civicrm/civicrm-core/pull/11153))** + + The field to choose payment processors on events was different from the + corresponding setting for contribution pages. This makes the two consistent, + including handling permissions accurately. + +### Drupal Integration Modules + +- **[CRM-21374](https://issues.civicrm.org/jira/browse/CRM-21374) D8 footer + resources get added to the header + ([11218](https://github.com/civicrm/civicrm-core/pull/11218))** + + Items added to the `page-footer` region would appear in the header in Drupal 8 + sites. + +- **[CRM-21371](https://issues.civicrm.org/jira/browse/CRM-21371) An api error + when calling drush cvapi should be treated as a drush error + ([503](https://github.com/civicrm/civicrm-drupal/pull/503))** + +- **[CRM-21132](https://issues.civicrm.org/jira/browse/CRM-21132) Member Role + Sync: civicrm_member_roles produces a Fatal "unknown error" when one hits + Manually Synchronize + ([494](https://github.com/civicrm/civicrm-drupal/pull/494))** + +- **[CRM-21272](https://issues.civicrm.org/jira/browse/CRM-21272) CMSUser has + Drupal 6/7 code that breaks when using with Drupal 8 + ([11145](https://github.com/civicrm/civicrm-core/pull/11145), + [11139](https://github.com/civicrm/civicrm-core/pull/11139), and + [11079](https://github.com/civicrm/civicrm-core/pull/11079))** + + Code to determine if user registration is permitted is now handled in the + `CRM_Utils_System` classes. + +- **[CRM-19995](https://issues.civicrm.org/jira/browse/CRM-19995) Notice : + Undefined offset: 5 dans _civicrm_member_roles_sync() + ([500](https://github.com/civicrm/civicrm-drupal/pull/500))** + + This fixes a typo in the member role sync module that led to a PHP notice. + +### Joomla Integration + +- **[CRM-21203](https://issues.civicrm.org/jira/browse/CRM-21203) cli.php PHP + error prevents cron jobs from running + ([11062](https://github.com/civicrm/civicrm-core/pull/11062))** + + Changes in Joomla 3.8--along with difficulties in detecting the Joomla + version--prevented cron from executing on many Joomla sites. + +## <a name="misc"></a>Miscellany + +- **[CRM-20710](https://issues.civicrm.org/jira/browse/CRM-20710) Add function + to return all valid types + ([10486](https://github.com/civicrm/civicrm-core/pull/10486))** + +- **[CRM-21291](https://issues.civicrm.org/jira/browse/CRM-21291) Confirm this + code is not used & remove + ([11116](https://github.com/civicrm/civicrm-core/pull/11116))** + +- **[CRM-21249](https://issues.civicrm.org/jira/browse/CRM-21249) Google Geocode + limit breaks Jenkins test + ([11058](https://github.com/civicrm/civicrm-core/pull/11058))** + +- **[CRM-12167](https://issues.civicrm.org/jira/browse/CRM-12167) Add support + for admin-only fee / price field value options + ([11073](https://github.com/civicrm/civicrm-core/pull/11073)) (related + cleanup)** + + This change regenerates the DAO checksum. + +- **[nfc] Fix missing comma for phpcs + ([11119](https://github.com/civicrm/civicrm-core/pull/11119))** + +- **(NFC) Add in test of current practice in updating multiselect custom data + ([11081](https://github.com/civicrm/civicrm-core/pull/11081))** + +- **Civilint views components files + ([482](https://github.com/civicrm/civicrm-drupal/pull/482))** + +- **Civilint 2nd half of civicrm_handler_field files + ([486](https://github.com/civicrm/civicrm-drupal/pull/486))** + +- **Run civilint against civicrm_handler_filter_state_multi.inc + ([488](https://github.com/civicrm/civicrm-drupal/pull/488))** + +- **Run Civilint against civicrm_engage module + ([493](https://github.com/civicrm/civicrm-drupal/pull/493))** + +- **Run Civilint against the rest of views_handler and views plugin files + ([487](https://github.com/civicrm/civicrm-drupal/pull/487))** + +## <a name="credits"></a>Credits + +This release was developed by the following code authors: + +AGH Strategies - Alice Frumin, Andrew Hunt; Agileware - Alok Patel, Justin +Freeman; Australian Greens - Seamus Lee; Christian Wach; Circle Interactive - +Dave Jenkins; CiviCoop - Klaas Eikelboom; CiviCRM - Coleman Watts, Tim Otten; +CiviDesk - Nicolas Ganivet, Yashodha Chaku; CiviFirst - John Kirk; Community IT +Academy - William Mortada; CompuCorp - Michael Devery, Mukesh Ram, Omar Abu +Hussein; Coop SymbioTIC - Mathieu Lutfy; Daniël van Vuuren; Deepak Srivastava; +Freeform Solutions - Herb van den Dool; Fuzion - Jitendra Purohit; JMA +Consulting - Edsel Lopez, Monish Deb, Pradeep Nayak; John Kingsnorth; Joinery - +Allen Shaw; Lemniscus - Noah Miller; Megaphone Technology Consulting - Jon +Goldberg; MJW Consulting - Matthew Wire; Olivier Hertrich; Pawel Nowak; PowDevel - +Beto Aveiga; Progressive Technology Project - Jamie McClelland; Tadpole +Collective - Kevin Cristiano; Wikimedia Foundation - Eileen McNaughton, Maggie +Epps + +Most authors also reviewed code for this release; in addition, the following +reviewers contributed their comments: + +Adam Zilkie; AGH Strategies - Josh Corlew; Agileware - Agileware Team; Andrew +Thompson; Blackfly Solutions - Alan Dixon; British Humanist Association - +William Gordon; CiviDesk - Sunil Pawar; CompuCorp - Anna Kovalova, Guanhuan +Chen, Mirela Stanila; DevMate - Adam Kwiatkowski; Effy Elden; Electronic +Frontier Foundation - Mark Burdett; Ginkgo Street Labs - Frank Gómez; JMA +Consulting - Joe Murray; Joanne Chester; Johan Vervloet; Jonathan Richardson; +Korlon - Stuart Gaston; Left Join Labs - Sean Madsen; Levity - Kevin Levie; +Lighthouse Design and Consulting - Brian Shaughnessy; Lorenzo Ardizzone; MC3 - +Graham Mitchell; Marcello Gribaudo; Mohamed Ziada; myDropWizard - David Snopek; +Neil Zampella; Nicol Wistreich; Responsive Development Technologies - Thomas +Nilefalk; Richard Edgar; Semper IT - Karin Gerritsen; SEN Magazine - Jeremy +Nicholls; Skvare - Mark Hanna; small biz; Spry Digital - Ellen Hendricks; +Squiffle Consulting - Aidan Saunders; Stevel; Systopia - Björn Endres; Tech To +The People - Xavier Dutoit; Victor Huang; Web Access - Kurund Jalmi + +## <a name="feedback"></a>Feedback + +These release notes are edited by Andrew Hunt. If you'd like to provide +feedback on them, please login to https://chat.civicrm.org/civicrm and contact +`@agh1`. diff --git a/civicrm/sql/civicrm.mysql b/civicrm/sql/civicrm.mysql index 96ad32a2d0..59ad075cc2 100644 --- a/civicrm/sql/civicrm.mysql +++ b/civicrm/sql/civicrm.mysql @@ -3116,7 +3116,7 @@ CREATE TABLE `civicrm_membership_type` ( `description` varchar(255) COMMENT 'Description of Membership Type', `member_of_contact_id` int unsigned NOT NULL COMMENT 'Owner organization for this membership type. FK to Contact ID', `financial_type_id` int unsigned NOT NULL COMMENT 'If membership is paid by a contribution - what financial type should be used. FK to civicrm_financial_type.id', - `minimum_fee` decimal(20,2) DEFAULT 0 COMMENT 'Minimum fee for this membership (0 for free/complimentary memberships).', + `minimum_fee` decimal(18,9) DEFAULT 0 COMMENT 'Minimum fee for this membership (0 for free/complimentary memberships).', `duration_unit` varchar(8) COMMENT 'Unit in which membership period is expressed.', `duration_interval` int COMMENT 'Number of duration units in membership period (e.g. 1 year, 12 months).', `period_type` varchar(8) COMMENT 'Rolling membership period starts on signup date. Fixed membership periods start on fixed_period_start_day.', @@ -4398,7 +4398,7 @@ CREATE TABLE `civicrm_price_field_value` ( `description` text DEFAULT NULL COMMENT '>Price field option description.', `help_pre` text DEFAULT NULL COMMENT 'Price field option pre help text.', `help_post` text DEFAULT NULL COMMENT 'Price field option post field help.', - `amount` varchar(512) NOT NULL COMMENT 'Price field option amount', + `amount` decimal(18,9) NOT NULL COMMENT 'Price field option amount', `count` int unsigned DEFAULT NULL COMMENT 'Number of participants per field option', `max_value` int unsigned DEFAULT NULL COMMENT 'Max number of participants per field options', `weight` int DEFAULT 1 COMMENT 'Order in which the field options should appear', diff --git a/civicrm/sql/civicrm_data.mysql b/civicrm/sql/civicrm_data.mysql index 032c9b448f..9e4af9d28b 100644 --- a/civicrm/sql/civicrm_data.mysql +++ b/civicrm/sql/civicrm_data.mysql @@ -797,7 +797,7 @@ INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (1847, 1033, "10", "Kyustendil"), (1848, 1033, "11", "Lovech"), (1849, 1033, "12", "Montana"), -(1850, 1033, "13", "Pazardzik"), +(1850, 1033, "13", "Pazardzhik"), (1851, 1033, "14", "Pernik"), (1852, 1033, "15", "Pleven"), (1853, 1033, "16", "Plovdiv"), @@ -2924,44 +2924,44 @@ INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (4172, 1176, "B", "Bucuresti"), (4173, 1176, "AB", "Alba"), (4174, 1176, "AR", "Arad"), -(4175, 1176, "AG", "Arges"), -(4176, 1176, "BC", "Bacau"), +(4175, 1176, "AG", "ArgeÈ™"), +(4176, 1176, "BC", "Bacău"), (4177, 1176, "BH", "Bihor"), -(4178, 1176, "BN", "Bistrita-Nasaud"), -(4179, 1176, "BT", "Boto\'ani"), -(4180, 1176, "BV", "Bra\'ov"), -(4181, 1176, "BR", "Braila"), -(4182, 1176, "BZ", "Buzau"), -(4183, 1176, "CS", "Caras-Severin"), -(4184, 1176, "CL", "Ca la ras\'i"), +(4178, 1176, "BN", "BistriÈ›a-Năsăud"), +(4179, 1176, "BT", "BotoÈ™ani"), +(4180, 1176, "BV", "BraÈ™ov"), +(4181, 1176, "BR", "Brăila"), +(4182, 1176, "BZ", "Buzău"), +(4183, 1176, "CS", "CaraÈ™-Severin"), +(4184, 1176, "CL", "CălăraÈ™i"), (4185, 1176, "CJ", "Cluj"), -(4186, 1176, "CT", "Constant\'a"), +(4186, 1176, "CT", "ConstanÈ›a"), (4187, 1176, "CV", "Covasna"), -(4188, 1176, "DB", "Dambovit\'a"), +(4188, 1176, "DB", "DâmboviÈ›a"), (4189, 1176, "DJ", "Dolj"), -(4190, 1176, "GL", "Galat\'i"), +(4190, 1176, "GL", "GalaÈ›i"), (4191, 1176, "GR", "Giurgiu"), (4192, 1176, "GJ", "Gorj"), (4193, 1176, "HR", "Harghita"), (4194, 1176, "HD", "Hunedoara"), -(4195, 1176, "IL", "Ialomit\'a"), -(4196, 1176, "IS", "Ias\'i"), +(4195, 1176, "IL", "IalomiÈ›a"), +(4196, 1176, "IS", "IaÈ™i"), (4197, 1176, "IF", "Ilfov"), -(4198, 1176, "MM", "Maramures"), -(4199, 1176, "MH", "Mehedint\'i"), -(4200, 1176, "MS", "Mures"), -(4201, 1176, "NT", "Neamt"), +(4198, 1176, "MM", "MaramureÈ™"), +(4199, 1176, "MH", "MehedinÈ›i"), +(4200, 1176, "MS", "MureÈ™"), +(4201, 1176, "NT", "NeamÈ›"), (4202, 1176, "OT", "Olt"), (4203, 1176, "PH", "Prahova"), (4204, 1176, "SM", "Satu Mare"), -(4205, 1176, "SJ", "Sa laj"), +(4205, 1176, "SJ", "Sălaj"), (4206, 1176, "SB", "Sibiu"), (4207, 1176, "SV", "Suceava"), (4208, 1176, "TR", "Teleorman"), -(4209, 1176, "TM", "Timis"), +(4209, 1176, "TM", "TimiÈ™"), (4210, 1176, "TL", "Tulcea"), (4211, 1176, "VS", "Vaslui"), -(4212, 1176, "VL", "Valcea"), +(4212, 1176, "VL", "Vâlcea"), (4213, 1176, "VN", "Vrancea"), (4214, 1177, "AD", "Adygeya, Respublika"), (4215, 1177, "AL", "Altay, Respublika"), @@ -4377,7 +4377,32 @@ INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES -- CRM-21234 Missing subdivisions of Tajikistan. (NULL, 1209, "DU", "Dushanbe"), -(NULL, 1209, "RA", "Nohiyahoi Tobei JumhurÃ"); +(NULL, 1209, "RA", "Nohiyahoi Tobei JumhurÃ"), + +-- CRM-21268 Missing French overseas departments. +(NULL, 1076, "WF", "Wallis-et-Futuna"), +(NULL, 1076, "NC", "Nouvelle-Calédonie"), + +-- Add states for: Barbados and Antigua and Barbuda +(NULL, 1009, "03", "Saint George"), +(NULL, 1009, "04", "Saint John"), +(NULL, 1009, "05", "Saint Mary"), +(NULL, 1009, "06", "Saint Paul"), +(NULL, 1009, "07", "Saint Peter"), +(NULL, 1009, "08", "Saint Philip"), +(NULL, 1009, "10", "Barbuda"), +(NULL, 1009, "11", "Redonda"), +(NULL, 1018, "01", "Christ Church"), +(NULL, 1018, "02", "Saint Andrew"), +(NULL, 1018, "03", "Saint George"), +(NULL, 1018, "04", "Saint James"), +(NULL, 1018, "05", "Saint John"), +(NULL, 1018, "06", "Saint Joseph"), +(NULL, 1018, "07", "Saint Lucy"), +(NULL, 1018, "08", "Saint Michael"), +(NULL, 1018, "09", "Saint Peter"), +(NULL, 1018, "10", "Saint Philip"), +(NULL, 1018, "11", "Saint Thomas"); -- +--------------------------------------------------------------------+ -- | CiviCRM version 4.7 | -- +--------------------------------------------------------------------+ @@ -23923,4 +23948,4 @@ INSERT INTO `civicrm_report_instance` VALUES ( @domainID, 'Survey Details', 'survey/detail', 'Detailed report for canvassing, phone-banking, walk lists or other surveys.', 'access CiviReport', 'a:39:{s:6:"fields";a:2:{s:9:"sort_name";s:1:"1";s:6:"result";s:1:"1";}s:22:"assignee_contact_id_op";s:2:"eq";s:25:"assignee_contact_id_value";s:0:"";s:12:"sort_name_op";s:3:"has";s:15:"sort_name_value";s:0:"";s:17:"street_number_min";s:0:"";s:17:"street_number_max";s:0:"";s:16:"street_number_op";s:3:"lte";s:19:"street_number_value";s:0:"";s:14:"street_name_op";s:3:"has";s:17:"street_name_value";s:0:"";s:15:"postal_code_min";s:0:"";s:15:"postal_code_max";s:0:"";s:14:"postal_code_op";s:3:"lte";s:17:"postal_code_value";s:0:"";s:7:"city_op";s:3:"has";s:10:"city_value";s:0:"";s:20:"state_province_id_op";s:2:"in";s:23:"state_province_id_value";a:0:{}s:13:"country_id_op";s:2:"in";s:16:"country_id_value";a:0:{}s:12:"survey_id_op";s:2:"in";s:15:"survey_id_value";a:0:{}s:12:"status_id_op";s:2:"eq";s:15:"status_id_value";s:1:"1";s:11:"custom_1_op";s:2:"in";s:14:"custom_1_value";a:0:{}s:11:"custom_2_op";s:2:"in";s:14:"custom_2_value";a:0:{}s:17:"custom_3_relative";s:1:"0";s:13:"custom_3_from";s:0:"";s:11:"custom_3_to";s:0:"";s:11:"description";s:75:"Detailed report for canvassing, phone-banking, walk lists or other surveys.";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:10:"permission";s:17:"access CiviReport";s:6:"groups";s:0:"";s:9:"domain_id";i:1;}'); -UPDATE civicrm_domain SET version = '4.7.27'; +UPDATE civicrm_domain SET version = '4.7.28'; diff --git a/civicrm/sql/civicrm_generated.mysql b/civicrm/sql/civicrm_generated.mysql index 69f3da80ec..b5d3272108 100644 --- a/civicrm/sql/civicrm_generated.mysql +++ b/civicrm/sql/civicrm_generated.mysql @@ -399,7 +399,7 @@ UNLOCK TABLES; LOCK TABLES `civicrm_domain` WRITE; /*!40000 ALTER TABLE `civicrm_domain` DISABLE KEYS */; -INSERT INTO `civicrm_domain` (`id`, `name`, `description`, `config_backend`, `version`, `contact_id`, `locales`, `locale_custom_strings`) VALUES (1,'Default Domain Name',NULL,NULL,'4.7.27',1,NULL,'a:1:{s:5:\"en_US\";a:0:{}}'); +INSERT INTO `civicrm_domain` (`id`, `name`, `description`, `config_backend`, `version`, `contact_id`, `locales`, `locale_custom_strings`) VALUES (1,'Default Domain Name',NULL,NULL,'4.7.28',1,NULL,'a:1:{s:5:\"en_US\";a:0:{}}'); /*!40000 ALTER TABLE `civicrm_domain` ENABLE KEYS */; UNLOCK TABLES; @@ -1326,7 +1326,7 @@ UNLOCK TABLES; LOCK TABLES `civicrm_state_province` WRITE; /*!40000 ALTER TABLE `civicrm_state_province` DISABLE KEYS */; -INSERT INTO `civicrm_state_province` (`id`, `name`, `abbreviation`, `country_id`) VALUES (1000,'Alabama','AL',1228),(1001,'Alaska','AK',1228),(1002,'Arizona','AZ',1228),(1003,'Arkansas','AR',1228),(1004,'California','CA',1228),(1005,'Colorado','CO',1228),(1006,'Connecticut','CT',1228),(1007,'Delaware','DE',1228),(1008,'Florida','FL',1228),(1009,'Georgia','GA',1228),(1010,'Hawaii','HI',1228),(1011,'Idaho','ID',1228),(1012,'Illinois','IL',1228),(1013,'Indiana','IN',1228),(1014,'Iowa','IA',1228),(1015,'Kansas','KS',1228),(1016,'Kentucky','KY',1228),(1017,'Louisiana','LA',1228),(1018,'Maine','ME',1228),(1019,'Maryland','MD',1228),(1020,'Massachusetts','MA',1228),(1021,'Michigan','MI',1228),(1022,'Minnesota','MN',1228),(1023,'Mississippi','MS',1228),(1024,'Missouri','MO',1228),(1025,'Montana','MT',1228),(1026,'Nebraska','NE',1228),(1027,'Nevada','NV',1228),(1028,'New Hampshire','NH',1228),(1029,'New Jersey','NJ',1228),(1030,'New Mexico','NM',1228),(1031,'New York','NY',1228),(1032,'North Carolina','NC',1228),(1033,'North Dakota','ND',1228),(1034,'Ohio','OH',1228),(1035,'Oklahoma','OK',1228),(1036,'Oregon','OR',1228),(1037,'Pennsylvania','PA',1228),(1038,'Rhode Island','RI',1228),(1039,'South Carolina','SC',1228),(1040,'South Dakota','SD',1228),(1041,'Tennessee','TN',1228),(1042,'Texas','TX',1228),(1043,'Utah','UT',1228),(1044,'Vermont','VT',1228),(1045,'Virginia','VA',1228),(1046,'Washington','WA',1228),(1047,'West Virginia','WV',1228),(1048,'Wisconsin','WI',1228),(1049,'Wyoming','WY',1228),(1050,'District of Columbia','DC',1228),(1052,'American Samoa','AS',1228),(1053,'Guam','GU',1228),(1055,'Northern Mariana Islands','MP',1228),(1056,'Puerto Rico','PR',1228),(1057,'Virgin Islands','VI',1228),(1058,'United States Minor Outlying Islands','UM',1228),(1059,'Armed Forces Europe','AE',1228),(1060,'Armed Forces Americas','AA',1228),(1061,'Armed Forces Pacific','AP',1228),(1100,'Alberta','AB',1039),(1101,'British Columbia','BC',1039),(1102,'Manitoba','MB',1039),(1103,'New Brunswick','NB',1039),(1104,'Newfoundland and Labrador','NL',1039),(1105,'Northwest Territories','NT',1039),(1106,'Nova Scotia','NS',1039),(1107,'Nunavut','NU',1039),(1108,'Ontario','ON',1039),(1109,'Prince Edward Island','PE',1039),(1110,'Quebec','QC',1039),(1111,'Saskatchewan','SK',1039),(1112,'Yukon Territory','YT',1039),(1200,'Maharashtra','MM',1101),(1201,'Karnataka','KA',1101),(1202,'Andhra Pradesh','AP',1101),(1203,'Arunachal Pradesh','AR',1101),(1204,'Assam','AS',1101),(1205,'Bihar','BR',1101),(1206,'Chhattisgarh','CH',1101),(1207,'Goa','GA',1101),(1208,'Gujarat','GJ',1101),(1209,'Haryana','HR',1101),(1210,'Himachal Pradesh','HP',1101),(1211,'Jammu and Kashmir','JK',1101),(1212,'Jharkhand','JH',1101),(1213,'Kerala','KL',1101),(1214,'Madhya Pradesh','MP',1101),(1215,'Manipur','MN',1101),(1216,'Meghalaya','ML',1101),(1217,'Mizoram','MZ',1101),(1218,'Nagaland','NL',1101),(1219,'Orissa','OR',1101),(1220,'Punjab','PB',1101),(1221,'Rajasthan','RJ',1101),(1222,'Sikkim','SK',1101),(1223,'Tamil Nadu','TN',1101),(1224,'Tripura','TR',1101),(1225,'Uttarakhand','UT',1101),(1226,'Uttar Pradesh','UP',1101),(1227,'West Bengal','WB',1101),(1228,'Andaman and Nicobar Islands','AN',1101),(1229,'Dadra and Nagar Haveli','DN',1101),(1230,'Daman and Diu','DD',1101),(1231,'Delhi','DL',1101),(1232,'Lakshadweep','LD',1101),(1233,'Pondicherry','PY',1101),(1300,'mazowieckie','MZ',1172),(1301,'pomorskie','PM',1172),(1302,'dolnoÅ›lÄ…skie','DS',1172),(1303,'kujawsko-pomorskie','KP',1172),(1304,'lubelskie','LU',1172),(1305,'lubuskie','LB',1172),(1306,'łódzkie','LD',1172),(1307,'maÅ‚opolskie','MA',1172),(1308,'opolskie','OP',1172),(1309,'podkarpackie','PK',1172),(1310,'podlaskie','PD',1172),(1311,'Å›lÄ…skie','SL',1172),(1312,'Å›wiÄ™tokrzyskie','SK',1172),(1313,'warmiÅ„sko-mazurskie','WN',1172),(1314,'wielkopolskie','WP',1172),(1315,'zachodniopomorskie','ZP',1172),(1500,'Abu Zaby','AZ',1225),(1501,'\'Ajman','AJ',1225),(1502,'Al Fujayrah','FU',1225),(1503,'Ash Shariqah','SH',1225),(1504,'Dubayy','DU',1225),(1505,'Ra\'s al Khaymah','RK',1225),(1506,'Dac Lac','33',1233),(1507,'Umm al Qaywayn','UQ',1225),(1508,'Badakhshan','BDS',1001),(1509,'Badghis','BDG',1001),(1510,'Baghlan','BGL',1001),(1511,'Balkh','BAL',1001),(1512,'Bamian','BAM',1001),(1513,'Farah','FRA',1001),(1514,'Faryab','FYB',1001),(1515,'Ghazni','GHA',1001),(1516,'Ghowr','GHO',1001),(1517,'Helmand','HEL',1001),(1518,'Herat','HER',1001),(1519,'Jowzjan','JOW',1001),(1520,'Kabul','KAB',1001),(1521,'Kandahar','KAN',1001),(1522,'Kapisa','KAP',1001),(1523,'Khowst','KHO',1001),(1524,'Konar','KNR',1001),(1525,'Kondoz','KDZ',1001),(1526,'Laghman','LAG',1001),(1527,'Lowgar','LOW',1001),(1528,'Nangrahar','NAN',1001),(1529,'Nimruz','NIM',1001),(1530,'Nurestan','NUR',1001),(1531,'Oruzgan','ORU',1001),(1532,'Paktia','PIA',1001),(1533,'Paktika','PKA',1001),(1534,'Parwan','PAR',1001),(1535,'Samangan','SAM',1001),(1536,'Sar-e Pol','SAR',1001),(1537,'Takhar','TAK',1001),(1538,'Wardak','WAR',1001),(1539,'Zabol','ZAB',1001),(1540,'Berat','BR',1002),(1541,'Bulqizë','BU',1002),(1542,'Delvinë','DL',1002),(1543,'Devoll','DV',1002),(1544,'Dibër','DI',1002),(1545,'Durrës','DR',1002),(1546,'Elbasan','EL',1002),(1547,'Fier','FR',1002),(1548,'Gramsh','GR',1002),(1549,'Gjirokastër','GJ',1002),(1550,'Has','HA',1002),(1551,'Kavajë','KA',1002),(1552,'Kolonjë','ER',1002),(1553,'Korçë','KO',1002),(1554,'Krujë','KR',1002),(1555,'Kuçovë','KC',1002),(1556,'Kukës','KU',1002),(1557,'Kurbin','KB',1002),(1558,'Lezhë','LE',1002),(1559,'Librazhd','LB',1002),(1560,'Lushnjë','LU',1002),(1561,'Malësi e Madhe','MM',1002),(1562,'Mallakastër','MK',1002),(1563,'Mat','MT',1002),(1564,'Mirditë','MR',1002),(1565,'Peqin','PQ',1002),(1566,'Përmet','PR',1002),(1567,'Pogradec','PG',1002),(1568,'Pukë','PU',1002),(1569,'Sarandë','SR',1002),(1570,'Skrapar','SK',1002),(1571,'Shkodër','SH',1002),(1572,'Tepelenë','TE',1002),(1573,'Tiranë','TR',1002),(1574,'Tropojë','TP',1002),(1575,'Vlorë','VL',1002),(1576,'Erevan','ER',1011),(1577,'Aragacotn','AG',1011),(1578,'Ararat','AR',1011),(1579,'Armavir','AV',1011),(1580,'Gegarkunik\'','GR',1011),(1581,'Kotayk\'','KT',1011),(1582,'Lory','LO',1011),(1583,'Sirak','SH',1011),(1584,'Syunik\'','SU',1011),(1585,'Tavus','TV',1011),(1586,'Vayoc Jor','VD',1011),(1587,'Bengo','BGO',1006),(1588,'Benguela','BGU',1006),(1589,'Bie','BIE',1006),(1590,'Cabinda','CAB',1006),(1591,'Cuando-Cubango','CCU',1006),(1592,'Cuanza Norte','CNO',1006),(1593,'Cuanza Sul','CUS',1006),(1594,'Cunene','CNN',1006),(1595,'Huambo','HUA',1006),(1596,'Huila','HUI',1006),(1597,'Luanda','LUA',1006),(1598,'Lunda Norte','LNO',1006),(1599,'Lunda Sul','LSU',1006),(1600,'Malange','MAL',1006),(1601,'Moxico','MOX',1006),(1602,'Namibe','NAM',1006),(1603,'Uige','UIG',1006),(1604,'Zaire','ZAI',1006),(1605,'Capital federal','C',1010),(1606,'Buenos Aires','B',1010),(1607,'Catamarca','K',1010),(1608,'Cordoba','X',1010),(1609,'Corrientes','W',1010),(1610,'Chaco','H',1010),(1611,'Chubut','U',1010),(1612,'Entre Rios','E',1010),(1613,'Formosa','P',1010),(1614,'Jujuy','Y',1010),(1615,'La Pampa','L',1010),(1616,'Mendoza','M',1010),(1617,'Misiones','N',1010),(1618,'Neuquen','Q',1010),(1619,'Rio Negro','R',1010),(1620,'Salta','A',1010),(1621,'San Juan','J',1010),(1622,'San Luis','D',1010),(1623,'Santa Cruz','Z',1010),(1624,'Santa Fe','S',1010),(1625,'Santiago del Estero','G',1010),(1626,'Tierra del Fuego','V',1010),(1627,'Tucuman','T',1010),(1628,'Burgenland','1',1014),(1629,'Kärnten','2',1014),(1630,'Niederösterreich','3',1014),(1631,'Oberösterreich','4',1014),(1632,'Salzburg','5',1014),(1633,'Steiermark','6',1014),(1634,'Tirol','7',1014),(1635,'Vorarlberg','8',1014),(1636,'Wien','9',1014),(1637,'Australian Antarctic Territory','AAT',1008),(1638,'Australian Capital Territory','ACT',1013),(1639,'Northern Territory','NT',1013),(1640,'New South Wales','NSW',1013),(1641,'Queensland','QLD',1013),(1642,'South Australia','SA',1013),(1643,'Tasmania','TAS',1013),(1644,'Victoria','VIC',1013),(1645,'Western Australia','WA',1013),(1646,'Naxcivan','NX',1015),(1647,'Ali Bayramli','AB',1015),(1648,'Baki','BA',1015),(1649,'Ganca','GA',1015),(1650,'Lankaran','LA',1015),(1651,'Mingacevir','MI',1015),(1652,'Naftalan','NA',1015),(1653,'Saki','SA',1015),(1654,'Sumqayit','SM',1015),(1655,'Susa','SS',1015),(1656,'Xankandi','XA',1015),(1657,'Yevlax','YE',1015),(1658,'Abseron','ABS',1015),(1659,'Agcabadi','AGC',1015),(1660,'Agdam','AGM',1015),(1661,'Agdas','AGS',1015),(1662,'Agstafa','AGA',1015),(1663,'Agsu','AGU',1015),(1664,'Astara','AST',1015),(1665,'Babak','BAB',1015),(1666,'Balakan','BAL',1015),(1667,'Barda','BAR',1015),(1668,'Beylagan','BEY',1015),(1669,'Bilasuvar','BIL',1015),(1670,'Cabrayll','CAB',1015),(1671,'Calilabad','CAL',1015),(1672,'Culfa','CUL',1015),(1673,'Daskasan','DAS',1015),(1674,'Davaci','DAV',1015),(1675,'Fuzuli','FUZ',1015),(1676,'Gadabay','GAD',1015),(1677,'Goranboy','GOR',1015),(1678,'Goycay','GOY',1015),(1679,'Haciqabul','HAC',1015),(1680,'Imisli','IMI',1015),(1681,'Ismayilli','ISM',1015),(1682,'Kalbacar','KAL',1015),(1683,'Kurdamir','KUR',1015),(1684,'Lacin','LAC',1015),(1685,'Lerik','LER',1015),(1686,'Masalli','MAS',1015),(1687,'Neftcala','NEF',1015),(1688,'Oguz','OGU',1015),(1689,'Ordubad','ORD',1015),(1690,'Qabala','QAB',1015),(1691,'Qax','QAX',1015),(1692,'Qazax','QAZ',1015),(1693,'Qobustan','QOB',1015),(1694,'Quba','QBA',1015),(1695,'Qubadli','QBI',1015),(1696,'Qusar','QUS',1015),(1697,'Saatli','SAT',1015),(1698,'Sabirabad','SAB',1015),(1699,'Sadarak','SAD',1015),(1700,'Sahbuz','SAH',1015),(1701,'Salyan','SAL',1015),(1702,'Samaxi','SMI',1015),(1703,'Samkir','SKR',1015),(1704,'Samux','SMX',1015),(1705,'Sarur','SAR',1015),(1706,'Siyazan','SIY',1015),(1707,'Tartar','TAR',1015),(1708,'Tovuz','TOV',1015),(1709,'Ucar','UCA',1015),(1710,'Xacmaz','XAC',1015),(1711,'Xanlar','XAN',1015),(1712,'Xizi','XIZ',1015),(1713,'Xocali','XCI',1015),(1714,'Xocavand','XVD',1015),(1715,'Yardimli','YAR',1015),(1716,'Zangilan','ZAN',1015),(1717,'Zaqatala','ZAQ',1015),(1718,'Zardab','ZAR',1015),(1719,'Federacija Bosna i Hercegovina','BIH',1026),(1720,'Republika Srpska','SRP',1026),(1721,'Bagerhat zila','05',1017),(1722,'Bandarban zila','01',1017),(1723,'Barguna zila','02',1017),(1724,'Barisal zila','06',1017),(1725,'Bhola zila','07',1017),(1726,'Bogra zila','03',1017),(1727,'Brahmanbaria zila','04',1017),(1728,'Chandpur zila','09',1017),(1729,'Chittagong zila','10',1017),(1730,'Chuadanga zila','12',1017),(1731,'Comilla zila','08',1017),(1732,'Cox\'s Bazar zila','11',1017),(1733,'Dhaka zila','13',1017),(1734,'Dinajpur zila','14',1017),(1735,'Faridpur zila','15',1017),(1736,'Feni zila','16',1017),(1737,'Gaibandha zila','19',1017),(1738,'Gazipur zila','18',1017),(1739,'Gopalganj zila','17',1017),(1740,'Habiganj zila','20',1017),(1741,'Jaipurhat zila','24',1017),(1742,'Jamalpur zila','21',1017),(1743,'Jessore zila','22',1017),(1744,'Jhalakati zila','25',1017),(1745,'Jhenaidah zila','23',1017),(1746,'Khagrachari zila','29',1017),(1747,'Khulna zila','27',1017),(1748,'Kishorganj zila','26',1017),(1749,'Kurigram zila','28',1017),(1750,'Kushtia zila','30',1017),(1751,'Lakshmipur zila','31',1017),(1752,'Lalmonirhat zila','32',1017),(1753,'Madaripur zila','36',1017),(1754,'Magura zila','37',1017),(1755,'Manikganj zila','33',1017),(1756,'Meherpur zila','39',1017),(1757,'Moulvibazar zila','38',1017),(1758,'Munshiganj zila','35',1017),(1759,'Mymensingh zila','34',1017),(1760,'Naogaon zila','48',1017),(1761,'Narail zila','43',1017),(1762,'Narayanganj zila','40',1017),(1763,'Narsingdi zila','42',1017),(1764,'Natore zila','44',1017),(1765,'Nawabganj zila','45',1017),(1766,'Netrakona zila','41',1017),(1767,'Nilphamari zila','46',1017),(1768,'Noakhali zila','47',1017),(1769,'Pabna zila','49',1017),(1770,'Panchagarh zila','52',1017),(1771,'Patuakhali zila','51',1017),(1772,'Pirojpur zila','50',1017),(1773,'Rajbari zila','53',1017),(1774,'Rajshahi zila','54',1017),(1775,'Rangamati zila','56',1017),(1776,'Rangpur zila','55',1017),(1777,'Satkhira zila','58',1017),(1778,'Shariatpur zila','62',1017),(1779,'Sherpur zila','57',1017),(1780,'Sirajganj zila','59',1017),(1781,'Sunamganj zila','61',1017),(1782,'Sylhet zila','60',1017),(1783,'Tangail zila','63',1017),(1784,'Thakurgaon zila','64',1017),(1785,'Antwerpen','VAN',1020),(1786,'Brabant Wallon','WBR',1020),(1787,'Hainaut','WHT',1020),(1788,'Liege','WLG',1020),(1789,'Limburg','VLI',1020),(1790,'Luxembourg','WLX',1020),(1791,'Namur','WNA',1020),(1792,'Oost-Vlaanderen','VOV',1020),(1793,'Vlaams-Brabant','VBR',1020),(1794,'West-Vlaanderen','VWV',1020),(1795,'Bale','BAL',1034),(1796,'Bam','BAM',1034),(1797,'Banwa','BAN',1034),(1798,'Bazega','BAZ',1034),(1799,'Bougouriba','BGR',1034),(1800,'Boulgou','BLG',1034),(1801,'Boulkiemde','BLK',1034),(1802,'Comoe','COM',1034),(1803,'Ganzourgou','GAN',1034),(1804,'Gnagna','GNA',1034),(1805,'Gourma','GOU',1034),(1806,'Houet','HOU',1034),(1807,'Ioba','IOB',1034),(1808,'Kadiogo','KAD',1034),(1809,'Kenedougou','KEN',1034),(1810,'Komondjari','KMD',1034),(1811,'Kompienga','KMP',1034),(1812,'Kossi','KOS',1034),(1813,'Koulpulogo','KOP',1034),(1814,'Kouritenga','KOT',1034),(1815,'Kourweogo','KOW',1034),(1816,'Leraba','LER',1034),(1817,'Loroum','LOR',1034),(1818,'Mouhoun','MOU',1034),(1819,'Nahouri','NAO',1034),(1820,'Namentenga','NAM',1034),(1821,'Nayala','NAY',1034),(1822,'Noumbiel','NOU',1034),(1823,'Oubritenga','OUB',1034),(1824,'Oudalan','OUD',1034),(1825,'Passore','PAS',1034),(1826,'Poni','PON',1034),(1827,'Sanguie','SNG',1034),(1828,'Sanmatenga','SMT',1034),(1829,'Seno','SEN',1034),(1830,'Siasili','SIS',1034),(1831,'Soum','SOM',1034),(1832,'Sourou','SOR',1034),(1833,'Tapoa','TAP',1034),(1834,'Tui','TUI',1034),(1835,'Yagha','YAG',1034),(1836,'Yatenga','YAT',1034),(1837,'Ziro','ZIR',1034),(1838,'Zondoma','ZON',1034),(1839,'Zoundweogo','ZOU',1034),(1840,'Blagoevgrad','01',1033),(1841,'Burgas','02',1033),(1842,'Dobrich','08',1033),(1843,'Gabrovo','07',1033),(1844,'Haskovo','26',1033),(1845,'Yambol','28',1033),(1846,'Kardzhali','09',1033),(1847,'Kyustendil','10',1033),(1848,'Lovech','11',1033),(1849,'Montana','12',1033),(1850,'Pazardzik','13',1033),(1851,'Pernik','14',1033),(1852,'Pleven','15',1033),(1853,'Plovdiv','16',1033),(1854,'Razgrad','17',1033),(1855,'Ruse','18',1033),(1856,'Silistra','19',1033),(1857,'Sliven','20',1033),(1858,'Smolyan','21',1033),(1859,'Sofia','23',1033),(1860,'Stara Zagora','24',1033),(1861,'Shumen','27',1033),(1862,'Targovishte','25',1033),(1863,'Varna','03',1033),(1864,'Veliko Tarnovo','04',1033),(1865,'Vidin','05',1033),(1866,'Vratsa','06',1033),(1867,'Al Hadd','01',1016),(1868,'Al Manamah','03',1016),(1869,'Al Mintaqah al Gharbiyah','10',1016),(1870,'Al Mintagah al Wusta','07',1016),(1871,'Al Mintaqah ash Shamaliyah','05',1016),(1872,'Al Muharraq','02',1016),(1873,'Ar Rifa','09',1016),(1874,'Jidd Hafs','04',1016),(1875,'Madluat Jamad','12',1016),(1876,'Madluat Isa','08',1016),(1877,'Mintaqat Juzur tawar','11',1016),(1878,'Sitrah','06',1016),(1879,'Bubanza','BB',1036),(1880,'Bujumbura','BJ',1036),(1881,'Bururi','BR',1036),(1882,'Cankuzo','CA',1036),(1883,'Cibitoke','CI',1036),(1884,'Gitega','GI',1036),(1885,'Karuzi','KR',1036),(1886,'Kayanza','KY',1036),(1887,'Makamba','MA',1036),(1888,'Muramvya','MU',1036),(1889,'Mwaro','MW',1036),(1890,'Ngozi','NG',1036),(1891,'Rutana','RT',1036),(1892,'Ruyigi','RY',1036),(1893,'Alibori','AL',1022),(1894,'Atakora','AK',1022),(1895,'Atlantique','AQ',1022),(1896,'Borgou','BO',1022),(1897,'Collines','CO',1022),(1898,'Donga','DO',1022),(1899,'Kouffo','KO',1022),(1900,'Littoral','LI',1022),(1901,'Mono','MO',1022),(1902,'Oueme','OU',1022),(1903,'Plateau','PL',1022),(1904,'Zou','ZO',1022),(1905,'Belait','BE',1032),(1906,'Brunei-Muara','BM',1032),(1907,'Temburong','TE',1032),(1908,'Tutong','TU',1032),(1909,'Cochabamba','C',1025),(1910,'Chuquisaca','H',1025),(1911,'El Beni','B',1025),(1912,'La Paz','L',1025),(1913,'Oruro','O',1025),(1914,'Pando','N',1025),(1915,'Potosi','P',1025),(1916,'Tarija','T',1025),(1917,'Acre','AC',1029),(1918,'Alagoas','AL',1029),(1919,'Amazonas','AM',1029),(1920,'Amapa','AP',1029),(1921,'Bahia','BA',1029),(1922,'Ceara','CE',1029),(1923,'Distrito Federal','DF',1029),(1924,'Espirito Santo','ES',1029),(1926,'Goias','GO',1029),(1927,'Maranhao','MA',1029),(1928,'Minas Gerais','MG',1029),(1929,'Mato Grosso do Sul','MS',1029),(1930,'Mato Grosso','MT',1029),(1931,'Para','PA',1029),(1932,'Paraiba','PB',1029),(1933,'Pernambuco','PE',1029),(1934,'Piaui','PI',1029),(1935,'Parana','PR',1029),(1936,'Rio de Janeiro','RJ',1029),(1937,'Rio Grande do Norte','RN',1029),(1938,'Rondonia','RO',1029),(1939,'Roraima','RR',1029),(1940,'Rio Grande do Sul','RS',1029),(1941,'Santa Catarina','SC',1029),(1942,'Sergipe','SE',1029),(1943,'Sao Paulo','SP',1029),(1944,'Tocantins','TO',1029),(1945,'Acklins and Crooked Islands','AC',1212),(1946,'Bimini','BI',1212),(1947,'Cat Island','CI',1212),(1948,'Exuma','EX',1212),(1955,'Inagua','IN',1212),(1957,'Long Island','LI',1212),(1959,'Mayaguana','MG',1212),(1960,'New Providence','NP',1212),(1962,'Ragged Island','RI',1212),(1966,'Bumthang','33',1024),(1967,'Chhukha','12',1024),(1968,'Dagana','22',1024),(1969,'Gasa','GA',1024),(1970,'Ha','13',1024),(1971,'Lhuentse','44',1024),(1972,'Monggar','42',1024),(1973,'Paro','11',1024),(1974,'Pemagatshel','43',1024),(1975,'Punakha','23',1024),(1976,'Samdrup Jongkha','45',1024),(1977,'Samtee','14',1024),(1978,'Sarpang','31',1024),(1979,'Thimphu','15',1024),(1980,'Trashigang','41',1024),(1981,'Trashi Yangtse','TY',1024),(1982,'Trongsa','32',1024),(1983,'Tsirang','21',1024),(1984,'Wangdue Phodrang','24',1024),(1985,'Zhemgang','34',1024),(1986,'Central','CE',1027),(1987,'Ghanzi','GH',1027),(1988,'Kgalagadi','KG',1027),(1989,'Kgatleng','KL',1027),(1990,'Kweneng','KW',1027),(1991,'Ngamiland','NG',1027),(1992,'North-East','NE',1027),(1993,'North-West','NW',1027),(1994,'South-East','SE',1027),(1995,'Southern','SO',1027),(1996,'Brèsckaja voblasc\'','BR',1019),(1997,'Homel\'skaja voblasc\'','HO',1019),(1998,'Hrodzenskaja voblasc\'','HR',1019),(1999,'Mahilëuskaja voblasc\'','MA',1019),(2000,'Minskaja voblasc\'','MI',1019),(2001,'Vicebskaja voblasc\'','VI',1019),(2002,'Belize','BZ',1021),(2003,'Cayo','CY',1021),(2004,'Corozal','CZL',1021),(2005,'Orange Walk','OW',1021),(2006,'Stann Creek','SC',1021),(2007,'Toledo','TOL',1021),(2008,'Kinshasa','KN',1050),(2011,'Equateur','EQ',1050),(2014,'Kasai-Oriental','KE',1050),(2016,'Maniema','MA',1050),(2017,'Nord-Kivu','NK',1050),(2019,'Sud-Kivu','SK',1050),(2020,'Bangui','BGF',1042),(2021,'Bamingui-Bangoran','BB',1042),(2022,'Basse-Kotto','BK',1042),(2023,'Haute-Kotto','HK',1042),(2024,'Haut-Mbomou','HM',1042),(2025,'Kemo','KG',1042),(2026,'Lobaye','LB',1042),(2027,'Mambere-Kadei','HS',1042),(2028,'Mbomou','MB',1042),(2029,'Nana-Grebizi','KB',1042),(2030,'Nana-Mambere','NM',1042),(2031,'Ombella-Mpoko','MP',1042),(2032,'Ouaka','UK',1042),(2033,'Ouham','AC',1042),(2034,'Ouham-Pende','OP',1042),(2035,'Sangha-Mbaere','SE',1042),(2036,'Vakaga','VR',1042),(2037,'Brazzaville','BZV',1051),(2038,'Bouenza','11',1051),(2039,'Cuvette','8',1051),(2040,'Cuvette-Ouest','15',1051),(2041,'Kouilou','5',1051),(2042,'Lekoumou','2',1051),(2043,'Likouala','7',1051),(2044,'Niari','9',1051),(2045,'Plateaux','14',1051),(2046,'Pool','12',1051),(2047,'Sangha','13',1051),(2048,'Aargau','AG',1205),(2049,'Appenzell Innerrhoden','AI',1205),(2050,'Appenzell Ausserrhoden','AR',1205),(2051,'Bern','BE',1205),(2052,'Basel-Landschaft','BL',1205),(2053,'Basel-Stadt','BS',1205),(2054,'Fribourg','FR',1205),(2055,'Geneva','GE',1205),(2056,'Glarus','GL',1205),(2057,'Graubunden','GR',1205),(2058,'Jura','JU',1205),(2059,'Luzern','LU',1205),(2060,'Neuchatel','NE',1205),(2061,'Nidwalden','NW',1205),(2062,'Obwalden','OW',1205),(2063,'Sankt Gallen','SG',1205),(2064,'Schaffhausen','SH',1205),(2065,'Solothurn','SO',1205),(2066,'Schwyz','SZ',1205),(2067,'Thurgau','TG',1205),(2068,'Ticino','TI',1205),(2069,'Uri','UR',1205),(2070,'Vaud','VD',1205),(2071,'Valais','VS',1205),(2072,'Zug','ZG',1205),(2073,'Zurich','ZH',1205),(2074,'18 Montagnes','06',1054),(2075,'Agnebi','16',1054),(2076,'Bas-Sassandra','09',1054),(2077,'Denguele','10',1054),(2078,'Haut-Sassandra','02',1054),(2079,'Lacs','07',1054),(2080,'Lagunes','01',1054),(2081,'Marahoue','12',1054),(2082,'Moyen-Comoe','05',1054),(2083,'Nzi-Comoe','11',1054),(2084,'Savanes','03',1054),(2085,'Sud-Bandama','15',1054),(2086,'Sud-Comoe','13',1054),(2087,'Vallee du Bandama','04',1054),(2088,'Worodouqou','14',1054),(2089,'Zanzan','08',1054),(2090,'Aisen del General Carlos Ibanez del Campo','AI',1044),(2091,'Antofagasta','AN',1044),(2092,'Araucania','AR',1044),(2093,'Atacama','AT',1044),(2094,'Bio-Bio','BI',1044),(2095,'Coquimbo','CO',1044),(2096,'Libertador General Bernardo O\'Higgins','LI',1044),(2097,'Los Lagos','LL',1044),(2098,'Magallanes','MA',1044),(2099,'Maule','ML',1044),(2100,'Santiago Metropolitan','SM',1044),(2101,'Tarapaca','TA',1044),(2102,'Valparaiso','VS',1044),(2103,'Adamaoua','AD',1038),(2104,'Centre','CE',1038),(2105,'East','ES',1038),(2106,'Far North','EN',1038),(2107,'North','NO',1038),(2108,'South','SW',1038),(2109,'South-West','SW',1038),(2110,'West','OU',1038),(2111,'Beijing','11',1045),(2112,'Chongqing','50',1045),(2113,'Shanghai','31',1045),(2114,'Tianjin','12',1045),(2115,'Anhui','34',1045),(2116,'Fujian','35',1045),(2117,'Gansu','62',1045),(2118,'Guangdong','44',1045),(2119,'Guizhou','52',1045),(2120,'Hainan','46',1045),(2121,'Hebei','13',1045),(2122,'Heilongjiang','23',1045),(2123,'Henan','41',1045),(2124,'Hubei','42',1045),(2125,'Hunan','43',1045),(2126,'Jiangsu','32',1045),(2127,'Jiangxi','36',1045),(2128,'Jilin','22',1045),(2129,'Liaoning','21',1045),(2130,'Qinghai','63',1045),(2131,'Shaanxi','61',1045),(2132,'Shandong','37',1045),(2133,'Shanxi','14',1045),(2134,'Sichuan','51',1045),(2135,'Taiwan','71',1045),(2136,'Yunnan','53',1045),(2137,'Zhejiang','33',1045),(2138,'Guangxi','45',1045),(2139,'Neia Mongol (mn)','15',1045),(2140,'Xinjiang','65',1045),(2141,'Xizang','54',1045),(2142,'Hong Kong','91',1045),(2143,'Macau','92',1045),(2144,'Distrito Capital de Bogotá','DC',1048),(2145,'Amazonea','AMA',1048),(2146,'Antioquia','ANT',1048),(2147,'Arauca','ARA',1048),(2148,'Atlántico','ATL',1048),(2149,'BolÃvar','BOL',1048),(2150,'Boyacá','BOY',1048),(2151,'Caldea','CAL',1048),(2152,'Caquetá','CAQ',1048),(2153,'Casanare','CAS',1048),(2154,'Cauca','CAU',1048),(2155,'Cesar','CES',1048),(2156,'Córdoba','COR',1048),(2157,'Cundinamarca','CUN',1048),(2158,'Chocó','CHO',1048),(2159,'GuainÃa','GUA',1048),(2160,'Guaviare','GUV',1048),(2161,'La Guajira','LAG',1048),(2162,'Magdalena','MAG',1048),(2163,'Meta','MET',1048),(2164,'Nariño','NAR',1048),(2165,'Norte de Santander','NSA',1048),(2166,'Putumayo','PUT',1048),(2167,'Quindio','QUI',1048),(2168,'Risaralda','RIS',1048),(2169,'San Andrés, Providencia y Santa Catalina','SAP',1048),(2170,'Santander','SAN',1048),(2171,'Sucre','SUC',1048),(2172,'Tolima','TOL',1048),(2173,'Valle del Cauca','VAC',1048),(2174,'Vaupés','VAU',1048),(2175,'Vichada','VID',1048),(2176,'Alajuela','A',1053),(2177,'Cartago','C',1053),(2178,'Guanacaste','G',1053),(2179,'Heredia','H',1053),(2180,'Limon','L',1053),(2181,'Puntarenas','P',1053),(2182,'San Jose','SJ',1053),(2183,'Camagey','09',1056),(2184,'Ciego de `vila','08',1056),(2185,'Cienfuegos','06',1056),(2186,'Ciudad de La Habana','03',1056),(2187,'Granma','12',1056),(2188,'Guantanamo','14',1056),(2189,'Holquin','11',1056),(2190,'La Habana','02',1056),(2191,'Las Tunas','10',1056),(2192,'Matanzas','04',1056),(2193,'Pinar del Rio','01',1056),(2194,'Sancti Spiritus','07',1056),(2195,'Santiago de Cuba','13',1056),(2196,'Villa Clara','05',1056),(2197,'Isla de la Juventud','99',1056),(2198,'Pinar del Roo','PR',1056),(2199,'Ciego de Avila','CA',1056),(2200,'Camagoey','CG',1056),(2201,'Holgun','HO',1056),(2202,'Sancti Spritus','SS',1056),(2203,'Municipio Especial Isla de la Juventud','IJ',1056),(2204,'Boa Vista','BV',1040),(2205,'Brava','BR',1040),(2206,'Calheta de Sao Miguel','CS',1040),(2207,'Fogo','FO',1040),(2208,'Maio','MA',1040),(2209,'Mosteiros','MO',1040),(2210,'Paul','PA',1040),(2211,'Porto Novo','PN',1040),(2212,'Praia','PR',1040),(2213,'Ribeira Grande','RG',1040),(2214,'Sal','SL',1040),(2215,'Sao Domingos','SD',1040),(2216,'Sao Filipe','SF',1040),(2217,'Sao Nicolau','SN',1040),(2218,'Sao Vicente','SV',1040),(2219,'Tarrafal','TA',1040),(2220,'Ammochostos Magusa','04',1057),(2221,'Keryneia','06',1057),(2222,'Larnaka','03',1057),(2223,'Lefkosia','01',1057),(2224,'Lemesos','02',1057),(2225,'Pafos','05',1057),(2226,'JihoÄeský kraj','JC',1058),(2227,'Jihomoravský kraj','JM',1058),(2228,'Karlovarský kraj','KA',1058),(2229,'Královéhradecký kraj','KR',1058),(2230,'Liberecký kraj','LI',1058),(2231,'Moravskoslezský kraj','MO',1058),(2232,'Olomoucký kraj','OL',1058),(2233,'Pardubický kraj','PA',1058),(2234,'Plzeňský kraj','PL',1058),(2235,'Praha, hlavnà mÄ›sto','PR',1058),(2236,'StÅ™edoÄeský kraj','ST',1058),(2237,'Ústecký kraj','US',1058),(2238,'VysoÄina','VY',1058),(2239,'ZlÃnský kraj','ZL',1058),(2240,'Baden-Wuerttemberg','BW',1082),(2241,'Bayern','BY',1082),(2242,'Bremen','HB',1082),(2243,'Hamburg','HH',1082),(2244,'Hessen','HE',1082),(2245,'Niedersachsen','NI',1082),(2246,'Nordrhein-Westfalen','NW',1082),(2247,'Rheinland-Pfalz','RP',1082),(2248,'Saarland','SL',1082),(2249,'Schleswig-Holstein','SH',1082),(2250,'Berlin','BR',1082),(2251,'Brandenburg','BB',1082),(2252,'Mecklenburg-Vorpommern','MV',1082),(2253,'Sachsen','SN',1082),(2254,'Sachsen-Anhalt','ST',1082),(2255,'Thueringen','TH',1082),(2256,'Ali Sabiah','AS',1060),(2257,'Dikhil','DI',1060),(2258,'Djibouti','DJ',1060),(2259,'Obock','OB',1060),(2260,'Tadjoura','TA',1060),(2261,'Frederiksberg','147',1059),(2262,'Copenhagen City','101',1059),(2263,'Copenhagen','015',1059),(2264,'Frederiksborg','020',1059),(2265,'Roskilde','025',1059),(2266,'Vestsjælland','030',1059),(2267,'Storstrøm','035',1059),(2268,'Bornholm','040',1059),(2269,'Fyn','042',1059),(2270,'South Jutland','050',1059),(2271,'Ribe','055',1059),(2272,'Vejle','060',1059),(2273,'Ringkjøbing','065',1059),(2274,'Ã…rhus','070',1059),(2275,'Viborg','076',1059),(2276,'North Jutland','080',1059),(2277,'Distrito Nacional (Santo Domingo)','01',1062),(2278,'Azua','02',1062),(2279,'Bahoruco','03',1062),(2280,'Barahona','04',1062),(2281,'Dajabón','05',1062),(2282,'Duarte','06',1062),(2283,'El Seybo [El Seibo]','08',1062),(2284,'Espaillat','09',1062),(2285,'Hato Mayor','30',1062),(2286,'Independencia','10',1062),(2287,'La Altagracia','11',1062),(2288,'La Estrelleta [Elias Pina]','07',1062),(2289,'La Romana','12',1062),(2290,'La Vega','13',1062),(2291,'Maroia Trinidad Sánchez','14',1062),(2292,'Monseñor Nouel','28',1062),(2293,'Monte Cristi','15',1062),(2294,'Monte Plata','29',1062),(2295,'Pedernales','16',1062),(2296,'Peravia','17',1062),(2297,'Puerto Plata','18',1062),(2298,'Salcedo','19',1062),(2299,'Samaná','20',1062),(2300,'San Cristóbal','21',1062),(2301,'San Pedro de MacorÃs','23',1062),(2302,'Sánchez RamÃrez','24',1062),(2303,'Santiago','25',1062),(2304,'Santiago RodrÃguez','26',1062),(2305,'Valverde','27',1062),(2306,'Adrar','01',1003),(2307,'Ain Defla','44',1003),(2308,'Ain Tmouchent','46',1003),(2309,'Alger','16',1003),(2310,'Annaba','23',1003),(2311,'Batna','05',1003),(2312,'Bechar','08',1003),(2313,'Bejaia','06',1003),(2314,'Biskra','07',1003),(2315,'Blida','09',1003),(2316,'Bordj Bou Arreridj','34',1003),(2317,'Bouira','10',1003),(2318,'Boumerdes','35',1003),(2319,'Chlef','02',1003),(2320,'Constantine','25',1003),(2321,'Djelfa','17',1003),(2322,'El Bayadh','32',1003),(2323,'El Oued','39',1003),(2324,'El Tarf','36',1003),(2325,'Ghardaia','47',1003),(2326,'Guelma','24',1003),(2327,'Illizi','33',1003),(2328,'Jijel','18',1003),(2329,'Khenchela','40',1003),(2330,'Laghouat','03',1003),(2331,'Mascara','29',1003),(2332,'Medea','26',1003),(2333,'Mila','43',1003),(2334,'Mostaganem','27',1003),(2335,'Msila','28',1003),(2336,'Naama','45',1003),(2337,'Oran','31',1003),(2338,'Ouargla','30',1003),(2339,'Oum el Bouaghi','04',1003),(2340,'Relizane','48',1003),(2341,'Saida','20',1003),(2342,'Setif','19',1003),(2343,'Sidi Bel Abbes','22',1003),(2344,'Skikda','21',1003),(2345,'Souk Ahras','41',1003),(2346,'Tamanghasset','11',1003),(2347,'Tebessa','12',1003),(2348,'Tiaret','14',1003),(2349,'Tindouf','37',1003),(2350,'Tipaza','42',1003),(2351,'Tissemsilt','38',1003),(2352,'Tizi Ouzou','15',1003),(2353,'Tlemcen','13',1003),(2354,'Azuay','A',1064),(2355,'Bolivar','B',1064),(2356,'Canar','F',1064),(2357,'Carchi','C',1064),(2358,'Cotopaxi','X',1064),(2359,'Chimborazo','H',1064),(2360,'El Oro','O',1064),(2361,'Esmeraldas','E',1064),(2362,'Galapagos','W',1064),(2363,'Guayas','G',1064),(2364,'Imbabura','I',1064),(2365,'Loja','L',1064),(2366,'Los Rios','R',1064),(2367,'Manabi','M',1064),(2368,'Morona-Santiago','S',1064),(2369,'Napo','N',1064),(2370,'Orellana','D',1064),(2371,'Pastaza','Y',1064),(2372,'Pichincha','P',1064),(2373,'Sucumbios','U',1064),(2374,'Tungurahua','T',1064),(2375,'Zamora-Chinchipe','Z',1064),(2376,'Harjumaa','37',1069),(2377,'Hiiumaa','39',1069),(2378,'Ida-Virumaa','44',1069),(2379,'Jõgevamaa','49',1069),(2380,'Järvamaa','51',1069),(2381,'Läänemaa','57',1069),(2382,'Lääne-Virumaa','59',1069),(2383,'Põlvamaa','65',1069),(2384,'Pärnumaa','67',1069),(2385,'Raplamaa','70',1069),(2386,'Saaremaa','74',1069),(2387,'Tartumaa','7B',1069),(2388,'Valgamaa','82',1069),(2389,'Viljandimaa','84',1069),(2390,'Võrumaa','86',1069),(2391,'Ad Daqahllyah','DK',1065),(2392,'Al Bahr al Ahmar','BA',1065),(2393,'Al Buhayrah','BH',1065),(2394,'Al Fayym','FYM',1065),(2395,'Al Gharbiyah','GH',1065),(2396,'Al Iskandarlyah','ALX',1065),(2397,'Al Isma illyah','IS',1065),(2398,'Al Jizah','GZ',1065),(2399,'Al Minuflyah','MNF',1065),(2400,'Al Minya','MN',1065),(2401,'Al Qahirah','C',1065),(2402,'Al Qalyublyah','KB',1065),(2403,'Al Wadi al Jadid','WAD',1065),(2404,'Ash Sharqiyah','SHR',1065),(2405,'As Suways','SUZ',1065),(2406,'Aswan','ASN',1065),(2407,'Asyut','AST',1065),(2408,'Bani Suwayf','BNS',1065),(2409,'Bur Sa\'id','PTS',1065),(2410,'Dumyat','DT',1065),(2411,'Janub Sina\'','JS',1065),(2412,'Kafr ash Shaykh','KFS',1065),(2413,'Matruh','MT',1065),(2414,'Qina','KN',1065),(2415,'Shamal Sina\'','SIN',1065),(2416,'Suhaj','SHG',1065),(2417,'Anseba','AN',1068),(2418,'Debub','DU',1068),(2419,'Debubawi Keyih Bahri [Debub-Keih-Bahri]','DK',1068),(2420,'Gash-Barka','GB',1068),(2421,'Maakel [Maekel]','MA',1068),(2422,'Semenawi Keyih Bahri [Semien-Keih-Bahri]','SK',1068),(2423,'Ãlava','VI',1198),(2424,'Albacete','AB',1198),(2425,'Alicante','A',1198),(2426,'AlmerÃa','AL',1198),(2427,'Asturias','O',1198),(2428,'Ãvila','AV',1198),(2429,'Badajoz','BA',1198),(2430,'Baleares','PM',1198),(2431,'Barcelona','B',1198),(2432,'Burgos','BU',1198),(2433,'Cáceres','CC',1198),(2434,'Cádiz','CA',1198),(2435,'Cantabria','S',1198),(2436,'Castellón','CS',1198),(2437,'Ciudad Real','CR',1198),(2438,'Cuenca','CU',1198),(2439,'Girona [Gerona]','GE',1198),(2440,'Granada','GR',1198),(2441,'Guadalajara','GU',1198),(2442,'Guipúzcoa','SS',1198),(2443,'Huelva','H',1198),(2444,'Huesca','HU',1198),(2445,'Jaén','J',1198),(2446,'La Coruña','C',1198),(2447,'La Rioja','LO',1198),(2448,'Las Palmas','GC',1198),(2449,'León','LE',1198),(2450,'Lleida [Lérida]','L',1198),(2451,'Lugo','LU',1198),(2452,'Madrid','M',1198),(2453,'Málaga','MA',1198),(2454,'Murcia','MU',1198),(2455,'Navarra','NA',1198),(2456,'Ourense','OR',1198),(2457,'Palencia','P',1198),(2458,'Pontevedra','PO',1198),(2459,'Salamanca','SA',1198),(2460,'Santa Cruz de Tenerife','TF',1198),(2461,'Segovia','SG',1198),(2462,'Sevilla','SE',1198),(2463,'Soria','SO',1198),(2464,'Tarragona','T',1198),(2465,'Teruel','TE',1198),(2466,'Valencia','V',1198),(2467,'Valladolid','VA',1198),(2468,'Vizcaya','BI',1198),(2469,'Zamora','ZA',1198),(2470,'Zaragoza','Z',1198),(2471,'Ceuta','CE',1198),(2472,'Melilla','ML',1198),(2473,'Addis Ababa','AA',1070),(2474,'Dire Dawa','DD',1070),(2475,'Afar','AF',1070),(2476,'Amara','AM',1070),(2477,'Benshangul-Gumaz','BE',1070),(2478,'Gambela Peoples','GA',1070),(2479,'Harari People','HA',1070),(2480,'Oromia','OR',1070),(2481,'Somali','SO',1070),(2482,'Southern Nations, Nationalities and Peoples','SN',1070),(2483,'Tigrai','TI',1070),(2490,'Eastern','E',1074),(2491,'Northern','N',1074),(2492,'Western','W',1074),(2493,'Rotuma','R',1074),(2494,'Chuuk','TRK',1141),(2495,'Kosrae','KSA',1141),(2496,'Pohnpei','PNI',1141),(2497,'Yap','YAP',1141),(2498,'Ain','01',1076),(2499,'Aisne','02',1076),(2500,'Allier','03',1076),(2501,'Alpes-de-Haute-Provence','04',1076),(2502,'Alpes-Maritimes','06',1076),(2503,'Ardèche','07',1076),(2504,'Ardennes','08',1076),(2505,'Ariège','09',1076),(2506,'Aube','10',1076),(2507,'Aude','11',1076),(2508,'Aveyron','12',1076),(2509,'Bas-Rhin','67',1076),(2510,'Bouches-du-Rhône','13',1076),(2511,'Calvados','14',1076),(2512,'Cantal','15',1076),(2513,'Charente','16',1076),(2514,'Charente-Maritime','17',1076),(2515,'Cher','18',1076),(2516,'Corrèze','19',1076),(2517,'Corse-du-Sud','20A',1076),(2518,'Côte-d\'Or','21',1076),(2519,'Côtes-d\'Armor','22',1076),(2520,'Creuse','23',1076),(2521,'Deux-Sèvres','79',1076),(2522,'Dordogne','24',1076),(2523,'Doubs','25',1076),(2524,'Drôme','26',1076),(2525,'Essonne','91',1076),(2526,'Eure','27',1076),(2527,'Eure-et-Loir','28',1076),(2528,'Finistère','29',1076),(2529,'Gard','30',1076),(2530,'Gers','32',1076),(2531,'Gironde','33',1076),(2532,'Haut-Rhin','68',1076),(2533,'Haute-Corse','20B',1076),(2534,'Haute-Garonne','31',1076),(2535,'Haute-Loire','43',1076),(2536,'Haute-Saône','70',1076),(2537,'Haute-Savoie','74',1076),(2538,'Haute-Vienne','87',1076),(2539,'Hautes-Alpes','05',1076),(2540,'Hautes-Pyrénées','65',1076),(2541,'Hauts-de-Seine','92',1076),(2542,'Hérault','34',1076),(2543,'Indre','36',1076),(2544,'Ille-et-Vilaine','35',1076),(2545,'Indre-et-Loire','37',1076),(2546,'Isère','38',1076),(2547,'Landes','40',1076),(2548,'Loir-et-Cher','41',1076),(2549,'Loire','42',1076),(2550,'Loire-Atlantique','44',1076),(2551,'Loiret','45',1076),(2552,'Lot','46',1076),(2553,'Lot-et-Garonne','47',1076),(2554,'Lozère','48',1076),(2555,'Maine-et-Loire','49',1076),(2556,'Manche','50',1076),(2557,'Marne','51',1076),(2558,'Mayenne','53',1076),(2559,'Meurthe-et-Moselle','54',1076),(2560,'Meuse','55',1076),(2561,'Morbihan','56',1076),(2562,'Moselle','57',1076),(2563,'Nièvre','58',1076),(2564,'Nord','59',1076),(2565,'Oise','60',1076),(2566,'Orne','61',1076),(2567,'Paris','75',1076),(2568,'Pas-de-Calais','62',1076),(2569,'Puy-de-Dôme','63',1076),(2570,'Pyrénées-Atlantiques','64',1076),(2571,'Pyrénées-Orientales','66',1076),(2572,'Rhône','69',1076),(2573,'Saône-et-Loire','71',1076),(2574,'Sarthe','72',1076),(2575,'Savoie','73',1076),(2576,'Seine-et-Marne','77',1076),(2577,'Seine-Maritime','76',1076),(2578,'Seine-Saint-Denis','93',1076),(2579,'Somme','80',1076),(2580,'Tarn','81',1076),(2581,'Tarn-et-Garonne','82',1076),(2582,'Val d\'Oise','95',1076),(2583,'Territoire de Belfort','90',1076),(2584,'Val-de-Marne','94',1076),(2585,'Var','83',1076),(2586,'Vaucluse','84',1076),(2587,'Vendée','85',1076),(2588,'Vienne','86',1076),(2589,'Vosges','88',1076),(2590,'Yonne','89',1076),(2591,'Yvelines','78',1076),(2592,'Aberdeen City','ABE',1226),(2593,'Aberdeenshire','ABD',1226),(2594,'Angus','ANS',1226),(2595,'Co Antrim','ANT',1226),(2597,'Argyll and Bute','AGB',1226),(2598,'Co Armagh','ARM',1226),(2606,'Bedfordshire','BDF',1226),(2612,'Gwent','BGW',1226),(2620,'Bristol, City of','BST',1226),(2622,'Buckinghamshire','BKM',1226),(2626,'Cambridgeshire','CAM',1226),(2634,'Cheshire','CHS',1226),(2635,'Clackmannanshire','CLK',1226),(2639,'Cornwall','CON',1226),(2643,'Cumbria','CMA',1226),(2647,'Derbyshire','DBY',1226),(2648,'Co Londonderry','DRY',1226),(2649,'Devon','DEV',1226),(2651,'Dorset','DOR',1226),(2652,'Co Down','DOW',1226),(2654,'Dumfries and Galloway','DGY',1226),(2655,'Dundee City','DND',1226),(2657,'County Durham','DUR',1226),(2659,'East Ayrshire','EAY',1226),(2660,'East Dunbartonshire','EDU',1226),(2661,'East Lothian','ELN',1226),(2662,'East Renfrewshire','ERW',1226),(2663,'East Riding of Yorkshire','ERY',1226),(2664,'East Sussex','ESX',1226),(2665,'Edinburgh, City of','EDH',1226),(2666,'Na h-Eileanan Siar','ELS',1226),(2668,'Essex','ESS',1226),(2669,'Falkirk','FAL',1226),(2670,'Co Fermanagh','FER',1226),(2671,'Fife','FIF',1226),(2674,'Glasgow City','GLG',1226),(2675,'Gloucestershire','GLS',1226),(2678,'Gwynedd','GWN',1226),(2682,'Hampshire','HAM',1226),(2687,'Herefordshire','HEF',1226),(2688,'Hertfordshire','HRT',1226),(2689,'Highland','HED',1226),(2692,'Inverclyde','IVC',1226),(2694,'Isle of Wight','IOW',1226),(2699,'Kent','KEN',1226),(2705,'Lancashire','LAN',1226),(2709,'Leicestershire','LEC',1226),(2712,'Lincolnshire','LIN',1226),(2723,'Midlothian','MLN',1226),(2726,'Moray','MRY',1226),(2734,'Norfolk','NFK',1226),(2735,'North Ayrshire','NAY',1226),(2738,'North Lanarkshire','NLK',1226),(2742,'North Yorkshire','NYK',1226),(2743,'Northamptonshire','NTH',1226),(2744,'Northumberland','NBL',1226),(2746,'Nottinghamshire','NTT',1226),(2747,'Oldham','OLD',1226),(2748,'Omagh','OMH',1226),(2749,'Orkney Islands','ORR',1226),(2750,'Oxfordshire','OXF',1226),(2752,'Perth and Kinross','PKN',1226),(2757,'Powys','POW',1226),(2761,'Renfrewshire','RFW',1226),(2766,'Rutland','RUT',1226),(2770,'Scottish Borders','SCB',1226),(2773,'Shetland Islands','ZET',1226),(2774,'Shropshire','SHR',1226),(2777,'Somerset','SOM',1226),(2778,'South Ayrshire','SAY',1226),(2779,'South Gloucestershire','SGC',1226),(2780,'South Lanarkshire','SLK',1226),(2785,'Staffordshire','STS',1226),(2786,'Stirling','STG',1226),(2791,'Suffolk','SFK',1226),(2793,'Surrey','SRY',1226),(2804,'Mid Glamorgan','VGL',1226),(2811,'Warwickshire','WAR',1226),(2813,'West Dunbartonshire','WDU',1226),(2814,'West Lothian','WLN',1226),(2815,'West Sussex','WSX',1226),(2818,'Wiltshire','WIL',1226),(2823,'Worcestershire','WOR',1226),(2826,'Ashanti','AH',1083),(2827,'Brong-Ahafo','BA',1083),(2828,'Greater Accra','AA',1083),(2829,'Upper East','UE',1083),(2830,'Upper West','UW',1083),(2831,'Volta','TV',1083),(2832,'Banjul','B',1213),(2833,'Lower River','L',1213),(2834,'MacCarthy Island','M',1213),(2835,'North Bank','N',1213),(2836,'Upper River','U',1213),(2837,'Beyla','BE',1091),(2838,'Boffa','BF',1091),(2839,'Boke','BK',1091),(2840,'Coyah','CO',1091),(2841,'Dabola','DB',1091),(2842,'Dalaba','DL',1091),(2843,'Dinguiraye','DI',1091),(2844,'Dubreka','DU',1091),(2845,'Faranah','FA',1091),(2846,'Forecariah','FO',1091),(2847,'Fria','FR',1091),(2848,'Gaoual','GA',1091),(2849,'Guekedou','GU',1091),(2850,'Kankan','KA',1091),(2851,'Kerouane','KE',1091),(2852,'Kindia','KD',1091),(2853,'Kissidougou','KS',1091),(2854,'Koubia','KB',1091),(2855,'Koundara','KN',1091),(2856,'Kouroussa','KO',1091),(2857,'Labe','LA',1091),(2858,'Lelouma','LE',1091),(2859,'Lola','LO',1091),(2860,'Macenta','MC',1091),(2861,'Mali','ML',1091),(2862,'Mamou','MM',1091),(2863,'Mandiana','MD',1091),(2864,'Nzerekore','NZ',1091),(2865,'Pita','PI',1091),(2866,'Siguiri','SI',1091),(2867,'Telimele','TE',1091),(2868,'Tougue','TO',1091),(2869,'Yomou','YO',1091),(2870,'Region Continental','C',1067),(2871,'Region Insular','I',1067),(2872,'Annobon','AN',1067),(2873,'Bioko Norte','BN',1067),(2874,'Bioko Sur','BS',1067),(2875,'Centro Sur','CS',1067),(2876,'Kie-Ntem','KN',1067),(2877,'Litoral','LI',1067),(2878,'Wele-Nzas','WN',1067),(2879,'Achaïa','13',1085),(2880,'Aitolia-Akarnania','01',1085),(2881,'Argolis','11',1085),(2882,'Arkadia','12',1085),(2883,'Arta','31',1085),(2884,'Attiki','A1',1085),(2885,'Chalkidiki','64',1085),(2886,'Chania','94',1085),(2887,'Chios','85',1085),(2888,'Dodekanisos','81',1085),(2889,'Drama','52',1085),(2890,'Evros','71',1085),(2891,'Evrytania','05',1085),(2892,'Evvoia','04',1085),(2893,'Florina','63',1085),(2894,'Fokis','07',1085),(2895,'Fthiotis','06',1085),(2896,'Grevena','51',1085),(2897,'Ileia','14',1085),(2898,'Imathia','53',1085),(2899,'Ioannina','33',1085),(2900,'Irakleion','91',1085),(2901,'Karditsa','41',1085),(2902,'Kastoria','56',1085),(2903,'Kavalla','55',1085),(2904,'Kefallinia','23',1085),(2905,'Kerkyra','22',1085),(2906,'Kilkis','57',1085),(2907,'Korinthia','15',1085),(2908,'Kozani','58',1085),(2909,'Kyklades','82',1085),(2910,'Lakonia','16',1085),(2911,'Larisa','42',1085),(2912,'Lasithion','92',1085),(2913,'Lefkas','24',1085),(2914,'Lesvos','83',1085),(2915,'Magnisia','43',1085),(2916,'Messinia','17',1085),(2917,'Pella','59',1085),(2918,'Preveza','34',1085),(2919,'Rethymnon','93',1085),(2920,'Rodopi','73',1085),(2921,'Samos','84',1085),(2922,'Serrai','62',1085),(2923,'Thesprotia','32',1085),(2924,'Thessaloniki','54',1085),(2925,'Trikala','44',1085),(2926,'Voiotia','03',1085),(2927,'Xanthi','72',1085),(2928,'Zakynthos','21',1085),(2929,'Agio Oros','69',1085),(2930,'Alta Verapaz','AV',1090),(2931,'Baja Verapaz','BV',1090),(2932,'Chimaltenango','CM',1090),(2933,'Chiquimula','CQ',1090),(2934,'El Progreso','PR',1090),(2935,'Escuintla','ES',1090),(2936,'Guatemala','GU',1090),(2937,'Huehuetenango','HU',1090),(2938,'Izabal','IZ',1090),(2939,'Jalapa','JA',1090),(2940,'Jutiapa','JU',1090),(2941,'Peten','PE',1090),(2942,'Quetzaltenango','QZ',1090),(2943,'Quiche','QC',1090),(2944,'Retalhuleu','RE',1090),(2945,'Sacatepequez','SA',1090),(2946,'San Marcos','SM',1090),(2947,'Santa Rosa','SR',1090),(2948,'Sololá','SO',1090),(2949,'Suchitepequez','SU',1090),(2950,'Totonicapan','TO',1090),(2951,'Zacapa','ZA',1090),(2952,'Bissau','BS',1092),(2953,'Bafata','BA',1092),(2954,'Biombo','BM',1092),(2955,'Bolama','BL',1092),(2956,'Cacheu','CA',1092),(2957,'Gabu','GA',1092),(2958,'Oio','OI',1092),(2959,'Quloara','QU',1092),(2960,'Tombali S','TO',1092),(2961,'Barima-Waini','BA',1093),(2962,'Cuyuni-Mazaruni','CU',1093),(2963,'Demerara-Mahaica','DE',1093),(2964,'East Berbice-Corentyne','EB',1093),(2965,'Essequibo Islands-West Demerara','ES',1093),(2966,'Mahaica-Berbice','MA',1093),(2967,'Pomeroon-Supenaam','PM',1093),(2968,'Potaro-Siparuni','PT',1093),(2969,'Upper Demerara-Berbice','UD',1093),(2970,'Upper Takutu-Upper Essequibo','UT',1093),(2971,'Atlantida','AT',1097),(2972,'Colon','CL',1097),(2973,'Comayagua','CM',1097),(2974,'Copan','CP',1097),(2975,'Cortes','CR',1097),(2976,'Choluteca','CH',1097),(2977,'El Paraiso','EP',1097),(2978,'Francisco Morazan','FM',1097),(2979,'Gracias a Dios','GD',1097),(2980,'Intibuca','IN',1097),(2981,'Islas de la Bahia','IB',1097),(2982,'Lempira','LE',1097),(2983,'Ocotepeque','OC',1097),(2984,'Olancho','OL',1097),(2985,'Santa Barbara','SB',1097),(2986,'Valle','VA',1097),(2987,'Yoro','YO',1097),(2988,'Bjelovarsko-bilogorska zupanija','07',1055),(2989,'Brodsko-posavska zupanija','12',1055),(2990,'Dubrovacko-neretvanska zupanija','19',1055),(2991,'Istarska zupanija','18',1055),(2992,'Karlovacka zupanija','04',1055),(2993,'Koprivnickco-krizevacka zupanija','06',1055),(2994,'Krapinako-zagorska zupanija','02',1055),(2995,'Licko-senjska zupanija','09',1055),(2996,'Medimurska zupanija','20',1055),(2997,'Osjecko-baranjska zupanija','14',1055),(2998,'Pozesko-slavonska zupanija','11',1055),(2999,'Primorsko-goranska zupanija','08',1055),(3000,'Sisacko-moelavacka Iupanija','03',1055),(3001,'Splitako-dalmatinska zupanija','17',1055),(3002,'Sibenako-kninska zupanija','15',1055),(3003,'Varaidinska zupanija','05',1055),(3004,'VirovitiEko-podravska zupanija','10',1055),(3005,'VuRovarako-srijemska zupanija','16',1055),(3006,'Zadaraka','13',1055),(3007,'Zagrebacka zupanija','01',1055),(3008,'Grande-Anse','GA',1094),(3009,'Nord-Est','NE',1094),(3010,'Nord-Ouest','NO',1094),(3011,'Ouest','OU',1094),(3012,'Sud','SD',1094),(3013,'Sud-Est','SE',1094),(3014,'Budapest','BU',1099),(3015,'Bács-Kiskun','BK',1099),(3016,'Baranya','BA',1099),(3017,'Békés','BE',1099),(3018,'Borsod-Abaúj-Zemplén','BZ',1099),(3019,'Csongrád','CS',1099),(3020,'Fejér','FE',1099),(3021,'GyÅ‘r-Moson-Sopron','GS',1099),(3022,'Hajdu-Bihar','HB',1099),(3023,'Heves','HE',1099),(3024,'Jász-Nagykun-Szolnok','JN',1099),(3025,'Komárom-Esztergom','KE',1099),(3026,'Nográd','NO',1099),(3027,'Pest','PE',1099),(3028,'Somogy','SO',1099),(3029,'Szabolcs-Szatmár-Bereg','SZ',1099),(3030,'Tolna','TO',1099),(3031,'Vas','VA',1099),(3032,'Veszprém','VE',1099),(3033,'Zala','ZA',1099),(3034,'Békéscsaba','BC',1099),(3035,'Debrecen','DE',1099),(3036,'Dunaújváros','DU',1099),(3037,'Eger','EG',1099),(3038,'GyÅ‘r','GY',1099),(3039,'HódmezÅ‘vásárhely','HV',1099),(3040,'Kaposvár','KV',1099),(3041,'Kecskemét','KM',1099),(3042,'Miskolc','MI',1099),(3043,'Nagykanizsa','NK',1099),(3044,'Nyiregyháza','NY',1099),(3045,'Pécs','PS',1099),(3046,'Salgótarján','ST',1099),(3047,'Sopron','SN',1099),(3048,'Szeged','SD',1099),(3049,'Székesfehérvár','SF',1099),(3050,'Szekszárd','SS',1099),(3051,'Szolnok','SK',1099),(3052,'Szombathely','SH',1099),(3053,'Tatabánya','TB',1099),(3054,'Zalaegerszeg','ZE',1099),(3055,'Bali','BA',1102),(3056,'Kepulauan Bangka Belitung','BB',1102),(3057,'Banten','BT',1102),(3058,'Bengkulu','BE',1102),(3059,'Gorontalo','GO',1102),(3060,'Papua Barat','PB',1102),(3061,'Jambi','JA',1102),(3062,'Jawa Barat','JB',1102),(3063,'Jawa Tengah','JT',1102),(3064,'Jawa Timur','JI',1102),(3065,'Kalimantan Barat','KB',1102),(3066,'Kalimantan Timur','KI',1102),(3067,'Kalimantan Selatan','KS',1102),(3068,'Kepulauan Riau','KR',1102),(3069,'Lampung','LA',1102),(3070,'Maluku','MA',1102),(3071,'Maluku Utara','MU',1102),(3072,'Nusa Tenggara Barat','NB',1102),(3073,'Nusa Tenggara Timur','NT',1102),(3074,'Papua','PA',1102),(3075,'Riau','RI',1102),(3076,'Sulawesi Selatan','SN',1102),(3077,'Sulawesi Tengah','ST',1102),(3078,'Sulawesi Tenggara','SG',1102),(3079,'Sulawesi Utara','SA',1102),(3080,'Sumatra Barat','SB',1102),(3081,'Sumatra Selatan','SS',1102),(3082,'Sumatera Utara','SU',1102),(3083,'DKI Jakarta','JK',1102),(3084,'Aceh','AC',1102),(3085,'DI Yogyakarta','YO',1102),(3086,'Cork','C',1105),(3087,'Clare','CE',1105),(3088,'Cavan','CN',1105),(3089,'Carlow','CW',1105),(3090,'Dublin','D',1105),(3091,'Donegal','DL',1105),(3092,'Galway','G',1105),(3093,'Kildare','KE',1105),(3094,'Kilkenny','KK',1105),(3095,'Kerry','KY',1105),(3096,'Longford','LD',1105),(3097,'Louth','LH',1105),(3098,'Limerick','LK',1105),(3099,'Leitrim','LM',1105),(3100,'Laois','LS',1105),(3101,'Meath','MH',1105),(3102,'Monaghan','MN',1105),(3103,'Mayo','MO',1105),(3104,'Offaly','OY',1105),(3105,'Roscommon','RN',1105),(3106,'Sligo','SO',1105),(3107,'Tipperary','TA',1105),(3108,'Waterford','WD',1105),(3109,'Westmeath','WH',1105),(3110,'Wicklow','WW',1105),(3111,'Wexford','WX',1105),(3112,'HaDarom','D',1106),(3113,'HaMerkaz','M',1106),(3114,'HaZafon','Z',1106),(3115,'Haifa','HA',1106),(3116,'Tel-Aviv','TA',1106),(3117,'Jerusalem','JM',1106),(3118,'Al Anbar','AN',1104),(3119,'Al Ba,rah','BA',1104),(3120,'Al Muthanna','MU',1104),(3121,'Al Qadisiyah','QA',1104),(3122,'An Najef','NA',1104),(3123,'Arbil','AR',1104),(3124,'As Sulaymaniyah','SW',1104),(3125,'At Ta\'mim','TS',1104),(3126,'Babil','BB',1104),(3127,'Baghdad','BG',1104),(3128,'Dahuk','DA',1104),(3129,'Dhi Qar','DQ',1104),(3130,'Diyala','DI',1104),(3131,'Karbala\'','KA',1104),(3132,'Maysan','MA',1104),(3133,'Ninawa','NI',1104),(3134,'Salah ad Din','SD',1104),(3135,'Wasit','WA',1104),(3136,'Ardabil','03',1103),(3137,'Azarbayjan-e Gharbi','02',1103),(3138,'Azarbayjan-e Sharqi','01',1103),(3139,'Bushehr','06',1103),(3140,'Chahar Mahall va Bakhtiari','08',1103),(3141,'Esfahan','04',1103),(3142,'Fars','14',1103),(3143,'Gilan','19',1103),(3144,'Golestan','27',1103),(3145,'Hamadan','24',1103),(3146,'Hormozgan','23',1103),(3147,'Iiam','05',1103),(3148,'Kerman','15',1103),(3149,'Kermanshah','17',1103),(3150,'Khorasan','09',1103),(3151,'Khuzestan','10',1103),(3152,'Kohjiluyeh va Buyer Ahmad','18',1103),(3153,'Kordestan','16',1103),(3154,'Lorestan','20',1103),(3155,'Markazi','22',1103),(3156,'Mazandaran','21',1103),(3157,'Qazvin','28',1103),(3158,'Qom','26',1103),(3159,'Semnan','12',1103),(3160,'Sistan va Baluchestan','13',1103),(3161,'Tehran','07',1103),(3162,'Yazd','25',1103),(3163,'Zanjan','11',1103),(3164,'Austurland','7',1100),(3165,'Hofuoborgarsvaeoi utan Reykjavikur','1',1100),(3166,'Norourland eystra','6',1100),(3167,'Norourland vestra','5',1100),(3168,'Reykjavik','0',1100),(3169,'Suourland','8',1100),(3170,'Suournes','2',1100),(3171,'Vestfirolr','4',1100),(3172,'Vesturland','3',1100),(3173,'Agrigento','AG',1107),(3174,'Alessandria','AL',1107),(3175,'Ancona','AN',1107),(3176,'Aosta','AO',1107),(3177,'Arezzo','AR',1107),(3178,'Ascoli Piceno','AP',1107),(3179,'Asti','AT',1107),(3180,'Avellino','AV',1107),(3181,'Bari','BA',1107),(3182,'Belluno','BL',1107),(3183,'Benevento','BN',1107),(3184,'Bergamo','BG',1107),(3185,'Biella','BI',1107),(3186,'Bologna','BO',1107),(3187,'Bolzano','BZ',1107),(3188,'Brescia','BS',1107),(3189,'Brindisi','BR',1107),(3190,'Cagliari','CA',1107),(3191,'Caltanissetta','CL',1107),(3192,'Campobasso','CB',1107),(3193,'Caserta','CE',1107),(3194,'Catania','CT',1107),(3195,'Catanzaro','CZ',1107),(3196,'Chieti','CH',1107),(3197,'Como','CO',1107),(3198,'Cosenza','CS',1107),(3199,'Cremona','CR',1107),(3200,'Crotone','KR',1107),(3201,'Cuneo','CN',1107),(3202,'Enna','EN',1107),(3203,'Ferrara','FE',1107),(3204,'Firenze','FI',1107),(3205,'Foggia','FG',1107),(3206,'Forlì-Cesena','FC',1107),(3207,'Frosinone','FR',1107),(3208,'Genova','GE',1107),(3209,'Gorizia','GO',1107),(3210,'Grosseto','GR',1107),(3211,'Imperia','IM',1107),(3212,'Isernia','IS',1107),(3213,'L\'Aquila','AQ',1107),(3214,'La Spezia','SP',1107),(3215,'Latina','LT',1107),(3216,'Lecce','LE',1107),(3217,'Lecco','LC',1107),(3218,'Livorno','LI',1107),(3219,'Lodi','LO',1107),(3220,'Lucca','LU',1107),(3221,'Macerata','MC',1107),(3222,'Mantova','MN',1107),(3223,'Massa-Carrara','MS',1107),(3224,'Matera','MT',1107),(3225,'Messina','ME',1107),(3226,'Milano','MI',1107),(3227,'Modena','MO',1107),(3228,'Napoli','NA',1107),(3229,'Novara','NO',1107),(3230,'Nuoro','NU',1107),(3231,'Oristano','OR',1107),(3232,'Padova','PD',1107),(3233,'Palermo','PA',1107),(3234,'Parma','PR',1107),(3235,'Pavia','PV',1107),(3236,'Perugia','PG',1107),(3237,'Pesaro e Urbino','PU',1107),(3238,'Pescara','PE',1107),(3239,'Piacenza','PC',1107),(3240,'Pisa','PI',1107),(3241,'Pistoia','PT',1107),(3242,'Pordenone','PN',1107),(3243,'Potenza','PZ',1107),(3244,'Prato','PO',1107),(3245,'Ragusa','RG',1107),(3246,'Ravenna','RA',1107),(3247,'Reggio Calabria','RC',1107),(3248,'Reggio Emilia','RE',1107),(3249,'Rieti','RI',1107),(3250,'Rimini','RN',1107),(3251,'Roma','RM',1107),(3252,'Rovigo','RO',1107),(3253,'Salerno','SA',1107),(3254,'Sassari','SS',1107),(3255,'Savona','SV',1107),(3256,'Siena','SI',1107),(3257,'Siracusa','SR',1107),(3258,'Sondrio','SO',1107),(3259,'Taranto','TA',1107),(3260,'Teramo','TE',1107),(3261,'Terni','TR',1107),(3262,'Torino','TO',1107),(3263,'Trapani','TP',1107),(3264,'Trento','TN',1107),(3265,'Treviso','TV',1107),(3266,'Trieste','TS',1107),(3267,'Udine','UD',1107),(3268,'Varese','VA',1107),(3269,'Venezia','VE',1107),(3270,'Verbano-Cusio-Ossola','VB',1107),(3271,'Vercelli','VC',1107),(3272,'Verona','VR',1107),(3273,'Vibo Valentia','VV',1107),(3274,'Vicenza','VI',1107),(3275,'Viterbo','VT',1107),(3276,'Aichi','23',1109),(3277,'Akita','05',1109),(3278,'Aomori','02',1109),(3279,'Chiba','12',1109),(3280,'Ehime','38',1109),(3281,'Fukui','18',1109),(3282,'Fukuoka','40',1109),(3283,'Fukusima','07',1109),(3284,'Gifu','21',1109),(3285,'Gunma','10',1109),(3286,'Hiroshima','34',1109),(3287,'Hokkaido','01',1109),(3288,'Hyogo','28',1109),(3289,'Ibaraki','08',1109),(3290,'Ishikawa','17',1109),(3291,'Iwate','03',1109),(3292,'Kagawa','37',1109),(3293,'Kagoshima','46',1109),(3294,'Kanagawa','14',1109),(3295,'Kochi','39',1109),(3296,'Kumamoto','43',1109),(3297,'Kyoto','26',1109),(3298,'Mie','24',1109),(3299,'Miyagi','04',1109),(3300,'Miyazaki','45',1109),(3301,'Nagano','20',1109),(3302,'Nagasaki','42',1109),(3303,'Nara','29',1109),(3304,'Niigata','15',1109),(3305,'Oita','44',1109),(3306,'Okayama','33',1109),(3307,'Okinawa','47',1109),(3308,'Osaka','27',1109),(3309,'Saga','41',1109),(3310,'Saitama','11',1109),(3311,'Shiga','25',1109),(3312,'Shimane','32',1109),(3313,'Shizuoka','22',1109),(3314,'Tochigi','09',1109),(3315,'Tokushima','36',1109),(3316,'Tokyo','13',1109),(3317,'Tottori','31',1109),(3318,'Toyama','16',1109),(3319,'Wakayama','30',1109),(3320,'Yamagata','06',1109),(3321,'Yamaguchi','35',1109),(3322,'Yamanashi','19',1109),(3323,'Clarendon','CN',1108),(3324,'Hanover','HR',1108),(3325,'Kingston','KN',1108),(3326,'Portland','PD',1108),(3327,'Saint Andrew','AW',1108),(3328,'Saint Ann','AN',1108),(3329,'Saint Catherine','CE',1108),(3330,'Saint Elizabeth','EH',1108),(3331,'Saint James','JS',1108),(3332,'Saint Mary','MY',1108),(3333,'Saint Thomas','TS',1108),(3334,'Trelawny','TY',1108),(3335,'Westmoreland','WD',1108),(3336,'Ajln','AJ',1110),(3337,'Al \'Aqaba','AQ',1110),(3338,'Al Balqa\'','BA',1110),(3339,'Al Karak','KA',1110),(3340,'Al Mafraq','MA',1110),(3341,'Amman','AM',1110),(3342,'At Tafilah','AT',1110),(3343,'Az Zarga','AZ',1110),(3344,'Irbid','JR',1110),(3345,'Jarash','JA',1110),(3346,'Ma\'an','MN',1110),(3347,'Madaba','MD',1110),(3353,'Bishkek','GB',1117),(3354,'Batken','B',1117),(3355,'Chu','C',1117),(3356,'Jalal-Abad','J',1117),(3357,'Naryn','N',1117),(3358,'Osh','O',1117),(3359,'Talas','T',1117),(3360,'Ysyk-Kol','Y',1117),(3361,'Krong Kaeb','23',1037),(3362,'Krong Pailin','24',1037),(3363,'Xrong Preah Sihanouk','18',1037),(3364,'Phnom Penh','12',1037),(3365,'Baat Dambang','2',1037),(3366,'Banteay Mean Chey','1',1037),(3367,'Rampong Chaam','3',1037),(3368,'Kampong Chhnang','4',1037),(3369,'Kampong Spueu','5',1037),(3370,'Kampong Thum','6',1037),(3371,'Kampot','7',1037),(3372,'Kandaal','8',1037),(3373,'Kach Kong','9',1037),(3374,'Krachoh','10',1037),(3375,'Mondol Kiri','11',1037),(3376,'Otdar Mean Chey','22',1037),(3377,'Pousaat','15',1037),(3378,'Preah Vihear','13',1037),(3379,'Prey Veaeng','14',1037),(3380,'Rotanak Kiri','16',1037),(3381,'Siem Reab','17',1037),(3382,'Stueng Traeng','19',1037),(3383,'Svaay Rieng','20',1037),(3384,'Taakaev','21',1037),(3385,'Gilbert Islands','G',1113),(3386,'Line Islands','L',1113),(3387,'Phoenix Islands','P',1113),(3388,'Anjouan Ndzouani','A',1049),(3389,'Grande Comore Ngazidja','G',1049),(3390,'Moheli Moili','M',1049),(3391,'Kaesong-si','KAE',1114),(3392,'Nampo-si','NAM',1114),(3393,'Pyongyang-ai','PYO',1114),(3394,'Chagang-do','CHA',1114),(3395,'Hamgyongbuk-do','HAB',1114),(3396,'Hamgyongnam-do','HAN',1114),(3397,'Hwanghaebuk-do','HWB',1114),(3398,'Hwanghaenam-do','HWN',1114),(3399,'Kangwon-do','KAN',1114),(3400,'Pyonganbuk-do','PYB',1114),(3401,'Pyongannam-do','PYN',1114),(3402,'Yanggang-do','YAN',1114),(3403,'Najin Sonbong-si','NAJ',1114),(3404,'Seoul Teugbyeolsi','11',1115),(3405,'Busan Gwang\'yeogsi','26',1115),(3406,'Daegu Gwang\'yeogsi','27',1115),(3407,'Daejeon Gwang\'yeogsi','30',1115),(3408,'Gwangju Gwang\'yeogsi','29',1115),(3409,'Incheon Gwang\'yeogsi','28',1115),(3410,'Ulsan Gwang\'yeogsi','31',1115),(3411,'Chungcheongbugdo','43',1115),(3412,'Chungcheongnamdo','44',1115),(3413,'Gang\'weondo','42',1115),(3414,'Gyeonggido','41',1115),(3415,'Gyeongsangbugdo','47',1115),(3416,'Gyeongsangnamdo','48',1115),(3417,'Jejudo','49',1115),(3418,'Jeonrabugdo','45',1115),(3419,'Jeonranamdo','46',1115),(3420,'Al Ahmadi','AH',1116),(3421,'Al Farwanlyah','FA',1116),(3422,'Al Jahrah','JA',1116),(3423,'Al Kuwayt','KU',1116),(3424,'Hawalli','HA',1116),(3425,'Almaty','ALA',1111),(3426,'Astana','AST',1111),(3427,'Almaty oblysy','ALM',1111),(3428,'Aqmola oblysy','AKM',1111),(3429,'Aqtobe oblysy','AKT',1111),(3430,'Atyrau oblyfiy','ATY',1111),(3431,'Batys Quzaqstan oblysy','ZAP',1111),(3432,'Mangghystau oblysy','MAN',1111),(3433,'Ongtustik Quzaqstan oblysy','YUZ',1111),(3434,'Pavlodar oblysy','PAV',1111),(3435,'Qaraghandy oblysy','KAR',1111),(3436,'Qostanay oblysy','KUS',1111),(3437,'Qyzylorda oblysy','KZY',1111),(3438,'Shyghys Quzaqstan oblysy','VOS',1111),(3439,'Soltustik Quzaqstan oblysy','SEV',1111),(3440,'Zhambyl oblysy Zhambylskaya oblast\'','ZHA',1111),(3441,'Vientiane','VT',1118),(3442,'Attapu','AT',1118),(3443,'Bokeo','BK',1118),(3444,'Bolikhamxai','BL',1118),(3445,'Champasak','CH',1118),(3446,'Houaphan','HO',1118),(3447,'Khammouan','KH',1118),(3448,'Louang Namtha','LM',1118),(3449,'Louangphabang','LP',1118),(3450,'Oudomxai','OU',1118),(3451,'Phongsali','PH',1118),(3452,'Salavan','SL',1118),(3453,'Savannakhet','SV',1118),(3454,'Xaignabouli','XA',1118),(3455,'Xiasomboun','XN',1118),(3456,'Xekong','XE',1118),(3457,'Xiangkhoang','XI',1118),(3458,'Beirut','BA',1120),(3459,'Beqaa','BI',1120),(3460,'Mount Lebanon','JL',1120),(3461,'North Lebanon','AS',1120),(3462,'South Lebanon','JA',1120),(3463,'Nabatieh','NA',1120),(3464,'Ampara','52',1199),(3465,'Anuradhapura','71',1199),(3466,'Badulla','81',1199),(3467,'Batticaloa','51',1199),(3468,'Colombo','11',1199),(3469,'Galle','31',1199),(3470,'Gampaha','12',1199),(3471,'Hambantota','33',1199),(3472,'Jaffna','41',1199),(3473,'Kalutara','13',1199),(3474,'Kandy','21',1199),(3475,'Kegalla','92',1199),(3476,'Kilinochchi','42',1199),(3477,'Kurunegala','61',1199),(3478,'Mannar','43',1199),(3479,'Matale','22',1199),(3480,'Matara','32',1199),(3481,'Monaragala','82',1199),(3482,'Mullaittivu','45',1199),(3483,'Nuwara Eliya','23',1199),(3484,'Polonnaruwa','72',1199),(3485,'Puttalum','62',1199),(3486,'Ratnapura','91',1199),(3487,'Trincomalee','53',1199),(3488,'VavunLya','44',1199),(3489,'Bomi','BM',1122),(3490,'Bong','BG',1122),(3491,'Grand Basaa','GB',1122),(3492,'Grand Cape Mount','CM',1122),(3493,'Grand Gedeh','GG',1122),(3494,'Grand Kru','GK',1122),(3495,'Lofa','LO',1122),(3496,'Margibi','MG',1122),(3497,'Maryland','MY',1122),(3498,'Montserrado','MO',1122),(3499,'Nimba','NI',1122),(3500,'Rivercess','RI',1122),(3501,'Sinoe','SI',1122),(3502,'Berea','D',1121),(3503,'Butha-Buthe','B',1121),(3504,'Leribe','C',1121),(3505,'Mafeteng','E',1121),(3506,'Maseru','A',1121),(3507,'Mohale\'s Hoek','F',1121),(3508,'Mokhotlong','J',1121),(3509,'Qacha\'s Nek','H',1121),(3510,'Quthing','G',1121),(3511,'Thaba-Tseka','K',1121),(3512,'Alytaus Apskritis','AL',1125),(3513,'Kauno Apskritis','KU',1125),(3514,'KlaipÄ—dos Apskritis','KL',1125),(3515,'MarijampolÄ—s Apskritis','MR',1125),(3516,'Panevėžio Apskritis','PN',1125),(3517,'Å iaulių Apskritis','SA',1125),(3518,'TauragÄ—s Apskritis','TA',1125),(3519,'TelÅ¡ių Apskritis','TE',1125),(3520,'Utenos Apskritis','UT',1125),(3521,'Vilniaus Apskritis','VL',1125),(3522,'Diekirch','D',1126),(3523,'GreveNmacher','G',1126),(3550,'Daugavpils','DGV',1119),(3551,'Jelgava','JEL',1119),(3552,'JÅ«rmala','JUR',1119),(3553,'LiepÄja','LPX',1119),(3554,'RÄ“zekne','REZ',1119),(3555,'RÄ«ga','RIX',1119),(3556,'Ventspils','VEN',1119),(3557,'AjdÄbiyÄ','AJ',1123),(3558,'Al BuÅ£nÄn','BU',1123),(3559,'Al HizÄm al Akhdar','HZ',1123),(3560,'Al Jabal al Akhdar','JA',1123),(3561,'Al JifÄrah','JI',1123),(3562,'Al Jufrah','JU',1123),(3563,'Al Kufrah','KF',1123),(3564,'Al Marj','MJ',1123),(3565,'Al Marqab','MB',1123),(3566,'Al QaÅ£rÅ«n','QT',1123),(3567,'Al Qubbah','QB',1123),(3568,'Al WÄhah','WA',1123),(3569,'An NuqaÅ£ al Khams','NQ',1123),(3570,'Ash ShÄÅ£i\'','SH',1123),(3571,'Az ZÄwiyah','ZA',1123),(3572,'BanghÄzÄ«','BA',1123),(3573,'BanÄ« WalÄ«d','BW',1123),(3574,'Darnah','DR',1123),(3575,'GhadÄmis','GD',1123),(3576,'GharyÄn','GR',1123),(3577,'GhÄt','GT',1123),(3578,'JaghbÅ«b','JB',1123),(3579,'MiÅŸrÄtah','MI',1123),(3580,'Mizdah','MZ',1123),(3581,'Murzuq','MQ',1123),(3582,'NÄlÅ«t','NL',1123),(3583,'SabhÄ','SB',1123),(3584,'ÅžabrÄtah ÅžurmÄn','SS',1123),(3585,'Surt','SR',1123),(3586,'TÄjÅ«rÄ\' wa an NawÄhÄ« al ArbÄh','TN',1123),(3587,'Å¢arÄbulus','TB',1123),(3588,'TarhÅ«nah-MasallÄtah','TM',1123),(3589,'WÄdÄ« al hayÄt','WD',1123),(3590,'Yafran-JÄdÅ«','YJ',1123),(3591,'Agadir','AGD',1146),(3592,'Aït Baha','BAH',1146),(3593,'Aït Melloul','MEL',1146),(3594,'Al Haouz','HAO',1146),(3595,'Al Hoceïma','HOC',1146),(3596,'Assa-Zag','ASZ',1146),(3597,'Azilal','AZI',1146),(3598,'Beni Mellal','BEM',1146),(3599,'Ben Sllmane','BES',1146),(3600,'Berkane','BER',1146),(3601,'Boujdour','BOD',1146),(3602,'Boulemane','BOM',1146),(3603,'Casablanca [Dar el Beïda]','CAS',1146),(3604,'Chefchaouene','CHE',1146),(3605,'Chichaoua','CHI',1146),(3606,'El Hajeb','HAJ',1146),(3607,'El Jadida','JDI',1146),(3608,'Errachidia','ERR',1146),(3609,'Essaouira','ESI',1146),(3610,'Es Smara','ESM',1146),(3611,'Fès','FES',1146),(3612,'Figuig','FIG',1146),(3613,'Guelmim','GUE',1146),(3614,'Ifrane','IFR',1146),(3615,'Jerada','JRA',1146),(3616,'Kelaat Sraghna','KES',1146),(3617,'Kénitra','KEN',1146),(3618,'Khemisaet','KHE',1146),(3619,'Khenifra','KHN',1146),(3620,'Khouribga','KHO',1146),(3621,'Laâyoune (EH)','LAA',1146),(3622,'Larache','LAP',1146),(3623,'Marrakech','MAR',1146),(3624,'Meknsès','MEK',1146),(3625,'Nador','NAD',1146),(3626,'Ouarzazate','OUA',1146),(3627,'Oued ed Dahab (EH)','OUD',1146),(3628,'Oujda','OUJ',1146),(3629,'Rabat-Salé','RBA',1146),(3630,'Safi','SAF',1146),(3631,'Sefrou','SEF',1146),(3632,'Settat','SET',1146),(3633,'Sidl Kacem','SIK',1146),(3634,'Tanger','TNG',1146),(3635,'Tan-Tan','TNT',1146),(3636,'Taounate','TAO',1146),(3637,'Taroudannt','TAR',1146),(3638,'Tata','TAT',1146),(3639,'Taza','TAZ',1146),(3640,'Tétouan','TET',1146),(3641,'Tiznit','TIZ',1146),(3642,'Gagauzia, Unitate Teritoriala Autonoma','GA',1142),(3643,'Chisinau','CU',1142),(3644,'Stinga Nistrului, unitatea teritoriala din','SN',1142),(3645,'Balti','BA',1142),(3646,'Cahul','CA',1142),(3647,'Edinet','ED',1142),(3648,'Lapusna','LA',1142),(3649,'Orhei','OR',1142),(3650,'Soroca','SO',1142),(3651,'Taraclia','TA',1142),(3652,'Tighina [Bender]','TI',1142),(3653,'Ungheni','UN',1142),(3654,'Antananarivo','T',1129),(3655,'Antsiranana','D',1129),(3656,'Fianarantsoa','F',1129),(3657,'Mahajanga','M',1129),(3658,'Toamasina','A',1129),(3659,'Toliara','U',1129),(3660,'Ailinglapalap','ALL',1135),(3661,'Ailuk','ALK',1135),(3662,'Arno','ARN',1135),(3663,'Aur','AUR',1135),(3664,'Ebon','EBO',1135),(3665,'Eniwetok','ENI',1135),(3666,'Jaluit','JAL',1135),(3667,'Kili','KIL',1135),(3668,'Kwajalein','KWA',1135),(3669,'Lae','LAE',1135),(3670,'Lib','LIB',1135),(3671,'Likiep','LIK',1135),(3672,'Majuro','MAJ',1135),(3673,'Maloelap','MAL',1135),(3674,'Mejit','MEJ',1135),(3675,'Mili','MIL',1135),(3676,'Namorik','NMK',1135),(3677,'Namu','NMU',1135),(3678,'Rongelap','RON',1135),(3679,'Ujae','UJA',1135),(3680,'Ujelang','UJL',1135),(3681,'Utirik','UTI',1135),(3682,'Wotho','WTN',1135),(3683,'Wotje','WTJ',1135),(3684,'Bamako','BK0',1133),(3685,'Gao','7',1133),(3686,'Kayes','1',1133),(3687,'Kidal','8',1133),(3688,'Xoulikoro','2',1133),(3689,'Mopti','5',1133),(3690,'S69ou','4',1133),(3691,'Sikasso','3',1133),(3692,'Tombouctou','6',1133),(3693,'Ayeyarwady','07',1035),(3694,'Bago','02',1035),(3695,'Magway','03',1035),(3696,'Mandalay','04',1035),(3697,'Sagaing','01',1035),(3698,'Tanintharyi','05',1035),(3699,'Yangon','06',1035),(3700,'Chin','14',1035),(3701,'Kachin','11',1035),(3702,'Kayah','12',1035),(3703,'Kayin','13',1035),(3704,'Mon','15',1035),(3705,'Rakhine','16',1035),(3706,'Shan','17',1035),(3707,'Ulaanbaatar','1',1144),(3708,'Arhangay','073',1144),(3709,'Bayanhongor','069',1144),(3710,'Bayan-Olgiy','071',1144),(3711,'Bulgan','067',1144),(3712,'Darhan uul','037',1144),(3713,'Dornod','061',1144),(3714,'Dornogov,','063',1144),(3715,'DundgovL','059',1144),(3716,'Dzavhan','057',1144),(3717,'Govi-Altay','065',1144),(3718,'Govi-Smber','064',1144),(3719,'Hentiy','039',1144),(3720,'Hovd','043',1144),(3721,'Hovsgol','041',1144),(3722,'Omnogovi','053',1144),(3723,'Orhon','035',1144),(3724,'Ovorhangay','055',1144),(3725,'Selenge','049',1144),(3726,'Shbaatar','051',1144),(3727,'Tov','047',1144),(3728,'Uvs','046',1144),(3729,'Nouakchott','NKC',1137),(3730,'Assaba','03',1137),(3731,'Brakna','05',1137),(3732,'Dakhlet Nouadhibou','08',1137),(3733,'Gorgol','04',1137),(3734,'Guidimaka','10',1137),(3735,'Hodh ech Chargui','01',1137),(3736,'Hodh el Charbi','02',1137),(3737,'Inchiri','12',1137),(3738,'Tagant','09',1137),(3739,'Tiris Zemmour','11',1137),(3740,'Trarza','06',1137),(3741,'Beau Bassin-Rose Hill','BR',1138),(3742,'Curepipe','CU',1138),(3743,'Port Louis','PU',1138),(3744,'Quatre Bornes','QB',1138),(3745,'Vacosa-Phoenix','VP',1138),(3746,'Black River','BL',1138),(3747,'Flacq','FL',1138),(3748,'Grand Port','GP',1138),(3749,'Moka','MO',1138),(3750,'Pamplemousses','PA',1138),(3751,'Plaines Wilhems','PW',1138),(3752,'Riviere du Rempart','RP',1138),(3753,'Savanne','SA',1138),(3754,'Agalega Islands','AG',1138),(3755,'Cargados Carajos Shoals','CC',1138),(3756,'Rodrigues Island','RO',1138),(3757,'Male','MLE',1132),(3758,'Alif','02',1132),(3759,'Baa','20',1132),(3760,'Dhaalu','17',1132),(3761,'Faafu','14',1132),(3762,'Gaaf Alif','27',1132),(3763,'Gaefu Dhaalu','28',1132),(3764,'Gnaviyani','29',1132),(3765,'Haa Alif','07',1132),(3766,'Haa Dhaalu','23',1132),(3767,'Kaafu','26',1132),(3768,'Laamu','05',1132),(3769,'Lhaviyani','03',1132),(3770,'Meemu','12',1132),(3771,'Noonu','25',1132),(3772,'Raa','13',1132),(3773,'Seenu','01',1132),(3774,'Shaviyani','24',1132),(3775,'Thaa','08',1132),(3776,'Vaavu','04',1132),(3777,'Balaka','BA',1130),(3778,'Blantyre','BL',1130),(3779,'Chikwawa','CK',1130),(3780,'Chiradzulu','CR',1130),(3781,'Chitipa','CT',1130),(3782,'Dedza','DE',1130),(3783,'Dowa','DO',1130),(3784,'Karonga','KR',1130),(3785,'Kasungu','KS',1130),(3786,'Likoma Island','LK',1130),(3787,'Lilongwe','LI',1130),(3788,'Machinga','MH',1130),(3789,'Mangochi','MG',1130),(3790,'Mchinji','MC',1130),(3791,'Mulanje','MU',1130),(3792,'Mwanza','MW',1130),(3793,'Mzimba','MZ',1130),(3794,'Nkhata Bay','NB',1130),(3795,'Nkhotakota','NK',1130),(3796,'Nsanje','NS',1130),(3797,'Ntcheu','NU',1130),(3798,'Ntchisi','NI',1130),(3799,'Phalomba','PH',1130),(3800,'Rumphi','RU',1130),(3801,'Salima','SA',1130),(3802,'Thyolo','TH',1130),(3803,'Zomba','ZO',1130),(3804,'Aguascalientes','AGU',1140),(3805,'Baja California','BCN',1140),(3806,'Baja California Sur','BCS',1140),(3807,'Campeche','CAM',1140),(3808,'Coahuila','COA',1140),(3809,'Colima','COL',1140),(3810,'Chiapas','CHP',1140),(3811,'Chihuahua','CHH',1140),(3812,'Durango','DUR',1140),(3813,'Guanajuato','GUA',1140),(3814,'Guerrero','GRO',1140),(3815,'Hidalgo','HID',1140),(3816,'Jalisco','JAL',1140),(3817,'Mexico','MEX',1140),(3818,'Michoacin','MIC',1140),(3819,'Morelos','MOR',1140),(3820,'Nayarit','NAY',1140),(3821,'Nuevo Leon','NLE',1140),(3822,'Oaxaca','OAX',1140),(3823,'Puebla','PUE',1140),(3824,'Queretaro','QUE',1140),(3825,'Quintana Roo','ROO',1140),(3826,'San Luis Potosi','SLP',1140),(3827,'Sinaloa','SIN',1140),(3828,'Sonora','SON',1140),(3829,'Tabasco','TAB',1140),(3830,'Tamaulipas','TAM',1140),(3831,'Tlaxcala','TLA',1140),(3832,'Veracruz','VER',1140),(3833,'Yucatan','YUC',1140),(3834,'Zacatecas','ZAC',1140),(3835,'Wilayah Persekutuan Kuala Lumpur','14',1131),(3836,'Wilayah Persekutuan Labuan','15',1131),(3837,'Wilayah Persekutuan Putrajaya','16',1131),(3838,'Johor','01',1131),(3839,'Kedah','02',1131),(3840,'Kelantan','03',1131),(3841,'Melaka','04',1131),(3842,'Negeri Sembilan','05',1131),(3843,'Pahang','06',1131),(3844,'Perak','08',1131),(3845,'Perlis','09',1131),(3846,'Pulau Pinang','07',1131),(3847,'Sabah','12',1131),(3848,'Sarawak','13',1131),(3849,'Selangor','10',1131),(3850,'Terengganu','11',1131),(3851,'Maputo','MPM',1147),(3852,'Cabo Delgado','P',1147),(3853,'Gaza','G',1147),(3854,'Inhambane','I',1147),(3855,'Manica','B',1147),(3856,'Numpula','N',1147),(3857,'Niaaea','A',1147),(3858,'Sofala','S',1147),(3859,'Tete','T',1147),(3860,'Zambezia','Q',1147),(3861,'Caprivi','CA',1148),(3862,'Erongo','ER',1148),(3863,'Hardap','HA',1148),(3864,'Karas','KA',1148),(3865,'Khomas','KH',1148),(3866,'Kunene','KU',1148),(3867,'Ohangwena','OW',1148),(3868,'Okavango','OK',1148),(3869,'Omaheke','OH',1148),(3870,'Omusati','OS',1148),(3871,'Oshana','ON',1148),(3872,'Oshikoto','OT',1148),(3873,'Otjozondjupa','OD',1148),(3874,'Niamey','8',1156),(3875,'Agadez','1',1156),(3876,'Diffa','2',1156),(3877,'Dosso','3',1156),(3878,'Maradi','4',1156),(3879,'Tahoua','S',1156),(3880,'Tillaberi','6',1156),(3881,'Zinder','7',1156),(3882,'Abuja Federal Capital Territory','FC',1157),(3883,'Abia','AB',1157),(3884,'Adamawa','AD',1157),(3885,'Akwa Ibom','AK',1157),(3886,'Anambra','AN',1157),(3887,'Bauchi','BA',1157),(3888,'Bayelsa','BY',1157),(3889,'Benue','BE',1157),(3890,'Borno','BO',1157),(3891,'Cross River','CR',1157),(3892,'Delta','DE',1157),(3893,'Ebonyi','EB',1157),(3894,'Edo','ED',1157),(3895,'Ekiti','EK',1157),(3896,'Enugu','EN',1157),(3897,'Gombe','GO',1157),(3898,'Imo','IM',1157),(3899,'Jigawa','JI',1157),(3900,'Kaduna','KD',1157),(3901,'Kano','KN',1157),(3902,'Katsina','KT',1157),(3903,'Kebbi','KE',1157),(3904,'Kogi','KO',1157),(3905,'Kwara','KW',1157),(3906,'Lagos','LA',1157),(3907,'Nassarawa','NA',1157),(3908,'Niger','NI',1157),(3909,'Ogun','OG',1157),(3910,'Ondo','ON',1157),(3911,'Osun','OS',1157),(3912,'Oyo','OY',1157),(3913,'Rivers','RI',1157),(3914,'Sokoto','SO',1157),(3915,'Taraba','TA',1157),(3916,'Yobe','YO',1157),(3917,'Zamfara','ZA',1157),(3918,'Boaco','BO',1155),(3919,'Carazo','CA',1155),(3920,'Chinandega','CI',1155),(3921,'Chontales','CO',1155),(3922,'Esteli','ES',1155),(3923,'Jinotega','JI',1155),(3924,'Leon','LE',1155),(3925,'Madriz','MD',1155),(3926,'Managua','MN',1155),(3927,'Masaya','MS',1155),(3928,'Matagalpa','MT',1155),(3929,'Nueva Segovia','NS',1155),(3930,'Rio San Juan','SJ',1155),(3931,'Rivas','RI',1155),(3932,'Atlantico Norte','AN',1155),(3933,'Atlantico Sur','AS',1155),(3934,'Drente','DR',1152),(3935,'Flevoland','FL',1152),(3936,'Friesland','FR',1152),(3937,'Gelderland','GL',1152),(3938,'Groningen','GR',1152),(3939,'Noord-Brabant','NB',1152),(3940,'Noord-Holland','NH',1152),(3941,'Overijssel','OV',1152),(3942,'Utrecht','UT',1152),(3943,'Zuid-Holland','ZH',1152),(3944,'Zeeland','ZL',1152),(3945,'Akershus','02',1161),(3946,'Aust-Agder','09',1161),(3947,'Buskerud','06',1161),(3948,'Finnmark','20',1161),(3949,'Hedmark','04',1161),(3950,'Hordaland','12',1161),(3951,'Møre og Romsdal','15',1161),(3952,'Nordland','18',1161),(3953,'Nord-Trøndelag','17',1161),(3954,'Oppland','05',1161),(3955,'Oslo','03',1161),(3956,'Rogaland','11',1161),(3957,'Sogn og Fjordane','14',1161),(3958,'Sør-Trøndelag','16',1161),(3959,'Telemark','06',1161),(3960,'Troms','19',1161),(3961,'Vest-Agder','10',1161),(3962,'Vestfold','07',1161),(3963,'Østfold','01',1161),(3964,'Jan Mayen','22',1161),(3965,'Svalbard','21',1161),(3966,'Auckland','AUK',1154),(3967,'Bay of Plenty','BOP',1154),(3968,'Canterbury','CAN',1154),(3969,'Gisborne','GIS',1154),(3970,'Hawkes Bay','HKB',1154),(3971,'Manawatu-Wanganui','MWT',1154),(3972,'Marlborough','MBH',1154),(3973,'Nelson','NSN',1154),(3974,'Northland','NTL',1154),(3975,'Otago','OTA',1154),(3976,'Southland','STL',1154),(3977,'Taranaki','TKI',1154),(3978,'Tasman','TAS',1154),(3979,'Waikato','WKO',1154),(3980,'Wellington','WGN',1154),(3981,'West Coast','WTC',1154),(3982,'Ad Dakhillyah','DA',1162),(3983,'Al Batinah','BA',1162),(3984,'Al Janblyah','JA',1162),(3985,'Al Wusta','WU',1162),(3986,'Ash Sharqlyah','SH',1162),(3987,'Az Zahirah','ZA',1162),(3988,'Masqat','MA',1162),(3989,'Musandam','MU',1162),(3990,'Bocas del Toro','1',1166),(3991,'Cocle','2',1166),(3992,'Chiriqui','4',1166),(3993,'Darien','5',1166),(3994,'Herrera','6',1166),(3995,'Loa Santoa','7',1166),(3996,'Panama','8',1166),(3997,'Veraguas','9',1166),(3998,'Comarca de San Blas','Q',1166),(3999,'El Callao','CAL',1169),(4000,'Ancash','ANC',1169),(4001,'Apurimac','APU',1169),(4002,'Arequipa','ARE',1169),(4003,'Ayacucho','AYA',1169),(4004,'Cajamarca','CAJ',1169),(4005,'Cuzco','CUS',1169),(4006,'Huancavelica','HUV',1169),(4007,'Huanuco','HUC',1169),(4008,'Ica','ICA',1169),(4009,'Junin','JUN',1169),(4010,'La Libertad','LAL',1169),(4011,'Lambayeque','LAM',1169),(4012,'Lima','LIM',1169),(4013,'Loreto','LOR',1169),(4014,'Madre de Dios','MDD',1169),(4015,'Moquegua','MOQ',1169),(4016,'Pasco','PAS',1169),(4017,'Piura','PIU',1169),(4018,'Puno','PUN',1169),(4019,'San Martin','SAM',1169),(4020,'Tacna','TAC',1169),(4021,'Tumbes','TUM',1169),(4022,'Ucayali','UCA',1169),(4023,'National Capital District (Port Moresby)','NCD',1167),(4024,'Chimbu','CPK',1167),(4025,'Eastern Highlands','EHG',1167),(4026,'East New Britain','EBR',1167),(4027,'East Sepik','ESW',1167),(4028,'Enga','EPW',1167),(4029,'Gulf','GPK',1167),(4030,'Madang','MPM',1167),(4031,'Manus','MRL',1167),(4032,'Milne Bay','MBA',1167),(4033,'Morobe','MPL',1167),(4034,'New Ireland','NIK',1167),(4035,'North Solomons','NSA',1167),(4036,'Santaun','SAN',1167),(4037,'Southern Highlands','SHM',1167),(4038,'Western Highlands','WHM',1167),(4039,'West New Britain','WBK',1167),(4040,'Abra','ABR',1170),(4041,'Agusan del Norte','AGN',1170),(4042,'Agusan del Sur','AGS',1170),(4043,'Aklan','AKL',1170),(4044,'Albay','ALB',1170),(4045,'Antique','ANT',1170),(4046,'Apayao','APA',1170),(4047,'Aurora','AUR',1170),(4048,'Basilan','BAS',1170),(4049,'Bataan','BAN',1170),(4050,'Batanes','BTN',1170),(4051,'Batangas','BTG',1170),(4052,'Benguet','BEN',1170),(4053,'Biliran','BIL',1170),(4054,'Bohol','BOH',1170),(4055,'Bukidnon','BUK',1170),(4056,'Bulacan','BUL',1170),(4057,'Cagayan','CAG',1170),(4058,'Camarines Norte','CAN',1170),(4059,'Camarines Sur','CAS',1170),(4060,'Camiguin','CAM',1170),(4061,'Capiz','CAP',1170),(4062,'Catanduanes','CAT',1170),(4063,'Cavite','CAV',1170),(4064,'Cebu','CEB',1170),(4065,'Compostela Valley','COM',1170),(4066,'Davao','DAV',1170),(4067,'Davao del Sur','DAS',1170),(4068,'Davao Oriental','DAO',1170),(4069,'Eastern Samar','EAS',1170),(4070,'Guimaras','GUI',1170),(4071,'Ifugao','IFU',1170),(4072,'Ilocos Norte','ILN',1170),(4073,'Ilocos Sur','ILS',1170),(4074,'Iloilo','ILI',1170),(4075,'Isabela','ISA',1170),(4076,'Kalinga-Apayso','KAL',1170),(4077,'Laguna','LAG',1170),(4078,'Lanao del Norte','LAN',1170),(4079,'Lanao del Sur','LAS',1170),(4080,'La Union','LUN',1170),(4081,'Leyte','LEY',1170),(4082,'Maguindanao','MAG',1170),(4083,'Marinduque','MAD',1170),(4084,'Masbate','MAS',1170),(4085,'Mindoro Occidental','MDC',1170),(4086,'Mindoro Oriental','MDR',1170),(4087,'Misamis Occidental','MSC',1170),(4088,'Misamis Oriental','MSR',1170),(4089,'Mountain Province','MOU',1170),(4090,'Negroe Occidental','NEC',1170),(4091,'Negros Oriental','NER',1170),(4092,'North Cotabato','NCO',1170),(4093,'Northern Samar','NSA',1170),(4094,'Nueva Ecija','NUE',1170),(4095,'Nueva Vizcaya','NUV',1170),(4096,'Palawan','PLW',1170),(4097,'Pampanga','PAM',1170),(4098,'Pangasinan','PAN',1170),(4099,'Quezon','QUE',1170),(4100,'Quirino','QUI',1170),(4101,'Rizal','RIZ',1170),(4102,'Romblon','ROM',1170),(4103,'Sarangani','SAR',1170),(4104,'Siquijor','SIG',1170),(4105,'Sorsogon','SOR',1170),(4106,'South Cotabato','SCO',1170),(4107,'Southern Leyte','SLE',1170),(4108,'Sultan Kudarat','SUK',1170),(4109,'Sulu','SLU',1170),(4110,'Surigao del Norte','SUN',1170),(4111,'Surigao del Sur','SUR',1170),(4112,'Tarlac','TAR',1170),(4113,'Tawi-Tawi','TAW',1170),(4114,'Western Samar','WSA',1170),(4115,'Zambales','ZMB',1170),(4116,'Zamboanga del Norte','ZAN',1170),(4117,'Zamboanga del Sur','ZAS',1170),(4118,'Zamboanga Sibiguey','ZSI',1170),(4119,'Islamabad Federal Capital Area','IS',1163),(4120,'Baluchistan','BA',1163),(4121,'Khyber Pakhtun Khawa','NW',1163),(4122,'Sindh','SD',1163),(4123,'Federally Administered Tribal Areas','TA',1163),(4124,'Azad Kashmir','JK',1163),(4125,'Gilgit-Baltistan','NA',1163),(4126,'Aveiro','01',1173),(4127,'Beja','02',1173),(4128,'Braga','03',1173),(4129,'Braganca','04',1173),(4130,'Castelo Branco','05',1173),(4131,'Colmbra','06',1173),(4132,'Ovora','07',1173),(4133,'Faro','08',1173),(4134,'Guarda','09',1173),(4135,'Leiria','10',1173),(4136,'Lisboa','11',1173),(4137,'Portalegre','12',1173),(4138,'Porto','13',1173),(4139,'Santarem','14',1173),(4140,'Setubal','15',1173),(4141,'Viana do Castelo','16',1173),(4142,'Vila Real','17',1173),(4143,'Viseu','18',1173),(4144,'Regiao Autonoma dos Acores','20',1173),(4145,'Regiao Autonoma da Madeira','30',1173),(4146,'Asuncion','ASU',1168),(4147,'Alto Paraguay','16',1168),(4148,'Alto Parana','10',1168),(4149,'Amambay','13',1168),(4150,'Boqueron','19',1168),(4151,'Caeguazu','5',1168),(4152,'Caazapl','6',1168),(4153,'Canindeyu','14',1168),(4154,'Concepcion','1',1168),(4155,'Cordillera','3',1168),(4156,'Guaira','4',1168),(4157,'Itapua','7',1168),(4158,'Miaiones','8',1168),(4159,'Neembucu','12',1168),(4160,'Paraguari','9',1168),(4161,'Presidente Hayes','15',1168),(4162,'San Pedro','2',1168),(4163,'Ad Dawhah','DA',1175),(4164,'Al Ghuwayriyah','GH',1175),(4165,'Al Jumayliyah','JU',1175),(4166,'Al Khawr','KH',1175),(4167,'Al Wakrah','WA',1175),(4168,'Ar Rayyan','RA',1175),(4169,'Jariyan al Batnah','JB',1175),(4170,'Madinat ash Shamal','MS',1175),(4171,'Umm Salal','US',1175),(4172,'Bucuresti','B',1176),(4173,'Alba','AB',1176),(4174,'Arad','AR',1176),(4175,'Arges','AG',1176),(4176,'Bacau','BC',1176),(4177,'Bihor','BH',1176),(4178,'Bistrita-Nasaud','BN',1176),(4179,'Boto\'ani','BT',1176),(4180,'Bra\'ov','BV',1176),(4181,'Braila','BR',1176),(4182,'Buzau','BZ',1176),(4183,'Caras-Severin','CS',1176),(4184,'Ca la ras\'i','CL',1176),(4185,'Cluj','CJ',1176),(4186,'Constant\'a','CT',1176),(4187,'Covasna','CV',1176),(4188,'Dambovit\'a','DB',1176),(4189,'Dolj','DJ',1176),(4190,'Galat\'i','GL',1176),(4191,'Giurgiu','GR',1176),(4192,'Gorj','GJ',1176),(4193,'Harghita','HR',1176),(4194,'Hunedoara','HD',1176),(4195,'Ialomit\'a','IL',1176),(4196,'Ias\'i','IS',1176),(4197,'Ilfov','IF',1176),(4198,'Maramures','MM',1176),(4199,'Mehedint\'i','MH',1176),(4200,'Mures','MS',1176),(4201,'Neamt','NT',1176),(4202,'Olt','OT',1176),(4203,'Prahova','PH',1176),(4204,'Satu Mare','SM',1176),(4205,'Sa laj','SJ',1176),(4206,'Sibiu','SB',1176),(4207,'Suceava','SV',1176),(4208,'Teleorman','TR',1176),(4209,'Timis','TM',1176),(4210,'Tulcea','TL',1176),(4211,'Vaslui','VS',1176),(4212,'Valcea','VL',1176),(4213,'Vrancea','VN',1176),(4214,'Adygeya, Respublika','AD',1177),(4215,'Altay, Respublika','AL',1177),(4216,'Bashkortostan, Respublika','BA',1177),(4217,'Buryatiya, Respublika','BU',1177),(4218,'Chechenskaya Respublika','CE',1177),(4219,'Chuvashskaya Respublika','CU',1177),(4220,'Dagestan, Respublika','DA',1177),(4221,'Ingushskaya Respublika','IN',1177),(4222,'Kabardino-Balkarskaya','KB',1177),(4223,'Kalmykiya, Respublika','KL',1177),(4224,'Karachayevo-Cherkesskaya Respublika','KC',1177),(4225,'Kareliya, Respublika','KR',1177),(4226,'Khakasiya, Respublika','KK',1177),(4227,'Komi, Respublika','KO',1177),(4228,'Mariy El, Respublika','ME',1177),(4229,'Mordoviya, Respublika','MO',1177),(4230,'Sakha, Respublika [Yakutiya]','SA',1177),(4231,'Severnaya Osetiya, Respublika','SE',1177),(4232,'Tatarstan, Respublika','TA',1177),(4233,'Tyva, Respublika [Tuva]','TY',1177),(4234,'Udmurtskaya Respublika','UD',1177),(4235,'Altayskiy kray','ALT',1177),(4236,'Khabarovskiy kray','KHA',1177),(4237,'Krasnodarskiy kray','KDA',1177),(4238,'Krasnoyarskiy kray','KYA',1177),(4239,'Primorskiy kray','PRI',1177),(4240,'Stavropol\'skiy kray','STA',1177),(4241,'Amurskaya oblast\'','AMU',1177),(4242,'Arkhangel\'skaya oblast\'','ARK',1177),(4243,'Astrakhanskaya oblast\'','AST',1177),(4244,'Belgorodskaya oblast\'','BEL',1177),(4245,'Bryanskaya oblast\'','BRY',1177),(4246,'Chelyabinskaya oblast\'','CHE',1177),(4247,'Zabaykalsky Krai\'','ZSK',1177),(4248,'Irkutskaya oblast\'','IRK',1177),(4249,'Ivanovskaya oblast\'','IVA',1177),(4250,'Kaliningradskaya oblast\'','KGD',1177),(4251,'Kaluzhskaya oblast\'','KLU',1177),(4252,'Kamchatka Krai\'','KAM',1177),(4253,'Kemerovskaya oblast\'','KEM',1177),(4254,'Kirovskaya oblast\'','KIR',1177),(4255,'Kostromskaya oblast\'','KOS',1177),(4256,'Kurganskaya oblast\'','KGN',1177),(4257,'Kurskaya oblast\'','KRS',1177),(4258,'Leningradskaya oblast\'','LEN',1177),(4259,'Lipetskaya oblast\'','LIP',1177),(4260,'Magadanskaya oblast\'','MAG',1177),(4261,'Moskovskaya oblast\'','MOS',1177),(4262,'Murmanskaya oblast\'','MUR',1177),(4263,'Nizhegorodskaya oblast\'','NIZ',1177),(4264,'Novgorodskaya oblast\'','NGR',1177),(4265,'Novosibirskaya oblast\'','NVS',1177),(4266,'Omskaya oblast\'','OMS',1177),(4267,'Orenburgskaya oblast\'','ORE',1177),(4268,'Orlovskaya oblast\'','ORL',1177),(4269,'Penzenskaya oblast\'','PNZ',1177),(4270,'Perm krai\'','PEK',1177),(4271,'Pskovskaya oblast\'','PSK',1177),(4272,'Rostovskaya oblast\'','ROS',1177),(4273,'Ryazanskaya oblast\'','RYA',1177),(4274,'Sakhalinskaya oblast\'','SAK',1177),(4275,'Samarskaya oblast\'','SAM',1177),(4276,'Saratovskaya oblast\'','SAR',1177),(4277,'Smolenskaya oblast\'','SMO',1177),(4278,'Sverdlovskaya oblast\'','SVE',1177),(4279,'Tambovskaya oblast\'','TAM',1177),(4280,'Tomskaya oblast\'','TOM',1177),(4281,'Tul\'skaya oblast\'','TUL',1177),(4282,'Tverskaya oblast\'','TVE',1177),(4283,'Tyumenskaya oblast\'','TYU',1177),(4284,'Ul\'yanovskaya oblast\'','ULY',1177),(4285,'Vladimirskaya oblast\'','VLA',1177),(4286,'Volgogradskaya oblast\'','VGG',1177),(4287,'Vologodskaya oblast\'','VLG',1177),(4288,'Voronezhskaya oblast\'','VOR',1177),(4289,'Yaroslavskaya oblast\'','YAR',1177),(4290,'Moskva','MOW',1177),(4291,'Sankt-Peterburg','SPE',1177),(4292,'Yevreyskaya avtonomnaya oblast\'','YEV',1177),(4294,'Chukotskiy avtonomnyy okrug','CHU',1177),(4296,'Khanty-Mansiyskiy avtonomnyy okrug','KHM',1177),(4299,'Nenetskiy avtonomnyy okrug','NEN',1177),(4302,'Yamalo-Nenetskiy avtonomnyy okrug','YAN',1177),(4303,'Butare','C',1178),(4304,'Byumba','I',1178),(4305,'Cyangugu','E',1178),(4306,'Gikongoro','D',1178),(4307,'Gisenyi','G',1178),(4308,'Gitarama','B',1178),(4309,'Kibungo','J',1178),(4310,'Kibuye','F',1178),(4311,'Kigali-Rural Kigali y\' Icyaro','K',1178),(4312,'Kigali-Ville Kigali Ngari','L',1178),(4313,'Mutara','M',1178),(4314,'Ruhengeri','H',1178),(4315,'Al Bahah','11',1187),(4316,'Al Hudud Ash Shamaliyah','08',1187),(4317,'Al Jawf','12',1187),(4318,'Al Madinah','03',1187),(4319,'Al Qasim','05',1187),(4320,'Ar Riyad','01',1187),(4321,'Asir','14',1187),(4322,'Ha\'il','06',1187),(4323,'Jlzan','09',1187),(4324,'Makkah','02',1187),(4325,'Najran','10',1187),(4326,'Tabuk','07',1187),(4327,'Capital Territory (Honiara)','CT',1194),(4328,'Guadalcanal','GU',1194),(4329,'Isabel','IS',1194),(4330,'Makira','MK',1194),(4331,'Malaita','ML',1194),(4332,'Temotu','TE',1194),(4333,'A\'ali an Nil','23',1200),(4334,'Al Bah al Ahmar','26',1200),(4335,'Al Buhayrat','18',1200),(4336,'Al Jazirah','07',1200),(4337,'Al Khartum','03',1200),(4338,'Al Qadarif','06',1200),(4339,'Al Wahdah','22',1200),(4340,'An Nil','04',1200),(4341,'An Nil al Abyaq','08',1200),(4342,'An Nil al Azraq','24',1200),(4343,'Ash Shamallyah','01',1200),(4344,'Bahr al Jabal','17',1200),(4345,'Gharb al Istiwa\'iyah','16',1200),(4346,'Gharb Ba~r al Ghazal','14',1200),(4347,'Gharb Darfur','12',1200),(4348,'Gharb Kurdufan','10',1200),(4349,'Janub Darfur','11',1200),(4350,'Janub Rurdufan','13',1200),(4351,'Jnqall','20',1200),(4352,'Kassala','05',1200),(4353,'Shamal Batr al Ghazal','15',1200),(4354,'Shamal Darfur','02',1200),(4355,'Shamal Kurdufan','09',1200),(4356,'Sharq al Istiwa\'iyah','19',1200),(4357,'Sinnar','25',1200),(4358,'Warab','21',1200),(4359,'Blekinge län','K',1204),(4360,'Dalarnas län','W',1204),(4361,'Gotlands län','I',1204),(4362,'Gävleborgs län','X',1204),(4363,'Hallands län','N',1204),(4364,'Jämtlands län','Z',1204),(4365,'Jönkopings län','F',1204),(4366,'Kalmar län','H',1204),(4367,'Kronobergs län','G',1204),(4368,'Norrbottens län','BD',1204),(4369,'SkÃ¥ne län','M',1204),(4370,'Stockholms län','AB',1204),(4371,'Södermanlands län','D',1204),(4372,'Uppsala län','C',1204),(4373,'Värmlands län','S',1204),(4374,'Västerbottens län','AC',1204),(4375,'Västernorrlands län','Y',1204),(4376,'Västmanlands län','U',1204),(4377,'Västra Götalands län','Q',1204),(4378,'Örebro län','T',1204),(4379,'Östergötlands län','E',1204),(4380,'Saint Helena','SH',1180),(4381,'Ascension','AC',1180),(4382,'Tristan da Cunha','TA',1180),(4383,'AjdovÅ¡Äina','001',1193),(4384,'Beltinci','002',1193),(4385,'Benedikt','148',1193),(4386,'Bistrica ob Sotli','149',1193),(4387,'Bled','003',1193),(4388,'Bloke','150',1193),(4389,'Bohinj','004',1193),(4390,'Borovnica','005',1193),(4391,'Bovec','006',1193),(4392,'BraslovÄe','151',1193),(4393,'Brda','007',1193),(4394,'Brezovica','008',1193),(4395,'Brežice','009',1193),(4396,'Cankova','152',1193),(4397,'Celje','011',1193),(4398,'Cerklje na Gorenjskem','012',1193),(4399,'Cerknica','013',1193),(4400,'Cerkno','014',1193),(4401,'Cerkvenjak','153',1193),(4402,'ÄŒrenÅ¡ovci','015',1193),(4403,'ÄŒrna na KoroÅ¡kem','016',1193),(4404,'ÄŒrnomelj','017',1193),(4405,'Destrnik','018',1193),(4406,'DivaÄa','019',1193),(4407,'Dobje','154',1193),(4408,'Dobrepolje','020',1193),(4409,'Dobrna','155',1193),(4410,'Dobrova-Polhov Gradec','021',1193),(4411,'Dobrovnik','156',1193),(4412,'Dol pri Ljubljani','022',1193),(4413,'Dolenjske Toplice','157',1193),(4414,'Domžale','023',1193),(4415,'Dornava','024',1193),(4416,'Dravograd','025',1193),(4417,'Duplek','026',1193),(4418,'Gorenja vas-Poljane','027',1193),(4419,'GoriÅ¡nica','028',1193),(4420,'Gornja Radgona','029',1193),(4421,'Gornji Grad','030',1193),(4422,'Gornji Petrovci','031',1193),(4423,'Grad','158',1193),(4424,'Grosuplje','032',1193),(4425,'Hajdina','159',1193),(4426,'HoÄe-Slivnica','160',1193),(4427,'HodoÅ¡','161',1193),(4428,'Horjul','162',1193),(4429,'Hrastnik','034',1193),(4430,'Hrpelje-Kozina','035',1193),(4431,'Idrija','036',1193),(4432,'Ig','037',1193),(4433,'Ilirska Bistrica','038',1193),(4434,'IvanÄna Gorica','039',1193),(4435,'Izola','040',1193),(4436,'Jesenice','041',1193),(4437,'Jezersko','163',1193),(4438,'JurÅ¡inci','042',1193),(4439,'Kamnik','043',1193),(4440,'Kanal','044',1193),(4441,'KidriÄevo','045',1193),(4442,'Kobarid','046',1193),(4443,'Kobilje','047',1193),(4444,'KoÄevje','048',1193),(4445,'Komen','049',1193),(4446,'Komenda','164',1193),(4447,'Koper','050',1193),(4448,'Kostel','165',1193),(4449,'Kozje','051',1193),(4450,'Kranj','052',1193),(4451,'Kranjska Gora','053',1193),(4452,'Križevci','166',1193),(4453,'KrÅ¡ko','054',1193),(4454,'Kungota','055',1193),(4455,'Kuzma','056',1193),(4456,'LaÅ¡ko','057',1193),(4457,'Lenart','058',1193),(4458,'Lendava','059',1193),(4459,'Litija','060',1193),(4460,'Ljubljana','061',1193),(4461,'Ljubno','062',1193),(4462,'Ljutomer','063',1193),(4463,'Logatec','064',1193),(4464,'LoÅ¡ka dolina','065',1193),(4465,'LoÅ¡ki Potok','066',1193),(4466,'Lovrenc na Pohorju','167',1193),(4467,'LuÄe','067',1193),(4468,'Lukovica','068',1193),(4469,'MajÅ¡perk','069',1193),(4470,'Maribor','070',1193),(4471,'Markovci','168',1193),(4472,'Medvode','071',1193),(4473,'MengeÅ¡','072',1193),(4474,'Metlika','073',1193),(4475,'Mežica','074',1193),(4476,'Miklavž na Dravskem polju','169',1193),(4477,'Miren-Kostanjevica','075',1193),(4478,'Mirna PeÄ','170',1193),(4479,'Mislinja','076',1193),(4480,'MoravÄe','077',1193),(4481,'Moravske Toplice','078',1193),(4482,'Mozirje','079',1193),(4483,'Murska Sobota','080',1193),(4484,'Muta','081',1193),(4485,'Naklo','082',1193),(4486,'Nazarje','083',1193),(4487,'Nova Gorica','084',1193),(4488,'Novo mesto','085',1193),(4489,'Sveta Ana','181',1193),(4490,'Sveti Andraž v Slovenskih goricah','182',1193),(4491,'Sveti Jurij','116',1193),(4492,'Å alovci','033',1193),(4493,'Å empeter-Vrtojba','183',1193),(4494,'Å enÄur','117',1193),(4495,'Å entilj','118',1193),(4496,'Å entjernej','119',1193),(4497,'Å entjur','120',1193),(4498,'Å kocjan','121',1193),(4499,'Å kofja Loka','122',1193),(4500,'Å kofljica','123',1193),(4501,'Å marje pri JelÅ¡ah','124',1193),(4502,'Å martno ob Paki','125',1193),(4503,'Å martno pri Litiji','194',1193),(4504,'Å oÅ¡tanj','126',1193),(4505,'Å tore','127',1193),(4506,'Tabor','184',1193),(4507,'TiÅ¡ina','010',1193),(4508,'Tolmin','128',1193),(4509,'Trbovlje','129',1193),(4510,'Trebnje','130',1193),(4511,'Trnovska vas','185',1193),(4512,'TržiÄ','131',1193),(4513,'Trzin','186',1193),(4514,'TurniÅ¡Äe','132',1193),(4515,'Velenje','133',1193),(4516,'Velika Polana','187',1193),(4517,'Velike LaÅ¡Äe','134',1193),(4518,'Veržej','188',1193),(4519,'Videm','135',1193),(4520,'Vipava','136',1193),(4521,'Vitanje','137',1193),(4522,'Vojnik','138',1193),(4523,'Vransko','189',1193),(4524,'Vrhnika','140',1193),(4525,'Vuzenica','141',1193),(4526,'Zagorje ob Savi','142',1193),(4527,'ZavrÄ','143',1193),(4528,'ZreÄe','144',1193),(4529,'Žalec','190',1193),(4530,'Železniki','146',1193),(4531,'Žetale','191',1193),(4532,'Žiri','147',1193),(4533,'Žirovnica','192',1193),(4534,'Žužemberk','193',1193),(4535,'Banskobystrický kraj','BC',1192),(4536,'Bratislavský kraj','BL',1192),(4537,'KoÅ¡ický kraj','KI',1192),(4538,'Nitriansky kraj','NJ',1192),(4539,'PreÅ¡ovský kraj','PV',1192),(4540,'TrenÄiansky kraj','TC',1192),(4541,'Trnavský kraj','TA',1192),(4542,'Žilinský kraj','ZI',1192),(4543,'Western Area (Freetown)','W',1190),(4544,'Dakar','DK',1188),(4545,'Diourbel','DB',1188),(4546,'Fatick','FK',1188),(4547,'Kaolack','KL',1188),(4548,'Kolda','KD',1188),(4549,'Louga','LG',1188),(4550,'Matam','MT',1188),(4551,'Saint-Louis','SL',1188),(4552,'Tambacounda','TC',1188),(4553,'Thies','TH',1188),(4554,'Ziguinchor','ZG',1188),(4555,'Awdal','AW',1195),(4556,'Bakool','BK',1195),(4557,'Banaadir','BN',1195),(4558,'Bay','BY',1195),(4559,'Galguduud','GA',1195),(4560,'Gedo','GE',1195),(4561,'Hiirsan','HI',1195),(4562,'Jubbada Dhexe','JD',1195),(4563,'Jubbada Hoose','JH',1195),(4564,'Mudug','MU',1195),(4565,'Nugaal','NU',1195),(4566,'Saneag','SA',1195),(4567,'Shabeellaha Dhexe','SD',1195),(4568,'Shabeellaha Hoose','SH',1195),(4569,'Sool','SO',1195),(4570,'Togdheer','TO',1195),(4571,'Woqooyi Galbeed','WO',1195),(4572,'Brokopondo','BR',1201),(4573,'Commewijne','CM',1201),(4574,'Coronie','CR',1201),(4575,'Marowijne','MA',1201),(4576,'Nickerie','NI',1201),(4577,'Paramaribo','PM',1201),(4578,'Saramacca','SA',1201),(4579,'Sipaliwini','SI',1201),(4580,'Wanica','WA',1201),(4581,'Principe','P',1207),(4582,'Sao Tome','S',1207),(4583,'Ahuachapan','AH',1066),(4584,'Cabanas','CA',1066),(4585,'Cuscatlan','CU',1066),(4586,'Chalatenango','CH',1066),(4587,'Morazan','MO',1066),(4588,'San Miguel','SM',1066),(4589,'San Salvador','SS',1066),(4590,'Santa Ana','SA',1066),(4591,'San Vicente','SV',1066),(4592,'Sonsonate','SO',1066),(4593,'Usulutan','US',1066),(4594,'Al Hasakah','HA',1206),(4595,'Al Ladhiqiyah','LA',1206),(4596,'Al Qunaytirah','QU',1206),(4597,'Ar Raqqah','RA',1206),(4598,'As Suwayda\'','SU',1206),(4599,'Dar\'a','DR',1206),(4600,'Dayr az Zawr','DY',1206),(4601,'Dimashq','DI',1206),(4602,'Halab','HL',1206),(4603,'Hamah','HM',1206),(4604,'Jim\'','HI',1206),(4605,'Idlib','ID',1206),(4606,'Rif Dimashq','RD',1206),(4607,'Tarts','TA',1206),(4608,'Hhohho','HH',1203),(4609,'Lubombo','LU',1203),(4610,'Manzini','MA',1203),(4611,'Shiselweni','SH',1203),(4612,'Batha','BA',1043),(4613,'Biltine','BI',1043),(4614,'Borkou-Ennedi-Tibesti','BET',1043),(4615,'Chari-Baguirmi','CB',1043),(4616,'Guera','GR',1043),(4617,'Kanem','KA',1043),(4618,'Lac','LC',1043),(4619,'Logone-Occidental','LO',1043),(4620,'Logone-Oriental','LR',1043),(4621,'Mayo-Kebbi','MK',1043),(4622,'Moyen-Chari','MC',1043),(4623,'Ouaddai','OD',1043),(4624,'Salamat','SA',1043),(4625,'Tandjile','TA',1043),(4626,'Kara','K',1214),(4627,'Maritime (Region)','M',1214),(4628,'Savannes','S',1214),(4629,'Krung Thep Maha Nakhon Bangkok','10',1211),(4630,'Phatthaya','S',1211),(4631,'Amnat Charoen','37',1211),(4632,'Ang Thong','15',1211),(4633,'Buri Ram','31',1211),(4634,'Chachoengsao','24',1211),(4635,'Chai Nat','18',1211),(4636,'Chaiyaphum','36',1211),(4637,'Chanthaburi','22',1211),(4638,'Chiang Mai','50',1211),(4639,'Chiang Rai','57',1211),(4640,'Chon Buri','20',1211),(4641,'Chumphon','86',1211),(4642,'Kalasin','46',1211),(4643,'Kamphasng Phet','62',1211),(4644,'Kanchanaburi','71',1211),(4645,'Khon Kaen','40',1211),(4646,'Krabi','81',1211),(4647,'Lampang','52',1211),(4648,'Lamphun','51',1211),(4649,'Loei','42',1211),(4650,'Lop Buri','16',1211),(4651,'Mae Hong Son','58',1211),(4652,'Maha Sarakham','44',1211),(4653,'Mukdahan','49',1211),(4654,'Nakhon Nayok','26',1211),(4655,'Nakhon Pathom','73',1211),(4656,'Nakhon Phanom','48',1211),(4657,'Nakhon Ratchasima','30',1211),(4658,'Nakhon Sawan','60',1211),(4659,'Nakhon Si Thammarat','80',1211),(4660,'Nan','55',1211),(4661,'Narathiwat','96',1211),(4662,'Nong Bua Lam Phu','39',1211),(4663,'Nong Khai','43',1211),(4664,'Nonthaburi','12',1211),(4665,'Pathum Thani','13',1211),(4666,'Pattani','94',1211),(4667,'Phangnga','82',1211),(4668,'Phatthalung','93',1211),(4669,'Phayao','56',1211),(4670,'Phetchabun','67',1211),(4671,'Phetchaburi','76',1211),(4672,'Phichit','66',1211),(4673,'Phitsanulok','65',1211),(4674,'Phrae','54',1211),(4675,'Phra Nakhon Si Ayutthaya','14',1211),(4676,'Phuket','83',1211),(4677,'Prachin Buri','25',1211),(4678,'Prachuap Khiri Khan','77',1211),(4679,'Ranong','85',1211),(4680,'Ratchaburi','70',1211),(4681,'Rayong','21',1211),(4682,'Roi Et','45',1211),(4683,'Sa Kaeo','27',1211),(4684,'Sakon Nakhon','47',1211),(4685,'Samut Prakan','11',1211),(4686,'Samut Sakhon','74',1211),(4687,'Samut Songkhram','75',1211),(4688,'Saraburi','19',1211),(4689,'Satun','91',1211),(4690,'Sing Buri','17',1211),(4691,'Si Sa Ket','33',1211),(4692,'Songkhla','90',1211),(4693,'Sukhothai','64',1211),(4694,'Suphan Buri','72',1211),(4695,'Surat Thani','84',1211),(4696,'Surin','32',1211),(4697,'Tak','63',1211),(4698,'Trang','92',1211),(4699,'Trat','23',1211),(4700,'Ubon Ratchathani','34',1211),(4701,'Udon Thani','41',1211),(4702,'Uthai Thani','61',1211),(4703,'Uttaradit','53',1211),(4704,'Yala','95',1211),(4705,'Yasothon','35',1211),(4706,'Sughd','SU',1209),(4707,'Khatlon','KT',1209),(4708,'Gorno-Badakhshan','GB',1209),(4709,'Ahal','A',1220),(4710,'Balkan','B',1220),(4711,'Dasoguz','D',1220),(4712,'Lebap','L',1220),(4713,'Mary','M',1220),(4714,'Béja','31',1218),(4715,'Ben Arous','13',1218),(4716,'Bizerte','23',1218),(4717,'Gabès','81',1218),(4718,'Gafsa','71',1218),(4719,'Jendouba','32',1218),(4720,'Kairouan','41',1218),(4721,'Rasserine','42',1218),(4722,'Kebili','73',1218),(4723,'L\'Ariana','12',1218),(4724,'Le Ref','33',1218),(4725,'Mahdia','53',1218),(4726,'La Manouba','14',1218),(4727,'Medenine','82',1218),(4728,'Moneatir','52',1218),(4729,'Naboul','21',1218),(4730,'Sfax','61',1218),(4731,'Sidi Bouxid','43',1218),(4732,'Siliana','34',1218),(4733,'Sousse','51',1218),(4734,'Tataouine','83',1218),(4735,'Tozeur','72',1218),(4736,'Tunis','11',1218),(4737,'Zaghouan','22',1218),(4738,'Adana','01',1219),(4739,'Ad yaman','02',1219),(4740,'Afyon','03',1219),(4741,'Ag r','04',1219),(4742,'Aksaray','68',1219),(4743,'Amasya','05',1219),(4744,'Ankara','06',1219),(4745,'Antalya','07',1219),(4746,'Ardahan','75',1219),(4747,'Artvin','08',1219),(4748,'Aydin','09',1219),(4749,'Bal kesir','10',1219),(4750,'Bartin','74',1219),(4751,'Batman','72',1219),(4752,'Bayburt','69',1219),(4753,'Bilecik','11',1219),(4754,'Bingol','12',1219),(4755,'Bitlis','13',1219),(4756,'Bolu','14',1219),(4757,'Burdur','15',1219),(4758,'Bursa','16',1219),(4759,'Canakkale','17',1219),(4760,'Cankir','18',1219),(4761,'Corum','19',1219),(4762,'Denizli','20',1219),(4763,'Diyarbakir','21',1219),(4764,'Duzce','81',1219),(4765,'Edirne','22',1219),(4766,'Elazig','23',1219),(4767,'Erzincan','24',1219),(4768,'Erzurum','25',1219),(4769,'Eskis\'ehir','26',1219),(4770,'Gaziantep','27',1219),(4771,'Giresun','28',1219),(4772,'Gms\'hane','29',1219),(4773,'Hakkari','30',1219),(4774,'Hatay','31',1219),(4775,'Igidir','76',1219),(4776,'Isparta','32',1219),(4777,'Icel','33',1219),(4778,'Istanbul','34',1219),(4779,'Izmir','35',1219),(4780,'Kahramanmaras','46',1219),(4781,'Karabk','78',1219),(4782,'Karaman','70',1219),(4783,'Kars','36',1219),(4784,'Kastamonu','37',1219),(4785,'Kayseri','38',1219),(4786,'Kirikkale','71',1219),(4787,'Kirklareli','39',1219),(4788,'Kirs\'ehir','40',1219),(4789,'Kilis','79',1219),(4790,'Kocaeli','41',1219),(4791,'Konya','42',1219),(4792,'Ktahya','43',1219),(4793,'Malatya','44',1219),(4794,'Manisa','45',1219),(4795,'Mardin','47',1219),(4796,'Mugila','48',1219),(4797,'Mus','49',1219),(4798,'Nevs\'ehir','50',1219),(4799,'Nigide','51',1219),(4800,'Ordu','52',1219),(4801,'Osmaniye','80',1219),(4802,'Rize','53',1219),(4803,'Sakarya','54',1219),(4804,'Samsun','55',1219),(4805,'Siirt','56',1219),(4806,'Sinop','57',1219),(4807,'Sivas','58',1219),(4808,'S\'anliurfa','63',1219),(4809,'S\'rnak','73',1219),(4810,'Tekirdag','59',1219),(4811,'Tokat','60',1219),(4812,'Trabzon','61',1219),(4813,'Tunceli','62',1219),(4814,'Us\'ak','64',1219),(4815,'Van','65',1219),(4816,'Yalova','77',1219),(4817,'Yozgat','66',1219),(4818,'Zonguldak','67',1219),(4819,'Couva-Tabaquite-Talparo','CTT',1217),(4820,'Diego Martin','DMN',1217),(4821,'Eastern Tobago','ETO',1217),(4822,'Penal-Debe','PED',1217),(4823,'Princes Town','PRT',1217),(4824,'Rio Claro-Mayaro','RCM',1217),(4825,'Sangre Grande','SGE',1217),(4826,'San Juan-Laventille','SJL',1217),(4827,'Siparia','SIP',1217),(4828,'Tunapuna-Piarco','TUP',1217),(4829,'Western Tobago','WTO',1217),(4830,'Arima','ARI',1217),(4831,'Chaguanas','CHA',1217),(4832,'Point Fortin','PTF',1217),(4833,'Port of Spain','POS',1217),(4834,'San Fernando','SFO',1217),(4835,'Aileu','AL',1063),(4836,'Ainaro','AN',1063),(4837,'Bacucau','BA',1063),(4838,'Bobonaro','BO',1063),(4839,'Cova Lima','CO',1063),(4840,'Dili','DI',1063),(4841,'Ermera','ER',1063),(4842,'Laulem','LA',1063),(4843,'Liquica','LI',1063),(4844,'Manatuto','MT',1063),(4845,'Manafahi','MF',1063),(4846,'Oecussi','OE',1063),(4847,'Viqueque','VI',1063),(4848,'Changhua County','CHA',1208),(4849,'Chiayi County','CYQ',1208),(4850,'Hsinchu County','HSQ',1208),(4851,'Hualien County','HUA',1208),(4852,'Ilan County','ILA',1208),(4853,'Kaohsiung County','KHQ',1208),(4854,'Miaoli County','MIA',1208),(4855,'Nantou County','NAN',1208),(4856,'Penghu County','PEN',1208),(4857,'Pingtung County','PIF',1208),(4858,'Taichung County','TXQ',1208),(4859,'Tainan County','TNQ',1208),(4860,'Taipei County','TPQ',1208),(4861,'Taitung County','TTT',1208),(4862,'Taoyuan County','TAO',1208),(4863,'Yunlin County','YUN',1208),(4864,'Keelung City','KEE',1208),(4865,'Arusha','01',1210),(4866,'Dar-es-Salaam','02',1210),(4867,'Dodoma','03',1210),(4868,'Iringa','04',1210),(4869,'Kagera','05',1210),(4870,'Kaskazini Pemba','06',1210),(4871,'Kaskazini Unguja','07',1210),(4872,'Xigoma','08',1210),(4873,'Kilimanjaro','09',1210),(4874,'Rusini Pemba','10',1210),(4875,'Kusini Unguja','11',1210),(4876,'Lindi','12',1210),(4877,'Manyara','26',1210),(4878,'Mara','13',1210),(4879,'Mbeya','14',1210),(4880,'Mjini Magharibi','15',1210),(4881,'Morogoro','16',1210),(4882,'Mtwara','17',1210),(4883,'Pwani','19',1210),(4884,'Rukwa','20',1210),(4885,'Ruvuma','21',1210),(4886,'Shinyanga','22',1210),(4887,'Singida','23',1210),(4888,'Tabora','24',1210),(4889,'Tanga','25',1210),(4890,'Cherkas\'ka Oblast\'','71',1224),(4891,'Chernihivs\'ka Oblast\'','74',1224),(4892,'Chernivets\'ka Oblast\'','77',1224),(4893,'Dnipropetrovs\'ka Oblast\'','12',1224),(4894,'Donets\'ka Oblast\'','14',1224),(4895,'Ivano-Frankivs\'ka Oblast\'','26',1224),(4896,'Kharkivs\'ka Oblast\'','63',1224),(4897,'Khersons\'ka Oblast\'','65',1224),(4898,'Khmel\'nyts\'ka Oblast\'','68',1224),(4899,'Kirovohrads\'ka Oblast\'','35',1224),(4900,'Kyivs\'ka Oblast\'','32',1224),(4901,'Luhans\'ka Oblast\'','09',1224),(4902,'L\'vivs\'ka Oblast\'','46',1224),(4903,'Mykolaivs\'ka Oblast\'','48',1224),(4904,'Odes \'ka Oblast\'','51',1224),(4905,'Poltavs\'ka Oblast\'','53',1224),(4906,'Rivnens\'ka Oblast\'','56',1224),(4907,'Sums \'ka Oblast\'','59',1224),(4908,'Ternopil\'s\'ka Oblast\'','61',1224),(4909,'Vinnyts\'ka Oblast\'','05',1224),(4910,'Volyos\'ka Oblast\'','07',1224),(4911,'Zakarpats\'ka Oblast\'','21',1224),(4912,'Zaporiz\'ka Oblast\'','23',1224),(4913,'Zhytomyrs\'ka Oblast\'','18',1224),(4914,'Respublika Krym','43',1224),(4915,'Kyiv','30',1224),(4916,'Sevastopol','40',1224),(4917,'Adjumani','301',1223),(4918,'Apac','302',1223),(4919,'Arua','303',1223),(4920,'Bugiri','201',1223),(4921,'Bundibugyo','401',1223),(4922,'Bushenyi','402',1223),(4923,'Busia','202',1223),(4924,'Gulu','304',1223),(4925,'Hoima','403',1223),(4926,'Iganga','203',1223),(4927,'Jinja','204',1223),(4928,'Kabale','404',1223),(4929,'Kabarole','405',1223),(4930,'Kaberamaido','213',1223),(4931,'Kalangala','101',1223),(4932,'Kampala','102',1223),(4933,'Kamuli','205',1223),(4934,'Kamwenge','413',1223),(4935,'Kanungu','414',1223),(4936,'Kapchorwa','206',1223),(4937,'Kasese','406',1223),(4938,'Katakwi','207',1223),(4939,'Kayunga','112',1223),(4940,'Kibaale','407',1223),(4941,'Kiboga','103',1223),(4942,'Kisoro','408',1223),(4943,'Kitgum','305',1223),(4944,'Kotido','306',1223),(4945,'Kumi','208',1223),(4946,'Kyenjojo','415',1223),(4947,'Lira','307',1223),(4948,'Luwero','104',1223),(4949,'Masaka','105',1223),(4950,'Masindi','409',1223),(4951,'Mayuge','214',1223),(4952,'Mbale','209',1223),(4953,'Mbarara','410',1223),(4954,'Moroto','308',1223),(4955,'Moyo','309',1223),(4956,'Mpigi','106',1223),(4957,'Mubende','107',1223),(4958,'Mukono','108',1223),(4959,'Nakapiripirit','311',1223),(4960,'Nakasongola','109',1223),(4961,'Nebbi','310',1223),(4962,'Ntungamo','411',1223),(4963,'Pader','312',1223),(4964,'Pallisa','210',1223),(4965,'Rakai','110',1223),(4966,'Rukungiri','412',1223),(4967,'Sembabule','111',1223),(4968,'Sironko','215',1223),(4969,'Soroti','211',1223),(4970,'Tororo','212',1223),(4971,'Wakiso','113',1223),(4972,'Yumbe','313',1223),(4973,'Baker Island','81',1227),(4974,'Howland Island','84',1227),(4975,'Jarvis Island','86',1227),(4976,'Johnston Atoll','67',1227),(4977,'Kingman Reef','89',1227),(4978,'Midway Islands','71',1227),(4979,'Navassa Island','76',1227),(4980,'Palmyra Atoll','95',1227),(4981,'Wake Island','79',1227),(4982,'Artigsa','AR',1229),(4983,'Canelones','CA',1229),(4984,'Cerro Largo','CL',1229),(4985,'Colonia','CO',1229),(4986,'Durazno','DU',1229),(4987,'Flores','FS',1229),(4988,'Lavalleja','LA',1229),(4989,'Maldonado','MA',1229),(4990,'Montevideo','MO',1229),(4991,'Paysandu','PA',1229),(4992,'Rivera','RV',1229),(4993,'Rocha','RO',1229),(4994,'Salto','SA',1229),(4995,'Soriano','SO',1229),(4996,'Tacuarembo','TA',1229),(4997,'Treinta y Tres','TT',1229),(4998,'Toshkent (city)','TK',1230),(4999,'Qoraqalpogiston Respublikasi','QR',1230),(5000,'Andijon','AN',1230),(5001,'Buxoro','BU',1230),(5002,'Farg\'ona','FA',1230),(5003,'Jizzax','JI',1230),(5004,'Khorazm','KH',1230),(5005,'Namangan','NG',1230),(5006,'Navoiy','NW',1230),(5007,'Qashqadaryo','QA',1230),(5008,'Samarqand','SA',1230),(5009,'Sirdaryo','SI',1230),(5010,'Surxondaryo','SU',1230),(5011,'Toshkent','TO',1230),(5012,'Xorazm','XO',1230),(5013,'Distrito Federal','A',1232),(5014,'Anzoategui','B',1232),(5015,'Apure','C',1232),(5016,'Aragua','D',1232),(5017,'Barinas','E',1232),(5018,'Carabobo','G',1232),(5019,'Cojedes','H',1232),(5020,'Falcon','I',1232),(5021,'Guarico','J',1232),(5022,'Lara','K',1232),(5023,'Merida','L',1232),(5024,'Miranda','M',1232),(5025,'Monagas','N',1232),(5026,'Nueva Esparta','O',1232),(5027,'Portuguesa','P',1232),(5028,'Tachira','S',1232),(5029,'Trujillo','T',1232),(5030,'Vargas','X',1232),(5031,'Yaracuy','U',1232),(5032,'Zulia','V',1232),(5033,'Delta Amacuro','Y',1232),(5034,'Dependencias Federales','W',1232),(5035,'An Giang','44',1233),(5036,'Ba Ria - Vung Tau','43',1233),(5037,'Bac Can','53',1233),(5038,'Bac Giang','54',1233),(5039,'Bac Lieu','55',1233),(5040,'Bac Ninh','56',1233),(5041,'Ben Tre','50',1233),(5042,'Binh Dinh','31',1233),(5043,'Binh Duong','57',1233),(5044,'Binh Phuoc','58',1233),(5045,'Binh Thuan','40',1233),(5046,'Ca Mau','59',1233),(5047,'Can Tho','48',1233),(5048,'Cao Bang','04',1233),(5049,'Da Nang, thanh pho','60',1233),(5050,'Dong Nai','39',1233),(5051,'Dong Thap','45',1233),(5052,'Gia Lai','30',1233),(5053,'Ha Giang','03',1233),(5054,'Ha Nam','63',1233),(5055,'Ha Noi, thu do','64',1233),(5056,'Ha Tay','15',1233),(5057,'Ha Tinh','23',1233),(5058,'Hai Duong','61',1233),(5059,'Hai Phong, thanh pho','62',1233),(5060,'Hoa Binh','14',1233),(5061,'Ho Chi Minh, thanh pho [Sai Gon]','65',1233),(5062,'Hung Yen','66',1233),(5063,'Khanh Hoa','34',1233),(5064,'Kien Giang','47',1233),(5065,'Kon Tum','28',1233),(5066,'Lai Chau','01',1233),(5067,'Lam Dong','35',1233),(5068,'Lang Son','09',1233),(5069,'Lao Cai','02',1233),(5070,'Long An','41',1233),(5071,'Nam Dinh','67',1233),(5072,'Nghe An','22',1233),(5073,'Ninh Binh','18',1233),(5074,'Ninh Thuan','36',1233),(5075,'Phu Tho','68',1233),(5076,'Phu Yen','32',1233),(5077,'Quang Binh','24',1233),(5078,'Quang Nam','27',1233),(5079,'Quang Ngai','29',1233),(5080,'Quang Ninh','13',1233),(5081,'Quang Tri','25',1233),(5082,'Soc Trang','52',1233),(5083,'Son La','05',1233),(5084,'Tay Ninh','37',1233),(5085,'Thai Binh','20',1233),(5086,'Thai Nguyen','69',1233),(5087,'Thanh Hoa','21',1233),(5088,'Thua Thien-Hue','26',1233),(5089,'Tien Giang','46',1233),(5090,'Tra Vinh','51',1233),(5091,'Tuyen Quang','07',1233),(5092,'Vinh Long','49',1233),(5093,'Vinh Phuc','70',1233),(5094,'Yen Bai','06',1233),(5095,'Malampa','MAP',1231),(5096,'Penama','PAM',1231),(5097,'Sanma','SAM',1231),(5098,'Shefa','SEE',1231),(5099,'Tafea','TAE',1231),(5100,'Torba','TOB',1231),(5101,'A\'ana','AA',1185),(5102,'Aiga-i-le-Tai','AL',1185),(5103,'Atua','AT',1185),(5104,'Fa\'aaaleleaga','FA',1185),(5105,'Gaga\'emauga','GE',1185),(5106,'Gagaifomauga','GI',1185),(5107,'Palauli','PA',1185),(5108,'Satupa\'itea','SA',1185),(5109,'Tuamasaga','TU',1185),(5110,'Va\'a-o-Fonoti','VF',1185),(5111,'Vaisigano','VS',1185),(5112,'Crna Gora','CG',1243),(5113,'Srbija','SR',1242),(5114,'Kosovo-Metohija','KM',1242),(5115,'Vojvodina','VO',1242),(5116,'Abyan','AB',1237),(5117,'Adan','AD',1237),(5118,'Ad Dali','DA',1237),(5119,'Al Bayda\'','BA',1237),(5120,'Al Hudaydah','MU',1237),(5121,'Al Mahrah','MR',1237),(5122,'Al Mahwit','MW',1237),(5123,'Amran','AM',1237),(5124,'Dhamar','DH',1237),(5125,'Hadramawt','HD',1237),(5126,'Hajjah','HJ',1237),(5127,'Ibb','IB',1237),(5128,'Lahij','LA',1237),(5129,'Ma\'rib','MA',1237),(5130,'Sa\'dah','SD',1237),(5131,'San\'a\'','SN',1237),(5132,'Shabwah','SH',1237),(5133,'Ta\'izz','TA',1237),(5134,'Eastern Cape','EC',1196),(5135,'Free State','FS',1196),(5136,'Gauteng','GT',1196),(5137,'Kwazulu-Natal','NL',1196),(5138,'Mpumalanga','MP',1196),(5139,'Northern Cape','NC',1196),(5140,'Limpopo','NP',1196),(5141,'Western Cape','WC',1196),(5142,'Copperbelt','08',1239),(5143,'Luapula','04',1239),(5144,'Lusaka','09',1239),(5145,'North-Western','06',1239),(5146,'Bulawayo','BU',1240),(5147,'Harare','HA',1240),(5148,'Manicaland','MA',1240),(5149,'Mashonaland Central','MC',1240),(5150,'Mashonaland East','ME',1240),(5151,'Mashonaland West','MW',1240),(5152,'Masvingo','MV',1240),(5153,'Matabeleland North','MN',1240),(5154,'Matabeleland South','MS',1240),(5155,'Midlands','MI',1240),(5156,'South Karelia','SK',1075),(5157,'South Ostrobothnia','SO',1075),(5158,'Etelä-Savo','ES',1075),(5159,'Häme','HH',1075),(5160,'Itä-Uusimaa','IU',1075),(5161,'Kainuu','KA',1075),(5162,'Central Ostrobothnia','CO',1075),(5163,'Central Finland','CF',1075),(5164,'Kymenlaakso','KY',1075),(5165,'Lapland','LA',1075),(5166,'Tampere Region','TR',1075),(5167,'Ostrobothnia','OB',1075),(5168,'North Karelia','NK',1075),(5169,'Northern Ostrobothnia','NO',1075),(5170,'Northern Savo','NS',1075),(5171,'Päijät-Häme','PH',1075),(5172,'Satakunta','SK',1075),(5173,'Uusimaa','UM',1075),(5174,'South-West Finland','SW',1075),(5175,'Ã…land','AL',1075),(5176,'Limburg','LI',1152),(5177,'Central and Western','CW',1098),(5178,'Eastern','EA',1098),(5179,'Southern','SO',1098),(5180,'Wan Chai','WC',1098),(5181,'Kowloon City','KC',1098),(5182,'Kwun Tong','KU',1098),(5183,'Sham Shui Po','SS',1098),(5184,'Wong Tai Sin','WT',1098),(5185,'Yau Tsim Mong','YT',1098),(5186,'Islands','IS',1098),(5187,'Kwai Tsing','KI',1098),(5188,'North','NO',1098),(5189,'Sai Kung','SK',1098),(5190,'Sha Tin','ST',1098),(5191,'Tai Po','TP',1098),(5192,'Tsuen Wan','TW',1098),(5193,'Tuen Mun','TM',1098),(5194,'Yuen Long','YL',1098),(5195,'Manchester','MR',1108),(5196,'Al ManÄmah (Al ‘Āşimah)','13',1016),(5197,'Al JanÅ«bÄ«yah','14',1016),(5199,'Al Wusţá','16',1016),(5200,'Ash ShamÄlÄ«yah','17',1016),(5201,'Jenin','_A',1165),(5202,'Tubas','_B',1165),(5203,'Tulkarm','_C',1165),(5204,'Nablus','_D',1165),(5205,'Qalqilya','_E',1165),(5206,'Salfit','_F',1165),(5207,'Ramallah and Al-Bireh','_G',1165),(5208,'Jericho','_H',1165),(5209,'Jerusalem','_I',1165),(5210,'Bethlehem','_J',1165),(5211,'Hebron','_K',1165),(5212,'North Gaza','_L',1165),(5213,'Gaza','_M',1165),(5214,'Deir el-Balah','_N',1165),(5215,'Khan Yunis','_O',1165),(5216,'Rafah','_P',1165),(5217,'Brussels','BRU',1020),(5218,'Distrito Federal','DIF',1140),(5219,'Taichung City','TXG',1208),(5220,'Kaohsiung City','KHH',1208),(5221,'Taipei City','TPE',1208),(5222,'Chiayi City','CYI',1208),(5223,'Hsinchu City','HSZ',1208),(5224,'Tainan City','TNN',1208),(9000,'North West','NW',1196),(9986,'Tyne and Wear','TWR',1226),(9988,'Greater Manchester','GTM',1226),(9989,'Co Tyrone','TYR',1226),(9990,'West Yorkshire','WYK',1226),(9991,'South Yorkshire','SYK',1226),(9992,'Merseyside','MSY',1226),(9993,'Berkshire','BRK',1226),(9994,'West Midlands','WMD',1226),(9998,'West Glamorgan','WGM',1226),(9999,'London','LON',1226),(10000,'Carbonia-Iglesias','CI',1107),(10001,'Olbia-Tempio','OT',1107),(10002,'Medio Campidano','VS',1107),(10003,'Ogliastra','OG',1107),(10009,'Jura','39',1076),(10010,'Barletta-Andria-Trani','Bar',1107),(10011,'Fermo','Fer',1107),(10012,'Monza e Brianza','Mon',1107),(10013,'Clwyd','CWD',1226),(10014,'Dyfed','DFD',1226),(10015,'South Glamorgan','SGM',1226),(10016,'Artibonite','AR',1094),(10017,'Centre','CE',1094),(10018,'Nippes','NI',1094),(10019,'Nord','ND',1094),(10020,'La Rioja','F',1010),(10021,'Andorra la Vella','07',1005),(10022,'Canillo','02',1005),(10023,'Encamp','03',1005),(10024,'Escaldes-Engordany','08',1005),(10025,'La Massana','04',1005),(10026,'Ordino','05',1005),(10027,'Sant Julia de Loria','06',1005),(10028,'Abaco Islands','AB',1212),(10029,'Andros Island','AN',1212),(10030,'Berry Islands','BR',1212),(10031,'Eleuthera','EL',1212),(10032,'Grand Bahama','GB',1212),(10033,'Rum Cay','RC',1212),(10034,'San Salvador Island','SS',1212),(10035,'Kongo central','01',1050),(10036,'Kwango','02',1050),(10037,'Kwilu','03',1050),(10038,'Mai-Ndombe','04',1050),(10039,'Kasai','05',1050),(10040,'Lulua','06',1050),(10041,'Lomami','07',1050),(10042,'Sankuru','08',1050),(10043,'Ituri','09',1050),(10044,'Haut-Uele','10',1050),(10045,'Tshopo','11',1050),(10046,'Bas-Uele','12',1050),(10047,'Nord-Ubangi','13',1050),(10048,'Mongala','14',1050),(10049,'Sud-Ubangi','15',1050),(10050,'Tshuapa','16',1050),(10051,'Haut-Lomami','17',1050),(10052,'Lualaba','18',1050),(10053,'Haut-Katanga','19',1050),(10054,'Tanganyika','20',1050),(10055,'Toledo','TO',1198),(10056,'Córdoba','CO',1198),(10057,'Metropolitan Manila','MNL',1170),(10058,'La Paz','LP',1097),(10059,'Yinchuan','YN',1045),(10060,'Shizuishan','SZ',1045),(10061,'Wuzhong','WZ',1045),(10062,'Guyuan','GY',1045),(10063,'Zhongwei','ZW',1045),(10064,'Luxembourg','L',1126),(10065,'Aizkraukles novads','002',1119),(10066,'Jaunjelgavas novads','038',1119),(10067,'Pļaviņu novads','072',1119),(10068,'Kokneses novads','046',1119),(10069,'Neretas novads','065',1119),(10070,'SkrÄ«veru novads','092',1119),(10071,'AlÅ«ksnes novads','007',1119),(10072,'Apes novads','009',1119),(10073,'Balvu novads','015',1119),(10074,'Viļakas novads','108',1119),(10075,'Baltinavas novads','014',1119),(10076,'RugÄju novads','082',1119),(10077,'Bauskas novads','016',1119),(10078,'Iecavas novads','034',1119),(10079,'RundÄles novads','083',1119),(10080,'Vecumnieku novads','105',1119),(10081,'CÄ“su novads','022',1119),(10082,'LÄ«gatnes novads','055',1119),(10083,'Amatas novads','008',1119),(10084,'Jaunpiebalgas novads','039',1119),(10085,'Priekuļu novads','075',1119),(10086,'PÄrgaujas novads','070',1119),(10087,'Raunas novads','076',1119),(10088,'Vecpiebalgas novads','104',1119),(10089,'Daugavpils novads','025',1119),(10090,'IlÅ«kstes novads','036',1119),(10091,'Dobeles novads','026',1119),(10092,'Auces novads','010',1119),(10093,'TÄ“rvetes novads','098',1119),(10094,'Gulbenes novads','033',1119),(10095,'Jelgavas novads','041',1119),(10096,'Ozolnieku novads','069',1119),(10097,'JÄ“kabpils novads','042',1119),(10098,'AknÄ«stes novads','004',1119),(10099,'ViesÄ«tes novads','107',1119),(10100,'Krustpils novads','049',1119),(10101,'Salas novads','085',1119),(10102,'KrÄslavas novads','047',1119),(10103,'Dagdas novads','024',1119),(10104,'Aglonas novads','001',1119),(10105,'KuldÄ«gas novads','050',1119),(10106,'Skrundas novads','093',1119),(10107,'Alsungas novads','006',1119),(10108,'Aizputes novads','003',1119),(10109,'Durbes novads','028',1119),(10110,'Grobiņas novads','032',1119),(10111,'PÄvilostas novads','071',1119),(10112,'Priekules novads','074',1119),(10113,'NÄ«cas novads','066',1119),(10114,'Rucavas novads','081',1119),(10115,'Vaiņodes novads','100',1119),(10116,'Limbažu novads','054',1119),(10117,'Alojas novads','005',1119),(10118,'SalacgrÄ«vas novads','086',1119),(10119,'Ludzas novads','058',1119),(10120,'KÄrsavas novads','044',1119),(10121,'Zilupes novads','110',1119),(10122,'Ciblas novads','023',1119),(10123,'Madonas novads','059',1119),(10124,'Cesvaines novads','021',1119),(10125,'LubÄnas novads','057',1119),(10126,'VarakļÄnu novads','102',1119),(10127,'Ä’rgļu novads','030',1119),(10128,'Ogres novads','067',1119),(10129,'IkÅ¡Ä·iles novads','035',1119),(10130,'Ķeguma novads','051',1119),(10131,'LielvÄrdes novads','053',1119),(10132,'Preiļu novads','073',1119),(10133,'LÄ«vÄnu novads','056',1119),(10134,'Riebiņu novads','078',1119),(10135,'VÄrkavas novads','103',1119),(10136,'RÄ“zeknes novads','077',1119),(10137,'ViļÄnu novads','109',1119),(10138,'Baldones novads','013',1119),(10139,'Ķekavas novads','052',1119),(10140,'Olaines novads','068',1119),(10141,'Salaspils novads','087',1119),(10142,'Saulkrastu novads','089',1119),(10143,'Siguldas novads','091',1119),(10144,'InÄukalna novads','037',1119),(10145,'Ä€dažu novads','011',1119),(10146,'BabÄ«tes novads','012',1119),(10147,'Carnikavas novads','020',1119),(10148,'Garkalnes novads','031',1119),(10149,'Krimuldas novads','048',1119),(10150,'MÄlpils novads','061',1119),(10151,'MÄrupes novads','062',1119),(10152,'Ropažu novads','080',1119),(10153,'SÄ“jas novads','090',1119),(10154,'Stopiņu novads','095',1119),(10155,'Saldus novads','088',1119),(10156,'BrocÄ“nu novads','018',1119),(10157,'Talsu novads','097',1119),(10158,'Dundagas novads','027',1119),(10159,'MÄ“rsraga novads','063',1119),(10160,'Rojas novads','079',1119),(10161,'Tukuma novads','099',1119),(10162,'Kandavas novads','043',1119),(10163,'Engures novads','029',1119),(10164,'Jaunpils novads','040',1119),(10165,'Valkas novads','101',1119),(10166,'Smiltenes novads','094',1119),(10167,'StrenÄu novads','096',1119),(10168,'KocÄ“nu novads','045',1119),(10169,'Mazsalacas novads','060',1119),(10170,'RÅ«jienas novads','084',1119),(10171,'BeverÄ«nas novads','017',1119),(10172,'Burtnieku novads','019',1119),(10173,'NaukÅ¡Ä“nu novads','064',1119),(10174,'Ventspils novads','106',1119),(10175,'JÄ“kabpils','JKB',1119),(10176,'Valmiera','VMR',1119),(10177,'Florida','FL',1229),(10178,'Rio Negro','RN',1229),(10179,'San Jose','SJ',1229),(10180,'Plateau','PL',1157),(10181,'Pieria','61',1085),(10182,'Los Rios','LR',1044),(10183,'Arica y Parinacota','AP',1044),(10184,'Amazonas','AMA',1169),(10185,'Kalimantan Tengah','KT',1102),(10186,'Sulawesi Barat','SR',1102),(10187,'Kalimantan Utara','KU',1102),(10188,'Ankaran','86',1193),(10189,'ApaÄe','87',1193),(10190,'Cirkulane','88',1193),(10191,'Gorje','89',1193),(10192,'Kostanjevica na Krki','90',1193),(10193,'Log-Dragomer','91',1193),(10194,'Makole','92',1193),(10195,'Mirna','93',1193),(10196,'Mokronog-Trebelno','94',1193),(10197,'Odranci','95',1193),(10198,'Oplotnica','96',1193),(10199,'Ormož','97',1193),(10200,'Osilnica','98',1193),(10201,'Pesnica','99',1193),(10202,'Piran','100',1193),(10203,'Pivka','101',1193),(10204,'PodÄetrtek','102',1193),(10205,'Podlehnik','103',1193),(10206,'Podvelka','104',1193),(10207,'PoljÄane','105',1193),(10208,'Polzela','106',1193),(10209,'Postojna','107',1193),(10210,'Prebold','108',1193),(10211,'Preddvor','109',1193),(10212,'Prevalje','110',1193),(10213,'Ptuj','111',1193),(10214,'Puconci','112',1193),(10215,'RaÄe-Fram','113',1193),(10216,'RadeÄe','114',1193),(10217,'Radenci','115',1193),(10218,'Radlje ob Dravi','139',1193),(10219,'Radovljica','145',1193),(10220,'Ravne na KoroÅ¡kem','171',1193),(10221,'Razkrižje','172',1193),(10222,'ReÄica ob Savinji','173',1193),(10223,'RenÄe-Vogrsko','174',1193),(10224,'Ribnica','175',1193),(10225,'Ribnica na Pohorju','176',1193),(10226,'RogaÅ¡ka Slatina','177',1193),(10227,'RogaÅ¡ovci','178',1193),(10228,'Rogatec','179',1193),(10229,'RuÅ¡e','180',1193),(10230,'Selnica ob Dravi','195',1193),(10231,'SemiÄ','196',1193),(10232,'Å entrupert','197',1193),(10233,'Sevnica','198',1193),(10234,'Sežana','199',1193),(10235,'Slovenj Gradec','200',1193),(10236,'Slovenska Bistrica','201',1193),(10237,'Slovenske Konjice','202',1193),(10238,'Å marjeÅ¡ke Toplice','203',1193),(10239,'Sodražica','204',1193),(10240,'SolÄava','205',1193),(10241,'SrediÅ¡Äe ob Dravi','206',1193),(10242,'StarÅ¡e','207',1193),(10243,'Straža','208',1193),(10244,'Sveta Trojica v Slovenskih goricah','209',1193),(10245,'Sveti Jurij v Slovenskih goricah','210',1193),(10246,'Sveti Tomaž','211',1193),(10247,'Vodice','212',1193),(10248,'Abkhazia','AB',1081),(10249,'Adjara','AJ',1081),(10250,'Tbilisi','TB',1081),(10251,'Guria','GU',1081),(10252,'Imereti','IM',1081),(10253,'Kakheti','KA',1081),(10254,'Kvemo Kartli','KK',1081),(10255,'Mtskheta-Mtianeti','MM',1081),(10256,'Racha-Lechkhumi and Kvemo Svaneti','RL',1081),(10257,'Samegrelo-Zemo Svaneti','SZ',1081),(10258,'Samtskhe-Javakheti','SJ',1081),(10259,'Shida Kartli','SK',1081),(10260,'Central','C',1074),(10261,'Punjab','PB',1163),(10262,'La Libertad','LI',1066),(10263,'La Paz','PA',1066),(10264,'La Union','UN',1066),(10265,'Littoral','LT',1038),(10266,'Nord-Ouest','NW',1038),(10267,'Telangana','TG',1101),(10268,'Ash Sharqiyah','04',1187),(10269,'Guadeloupe','GP',1076),(10270,'Martinique','MQ',1076),(10271,'Guyane','GF',1076),(10272,'La Réunion','RE',1076),(10273,'Mayotte','YT',1076),(10274,'Baringo','01',1112),(10275,'Bomet','02',1112),(10276,'Bungoma','03',1112),(10277,'Busia','04',1112),(10278,'Elgeyo/Marakwet','05',1112),(10279,'Embu','06',1112),(10280,'Garissa','07',1112),(10281,'Homa Bay','08',1112),(10282,'Isiolo','09',1112),(10283,'Kajiado','10',1112),(10284,'Kakamega','11',1112),(10285,'Kericho','12',1112),(10286,'Kiambu','13',1112),(10287,'Kilifi','14',1112),(10288,'Kirinyaga','15',1112),(10289,'Kisii','16',1112),(10290,'Kisumu','17',1112),(10291,'Kitui','18',1112),(10292,'Kwale','19',1112),(10293,'Laikipia','20',1112),(10294,'Lamu','21',1112),(10295,'Machakos','22',1112),(10296,'Makueni','23',1112),(10297,'Mandera','24',1112),(10298,'Marsabit','25',1112),(10299,'Meru','26',1112),(10300,'Migori','27',1112),(10301,'Mombasa','28',1112),(10302,'Murang\'a','29',1112),(10303,'Nairobi City','30',1112),(10304,'Nakuru','31',1112),(10305,'Nandi','32',1112),(10306,'Narok','33',1112),(10307,'Nyamira','34',1112),(10308,'Nyandarua','35',1112),(10309,'Nyeri','36',1112),(10310,'Samburu','37',1112),(10311,'Siaya','38',1112),(10312,'Taita/Taveta','39',1112),(10313,'Tana River','40',1112),(10314,'Tharaka-Nithi','41',1112),(10315,'Trans Nzoia','42',1112),(10316,'Turkana','43',1112),(10317,'Uasin Gishu','44',1112),(10318,'Vihiga','45',1112),(10319,'Wajir','46',1112),(10320,'West Pokot','47',1112),(10321,'Chandigarh','CH',1101),(10322,'Central','CP',1083),(10323,'Eastern','EP',1083),(10324,'Northern','NP',1083),(10325,'Western','WP',1083),(10326,'Saint Kitts','K',1181),(10327,'Nevis','N',1181),(10328,'Eastern','E',1190),(10329,'Northern','N',1190),(10330,'Southern','S',1190),(10331,'Dushanbe','DU',1209),(10332,'Nohiyahoi Tobei JumhurÃ','RA',1209); +INSERT INTO `civicrm_state_province` (`id`, `name`, `abbreviation`, `country_id`) VALUES (1000,'Alabama','AL',1228),(1001,'Alaska','AK',1228),(1002,'Arizona','AZ',1228),(1003,'Arkansas','AR',1228),(1004,'California','CA',1228),(1005,'Colorado','CO',1228),(1006,'Connecticut','CT',1228),(1007,'Delaware','DE',1228),(1008,'Florida','FL',1228),(1009,'Georgia','GA',1228),(1010,'Hawaii','HI',1228),(1011,'Idaho','ID',1228),(1012,'Illinois','IL',1228),(1013,'Indiana','IN',1228),(1014,'Iowa','IA',1228),(1015,'Kansas','KS',1228),(1016,'Kentucky','KY',1228),(1017,'Louisiana','LA',1228),(1018,'Maine','ME',1228),(1019,'Maryland','MD',1228),(1020,'Massachusetts','MA',1228),(1021,'Michigan','MI',1228),(1022,'Minnesota','MN',1228),(1023,'Mississippi','MS',1228),(1024,'Missouri','MO',1228),(1025,'Montana','MT',1228),(1026,'Nebraska','NE',1228),(1027,'Nevada','NV',1228),(1028,'New Hampshire','NH',1228),(1029,'New Jersey','NJ',1228),(1030,'New Mexico','NM',1228),(1031,'New York','NY',1228),(1032,'North Carolina','NC',1228),(1033,'North Dakota','ND',1228),(1034,'Ohio','OH',1228),(1035,'Oklahoma','OK',1228),(1036,'Oregon','OR',1228),(1037,'Pennsylvania','PA',1228),(1038,'Rhode Island','RI',1228),(1039,'South Carolina','SC',1228),(1040,'South Dakota','SD',1228),(1041,'Tennessee','TN',1228),(1042,'Texas','TX',1228),(1043,'Utah','UT',1228),(1044,'Vermont','VT',1228),(1045,'Virginia','VA',1228),(1046,'Washington','WA',1228),(1047,'West Virginia','WV',1228),(1048,'Wisconsin','WI',1228),(1049,'Wyoming','WY',1228),(1050,'District of Columbia','DC',1228),(1052,'American Samoa','AS',1228),(1053,'Guam','GU',1228),(1055,'Northern Mariana Islands','MP',1228),(1056,'Puerto Rico','PR',1228),(1057,'Virgin Islands','VI',1228),(1058,'United States Minor Outlying Islands','UM',1228),(1059,'Armed Forces Europe','AE',1228),(1060,'Armed Forces Americas','AA',1228),(1061,'Armed Forces Pacific','AP',1228),(1100,'Alberta','AB',1039),(1101,'British Columbia','BC',1039),(1102,'Manitoba','MB',1039),(1103,'New Brunswick','NB',1039),(1104,'Newfoundland and Labrador','NL',1039),(1105,'Northwest Territories','NT',1039),(1106,'Nova Scotia','NS',1039),(1107,'Nunavut','NU',1039),(1108,'Ontario','ON',1039),(1109,'Prince Edward Island','PE',1039),(1110,'Quebec','QC',1039),(1111,'Saskatchewan','SK',1039),(1112,'Yukon Territory','YT',1039),(1200,'Maharashtra','MM',1101),(1201,'Karnataka','KA',1101),(1202,'Andhra Pradesh','AP',1101),(1203,'Arunachal Pradesh','AR',1101),(1204,'Assam','AS',1101),(1205,'Bihar','BR',1101),(1206,'Chhattisgarh','CH',1101),(1207,'Goa','GA',1101),(1208,'Gujarat','GJ',1101),(1209,'Haryana','HR',1101),(1210,'Himachal Pradesh','HP',1101),(1211,'Jammu and Kashmir','JK',1101),(1212,'Jharkhand','JH',1101),(1213,'Kerala','KL',1101),(1214,'Madhya Pradesh','MP',1101),(1215,'Manipur','MN',1101),(1216,'Meghalaya','ML',1101),(1217,'Mizoram','MZ',1101),(1218,'Nagaland','NL',1101),(1219,'Orissa','OR',1101),(1220,'Punjab','PB',1101),(1221,'Rajasthan','RJ',1101),(1222,'Sikkim','SK',1101),(1223,'Tamil Nadu','TN',1101),(1224,'Tripura','TR',1101),(1225,'Uttarakhand','UT',1101),(1226,'Uttar Pradesh','UP',1101),(1227,'West Bengal','WB',1101),(1228,'Andaman and Nicobar Islands','AN',1101),(1229,'Dadra and Nagar Haveli','DN',1101),(1230,'Daman and Diu','DD',1101),(1231,'Delhi','DL',1101),(1232,'Lakshadweep','LD',1101),(1233,'Pondicherry','PY',1101),(1300,'mazowieckie','MZ',1172),(1301,'pomorskie','PM',1172),(1302,'dolnoÅ›lÄ…skie','DS',1172),(1303,'kujawsko-pomorskie','KP',1172),(1304,'lubelskie','LU',1172),(1305,'lubuskie','LB',1172),(1306,'łódzkie','LD',1172),(1307,'maÅ‚opolskie','MA',1172),(1308,'opolskie','OP',1172),(1309,'podkarpackie','PK',1172),(1310,'podlaskie','PD',1172),(1311,'Å›lÄ…skie','SL',1172),(1312,'Å›wiÄ™tokrzyskie','SK',1172),(1313,'warmiÅ„sko-mazurskie','WN',1172),(1314,'wielkopolskie','WP',1172),(1315,'zachodniopomorskie','ZP',1172),(1500,'Abu Zaby','AZ',1225),(1501,'\'Ajman','AJ',1225),(1502,'Al Fujayrah','FU',1225),(1503,'Ash Shariqah','SH',1225),(1504,'Dubayy','DU',1225),(1505,'Ra\'s al Khaymah','RK',1225),(1506,'Dac Lac','33',1233),(1507,'Umm al Qaywayn','UQ',1225),(1508,'Badakhshan','BDS',1001),(1509,'Badghis','BDG',1001),(1510,'Baghlan','BGL',1001),(1511,'Balkh','BAL',1001),(1512,'Bamian','BAM',1001),(1513,'Farah','FRA',1001),(1514,'Faryab','FYB',1001),(1515,'Ghazni','GHA',1001),(1516,'Ghowr','GHO',1001),(1517,'Helmand','HEL',1001),(1518,'Herat','HER',1001),(1519,'Jowzjan','JOW',1001),(1520,'Kabul','KAB',1001),(1521,'Kandahar','KAN',1001),(1522,'Kapisa','KAP',1001),(1523,'Khowst','KHO',1001),(1524,'Konar','KNR',1001),(1525,'Kondoz','KDZ',1001),(1526,'Laghman','LAG',1001),(1527,'Lowgar','LOW',1001),(1528,'Nangrahar','NAN',1001),(1529,'Nimruz','NIM',1001),(1530,'Nurestan','NUR',1001),(1531,'Oruzgan','ORU',1001),(1532,'Paktia','PIA',1001),(1533,'Paktika','PKA',1001),(1534,'Parwan','PAR',1001),(1535,'Samangan','SAM',1001),(1536,'Sar-e Pol','SAR',1001),(1537,'Takhar','TAK',1001),(1538,'Wardak','WAR',1001),(1539,'Zabol','ZAB',1001),(1540,'Berat','BR',1002),(1541,'Bulqizë','BU',1002),(1542,'Delvinë','DL',1002),(1543,'Devoll','DV',1002),(1544,'Dibër','DI',1002),(1545,'Durrës','DR',1002),(1546,'Elbasan','EL',1002),(1547,'Fier','FR',1002),(1548,'Gramsh','GR',1002),(1549,'Gjirokastër','GJ',1002),(1550,'Has','HA',1002),(1551,'Kavajë','KA',1002),(1552,'Kolonjë','ER',1002),(1553,'Korçë','KO',1002),(1554,'Krujë','KR',1002),(1555,'Kuçovë','KC',1002),(1556,'Kukës','KU',1002),(1557,'Kurbin','KB',1002),(1558,'Lezhë','LE',1002),(1559,'Librazhd','LB',1002),(1560,'Lushnjë','LU',1002),(1561,'Malësi e Madhe','MM',1002),(1562,'Mallakastër','MK',1002),(1563,'Mat','MT',1002),(1564,'Mirditë','MR',1002),(1565,'Peqin','PQ',1002),(1566,'Përmet','PR',1002),(1567,'Pogradec','PG',1002),(1568,'Pukë','PU',1002),(1569,'Sarandë','SR',1002),(1570,'Skrapar','SK',1002),(1571,'Shkodër','SH',1002),(1572,'Tepelenë','TE',1002),(1573,'Tiranë','TR',1002),(1574,'Tropojë','TP',1002),(1575,'Vlorë','VL',1002),(1576,'Erevan','ER',1011),(1577,'Aragacotn','AG',1011),(1578,'Ararat','AR',1011),(1579,'Armavir','AV',1011),(1580,'Gegarkunik\'','GR',1011),(1581,'Kotayk\'','KT',1011),(1582,'Lory','LO',1011),(1583,'Sirak','SH',1011),(1584,'Syunik\'','SU',1011),(1585,'Tavus','TV',1011),(1586,'Vayoc Jor','VD',1011),(1587,'Bengo','BGO',1006),(1588,'Benguela','BGU',1006),(1589,'Bie','BIE',1006),(1590,'Cabinda','CAB',1006),(1591,'Cuando-Cubango','CCU',1006),(1592,'Cuanza Norte','CNO',1006),(1593,'Cuanza Sul','CUS',1006),(1594,'Cunene','CNN',1006),(1595,'Huambo','HUA',1006),(1596,'Huila','HUI',1006),(1597,'Luanda','LUA',1006),(1598,'Lunda Norte','LNO',1006),(1599,'Lunda Sul','LSU',1006),(1600,'Malange','MAL',1006),(1601,'Moxico','MOX',1006),(1602,'Namibe','NAM',1006),(1603,'Uige','UIG',1006),(1604,'Zaire','ZAI',1006),(1605,'Capital federal','C',1010),(1606,'Buenos Aires','B',1010),(1607,'Catamarca','K',1010),(1608,'Cordoba','X',1010),(1609,'Corrientes','W',1010),(1610,'Chaco','H',1010),(1611,'Chubut','U',1010),(1612,'Entre Rios','E',1010),(1613,'Formosa','P',1010),(1614,'Jujuy','Y',1010),(1615,'La Pampa','L',1010),(1616,'Mendoza','M',1010),(1617,'Misiones','N',1010),(1618,'Neuquen','Q',1010),(1619,'Rio Negro','R',1010),(1620,'Salta','A',1010),(1621,'San Juan','J',1010),(1622,'San Luis','D',1010),(1623,'Santa Cruz','Z',1010),(1624,'Santa Fe','S',1010),(1625,'Santiago del Estero','G',1010),(1626,'Tierra del Fuego','V',1010),(1627,'Tucuman','T',1010),(1628,'Burgenland','1',1014),(1629,'Kärnten','2',1014),(1630,'Niederösterreich','3',1014),(1631,'Oberösterreich','4',1014),(1632,'Salzburg','5',1014),(1633,'Steiermark','6',1014),(1634,'Tirol','7',1014),(1635,'Vorarlberg','8',1014),(1636,'Wien','9',1014),(1637,'Australian Antarctic Territory','AAT',1008),(1638,'Australian Capital Territory','ACT',1013),(1639,'Northern Territory','NT',1013),(1640,'New South Wales','NSW',1013),(1641,'Queensland','QLD',1013),(1642,'South Australia','SA',1013),(1643,'Tasmania','TAS',1013),(1644,'Victoria','VIC',1013),(1645,'Western Australia','WA',1013),(1646,'Naxcivan','NX',1015),(1647,'Ali Bayramli','AB',1015),(1648,'Baki','BA',1015),(1649,'Ganca','GA',1015),(1650,'Lankaran','LA',1015),(1651,'Mingacevir','MI',1015),(1652,'Naftalan','NA',1015),(1653,'Saki','SA',1015),(1654,'Sumqayit','SM',1015),(1655,'Susa','SS',1015),(1656,'Xankandi','XA',1015),(1657,'Yevlax','YE',1015),(1658,'Abseron','ABS',1015),(1659,'Agcabadi','AGC',1015),(1660,'Agdam','AGM',1015),(1661,'Agdas','AGS',1015),(1662,'Agstafa','AGA',1015),(1663,'Agsu','AGU',1015),(1664,'Astara','AST',1015),(1665,'Babak','BAB',1015),(1666,'Balakan','BAL',1015),(1667,'Barda','BAR',1015),(1668,'Beylagan','BEY',1015),(1669,'Bilasuvar','BIL',1015),(1670,'Cabrayll','CAB',1015),(1671,'Calilabad','CAL',1015),(1672,'Culfa','CUL',1015),(1673,'Daskasan','DAS',1015),(1674,'Davaci','DAV',1015),(1675,'Fuzuli','FUZ',1015),(1676,'Gadabay','GAD',1015),(1677,'Goranboy','GOR',1015),(1678,'Goycay','GOY',1015),(1679,'Haciqabul','HAC',1015),(1680,'Imisli','IMI',1015),(1681,'Ismayilli','ISM',1015),(1682,'Kalbacar','KAL',1015),(1683,'Kurdamir','KUR',1015),(1684,'Lacin','LAC',1015),(1685,'Lerik','LER',1015),(1686,'Masalli','MAS',1015),(1687,'Neftcala','NEF',1015),(1688,'Oguz','OGU',1015),(1689,'Ordubad','ORD',1015),(1690,'Qabala','QAB',1015),(1691,'Qax','QAX',1015),(1692,'Qazax','QAZ',1015),(1693,'Qobustan','QOB',1015),(1694,'Quba','QBA',1015),(1695,'Qubadli','QBI',1015),(1696,'Qusar','QUS',1015),(1697,'Saatli','SAT',1015),(1698,'Sabirabad','SAB',1015),(1699,'Sadarak','SAD',1015),(1700,'Sahbuz','SAH',1015),(1701,'Salyan','SAL',1015),(1702,'Samaxi','SMI',1015),(1703,'Samkir','SKR',1015),(1704,'Samux','SMX',1015),(1705,'Sarur','SAR',1015),(1706,'Siyazan','SIY',1015),(1707,'Tartar','TAR',1015),(1708,'Tovuz','TOV',1015),(1709,'Ucar','UCA',1015),(1710,'Xacmaz','XAC',1015),(1711,'Xanlar','XAN',1015),(1712,'Xizi','XIZ',1015),(1713,'Xocali','XCI',1015),(1714,'Xocavand','XVD',1015),(1715,'Yardimli','YAR',1015),(1716,'Zangilan','ZAN',1015),(1717,'Zaqatala','ZAQ',1015),(1718,'Zardab','ZAR',1015),(1719,'Federacija Bosna i Hercegovina','BIH',1026),(1720,'Republika Srpska','SRP',1026),(1721,'Bagerhat zila','05',1017),(1722,'Bandarban zila','01',1017),(1723,'Barguna zila','02',1017),(1724,'Barisal zila','06',1017),(1725,'Bhola zila','07',1017),(1726,'Bogra zila','03',1017),(1727,'Brahmanbaria zila','04',1017),(1728,'Chandpur zila','09',1017),(1729,'Chittagong zila','10',1017),(1730,'Chuadanga zila','12',1017),(1731,'Comilla zila','08',1017),(1732,'Cox\'s Bazar zila','11',1017),(1733,'Dhaka zila','13',1017),(1734,'Dinajpur zila','14',1017),(1735,'Faridpur zila','15',1017),(1736,'Feni zila','16',1017),(1737,'Gaibandha zila','19',1017),(1738,'Gazipur zila','18',1017),(1739,'Gopalganj zila','17',1017),(1740,'Habiganj zila','20',1017),(1741,'Jaipurhat zila','24',1017),(1742,'Jamalpur zila','21',1017),(1743,'Jessore zila','22',1017),(1744,'Jhalakati zila','25',1017),(1745,'Jhenaidah zila','23',1017),(1746,'Khagrachari zila','29',1017),(1747,'Khulna zila','27',1017),(1748,'Kishorganj zila','26',1017),(1749,'Kurigram zila','28',1017),(1750,'Kushtia zila','30',1017),(1751,'Lakshmipur zila','31',1017),(1752,'Lalmonirhat zila','32',1017),(1753,'Madaripur zila','36',1017),(1754,'Magura zila','37',1017),(1755,'Manikganj zila','33',1017),(1756,'Meherpur zila','39',1017),(1757,'Moulvibazar zila','38',1017),(1758,'Munshiganj zila','35',1017),(1759,'Mymensingh zila','34',1017),(1760,'Naogaon zila','48',1017),(1761,'Narail zila','43',1017),(1762,'Narayanganj zila','40',1017),(1763,'Narsingdi zila','42',1017),(1764,'Natore zila','44',1017),(1765,'Nawabganj zila','45',1017),(1766,'Netrakona zila','41',1017),(1767,'Nilphamari zila','46',1017),(1768,'Noakhali zila','47',1017),(1769,'Pabna zila','49',1017),(1770,'Panchagarh zila','52',1017),(1771,'Patuakhali zila','51',1017),(1772,'Pirojpur zila','50',1017),(1773,'Rajbari zila','53',1017),(1774,'Rajshahi zila','54',1017),(1775,'Rangamati zila','56',1017),(1776,'Rangpur zila','55',1017),(1777,'Satkhira zila','58',1017),(1778,'Shariatpur zila','62',1017),(1779,'Sherpur zila','57',1017),(1780,'Sirajganj zila','59',1017),(1781,'Sunamganj zila','61',1017),(1782,'Sylhet zila','60',1017),(1783,'Tangail zila','63',1017),(1784,'Thakurgaon zila','64',1017),(1785,'Antwerpen','VAN',1020),(1786,'Brabant Wallon','WBR',1020),(1787,'Hainaut','WHT',1020),(1788,'Liege','WLG',1020),(1789,'Limburg','VLI',1020),(1790,'Luxembourg','WLX',1020),(1791,'Namur','WNA',1020),(1792,'Oost-Vlaanderen','VOV',1020),(1793,'Vlaams-Brabant','VBR',1020),(1794,'West-Vlaanderen','VWV',1020),(1795,'Bale','BAL',1034),(1796,'Bam','BAM',1034),(1797,'Banwa','BAN',1034),(1798,'Bazega','BAZ',1034),(1799,'Bougouriba','BGR',1034),(1800,'Boulgou','BLG',1034),(1801,'Boulkiemde','BLK',1034),(1802,'Comoe','COM',1034),(1803,'Ganzourgou','GAN',1034),(1804,'Gnagna','GNA',1034),(1805,'Gourma','GOU',1034),(1806,'Houet','HOU',1034),(1807,'Ioba','IOB',1034),(1808,'Kadiogo','KAD',1034),(1809,'Kenedougou','KEN',1034),(1810,'Komondjari','KMD',1034),(1811,'Kompienga','KMP',1034),(1812,'Kossi','KOS',1034),(1813,'Koulpulogo','KOP',1034),(1814,'Kouritenga','KOT',1034),(1815,'Kourweogo','KOW',1034),(1816,'Leraba','LER',1034),(1817,'Loroum','LOR',1034),(1818,'Mouhoun','MOU',1034),(1819,'Nahouri','NAO',1034),(1820,'Namentenga','NAM',1034),(1821,'Nayala','NAY',1034),(1822,'Noumbiel','NOU',1034),(1823,'Oubritenga','OUB',1034),(1824,'Oudalan','OUD',1034),(1825,'Passore','PAS',1034),(1826,'Poni','PON',1034),(1827,'Sanguie','SNG',1034),(1828,'Sanmatenga','SMT',1034),(1829,'Seno','SEN',1034),(1830,'Siasili','SIS',1034),(1831,'Soum','SOM',1034),(1832,'Sourou','SOR',1034),(1833,'Tapoa','TAP',1034),(1834,'Tui','TUI',1034),(1835,'Yagha','YAG',1034),(1836,'Yatenga','YAT',1034),(1837,'Ziro','ZIR',1034),(1838,'Zondoma','ZON',1034),(1839,'Zoundweogo','ZOU',1034),(1840,'Blagoevgrad','01',1033),(1841,'Burgas','02',1033),(1842,'Dobrich','08',1033),(1843,'Gabrovo','07',1033),(1844,'Haskovo','26',1033),(1845,'Yambol','28',1033),(1846,'Kardzhali','09',1033),(1847,'Kyustendil','10',1033),(1848,'Lovech','11',1033),(1849,'Montana','12',1033),(1850,'Pazardzik','13',1033),(1851,'Pernik','14',1033),(1852,'Pleven','15',1033),(1853,'Plovdiv','16',1033),(1854,'Razgrad','17',1033),(1855,'Ruse','18',1033),(1856,'Silistra','19',1033),(1857,'Sliven','20',1033),(1858,'Smolyan','21',1033),(1859,'Sofia','23',1033),(1860,'Stara Zagora','24',1033),(1861,'Shumen','27',1033),(1862,'Targovishte','25',1033),(1863,'Varna','03',1033),(1864,'Veliko Tarnovo','04',1033),(1865,'Vidin','05',1033),(1866,'Vratsa','06',1033),(1867,'Al Hadd','01',1016),(1868,'Al Manamah','03',1016),(1869,'Al Mintaqah al Gharbiyah','10',1016),(1870,'Al Mintagah al Wusta','07',1016),(1871,'Al Mintaqah ash Shamaliyah','05',1016),(1872,'Al Muharraq','02',1016),(1873,'Ar Rifa','09',1016),(1874,'Jidd Hafs','04',1016),(1875,'Madluat Jamad','12',1016),(1876,'Madluat Isa','08',1016),(1877,'Mintaqat Juzur tawar','11',1016),(1878,'Sitrah','06',1016),(1879,'Bubanza','BB',1036),(1880,'Bujumbura','BJ',1036),(1881,'Bururi','BR',1036),(1882,'Cankuzo','CA',1036),(1883,'Cibitoke','CI',1036),(1884,'Gitega','GI',1036),(1885,'Karuzi','KR',1036),(1886,'Kayanza','KY',1036),(1887,'Makamba','MA',1036),(1888,'Muramvya','MU',1036),(1889,'Mwaro','MW',1036),(1890,'Ngozi','NG',1036),(1891,'Rutana','RT',1036),(1892,'Ruyigi','RY',1036),(1893,'Alibori','AL',1022),(1894,'Atakora','AK',1022),(1895,'Atlantique','AQ',1022),(1896,'Borgou','BO',1022),(1897,'Collines','CO',1022),(1898,'Donga','DO',1022),(1899,'Kouffo','KO',1022),(1900,'Littoral','LI',1022),(1901,'Mono','MO',1022),(1902,'Oueme','OU',1022),(1903,'Plateau','PL',1022),(1904,'Zou','ZO',1022),(1905,'Belait','BE',1032),(1906,'Brunei-Muara','BM',1032),(1907,'Temburong','TE',1032),(1908,'Tutong','TU',1032),(1909,'Cochabamba','C',1025),(1910,'Chuquisaca','H',1025),(1911,'El Beni','B',1025),(1912,'La Paz','L',1025),(1913,'Oruro','O',1025),(1914,'Pando','N',1025),(1915,'Potosi','P',1025),(1916,'Tarija','T',1025),(1917,'Acre','AC',1029),(1918,'Alagoas','AL',1029),(1919,'Amazonas','AM',1029),(1920,'Amapa','AP',1029),(1921,'Bahia','BA',1029),(1922,'Ceara','CE',1029),(1923,'Distrito Federal','DF',1029),(1924,'Espirito Santo','ES',1029),(1926,'Goias','GO',1029),(1927,'Maranhao','MA',1029),(1928,'Minas Gerais','MG',1029),(1929,'Mato Grosso do Sul','MS',1029),(1930,'Mato Grosso','MT',1029),(1931,'Para','PA',1029),(1932,'Paraiba','PB',1029),(1933,'Pernambuco','PE',1029),(1934,'Piaui','PI',1029),(1935,'Parana','PR',1029),(1936,'Rio de Janeiro','RJ',1029),(1937,'Rio Grande do Norte','RN',1029),(1938,'Rondonia','RO',1029),(1939,'Roraima','RR',1029),(1940,'Rio Grande do Sul','RS',1029),(1941,'Santa Catarina','SC',1029),(1942,'Sergipe','SE',1029),(1943,'Sao Paulo','SP',1029),(1944,'Tocantins','TO',1029),(1945,'Acklins and Crooked Islands','AC',1212),(1946,'Bimini','BI',1212),(1947,'Cat Island','CI',1212),(1948,'Exuma','EX',1212),(1955,'Inagua','IN',1212),(1957,'Long Island','LI',1212),(1959,'Mayaguana','MG',1212),(1960,'New Providence','NP',1212),(1962,'Ragged Island','RI',1212),(1966,'Bumthang','33',1024),(1967,'Chhukha','12',1024),(1968,'Dagana','22',1024),(1969,'Gasa','GA',1024),(1970,'Ha','13',1024),(1971,'Lhuentse','44',1024),(1972,'Monggar','42',1024),(1973,'Paro','11',1024),(1974,'Pemagatshel','43',1024),(1975,'Punakha','23',1024),(1976,'Samdrup Jongkha','45',1024),(1977,'Samtee','14',1024),(1978,'Sarpang','31',1024),(1979,'Thimphu','15',1024),(1980,'Trashigang','41',1024),(1981,'Trashi Yangtse','TY',1024),(1982,'Trongsa','32',1024),(1983,'Tsirang','21',1024),(1984,'Wangdue Phodrang','24',1024),(1985,'Zhemgang','34',1024),(1986,'Central','CE',1027),(1987,'Ghanzi','GH',1027),(1988,'Kgalagadi','KG',1027),(1989,'Kgatleng','KL',1027),(1990,'Kweneng','KW',1027),(1991,'Ngamiland','NG',1027),(1992,'North-East','NE',1027),(1993,'North-West','NW',1027),(1994,'South-East','SE',1027),(1995,'Southern','SO',1027),(1996,'Brèsckaja voblasc\'','BR',1019),(1997,'Homel\'skaja voblasc\'','HO',1019),(1998,'Hrodzenskaja voblasc\'','HR',1019),(1999,'Mahilëuskaja voblasc\'','MA',1019),(2000,'Minskaja voblasc\'','MI',1019),(2001,'Vicebskaja voblasc\'','VI',1019),(2002,'Belize','BZ',1021),(2003,'Cayo','CY',1021),(2004,'Corozal','CZL',1021),(2005,'Orange Walk','OW',1021),(2006,'Stann Creek','SC',1021),(2007,'Toledo','TOL',1021),(2008,'Kinshasa','KN',1050),(2011,'Equateur','EQ',1050),(2014,'Kasai-Oriental','KE',1050),(2016,'Maniema','MA',1050),(2017,'Nord-Kivu','NK',1050),(2019,'Sud-Kivu','SK',1050),(2020,'Bangui','BGF',1042),(2021,'Bamingui-Bangoran','BB',1042),(2022,'Basse-Kotto','BK',1042),(2023,'Haute-Kotto','HK',1042),(2024,'Haut-Mbomou','HM',1042),(2025,'Kemo','KG',1042),(2026,'Lobaye','LB',1042),(2027,'Mambere-Kadei','HS',1042),(2028,'Mbomou','MB',1042),(2029,'Nana-Grebizi','KB',1042),(2030,'Nana-Mambere','NM',1042),(2031,'Ombella-Mpoko','MP',1042),(2032,'Ouaka','UK',1042),(2033,'Ouham','AC',1042),(2034,'Ouham-Pende','OP',1042),(2035,'Sangha-Mbaere','SE',1042),(2036,'Vakaga','VR',1042),(2037,'Brazzaville','BZV',1051),(2038,'Bouenza','11',1051),(2039,'Cuvette','8',1051),(2040,'Cuvette-Ouest','15',1051),(2041,'Kouilou','5',1051),(2042,'Lekoumou','2',1051),(2043,'Likouala','7',1051),(2044,'Niari','9',1051),(2045,'Plateaux','14',1051),(2046,'Pool','12',1051),(2047,'Sangha','13',1051),(2048,'Aargau','AG',1205),(2049,'Appenzell Innerrhoden','AI',1205),(2050,'Appenzell Ausserrhoden','AR',1205),(2051,'Bern','BE',1205),(2052,'Basel-Landschaft','BL',1205),(2053,'Basel-Stadt','BS',1205),(2054,'Fribourg','FR',1205),(2055,'Geneva','GE',1205),(2056,'Glarus','GL',1205),(2057,'Graubunden','GR',1205),(2058,'Jura','JU',1205),(2059,'Luzern','LU',1205),(2060,'Neuchatel','NE',1205),(2061,'Nidwalden','NW',1205),(2062,'Obwalden','OW',1205),(2063,'Sankt Gallen','SG',1205),(2064,'Schaffhausen','SH',1205),(2065,'Solothurn','SO',1205),(2066,'Schwyz','SZ',1205),(2067,'Thurgau','TG',1205),(2068,'Ticino','TI',1205),(2069,'Uri','UR',1205),(2070,'Vaud','VD',1205),(2071,'Valais','VS',1205),(2072,'Zug','ZG',1205),(2073,'Zurich','ZH',1205),(2074,'18 Montagnes','06',1054),(2075,'Agnebi','16',1054),(2076,'Bas-Sassandra','09',1054),(2077,'Denguele','10',1054),(2078,'Haut-Sassandra','02',1054),(2079,'Lacs','07',1054),(2080,'Lagunes','01',1054),(2081,'Marahoue','12',1054),(2082,'Moyen-Comoe','05',1054),(2083,'Nzi-Comoe','11',1054),(2084,'Savanes','03',1054),(2085,'Sud-Bandama','15',1054),(2086,'Sud-Comoe','13',1054),(2087,'Vallee du Bandama','04',1054),(2088,'Worodouqou','14',1054),(2089,'Zanzan','08',1054),(2090,'Aisen del General Carlos Ibanez del Campo','AI',1044),(2091,'Antofagasta','AN',1044),(2092,'Araucania','AR',1044),(2093,'Atacama','AT',1044),(2094,'Bio-Bio','BI',1044),(2095,'Coquimbo','CO',1044),(2096,'Libertador General Bernardo O\'Higgins','LI',1044),(2097,'Los Lagos','LL',1044),(2098,'Magallanes','MA',1044),(2099,'Maule','ML',1044),(2100,'Santiago Metropolitan','SM',1044),(2101,'Tarapaca','TA',1044),(2102,'Valparaiso','VS',1044),(2103,'Adamaoua','AD',1038),(2104,'Centre','CE',1038),(2105,'East','ES',1038),(2106,'Far North','EN',1038),(2107,'North','NO',1038),(2108,'South','SW',1038),(2109,'South-West','SW',1038),(2110,'West','OU',1038),(2111,'Beijing','11',1045),(2112,'Chongqing','50',1045),(2113,'Shanghai','31',1045),(2114,'Tianjin','12',1045),(2115,'Anhui','34',1045),(2116,'Fujian','35',1045),(2117,'Gansu','62',1045),(2118,'Guangdong','44',1045),(2119,'Guizhou','52',1045),(2120,'Hainan','46',1045),(2121,'Hebei','13',1045),(2122,'Heilongjiang','23',1045),(2123,'Henan','41',1045),(2124,'Hubei','42',1045),(2125,'Hunan','43',1045),(2126,'Jiangsu','32',1045),(2127,'Jiangxi','36',1045),(2128,'Jilin','22',1045),(2129,'Liaoning','21',1045),(2130,'Qinghai','63',1045),(2131,'Shaanxi','61',1045),(2132,'Shandong','37',1045),(2133,'Shanxi','14',1045),(2134,'Sichuan','51',1045),(2135,'Taiwan','71',1045),(2136,'Yunnan','53',1045),(2137,'Zhejiang','33',1045),(2138,'Guangxi','45',1045),(2139,'Neia Mongol (mn)','15',1045),(2140,'Xinjiang','65',1045),(2141,'Xizang','54',1045),(2142,'Hong Kong','91',1045),(2143,'Macau','92',1045),(2144,'Distrito Capital de Bogotá','DC',1048),(2145,'Amazonea','AMA',1048),(2146,'Antioquia','ANT',1048),(2147,'Arauca','ARA',1048),(2148,'Atlántico','ATL',1048),(2149,'BolÃvar','BOL',1048),(2150,'Boyacá','BOY',1048),(2151,'Caldea','CAL',1048),(2152,'Caquetá','CAQ',1048),(2153,'Casanare','CAS',1048),(2154,'Cauca','CAU',1048),(2155,'Cesar','CES',1048),(2156,'Córdoba','COR',1048),(2157,'Cundinamarca','CUN',1048),(2158,'Chocó','CHO',1048),(2159,'GuainÃa','GUA',1048),(2160,'Guaviare','GUV',1048),(2161,'La Guajira','LAG',1048),(2162,'Magdalena','MAG',1048),(2163,'Meta','MET',1048),(2164,'Nariño','NAR',1048),(2165,'Norte de Santander','NSA',1048),(2166,'Putumayo','PUT',1048),(2167,'Quindio','QUI',1048),(2168,'Risaralda','RIS',1048),(2169,'San Andrés, Providencia y Santa Catalina','SAP',1048),(2170,'Santander','SAN',1048),(2171,'Sucre','SUC',1048),(2172,'Tolima','TOL',1048),(2173,'Valle del Cauca','VAC',1048),(2174,'Vaupés','VAU',1048),(2175,'Vichada','VID',1048),(2176,'Alajuela','A',1053),(2177,'Cartago','C',1053),(2178,'Guanacaste','G',1053),(2179,'Heredia','H',1053),(2180,'Limon','L',1053),(2181,'Puntarenas','P',1053),(2182,'San Jose','SJ',1053),(2183,'Camagey','09',1056),(2184,'Ciego de `vila','08',1056),(2185,'Cienfuegos','06',1056),(2186,'Ciudad de La Habana','03',1056),(2187,'Granma','12',1056),(2188,'Guantanamo','14',1056),(2189,'Holquin','11',1056),(2190,'La Habana','02',1056),(2191,'Las Tunas','10',1056),(2192,'Matanzas','04',1056),(2193,'Pinar del Rio','01',1056),(2194,'Sancti Spiritus','07',1056),(2195,'Santiago de Cuba','13',1056),(2196,'Villa Clara','05',1056),(2197,'Isla de la Juventud','99',1056),(2198,'Pinar del Roo','PR',1056),(2199,'Ciego de Avila','CA',1056),(2200,'Camagoey','CG',1056),(2201,'Holgun','HO',1056),(2202,'Sancti Spritus','SS',1056),(2203,'Municipio Especial Isla de la Juventud','IJ',1056),(2204,'Boa Vista','BV',1040),(2205,'Brava','BR',1040),(2206,'Calheta de Sao Miguel','CS',1040),(2207,'Fogo','FO',1040),(2208,'Maio','MA',1040),(2209,'Mosteiros','MO',1040),(2210,'Paul','PA',1040),(2211,'Porto Novo','PN',1040),(2212,'Praia','PR',1040),(2213,'Ribeira Grande','RG',1040),(2214,'Sal','SL',1040),(2215,'Sao Domingos','SD',1040),(2216,'Sao Filipe','SF',1040),(2217,'Sao Nicolau','SN',1040),(2218,'Sao Vicente','SV',1040),(2219,'Tarrafal','TA',1040),(2220,'Ammochostos Magusa','04',1057),(2221,'Keryneia','06',1057),(2222,'Larnaka','03',1057),(2223,'Lefkosia','01',1057),(2224,'Lemesos','02',1057),(2225,'Pafos','05',1057),(2226,'JihoÄeský kraj','JC',1058),(2227,'Jihomoravský kraj','JM',1058),(2228,'Karlovarský kraj','KA',1058),(2229,'Královéhradecký kraj','KR',1058),(2230,'Liberecký kraj','LI',1058),(2231,'Moravskoslezský kraj','MO',1058),(2232,'Olomoucký kraj','OL',1058),(2233,'Pardubický kraj','PA',1058),(2234,'Plzeňský kraj','PL',1058),(2235,'Praha, hlavnà mÄ›sto','PR',1058),(2236,'StÅ™edoÄeský kraj','ST',1058),(2237,'Ústecký kraj','US',1058),(2238,'VysoÄina','VY',1058),(2239,'ZlÃnský kraj','ZL',1058),(2240,'Baden-Wuerttemberg','BW',1082),(2241,'Bayern','BY',1082),(2242,'Bremen','HB',1082),(2243,'Hamburg','HH',1082),(2244,'Hessen','HE',1082),(2245,'Niedersachsen','NI',1082),(2246,'Nordrhein-Westfalen','NW',1082),(2247,'Rheinland-Pfalz','RP',1082),(2248,'Saarland','SL',1082),(2249,'Schleswig-Holstein','SH',1082),(2250,'Berlin','BR',1082),(2251,'Brandenburg','BB',1082),(2252,'Mecklenburg-Vorpommern','MV',1082),(2253,'Sachsen','SN',1082),(2254,'Sachsen-Anhalt','ST',1082),(2255,'Thueringen','TH',1082),(2256,'Ali Sabiah','AS',1060),(2257,'Dikhil','DI',1060),(2258,'Djibouti','DJ',1060),(2259,'Obock','OB',1060),(2260,'Tadjoura','TA',1060),(2261,'Frederiksberg','147',1059),(2262,'Copenhagen City','101',1059),(2263,'Copenhagen','015',1059),(2264,'Frederiksborg','020',1059),(2265,'Roskilde','025',1059),(2266,'Vestsjælland','030',1059),(2267,'Storstrøm','035',1059),(2268,'Bornholm','040',1059),(2269,'Fyn','042',1059),(2270,'South Jutland','050',1059),(2271,'Ribe','055',1059),(2272,'Vejle','060',1059),(2273,'Ringkjøbing','065',1059),(2274,'Ã…rhus','070',1059),(2275,'Viborg','076',1059),(2276,'North Jutland','080',1059),(2277,'Distrito Nacional (Santo Domingo)','01',1062),(2278,'Azua','02',1062),(2279,'Bahoruco','03',1062),(2280,'Barahona','04',1062),(2281,'Dajabón','05',1062),(2282,'Duarte','06',1062),(2283,'El Seybo [El Seibo]','08',1062),(2284,'Espaillat','09',1062),(2285,'Hato Mayor','30',1062),(2286,'Independencia','10',1062),(2287,'La Altagracia','11',1062),(2288,'La Estrelleta [Elias Pina]','07',1062),(2289,'La Romana','12',1062),(2290,'La Vega','13',1062),(2291,'Maroia Trinidad Sánchez','14',1062),(2292,'Monseñor Nouel','28',1062),(2293,'Monte Cristi','15',1062),(2294,'Monte Plata','29',1062),(2295,'Pedernales','16',1062),(2296,'Peravia','17',1062),(2297,'Puerto Plata','18',1062),(2298,'Salcedo','19',1062),(2299,'Samaná','20',1062),(2300,'San Cristóbal','21',1062),(2301,'San Pedro de MacorÃs','23',1062),(2302,'Sánchez RamÃrez','24',1062),(2303,'Santiago','25',1062),(2304,'Santiago RodrÃguez','26',1062),(2305,'Valverde','27',1062),(2306,'Adrar','01',1003),(2307,'Ain Defla','44',1003),(2308,'Ain Tmouchent','46',1003),(2309,'Alger','16',1003),(2310,'Annaba','23',1003),(2311,'Batna','05',1003),(2312,'Bechar','08',1003),(2313,'Bejaia','06',1003),(2314,'Biskra','07',1003),(2315,'Blida','09',1003),(2316,'Bordj Bou Arreridj','34',1003),(2317,'Bouira','10',1003),(2318,'Boumerdes','35',1003),(2319,'Chlef','02',1003),(2320,'Constantine','25',1003),(2321,'Djelfa','17',1003),(2322,'El Bayadh','32',1003),(2323,'El Oued','39',1003),(2324,'El Tarf','36',1003),(2325,'Ghardaia','47',1003),(2326,'Guelma','24',1003),(2327,'Illizi','33',1003),(2328,'Jijel','18',1003),(2329,'Khenchela','40',1003),(2330,'Laghouat','03',1003),(2331,'Mascara','29',1003),(2332,'Medea','26',1003),(2333,'Mila','43',1003),(2334,'Mostaganem','27',1003),(2335,'Msila','28',1003),(2336,'Naama','45',1003),(2337,'Oran','31',1003),(2338,'Ouargla','30',1003),(2339,'Oum el Bouaghi','04',1003),(2340,'Relizane','48',1003),(2341,'Saida','20',1003),(2342,'Setif','19',1003),(2343,'Sidi Bel Abbes','22',1003),(2344,'Skikda','21',1003),(2345,'Souk Ahras','41',1003),(2346,'Tamanghasset','11',1003),(2347,'Tebessa','12',1003),(2348,'Tiaret','14',1003),(2349,'Tindouf','37',1003),(2350,'Tipaza','42',1003),(2351,'Tissemsilt','38',1003),(2352,'Tizi Ouzou','15',1003),(2353,'Tlemcen','13',1003),(2354,'Azuay','A',1064),(2355,'Bolivar','B',1064),(2356,'Canar','F',1064),(2357,'Carchi','C',1064),(2358,'Cotopaxi','X',1064),(2359,'Chimborazo','H',1064),(2360,'El Oro','O',1064),(2361,'Esmeraldas','E',1064),(2362,'Galapagos','W',1064),(2363,'Guayas','G',1064),(2364,'Imbabura','I',1064),(2365,'Loja','L',1064),(2366,'Los Rios','R',1064),(2367,'Manabi','M',1064),(2368,'Morona-Santiago','S',1064),(2369,'Napo','N',1064),(2370,'Orellana','D',1064),(2371,'Pastaza','Y',1064),(2372,'Pichincha','P',1064),(2373,'Sucumbios','U',1064),(2374,'Tungurahua','T',1064),(2375,'Zamora-Chinchipe','Z',1064),(2376,'Harjumaa','37',1069),(2377,'Hiiumaa','39',1069),(2378,'Ida-Virumaa','44',1069),(2379,'Jõgevamaa','49',1069),(2380,'Järvamaa','51',1069),(2381,'Läänemaa','57',1069),(2382,'Lääne-Virumaa','59',1069),(2383,'Põlvamaa','65',1069),(2384,'Pärnumaa','67',1069),(2385,'Raplamaa','70',1069),(2386,'Saaremaa','74',1069),(2387,'Tartumaa','7B',1069),(2388,'Valgamaa','82',1069),(2389,'Viljandimaa','84',1069),(2390,'Võrumaa','86',1069),(2391,'Ad Daqahllyah','DK',1065),(2392,'Al Bahr al Ahmar','BA',1065),(2393,'Al Buhayrah','BH',1065),(2394,'Al Fayym','FYM',1065),(2395,'Al Gharbiyah','GH',1065),(2396,'Al Iskandarlyah','ALX',1065),(2397,'Al Isma illyah','IS',1065),(2398,'Al Jizah','GZ',1065),(2399,'Al Minuflyah','MNF',1065),(2400,'Al Minya','MN',1065),(2401,'Al Qahirah','C',1065),(2402,'Al Qalyublyah','KB',1065),(2403,'Al Wadi al Jadid','WAD',1065),(2404,'Ash Sharqiyah','SHR',1065),(2405,'As Suways','SUZ',1065),(2406,'Aswan','ASN',1065),(2407,'Asyut','AST',1065),(2408,'Bani Suwayf','BNS',1065),(2409,'Bur Sa\'id','PTS',1065),(2410,'Dumyat','DT',1065),(2411,'Janub Sina\'','JS',1065),(2412,'Kafr ash Shaykh','KFS',1065),(2413,'Matruh','MT',1065),(2414,'Qina','KN',1065),(2415,'Shamal Sina\'','SIN',1065),(2416,'Suhaj','SHG',1065),(2417,'Anseba','AN',1068),(2418,'Debub','DU',1068),(2419,'Debubawi Keyih Bahri [Debub-Keih-Bahri]','DK',1068),(2420,'Gash-Barka','GB',1068),(2421,'Maakel [Maekel]','MA',1068),(2422,'Semenawi Keyih Bahri [Semien-Keih-Bahri]','SK',1068),(2423,'Ãlava','VI',1198),(2424,'Albacete','AB',1198),(2425,'Alicante','A',1198),(2426,'AlmerÃa','AL',1198),(2427,'Asturias','O',1198),(2428,'Ãvila','AV',1198),(2429,'Badajoz','BA',1198),(2430,'Baleares','PM',1198),(2431,'Barcelona','B',1198),(2432,'Burgos','BU',1198),(2433,'Cáceres','CC',1198),(2434,'Cádiz','CA',1198),(2435,'Cantabria','S',1198),(2436,'Castellón','CS',1198),(2437,'Ciudad Real','CR',1198),(2438,'Cuenca','CU',1198),(2439,'Girona [Gerona]','GE',1198),(2440,'Granada','GR',1198),(2441,'Guadalajara','GU',1198),(2442,'Guipúzcoa','SS',1198),(2443,'Huelva','H',1198),(2444,'Huesca','HU',1198),(2445,'Jaén','J',1198),(2446,'La Coruña','C',1198),(2447,'La Rioja','LO',1198),(2448,'Las Palmas','GC',1198),(2449,'León','LE',1198),(2450,'Lleida [Lérida]','L',1198),(2451,'Lugo','LU',1198),(2452,'Madrid','M',1198),(2453,'Málaga','MA',1198),(2454,'Murcia','MU',1198),(2455,'Navarra','NA',1198),(2456,'Ourense','OR',1198),(2457,'Palencia','P',1198),(2458,'Pontevedra','PO',1198),(2459,'Salamanca','SA',1198),(2460,'Santa Cruz de Tenerife','TF',1198),(2461,'Segovia','SG',1198),(2462,'Sevilla','SE',1198),(2463,'Soria','SO',1198),(2464,'Tarragona','T',1198),(2465,'Teruel','TE',1198),(2466,'Valencia','V',1198),(2467,'Valladolid','VA',1198),(2468,'Vizcaya','BI',1198),(2469,'Zamora','ZA',1198),(2470,'Zaragoza','Z',1198),(2471,'Ceuta','CE',1198),(2472,'Melilla','ML',1198),(2473,'Addis Ababa','AA',1070),(2474,'Dire Dawa','DD',1070),(2475,'Afar','AF',1070),(2476,'Amara','AM',1070),(2477,'Benshangul-Gumaz','BE',1070),(2478,'Gambela Peoples','GA',1070),(2479,'Harari People','HA',1070),(2480,'Oromia','OR',1070),(2481,'Somali','SO',1070),(2482,'Southern Nations, Nationalities and Peoples','SN',1070),(2483,'Tigrai','TI',1070),(2490,'Eastern','E',1074),(2491,'Northern','N',1074),(2492,'Western','W',1074),(2493,'Rotuma','R',1074),(2494,'Chuuk','TRK',1141),(2495,'Kosrae','KSA',1141),(2496,'Pohnpei','PNI',1141),(2497,'Yap','YAP',1141),(2498,'Ain','01',1076),(2499,'Aisne','02',1076),(2500,'Allier','03',1076),(2501,'Alpes-de-Haute-Provence','04',1076),(2502,'Alpes-Maritimes','06',1076),(2503,'Ardèche','07',1076),(2504,'Ardennes','08',1076),(2505,'Ariège','09',1076),(2506,'Aube','10',1076),(2507,'Aude','11',1076),(2508,'Aveyron','12',1076),(2509,'Bas-Rhin','67',1076),(2510,'Bouches-du-Rhône','13',1076),(2511,'Calvados','14',1076),(2512,'Cantal','15',1076),(2513,'Charente','16',1076),(2514,'Charente-Maritime','17',1076),(2515,'Cher','18',1076),(2516,'Corrèze','19',1076),(2517,'Corse-du-Sud','20A',1076),(2518,'Côte-d\'Or','21',1076),(2519,'Côtes-d\'Armor','22',1076),(2520,'Creuse','23',1076),(2521,'Deux-Sèvres','79',1076),(2522,'Dordogne','24',1076),(2523,'Doubs','25',1076),(2524,'Drôme','26',1076),(2525,'Essonne','91',1076),(2526,'Eure','27',1076),(2527,'Eure-et-Loir','28',1076),(2528,'Finistère','29',1076),(2529,'Gard','30',1076),(2530,'Gers','32',1076),(2531,'Gironde','33',1076),(2532,'Haut-Rhin','68',1076),(2533,'Haute-Corse','20B',1076),(2534,'Haute-Garonne','31',1076),(2535,'Haute-Loire','43',1076),(2536,'Haute-Saône','70',1076),(2537,'Haute-Savoie','74',1076),(2538,'Haute-Vienne','87',1076),(2539,'Hautes-Alpes','05',1076),(2540,'Hautes-Pyrénées','65',1076),(2541,'Hauts-de-Seine','92',1076),(2542,'Hérault','34',1076),(2543,'Indre','36',1076),(2544,'Ille-et-Vilaine','35',1076),(2545,'Indre-et-Loire','37',1076),(2546,'Isère','38',1076),(2547,'Landes','40',1076),(2548,'Loir-et-Cher','41',1076),(2549,'Loire','42',1076),(2550,'Loire-Atlantique','44',1076),(2551,'Loiret','45',1076),(2552,'Lot','46',1076),(2553,'Lot-et-Garonne','47',1076),(2554,'Lozère','48',1076),(2555,'Maine-et-Loire','49',1076),(2556,'Manche','50',1076),(2557,'Marne','51',1076),(2558,'Mayenne','53',1076),(2559,'Meurthe-et-Moselle','54',1076),(2560,'Meuse','55',1076),(2561,'Morbihan','56',1076),(2562,'Moselle','57',1076),(2563,'Nièvre','58',1076),(2564,'Nord','59',1076),(2565,'Oise','60',1076),(2566,'Orne','61',1076),(2567,'Paris','75',1076),(2568,'Pas-de-Calais','62',1076),(2569,'Puy-de-Dôme','63',1076),(2570,'Pyrénées-Atlantiques','64',1076),(2571,'Pyrénées-Orientales','66',1076),(2572,'Rhône','69',1076),(2573,'Saône-et-Loire','71',1076),(2574,'Sarthe','72',1076),(2575,'Savoie','73',1076),(2576,'Seine-et-Marne','77',1076),(2577,'Seine-Maritime','76',1076),(2578,'Seine-Saint-Denis','93',1076),(2579,'Somme','80',1076),(2580,'Tarn','81',1076),(2581,'Tarn-et-Garonne','82',1076),(2582,'Val d\'Oise','95',1076),(2583,'Territoire de Belfort','90',1076),(2584,'Val-de-Marne','94',1076),(2585,'Var','83',1076),(2586,'Vaucluse','84',1076),(2587,'Vendée','85',1076),(2588,'Vienne','86',1076),(2589,'Vosges','88',1076),(2590,'Yonne','89',1076),(2591,'Yvelines','78',1076),(2592,'Aberdeen City','ABE',1226),(2593,'Aberdeenshire','ABD',1226),(2594,'Angus','ANS',1226),(2595,'Co Antrim','ANT',1226),(2597,'Argyll and Bute','AGB',1226),(2598,'Co Armagh','ARM',1226),(2606,'Bedfordshire','BDF',1226),(2612,'Gwent','BGW',1226),(2620,'Bristol, City of','BST',1226),(2622,'Buckinghamshire','BKM',1226),(2626,'Cambridgeshire','CAM',1226),(2634,'Cheshire','CHS',1226),(2635,'Clackmannanshire','CLK',1226),(2639,'Cornwall','CON',1226),(2643,'Cumbria','CMA',1226),(2647,'Derbyshire','DBY',1226),(2648,'Co Londonderry','DRY',1226),(2649,'Devon','DEV',1226),(2651,'Dorset','DOR',1226),(2652,'Co Down','DOW',1226),(2654,'Dumfries and Galloway','DGY',1226),(2655,'Dundee City','DND',1226),(2657,'County Durham','DUR',1226),(2659,'East Ayrshire','EAY',1226),(2660,'East Dunbartonshire','EDU',1226),(2661,'East Lothian','ELN',1226),(2662,'East Renfrewshire','ERW',1226),(2663,'East Riding of Yorkshire','ERY',1226),(2664,'East Sussex','ESX',1226),(2665,'Edinburgh, City of','EDH',1226),(2666,'Na h-Eileanan Siar','ELS',1226),(2668,'Essex','ESS',1226),(2669,'Falkirk','FAL',1226),(2670,'Co Fermanagh','FER',1226),(2671,'Fife','FIF',1226),(2674,'Glasgow City','GLG',1226),(2675,'Gloucestershire','GLS',1226),(2678,'Gwynedd','GWN',1226),(2682,'Hampshire','HAM',1226),(2687,'Herefordshire','HEF',1226),(2688,'Hertfordshire','HRT',1226),(2689,'Highland','HED',1226),(2692,'Inverclyde','IVC',1226),(2694,'Isle of Wight','IOW',1226),(2699,'Kent','KEN',1226),(2705,'Lancashire','LAN',1226),(2709,'Leicestershire','LEC',1226),(2712,'Lincolnshire','LIN',1226),(2723,'Midlothian','MLN',1226),(2726,'Moray','MRY',1226),(2734,'Norfolk','NFK',1226),(2735,'North Ayrshire','NAY',1226),(2738,'North Lanarkshire','NLK',1226),(2742,'North Yorkshire','NYK',1226),(2743,'Northamptonshire','NTH',1226),(2744,'Northumberland','NBL',1226),(2746,'Nottinghamshire','NTT',1226),(2747,'Oldham','OLD',1226),(2748,'Omagh','OMH',1226),(2749,'Orkney Islands','ORR',1226),(2750,'Oxfordshire','OXF',1226),(2752,'Perth and Kinross','PKN',1226),(2757,'Powys','POW',1226),(2761,'Renfrewshire','RFW',1226),(2766,'Rutland','RUT',1226),(2770,'Scottish Borders','SCB',1226),(2773,'Shetland Islands','ZET',1226),(2774,'Shropshire','SHR',1226),(2777,'Somerset','SOM',1226),(2778,'South Ayrshire','SAY',1226),(2779,'South Gloucestershire','SGC',1226),(2780,'South Lanarkshire','SLK',1226),(2785,'Staffordshire','STS',1226),(2786,'Stirling','STG',1226),(2791,'Suffolk','SFK',1226),(2793,'Surrey','SRY',1226),(2804,'Mid Glamorgan','VGL',1226),(2811,'Warwickshire','WAR',1226),(2813,'West Dunbartonshire','WDU',1226),(2814,'West Lothian','WLN',1226),(2815,'West Sussex','WSX',1226),(2818,'Wiltshire','WIL',1226),(2823,'Worcestershire','WOR',1226),(2826,'Ashanti','AH',1083),(2827,'Brong-Ahafo','BA',1083),(2828,'Greater Accra','AA',1083),(2829,'Upper East','UE',1083),(2830,'Upper West','UW',1083),(2831,'Volta','TV',1083),(2832,'Banjul','B',1213),(2833,'Lower River','L',1213),(2834,'MacCarthy Island','M',1213),(2835,'North Bank','N',1213),(2836,'Upper River','U',1213),(2837,'Beyla','BE',1091),(2838,'Boffa','BF',1091),(2839,'Boke','BK',1091),(2840,'Coyah','CO',1091),(2841,'Dabola','DB',1091),(2842,'Dalaba','DL',1091),(2843,'Dinguiraye','DI',1091),(2844,'Dubreka','DU',1091),(2845,'Faranah','FA',1091),(2846,'Forecariah','FO',1091),(2847,'Fria','FR',1091),(2848,'Gaoual','GA',1091),(2849,'Guekedou','GU',1091),(2850,'Kankan','KA',1091),(2851,'Kerouane','KE',1091),(2852,'Kindia','KD',1091),(2853,'Kissidougou','KS',1091),(2854,'Koubia','KB',1091),(2855,'Koundara','KN',1091),(2856,'Kouroussa','KO',1091),(2857,'Labe','LA',1091),(2858,'Lelouma','LE',1091),(2859,'Lola','LO',1091),(2860,'Macenta','MC',1091),(2861,'Mali','ML',1091),(2862,'Mamou','MM',1091),(2863,'Mandiana','MD',1091),(2864,'Nzerekore','NZ',1091),(2865,'Pita','PI',1091),(2866,'Siguiri','SI',1091),(2867,'Telimele','TE',1091),(2868,'Tougue','TO',1091),(2869,'Yomou','YO',1091),(2870,'Region Continental','C',1067),(2871,'Region Insular','I',1067),(2872,'Annobon','AN',1067),(2873,'Bioko Norte','BN',1067),(2874,'Bioko Sur','BS',1067),(2875,'Centro Sur','CS',1067),(2876,'Kie-Ntem','KN',1067),(2877,'Litoral','LI',1067),(2878,'Wele-Nzas','WN',1067),(2879,'Achaïa','13',1085),(2880,'Aitolia-Akarnania','01',1085),(2881,'Argolis','11',1085),(2882,'Arkadia','12',1085),(2883,'Arta','31',1085),(2884,'Attiki','A1',1085),(2885,'Chalkidiki','64',1085),(2886,'Chania','94',1085),(2887,'Chios','85',1085),(2888,'Dodekanisos','81',1085),(2889,'Drama','52',1085),(2890,'Evros','71',1085),(2891,'Evrytania','05',1085),(2892,'Evvoia','04',1085),(2893,'Florina','63',1085),(2894,'Fokis','07',1085),(2895,'Fthiotis','06',1085),(2896,'Grevena','51',1085),(2897,'Ileia','14',1085),(2898,'Imathia','53',1085),(2899,'Ioannina','33',1085),(2900,'Irakleion','91',1085),(2901,'Karditsa','41',1085),(2902,'Kastoria','56',1085),(2903,'Kavalla','55',1085),(2904,'Kefallinia','23',1085),(2905,'Kerkyra','22',1085),(2906,'Kilkis','57',1085),(2907,'Korinthia','15',1085),(2908,'Kozani','58',1085),(2909,'Kyklades','82',1085),(2910,'Lakonia','16',1085),(2911,'Larisa','42',1085),(2912,'Lasithion','92',1085),(2913,'Lefkas','24',1085),(2914,'Lesvos','83',1085),(2915,'Magnisia','43',1085),(2916,'Messinia','17',1085),(2917,'Pella','59',1085),(2918,'Preveza','34',1085),(2919,'Rethymnon','93',1085),(2920,'Rodopi','73',1085),(2921,'Samos','84',1085),(2922,'Serrai','62',1085),(2923,'Thesprotia','32',1085),(2924,'Thessaloniki','54',1085),(2925,'Trikala','44',1085),(2926,'Voiotia','03',1085),(2927,'Xanthi','72',1085),(2928,'Zakynthos','21',1085),(2929,'Agio Oros','69',1085),(2930,'Alta Verapaz','AV',1090),(2931,'Baja Verapaz','BV',1090),(2932,'Chimaltenango','CM',1090),(2933,'Chiquimula','CQ',1090),(2934,'El Progreso','PR',1090),(2935,'Escuintla','ES',1090),(2936,'Guatemala','GU',1090),(2937,'Huehuetenango','HU',1090),(2938,'Izabal','IZ',1090),(2939,'Jalapa','JA',1090),(2940,'Jutiapa','JU',1090),(2941,'Peten','PE',1090),(2942,'Quetzaltenango','QZ',1090),(2943,'Quiche','QC',1090),(2944,'Retalhuleu','RE',1090),(2945,'Sacatepequez','SA',1090),(2946,'San Marcos','SM',1090),(2947,'Santa Rosa','SR',1090),(2948,'Sololá','SO',1090),(2949,'Suchitepequez','SU',1090),(2950,'Totonicapan','TO',1090),(2951,'Zacapa','ZA',1090),(2952,'Bissau','BS',1092),(2953,'Bafata','BA',1092),(2954,'Biombo','BM',1092),(2955,'Bolama','BL',1092),(2956,'Cacheu','CA',1092),(2957,'Gabu','GA',1092),(2958,'Oio','OI',1092),(2959,'Quloara','QU',1092),(2960,'Tombali S','TO',1092),(2961,'Barima-Waini','BA',1093),(2962,'Cuyuni-Mazaruni','CU',1093),(2963,'Demerara-Mahaica','DE',1093),(2964,'East Berbice-Corentyne','EB',1093),(2965,'Essequibo Islands-West Demerara','ES',1093),(2966,'Mahaica-Berbice','MA',1093),(2967,'Pomeroon-Supenaam','PM',1093),(2968,'Potaro-Siparuni','PT',1093),(2969,'Upper Demerara-Berbice','UD',1093),(2970,'Upper Takutu-Upper Essequibo','UT',1093),(2971,'Atlantida','AT',1097),(2972,'Colon','CL',1097),(2973,'Comayagua','CM',1097),(2974,'Copan','CP',1097),(2975,'Cortes','CR',1097),(2976,'Choluteca','CH',1097),(2977,'El Paraiso','EP',1097),(2978,'Francisco Morazan','FM',1097),(2979,'Gracias a Dios','GD',1097),(2980,'Intibuca','IN',1097),(2981,'Islas de la Bahia','IB',1097),(2982,'Lempira','LE',1097),(2983,'Ocotepeque','OC',1097),(2984,'Olancho','OL',1097),(2985,'Santa Barbara','SB',1097),(2986,'Valle','VA',1097),(2987,'Yoro','YO',1097),(2988,'Bjelovarsko-bilogorska zupanija','07',1055),(2989,'Brodsko-posavska zupanija','12',1055),(2990,'Dubrovacko-neretvanska zupanija','19',1055),(2991,'Istarska zupanija','18',1055),(2992,'Karlovacka zupanija','04',1055),(2993,'Koprivnickco-krizevacka zupanija','06',1055),(2994,'Krapinako-zagorska zupanija','02',1055),(2995,'Licko-senjska zupanija','09',1055),(2996,'Medimurska zupanija','20',1055),(2997,'Osjecko-baranjska zupanija','14',1055),(2998,'Pozesko-slavonska zupanija','11',1055),(2999,'Primorsko-goranska zupanija','08',1055),(3000,'Sisacko-moelavacka Iupanija','03',1055),(3001,'Splitako-dalmatinska zupanija','17',1055),(3002,'Sibenako-kninska zupanija','15',1055),(3003,'Varaidinska zupanija','05',1055),(3004,'VirovitiEko-podravska zupanija','10',1055),(3005,'VuRovarako-srijemska zupanija','16',1055),(3006,'Zadaraka','13',1055),(3007,'Zagrebacka zupanija','01',1055),(3008,'Grande-Anse','GA',1094),(3009,'Nord-Est','NE',1094),(3010,'Nord-Ouest','NO',1094),(3011,'Ouest','OU',1094),(3012,'Sud','SD',1094),(3013,'Sud-Est','SE',1094),(3014,'Budapest','BU',1099),(3015,'Bács-Kiskun','BK',1099),(3016,'Baranya','BA',1099),(3017,'Békés','BE',1099),(3018,'Borsod-Abaúj-Zemplén','BZ',1099),(3019,'Csongrád','CS',1099),(3020,'Fejér','FE',1099),(3021,'GyÅ‘r-Moson-Sopron','GS',1099),(3022,'Hajdu-Bihar','HB',1099),(3023,'Heves','HE',1099),(3024,'Jász-Nagykun-Szolnok','JN',1099),(3025,'Komárom-Esztergom','KE',1099),(3026,'Nográd','NO',1099),(3027,'Pest','PE',1099),(3028,'Somogy','SO',1099),(3029,'Szabolcs-Szatmár-Bereg','SZ',1099),(3030,'Tolna','TO',1099),(3031,'Vas','VA',1099),(3032,'Veszprém','VE',1099),(3033,'Zala','ZA',1099),(3034,'Békéscsaba','BC',1099),(3035,'Debrecen','DE',1099),(3036,'Dunaújváros','DU',1099),(3037,'Eger','EG',1099),(3038,'GyÅ‘r','GY',1099),(3039,'HódmezÅ‘vásárhely','HV',1099),(3040,'Kaposvár','KV',1099),(3041,'Kecskemét','KM',1099),(3042,'Miskolc','MI',1099),(3043,'Nagykanizsa','NK',1099),(3044,'Nyiregyháza','NY',1099),(3045,'Pécs','PS',1099),(3046,'Salgótarján','ST',1099),(3047,'Sopron','SN',1099),(3048,'Szeged','SD',1099),(3049,'Székesfehérvár','SF',1099),(3050,'Szekszárd','SS',1099),(3051,'Szolnok','SK',1099),(3052,'Szombathely','SH',1099),(3053,'Tatabánya','TB',1099),(3054,'Zalaegerszeg','ZE',1099),(3055,'Bali','BA',1102),(3056,'Kepulauan Bangka Belitung','BB',1102),(3057,'Banten','BT',1102),(3058,'Bengkulu','BE',1102),(3059,'Gorontalo','GO',1102),(3060,'Papua Barat','PB',1102),(3061,'Jambi','JA',1102),(3062,'Jawa Barat','JB',1102),(3063,'Jawa Tengah','JT',1102),(3064,'Jawa Timur','JI',1102),(3065,'Kalimantan Barat','KB',1102),(3066,'Kalimantan Timur','KI',1102),(3067,'Kalimantan Selatan','KS',1102),(3068,'Kepulauan Riau','KR',1102),(3069,'Lampung','LA',1102),(3070,'Maluku','MA',1102),(3071,'Maluku Utara','MU',1102),(3072,'Nusa Tenggara Barat','NB',1102),(3073,'Nusa Tenggara Timur','NT',1102),(3074,'Papua','PA',1102),(3075,'Riau','RI',1102),(3076,'Sulawesi Selatan','SN',1102),(3077,'Sulawesi Tengah','ST',1102),(3078,'Sulawesi Tenggara','SG',1102),(3079,'Sulawesi Utara','SA',1102),(3080,'Sumatra Barat','SB',1102),(3081,'Sumatra Selatan','SS',1102),(3082,'Sumatera Utara','SU',1102),(3083,'DKI Jakarta','JK',1102),(3084,'Aceh','AC',1102),(3085,'DI Yogyakarta','YO',1102),(3086,'Cork','C',1105),(3087,'Clare','CE',1105),(3088,'Cavan','CN',1105),(3089,'Carlow','CW',1105),(3090,'Dublin','D',1105),(3091,'Donegal','DL',1105),(3092,'Galway','G',1105),(3093,'Kildare','KE',1105),(3094,'Kilkenny','KK',1105),(3095,'Kerry','KY',1105),(3096,'Longford','LD',1105),(3097,'Louth','LH',1105),(3098,'Limerick','LK',1105),(3099,'Leitrim','LM',1105),(3100,'Laois','LS',1105),(3101,'Meath','MH',1105),(3102,'Monaghan','MN',1105),(3103,'Mayo','MO',1105),(3104,'Offaly','OY',1105),(3105,'Roscommon','RN',1105),(3106,'Sligo','SO',1105),(3107,'Tipperary','TA',1105),(3108,'Waterford','WD',1105),(3109,'Westmeath','WH',1105),(3110,'Wicklow','WW',1105),(3111,'Wexford','WX',1105),(3112,'HaDarom','D',1106),(3113,'HaMerkaz','M',1106),(3114,'HaZafon','Z',1106),(3115,'Haifa','HA',1106),(3116,'Tel-Aviv','TA',1106),(3117,'Jerusalem','JM',1106),(3118,'Al Anbar','AN',1104),(3119,'Al Ba,rah','BA',1104),(3120,'Al Muthanna','MU',1104),(3121,'Al Qadisiyah','QA',1104),(3122,'An Najef','NA',1104),(3123,'Arbil','AR',1104),(3124,'As Sulaymaniyah','SW',1104),(3125,'At Ta\'mim','TS',1104),(3126,'Babil','BB',1104),(3127,'Baghdad','BG',1104),(3128,'Dahuk','DA',1104),(3129,'Dhi Qar','DQ',1104),(3130,'Diyala','DI',1104),(3131,'Karbala\'','KA',1104),(3132,'Maysan','MA',1104),(3133,'Ninawa','NI',1104),(3134,'Salah ad Din','SD',1104),(3135,'Wasit','WA',1104),(3136,'Ardabil','03',1103),(3137,'Azarbayjan-e Gharbi','02',1103),(3138,'Azarbayjan-e Sharqi','01',1103),(3139,'Bushehr','06',1103),(3140,'Chahar Mahall va Bakhtiari','08',1103),(3141,'Esfahan','04',1103),(3142,'Fars','14',1103),(3143,'Gilan','19',1103),(3144,'Golestan','27',1103),(3145,'Hamadan','24',1103),(3146,'Hormozgan','23',1103),(3147,'Iiam','05',1103),(3148,'Kerman','15',1103),(3149,'Kermanshah','17',1103),(3150,'Khorasan','09',1103),(3151,'Khuzestan','10',1103),(3152,'Kohjiluyeh va Buyer Ahmad','18',1103),(3153,'Kordestan','16',1103),(3154,'Lorestan','20',1103),(3155,'Markazi','22',1103),(3156,'Mazandaran','21',1103),(3157,'Qazvin','28',1103),(3158,'Qom','26',1103),(3159,'Semnan','12',1103),(3160,'Sistan va Baluchestan','13',1103),(3161,'Tehran','07',1103),(3162,'Yazd','25',1103),(3163,'Zanjan','11',1103),(3164,'Austurland','7',1100),(3165,'Hofuoborgarsvaeoi utan Reykjavikur','1',1100),(3166,'Norourland eystra','6',1100),(3167,'Norourland vestra','5',1100),(3168,'Reykjavik','0',1100),(3169,'Suourland','8',1100),(3170,'Suournes','2',1100),(3171,'Vestfirolr','4',1100),(3172,'Vesturland','3',1100),(3173,'Agrigento','AG',1107),(3174,'Alessandria','AL',1107),(3175,'Ancona','AN',1107),(3176,'Aosta','AO',1107),(3177,'Arezzo','AR',1107),(3178,'Ascoli Piceno','AP',1107),(3179,'Asti','AT',1107),(3180,'Avellino','AV',1107),(3181,'Bari','BA',1107),(3182,'Belluno','BL',1107),(3183,'Benevento','BN',1107),(3184,'Bergamo','BG',1107),(3185,'Biella','BI',1107),(3186,'Bologna','BO',1107),(3187,'Bolzano','BZ',1107),(3188,'Brescia','BS',1107),(3189,'Brindisi','BR',1107),(3190,'Cagliari','CA',1107),(3191,'Caltanissetta','CL',1107),(3192,'Campobasso','CB',1107),(3193,'Caserta','CE',1107),(3194,'Catania','CT',1107),(3195,'Catanzaro','CZ',1107),(3196,'Chieti','CH',1107),(3197,'Como','CO',1107),(3198,'Cosenza','CS',1107),(3199,'Cremona','CR',1107),(3200,'Crotone','KR',1107),(3201,'Cuneo','CN',1107),(3202,'Enna','EN',1107),(3203,'Ferrara','FE',1107),(3204,'Firenze','FI',1107),(3205,'Foggia','FG',1107),(3206,'Forlì-Cesena','FC',1107),(3207,'Frosinone','FR',1107),(3208,'Genova','GE',1107),(3209,'Gorizia','GO',1107),(3210,'Grosseto','GR',1107),(3211,'Imperia','IM',1107),(3212,'Isernia','IS',1107),(3213,'L\'Aquila','AQ',1107),(3214,'La Spezia','SP',1107),(3215,'Latina','LT',1107),(3216,'Lecce','LE',1107),(3217,'Lecco','LC',1107),(3218,'Livorno','LI',1107),(3219,'Lodi','LO',1107),(3220,'Lucca','LU',1107),(3221,'Macerata','MC',1107),(3222,'Mantova','MN',1107),(3223,'Massa-Carrara','MS',1107),(3224,'Matera','MT',1107),(3225,'Messina','ME',1107),(3226,'Milano','MI',1107),(3227,'Modena','MO',1107),(3228,'Napoli','NA',1107),(3229,'Novara','NO',1107),(3230,'Nuoro','NU',1107),(3231,'Oristano','OR',1107),(3232,'Padova','PD',1107),(3233,'Palermo','PA',1107),(3234,'Parma','PR',1107),(3235,'Pavia','PV',1107),(3236,'Perugia','PG',1107),(3237,'Pesaro e Urbino','PU',1107),(3238,'Pescara','PE',1107),(3239,'Piacenza','PC',1107),(3240,'Pisa','PI',1107),(3241,'Pistoia','PT',1107),(3242,'Pordenone','PN',1107),(3243,'Potenza','PZ',1107),(3244,'Prato','PO',1107),(3245,'Ragusa','RG',1107),(3246,'Ravenna','RA',1107),(3247,'Reggio Calabria','RC',1107),(3248,'Reggio Emilia','RE',1107),(3249,'Rieti','RI',1107),(3250,'Rimini','RN',1107),(3251,'Roma','RM',1107),(3252,'Rovigo','RO',1107),(3253,'Salerno','SA',1107),(3254,'Sassari','SS',1107),(3255,'Savona','SV',1107),(3256,'Siena','SI',1107),(3257,'Siracusa','SR',1107),(3258,'Sondrio','SO',1107),(3259,'Taranto','TA',1107),(3260,'Teramo','TE',1107),(3261,'Terni','TR',1107),(3262,'Torino','TO',1107),(3263,'Trapani','TP',1107),(3264,'Trento','TN',1107),(3265,'Treviso','TV',1107),(3266,'Trieste','TS',1107),(3267,'Udine','UD',1107),(3268,'Varese','VA',1107),(3269,'Venezia','VE',1107),(3270,'Verbano-Cusio-Ossola','VB',1107),(3271,'Vercelli','VC',1107),(3272,'Verona','VR',1107),(3273,'Vibo Valentia','VV',1107),(3274,'Vicenza','VI',1107),(3275,'Viterbo','VT',1107),(3276,'Aichi','23',1109),(3277,'Akita','05',1109),(3278,'Aomori','02',1109),(3279,'Chiba','12',1109),(3280,'Ehime','38',1109),(3281,'Fukui','18',1109),(3282,'Fukuoka','40',1109),(3283,'Fukusima','07',1109),(3284,'Gifu','21',1109),(3285,'Gunma','10',1109),(3286,'Hiroshima','34',1109),(3287,'Hokkaido','01',1109),(3288,'Hyogo','28',1109),(3289,'Ibaraki','08',1109),(3290,'Ishikawa','17',1109),(3291,'Iwate','03',1109),(3292,'Kagawa','37',1109),(3293,'Kagoshima','46',1109),(3294,'Kanagawa','14',1109),(3295,'Kochi','39',1109),(3296,'Kumamoto','43',1109),(3297,'Kyoto','26',1109),(3298,'Mie','24',1109),(3299,'Miyagi','04',1109),(3300,'Miyazaki','45',1109),(3301,'Nagano','20',1109),(3302,'Nagasaki','42',1109),(3303,'Nara','29',1109),(3304,'Niigata','15',1109),(3305,'Oita','44',1109),(3306,'Okayama','33',1109),(3307,'Okinawa','47',1109),(3308,'Osaka','27',1109),(3309,'Saga','41',1109),(3310,'Saitama','11',1109),(3311,'Shiga','25',1109),(3312,'Shimane','32',1109),(3313,'Shizuoka','22',1109),(3314,'Tochigi','09',1109),(3315,'Tokushima','36',1109),(3316,'Tokyo','13',1109),(3317,'Tottori','31',1109),(3318,'Toyama','16',1109),(3319,'Wakayama','30',1109),(3320,'Yamagata','06',1109),(3321,'Yamaguchi','35',1109),(3322,'Yamanashi','19',1109),(3323,'Clarendon','CN',1108),(3324,'Hanover','HR',1108),(3325,'Kingston','KN',1108),(3326,'Portland','PD',1108),(3327,'Saint Andrew','AW',1108),(3328,'Saint Ann','AN',1108),(3329,'Saint Catherine','CE',1108),(3330,'Saint Elizabeth','EH',1108),(3331,'Saint James','JS',1108),(3332,'Saint Mary','MY',1108),(3333,'Saint Thomas','TS',1108),(3334,'Trelawny','TY',1108),(3335,'Westmoreland','WD',1108),(3336,'Ajln','AJ',1110),(3337,'Al \'Aqaba','AQ',1110),(3338,'Al Balqa\'','BA',1110),(3339,'Al Karak','KA',1110),(3340,'Al Mafraq','MA',1110),(3341,'Amman','AM',1110),(3342,'At Tafilah','AT',1110),(3343,'Az Zarga','AZ',1110),(3344,'Irbid','JR',1110),(3345,'Jarash','JA',1110),(3346,'Ma\'an','MN',1110),(3347,'Madaba','MD',1110),(3353,'Bishkek','GB',1117),(3354,'Batken','B',1117),(3355,'Chu','C',1117),(3356,'Jalal-Abad','J',1117),(3357,'Naryn','N',1117),(3358,'Osh','O',1117),(3359,'Talas','T',1117),(3360,'Ysyk-Kol','Y',1117),(3361,'Krong Kaeb','23',1037),(3362,'Krong Pailin','24',1037),(3363,'Xrong Preah Sihanouk','18',1037),(3364,'Phnom Penh','12',1037),(3365,'Baat Dambang','2',1037),(3366,'Banteay Mean Chey','1',1037),(3367,'Rampong Chaam','3',1037),(3368,'Kampong Chhnang','4',1037),(3369,'Kampong Spueu','5',1037),(3370,'Kampong Thum','6',1037),(3371,'Kampot','7',1037),(3372,'Kandaal','8',1037),(3373,'Kach Kong','9',1037),(3374,'Krachoh','10',1037),(3375,'Mondol Kiri','11',1037),(3376,'Otdar Mean Chey','22',1037),(3377,'Pousaat','15',1037),(3378,'Preah Vihear','13',1037),(3379,'Prey Veaeng','14',1037),(3380,'Rotanak Kiri','16',1037),(3381,'Siem Reab','17',1037),(3382,'Stueng Traeng','19',1037),(3383,'Svaay Rieng','20',1037),(3384,'Taakaev','21',1037),(3385,'Gilbert Islands','G',1113),(3386,'Line Islands','L',1113),(3387,'Phoenix Islands','P',1113),(3388,'Anjouan Ndzouani','A',1049),(3389,'Grande Comore Ngazidja','G',1049),(3390,'Moheli Moili','M',1049),(3391,'Kaesong-si','KAE',1114),(3392,'Nampo-si','NAM',1114),(3393,'Pyongyang-ai','PYO',1114),(3394,'Chagang-do','CHA',1114),(3395,'Hamgyongbuk-do','HAB',1114),(3396,'Hamgyongnam-do','HAN',1114),(3397,'Hwanghaebuk-do','HWB',1114),(3398,'Hwanghaenam-do','HWN',1114),(3399,'Kangwon-do','KAN',1114),(3400,'Pyonganbuk-do','PYB',1114),(3401,'Pyongannam-do','PYN',1114),(3402,'Yanggang-do','YAN',1114),(3403,'Najin Sonbong-si','NAJ',1114),(3404,'Seoul Teugbyeolsi','11',1115),(3405,'Busan Gwang\'yeogsi','26',1115),(3406,'Daegu Gwang\'yeogsi','27',1115),(3407,'Daejeon Gwang\'yeogsi','30',1115),(3408,'Gwangju Gwang\'yeogsi','29',1115),(3409,'Incheon Gwang\'yeogsi','28',1115),(3410,'Ulsan Gwang\'yeogsi','31',1115),(3411,'Chungcheongbugdo','43',1115),(3412,'Chungcheongnamdo','44',1115),(3413,'Gang\'weondo','42',1115),(3414,'Gyeonggido','41',1115),(3415,'Gyeongsangbugdo','47',1115),(3416,'Gyeongsangnamdo','48',1115),(3417,'Jejudo','49',1115),(3418,'Jeonrabugdo','45',1115),(3419,'Jeonranamdo','46',1115),(3420,'Al Ahmadi','AH',1116),(3421,'Al Farwanlyah','FA',1116),(3422,'Al Jahrah','JA',1116),(3423,'Al Kuwayt','KU',1116),(3424,'Hawalli','HA',1116),(3425,'Almaty','ALA',1111),(3426,'Astana','AST',1111),(3427,'Almaty oblysy','ALM',1111),(3428,'Aqmola oblysy','AKM',1111),(3429,'Aqtobe oblysy','AKT',1111),(3430,'Atyrau oblyfiy','ATY',1111),(3431,'Batys Quzaqstan oblysy','ZAP',1111),(3432,'Mangghystau oblysy','MAN',1111),(3433,'Ongtustik Quzaqstan oblysy','YUZ',1111),(3434,'Pavlodar oblysy','PAV',1111),(3435,'Qaraghandy oblysy','KAR',1111),(3436,'Qostanay oblysy','KUS',1111),(3437,'Qyzylorda oblysy','KZY',1111),(3438,'Shyghys Quzaqstan oblysy','VOS',1111),(3439,'Soltustik Quzaqstan oblysy','SEV',1111),(3440,'Zhambyl oblysy Zhambylskaya oblast\'','ZHA',1111),(3441,'Vientiane','VT',1118),(3442,'Attapu','AT',1118),(3443,'Bokeo','BK',1118),(3444,'Bolikhamxai','BL',1118),(3445,'Champasak','CH',1118),(3446,'Houaphan','HO',1118),(3447,'Khammouan','KH',1118),(3448,'Louang Namtha','LM',1118),(3449,'Louangphabang','LP',1118),(3450,'Oudomxai','OU',1118),(3451,'Phongsali','PH',1118),(3452,'Salavan','SL',1118),(3453,'Savannakhet','SV',1118),(3454,'Xaignabouli','XA',1118),(3455,'Xiasomboun','XN',1118),(3456,'Xekong','XE',1118),(3457,'Xiangkhoang','XI',1118),(3458,'Beirut','BA',1120),(3459,'Beqaa','BI',1120),(3460,'Mount Lebanon','JL',1120),(3461,'North Lebanon','AS',1120),(3462,'South Lebanon','JA',1120),(3463,'Nabatieh','NA',1120),(3464,'Ampara','52',1199),(3465,'Anuradhapura','71',1199),(3466,'Badulla','81',1199),(3467,'Batticaloa','51',1199),(3468,'Colombo','11',1199),(3469,'Galle','31',1199),(3470,'Gampaha','12',1199),(3471,'Hambantota','33',1199),(3472,'Jaffna','41',1199),(3473,'Kalutara','13',1199),(3474,'Kandy','21',1199),(3475,'Kegalla','92',1199),(3476,'Kilinochchi','42',1199),(3477,'Kurunegala','61',1199),(3478,'Mannar','43',1199),(3479,'Matale','22',1199),(3480,'Matara','32',1199),(3481,'Monaragala','82',1199),(3482,'Mullaittivu','45',1199),(3483,'Nuwara Eliya','23',1199),(3484,'Polonnaruwa','72',1199),(3485,'Puttalum','62',1199),(3486,'Ratnapura','91',1199),(3487,'Trincomalee','53',1199),(3488,'VavunLya','44',1199),(3489,'Bomi','BM',1122),(3490,'Bong','BG',1122),(3491,'Grand Basaa','GB',1122),(3492,'Grand Cape Mount','CM',1122),(3493,'Grand Gedeh','GG',1122),(3494,'Grand Kru','GK',1122),(3495,'Lofa','LO',1122),(3496,'Margibi','MG',1122),(3497,'Maryland','MY',1122),(3498,'Montserrado','MO',1122),(3499,'Nimba','NI',1122),(3500,'Rivercess','RI',1122),(3501,'Sinoe','SI',1122),(3502,'Berea','D',1121),(3503,'Butha-Buthe','B',1121),(3504,'Leribe','C',1121),(3505,'Mafeteng','E',1121),(3506,'Maseru','A',1121),(3507,'Mohale\'s Hoek','F',1121),(3508,'Mokhotlong','J',1121),(3509,'Qacha\'s Nek','H',1121),(3510,'Quthing','G',1121),(3511,'Thaba-Tseka','K',1121),(3512,'Alytaus Apskritis','AL',1125),(3513,'Kauno Apskritis','KU',1125),(3514,'KlaipÄ—dos Apskritis','KL',1125),(3515,'MarijampolÄ—s Apskritis','MR',1125),(3516,'Panevėžio Apskritis','PN',1125),(3517,'Å iaulių Apskritis','SA',1125),(3518,'TauragÄ—s Apskritis','TA',1125),(3519,'TelÅ¡ių Apskritis','TE',1125),(3520,'Utenos Apskritis','UT',1125),(3521,'Vilniaus Apskritis','VL',1125),(3522,'Diekirch','D',1126),(3523,'GreveNmacher','G',1126),(3550,'Daugavpils','DGV',1119),(3551,'Jelgava','JEL',1119),(3552,'JÅ«rmala','JUR',1119),(3553,'LiepÄja','LPX',1119),(3554,'RÄ“zekne','REZ',1119),(3555,'RÄ«ga','RIX',1119),(3556,'Ventspils','VEN',1119),(3557,'AjdÄbiyÄ','AJ',1123),(3558,'Al BuÅ£nÄn','BU',1123),(3559,'Al HizÄm al Akhdar','HZ',1123),(3560,'Al Jabal al Akhdar','JA',1123),(3561,'Al JifÄrah','JI',1123),(3562,'Al Jufrah','JU',1123),(3563,'Al Kufrah','KF',1123),(3564,'Al Marj','MJ',1123),(3565,'Al Marqab','MB',1123),(3566,'Al QaÅ£rÅ«n','QT',1123),(3567,'Al Qubbah','QB',1123),(3568,'Al WÄhah','WA',1123),(3569,'An NuqaÅ£ al Khams','NQ',1123),(3570,'Ash ShÄÅ£i\'','SH',1123),(3571,'Az ZÄwiyah','ZA',1123),(3572,'BanghÄzÄ«','BA',1123),(3573,'BanÄ« WalÄ«d','BW',1123),(3574,'Darnah','DR',1123),(3575,'GhadÄmis','GD',1123),(3576,'GharyÄn','GR',1123),(3577,'GhÄt','GT',1123),(3578,'JaghbÅ«b','JB',1123),(3579,'MiÅŸrÄtah','MI',1123),(3580,'Mizdah','MZ',1123),(3581,'Murzuq','MQ',1123),(3582,'NÄlÅ«t','NL',1123),(3583,'SabhÄ','SB',1123),(3584,'ÅžabrÄtah ÅžurmÄn','SS',1123),(3585,'Surt','SR',1123),(3586,'TÄjÅ«rÄ\' wa an NawÄhÄ« al ArbÄh','TN',1123),(3587,'Å¢arÄbulus','TB',1123),(3588,'TarhÅ«nah-MasallÄtah','TM',1123),(3589,'WÄdÄ« al hayÄt','WD',1123),(3590,'Yafran-JÄdÅ«','YJ',1123),(3591,'Agadir','AGD',1146),(3592,'Aït Baha','BAH',1146),(3593,'Aït Melloul','MEL',1146),(3594,'Al Haouz','HAO',1146),(3595,'Al Hoceïma','HOC',1146),(3596,'Assa-Zag','ASZ',1146),(3597,'Azilal','AZI',1146),(3598,'Beni Mellal','BEM',1146),(3599,'Ben Sllmane','BES',1146),(3600,'Berkane','BER',1146),(3601,'Boujdour','BOD',1146),(3602,'Boulemane','BOM',1146),(3603,'Casablanca [Dar el Beïda]','CAS',1146),(3604,'Chefchaouene','CHE',1146),(3605,'Chichaoua','CHI',1146),(3606,'El Hajeb','HAJ',1146),(3607,'El Jadida','JDI',1146),(3608,'Errachidia','ERR',1146),(3609,'Essaouira','ESI',1146),(3610,'Es Smara','ESM',1146),(3611,'Fès','FES',1146),(3612,'Figuig','FIG',1146),(3613,'Guelmim','GUE',1146),(3614,'Ifrane','IFR',1146),(3615,'Jerada','JRA',1146),(3616,'Kelaat Sraghna','KES',1146),(3617,'Kénitra','KEN',1146),(3618,'Khemisaet','KHE',1146),(3619,'Khenifra','KHN',1146),(3620,'Khouribga','KHO',1146),(3621,'Laâyoune (EH)','LAA',1146),(3622,'Larache','LAP',1146),(3623,'Marrakech','MAR',1146),(3624,'Meknsès','MEK',1146),(3625,'Nador','NAD',1146),(3626,'Ouarzazate','OUA',1146),(3627,'Oued ed Dahab (EH)','OUD',1146),(3628,'Oujda','OUJ',1146),(3629,'Rabat-Salé','RBA',1146),(3630,'Safi','SAF',1146),(3631,'Sefrou','SEF',1146),(3632,'Settat','SET',1146),(3633,'Sidl Kacem','SIK',1146),(3634,'Tanger','TNG',1146),(3635,'Tan-Tan','TNT',1146),(3636,'Taounate','TAO',1146),(3637,'Taroudannt','TAR',1146),(3638,'Tata','TAT',1146),(3639,'Taza','TAZ',1146),(3640,'Tétouan','TET',1146),(3641,'Tiznit','TIZ',1146),(3642,'Gagauzia, Unitate Teritoriala Autonoma','GA',1142),(3643,'Chisinau','CU',1142),(3644,'Stinga Nistrului, unitatea teritoriala din','SN',1142),(3645,'Balti','BA',1142),(3646,'Cahul','CA',1142),(3647,'Edinet','ED',1142),(3648,'Lapusna','LA',1142),(3649,'Orhei','OR',1142),(3650,'Soroca','SO',1142),(3651,'Taraclia','TA',1142),(3652,'Tighina [Bender]','TI',1142),(3653,'Ungheni','UN',1142),(3654,'Antananarivo','T',1129),(3655,'Antsiranana','D',1129),(3656,'Fianarantsoa','F',1129),(3657,'Mahajanga','M',1129),(3658,'Toamasina','A',1129),(3659,'Toliara','U',1129),(3660,'Ailinglapalap','ALL',1135),(3661,'Ailuk','ALK',1135),(3662,'Arno','ARN',1135),(3663,'Aur','AUR',1135),(3664,'Ebon','EBO',1135),(3665,'Eniwetok','ENI',1135),(3666,'Jaluit','JAL',1135),(3667,'Kili','KIL',1135),(3668,'Kwajalein','KWA',1135),(3669,'Lae','LAE',1135),(3670,'Lib','LIB',1135),(3671,'Likiep','LIK',1135),(3672,'Majuro','MAJ',1135),(3673,'Maloelap','MAL',1135),(3674,'Mejit','MEJ',1135),(3675,'Mili','MIL',1135),(3676,'Namorik','NMK',1135),(3677,'Namu','NMU',1135),(3678,'Rongelap','RON',1135),(3679,'Ujae','UJA',1135),(3680,'Ujelang','UJL',1135),(3681,'Utirik','UTI',1135),(3682,'Wotho','WTN',1135),(3683,'Wotje','WTJ',1135),(3684,'Bamako','BK0',1133),(3685,'Gao','7',1133),(3686,'Kayes','1',1133),(3687,'Kidal','8',1133),(3688,'Xoulikoro','2',1133),(3689,'Mopti','5',1133),(3690,'S69ou','4',1133),(3691,'Sikasso','3',1133),(3692,'Tombouctou','6',1133),(3693,'Ayeyarwady','07',1035),(3694,'Bago','02',1035),(3695,'Magway','03',1035),(3696,'Mandalay','04',1035),(3697,'Sagaing','01',1035),(3698,'Tanintharyi','05',1035),(3699,'Yangon','06',1035),(3700,'Chin','14',1035),(3701,'Kachin','11',1035),(3702,'Kayah','12',1035),(3703,'Kayin','13',1035),(3704,'Mon','15',1035),(3705,'Rakhine','16',1035),(3706,'Shan','17',1035),(3707,'Ulaanbaatar','1',1144),(3708,'Arhangay','073',1144),(3709,'Bayanhongor','069',1144),(3710,'Bayan-Olgiy','071',1144),(3711,'Bulgan','067',1144),(3712,'Darhan uul','037',1144),(3713,'Dornod','061',1144),(3714,'Dornogov,','063',1144),(3715,'DundgovL','059',1144),(3716,'Dzavhan','057',1144),(3717,'Govi-Altay','065',1144),(3718,'Govi-Smber','064',1144),(3719,'Hentiy','039',1144),(3720,'Hovd','043',1144),(3721,'Hovsgol','041',1144),(3722,'Omnogovi','053',1144),(3723,'Orhon','035',1144),(3724,'Ovorhangay','055',1144),(3725,'Selenge','049',1144),(3726,'Shbaatar','051',1144),(3727,'Tov','047',1144),(3728,'Uvs','046',1144),(3729,'Nouakchott','NKC',1137),(3730,'Assaba','03',1137),(3731,'Brakna','05',1137),(3732,'Dakhlet Nouadhibou','08',1137),(3733,'Gorgol','04',1137),(3734,'Guidimaka','10',1137),(3735,'Hodh ech Chargui','01',1137),(3736,'Hodh el Charbi','02',1137),(3737,'Inchiri','12',1137),(3738,'Tagant','09',1137),(3739,'Tiris Zemmour','11',1137),(3740,'Trarza','06',1137),(3741,'Beau Bassin-Rose Hill','BR',1138),(3742,'Curepipe','CU',1138),(3743,'Port Louis','PU',1138),(3744,'Quatre Bornes','QB',1138),(3745,'Vacosa-Phoenix','VP',1138),(3746,'Black River','BL',1138),(3747,'Flacq','FL',1138),(3748,'Grand Port','GP',1138),(3749,'Moka','MO',1138),(3750,'Pamplemousses','PA',1138),(3751,'Plaines Wilhems','PW',1138),(3752,'Riviere du Rempart','RP',1138),(3753,'Savanne','SA',1138),(3754,'Agalega Islands','AG',1138),(3755,'Cargados Carajos Shoals','CC',1138),(3756,'Rodrigues Island','RO',1138),(3757,'Male','MLE',1132),(3758,'Alif','02',1132),(3759,'Baa','20',1132),(3760,'Dhaalu','17',1132),(3761,'Faafu','14',1132),(3762,'Gaaf Alif','27',1132),(3763,'Gaefu Dhaalu','28',1132),(3764,'Gnaviyani','29',1132),(3765,'Haa Alif','07',1132),(3766,'Haa Dhaalu','23',1132),(3767,'Kaafu','26',1132),(3768,'Laamu','05',1132),(3769,'Lhaviyani','03',1132),(3770,'Meemu','12',1132),(3771,'Noonu','25',1132),(3772,'Raa','13',1132),(3773,'Seenu','01',1132),(3774,'Shaviyani','24',1132),(3775,'Thaa','08',1132),(3776,'Vaavu','04',1132),(3777,'Balaka','BA',1130),(3778,'Blantyre','BL',1130),(3779,'Chikwawa','CK',1130),(3780,'Chiradzulu','CR',1130),(3781,'Chitipa','CT',1130),(3782,'Dedza','DE',1130),(3783,'Dowa','DO',1130),(3784,'Karonga','KR',1130),(3785,'Kasungu','KS',1130),(3786,'Likoma Island','LK',1130),(3787,'Lilongwe','LI',1130),(3788,'Machinga','MH',1130),(3789,'Mangochi','MG',1130),(3790,'Mchinji','MC',1130),(3791,'Mulanje','MU',1130),(3792,'Mwanza','MW',1130),(3793,'Mzimba','MZ',1130),(3794,'Nkhata Bay','NB',1130),(3795,'Nkhotakota','NK',1130),(3796,'Nsanje','NS',1130),(3797,'Ntcheu','NU',1130),(3798,'Ntchisi','NI',1130),(3799,'Phalomba','PH',1130),(3800,'Rumphi','RU',1130),(3801,'Salima','SA',1130),(3802,'Thyolo','TH',1130),(3803,'Zomba','ZO',1130),(3804,'Aguascalientes','AGU',1140),(3805,'Baja California','BCN',1140),(3806,'Baja California Sur','BCS',1140),(3807,'Campeche','CAM',1140),(3808,'Coahuila','COA',1140),(3809,'Colima','COL',1140),(3810,'Chiapas','CHP',1140),(3811,'Chihuahua','CHH',1140),(3812,'Durango','DUR',1140),(3813,'Guanajuato','GUA',1140),(3814,'Guerrero','GRO',1140),(3815,'Hidalgo','HID',1140),(3816,'Jalisco','JAL',1140),(3817,'Mexico','MEX',1140),(3818,'Michoacin','MIC',1140),(3819,'Morelos','MOR',1140),(3820,'Nayarit','NAY',1140),(3821,'Nuevo Leon','NLE',1140),(3822,'Oaxaca','OAX',1140),(3823,'Puebla','PUE',1140),(3824,'Queretaro','QUE',1140),(3825,'Quintana Roo','ROO',1140),(3826,'San Luis Potosi','SLP',1140),(3827,'Sinaloa','SIN',1140),(3828,'Sonora','SON',1140),(3829,'Tabasco','TAB',1140),(3830,'Tamaulipas','TAM',1140),(3831,'Tlaxcala','TLA',1140),(3832,'Veracruz','VER',1140),(3833,'Yucatan','YUC',1140),(3834,'Zacatecas','ZAC',1140),(3835,'Wilayah Persekutuan Kuala Lumpur','14',1131),(3836,'Wilayah Persekutuan Labuan','15',1131),(3837,'Wilayah Persekutuan Putrajaya','16',1131),(3838,'Johor','01',1131),(3839,'Kedah','02',1131),(3840,'Kelantan','03',1131),(3841,'Melaka','04',1131),(3842,'Negeri Sembilan','05',1131),(3843,'Pahang','06',1131),(3844,'Perak','08',1131),(3845,'Perlis','09',1131),(3846,'Pulau Pinang','07',1131),(3847,'Sabah','12',1131),(3848,'Sarawak','13',1131),(3849,'Selangor','10',1131),(3850,'Terengganu','11',1131),(3851,'Maputo','MPM',1147),(3852,'Cabo Delgado','P',1147),(3853,'Gaza','G',1147),(3854,'Inhambane','I',1147),(3855,'Manica','B',1147),(3856,'Numpula','N',1147),(3857,'Niaaea','A',1147),(3858,'Sofala','S',1147),(3859,'Tete','T',1147),(3860,'Zambezia','Q',1147),(3861,'Caprivi','CA',1148),(3862,'Erongo','ER',1148),(3863,'Hardap','HA',1148),(3864,'Karas','KA',1148),(3865,'Khomas','KH',1148),(3866,'Kunene','KU',1148),(3867,'Ohangwena','OW',1148),(3868,'Okavango','OK',1148),(3869,'Omaheke','OH',1148),(3870,'Omusati','OS',1148),(3871,'Oshana','ON',1148),(3872,'Oshikoto','OT',1148),(3873,'Otjozondjupa','OD',1148),(3874,'Niamey','8',1156),(3875,'Agadez','1',1156),(3876,'Diffa','2',1156),(3877,'Dosso','3',1156),(3878,'Maradi','4',1156),(3879,'Tahoua','S',1156),(3880,'Tillaberi','6',1156),(3881,'Zinder','7',1156),(3882,'Abuja Federal Capital Territory','FC',1157),(3883,'Abia','AB',1157),(3884,'Adamawa','AD',1157),(3885,'Akwa Ibom','AK',1157),(3886,'Anambra','AN',1157),(3887,'Bauchi','BA',1157),(3888,'Bayelsa','BY',1157),(3889,'Benue','BE',1157),(3890,'Borno','BO',1157),(3891,'Cross River','CR',1157),(3892,'Delta','DE',1157),(3893,'Ebonyi','EB',1157),(3894,'Edo','ED',1157),(3895,'Ekiti','EK',1157),(3896,'Enugu','EN',1157),(3897,'Gombe','GO',1157),(3898,'Imo','IM',1157),(3899,'Jigawa','JI',1157),(3900,'Kaduna','KD',1157),(3901,'Kano','KN',1157),(3902,'Katsina','KT',1157),(3903,'Kebbi','KE',1157),(3904,'Kogi','KO',1157),(3905,'Kwara','KW',1157),(3906,'Lagos','LA',1157),(3907,'Nassarawa','NA',1157),(3908,'Niger','NI',1157),(3909,'Ogun','OG',1157),(3910,'Ondo','ON',1157),(3911,'Osun','OS',1157),(3912,'Oyo','OY',1157),(3913,'Rivers','RI',1157),(3914,'Sokoto','SO',1157),(3915,'Taraba','TA',1157),(3916,'Yobe','YO',1157),(3917,'Zamfara','ZA',1157),(3918,'Boaco','BO',1155),(3919,'Carazo','CA',1155),(3920,'Chinandega','CI',1155),(3921,'Chontales','CO',1155),(3922,'Esteli','ES',1155),(3923,'Jinotega','JI',1155),(3924,'Leon','LE',1155),(3925,'Madriz','MD',1155),(3926,'Managua','MN',1155),(3927,'Masaya','MS',1155),(3928,'Matagalpa','MT',1155),(3929,'Nueva Segovia','NS',1155),(3930,'Rio San Juan','SJ',1155),(3931,'Rivas','RI',1155),(3932,'Atlantico Norte','AN',1155),(3933,'Atlantico Sur','AS',1155),(3934,'Drente','DR',1152),(3935,'Flevoland','FL',1152),(3936,'Friesland','FR',1152),(3937,'Gelderland','GL',1152),(3938,'Groningen','GR',1152),(3939,'Noord-Brabant','NB',1152),(3940,'Noord-Holland','NH',1152),(3941,'Overijssel','OV',1152),(3942,'Utrecht','UT',1152),(3943,'Zuid-Holland','ZH',1152),(3944,'Zeeland','ZL',1152),(3945,'Akershus','02',1161),(3946,'Aust-Agder','09',1161),(3947,'Buskerud','06',1161),(3948,'Finnmark','20',1161),(3949,'Hedmark','04',1161),(3950,'Hordaland','12',1161),(3951,'Møre og Romsdal','15',1161),(3952,'Nordland','18',1161),(3953,'Nord-Trøndelag','17',1161),(3954,'Oppland','05',1161),(3955,'Oslo','03',1161),(3956,'Rogaland','11',1161),(3957,'Sogn og Fjordane','14',1161),(3958,'Sør-Trøndelag','16',1161),(3959,'Telemark','06',1161),(3960,'Troms','19',1161),(3961,'Vest-Agder','10',1161),(3962,'Vestfold','07',1161),(3963,'Østfold','01',1161),(3964,'Jan Mayen','22',1161),(3965,'Svalbard','21',1161),(3966,'Auckland','AUK',1154),(3967,'Bay of Plenty','BOP',1154),(3968,'Canterbury','CAN',1154),(3969,'Gisborne','GIS',1154),(3970,'Hawkes Bay','HKB',1154),(3971,'Manawatu-Wanganui','MWT',1154),(3972,'Marlborough','MBH',1154),(3973,'Nelson','NSN',1154),(3974,'Northland','NTL',1154),(3975,'Otago','OTA',1154),(3976,'Southland','STL',1154),(3977,'Taranaki','TKI',1154),(3978,'Tasman','TAS',1154),(3979,'Waikato','WKO',1154),(3980,'Wellington','WGN',1154),(3981,'West Coast','WTC',1154),(3982,'Ad Dakhillyah','DA',1162),(3983,'Al Batinah','BA',1162),(3984,'Al Janblyah','JA',1162),(3985,'Al Wusta','WU',1162),(3986,'Ash Sharqlyah','SH',1162),(3987,'Az Zahirah','ZA',1162),(3988,'Masqat','MA',1162),(3989,'Musandam','MU',1162),(3990,'Bocas del Toro','1',1166),(3991,'Cocle','2',1166),(3992,'Chiriqui','4',1166),(3993,'Darien','5',1166),(3994,'Herrera','6',1166),(3995,'Loa Santoa','7',1166),(3996,'Panama','8',1166),(3997,'Veraguas','9',1166),(3998,'Comarca de San Blas','Q',1166),(3999,'El Callao','CAL',1169),(4000,'Ancash','ANC',1169),(4001,'Apurimac','APU',1169),(4002,'Arequipa','ARE',1169),(4003,'Ayacucho','AYA',1169),(4004,'Cajamarca','CAJ',1169),(4005,'Cuzco','CUS',1169),(4006,'Huancavelica','HUV',1169),(4007,'Huanuco','HUC',1169),(4008,'Ica','ICA',1169),(4009,'Junin','JUN',1169),(4010,'La Libertad','LAL',1169),(4011,'Lambayeque','LAM',1169),(4012,'Lima','LIM',1169),(4013,'Loreto','LOR',1169),(4014,'Madre de Dios','MDD',1169),(4015,'Moquegua','MOQ',1169),(4016,'Pasco','PAS',1169),(4017,'Piura','PIU',1169),(4018,'Puno','PUN',1169),(4019,'San Martin','SAM',1169),(4020,'Tacna','TAC',1169),(4021,'Tumbes','TUM',1169),(4022,'Ucayali','UCA',1169),(4023,'National Capital District (Port Moresby)','NCD',1167),(4024,'Chimbu','CPK',1167),(4025,'Eastern Highlands','EHG',1167),(4026,'East New Britain','EBR',1167),(4027,'East Sepik','ESW',1167),(4028,'Enga','EPW',1167),(4029,'Gulf','GPK',1167),(4030,'Madang','MPM',1167),(4031,'Manus','MRL',1167),(4032,'Milne Bay','MBA',1167),(4033,'Morobe','MPL',1167),(4034,'New Ireland','NIK',1167),(4035,'North Solomons','NSA',1167),(4036,'Santaun','SAN',1167),(4037,'Southern Highlands','SHM',1167),(4038,'Western Highlands','WHM',1167),(4039,'West New Britain','WBK',1167),(4040,'Abra','ABR',1170),(4041,'Agusan del Norte','AGN',1170),(4042,'Agusan del Sur','AGS',1170),(4043,'Aklan','AKL',1170),(4044,'Albay','ALB',1170),(4045,'Antique','ANT',1170),(4046,'Apayao','APA',1170),(4047,'Aurora','AUR',1170),(4048,'Basilan','BAS',1170),(4049,'Bataan','BAN',1170),(4050,'Batanes','BTN',1170),(4051,'Batangas','BTG',1170),(4052,'Benguet','BEN',1170),(4053,'Biliran','BIL',1170),(4054,'Bohol','BOH',1170),(4055,'Bukidnon','BUK',1170),(4056,'Bulacan','BUL',1170),(4057,'Cagayan','CAG',1170),(4058,'Camarines Norte','CAN',1170),(4059,'Camarines Sur','CAS',1170),(4060,'Camiguin','CAM',1170),(4061,'Capiz','CAP',1170),(4062,'Catanduanes','CAT',1170),(4063,'Cavite','CAV',1170),(4064,'Cebu','CEB',1170),(4065,'Compostela Valley','COM',1170),(4066,'Davao','DAV',1170),(4067,'Davao del Sur','DAS',1170),(4068,'Davao Oriental','DAO',1170),(4069,'Eastern Samar','EAS',1170),(4070,'Guimaras','GUI',1170),(4071,'Ifugao','IFU',1170),(4072,'Ilocos Norte','ILN',1170),(4073,'Ilocos Sur','ILS',1170),(4074,'Iloilo','ILI',1170),(4075,'Isabela','ISA',1170),(4076,'Kalinga-Apayso','KAL',1170),(4077,'Laguna','LAG',1170),(4078,'Lanao del Norte','LAN',1170),(4079,'Lanao del Sur','LAS',1170),(4080,'La Union','LUN',1170),(4081,'Leyte','LEY',1170),(4082,'Maguindanao','MAG',1170),(4083,'Marinduque','MAD',1170),(4084,'Masbate','MAS',1170),(4085,'Mindoro Occidental','MDC',1170),(4086,'Mindoro Oriental','MDR',1170),(4087,'Misamis Occidental','MSC',1170),(4088,'Misamis Oriental','MSR',1170),(4089,'Mountain Province','MOU',1170),(4090,'Negroe Occidental','NEC',1170),(4091,'Negros Oriental','NER',1170),(4092,'North Cotabato','NCO',1170),(4093,'Northern Samar','NSA',1170),(4094,'Nueva Ecija','NUE',1170),(4095,'Nueva Vizcaya','NUV',1170),(4096,'Palawan','PLW',1170),(4097,'Pampanga','PAM',1170),(4098,'Pangasinan','PAN',1170),(4099,'Quezon','QUE',1170),(4100,'Quirino','QUI',1170),(4101,'Rizal','RIZ',1170),(4102,'Romblon','ROM',1170),(4103,'Sarangani','SAR',1170),(4104,'Siquijor','SIG',1170),(4105,'Sorsogon','SOR',1170),(4106,'South Cotabato','SCO',1170),(4107,'Southern Leyte','SLE',1170),(4108,'Sultan Kudarat','SUK',1170),(4109,'Sulu','SLU',1170),(4110,'Surigao del Norte','SUN',1170),(4111,'Surigao del Sur','SUR',1170),(4112,'Tarlac','TAR',1170),(4113,'Tawi-Tawi','TAW',1170),(4114,'Western Samar','WSA',1170),(4115,'Zambales','ZMB',1170),(4116,'Zamboanga del Norte','ZAN',1170),(4117,'Zamboanga del Sur','ZAS',1170),(4118,'Zamboanga Sibiguey','ZSI',1170),(4119,'Islamabad Federal Capital Area','IS',1163),(4120,'Baluchistan','BA',1163),(4121,'Khyber Pakhtun Khawa','NW',1163),(4122,'Sindh','SD',1163),(4123,'Federally Administered Tribal Areas','TA',1163),(4124,'Azad Kashmir','JK',1163),(4125,'Gilgit-Baltistan','NA',1163),(4126,'Aveiro','01',1173),(4127,'Beja','02',1173),(4128,'Braga','03',1173),(4129,'Braganca','04',1173),(4130,'Castelo Branco','05',1173),(4131,'Colmbra','06',1173),(4132,'Ovora','07',1173),(4133,'Faro','08',1173),(4134,'Guarda','09',1173),(4135,'Leiria','10',1173),(4136,'Lisboa','11',1173),(4137,'Portalegre','12',1173),(4138,'Porto','13',1173),(4139,'Santarem','14',1173),(4140,'Setubal','15',1173),(4141,'Viana do Castelo','16',1173),(4142,'Vila Real','17',1173),(4143,'Viseu','18',1173),(4144,'Regiao Autonoma dos Acores','20',1173),(4145,'Regiao Autonoma da Madeira','30',1173),(4146,'Asuncion','ASU',1168),(4147,'Alto Paraguay','16',1168),(4148,'Alto Parana','10',1168),(4149,'Amambay','13',1168),(4150,'Boqueron','19',1168),(4151,'Caeguazu','5',1168),(4152,'Caazapl','6',1168),(4153,'Canindeyu','14',1168),(4154,'Concepcion','1',1168),(4155,'Cordillera','3',1168),(4156,'Guaira','4',1168),(4157,'Itapua','7',1168),(4158,'Miaiones','8',1168),(4159,'Neembucu','12',1168),(4160,'Paraguari','9',1168),(4161,'Presidente Hayes','15',1168),(4162,'San Pedro','2',1168),(4163,'Ad Dawhah','DA',1175),(4164,'Al Ghuwayriyah','GH',1175),(4165,'Al Jumayliyah','JU',1175),(4166,'Al Khawr','KH',1175),(4167,'Al Wakrah','WA',1175),(4168,'Ar Rayyan','RA',1175),(4169,'Jariyan al Batnah','JB',1175),(4170,'Madinat ash Shamal','MS',1175),(4171,'Umm Salal','US',1175),(4172,'Bucuresti','B',1176),(4173,'Alba','AB',1176),(4174,'Arad','AR',1176),(4175,'Arges','AG',1176),(4176,'Bacau','BC',1176),(4177,'Bihor','BH',1176),(4178,'Bistrita-Nasaud','BN',1176),(4179,'Boto\'ani','BT',1176),(4180,'Bra\'ov','BV',1176),(4181,'Braila','BR',1176),(4182,'Buzau','BZ',1176),(4183,'Caras-Severin','CS',1176),(4184,'Ca la ras\'i','CL',1176),(4185,'Cluj','CJ',1176),(4186,'Constant\'a','CT',1176),(4187,'Covasna','CV',1176),(4188,'Dambovit\'a','DB',1176),(4189,'Dolj','DJ',1176),(4190,'Galat\'i','GL',1176),(4191,'Giurgiu','GR',1176),(4192,'Gorj','GJ',1176),(4193,'Harghita','HR',1176),(4194,'Hunedoara','HD',1176),(4195,'Ialomit\'a','IL',1176),(4196,'Ias\'i','IS',1176),(4197,'Ilfov','IF',1176),(4198,'Maramures','MM',1176),(4199,'Mehedint\'i','MH',1176),(4200,'Mures','MS',1176),(4201,'Neamt','NT',1176),(4202,'Olt','OT',1176),(4203,'Prahova','PH',1176),(4204,'Satu Mare','SM',1176),(4205,'Sa laj','SJ',1176),(4206,'Sibiu','SB',1176),(4207,'Suceava','SV',1176),(4208,'Teleorman','TR',1176),(4209,'Timis','TM',1176),(4210,'Tulcea','TL',1176),(4211,'Vaslui','VS',1176),(4212,'Valcea','VL',1176),(4213,'Vrancea','VN',1176),(4214,'Adygeya, Respublika','AD',1177),(4215,'Altay, Respublika','AL',1177),(4216,'Bashkortostan, Respublika','BA',1177),(4217,'Buryatiya, Respublika','BU',1177),(4218,'Chechenskaya Respublika','CE',1177),(4219,'Chuvashskaya Respublika','CU',1177),(4220,'Dagestan, Respublika','DA',1177),(4221,'Ingushskaya Respublika','IN',1177),(4222,'Kabardino-Balkarskaya','KB',1177),(4223,'Kalmykiya, Respublika','KL',1177),(4224,'Karachayevo-Cherkesskaya Respublika','KC',1177),(4225,'Kareliya, Respublika','KR',1177),(4226,'Khakasiya, Respublika','KK',1177),(4227,'Komi, Respublika','KO',1177),(4228,'Mariy El, Respublika','ME',1177),(4229,'Mordoviya, Respublika','MO',1177),(4230,'Sakha, Respublika [Yakutiya]','SA',1177),(4231,'Severnaya Osetiya, Respublika','SE',1177),(4232,'Tatarstan, Respublika','TA',1177),(4233,'Tyva, Respublika [Tuva]','TY',1177),(4234,'Udmurtskaya Respublika','UD',1177),(4235,'Altayskiy kray','ALT',1177),(4236,'Khabarovskiy kray','KHA',1177),(4237,'Krasnodarskiy kray','KDA',1177),(4238,'Krasnoyarskiy kray','KYA',1177),(4239,'Primorskiy kray','PRI',1177),(4240,'Stavropol\'skiy kray','STA',1177),(4241,'Amurskaya oblast\'','AMU',1177),(4242,'Arkhangel\'skaya oblast\'','ARK',1177),(4243,'Astrakhanskaya oblast\'','AST',1177),(4244,'Belgorodskaya oblast\'','BEL',1177),(4245,'Bryanskaya oblast\'','BRY',1177),(4246,'Chelyabinskaya oblast\'','CHE',1177),(4247,'Zabaykalsky Krai\'','ZSK',1177),(4248,'Irkutskaya oblast\'','IRK',1177),(4249,'Ivanovskaya oblast\'','IVA',1177),(4250,'Kaliningradskaya oblast\'','KGD',1177),(4251,'Kaluzhskaya oblast\'','KLU',1177),(4252,'Kamchatka Krai\'','KAM',1177),(4253,'Kemerovskaya oblast\'','KEM',1177),(4254,'Kirovskaya oblast\'','KIR',1177),(4255,'Kostromskaya oblast\'','KOS',1177),(4256,'Kurganskaya oblast\'','KGN',1177),(4257,'Kurskaya oblast\'','KRS',1177),(4258,'Leningradskaya oblast\'','LEN',1177),(4259,'Lipetskaya oblast\'','LIP',1177),(4260,'Magadanskaya oblast\'','MAG',1177),(4261,'Moskovskaya oblast\'','MOS',1177),(4262,'Murmanskaya oblast\'','MUR',1177),(4263,'Nizhegorodskaya oblast\'','NIZ',1177),(4264,'Novgorodskaya oblast\'','NGR',1177),(4265,'Novosibirskaya oblast\'','NVS',1177),(4266,'Omskaya oblast\'','OMS',1177),(4267,'Orenburgskaya oblast\'','ORE',1177),(4268,'Orlovskaya oblast\'','ORL',1177),(4269,'Penzenskaya oblast\'','PNZ',1177),(4270,'Perm krai\'','PEK',1177),(4271,'Pskovskaya oblast\'','PSK',1177),(4272,'Rostovskaya oblast\'','ROS',1177),(4273,'Ryazanskaya oblast\'','RYA',1177),(4274,'Sakhalinskaya oblast\'','SAK',1177),(4275,'Samarskaya oblast\'','SAM',1177),(4276,'Saratovskaya oblast\'','SAR',1177),(4277,'Smolenskaya oblast\'','SMO',1177),(4278,'Sverdlovskaya oblast\'','SVE',1177),(4279,'Tambovskaya oblast\'','TAM',1177),(4280,'Tomskaya oblast\'','TOM',1177),(4281,'Tul\'skaya oblast\'','TUL',1177),(4282,'Tverskaya oblast\'','TVE',1177),(4283,'Tyumenskaya oblast\'','TYU',1177),(4284,'Ul\'yanovskaya oblast\'','ULY',1177),(4285,'Vladimirskaya oblast\'','VLA',1177),(4286,'Volgogradskaya oblast\'','VGG',1177),(4287,'Vologodskaya oblast\'','VLG',1177),(4288,'Voronezhskaya oblast\'','VOR',1177),(4289,'Yaroslavskaya oblast\'','YAR',1177),(4290,'Moskva','MOW',1177),(4291,'Sankt-Peterburg','SPE',1177),(4292,'Yevreyskaya avtonomnaya oblast\'','YEV',1177),(4294,'Chukotskiy avtonomnyy okrug','CHU',1177),(4296,'Khanty-Mansiyskiy avtonomnyy okrug','KHM',1177),(4299,'Nenetskiy avtonomnyy okrug','NEN',1177),(4302,'Yamalo-Nenetskiy avtonomnyy okrug','YAN',1177),(4303,'Butare','C',1178),(4304,'Byumba','I',1178),(4305,'Cyangugu','E',1178),(4306,'Gikongoro','D',1178),(4307,'Gisenyi','G',1178),(4308,'Gitarama','B',1178),(4309,'Kibungo','J',1178),(4310,'Kibuye','F',1178),(4311,'Kigali-Rural Kigali y\' Icyaro','K',1178),(4312,'Kigali-Ville Kigali Ngari','L',1178),(4313,'Mutara','M',1178),(4314,'Ruhengeri','H',1178),(4315,'Al Bahah','11',1187),(4316,'Al Hudud Ash Shamaliyah','08',1187),(4317,'Al Jawf','12',1187),(4318,'Al Madinah','03',1187),(4319,'Al Qasim','05',1187),(4320,'Ar Riyad','01',1187),(4321,'Asir','14',1187),(4322,'Ha\'il','06',1187),(4323,'Jlzan','09',1187),(4324,'Makkah','02',1187),(4325,'Najran','10',1187),(4326,'Tabuk','07',1187),(4327,'Capital Territory (Honiara)','CT',1194),(4328,'Guadalcanal','GU',1194),(4329,'Isabel','IS',1194),(4330,'Makira','MK',1194),(4331,'Malaita','ML',1194),(4332,'Temotu','TE',1194),(4333,'A\'ali an Nil','23',1200),(4334,'Al Bah al Ahmar','26',1200),(4335,'Al Buhayrat','18',1200),(4336,'Al Jazirah','07',1200),(4337,'Al Khartum','03',1200),(4338,'Al Qadarif','06',1200),(4339,'Al Wahdah','22',1200),(4340,'An Nil','04',1200),(4341,'An Nil al Abyaq','08',1200),(4342,'An Nil al Azraq','24',1200),(4343,'Ash Shamallyah','01',1200),(4344,'Bahr al Jabal','17',1200),(4345,'Gharb al Istiwa\'iyah','16',1200),(4346,'Gharb Ba~r al Ghazal','14',1200),(4347,'Gharb Darfur','12',1200),(4348,'Gharb Kurdufan','10',1200),(4349,'Janub Darfur','11',1200),(4350,'Janub Rurdufan','13',1200),(4351,'Jnqall','20',1200),(4352,'Kassala','05',1200),(4353,'Shamal Batr al Ghazal','15',1200),(4354,'Shamal Darfur','02',1200),(4355,'Shamal Kurdufan','09',1200),(4356,'Sharq al Istiwa\'iyah','19',1200),(4357,'Sinnar','25',1200),(4358,'Warab','21',1200),(4359,'Blekinge län','K',1204),(4360,'Dalarnas län','W',1204),(4361,'Gotlands län','I',1204),(4362,'Gävleborgs län','X',1204),(4363,'Hallands län','N',1204),(4364,'Jämtlands län','Z',1204),(4365,'Jönkopings län','F',1204),(4366,'Kalmar län','H',1204),(4367,'Kronobergs län','G',1204),(4368,'Norrbottens län','BD',1204),(4369,'SkÃ¥ne län','M',1204),(4370,'Stockholms län','AB',1204),(4371,'Södermanlands län','D',1204),(4372,'Uppsala län','C',1204),(4373,'Värmlands län','S',1204),(4374,'Västerbottens län','AC',1204),(4375,'Västernorrlands län','Y',1204),(4376,'Västmanlands län','U',1204),(4377,'Västra Götalands län','Q',1204),(4378,'Örebro län','T',1204),(4379,'Östergötlands län','E',1204),(4380,'Saint Helena','SH',1180),(4381,'Ascension','AC',1180),(4382,'Tristan da Cunha','TA',1180),(4383,'AjdovÅ¡Äina','001',1193),(4384,'Beltinci','002',1193),(4385,'Benedikt','148',1193),(4386,'Bistrica ob Sotli','149',1193),(4387,'Bled','003',1193),(4388,'Bloke','150',1193),(4389,'Bohinj','004',1193),(4390,'Borovnica','005',1193),(4391,'Bovec','006',1193),(4392,'BraslovÄe','151',1193),(4393,'Brda','007',1193),(4394,'Brezovica','008',1193),(4395,'Brežice','009',1193),(4396,'Cankova','152',1193),(4397,'Celje','011',1193),(4398,'Cerklje na Gorenjskem','012',1193),(4399,'Cerknica','013',1193),(4400,'Cerkno','014',1193),(4401,'Cerkvenjak','153',1193),(4402,'ÄŒrenÅ¡ovci','015',1193),(4403,'ÄŒrna na KoroÅ¡kem','016',1193),(4404,'ÄŒrnomelj','017',1193),(4405,'Destrnik','018',1193),(4406,'DivaÄa','019',1193),(4407,'Dobje','154',1193),(4408,'Dobrepolje','020',1193),(4409,'Dobrna','155',1193),(4410,'Dobrova-Polhov Gradec','021',1193),(4411,'Dobrovnik','156',1193),(4412,'Dol pri Ljubljani','022',1193),(4413,'Dolenjske Toplice','157',1193),(4414,'Domžale','023',1193),(4415,'Dornava','024',1193),(4416,'Dravograd','025',1193),(4417,'Duplek','026',1193),(4418,'Gorenja vas-Poljane','027',1193),(4419,'GoriÅ¡nica','028',1193),(4420,'Gornja Radgona','029',1193),(4421,'Gornji Grad','030',1193),(4422,'Gornji Petrovci','031',1193),(4423,'Grad','158',1193),(4424,'Grosuplje','032',1193),(4425,'Hajdina','159',1193),(4426,'HoÄe-Slivnica','160',1193),(4427,'HodoÅ¡','161',1193),(4428,'Horjul','162',1193),(4429,'Hrastnik','034',1193),(4430,'Hrpelje-Kozina','035',1193),(4431,'Idrija','036',1193),(4432,'Ig','037',1193),(4433,'Ilirska Bistrica','038',1193),(4434,'IvanÄna Gorica','039',1193),(4435,'Izola','040',1193),(4436,'Jesenice','041',1193),(4437,'Jezersko','163',1193),(4438,'JurÅ¡inci','042',1193),(4439,'Kamnik','043',1193),(4440,'Kanal','044',1193),(4441,'KidriÄevo','045',1193),(4442,'Kobarid','046',1193),(4443,'Kobilje','047',1193),(4444,'KoÄevje','048',1193),(4445,'Komen','049',1193),(4446,'Komenda','164',1193),(4447,'Koper','050',1193),(4448,'Kostel','165',1193),(4449,'Kozje','051',1193),(4450,'Kranj','052',1193),(4451,'Kranjska Gora','053',1193),(4452,'Križevci','166',1193),(4453,'KrÅ¡ko','054',1193),(4454,'Kungota','055',1193),(4455,'Kuzma','056',1193),(4456,'LaÅ¡ko','057',1193),(4457,'Lenart','058',1193),(4458,'Lendava','059',1193),(4459,'Litija','060',1193),(4460,'Ljubljana','061',1193),(4461,'Ljubno','062',1193),(4462,'Ljutomer','063',1193),(4463,'Logatec','064',1193),(4464,'LoÅ¡ka dolina','065',1193),(4465,'LoÅ¡ki Potok','066',1193),(4466,'Lovrenc na Pohorju','167',1193),(4467,'LuÄe','067',1193),(4468,'Lukovica','068',1193),(4469,'MajÅ¡perk','069',1193),(4470,'Maribor','070',1193),(4471,'Markovci','168',1193),(4472,'Medvode','071',1193),(4473,'MengeÅ¡','072',1193),(4474,'Metlika','073',1193),(4475,'Mežica','074',1193),(4476,'Miklavž na Dravskem polju','169',1193),(4477,'Miren-Kostanjevica','075',1193),(4478,'Mirna PeÄ','170',1193),(4479,'Mislinja','076',1193),(4480,'MoravÄe','077',1193),(4481,'Moravske Toplice','078',1193),(4482,'Mozirje','079',1193),(4483,'Murska Sobota','080',1193),(4484,'Muta','081',1193),(4485,'Naklo','082',1193),(4486,'Nazarje','083',1193),(4487,'Nova Gorica','084',1193),(4488,'Novo mesto','085',1193),(4489,'Sveta Ana','181',1193),(4490,'Sveti Andraž v Slovenskih goricah','182',1193),(4491,'Sveti Jurij','116',1193),(4492,'Å alovci','033',1193),(4493,'Å empeter-Vrtojba','183',1193),(4494,'Å enÄur','117',1193),(4495,'Å entilj','118',1193),(4496,'Å entjernej','119',1193),(4497,'Å entjur','120',1193),(4498,'Å kocjan','121',1193),(4499,'Å kofja Loka','122',1193),(4500,'Å kofljica','123',1193),(4501,'Å marje pri JelÅ¡ah','124',1193),(4502,'Å martno ob Paki','125',1193),(4503,'Å martno pri Litiji','194',1193),(4504,'Å oÅ¡tanj','126',1193),(4505,'Å tore','127',1193),(4506,'Tabor','184',1193),(4507,'TiÅ¡ina','010',1193),(4508,'Tolmin','128',1193),(4509,'Trbovlje','129',1193),(4510,'Trebnje','130',1193),(4511,'Trnovska vas','185',1193),(4512,'TržiÄ','131',1193),(4513,'Trzin','186',1193),(4514,'TurniÅ¡Äe','132',1193),(4515,'Velenje','133',1193),(4516,'Velika Polana','187',1193),(4517,'Velike LaÅ¡Äe','134',1193),(4518,'Veržej','188',1193),(4519,'Videm','135',1193),(4520,'Vipava','136',1193),(4521,'Vitanje','137',1193),(4522,'Vojnik','138',1193),(4523,'Vransko','189',1193),(4524,'Vrhnika','140',1193),(4525,'Vuzenica','141',1193),(4526,'Zagorje ob Savi','142',1193),(4527,'ZavrÄ','143',1193),(4528,'ZreÄe','144',1193),(4529,'Žalec','190',1193),(4530,'Železniki','146',1193),(4531,'Žetale','191',1193),(4532,'Žiri','147',1193),(4533,'Žirovnica','192',1193),(4534,'Žužemberk','193',1193),(4535,'Banskobystrický kraj','BC',1192),(4536,'Bratislavský kraj','BL',1192),(4537,'KoÅ¡ický kraj','KI',1192),(4538,'Nitriansky kraj','NJ',1192),(4539,'PreÅ¡ovský kraj','PV',1192),(4540,'TrenÄiansky kraj','TC',1192),(4541,'Trnavský kraj','TA',1192),(4542,'Žilinský kraj','ZI',1192),(4543,'Western Area (Freetown)','W',1190),(4544,'Dakar','DK',1188),(4545,'Diourbel','DB',1188),(4546,'Fatick','FK',1188),(4547,'Kaolack','KL',1188),(4548,'Kolda','KD',1188),(4549,'Louga','LG',1188),(4550,'Matam','MT',1188),(4551,'Saint-Louis','SL',1188),(4552,'Tambacounda','TC',1188),(4553,'Thies','TH',1188),(4554,'Ziguinchor','ZG',1188),(4555,'Awdal','AW',1195),(4556,'Bakool','BK',1195),(4557,'Banaadir','BN',1195),(4558,'Bay','BY',1195),(4559,'Galguduud','GA',1195),(4560,'Gedo','GE',1195),(4561,'Hiirsan','HI',1195),(4562,'Jubbada Dhexe','JD',1195),(4563,'Jubbada Hoose','JH',1195),(4564,'Mudug','MU',1195),(4565,'Nugaal','NU',1195),(4566,'Saneag','SA',1195),(4567,'Shabeellaha Dhexe','SD',1195),(4568,'Shabeellaha Hoose','SH',1195),(4569,'Sool','SO',1195),(4570,'Togdheer','TO',1195),(4571,'Woqooyi Galbeed','WO',1195),(4572,'Brokopondo','BR',1201),(4573,'Commewijne','CM',1201),(4574,'Coronie','CR',1201),(4575,'Marowijne','MA',1201),(4576,'Nickerie','NI',1201),(4577,'Paramaribo','PM',1201),(4578,'Saramacca','SA',1201),(4579,'Sipaliwini','SI',1201),(4580,'Wanica','WA',1201),(4581,'Principe','P',1207),(4582,'Sao Tome','S',1207),(4583,'Ahuachapan','AH',1066),(4584,'Cabanas','CA',1066),(4585,'Cuscatlan','CU',1066),(4586,'Chalatenango','CH',1066),(4587,'Morazan','MO',1066),(4588,'San Miguel','SM',1066),(4589,'San Salvador','SS',1066),(4590,'Santa Ana','SA',1066),(4591,'San Vicente','SV',1066),(4592,'Sonsonate','SO',1066),(4593,'Usulutan','US',1066),(4594,'Al Hasakah','HA',1206),(4595,'Al Ladhiqiyah','LA',1206),(4596,'Al Qunaytirah','QU',1206),(4597,'Ar Raqqah','RA',1206),(4598,'As Suwayda\'','SU',1206),(4599,'Dar\'a','DR',1206),(4600,'Dayr az Zawr','DY',1206),(4601,'Dimashq','DI',1206),(4602,'Halab','HL',1206),(4603,'Hamah','HM',1206),(4604,'Jim\'','HI',1206),(4605,'Idlib','ID',1206),(4606,'Rif Dimashq','RD',1206),(4607,'Tarts','TA',1206),(4608,'Hhohho','HH',1203),(4609,'Lubombo','LU',1203),(4610,'Manzini','MA',1203),(4611,'Shiselweni','SH',1203),(4612,'Batha','BA',1043),(4613,'Biltine','BI',1043),(4614,'Borkou-Ennedi-Tibesti','BET',1043),(4615,'Chari-Baguirmi','CB',1043),(4616,'Guera','GR',1043),(4617,'Kanem','KA',1043),(4618,'Lac','LC',1043),(4619,'Logone-Occidental','LO',1043),(4620,'Logone-Oriental','LR',1043),(4621,'Mayo-Kebbi','MK',1043),(4622,'Moyen-Chari','MC',1043),(4623,'Ouaddai','OD',1043),(4624,'Salamat','SA',1043),(4625,'Tandjile','TA',1043),(4626,'Kara','K',1214),(4627,'Maritime (Region)','M',1214),(4628,'Savannes','S',1214),(4629,'Krung Thep Maha Nakhon Bangkok','10',1211),(4630,'Phatthaya','S',1211),(4631,'Amnat Charoen','37',1211),(4632,'Ang Thong','15',1211),(4633,'Buri Ram','31',1211),(4634,'Chachoengsao','24',1211),(4635,'Chai Nat','18',1211),(4636,'Chaiyaphum','36',1211),(4637,'Chanthaburi','22',1211),(4638,'Chiang Mai','50',1211),(4639,'Chiang Rai','57',1211),(4640,'Chon Buri','20',1211),(4641,'Chumphon','86',1211),(4642,'Kalasin','46',1211),(4643,'Kamphasng Phet','62',1211),(4644,'Kanchanaburi','71',1211),(4645,'Khon Kaen','40',1211),(4646,'Krabi','81',1211),(4647,'Lampang','52',1211),(4648,'Lamphun','51',1211),(4649,'Loei','42',1211),(4650,'Lop Buri','16',1211),(4651,'Mae Hong Son','58',1211),(4652,'Maha Sarakham','44',1211),(4653,'Mukdahan','49',1211),(4654,'Nakhon Nayok','26',1211),(4655,'Nakhon Pathom','73',1211),(4656,'Nakhon Phanom','48',1211),(4657,'Nakhon Ratchasima','30',1211),(4658,'Nakhon Sawan','60',1211),(4659,'Nakhon Si Thammarat','80',1211),(4660,'Nan','55',1211),(4661,'Narathiwat','96',1211),(4662,'Nong Bua Lam Phu','39',1211),(4663,'Nong Khai','43',1211),(4664,'Nonthaburi','12',1211),(4665,'Pathum Thani','13',1211),(4666,'Pattani','94',1211),(4667,'Phangnga','82',1211),(4668,'Phatthalung','93',1211),(4669,'Phayao','56',1211),(4670,'Phetchabun','67',1211),(4671,'Phetchaburi','76',1211),(4672,'Phichit','66',1211),(4673,'Phitsanulok','65',1211),(4674,'Phrae','54',1211),(4675,'Phra Nakhon Si Ayutthaya','14',1211),(4676,'Phuket','83',1211),(4677,'Prachin Buri','25',1211),(4678,'Prachuap Khiri Khan','77',1211),(4679,'Ranong','85',1211),(4680,'Ratchaburi','70',1211),(4681,'Rayong','21',1211),(4682,'Roi Et','45',1211),(4683,'Sa Kaeo','27',1211),(4684,'Sakon Nakhon','47',1211),(4685,'Samut Prakan','11',1211),(4686,'Samut Sakhon','74',1211),(4687,'Samut Songkhram','75',1211),(4688,'Saraburi','19',1211),(4689,'Satun','91',1211),(4690,'Sing Buri','17',1211),(4691,'Si Sa Ket','33',1211),(4692,'Songkhla','90',1211),(4693,'Sukhothai','64',1211),(4694,'Suphan Buri','72',1211),(4695,'Surat Thani','84',1211),(4696,'Surin','32',1211),(4697,'Tak','63',1211),(4698,'Trang','92',1211),(4699,'Trat','23',1211),(4700,'Ubon Ratchathani','34',1211),(4701,'Udon Thani','41',1211),(4702,'Uthai Thani','61',1211),(4703,'Uttaradit','53',1211),(4704,'Yala','95',1211),(4705,'Yasothon','35',1211),(4706,'Sughd','SU',1209),(4707,'Khatlon','KT',1209),(4708,'Gorno-Badakhshan','GB',1209),(4709,'Ahal','A',1220),(4710,'Balkan','B',1220),(4711,'Dasoguz','D',1220),(4712,'Lebap','L',1220),(4713,'Mary','M',1220),(4714,'Béja','31',1218),(4715,'Ben Arous','13',1218),(4716,'Bizerte','23',1218),(4717,'Gabès','81',1218),(4718,'Gafsa','71',1218),(4719,'Jendouba','32',1218),(4720,'Kairouan','41',1218),(4721,'Rasserine','42',1218),(4722,'Kebili','73',1218),(4723,'L\'Ariana','12',1218),(4724,'Le Ref','33',1218),(4725,'Mahdia','53',1218),(4726,'La Manouba','14',1218),(4727,'Medenine','82',1218),(4728,'Moneatir','52',1218),(4729,'Naboul','21',1218),(4730,'Sfax','61',1218),(4731,'Sidi Bouxid','43',1218),(4732,'Siliana','34',1218),(4733,'Sousse','51',1218),(4734,'Tataouine','83',1218),(4735,'Tozeur','72',1218),(4736,'Tunis','11',1218),(4737,'Zaghouan','22',1218),(4738,'Adana','01',1219),(4739,'Ad yaman','02',1219),(4740,'Afyon','03',1219),(4741,'Ag r','04',1219),(4742,'Aksaray','68',1219),(4743,'Amasya','05',1219),(4744,'Ankara','06',1219),(4745,'Antalya','07',1219),(4746,'Ardahan','75',1219),(4747,'Artvin','08',1219),(4748,'Aydin','09',1219),(4749,'Bal kesir','10',1219),(4750,'Bartin','74',1219),(4751,'Batman','72',1219),(4752,'Bayburt','69',1219),(4753,'Bilecik','11',1219),(4754,'Bingol','12',1219),(4755,'Bitlis','13',1219),(4756,'Bolu','14',1219),(4757,'Burdur','15',1219),(4758,'Bursa','16',1219),(4759,'Canakkale','17',1219),(4760,'Cankir','18',1219),(4761,'Corum','19',1219),(4762,'Denizli','20',1219),(4763,'Diyarbakir','21',1219),(4764,'Duzce','81',1219),(4765,'Edirne','22',1219),(4766,'Elazig','23',1219),(4767,'Erzincan','24',1219),(4768,'Erzurum','25',1219),(4769,'Eskis\'ehir','26',1219),(4770,'Gaziantep','27',1219),(4771,'Giresun','28',1219),(4772,'Gms\'hane','29',1219),(4773,'Hakkari','30',1219),(4774,'Hatay','31',1219),(4775,'Igidir','76',1219),(4776,'Isparta','32',1219),(4777,'Icel','33',1219),(4778,'Istanbul','34',1219),(4779,'Izmir','35',1219),(4780,'Kahramanmaras','46',1219),(4781,'Karabk','78',1219),(4782,'Karaman','70',1219),(4783,'Kars','36',1219),(4784,'Kastamonu','37',1219),(4785,'Kayseri','38',1219),(4786,'Kirikkale','71',1219),(4787,'Kirklareli','39',1219),(4788,'Kirs\'ehir','40',1219),(4789,'Kilis','79',1219),(4790,'Kocaeli','41',1219),(4791,'Konya','42',1219),(4792,'Ktahya','43',1219),(4793,'Malatya','44',1219),(4794,'Manisa','45',1219),(4795,'Mardin','47',1219),(4796,'Mugila','48',1219),(4797,'Mus','49',1219),(4798,'Nevs\'ehir','50',1219),(4799,'Nigide','51',1219),(4800,'Ordu','52',1219),(4801,'Osmaniye','80',1219),(4802,'Rize','53',1219),(4803,'Sakarya','54',1219),(4804,'Samsun','55',1219),(4805,'Siirt','56',1219),(4806,'Sinop','57',1219),(4807,'Sivas','58',1219),(4808,'S\'anliurfa','63',1219),(4809,'S\'rnak','73',1219),(4810,'Tekirdag','59',1219),(4811,'Tokat','60',1219),(4812,'Trabzon','61',1219),(4813,'Tunceli','62',1219),(4814,'Us\'ak','64',1219),(4815,'Van','65',1219),(4816,'Yalova','77',1219),(4817,'Yozgat','66',1219),(4818,'Zonguldak','67',1219),(4819,'Couva-Tabaquite-Talparo','CTT',1217),(4820,'Diego Martin','DMN',1217),(4821,'Eastern Tobago','ETO',1217),(4822,'Penal-Debe','PED',1217),(4823,'Princes Town','PRT',1217),(4824,'Rio Claro-Mayaro','RCM',1217),(4825,'Sangre Grande','SGE',1217),(4826,'San Juan-Laventille','SJL',1217),(4827,'Siparia','SIP',1217),(4828,'Tunapuna-Piarco','TUP',1217),(4829,'Western Tobago','WTO',1217),(4830,'Arima','ARI',1217),(4831,'Chaguanas','CHA',1217),(4832,'Point Fortin','PTF',1217),(4833,'Port of Spain','POS',1217),(4834,'San Fernando','SFO',1217),(4835,'Aileu','AL',1063),(4836,'Ainaro','AN',1063),(4837,'Bacucau','BA',1063),(4838,'Bobonaro','BO',1063),(4839,'Cova Lima','CO',1063),(4840,'Dili','DI',1063),(4841,'Ermera','ER',1063),(4842,'Laulem','LA',1063),(4843,'Liquica','LI',1063),(4844,'Manatuto','MT',1063),(4845,'Manafahi','MF',1063),(4846,'Oecussi','OE',1063),(4847,'Viqueque','VI',1063),(4848,'Changhua County','CHA',1208),(4849,'Chiayi County','CYQ',1208),(4850,'Hsinchu County','HSQ',1208),(4851,'Hualien County','HUA',1208),(4852,'Ilan County','ILA',1208),(4853,'Kaohsiung County','KHQ',1208),(4854,'Miaoli County','MIA',1208),(4855,'Nantou County','NAN',1208),(4856,'Penghu County','PEN',1208),(4857,'Pingtung County','PIF',1208),(4858,'Taichung County','TXQ',1208),(4859,'Tainan County','TNQ',1208),(4860,'Taipei County','TPQ',1208),(4861,'Taitung County','TTT',1208),(4862,'Taoyuan County','TAO',1208),(4863,'Yunlin County','YUN',1208),(4864,'Keelung City','KEE',1208),(4865,'Arusha','01',1210),(4866,'Dar-es-Salaam','02',1210),(4867,'Dodoma','03',1210),(4868,'Iringa','04',1210),(4869,'Kagera','05',1210),(4870,'Kaskazini Pemba','06',1210),(4871,'Kaskazini Unguja','07',1210),(4872,'Xigoma','08',1210),(4873,'Kilimanjaro','09',1210),(4874,'Rusini Pemba','10',1210),(4875,'Kusini Unguja','11',1210),(4876,'Lindi','12',1210),(4877,'Manyara','26',1210),(4878,'Mara','13',1210),(4879,'Mbeya','14',1210),(4880,'Mjini Magharibi','15',1210),(4881,'Morogoro','16',1210),(4882,'Mtwara','17',1210),(4883,'Pwani','19',1210),(4884,'Rukwa','20',1210),(4885,'Ruvuma','21',1210),(4886,'Shinyanga','22',1210),(4887,'Singida','23',1210),(4888,'Tabora','24',1210),(4889,'Tanga','25',1210),(4890,'Cherkas\'ka Oblast\'','71',1224),(4891,'Chernihivs\'ka Oblast\'','74',1224),(4892,'Chernivets\'ka Oblast\'','77',1224),(4893,'Dnipropetrovs\'ka Oblast\'','12',1224),(4894,'Donets\'ka Oblast\'','14',1224),(4895,'Ivano-Frankivs\'ka Oblast\'','26',1224),(4896,'Kharkivs\'ka Oblast\'','63',1224),(4897,'Khersons\'ka Oblast\'','65',1224),(4898,'Khmel\'nyts\'ka Oblast\'','68',1224),(4899,'Kirovohrads\'ka Oblast\'','35',1224),(4900,'Kyivs\'ka Oblast\'','32',1224),(4901,'Luhans\'ka Oblast\'','09',1224),(4902,'L\'vivs\'ka Oblast\'','46',1224),(4903,'Mykolaivs\'ka Oblast\'','48',1224),(4904,'Odes \'ka Oblast\'','51',1224),(4905,'Poltavs\'ka Oblast\'','53',1224),(4906,'Rivnens\'ka Oblast\'','56',1224),(4907,'Sums \'ka Oblast\'','59',1224),(4908,'Ternopil\'s\'ka Oblast\'','61',1224),(4909,'Vinnyts\'ka Oblast\'','05',1224),(4910,'Volyos\'ka Oblast\'','07',1224),(4911,'Zakarpats\'ka Oblast\'','21',1224),(4912,'Zaporiz\'ka Oblast\'','23',1224),(4913,'Zhytomyrs\'ka Oblast\'','18',1224),(4914,'Respublika Krym','43',1224),(4915,'Kyiv','30',1224),(4916,'Sevastopol','40',1224),(4917,'Adjumani','301',1223),(4918,'Apac','302',1223),(4919,'Arua','303',1223),(4920,'Bugiri','201',1223),(4921,'Bundibugyo','401',1223),(4922,'Bushenyi','402',1223),(4923,'Busia','202',1223),(4924,'Gulu','304',1223),(4925,'Hoima','403',1223),(4926,'Iganga','203',1223),(4927,'Jinja','204',1223),(4928,'Kabale','404',1223),(4929,'Kabarole','405',1223),(4930,'Kaberamaido','213',1223),(4931,'Kalangala','101',1223),(4932,'Kampala','102',1223),(4933,'Kamuli','205',1223),(4934,'Kamwenge','413',1223),(4935,'Kanungu','414',1223),(4936,'Kapchorwa','206',1223),(4937,'Kasese','406',1223),(4938,'Katakwi','207',1223),(4939,'Kayunga','112',1223),(4940,'Kibaale','407',1223),(4941,'Kiboga','103',1223),(4942,'Kisoro','408',1223),(4943,'Kitgum','305',1223),(4944,'Kotido','306',1223),(4945,'Kumi','208',1223),(4946,'Kyenjojo','415',1223),(4947,'Lira','307',1223),(4948,'Luwero','104',1223),(4949,'Masaka','105',1223),(4950,'Masindi','409',1223),(4951,'Mayuge','214',1223),(4952,'Mbale','209',1223),(4953,'Mbarara','410',1223),(4954,'Moroto','308',1223),(4955,'Moyo','309',1223),(4956,'Mpigi','106',1223),(4957,'Mubende','107',1223),(4958,'Mukono','108',1223),(4959,'Nakapiripirit','311',1223),(4960,'Nakasongola','109',1223),(4961,'Nebbi','310',1223),(4962,'Ntungamo','411',1223),(4963,'Pader','312',1223),(4964,'Pallisa','210',1223),(4965,'Rakai','110',1223),(4966,'Rukungiri','412',1223),(4967,'Sembabule','111',1223),(4968,'Sironko','215',1223),(4969,'Soroti','211',1223),(4970,'Tororo','212',1223),(4971,'Wakiso','113',1223),(4972,'Yumbe','313',1223),(4973,'Baker Island','81',1227),(4974,'Howland Island','84',1227),(4975,'Jarvis Island','86',1227),(4976,'Johnston Atoll','67',1227),(4977,'Kingman Reef','89',1227),(4978,'Midway Islands','71',1227),(4979,'Navassa Island','76',1227),(4980,'Palmyra Atoll','95',1227),(4981,'Wake Island','79',1227),(4982,'Artigsa','AR',1229),(4983,'Canelones','CA',1229),(4984,'Cerro Largo','CL',1229),(4985,'Colonia','CO',1229),(4986,'Durazno','DU',1229),(4987,'Flores','FS',1229),(4988,'Lavalleja','LA',1229),(4989,'Maldonado','MA',1229),(4990,'Montevideo','MO',1229),(4991,'Paysandu','PA',1229),(4992,'Rivera','RV',1229),(4993,'Rocha','RO',1229),(4994,'Salto','SA',1229),(4995,'Soriano','SO',1229),(4996,'Tacuarembo','TA',1229),(4997,'Treinta y Tres','TT',1229),(4998,'Toshkent (city)','TK',1230),(4999,'Qoraqalpogiston Respublikasi','QR',1230),(5000,'Andijon','AN',1230),(5001,'Buxoro','BU',1230),(5002,'Farg\'ona','FA',1230),(5003,'Jizzax','JI',1230),(5004,'Khorazm','KH',1230),(5005,'Namangan','NG',1230),(5006,'Navoiy','NW',1230),(5007,'Qashqadaryo','QA',1230),(5008,'Samarqand','SA',1230),(5009,'Sirdaryo','SI',1230),(5010,'Surxondaryo','SU',1230),(5011,'Toshkent','TO',1230),(5012,'Xorazm','XO',1230),(5013,'Distrito Federal','A',1232),(5014,'Anzoategui','B',1232),(5015,'Apure','C',1232),(5016,'Aragua','D',1232),(5017,'Barinas','E',1232),(5018,'Carabobo','G',1232),(5019,'Cojedes','H',1232),(5020,'Falcon','I',1232),(5021,'Guarico','J',1232),(5022,'Lara','K',1232),(5023,'Merida','L',1232),(5024,'Miranda','M',1232),(5025,'Monagas','N',1232),(5026,'Nueva Esparta','O',1232),(5027,'Portuguesa','P',1232),(5028,'Tachira','S',1232),(5029,'Trujillo','T',1232),(5030,'Vargas','X',1232),(5031,'Yaracuy','U',1232),(5032,'Zulia','V',1232),(5033,'Delta Amacuro','Y',1232),(5034,'Dependencias Federales','W',1232),(5035,'An Giang','44',1233),(5036,'Ba Ria - Vung Tau','43',1233),(5037,'Bac Can','53',1233),(5038,'Bac Giang','54',1233),(5039,'Bac Lieu','55',1233),(5040,'Bac Ninh','56',1233),(5041,'Ben Tre','50',1233),(5042,'Binh Dinh','31',1233),(5043,'Binh Duong','57',1233),(5044,'Binh Phuoc','58',1233),(5045,'Binh Thuan','40',1233),(5046,'Ca Mau','59',1233),(5047,'Can Tho','48',1233),(5048,'Cao Bang','04',1233),(5049,'Da Nang, thanh pho','60',1233),(5050,'Dong Nai','39',1233),(5051,'Dong Thap','45',1233),(5052,'Gia Lai','30',1233),(5053,'Ha Giang','03',1233),(5054,'Ha Nam','63',1233),(5055,'Ha Noi, thu do','64',1233),(5056,'Ha Tay','15',1233),(5057,'Ha Tinh','23',1233),(5058,'Hai Duong','61',1233),(5059,'Hai Phong, thanh pho','62',1233),(5060,'Hoa Binh','14',1233),(5061,'Ho Chi Minh, thanh pho [Sai Gon]','65',1233),(5062,'Hung Yen','66',1233),(5063,'Khanh Hoa','34',1233),(5064,'Kien Giang','47',1233),(5065,'Kon Tum','28',1233),(5066,'Lai Chau','01',1233),(5067,'Lam Dong','35',1233),(5068,'Lang Son','09',1233),(5069,'Lao Cai','02',1233),(5070,'Long An','41',1233),(5071,'Nam Dinh','67',1233),(5072,'Nghe An','22',1233),(5073,'Ninh Binh','18',1233),(5074,'Ninh Thuan','36',1233),(5075,'Phu Tho','68',1233),(5076,'Phu Yen','32',1233),(5077,'Quang Binh','24',1233),(5078,'Quang Nam','27',1233),(5079,'Quang Ngai','29',1233),(5080,'Quang Ninh','13',1233),(5081,'Quang Tri','25',1233),(5082,'Soc Trang','52',1233),(5083,'Son La','05',1233),(5084,'Tay Ninh','37',1233),(5085,'Thai Binh','20',1233),(5086,'Thai Nguyen','69',1233),(5087,'Thanh Hoa','21',1233),(5088,'Thua Thien-Hue','26',1233),(5089,'Tien Giang','46',1233),(5090,'Tra Vinh','51',1233),(5091,'Tuyen Quang','07',1233),(5092,'Vinh Long','49',1233),(5093,'Vinh Phuc','70',1233),(5094,'Yen Bai','06',1233),(5095,'Malampa','MAP',1231),(5096,'Penama','PAM',1231),(5097,'Sanma','SAM',1231),(5098,'Shefa','SEE',1231),(5099,'Tafea','TAE',1231),(5100,'Torba','TOB',1231),(5101,'A\'ana','AA',1185),(5102,'Aiga-i-le-Tai','AL',1185),(5103,'Atua','AT',1185),(5104,'Fa\'aaaleleaga','FA',1185),(5105,'Gaga\'emauga','GE',1185),(5106,'Gagaifomauga','GI',1185),(5107,'Palauli','PA',1185),(5108,'Satupa\'itea','SA',1185),(5109,'Tuamasaga','TU',1185),(5110,'Va\'a-o-Fonoti','VF',1185),(5111,'Vaisigano','VS',1185),(5112,'Crna Gora','CG',1243),(5113,'Srbija','SR',1242),(5114,'Kosovo-Metohija','KM',1242),(5115,'Vojvodina','VO',1242),(5116,'Abyan','AB',1237),(5117,'Adan','AD',1237),(5118,'Ad Dali','DA',1237),(5119,'Al Bayda\'','BA',1237),(5120,'Al Hudaydah','MU',1237),(5121,'Al Mahrah','MR',1237),(5122,'Al Mahwit','MW',1237),(5123,'Amran','AM',1237),(5124,'Dhamar','DH',1237),(5125,'Hadramawt','HD',1237),(5126,'Hajjah','HJ',1237),(5127,'Ibb','IB',1237),(5128,'Lahij','LA',1237),(5129,'Ma\'rib','MA',1237),(5130,'Sa\'dah','SD',1237),(5131,'San\'a\'','SN',1237),(5132,'Shabwah','SH',1237),(5133,'Ta\'izz','TA',1237),(5134,'Eastern Cape','EC',1196),(5135,'Free State','FS',1196),(5136,'Gauteng','GT',1196),(5137,'Kwazulu-Natal','NL',1196),(5138,'Mpumalanga','MP',1196),(5139,'Northern Cape','NC',1196),(5140,'Limpopo','NP',1196),(5141,'Western Cape','WC',1196),(5142,'Copperbelt','08',1239),(5143,'Luapula','04',1239),(5144,'Lusaka','09',1239),(5145,'North-Western','06',1239),(5146,'Bulawayo','BU',1240),(5147,'Harare','HA',1240),(5148,'Manicaland','MA',1240),(5149,'Mashonaland Central','MC',1240),(5150,'Mashonaland East','ME',1240),(5151,'Mashonaland West','MW',1240),(5152,'Masvingo','MV',1240),(5153,'Matabeleland North','MN',1240),(5154,'Matabeleland South','MS',1240),(5155,'Midlands','MI',1240),(5156,'South Karelia','SK',1075),(5157,'South Ostrobothnia','SO',1075),(5158,'Etelä-Savo','ES',1075),(5159,'Häme','HH',1075),(5160,'Itä-Uusimaa','IU',1075),(5161,'Kainuu','KA',1075),(5162,'Central Ostrobothnia','CO',1075),(5163,'Central Finland','CF',1075),(5164,'Kymenlaakso','KY',1075),(5165,'Lapland','LA',1075),(5166,'Tampere Region','TR',1075),(5167,'Ostrobothnia','OB',1075),(5168,'North Karelia','NK',1075),(5169,'Northern Ostrobothnia','NO',1075),(5170,'Northern Savo','NS',1075),(5171,'Päijät-Häme','PH',1075),(5172,'Satakunta','SK',1075),(5173,'Uusimaa','UM',1075),(5174,'South-West Finland','SW',1075),(5175,'Ã…land','AL',1075),(5176,'Limburg','LI',1152),(5177,'Central and Western','CW',1098),(5178,'Eastern','EA',1098),(5179,'Southern','SO',1098),(5180,'Wan Chai','WC',1098),(5181,'Kowloon City','KC',1098),(5182,'Kwun Tong','KU',1098),(5183,'Sham Shui Po','SS',1098),(5184,'Wong Tai Sin','WT',1098),(5185,'Yau Tsim Mong','YT',1098),(5186,'Islands','IS',1098),(5187,'Kwai Tsing','KI',1098),(5188,'North','NO',1098),(5189,'Sai Kung','SK',1098),(5190,'Sha Tin','ST',1098),(5191,'Tai Po','TP',1098),(5192,'Tsuen Wan','TW',1098),(5193,'Tuen Mun','TM',1098),(5194,'Yuen Long','YL',1098),(5195,'Manchester','MR',1108),(5196,'Al ManÄmah (Al ‘Āşimah)','13',1016),(5197,'Al JanÅ«bÄ«yah','14',1016),(5199,'Al Wusţá','16',1016),(5200,'Ash ShamÄlÄ«yah','17',1016),(5201,'Jenin','_A',1165),(5202,'Tubas','_B',1165),(5203,'Tulkarm','_C',1165),(5204,'Nablus','_D',1165),(5205,'Qalqilya','_E',1165),(5206,'Salfit','_F',1165),(5207,'Ramallah and Al-Bireh','_G',1165),(5208,'Jericho','_H',1165),(5209,'Jerusalem','_I',1165),(5210,'Bethlehem','_J',1165),(5211,'Hebron','_K',1165),(5212,'North Gaza','_L',1165),(5213,'Gaza','_M',1165),(5214,'Deir el-Balah','_N',1165),(5215,'Khan Yunis','_O',1165),(5216,'Rafah','_P',1165),(5217,'Brussels','BRU',1020),(5218,'Distrito Federal','DIF',1140),(5219,'Taichung City','TXG',1208),(5220,'Kaohsiung City','KHH',1208),(5221,'Taipei City','TPE',1208),(5222,'Chiayi City','CYI',1208),(5223,'Hsinchu City','HSZ',1208),(5224,'Tainan City','TNN',1208),(9000,'North West','NW',1196),(9986,'Tyne and Wear','TWR',1226),(9988,'Greater Manchester','GTM',1226),(9989,'Co Tyrone','TYR',1226),(9990,'West Yorkshire','WYK',1226),(9991,'South Yorkshire','SYK',1226),(9992,'Merseyside','MSY',1226),(9993,'Berkshire','BRK',1226),(9994,'West Midlands','WMD',1226),(9998,'West Glamorgan','WGM',1226),(9999,'London','LON',1226),(10000,'Carbonia-Iglesias','CI',1107),(10001,'Olbia-Tempio','OT',1107),(10002,'Medio Campidano','VS',1107),(10003,'Ogliastra','OG',1107),(10009,'Jura','39',1076),(10010,'Barletta-Andria-Trani','Bar',1107),(10011,'Fermo','Fer',1107),(10012,'Monza e Brianza','Mon',1107),(10013,'Clwyd','CWD',1226),(10014,'Dyfed','DFD',1226),(10015,'South Glamorgan','SGM',1226),(10016,'Artibonite','AR',1094),(10017,'Centre','CE',1094),(10018,'Nippes','NI',1094),(10019,'Nord','ND',1094),(10020,'La Rioja','F',1010),(10021,'Andorra la Vella','07',1005),(10022,'Canillo','02',1005),(10023,'Encamp','03',1005),(10024,'Escaldes-Engordany','08',1005),(10025,'La Massana','04',1005),(10026,'Ordino','05',1005),(10027,'Sant Julia de Loria','06',1005),(10028,'Abaco Islands','AB',1212),(10029,'Andros Island','AN',1212),(10030,'Berry Islands','BR',1212),(10031,'Eleuthera','EL',1212),(10032,'Grand Bahama','GB',1212),(10033,'Rum Cay','RC',1212),(10034,'San Salvador Island','SS',1212),(10035,'Kongo central','01',1050),(10036,'Kwango','02',1050),(10037,'Kwilu','03',1050),(10038,'Mai-Ndombe','04',1050),(10039,'Kasai','05',1050),(10040,'Lulua','06',1050),(10041,'Lomami','07',1050),(10042,'Sankuru','08',1050),(10043,'Ituri','09',1050),(10044,'Haut-Uele','10',1050),(10045,'Tshopo','11',1050),(10046,'Bas-Uele','12',1050),(10047,'Nord-Ubangi','13',1050),(10048,'Mongala','14',1050),(10049,'Sud-Ubangi','15',1050),(10050,'Tshuapa','16',1050),(10051,'Haut-Lomami','17',1050),(10052,'Lualaba','18',1050),(10053,'Haut-Katanga','19',1050),(10054,'Tanganyika','20',1050),(10055,'Toledo','TO',1198),(10056,'Córdoba','CO',1198),(10057,'Metropolitan Manila','MNL',1170),(10058,'La Paz','LP',1097),(10059,'Yinchuan','YN',1045),(10060,'Shizuishan','SZ',1045),(10061,'Wuzhong','WZ',1045),(10062,'Guyuan','GY',1045),(10063,'Zhongwei','ZW',1045),(10064,'Luxembourg','L',1126),(10065,'Aizkraukles novads','002',1119),(10066,'Jaunjelgavas novads','038',1119),(10067,'Pļaviņu novads','072',1119),(10068,'Kokneses novads','046',1119),(10069,'Neretas novads','065',1119),(10070,'SkrÄ«veru novads','092',1119),(10071,'AlÅ«ksnes novads','007',1119),(10072,'Apes novads','009',1119),(10073,'Balvu novads','015',1119),(10074,'Viļakas novads','108',1119),(10075,'Baltinavas novads','014',1119),(10076,'RugÄju novads','082',1119),(10077,'Bauskas novads','016',1119),(10078,'Iecavas novads','034',1119),(10079,'RundÄles novads','083',1119),(10080,'Vecumnieku novads','105',1119),(10081,'CÄ“su novads','022',1119),(10082,'LÄ«gatnes novads','055',1119),(10083,'Amatas novads','008',1119),(10084,'Jaunpiebalgas novads','039',1119),(10085,'Priekuļu novads','075',1119),(10086,'PÄrgaujas novads','070',1119),(10087,'Raunas novads','076',1119),(10088,'Vecpiebalgas novads','104',1119),(10089,'Daugavpils novads','025',1119),(10090,'IlÅ«kstes novads','036',1119),(10091,'Dobeles novads','026',1119),(10092,'Auces novads','010',1119),(10093,'TÄ“rvetes novads','098',1119),(10094,'Gulbenes novads','033',1119),(10095,'Jelgavas novads','041',1119),(10096,'Ozolnieku novads','069',1119),(10097,'JÄ“kabpils novads','042',1119),(10098,'AknÄ«stes novads','004',1119),(10099,'ViesÄ«tes novads','107',1119),(10100,'Krustpils novads','049',1119),(10101,'Salas novads','085',1119),(10102,'KrÄslavas novads','047',1119),(10103,'Dagdas novads','024',1119),(10104,'Aglonas novads','001',1119),(10105,'KuldÄ«gas novads','050',1119),(10106,'Skrundas novads','093',1119),(10107,'Alsungas novads','006',1119),(10108,'Aizputes novads','003',1119),(10109,'Durbes novads','028',1119),(10110,'Grobiņas novads','032',1119),(10111,'PÄvilostas novads','071',1119),(10112,'Priekules novads','074',1119),(10113,'NÄ«cas novads','066',1119),(10114,'Rucavas novads','081',1119),(10115,'Vaiņodes novads','100',1119),(10116,'Limbažu novads','054',1119),(10117,'Alojas novads','005',1119),(10118,'SalacgrÄ«vas novads','086',1119),(10119,'Ludzas novads','058',1119),(10120,'KÄrsavas novads','044',1119),(10121,'Zilupes novads','110',1119),(10122,'Ciblas novads','023',1119),(10123,'Madonas novads','059',1119),(10124,'Cesvaines novads','021',1119),(10125,'LubÄnas novads','057',1119),(10126,'VarakļÄnu novads','102',1119),(10127,'Ä’rgļu novads','030',1119),(10128,'Ogres novads','067',1119),(10129,'IkÅ¡Ä·iles novads','035',1119),(10130,'Ķeguma novads','051',1119),(10131,'LielvÄrdes novads','053',1119),(10132,'Preiļu novads','073',1119),(10133,'LÄ«vÄnu novads','056',1119),(10134,'Riebiņu novads','078',1119),(10135,'VÄrkavas novads','103',1119),(10136,'RÄ“zeknes novads','077',1119),(10137,'ViļÄnu novads','109',1119),(10138,'Baldones novads','013',1119),(10139,'Ķekavas novads','052',1119),(10140,'Olaines novads','068',1119),(10141,'Salaspils novads','087',1119),(10142,'Saulkrastu novads','089',1119),(10143,'Siguldas novads','091',1119),(10144,'InÄukalna novads','037',1119),(10145,'Ä€dažu novads','011',1119),(10146,'BabÄ«tes novads','012',1119),(10147,'Carnikavas novads','020',1119),(10148,'Garkalnes novads','031',1119),(10149,'Krimuldas novads','048',1119),(10150,'MÄlpils novads','061',1119),(10151,'MÄrupes novads','062',1119),(10152,'Ropažu novads','080',1119),(10153,'SÄ“jas novads','090',1119),(10154,'Stopiņu novads','095',1119),(10155,'Saldus novads','088',1119),(10156,'BrocÄ“nu novads','018',1119),(10157,'Talsu novads','097',1119),(10158,'Dundagas novads','027',1119),(10159,'MÄ“rsraga novads','063',1119),(10160,'Rojas novads','079',1119),(10161,'Tukuma novads','099',1119),(10162,'Kandavas novads','043',1119),(10163,'Engures novads','029',1119),(10164,'Jaunpils novads','040',1119),(10165,'Valkas novads','101',1119),(10166,'Smiltenes novads','094',1119),(10167,'StrenÄu novads','096',1119),(10168,'KocÄ“nu novads','045',1119),(10169,'Mazsalacas novads','060',1119),(10170,'RÅ«jienas novads','084',1119),(10171,'BeverÄ«nas novads','017',1119),(10172,'Burtnieku novads','019',1119),(10173,'NaukÅ¡Ä“nu novads','064',1119),(10174,'Ventspils novads','106',1119),(10175,'JÄ“kabpils','JKB',1119),(10176,'Valmiera','VMR',1119),(10177,'Florida','FL',1229),(10178,'Rio Negro','RN',1229),(10179,'San Jose','SJ',1229),(10180,'Plateau','PL',1157),(10181,'Pieria','61',1085),(10182,'Los Rios','LR',1044),(10183,'Arica y Parinacota','AP',1044),(10184,'Amazonas','AMA',1169),(10185,'Kalimantan Tengah','KT',1102),(10186,'Sulawesi Barat','SR',1102),(10187,'Kalimantan Utara','KU',1102),(10188,'Ankaran','86',1193),(10189,'ApaÄe','87',1193),(10190,'Cirkulane','88',1193),(10191,'Gorje','89',1193),(10192,'Kostanjevica na Krki','90',1193),(10193,'Log-Dragomer','91',1193),(10194,'Makole','92',1193),(10195,'Mirna','93',1193),(10196,'Mokronog-Trebelno','94',1193),(10197,'Odranci','95',1193),(10198,'Oplotnica','96',1193),(10199,'Ormož','97',1193),(10200,'Osilnica','98',1193),(10201,'Pesnica','99',1193),(10202,'Piran','100',1193),(10203,'Pivka','101',1193),(10204,'PodÄetrtek','102',1193),(10205,'Podlehnik','103',1193),(10206,'Podvelka','104',1193),(10207,'PoljÄane','105',1193),(10208,'Polzela','106',1193),(10209,'Postojna','107',1193),(10210,'Prebold','108',1193),(10211,'Preddvor','109',1193),(10212,'Prevalje','110',1193),(10213,'Ptuj','111',1193),(10214,'Puconci','112',1193),(10215,'RaÄe-Fram','113',1193),(10216,'RadeÄe','114',1193),(10217,'Radenci','115',1193),(10218,'Radlje ob Dravi','139',1193),(10219,'Radovljica','145',1193),(10220,'Ravne na KoroÅ¡kem','171',1193),(10221,'Razkrižje','172',1193),(10222,'ReÄica ob Savinji','173',1193),(10223,'RenÄe-Vogrsko','174',1193),(10224,'Ribnica','175',1193),(10225,'Ribnica na Pohorju','176',1193),(10226,'RogaÅ¡ka Slatina','177',1193),(10227,'RogaÅ¡ovci','178',1193),(10228,'Rogatec','179',1193),(10229,'RuÅ¡e','180',1193),(10230,'Selnica ob Dravi','195',1193),(10231,'SemiÄ','196',1193),(10232,'Å entrupert','197',1193),(10233,'Sevnica','198',1193),(10234,'Sežana','199',1193),(10235,'Slovenj Gradec','200',1193),(10236,'Slovenska Bistrica','201',1193),(10237,'Slovenske Konjice','202',1193),(10238,'Å marjeÅ¡ke Toplice','203',1193),(10239,'Sodražica','204',1193),(10240,'SolÄava','205',1193),(10241,'SrediÅ¡Äe ob Dravi','206',1193),(10242,'StarÅ¡e','207',1193),(10243,'Straža','208',1193),(10244,'Sveta Trojica v Slovenskih goricah','209',1193),(10245,'Sveti Jurij v Slovenskih goricah','210',1193),(10246,'Sveti Tomaž','211',1193),(10247,'Vodice','212',1193),(10248,'Abkhazia','AB',1081),(10249,'Adjara','AJ',1081),(10250,'Tbilisi','TB',1081),(10251,'Guria','GU',1081),(10252,'Imereti','IM',1081),(10253,'Kakheti','KA',1081),(10254,'Kvemo Kartli','KK',1081),(10255,'Mtskheta-Mtianeti','MM',1081),(10256,'Racha-Lechkhumi and Kvemo Svaneti','RL',1081),(10257,'Samegrelo-Zemo Svaneti','SZ',1081),(10258,'Samtskhe-Javakheti','SJ',1081),(10259,'Shida Kartli','SK',1081),(10260,'Central','C',1074),(10261,'Punjab','PB',1163),(10262,'La Libertad','LI',1066),(10263,'La Paz','PA',1066),(10264,'La Union','UN',1066),(10265,'Littoral','LT',1038),(10266,'Nord-Ouest','NW',1038),(10267,'Telangana','TG',1101),(10268,'Ash Sharqiyah','04',1187),(10269,'Guadeloupe','GP',1076),(10270,'Martinique','MQ',1076),(10271,'Guyane','GF',1076),(10272,'La Réunion','RE',1076),(10273,'Mayotte','YT',1076),(10274,'Baringo','01',1112),(10275,'Bomet','02',1112),(10276,'Bungoma','03',1112),(10277,'Busia','04',1112),(10278,'Elgeyo/Marakwet','05',1112),(10279,'Embu','06',1112),(10280,'Garissa','07',1112),(10281,'Homa Bay','08',1112),(10282,'Isiolo','09',1112),(10283,'Kajiado','10',1112),(10284,'Kakamega','11',1112),(10285,'Kericho','12',1112),(10286,'Kiambu','13',1112),(10287,'Kilifi','14',1112),(10288,'Kirinyaga','15',1112),(10289,'Kisii','16',1112),(10290,'Kisumu','17',1112),(10291,'Kitui','18',1112),(10292,'Kwale','19',1112),(10293,'Laikipia','20',1112),(10294,'Lamu','21',1112),(10295,'Machakos','22',1112),(10296,'Makueni','23',1112),(10297,'Mandera','24',1112),(10298,'Marsabit','25',1112),(10299,'Meru','26',1112),(10300,'Migori','27',1112),(10301,'Mombasa','28',1112),(10302,'Murang\'a','29',1112),(10303,'Nairobi City','30',1112),(10304,'Nakuru','31',1112),(10305,'Nandi','32',1112),(10306,'Narok','33',1112),(10307,'Nyamira','34',1112),(10308,'Nyandarua','35',1112),(10309,'Nyeri','36',1112),(10310,'Samburu','37',1112),(10311,'Siaya','38',1112),(10312,'Taita/Taveta','39',1112),(10313,'Tana River','40',1112),(10314,'Tharaka-Nithi','41',1112),(10315,'Trans Nzoia','42',1112),(10316,'Turkana','43',1112),(10317,'Uasin Gishu','44',1112),(10318,'Vihiga','45',1112),(10319,'Wajir','46',1112),(10320,'West Pokot','47',1112),(10321,'Chandigarh','CH',1101),(10322,'Central','CP',1083),(10323,'Eastern','EP',1083),(10324,'Northern','NP',1083),(10325,'Western','WP',1083),(10326,'Saint Kitts','K',1181),(10327,'Nevis','N',1181),(10328,'Eastern','E',1190),(10329,'Northern','N',1190),(10330,'Southern','S',1190),(10331,'Dushanbe','DU',1209),(10332,'Nohiyahoi Tobei JumhurÃ','RA',1209),(10333,'Wallis-et-Futuna','WF',1076),(10334,'Nouvelle-Calédonie','NC',1076),(10335,'Saint George','03',1009),(10336,'Saint John','04',1009),(10337,'Saint Mary','05',1009),(10338,'Saint Paul','06',1009),(10339,'Saint Peter','07',1009),(10340,'Saint Philip','08',1009),(10341,'Barbuda','10',1009),(10342,'Redonda','11',1009),(10343,'Christ Church','01',1018),(10344,'Saint Andrew','02',1018),(10345,'Saint George','03',1018),(10346,'Saint James','04',1018),(10347,'Saint John','05',1018),(10348,'Saint Joseph','06',1018),(10349,'Saint Lucy','07',1018),(10350,'Saint Michael','08',1018),(10351,'Saint Peter','09',1018),(10352,'Saint Philip','10',1018),(10353,'Saint Thomas','11',1018); /*!40000 ALTER TABLE `civicrm_state_province` ENABLE KEYS */; UNLOCK TABLES; diff --git a/civicrm/templates/CRM/Activity/Form/Activity.tpl b/civicrm/templates/CRM/Activity/Form/Activity.tpl index 937ef5fc5f..278475ca83 100644 --- a/civicrm/templates/CRM/Activity/Form/Activity.tpl +++ b/civicrm/templates/CRM/Activity/Form/Activity.tpl @@ -265,13 +265,13 @@ <a href="{crmURL p='civicrm/contact/view/activity' q=$urlParams}" class="delete button" title="{ts}Delete{/ts}"><span><i class="crm-i fa-trash"></i> {ts}Delete{/ts}</span></a> {/if} {/if} - {if $action eq 4 and call_user_func(array('CRM_Case_BAO_Case','checkPermission'), $activityId, 'File On Case', $atype)} + {if $action eq 4 and $context != 'case' and call_user_func(array('CRM_Case_BAO_Case','checkPermission'), $activityId, 'File On Case', $atype)} <a href="#" onclick="fileOnCase('file', {$activityId}, null, this); return false;" class="cancel button" title="{ts}File On Case{/ts}"><span><i class="crm-i fa-clipboard"></i> {ts}File on Case{/ts}</span></a> + {include file="CRM/Case/Form/ActivityToCase.tpl"} {/if} {include file="CRM/common/formButtons.tpl" location="bottom"} </div> - {include file="CRM/Case/Form/ActivityToCase.tpl"} {if $action eq 1 or $action eq 2 or $context eq 'search' or $context eq 'smog'} {*include custom data js file*} diff --git a/civicrm/templates/CRM/Admin/Form/Setting/Case.tpl b/civicrm/templates/CRM/Admin/Form/Setting/Case.tpl index e18cf987b1..820f2607d5 100644 --- a/civicrm/templates/CRM/Admin/Form/Setting/Case.tpl +++ b/civicrm/templates/CRM/Admin/Form/Setting/Case.tpl @@ -55,5 +55,4 @@ </tr> </table> <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div> - <div class="spacer"></div> </div> diff --git a/civicrm/templates/CRM/Admin/Page/ExtensionDetails.tpl b/civicrm/templates/CRM/Admin/Page/ExtensionDetails.tpl index 3b883fd756..db2126d8ac 100644 --- a/civicrm/templates/CRM/Admin/Page/ExtensionDetails.tpl +++ b/civicrm/templates/CRM/Admin/Page/ExtensionDetails.tpl @@ -31,6 +31,21 @@ <tr> <td class="label">{ts}Development stage{/ts}</td><td>{$extension.develStage}</td> </tr> + <tr> + <td class="label">{ts}Requires{/ts}</td> + <td> + {foreach from=$extension.requires item=ext} + {if array_key_exists($ext, $localExtensionRows)} + {$localExtensionRows.$ext.name} (already downloaded - {$ext}) + {elseif array_key_exists($ext, $remoteExtensionRows)} + {$remoteExtensionRows.$ext.name} (not downloaded - {$ext}) + {else} + {$ext} {ts}(not available){/ts} + {/if} + <br/> + {/foreach} + </td> + </tr> <tr> <td class="label">{ts}Compatible with{/ts}</td> <td> diff --git a/civicrm/templates/CRM/Admin/Page/Extensions/Main.tpl b/civicrm/templates/CRM/Admin/Page/Extensions/Main.tpl index dfc01d5978..34d38092bc 100644 --- a/civicrm/templates/CRM/Admin/Page/Extensions/Main.tpl +++ b/civicrm/templates/CRM/Admin/Page/Extensions/Main.tpl @@ -34,7 +34,7 @@ Depends: CRM/common/enableDisableApi.tpl and CRM/common/jsortable.tpl </tr> <tr class="hiddenElement" id="crm-extensions-details-{$row.id}"> <td> - {include file="CRM/Admin/Page/ExtensionDetails.tpl" extension=$row} + {include file="CRM/Admin/Page/ExtensionDetails.tpl" extension=$row localExtensionRows=$localExtensionRows remoteExtensionRows=$remoteExtensionRows} </td> <td></td><td></td><td></td><td></td> </tr> diff --git a/civicrm/templates/CRM/Contact/Form/Search/Custom/ContribSYBNT.tpl b/civicrm/templates/CRM/Contact/Form/Search/Custom/ContribSYBNT.tpl index b298dbb5a6..32368a6d79 100644 --- a/civicrm/templates/CRM/Contact/Form/Search/Custom/ContribSYBNT.tpl +++ b/civicrm/templates/CRM/Contact/Form/Search/Custom/ContribSYBNT.tpl @@ -42,8 +42,8 @@ </tr> <tr class="crm-contact-custom-search-contribSYBNT-form-block-inclusion_date_one"> <td><label>Inclusion Date One: Start/End</label></td> - <td>{include file="CRM/common/jcalendar.tpl" elementName=start_date_1}</td> - <td>{include file="CRM/common/jcalendar.tpl" elementName=end_date_1}</td> + <td>{$form.start_date_1.html}</td> + <td>{$form.end_date_1.html}</td> <td>{$form.is_first_amount.html} {ts}First time donor only?{/ts}</td> </tr> <tr class="crm-contact-custom-search-contribSYBNT-form-block-min_amount_2"> @@ -54,8 +54,8 @@ </tr> <tr class="crm-contact-custom-search-contribSYBNT-form-block-inclusion_date_two"> <td><label>Inclusion Date Two: Start/End</label></td> - <td>{include file="CRM/common/jcalendar.tpl" elementName=start_date_2}</td> - <td>{include file="CRM/common/jcalendar.tpl" elementName=end_date_2}</td> + <td>{$form.start_date_2.html}</td> + <td>{$form.end_date_2.html}</td> <td> </td> </tr> <tr class="crm-contact-custom-search-contribSYBNT-form-block-exclude_min_amount"> @@ -66,8 +66,8 @@ </tr> <tr class="crm-contact-custom-search-contribSYBNT-form-block-exclusion_date"> <td><label>Exclusion Date: Start/End</label></td> - <td>{include file="CRM/common/jcalendar.tpl" elementName=exclude_start_date}</td> - <td>{include file="CRM/common/jcalendar.tpl" elementName=exclude_end_date}</td> + <td>{$form.exclude_start_date.html}</td> + <td>{$form.exclude_end_date.html}</td> <td> </td> </tr> </table> diff --git a/civicrm/templates/CRM/Contact/Page/DedupeFind.tpl b/civicrm/templates/CRM/Contact/Page/DedupeFind.tpl index 40a4bb37cd..082229e1ff 100644 --- a/civicrm/templates/CRM/Contact/Page/DedupeFind.tpl +++ b/civicrm/templates/CRM/Contact/Page/DedupeFind.tpl @@ -116,22 +116,6 @@ <tbody> </tbody> </table> - {if $cid} - <table style="width: 45%; float: left; margin: 10px;"> - <tr class="columnheader"><th colspan="2">{ts 1=$main_contacts[$cid]}Merge %1 with{/ts}</th></tr> - {foreach from=$dupe_contacts[$cid] item=dupe_name key=dupe_id} - {if $dupe_name} - {capture assign=link}<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=$dupe_id"}">{$dupe_name}</a>{/capture} - {capture assign=merge}<a href="{crmURL p='civicrm/contact/merge' q="reset=1&cid=$cid&oid=$dupe_id"}">{ts}merge{/ts}</a>{/capture} - <tr class="{cycle values="odd-row,even-row"}"> - <td>{$link}</td> - <td style="text-align: right">{$merge}</td> - <td style="text-align: right"><a class='crm-notDuplicate' href="#" title={ts}not a duplicate{/ts} onClick="processDupes( {$main.srcID}, {$main.dstID}, 'dupe-nondupe' );return false;">{ts}not a duplicate{/ts}</a></td> - </tr> - {/if} - {/foreach} - </table> - {/if} </div> {if $context eq 'search'} @@ -181,6 +165,8 @@ "url": {/literal}'{$sourceUrl}'{literal} }, "retrieve": true, + "processing": true, + "serverSide": true, rowCallback: function (row, data) { // Set the checked state of the checkbox in the table $('input.crm-dedupe-select', row).prop('checked', data.is_selected == 1); @@ -189,7 +175,7 @@ } // for action column at the last, set nowrap $('td:last', row).attr('nowrap','nowrap'); - // for conflcts column + // for conflicts column var col = CRM.$('table#dupePairs thead th.crm-contact-conflicts').index(); $('td:eq(' + col + ')', row).attr('nowrap','nowrap'); } @@ -334,8 +320,10 @@ else { var id = []; CRM.$(element).each(function() { - var sth = CRM.$('input.crm-dedupe-select', this); - id.push(CRM.$(sth).prop('name').substr(5)); + var pnName = CRM.$('input.crm-dedupe-select', this).prop('name'); + if (pnName !== undefined) { + id.push(pnName.substr(5)); + } }); var is_selected = CRM.$('.crm-dedupe-select-all').prop('checked') ? 1 : 0; } diff --git a/civicrm/templates/CRM/Contact/Page/Inline/Demographics.tpl b/civicrm/templates/CRM/Contact/Page/Inline/Demographics.tpl index a2dabf1fba..672324d217 100644 --- a/civicrm/templates/CRM/Contact/Page/Inline/Demographics.tpl +++ b/civicrm/templates/CRM/Contact/Page/Inline/Demographics.tpl @@ -48,7 +48,8 @@ <div class="crm-summary-row"> <div class="crm-label">{ts}Date Deceased{/ts}</div> <div class="crm-content crm-contact-deceased_date_display"> - {$deceased_date} + {assign var="date_format" value = $fields.birth_date.smarty_view_format} + {$deceased_date|crmDate:$date_format} </div> </div> {else} diff --git a/civicrm/templates/CRM/Contribute/Form/Contribution/Main.tpl b/civicrm/templates/CRM/Contribute/Form/Contribution/Main.tpl index 4aa2d31e5b..1137637e5b 100644 --- a/civicrm/templates/CRM/Contribute/Form/Contribution/Main.tpl +++ b/civicrm/templates/CRM/Contribute/Form/Contribution/Main.tpl @@ -355,7 +355,7 @@ } else { cj('#recurHelp').hide(); - cj('#amount_sum_label').text('{/literal}{ts escape='js'}Total amount{/ts}{literal}'); + cj('#amount_sum_label').text('{/literal}{ts escape='js'}Total Amount{/ts}{literal}'); } } diff --git a/civicrm/templates/CRM/Contribute/Form/Search/ContributionRecur.tpl b/civicrm/templates/CRM/Contribute/Form/Search/ContributionRecur.tpl index ca8e0fed9c..0da3209080 100644 --- a/civicrm/templates/CRM/Contribute/Form/Search/ContributionRecur.tpl +++ b/civicrm/templates/CRM/Contribute/Form/Search/ContributionRecur.tpl @@ -70,6 +70,13 @@ {include file="CRM/Core/DateRange.tpl" fieldName="contribution_recur_cancel_date" from='_low' to='_high'} </td> </tr> + <tr> + <td>{ts}Recurring Contribution Status{/ts}</td> + <td></td> + <td col='span2'> + {$form.contribution_recur_contribution_status_id.html|crmAddClass:twenty} + </td> + </tr> {if $contributionRecurGroupTree} <tr> <td colspan="4"> diff --git a/civicrm/templates/CRM/Custom/Page/Option.tpl b/civicrm/templates/CRM/Custom/Page/Option.tpl index 7cd373f67d..6ccc8a6206 100644 --- a/civicrm/templates/CRM/Custom/Page/Option.tpl +++ b/civicrm/templates/CRM/Custom/Page/Option.tpl @@ -157,6 +157,7 @@ {/literal} <div class="action-link"> + {crmButton q="reset=1&action=map&fid=$fid&gid=$gid" class="action-item open-inline-noreturn" icon="sort-alpha-asc"}{ts}Alphabetize Options{/ts}{/crmButton} {crmButton q="reset=1&action=add&fid=$fid&gid=$gid" class="action-item" icon="plus-circle"}{ts}Add Option{/ts}{/crmButton} {crmButton p="civicrm/admin/custom/group/field" q="reset=1&action=browse&gid=$gid" class="action-item cancel" icon="times"}{ts}Done{/ts}{/crmButton} </div> diff --git a/civicrm/templates/CRM/Event/Cart/Form/Checkout/Payment.tpl b/civicrm/templates/CRM/Event/Cart/Form/Checkout/Payment.tpl index 92713cf024..fb0a114c63 100644 --- a/civicrm/templates/CRM/Event/Cart/Form/Checkout/Payment.tpl +++ b/civicrm/templates/CRM/Event/Cart/Form/Checkout/Payment.tpl @@ -155,20 +155,28 @@ {/if} <script type="text/javascript"> +{if $form.is_pay_later.name} var pay_later_sel = "input#{$form.is_pay_later.name}"; +{/if} {literal} CRM.$(function($) { + function refresh() { + {/literal}{if $form.is_pay_later.name}{literal} var is_pay_later = $(pay_later_sel).prop("checked"); + {/literal}{else} + var is_pay_later = false; + {/if}{literal} $(".credit_card_info-group").toggle(!is_pay_later); $(".pay-later-instructions").toggle(is_pay_later); $("div.billingNameInfo-section .description").html(is_pay_later ? "Enter the billing address at which you can be invoiced." : "Enter the name as shown on your credit or debit card, and the billing address for this card."); } - $("input#source").prop('disabled', true); - + {/literal}{if $form.is_pay_later.name}{literal} $(pay_later_sel).change(function() { refresh(); }); + {/literal}{/if}{literal} + $("input#source").prop('disabled', true); $(".payment_type-section :radio").change(function() { var sel = $(this).attr("id"); $(".check_number-section").toggle( diff --git a/civicrm/templates/CRM/Event/Form/Registration/Register.tpl b/civicrm/templates/CRM/Event/Form/Registration/Register.tpl index 098fc8b863..f2c9304814 100644 --- a/civicrm/templates/CRM/Event/Form/Registration/Register.tpl +++ b/civicrm/templates/CRM/Event/Form/Registration/Register.tpl @@ -68,7 +68,7 @@ <div class="crm-public-form-item crm-section additional_participants-section" id="noOfparticipants"> <div class="label">{$form.additional_participants.label} <span class="crm-marker" title="{ts}This field is required.{/ts}">*</span></div> <div class="content"> - {$form.additional_participants.html}{if $contact_id || $contact_id == NULL} ({ts}including yourself{/ts}){/if} + {$form.additional_participants.html}{if $contact_id || $contact_id == NULL}{ts}(including yourself){/ts}{/if} <br/> <span class="description">{ts}Fill in your registration information on this page. If you are registering additional people, you will be able to enter their registration information after you complete this page and click "Continue".{/ts}</span> diff --git a/civicrm/templates/CRM/Financial/Form/Search.tpl b/civicrm/templates/CRM/Financial/Form/Search.tpl index 9e0c7543e4..5df3040f49 100644 --- a/civicrm/templates/CRM/Financial/Form/Search.tpl +++ b/civicrm/templates/CRM/Financial/Form/Search.tpl @@ -99,8 +99,8 @@ CRM.$(function($) { {sClass:'crm-batch-checkbox', bSortable:false}, {sClass:'crm-batch-name'}, {sClass:'crm-batch-payment_instrument'}, - {sClass:'crm-batch-item_count right'}, - {sClass:'crm-batch-total right'}, + {sClass:'crm-batch-item_count right', bSortable:false}, + {sClass:'crm-batch-total right', bSortable:false}, {sClass:'crm-batch-status'}, {sClass:'crm-batch-created_by'}, {sClass:'crm-batch-links', bSortable:false}, diff --git a/civicrm/templates/CRM/Profile/Form/Dynamic.tpl b/civicrm/templates/CRM/Profile/Form/Dynamic.tpl index dd4782168e..01ec383133 100644 --- a/civicrm/templates/CRM/Profile/Form/Dynamic.tpl +++ b/civicrm/templates/CRM/Profile/Form/Dynamic.tpl @@ -36,7 +36,7 @@ <div class="crm-submit-buttons"> <span class="crm-button">{$form._qf_Edit_upload_delete.html}</span> - <a class="button cancel" href="{$cancelURL}">{ts}Cancel{/ts}</a> + <a class="button cancel" href="{$cancelURL}">{$cancelButtonText}</a> </div> {else} {if ! empty( $fields )} @@ -221,7 +221,7 @@ <a class="button cancel" href="{$cancelURL}"> <span> <i class="crm-i fa-times"></i> - {ts}Cancel{/ts} + {$cancelButtonText} </span> </a> </div> diff --git a/civicrm/templates/CRM/UF/Form/AdvanceSetting.tpl b/civicrm/templates/CRM/UF/Form/AdvanceSetting.tpl index d5b049bfb1..ff852d85ba 100644 --- a/civicrm/templates/CRM/UF/Form/AdvanceSetting.tpl +++ b/civicrm/templates/CRM/UF/Form/AdvanceSetting.tpl @@ -55,6 +55,16 @@ <td>{$form.cancel_URL.html} {help id='id-cancel_URL' file="CRM/UF/Form/Group.hlp"}</td> </tr> + <tr class="crm-uf-advancesetting-form-block-cancel_button_text"> + <td class="label">{$form.cancel_button_text.label}</td> + <td>{$form.cancel_button_text.html} {help id='id-cancel_button_text' file="CRM/UF/Form/Group.hlp"}</td> + </tr> + + <tr class="crm-uf-advancesetting-form-block-submit_button_text"> + <td class="label">{$form.submit_button_text.label}</td> + <td>{$form.submit_button_text.html} {help id='id-submit_button_text' file="CRM/UF/Form/Group.hlp"}</td> + </tr> + <tr class="crm-uf-advancesetting-form-block-add_captcha"> <td class="label"></td> <td>{$form.add_captcha.html} {$form.add_captcha.label} {help id='id-add_captcha' file="CRM/UF/Form/Group.hlp"}</td> diff --git a/civicrm/templates/CRM/UF/Form/Group.hlp b/civicrm/templates/CRM/UF/Form/Group.hlp index 1844562738..523a073e77 100644 --- a/civicrm/templates/CRM/UF/Form/Group.hlp +++ b/civicrm/templates/CRM/UF/Form/Group.hlp @@ -103,6 +103,20 @@ {ts}If you are using this profile as a contact signup or edit form, and want to redirect the user to a static URL if they click the Cancel button - enter the complete URL here. If this field is left blank, the built-in Profile form will be redisplayed.{/ts} {/htxt} +{htxt id='id-cancel_button_text-title'} + {ts}Cancel Button Text{/ts} +{/htxt} +{htxt id='id-cancel_button_text'} + {ts}Override the default button text for the cancel button for this profile{/ts} +{/htxt} + +{htxt id='id-submit_button_text-title'} + {ts}Submit Button Text{/ts} +{/htxt} +{htxt id='id-submit_button_text'} + {ts}Override the default button text for the submit button for this profile{/ts} +{/htxt} + {htxt id='id-add_captcha-title'} {ts}reCaptcha{/ts} {/htxt} diff --git a/civicrm/templates/CRM/common/version.tpl b/civicrm/templates/CRM/common/version.tpl index da8326116a..21f4f3f3ef 100644 --- a/civicrm/templates/CRM/common/version.tpl +++ b/civicrm/templates/CRM/common/version.tpl @@ -1 +1 @@ -4.7.27 \ No newline at end of file +4.7.28 \ No newline at end of file diff --git a/civicrm/vendor/autoload.php b/civicrm/vendor/autoload.php index f2fe7254a2..616bd0f712 100644 --- a/civicrm/vendor/autoload.php +++ b/civicrm/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer' . '/autoload_real.php'; -return ComposerAutoloaderInit9ca86e567e4591c65a1efa0f4f9bbea6::getLoader(); +return ComposerAutoloaderInit1ebc8b5f142ef547147d855925aa5948::getLoader(); diff --git a/civicrm/vendor/composer/autoload_psr4.php b/civicrm/vendor/composer/autoload_psr4.php index 9d075a49ce..5616bfd3f4 100644 --- a/civicrm/vendor/composer/autoload_psr4.php +++ b/civicrm/vendor/composer/autoload_psr4.php @@ -11,6 +11,8 @@ return array( 'Zend\\Escaper\\' => array($vendorDir . '/zendframework/zend-escaper/src'), 'PhpOffice\\PhpWord\\' => array($vendorDir . '/phpoffice/phpword/src/PhpWord'), 'PhpOffice\\Common\\' => array($vendorDir . '/phpoffice/common/src/Common'), + 'MJS\\TopSort\\Tests\\' => array($vendorDir . '/marcj/topsort/tests/Tests'), + 'MJS\\TopSort\\' => array($vendorDir . '/marcj/topsort/src'), 'FontLib\\' => array($vendorDir . '/phenx/php-font-lib/src/FontLib'), 'Dompdf\\' => array($vendorDir . '/dompdf/dompdf/src'), 'Civi\\Cxn\\Rpc\\' => array($vendorDir . '/civicrm/civicrm-cxn-rpc/src'), diff --git a/civicrm/vendor/composer/autoload_real.php b/civicrm/vendor/composer/autoload_real.php index 88e792302e..ebaeeb3c7f 100644 --- a/civicrm/vendor/composer/autoload_real.php +++ b/civicrm/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit9ca86e567e4591c65a1efa0f4f9bbea6 +class ComposerAutoloaderInit1ebc8b5f142ef547147d855925aa5948 { private static $loader; @@ -19,9 +19,9 @@ class ComposerAutoloaderInit9ca86e567e4591c65a1efa0f4f9bbea6 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit9ca86e567e4591c65a1efa0f4f9bbea6', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit1ebc8b5f142ef547147d855925aa5948', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInit9ca86e567e4591c65a1efa0f4f9bbea6', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit1ebc8b5f142ef547147d855925aa5948', 'loadClassLoader')); $includePaths = require __DIR__ . '/include_paths.php'; array_push($includePaths, get_include_path()); @@ -31,7 +31,7 @@ class ComposerAutoloaderInit9ca86e567e4591c65a1efa0f4f9bbea6 if ($useStaticLoader) { require_once __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit9ca86e567e4591c65a1efa0f4f9bbea6::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit1ebc8b5f142ef547147d855925aa5948::getInitializer($loader)); } else { $map = require __DIR__ . '/autoload_namespaces.php'; foreach ($map as $namespace => $path) { @@ -52,19 +52,19 @@ class ComposerAutoloaderInit9ca86e567e4591c65a1efa0f4f9bbea6 $loader->register(true); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit9ca86e567e4591c65a1efa0f4f9bbea6::$files; + $includeFiles = Composer\Autoload\ComposerStaticInit1ebc8b5f142ef547147d855925aa5948::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire9ca86e567e4591c65a1efa0f4f9bbea6($fileIdentifier, $file); + composerRequire1ebc8b5f142ef547147d855925aa5948($fileIdentifier, $file); } return $loader; } } -function composerRequire9ca86e567e4591c65a1efa0f4f9bbea6($fileIdentifier, $file) +function composerRequire1ebc8b5f142ef547147d855925aa5948($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { require $file; diff --git a/civicrm/vendor/composer/autoload_static.php b/civicrm/vendor/composer/autoload_static.php index 49c913317c..a130f3d531 100644 --- a/civicrm/vendor/composer/autoload_static.php +++ b/civicrm/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit9ca86e567e4591c65a1efa0f4f9bbea6 +class ComposerStaticInit1ebc8b5f142ef547147d855925aa5948 { public static $files = array ( 'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php', @@ -23,6 +23,11 @@ class ComposerStaticInit9ca86e567e4591c65a1efa0f4f9bbea6 'PhpOffice\\PhpWord\\' => 18, 'PhpOffice\\Common\\' => 17, ), + 'M' => + array ( + 'MJS\\TopSort\\Tests\\' => 18, + 'MJS\\TopSort\\' => 12, + ), 'F' => array ( 'FontLib\\' => 8, @@ -58,6 +63,14 @@ class ComposerStaticInit9ca86e567e4591c65a1efa0f4f9bbea6 array ( 0 => __DIR__ . '/..' . '/phpoffice/common/src/Common', ), + 'MJS\\TopSort\\Tests\\' => + array ( + 0 => __DIR__ . '/..' . '/marcj/topsort/tests/Tests', + ), + 'MJS\\TopSort\\' => + array ( + 0 => __DIR__ . '/..' . '/marcj/topsort/src', + ), 'FontLib\\' => array ( 0 => __DIR__ . '/..' . '/phenx/php-font-lib/src/FontLib', @@ -331,10 +344,10 @@ class ComposerStaticInit9ca86e567e4591c65a1efa0f4f9bbea6 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit9ca86e567e4591c65a1efa0f4f9bbea6::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit9ca86e567e4591c65a1efa0f4f9bbea6::$prefixDirsPsr4; - $loader->prefixesPsr0 = ComposerStaticInit9ca86e567e4591c65a1efa0f4f9bbea6::$prefixesPsr0; - $loader->classMap = ComposerStaticInit9ca86e567e4591c65a1efa0f4f9bbea6::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit1ebc8b5f142ef547147d855925aa5948::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit1ebc8b5f142ef547147d855925aa5948::$prefixDirsPsr4; + $loader->prefixesPsr0 = ComposerStaticInit1ebc8b5f142ef547147d855925aa5948::$prefixesPsr0; + $loader->classMap = ComposerStaticInit1ebc8b5f142ef547147d855925aa5948::$classMap; }, null, ClassLoader::class); } diff --git a/civicrm/vendor/composer/installed.json b/civicrm/vendor/composer/installed.json index 08983d4e44..2bf054e1b2 100644 --- a/civicrm/vendor/composer/installed.json +++ b/civicrm/vendor/composer/installed.json @@ -406,6 +406,48 @@ "description": "phpQuery is a server-side, chainable, CSS3 selector driven Document Object Model (DOM) API based on jQuery JavaScript Library", "homepage": "http://code.google.com/p/phpquery/" }, + { + "name": "marcj/topsort", + "version": "dev-1.0-php53", + "version_normalized": "dev-1.0-php53", + "source": { + "type": "git", + "url": "https://github.com/totten/topsort.php.git", + "reference": "2765723d36f0e536d987e42cbc60de52209212bd" + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "codeclimate/php-test-reporter": "dev-master", + "phpunit/phpunit": "~4.0", + "symfony/console": "~2.5" + }, + "time": "2016-03-25 21:38:05", + "type": "library", + "installation-source": "source", + "autoload": { + "psr-4": { + "MJS\\TopSort\\": "src/", + "MJS\\TopSort\\Tests\\": "tests/Tests/" + } + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marc J. Schmidt", + "email": "marc@marcjschmidt.de" + } + ], + "description": "High-Performance TopSort/Dependency resolving algorithm", + "keywords": [ + "dependency resolving", + "topological sort", + "topsort" + ] + }, { "name": "pclzip/pclzip", "version": "2.8.2", diff --git a/civicrm/vendor/marcj/topsort/.travis.yml b/civicrm/vendor/marcj/topsort/.travis.yml new file mode 100644 index 0000000000..b9a86c554d --- /dev/null +++ b/civicrm/vendor/marcj/topsort/.travis.yml @@ -0,0 +1,21 @@ +language: php + +php: + - 5.4 + - 5.5 + - 5.6 + - hhvm + +install: + - composer install + +script: + - phpunit + +matrix: + fast_finish: true + allow_failures: + - php: hhvm + +after_script: + - ./bin/upload-coverage.sh \ No newline at end of file diff --git a/civicrm/vendor/marcj/topsort/LICENSE b/civicrm/vendor/marcj/topsort/LICENSE new file mode 100644 index 0000000000..fc7ec4fc02 --- /dev/null +++ b/civicrm/vendor/marcj/topsort/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Marc J. Schmidt <marc@marcjschmidt.de> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/civicrm/vendor/marcj/topsort/README.md b/civicrm/vendor/marcj/topsort/README.md new file mode 100644 index 0000000000..18288789b4 --- /dev/null +++ b/civicrm/vendor/marcj/topsort/README.md @@ -0,0 +1,212 @@ +# Topological Sort / Dependency resolver in PHP + +[](https://travis-ci.org/marcj/topsort.php) +[](https://codeclimate.com/github/marcj/topsort.php) +[](https://codeclimate.com/github/marcj/topsort.php) + +This library provides several implementations of a Topological Sort (topSort). +In additional to the plain sorting algorithm it provides several implementations of a Grouped Topological Sort, +means you can pass items with a type which will be grouped together in the sorting. With its implementation +of using strings instead of arrays its over 20x faster than regular implementations. + +## What is it? + +A topological sort is useful for determining dependency loading. It tells you which elements need to be proceeded first +in order to fulfill all dependencies in the correct order. + +Example usage: Unit of Work (relations), simple Package manager, Dependency Injection, ... + +Examples: + +```php +$sorter = new StringSort(); + +$sorter->add('car1', ['owner1', 'brand1']); +$sorter->add('brand1'); +$sorter->add('brand2'); +$sorter->add('owner1', ['brand1']); +$sorter->add('owner2', ['brand2']); + +$result = $sorter->sort(); +// output would be: +[ + 'brand1', + 'owner1', + 'car1', + 'brand2', + 'owner2' +] +``` + +Sometimes you want to group equal types together (imagine a UnitOfWork which wants to combine all elements from the +same type to stored those in one batch): + +```php +$sorter = new GroupedStringSort(); + +$sorter->add('car1', 'car', ['owner1', 'brand1']); +$sorter->add('brand1', 'brand'); +$sorter->add('brand2', 'brand'); +$sorter->add('owner1', 'user', ['brand1']); +$sorter->add('owner2', 'user', ['brand2']); + +$result = $sorter->sort(); +// output would be: +[ + 'brand2', + 'brand1', + 'owner2', + 'owner1', + 'car1' +] + +$groups = $sorter->getGroups(); +[ + {type: 'brand', level: 0, position: 0, length: 2}, + {type: 'user', level: 1, position: 2, length: 2}, + {type: 'car', level: 2, position: 4, length: 1}, +] +//of course there may be several groups with the same type, if the dependency graphs makes this necessary. + +foreach ($groups as $group) { + $firstItem = $result[$groups->position]; + $allItemsOfThisGroup = array_slice($result, $group->position, $group->length); +} +``` + +You can only store strings as elements. +To sort PHP objects you can stored its hash instead. `$sorter->add(spl_object_hash($obj1), [spl_object_hash($objt1Dep)])`. + +## Installation + +Use composer package: [marcj/topsort)[https://packagist.org/packages/marcj/topsort] +``` +{ + "require": { + "marcj/topsort": "~0.1" + } +} +``` + +```php +include 'vendor/autoload.php'; + +$sorter = new GroupedStringSort; +$sorter->ad(...); + +$result = $sorter->sort(); +``` + +## Implementations + +tl;dr: Use `FixedArraySort` for normal topSort or `GroupedStringSort` for grouped topSort since its always the fastest +and has a good memory footprint. + +### ArraySort + +This is the most basic, most inefficient implementation of topSort using plain php arrays. + +### FixedArraySort + +This uses \SplFixedArray of php and is therefore much more memory friendly. + +### StringSort + +This uses a string as storage and has therefore no array overhead. It's thus a bit faster and has almost equal +memory footprint like FixedArraySort. +Small drawback: You can not store element ids containing a null byte. + +### GroupedArraySort + +This is the most basic, not so efficient implementation of grouped topSort using plain php arrays. + +### GroupedFixedArraySort + +This uses \SplFixedArray of php and is therefore much more memory friendly, but is extremely inefficient, + because it burns your CPU since it has to shifts all array in php and not in c (like normal GroupedArraySort it does + with `array_splice`). + +### GroupedStringSort + +This uses a string as storage and has therefore no array operations overhead. It's extremely faster than those implementations +above and has almost equal memory footprint like FixedArraySort. +Small drawback: You can not store element ids containing a null byte. + +## Benchmarks + +Test data: 1/3 has two edges, 1/3 has one edge and 1/3 has no edges. Use the `benchmark` command in `./bin/console` +to play with it. + +### 50 elements + +Implementation | Memory | Duration +---------------|--------------|--------- +FixedArraySort | 2,344b | 0.0005s +ArraySort | 6,728b | 0.0005s +StringSort | 2,008b | 0.0005s + + +Implementation | Memory | Duration +----------------------|--------------|--------- +GroupedFixedArraySort | 2,728b | 0.0013s +GroupedArraySort | 10,912b | 0.0010s +GroupedStringSort | 2,496b | 0.0010s + + +### 1.000 elements + +Implementation | Memory | Duration +---------------|--------------|--------- +FixedArraySort | 8,944b | 0.0098s +ArraySort | 98,208b | 0.0102s +StringSort | 9,224b | 0.0095s + + +Implementation | Memory | Duration +----------------------|--------------|--------- +GroupedFixedArraySort | 35,296b | 0.1467s +GroupedArraySort | 132,960b | 0.0497s +GroupedStringSort | 36,376b | 0.0248s + + +### 10.000 elements + +Implementation | Memory | Duration +---------------|--------------|--------- +FixedArraySort | 81,712b | 0.1146s +ArraySort | 1,014,000b | 0.1128s +StringSort | 91,088b | 0.1144s + + +Implementation | Memory | Duration +----------------------|--------------|--------- +GroupedFixedArraySort | 395,224b | 13.2805s +GroupedArraySort | 1,454,832b | 5.5021s +GroupedStringSort | 391,704b | 0.2504s + + +### 100.000 elements + +`--` means took too long. + +Implementation | Memory | Duration +---------------|--------------|--------- +FixedArraySort | 801,496b | 1.8707s +ArraySort | 9,850,048b | 1.9147s +StringSort | 1,001,176b | 1.7949s + + +Implementation | Memory | Duration +----------------------|--------------|--------- +GroupedFixedArraySort | -- | -- +GroupedArraySort | -- | -- +GroupedStringSort | -3,795,944b | 6.6949s + +### 1.000.000 elements + + +Implementation | Memory | Duration +---------------|--------------|--------- +FixedArraySort | 7,995,152b | 86.6527s +ArraySort | 96,386,112b | 97.5971s +StringSort | 10,994,248b | 80.8750s diff --git a/civicrm/vendor/marcj/topsort/bin/console b/civicrm/vendor/marcj/topsort/bin/console new file mode 100755 index 0000000000..1799421805 --- /dev/null +++ b/civicrm/vendor/marcj/topsort/bin/console @@ -0,0 +1,11 @@ +#!/usr/bin/env php +<?php + +include __DIR__ . '/../vendor/autoload.php'; + +use MJS\TopSort\Command\BenchmarkCommand; +use Symfony\Component\Console\Application; + +$application = new Application(); +$application->add(new BenchmarkCommand); +$application->run(); \ No newline at end of file diff --git a/civicrm/vendor/marcj/topsort/bin/upload-coverage.sh b/civicrm/vendor/marcj/topsort/bin/upload-coverage.sh new file mode 100755 index 0000000000..e0962c0ac0 --- /dev/null +++ b/civicrm/vendor/marcj/topsort/bin/upload-coverage.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then + vendor/bin/test-reporter --stdout > codeclimate.json + curl -X POST -d @codeclimate.json -H "Content-Type: application/json" -H "User-Agent: Code Climate (PHP Test Reporter v1.0.1-dev)" https://codeclimate.com/test_reports +fi; \ No newline at end of file diff --git a/civicrm/vendor/marcj/topsort/composer.json b/civicrm/vendor/marcj/topsort/composer.json new file mode 100644 index 0000000000..1bdc4bbc4a --- /dev/null +++ b/civicrm/vendor/marcj/topsort/composer.json @@ -0,0 +1,31 @@ +{ + "name": "marcj/topsort", + "type": "library", + "description": "High-Performance TopSort/Dependency resolving algorithm", + "keywords": [ + "topological sort", + "topsort", + "dependency resolving" + ], + "license": "MIT", + "authors": [ + { + "name": "Marc J. Schmidt", + "email": "marc@marcjschmidt.de" + } + ], + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "symfony/console": "~2.5", + "codeclimate/php-test-reporter": "dev-master" + }, + "autoload": { + "psr-4": { + "MJS\\TopSort\\": "src/", + "MJS\\TopSort\\Tests\\": "tests/Tests/" + } + } +} diff --git a/civicrm/vendor/marcj/topsort/composer.lock b/civicrm/vendor/marcj/topsort/composer.lock new file mode 100644 index 0000000000..0db7b0b85e --- /dev/null +++ b/civicrm/vendor/marcj/topsort/composer.lock @@ -0,0 +1,1273 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "hash": "cc6783e7988291f4d16973c4460bf448", + "packages": [], + "packages-dev": [ + { + "name": "codeclimate/php-test-reporter", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/codeclimate/php-test-reporter.git", + "reference": "0a51e54c9ddebfe65116c5f04d9d5c54fbdb15bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/codeclimate/php-test-reporter/zipball/0a51e54c9ddebfe65116c5f04d9d5c54fbdb15bf", + "reference": "0a51e54c9ddebfe65116c5f04d9d5c54fbdb15bf", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "php": ">=5.3", + "satooshi/php-coveralls": "0.6.*", + "symfony/console": ">=2.0" + }, + "require-dev": { + "phpunit/phpunit": "3.7.*@stable" + }, + "bin": [ + "composer/bin/test-reporter" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.1.x-dev" + } + }, + "autoload": { + "psr-0": { + "CodeClimate\\Component": "src/", + "CodeClimate\\Bundle": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Code Climate", + "email": "hello@codeclimate.com", + "homepage": "https://codeclimate.com" + } + ], + "description": "PHP client for reporting test coverage to Code Climate", + "homepage": "https://github.com/codeclimate/php-test-reporter", + "keywords": [ + "codeclimate", + "coverage" + ], + "time": "2014-10-07 22:28:12" + }, + { + "name": "doctrine/instantiator", + "version": "1.0.4", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "f976e5de371104877ebc89bd8fecb0019ed9c119" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f976e5de371104877ebc89bd8fecb0019ed9c119", + "reference": "f976e5de371104877ebc89bd8fecb0019ed9c119", + "shasum": "" + }, + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "2.0.*@ALPHA" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Instantiator\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2014-10-13 12:58:55" + }, + { + "name": "guzzle/guzzle", + "version": "v3.9.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle3.git", + "reference": "54991459675c1a2924122afbb0e5609ade581155" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/54991459675c1a2924122afbb0e5609ade581155", + "reference": "54991459675c1a2924122afbb0e5609ade581155", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "php": ">=5.3.3", + "symfony/event-dispatcher": "~2.1" + }, + "replace": { + "guzzle/batch": "self.version", + "guzzle/cache": "self.version", + "guzzle/common": "self.version", + "guzzle/http": "self.version", + "guzzle/inflection": "self.version", + "guzzle/iterator": "self.version", + "guzzle/log": "self.version", + "guzzle/parser": "self.version", + "guzzle/plugin": "self.version", + "guzzle/plugin-async": "self.version", + "guzzle/plugin-backoff": "self.version", + "guzzle/plugin-cache": "self.version", + "guzzle/plugin-cookie": "self.version", + "guzzle/plugin-curlauth": "self.version", + "guzzle/plugin-error-response": "self.version", + "guzzle/plugin-history": "self.version", + "guzzle/plugin-log": "self.version", + "guzzle/plugin-md5": "self.version", + "guzzle/plugin-mock": "self.version", + "guzzle/plugin-oauth": "self.version", + "guzzle/service": "self.version", + "guzzle/stream": "self.version" + }, + "require-dev": { + "doctrine/cache": "~1.3", + "monolog/monolog": "~1.0", + "phpunit/phpunit": "3.7.*", + "psr/log": "~1.0", + "symfony/class-loader": "~2.1", + "zendframework/zend-cache": "2.*,<2.3", + "zendframework/zend-log": "2.*,<2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.9-dev" + } + }, + "autoload": { + "psr-0": { + "Guzzle": "src/", + "Guzzle\\Tests": "tests/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Guzzle Community", + "homepage": "https://github.com/guzzle/guzzle/contributors" + } + ], + "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2014-08-11 04:32:36" + }, + { + "name": "phpunit/php-code-coverage", + "version": "2.0.11", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "53603b3c995f5aab6b59c8e08c3a663d2cc810b7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/53603b3c995f5aab6b59c8e08c3a663d2cc810b7", + "reference": "53603b3c995f5aab6b59c8e08c3a663d2cc810b7", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "~1.3", + "sebastian/environment": "~1.0", + "sebastian/version": "~1.0" + }, + "require-dev": { + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "~4.1" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2014-08-31 06:33:04" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.3.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb", + "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "File/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2013-10-10 15:34:57" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", + "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "Text/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2014-01-30 17:20:04" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c", + "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "PHP/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2013-08-02 07:42:54" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "f8d5d08c56de5cfd592b3340424a81733259a876" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/f8d5d08c56de5cfd592b3340424a81733259a876", + "reference": "f8d5d08c56de5cfd592b3340424a81733259a876", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2014-08-31 06:12:13" + }, + { + "name": "phpunit/phpunit", + "version": "4.3.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "06005259429c156c02596add91f6a59c7dc3d4af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/06005259429c156c02596add91f6a59c7dc3d4af", + "reference": "06005259429c156c02596add91f6a59c7dc3d4af", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpunit/php-code-coverage": "~2.0", + "phpunit/php-file-iterator": "~1.3.1", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "~1.0.2", + "phpunit/phpunit-mock-objects": "~2.3", + "sebastian/comparator": "~1.0", + "sebastian/diff": "~1.1", + "sebastian/environment": "~1.0", + "sebastian/exporter": "~1.0", + "sebastian/version": "~1.0", + "symfony/yaml": "~2.0" + }, + "suggest": { + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "", + "../../symfony/yaml/" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "http://www.phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2014-10-06 06:20:35" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "c63d2367247365f688544f0d500af90a11a44c65" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/c63d2367247365f688544f0d500af90a11a44c65", + "reference": "c63d2367247365f688544f0d500af90a11a44c65", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "~1.0,>=1.0.1", + "php": ">=5.3.3", + "phpunit/php-text-template": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.3" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2014-10-03 05:12:11" + }, + { + "name": "psr/log", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-0": { + "Psr\\Log\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2012-12-21 11:40:51" + }, + { + "name": "satooshi/php-coveralls", + "version": "v0.6.1", + "source": { + "type": "git", + "url": "https://github.com/satooshi/php-coveralls.git", + "reference": "dd0df95bd37a7cf5c5c50304dfe260ffe4b50760" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/satooshi/php-coveralls/zipball/dd0df95bd37a7cf5c5c50304dfe260ffe4b50760", + "reference": "dd0df95bd37a7cf5c5c50304dfe260ffe4b50760", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-simplexml": "*", + "guzzle/guzzle": ">=3.0", + "php": ">=5.3", + "psr/log": "1.0.0", + "symfony/config": ">=2.0", + "symfony/console": ">=2.0", + "symfony/stopwatch": ">=2.2", + "symfony/yaml": ">=2.0" + }, + "require-dev": { + "apigen/apigen": "2.8.*@stable", + "pdepend/pdepend": "dev-master", + "phpmd/phpmd": "dev-master", + "phpunit/php-invoker": ">=1.1.0,<1.2.0", + "phpunit/phpunit": "3.7.*@stable", + "sebastian/finder-facade": "dev-master", + "sebastian/phpcpd": "1.4.*@stable", + "squizlabs/php_codesniffer": "1.4.*@stable", + "theseer/fdomdocument": "dev-master" + }, + "bin": [ + "composer/bin/coveralls" + ], + "type": "library", + "autoload": { + "psr-0": { + "Contrib\\Component": "src/", + "Contrib\\Bundle": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kitamura Satoshi", + "email": "with.no.parachute@gmail.com", + "homepage": "https://www.facebook.com/satooshi.jp" + } + ], + "description": "PHP client library for Coveralls API", + "homepage": "https://github.com/satooshi/php-coveralls", + "keywords": [ + "ci", + "coverage", + "github", + "test" + ], + "time": "2013-05-04 08:07:33" + }, + { + "name": "sebastian/comparator", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "e54a01c0da1b87db3c5a3c4c5277ddf331da4aef" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/e54a01c0da1b87db3c5a3c4c5277ddf331da4aef", + "reference": "e54a01c0da1b87db3c5a3c4c5277ddf331da4aef", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.1", + "sebastian/exporter": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2014-05-11 23:00:21" + }, + { + "name": "sebastian/diff", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "5843509fed39dee4b356a306401e9dd1a931fec7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/5843509fed39dee4b356a306401e9dd1a931fec7", + "reference": "5843509fed39dee4b356a306401e9dd1a931fec7", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "http://www.github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2014-08-15 10:29:00" + }, + { + "name": "sebastian/environment", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "6288ebbf6fa3ed2b2ff2d69c356fbaaf4f0971a7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6288ebbf6fa3ed2b2ff2d69c356fbaaf4f0971a7", + "reference": "6288ebbf6fa3ed2b2ff2d69c356fbaaf4f0971a7", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2014-10-07 09:23:16" + }, + { + "name": "sebastian/exporter", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "c7d59948d6e82818e1bdff7cadb6c34710eb7dc0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c7d59948d6e82818e1bdff7cadb6c34710eb7dc0", + "reference": "c7d59948d6e82818e1bdff7cadb6c34710eb7dc0", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2014-09-10 00:51:36" + }, + { + "name": "sebastian/version", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43", + "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43", + "shasum": "" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2014-03-07 15:35:33" + }, + { + "name": "symfony/config", + "version": "v2.5.5", + "target-dir": "Symfony/Component/Config", + "source": { + "type": "git", + "url": "https://github.com/symfony/Config.git", + "reference": "0316364bfebc8b080077c731a99f189341476bd7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Config/zipball/0316364bfebc8b080077c731a99f189341476bd7", + "reference": "0316364bfebc8b080077c731a99f189341476bd7", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/filesystem": "~2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Config\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Config Component", + "homepage": "http://symfony.com", + "time": "2014-09-23 05:25:11" + }, + { + "name": "symfony/console", + "version": "v2.5.5", + "target-dir": "Symfony/Component/Console", + "source": { + "type": "git", + "url": "https://github.com/symfony/Console.git", + "reference": "ca053eaa031c93afb68a71e4eb1f4168dfd4a661" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Console/zipball/ca053eaa031c93afb68a71e4eb1f4168dfd4a661", + "reference": "ca053eaa031c93afb68a71e4eb1f4168dfd4a661", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.1" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Console\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Console Component", + "homepage": "http://symfony.com", + "time": "2014-09-25 09:53:56" + }, + { + "name": "symfony/event-dispatcher", + "version": "v2.5.5", + "target-dir": "Symfony/Component/EventDispatcher", + "source": { + "type": "git", + "url": "https://github.com/symfony/EventDispatcher.git", + "reference": "f6281337bf5f985f585d1db6a83adb05ce531f46" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/f6281337bf5f985f585d1db6a83adb05ce531f46", + "reference": "f6281337bf5f985f585d1db6a83adb05ce531f46", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.0", + "symfony/dependency-injection": "~2.0,<2.6.0", + "symfony/stopwatch": "~2.2" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "http://symfony.com", + "time": "2014-09-28 15:56:11" + }, + { + "name": "symfony/filesystem", + "version": "v2.5.5", + "target-dir": "Symfony/Component/Filesystem", + "source": { + "type": "git", + "url": "https://github.com/symfony/Filesystem.git", + "reference": "4e62fab0060a826561c78b665925b37c870c45f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Filesystem/zipball/4e62fab0060a826561c78b665925b37c870c45f5", + "reference": "4e62fab0060a826561c78b665925b37c870c45f5", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Filesystem\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "http://symfony.com", + "time": "2014-09-22 09:14:18" + }, + { + "name": "symfony/stopwatch", + "version": "v2.5.5", + "target-dir": "Symfony/Component/Stopwatch", + "source": { + "type": "git", + "url": "https://github.com/symfony/Stopwatch.git", + "reference": "9f8a33a24f2378c0ec5f372a8d50b2d43069c050" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Stopwatch/zipball/9f8a33a24f2378c0ec5f372a8d50b2d43069c050", + "reference": "9f8a33a24f2378c0ec5f372a8d50b2d43069c050", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Stopwatch\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Stopwatch Component", + "homepage": "http://symfony.com", + "time": "2014-09-22 09:14:18" + }, + { + "name": "symfony/yaml", + "version": "v2.5.5", + "target-dir": "Symfony/Component/Yaml", + "source": { + "type": "git", + "url": "https://github.com/symfony/Yaml.git", + "reference": "b1dbc53593b98c2d694ebf383660ac9134d30b96" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/b1dbc53593b98c2d694ebf383660ac9134d30b96", + "reference": "b1dbc53593b98c2d694ebf383660ac9134d30b96", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Yaml\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Yaml Component", + "homepage": "http://symfony.com", + "time": "2014-09-22 09:14:18" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": { + "codeclimate/php-test-reporter": 20 + }, + "prefer-stable": false, + "platform": { + "php": ">=5.3" + }, + "platform-dev": [] +} diff --git a/civicrm/vendor/marcj/topsort/phpunit.xml b/civicrm/vendor/marcj/topsort/phpunit.xml new file mode 100644 index 0000000000..602ec10fe1 --- /dev/null +++ b/civicrm/vendor/marcj/topsort/phpunit.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<phpunit backupGlobals="false" + backupStaticAttributes="false" + colors="true" + convertErrorsToExceptions="true" + convertNoticesToExceptions="true" + convertWarningsToExceptions="true" + processIsolation="false" + stopOnFailure="false" + syntaxCheck="false" + bootstrap="tests/bootstrap.php" + > + + <testsuites> + <testsuite name="TopSort Test Suite"> + <directory>tests/</directory> + </testsuite> + </testsuites> + + + <logging> + <log type="coverage-html" target="./report/" charset="UTF-8" + highlight="false" lowUpperBound="35" highLowerBound="70"/> + <log type="coverage-text" target="php://stdout" showUncoveredFiles="true"/> + <log type="coverage-clover" target="build/logs/clover.xml"/> + </logging> + + <filter> + <whitelist> + <directory>src/</directory> + <exclude> + <directory>src/Command</directory> + </exclude> + </whitelist> + </filter> +</phpunit> diff --git a/civicrm/vendor/marcj/topsort/src/CircularDependencyException.php b/civicrm/vendor/marcj/topsort/src/CircularDependencyException.php new file mode 100644 index 0000000000..201276fe4c --- /dev/null +++ b/civicrm/vendor/marcj/topsort/src/CircularDependencyException.php @@ -0,0 +1,61 @@ +<?php + +namespace MJS\TopSort; + +class CircularDependencyException extends \Exception +{ + protected $nodes; + protected $end; + + /** + * @param string $message + * @param int $code + * @param \Exception $previous + * @param string[] $nodes + */ + public function __construct($message = '', $code = 0, \Exception $previous = null, $nodes) + { + parent::__construct($message, $code, $previous); + array_pop($nodes); + $this->end = $nodes[count($nodes) - 1]; + $this->nodes = $nodes; + + } + + /** + * @param string[] $nodes + * + * @return CircularDependencyException + */ + public static function create($nodes) + { + $path = implode('->', $nodes); + $message = sprintf('Circular dependency found: %s', $path); + $exception = new static($message, 0, null, $nodes); + return $exception; + } + + /** + * @return string + */ + public function getStart() + { + return $this->nodes[0]; + } + + /** + * @return string + */ + public function getEnd() + { + return $this->end; + } + + /** + * @return mixed + */ + public function getNodes() + { + return $this->nodes; + } +} \ No newline at end of file diff --git a/civicrm/vendor/marcj/topsort/src/Command/BenchmarkCommand.php b/civicrm/vendor/marcj/topsort/src/Command/BenchmarkCommand.php new file mode 100644 index 0000000000..6277de924b --- /dev/null +++ b/civicrm/vendor/marcj/topsort/src/Command/BenchmarkCommand.php @@ -0,0 +1,85 @@ +<?php +namespace MJS\TopSort\Command; + +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Helper\ProgressBar; +use Symfony\Component\Console\Helper\Table; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; + +class BenchmarkCommand extends Command +{ + /** + * @var Table + */ + protected $table; + + /** + * @var ProgressBar + */ + protected $process; + + protected function configure() + { + $this + ->setName('benchmark') + ->addArgument('count', InputArgument::OPTIONAL, 'Count', 1000) + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $this->testSimpleCount($input->getArgument('count'), $output); + $this->testGroupCount($input->getArgument('count'), $output); + } + + protected function testGroupCount($count, $output) + { + $this->test($count, ['GroupedFixedArraySort', 'GroupedArraySort', 'GroupedStringSort'], $output); + } + + protected function testSimpleCount($count, $output) + { + $this->test($count, ['FixedArraySort', 'ArraySort', 'StringSort'], $output); + } + + protected function test($count, $classes, OutputInterface $output) + { + $this->table = new Table($output); + $this->table->setHeaders(array('Implementation', 'Memory', 'Duration')); + $output->writeln(sprintf('<info>%d elements</info>', $count)); + + $this->process = new ProgressBar($output, count($classes)); + $this->process->start(); + foreach ($classes as $class) { + $shortClass = $class; +// if (in_array($class, $blacklist)) { +// $this->table->addRow([$class, '--', '--']); +// continue; +// }; + + $path = __DIR__ . '/../../bin/test.php'; + + $result = `php $path $class $count`; + $data = json_decode($result, true); + if (!$data) { + echo $result; + } + + $this->table->addRow( + [ + $shortClass, + sprintf('%11sb', number_format($data['memory'])), + sprintf('%6.4fs', $data['time']) + ] + ); + + $this->process->advance(); + } + + $this->process->finish(); + $output->writeln(''); + $this->table->render($output); + } +} \ No newline at end of file diff --git a/civicrm/vendor/marcj/topsort/src/ElementNotFoundException.php b/civicrm/vendor/marcj/topsort/src/ElementNotFoundException.php new file mode 100644 index 0000000000..3adfd55831 --- /dev/null +++ b/civicrm/vendor/marcj/topsort/src/ElementNotFoundException.php @@ -0,0 +1,60 @@ +<?php + +namespace MJS\TopSort; + +class ElementNotFoundException extends \Exception +{ + /** + * @var string + */ + protected $source; + + /** + * @var string + */ + protected $target; + + /** + * @param string $message + * @param int $code + * @param \Exception $previous + * @param string $source + * @param string $target + */ + public function __construct($message = '', $code = 0, \Exception $previous = null, $source, $target) + { + parent::__construct($message, $code, $previous); + $this->source = $source; + $this->target = $target; + } + + /** + * @param string $source + * @param string $target + * + * @return static + */ + public static function create($source, $target) + { + $message = sprintf('Dependency `%s` not found, required by `%s`', $target, $source); + $exception = new static($message, 0, null, $source, $target); + + return $exception; + } + + /** + * @return string + */ + public function getSource() + { + return $this->source; + } + + /** + * @return string + */ + public function getTarget() + { + return $this->target; + } +} \ No newline at end of file diff --git a/civicrm/vendor/marcj/topsort/src/GroupedTopSortInterface.php b/civicrm/vendor/marcj/topsort/src/GroupedTopSortInterface.php new file mode 100644 index 0000000000..fc78e3e624 --- /dev/null +++ b/civicrm/vendor/marcj/topsort/src/GroupedTopSortInterface.php @@ -0,0 +1,69 @@ +<?php + +namespace MJS\TopSort; + +/** + * The actual TopSort Interface + * + * @author Marc J. Schmidt <marc@marcjschmidt.de> + */ +interface GroupedTopSortInterface +{ + + /** + * Sorts dependencies and returns the array of strings with sorted elements. + * + * @return string[] + * + * @throws CircularDependencyException if a circular dependency has been found + * @throws ElementNotFoundException if a dependency can not be found + */ + public function sort(); + + /** + * Sorts dependencies and returns internal used data structure. + * + * @return mixed depends on the actual implementation. + * + * @throws CircularDependencyException if a circular dependency has been found + * @throws ElementNotFoundException if a dependency can not be found + */ + public function doSort(); + + /** + * @param string $element + * @param string $type we group by this identifier + * @param string[] $dependencies + */ + public function add($element, $type, $dependencies = null); + + /** + * @param boolean $enabled + */ + public function setThrowCircularDependency($enabled); + + /** + * @return boolean + */ + public function isThrowCircularDependency(); + + /** + * Returns the internal list of groups generated during the sort. + * This is only available after calling `sort()` or `doSort()`. + * + * You get a list of objects with following properties: + * + * type, level, position, length + * + * where type is the type given by ->add($id, $type, $deps), level + * is the position of the group within all groups and position + * is the position of the first element in the list of all elements (getList()) + * + * $firstElementPosition = $sorter->getGroups()[0]->position; + * + * $element = $this->sort()[$firstElementPosition]; + * + * @return object[] + */ + public function getGroups(); +} \ No newline at end of file diff --git a/civicrm/vendor/marcj/topsort/src/Implementations/ArraySort.php b/civicrm/vendor/marcj/topsort/src/Implementations/ArraySort.php new file mode 100644 index 0000000000..bae74384bb --- /dev/null +++ b/civicrm/vendor/marcj/topsort/src/Implementations/ArraySort.php @@ -0,0 +1,120 @@ +<?php + +namespace MJS\TopSort\Implementations; + +use MJS\TopSort\CircularDependencyException; +use MJS\TopSort\ElementNotFoundException; +use MJS\TopSort\TopSortInterface; + +/** + * A topological sort implementation based on php arrays. + * + * @author Marc J. Schmidt <marc@marcjschmidt.de> + */ +class ArraySort extends BaseImplementation implements TopSortInterface +{ + /** + * @var object[] + */ + protected $elements = array(); + + /** + * @var string[] + */ + protected $sorted; + + /** + * @param array[] $elements ['id' => ['dep1', 'dep2'], 'id2' => ...] + */ + public function set(array $elements) + { + foreach ($elements as $element => $dependencies) { + $this->add($element, $dependencies); + } + } + + /** + * Adds element. + * + * @param string $element Name of file + * @param string[] $dependencies + */ + public function add($element, $dependencies = array()) + { + // Add + $this->elements[$element] = (object)array( + 'id' => $element, + 'dependencies' => (array)$dependencies, + 'visited' => false + ); + } + + /** + * Visits $element and handles it dependencies, queues to internal sorted list in the right order. + * + * @param object $element + * @param object[] $parents + * + * @throws CircularDependencyException if a circular dependency has been found + * @throws ElementNotFoundException if a dependency can not be found + */ + protected function visit($element, &$parents = null) + { + $this->throwCircularExceptionIfNeeded($element, $parents); + + // If element has not been visited + if (!$element->visited) { + $parents[$element->id] = true; + + // Set that element has been visited + $element->visited = true; + + foreach ($element->dependencies as $dependency) { + if (isset($this->elements[$dependency])) { + $newParents = $parents; + $this->visit($this->elements[$dependency], $newParents); + } else { + throw ElementNotFoundException::create($element->id, $dependency); + } + } + + $this->addToList($element); + } + } + + /** + * @param object $element + */ + protected function addToList($element) + { + $this->sorted[] = $element->id; + } + + /** + * {@inheritDoc} + */ + public function sort() + { + return $this->doSort(); + } + + /** + * Sorts dependencies and returns internal used data structure. + * + * @return string[] + * + * @throws CircularDependencyException if a circular dependency has been found + * @throws ElementNotFoundException if a dependency can not be found + */ + public function doSort() + { + $this->sorted = array(); + + foreach ($this->elements as $element) { + $parents = array(); + $this->visit($element, $parents); + } + + return $this->sorted; + } +} \ No newline at end of file diff --git a/civicrm/vendor/marcj/topsort/src/Implementations/BaseImplementation.php b/civicrm/vendor/marcj/topsort/src/Implementations/BaseImplementation.php new file mode 100644 index 0000000000..e799671eee --- /dev/null +++ b/civicrm/vendor/marcj/topsort/src/Implementations/BaseImplementation.php @@ -0,0 +1,77 @@ +<?php + + +namespace MJS\TopSort\Implementations; + + +use MJS\TopSort\CircularDependencyException; + +abstract class BaseImplementation +{ + /** + * @var bool + */ + protected $throwCircularDependency = true; + + /** + * @var callable + */ + protected $circularInterceptor; + + public function __construct(array $elements = array(), $throwCircularDependency = true) + { + $this->set($elements); + $this->throwCircularDependency = $throwCircularDependency; + } + + /** + * @param callable $circularInterceptor + */ + public function setCircularInterceptor($circularInterceptor) + { + $this->circularInterceptor = $circularInterceptor; + } + + abstract public function set(array $elements); + + /** + * @param object $element + * @param object[] $parents + * + * @throws CircularDependencyException + */ + protected function throwCircularExceptionIfNeeded($element, $parents) + { + if (!$this->isThrowCircularDependency()) { + return; + } + + if (isset($parents[$element->id])) { + + $nodes = array_keys($parents); + $nodes[] = $element->id; + + if ($this->circularInterceptor) { + call_user_func($this->circularInterceptor, $nodes); + } else { + throw CircularDependencyException::create($nodes); + } + } + } + + /** + * @return boolean + */ + public function isThrowCircularDependency() + { + return $this->throwCircularDependency; + } + + /** + * @param boolean $throwCircularDependency + */ + public function setThrowCircularDependency($throwCircularDependency) + { + $this->throwCircularDependency = $throwCircularDependency; + } +} \ No newline at end of file diff --git a/civicrm/vendor/marcj/topsort/src/Implementations/FixedArraySort.php b/civicrm/vendor/marcj/topsort/src/Implementations/FixedArraySort.php new file mode 100644 index 0000000000..2c2e3bf348 --- /dev/null +++ b/civicrm/vendor/marcj/topsort/src/Implementations/FixedArraySort.php @@ -0,0 +1,55 @@ +<?php + +namespace MJS\TopSort\Implementations; + +use MJS\TopSort\CircularDependencyException; +use MJS\TopSort\ElementNotFoundException; + +/** + * A topological sort implementation based on fixed php arrays (\SplFixedArray). + * + * @author Marc J. Schmidt <marc@marcjschmidt.de> + */ +class FixedArraySort extends ArraySort +{ + /** + * @var int + */ + protected $position = 0; + + /** + * {@inheritDoc} + */ + protected function addToList($element) + { + $this->sorted[$this->position++] = $element->id; + } + + /** + * {@inheritDoc} + */ + public function sort() + { + return $this->doSort()->toArray(); + } + + /** + * Sorts dependencies and returns internal used data structure. + * + * @return \SplFixedArray + * + * @throws CircularDependencyException if a circular dependency has been found + * @throws ElementNotFoundException if a dependency can not be found + */ + public function doSort() + { + $this->sorted = new \SplFixedArray(count($this->elements)); + + foreach ($this->elements as $element) { + $parents = array(); + $this->visit($element, $parents); + } + + return $this->sorted; + } +} \ No newline at end of file diff --git a/civicrm/vendor/marcj/topsort/src/Implementations/GroupedArraySort.php b/civicrm/vendor/marcj/topsort/src/Implementations/GroupedArraySort.php new file mode 100644 index 0000000000..4306afa687 --- /dev/null +++ b/civicrm/vendor/marcj/topsort/src/Implementations/GroupedArraySort.php @@ -0,0 +1,201 @@ +<?php + +namespace MJS\TopSort\Implementations; + +use MJS\TopSort\ElementNotFoundException; +use MJS\TopSort\GroupedTopSortInterface; + +/** + * Implements grouped topological-sort based on arrays. + * + * @author Marc J. Schmidt <marc@marcjschmidt.de> + */ +class GroupedArraySort extends BaseImplementation implements GroupedTopSortInterface +{ + protected $elements = array(); + protected $sorted; + protected $position = 0; + protected $groups = array(); + protected $groupLevel = 0; + + protected $debugging = false; + + /** + * @param string $name + * @param string $type + * @param string[] $dependencies + */ + public function add($name, $type, $dependencies = array()) + { + $dependencies = (array)$dependencies; + $this->elements[$name] = (object)array( + 'id' => $name, + 'type' => $type, + 'dependencies' => $dependencies, + 'dependenciesCount' => count($dependencies), + 'visited' => false, + 'addedAtLevel' => -1 + ); + } + + /** + * @param array[] $elements ['id' => ['type', ['dep1', 'dep2']], 'id2' => ...] + */ + public function set(array $elements) + { + foreach ($elements as $element => $typeAndDependencies) { + $this->add( + $element, + $typeAndDependencies[0], + isset($typeAndDependencies[1]) ? $typeAndDependencies[1] : array() + ); + } + } + + /** + * {@inheritDoc} + * + * @return integer level of group in which it has been added + */ + protected function visit($element, &$parents = null) + { + $this->throwCircularExceptionIfNeeded($element, $parents); + + // If element has not been visited + if (!$element->visited) { + $parents[$element->id] = true; + + $element->visited = true; + + $minLevel = -1; + foreach ($element->dependencies as $dependency) { + + if (isset($this->elements[$dependency])) { + $newParents = $parents; + $addedAtGroupLevel = $this->visit($this->elements[$dependency], $newParents, $element); + if ($addedAtGroupLevel > $minLevel) { + $minLevel = $addedAtGroupLevel; + } + } else { + throw ElementNotFoundException::create($element->id, $dependency); + } + } + +// print "add {$element->id} ({$element->type}), minLevel:$minLevel \n"; +// $this->printState(); + + $this->injectElement($element, $minLevel); + + return $minLevel; + } + + return $element->addedAtLevel; + } + + /** + * @param object $element + * @param integer $minLevel + */ + protected function injectElement($element, $minLevel) + { + if ($group = $this->getFirstGroup($element->type, $minLevel)) { + $this->addItemAt($group->position + $group->length, $element); + $group->length++; + +// print " ->added into group {$group->type}, position: {$group->position}, level: {$group->level}\n"; + + //increase all following groups +1 + $i = $group->position; + foreach ($this->groups as $tempGroup) { + if ($tempGroup->position > $i) { + $tempGroup->position++; + } + } + $element->addedAtLevel = $group->level; + } else { + $this->groups[] = (object)array( + 'type' => $element->type, + 'level' => $this->groupLevel, + 'position' => $this->position, + 'length' => 1 + ); + $element->addedAtLevel = $this->groupLevel; + $this->sorted[] = $element->id; + $this->position++; + +// print " ->just added. New group {$element->id}, position: {$this->position}, level: {$this->groupLevel}\n"; + $this->groupLevel++; + } + } + + /** + * @param integer $position + * @param object $element + */ + public function addItemAt($position, $element) + { + array_splice($this->sorted, $position, 0, $element->id); + } + +// /** +// * @debug +// */ +// protected function printState() +// { +// print " ##state# groups: " . count($this->groups) . ", sorted: " . count($this->sorted) . "\n"; +// foreach ($this->groups as $idx => $group) { +// print " group {$group->type}: $idx, position: {$group->position}, level: {$group->level}\n"; +// } +// } + + /** + * {@inheritDoc} + */ + public function getGroups() + { + return $this->groups; + } + + /** + * @param string $type + * @param integer $minLevel + * + * @return object|null + */ + protected function getFirstGroup($type, $minLevel) + { + $i = $this->groupLevel; + while ($i--) { + $group = $this->groups[$i]; + + if ($group->type === $type && $i >= $minLevel) { + return $group; + } + } + + return null; + } + + /** + * {@inheritDoc} + */ + public function sort() + { + return $this->doSort(); + } + + /** + * {@inheritDoc} + */ + public function doSort() + { + $this->sorted = array(); + + foreach ($this->elements as $element) { + $parents = array(); + $this->visit($element, $parents); + } + + return $this->sorted; + } +} \ No newline at end of file diff --git a/civicrm/vendor/marcj/topsort/src/Implementations/GroupedFixedArraySort.php b/civicrm/vendor/marcj/topsort/src/Implementations/GroupedFixedArraySort.php new file mode 100644 index 0000000000..892d0a11af --- /dev/null +++ b/civicrm/vendor/marcj/topsort/src/Implementations/GroupedFixedArraySort.php @@ -0,0 +1,87 @@ +<?php + +namespace MJS\TopSort\Implementations; + +/** + * + * Implements grouped topological-sort based on fixed arrays (\SplFixedArray). + * + * @author Marc J. Schmidt <marc@marcjschmidt.de> + */ +class GroupedFixedArraySort extends GroupedArraySort +{ + /** + * @param object $element + * @param integer $minLevel + */ + protected function injectElement($element, $minLevel) + { + if ($group = $this->getFirstGroup($element->type, $minLevel)) { + $this->addItemAt($group->position + $group->length, $element); + $group->length++; + + //increase all following groups +1 + $i = $group->position; + foreach ($this->groups as $tempGroup) { + if ($tempGroup->position > $i) { + $tempGroup->position++; + } + } + + $element->addedAtLevel = $group->level; + } else { + $this->groups[] = (object)array( + 'type' => $element->type, + 'level' => $this->groupLevel, + 'position' => $this->position, + 'length' => 1 + ); + $element->addedAtLevel = $this->groupLevel; + $this->sorted[$this->position] = $element->id; + $this->position++; + + $this->groupLevel++; + } + } + + /** + * @param integer $position + * @param object $element + */ + public function addItemAt($position, $element) + { + //shift all items >> + for ($i = $this->position; $i > $position; $i--) { + $this->sorted[$i] = $this->sorted[$i - 1]; + } + + $this->sorted[$position] = $element->id; + $this->position++; + } + + /** + * {@inheritDoc} + */ + public function sort() + { + return $this->doSort()->toArray(); + } + + /** + * {@inheritDoc} + * + * @return \SplFixedArray + */ + public function doSort() + { + $this->position = 0; + $this->sorted = new \SplFixedArray(count($this->elements)); + + foreach ($this->elements as $element) { + $parents = array(); + $this->visit($element, $parents); + } + + return $this->sorted; + } +} \ No newline at end of file diff --git a/civicrm/vendor/marcj/topsort/src/Implementations/GroupedStringSort.php b/civicrm/vendor/marcj/topsort/src/Implementations/GroupedStringSort.php new file mode 100644 index 0000000000..7bb54d6253 --- /dev/null +++ b/civicrm/vendor/marcj/topsort/src/Implementations/GroupedStringSort.php @@ -0,0 +1,107 @@ +<?php + +namespace MJS\TopSort\Implementations; + +/** + * Implements grouped topological-sort based on string manipulation. + * + * @author Marc J. Schmidt <marc@marcjschmidt.de> + */ +class GroupedStringSort extends GroupedArraySort +{ + protected $delimiter = "\0"; + + /** + * @param object $element + * @param integer $minLevel + */ + protected function injectElement($element, $minLevel) + { + if ($group = $this->getFirstGroup($element->type, $minLevel)) { + //add this element into a group + $this->addItemAt($group, $element); + $group->length++; + + //increase all following groups +1 + $i = $group->position; + foreach ($this->groups as $tempGroup) { + if ($tempGroup->position > $i) { + $tempGroup->position += strlen($element->id . $this->delimiter); + } + } + + $element->addedAtLevel = $group->level; + } else { + //just append this element at the end + $group = (object)array( + 'type' => $element->type, + 'level' => $this->groupLevel, + 'position' => $this->position, + 'length' => 1, + 'sorted' => '' + ); + $this->groups[] = $group; + $element->addedAtLevel = $this->groupLevel; + + $id = $element->id . $this->delimiter; + + $group->sorted .= $id; + $this->position += strlen($id); + $this->groupLevel++; + } + } + + /** + * @param integer $position + * @param object $element + */ + public function addItemAt($group, $element) + { + $group->sorted .= $element->id . $this->delimiter; + } + + /** + * {@inheritDoc} + */ + public function sort() + { + $list = ''; + $this->doSort(); + foreach ($this->groups as $group) { + $list .= $group->sorted; + } + + return explode($this->delimiter, rtrim($list, $this->delimiter)); + } + + /** + * {@inheritDoc} + */ + public function getGroups() + { + $position = 0; + return array_map(function($group) use (&$position) { + $groupCloned = clone $group; + $groupCloned->position = $position; + unset($groupCloned->sorted); + $position += $groupCloned->length; + return $groupCloned; + }, $this->groups); + } + + /** + * {@inheritDoc} + */ + public function doSort() + { + $this->position = 0; + $this->sorted = ''; + + foreach ($this->elements as $element) { + $parents = array(); + $this->visit($element, $parents); + } + + return $this->sorted; + } +} \ No newline at end of file diff --git a/civicrm/vendor/marcj/topsort/src/Implementations/StringSort.php b/civicrm/vendor/marcj/topsort/src/Implementations/StringSort.php new file mode 100644 index 0000000000..0120c48e07 --- /dev/null +++ b/civicrm/vendor/marcj/topsort/src/Implementations/StringSort.php @@ -0,0 +1,84 @@ +<?php + +namespace MJS\TopSort\Implementations; + +use MJS\TopSort\CircularDependencyException; +use MJS\TopSort\ElementNotFoundException; + +/** + * A topological sort implementation based on string manipulations. + * + * @author Marc J. Schmidt <marc@marcjschmidt.de> + */ +class StringSort extends ArraySort +{ + + /** + * @var string + */ + protected $sorted; + + /** + * @var string + */ + protected $delimiter = "\0"; + + /** + * {@inheritDoc} + */ + protected function addToList($element) + { + $this->sorted .= $element->id . $this->delimiter; + } + + /** + * {@inheritDoc} + */ + public function sort() + { + return explode($this->delimiter, rtrim($this->doSort(), $this->delimiter)); + } + + protected function visit($element, &$parents = null) + { + $this->throwCircularExceptionIfNeeded($element, $parents); + + if (!$element->visited) { + $parents[$element->id] = true; + + $element->visited = true; + + foreach ($element->dependencies as $dependency) { + if (isset($this->elements[$dependency])) { + $newParents = $parents; + $this->visit($this->elements[$dependency], $newParents); + } else { + throw ElementNotFoundException::create($element->id, $dependency); + } + } + + $this->addToList($element); + } + + } + + /** + * Sorts dependencies and returns internal used data structure. + * + * @return string + * + * @throws CircularDependencyException if a circular dependency has been found + * @throws ElementNotFoundException if a dependency can not be found + */ + public function doSort() + { + $this->sorted = ''; + + foreach ($this->elements as $element) { + $parents = array(); + $this->visit($element, $parents); + } + + return $this->sorted; + } +} \ No newline at end of file diff --git a/civicrm/vendor/marcj/topsort/src/TopSortInterface.php b/civicrm/vendor/marcj/topsort/src/TopSortInterface.php new file mode 100644 index 0000000000..ac1317abcc --- /dev/null +++ b/civicrm/vendor/marcj/topsort/src/TopSortInterface.php @@ -0,0 +1,53 @@ +<?php + +namespace MJS\TopSort; + +/** + * The actual TopSort Interface. + * + * @author Marc J. Schmidt <marc@marcjschmidt.de> + */ +interface TopSortInterface +{ + /** + * Sorts dependencies and returns the array of strings with sorted elements. + * + * @return string[] + * + * @throws CircularDependencyException if a circular dependency has been found + * @throws ElementNotFoundException if a dependency can not be found + */ + public function sort(); + + /** + * Sorts dependencies and returns internal used data structure. + * + * @return mixed depends on the actual implementation. + * + * @throws CircularDependencyException if a circular dependency has been found + * @throws ElementNotFoundException if a dependency can not be found + */ + public function doSort(); + + /** + * @param string $element + * @param string[] $dependencies + */ + public function add($element, $dependencies = null); + + /** + * @param boolean $enabled + */ + public function setThrowCircularDependency($enabled); + + /** + * @param callable $circularInterceptor + */ + public function setCircularInterceptor($circularInterceptor); + + /** + * @return boolean + */ + public function isThrowCircularDependency(); + +} \ No newline at end of file diff --git a/includes/civicrm.shortcodes.php b/includes/civicrm.shortcodes.php index b0042650f7..1ff858b834 100644 --- a/includes/civicrm.shortcodes.php +++ b/includes/civicrm.shortcodes.php @@ -145,6 +145,11 @@ class CiviCRM_For_WordPress_Shortcodes { // did we get any? if ( $shortcodes_present ) { + // we need CiviCRM initialised prior to parsing shortcodes + if (!$this->civi->initialize()) { + return; + } + // how should we handle multiple shortcodes? if ( $shortcodes_present > 1 ) { @@ -555,11 +560,11 @@ class CiviCRM_For_WordPress_Shortcodes { * Preprocess CiviCRM-defined shortcodes * * @param array $atts Shortcode attributes array - * @return void + * @return array $args Shortcode arguments array */ public function preprocess_atts( $atts ) { - extract( shortcode_atts( array( + $shortcode_atts = shortcode_atts( array( 'component' => 'contribution', 'action' => NULL, 'mode' => NULL, @@ -569,8 +574,11 @@ class CiviCRM_For_WordPress_Shortcodes { 'cs' => NULL, 'force' => NULL, ), - $atts - ) ); + $atts, + 'civicrm' + ); + + extract( $shortcode_atts ); $args = array( 'reset' => 1, @@ -647,7 +655,18 @@ class CiviCRM_For_WordPress_Shortcodes { } - return $args; + /** + * Filter the CiviCRM shortcode arguments. + * + * This filter allows plugins or CiviExtensions to modify the attributes + * that the 'civicrm' shortcode allows. Injected attributes and their values + * will also become available in the $_REQUEST and $_GET arrays. + * + * @param array $args Existing shortcode arguments + * @param array $shortcode_atts Shortcode attributes + * @return array $args Modified shortcode arguments + */ + return apply_filters( 'civicrm_shortcode_preprocess_atts', $args, $shortcode_atts ); } @@ -657,7 +676,7 @@ class CiviCRM_For_WordPress_Shortcodes { * * @param array $atts Shortcode attributes array * @param array $args Shortcode arguments array - * @return void + * @return array|bool $data The array data used to build the shortcode markup (or false on failure) */ public function get_data( $atts, $args ) { @@ -668,14 +687,25 @@ class CiviCRM_For_WordPress_Shortcodes { return FALSE; } - // get the Civi entity via the API - $params = array( + /** + * Filter the base CiviCRM API parameters. + * + * This filter allows plugins or CiviExtensions to modify the API call when + * there are multiple shortcodes being rendered. + * + * @param array $params Existing API params + * @param array $atts Shortcode attributes array + * @param array $args Shortcode arguments array + * @return array $params Modified API params + */ + $params = apply_filters( 'civicrm_shortcode_api_params', array( 'version' => 3, 'page' => 'CiviCRM', 'q' => 'civicrm/ajax/rest', 'sequential' => '1', - ); + ), $atts, $args ); + // get the Civi entity via the API switch ( $atts['component'] ) { case 'contribution': @@ -786,7 +816,18 @@ class CiviCRM_For_WordPress_Shortcodes { } - return $data; + /** + * Filter the CiviCRM shortcode data array. + * + * This filter allows plugins or CiviExtensions to modify the data used to + * display the shortcode when there are multiple shortcodes being rendered. + * + * @param array $data Existing shortcode data + * @param array $atts Shortcode attributes array + * @param array $args Shortcode arguments array + * @return array $data Modified shortcode data + */ + return apply_filters( 'civicrm_shortcode_get_data', $data, $atts, $args ); } -- GitLab