diff --git a/Controller.php b/Controller.php new file mode 100644 index 0000000..ee45fc7 --- /dev/null +++ b/Controller.php @@ -0,0 +1,249 @@ +translator = $translator; + + parent::__construct(); + } + + public function visitorMap($fetch = false, $segmentOverride = false) + { + $this->checkUserCountryPluginEnabled(); + + $this->checkSitePermission(); + Piwik::checkUserHasViewAccess($this->idSite); + + $period = Common::getRequestVar('period'); + $date = Common::getRequestVar('date'); + + if (!empty($segmentOverride)) { + $segment = $segmentOverride; + } else { + $segment = Request::getRawSegmentFromRequest(); + if (empty($segment)) { + $segment = ''; + } + } + + $token_auth = Piwik::getCurrentUserTokenAuth(); + + $view = new View('@UserCountryMapIslandora/visitorMap'); + + // request visits summary + $request = new Request( + 'method=VisitsSummary.get&format=php' + . '&idSite=' . $this->idSite + . '&period=' . $period + . '&date=' . $date + . '&segment=' . $segment + . '&token_auth=' . $token_auth + . '&filter_limit=-1' + ); + $config = array(); + $config['visitsSummary'] = Common::safe_unserialize($request->process()); + $config['countryDataUrl'] = $this->_report('UserCountry', 'getCountry', + $this->idSite, $period, $date, $token_auth, false, $segment); + $config['regionDataUrl'] = $this->_report('UserCountry', 'getRegion', + $this->idSite, $period, $date, $token_auth, true, $segment); + $config['cityDataUrl'] = $this->_report('UserCountry', 'getCity', + $this->idSite, $period, $date, $token_auth, true, $segment); + $config['countrySummaryUrl'] = $this->getApiRequestUrl('VisitsSummary', 'get', + $this->idSite, $period, $date, $token_auth, true, $segment); + $view->defaultMetric = array_key_exists('nb_uniq_visitors', $config['visitsSummary']) ? 'nb_uniq_visitors' : 'nb_visits'; + + $noVisitTranslation = $this->translator->translate('UserCountryMapIslandora_NoVisit'); + // some translations containing metric number + $translations = array( + 'nb_visits' => $this->translator->translate('General_NVisits'), + 'no_visit' => $noVisitTranslation, + 'nb_actions' => $this->translator->translate('VisitsSummary_NbActionsDescription'), + 'nb_actions_per_visit' => $this->translator->translate('VisitsSummary_NbActionsPerVisit'), + 'bounce_rate' => $this->translator->translate('VisitsSummary_NbVisitsBounced'), + 'avg_time_on_site' => $this->translator->translate('VisitsSummary_AverageVisitDuration'), + 'and_n_others' => $this->translator->translate('UserCountryMapIslandora_AndNOthers'), + 'nb_uniq_visitors' => $this->translator->translate('General_NUniqueVisitors'), + 'nb_users' => $this->translator->translate('VisitsSummary_NbUsers'), + ); + + foreach ($translations as &$translation) { + if (false === strpos($translation, '%s') + && $translation !== $noVisitTranslation) { + $translation = '%s ' . $translation; + } + } + + $translations['one_visit'] = $this->translator->translate('General_OneVisit'); + $translations['no_data'] = $this->translator->translate('CoreHome_ThereIsNoDataForThisReport'); + + $view->localeJSON = json_encode($translations); + + $view->reqParamsJSON = $this->getEnrichedRequest($params = array( + 'period' => $period, + 'idSite' => $this->idSite, + 'date' => $date, + 'segment' => $segment, + 'token_auth' => $token_auth, + 'enable_filter_excludelowpop' => 1, + 'filter_excludelowpop_value' => -1 + )); + + $view->metrics = $config['metrics'] = $this->getMetrics($this->idSite, $period, $date, $token_auth); + // Reuse Original Plugins data + $config['svgBasePath'] = 'plugins/UserCountryMap/svg/'; + // Allow our own CSS override + $config['mapCssPath'] = 'plugins/plugin-UserCountryMapIslandora/stylesheets/map.css'; + $view->config = json_encode($config); + $view->noData = empty($config['visitsSummary']['nb_visits']); + + $countriesByIso = array(); + $regionDataProvider = StaticContainer::get('Piwik\Intl\Data\Provider\RegionDataProvider'); + $countries = array_keys($regionDataProvider->getCountryList()); + + foreach ($countries AS $country) { + $countriesByIso[strtoupper($country)] = Piwik::translate('Intl_Country_'.strtoupper($country)); + } + + $view->countriesByIso = $countriesByIso; + + $view->continents = array( + 'AF' => \Piwik\Plugins\UserCountry\continentTranslate('afr'), + 'AS' => \Piwik\Plugins\UserCountry\continentTranslate('asi'), + 'EU' => \Piwik\Plugins\UserCountry\continentTranslate('eur'), + 'NA' => \Piwik\Plugins\UserCountry\continentTranslate('amn'), + 'OC' => \Piwik\Plugins\UserCountry\continentTranslate('oce'), + 'SA' => \Piwik\Plugins\UserCountry\continentTranslate('ams') + ); + + return $view->render(); + } + + + private function getEnrichedRequest($params, $encode = true) + { + $params['format'] = 'json'; + $params['showRawMetrics'] = 1; + if (empty($params['segment'])) { + $segment = Request::getRawSegmentFromRequest(); + if (!empty($segment)) { + $params['segment'] = $segment; + } + } + + if (!empty($params['segment'])) { + $params['segment'] = urldecode($params['segment']); + } + + if ($encode) { + $params = json_encode($params); + } + + return $params; + } + + private function checkUserCountryPluginEnabled() + { + if (!\Piwik\Plugin\Manager::getInstance()->isPluginActivated('UserCountry')) { + throw new Exception($this->translator->translate('General_Required', 'Plugin UserCountry')); + } + // Check also if we have the parent plugin enabled. + if (!\Piwik\Plugin\Manager::getInstance()->isPluginActivated('UserCountryMap')) { + throw new Exception($this->translator->translate('General_Required', 'Plugin UserCountryMap')); + } + } + + private function getMetrics($idSite, $period, $date, $token_auth) + { + $request = new Request( + 'method=API.getMetadata&format=PHP' + . '&apiModule=UserCountry&apiAction=getCountry' + . '&idSite=' . $idSite + . '&period=' . $period + . '&date=' . $date + . '&token_auth=' . $token_auth + . '&filter_limit=-1' + ); + $metaData = Common::safe_unserialize($request->process()); + + $metrics = array(); + if (!empty($metaData[0]['metrics']) && is_array($metaData[0]['metrics'])) { + foreach ($metaData[0]['metrics'] as $id => $val) { + // todo: should use SettingsPiwik::isUniqueVisitorsEnabled ? + if (Common::getRequestVar('period') == 'day' || $id != 'nb_uniq_visitors') { + $metrics[] = array($id, $val); + } + } + } + if (!empty($metaData[0]['processedMetrics']) && is_array($metaData[0]['processedMetrics'])) { + foreach ($metaData[0]['processedMetrics'] as $id => $val) { + $metrics[] = array($id, $val); + } + } + return $metrics; + } + + private function getApiRequestUrl($module, $action, $idSite, $period, $date, $token_auth, $filter_by_country = false, $segmentOverride = false) + { + // use processed reports + $url = "?module=" . $module + . "&method=" . $module . "." . $action . "&format=JSON" + . "&idSite=" . $idSite + . "&period=" . $period + . "&date=" . $date + . "&token_auth=" . $token_auth + . "&segment=" . ($segmentOverride ? : Request::getRawSegmentFromRequest()) + . "&enable_filter_excludelowpop=1" + . "&showRawMetrics=1"; + + if ($filter_by_country) { + $url .= "&filter_column=country" + . "&filter_sort_column=nb_visits" + . "&filter_limit=-1" + . "&filter_pattern="; + } else { + $url .= "&filter_limit=-1"; + } + return $url; + } + + private function _report($module, $action, $idSite, $period, $date, $token_auth, $filter_by_country = false, $segmentOverride = false) + { + return $this->getApiRequestUrl('API', 'getProcessedReport&apiModule=' . $module . '&apiAction=' . $action, + $idSite, $period, $date, $token_auth, $filter_by_country, $segmentOverride); + } +} diff --git a/UserCountryMapIslandora.php b/UserCountryMapIslandora.php new file mode 100644 index 0000000..77fbbd1 --- /dev/null +++ b/UserCountryMapIslandora.php @@ -0,0 +1,61 @@ +' . Piwik::translate('UserCountryMapIslandora_VisitorMap') . ''; + $out .= FrontController::getInstance()->fetchDispatch('UserCountryMapIslandora', 'visitorMap'); + } + + public function registerEvents() + { + $hooks = array( + 'AssetManager.getJavaScriptFiles' => 'getJsFiles', + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', + 'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys' + ); + return $hooks; + } + + public function getJsFiles(&$jsFiles) + { + $jsFiles[] = "libs/bower_components/visibilityjs/lib/visibility.core.js"; + $jsFiles[] = "plugins/UserCountryMapIslandora/javascripts/vendor/raphael.min.js"; + $jsFiles[] = "plugins/UserCountryMapIslandora/javascripts/vendor/jquery.qtip.min.js"; + $jsFiles[] = "plugins/UserCountryMapIslandora/javascripts/vendor/kartograph.min.js"; + $jsFiles[] = "libs/bower_components/chroma-js/chroma.min.js"; + $jsFiles[] = "plugins/UserCountryMapIslandora/javascripts/visitor-map.js"; + } + + public function getStylesheetFiles(&$stylesheets) + { + $stylesheets[] = "plugins/UserCountryMapIslandora/stylesheets/visitor-map.less"; + } + + public function getClientSideTranslationKeys(&$translationKeys) + { + $translationKeys[] = 'UserCountryMapIslandora_WithUnknownRegion'; + $translationKeys[] = 'UserCountryMapIslandora_WithUnknownCity'; + $translationKeys[] = 'General_UserId'; + } +} diff --git a/Widgets/GetVisitorMap.php b/Widgets/GetVisitorMap.php new file mode 100644 index 0000000..1419f93 --- /dev/null +++ b/Widgets/GetVisitorMap.php @@ -0,0 +1,23 @@ +setCategoryId('General_Visitors'); + $config->setSubcategoryId('UserCountry_SubmenuLocations'); + $config->setName('UserCountryMapIslandora_VisitorMap'); + $config->setAction('visitorMap'); + $config->setOrder(1); + } +} diff --git a/config/config.php b/config/config.php new file mode 100644 index 0000000..4932533 --- /dev/null +++ b/config/config.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/config/tracker.php b/config/tracker.php new file mode 100644 index 0000000..febb408 --- /dev/null +++ b/config/tracker.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/images/cities.png b/images/cities.png new file mode 100644 index 0000000..08f0ad5 Binary files /dev/null and b/images/cities.png differ diff --git a/images/realtimemap-loading.gif b/images/realtimemap-loading.gif new file mode 100644 index 0000000..10867af Binary files /dev/null and b/images/realtimemap-loading.gif differ diff --git a/images/regions.png b/images/regions.png new file mode 100644 index 0000000..f1b3c32 Binary files /dev/null and b/images/regions.png differ diff --git a/images/zoom-out-disabled.png b/images/zoom-out-disabled.png new file mode 100644 index 0000000..2eb9fbd Binary files /dev/null and b/images/zoom-out-disabled.png differ diff --git a/javascripts/vendor/jquery.qtip.min.js b/javascripts/vendor/jquery.qtip.min.js new file mode 100644 index 0000000..5e251bc --- /dev/null +++ b/javascripts/vendor/jquery.qtip.min.js @@ -0,0 +1,14 @@ +/* +* qTip2 - Pretty powerful tooltips +* http://craigsworks.com/projects/qtip2/ +* +* Version: nightly +* Copyright 2009-2010 Craig Michael Thompson - http://craigsworks.com +* +* Dual licensed under MIT or GPLv2 licenses +* http://en.wikipedia.org/wiki/MIT_License +* http://en.wikipedia.org/wiki/GNU_General_Public_License +* +* Date: Mon Nov 21 13:18:18.0000000000 2011 +*//*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true *//*global window: false, jQuery: false, console: false */ +(function(a,b,c){function z(b,c){var i,j,k,l,m,n=a(this),o=a(document.body),p=this===document?o:n,q=n.metadata?n.metadata(c.metadata):f,r=c.metadata.type==="html5"&&q?q[c.metadata.name]:f,s=n.data(c.metadata.name||"qtipopts");try{s=typeof s==="string"?(new Function("return "+s))():s}catch(t){w("Unable to parse HTML5 attribute data: "+s)}l=a.extend(d,{},g.defaults,c,typeof s==="object"?x(s):f,x(r||q)),j=l.position,l.id=b;if("boolean"===typeof l.content.text){k=n.attr(l.content.attr);if(l.content.attr!==e&&k)l.content.text=k;else{w("Unable to locate content for tooltip! Aborting render of tooltip on element: ",n);return e}}j.container===e&&(j.container=o),j.target===e&&(j.target=p),l.show.target===e&&(l.show.target=p),l.show.solo===d&&(l.show.solo=o),l.hide.target===e&&(l.hide.target=p),l.position.viewport===d&&(l.position.viewport=j.container),j.at=new h.Corner(j.at),j.my=new h.Corner(j.my);if(a.data(this,"qtip"))if(l.overwrite)n.qtip("destroy");else if(l.overwrite===e)return e;l.suppress&&(m=a.attr(this,"title"))&&a(this).removeAttr("title").attr(u,m),i=new y(n,l,b,!!k),a.data(this,"qtip",i),n.bind("remove.qtip-"+b,function(){i.destroy()});return i}function y(s,t,w,y){function R(){var c=[t.show.target[0],t.hide.target[0],z.rendered&&G.tooltip[0],t.position.container[0],t.position.viewport[0],b,document];z.rendered?a([]).pushStack(a.grep(c,function(a){return typeof a==="object"})).unbind(F):t.show.target.unbind(F+"-create")}function Q(){function p(a){E.is(":visible")&&z.reposition(a)}function o(a){if(E.hasClass(m))return e;clearTimeout(z.timers.inactive),z.timers.inactive=setTimeout(function(){z.hide(a)},t.hide.inactive)}function l(b){if(E.hasClass(m)||C||D)return e;var d=a(b.relatedTarget||b.target),g=d.closest(n)[0]===E[0],h=d[0]===f.show[0];clearTimeout(z.timers.show),clearTimeout(z.timers.hide);if(c.target==="mouse"&&g||t.hide.fixed&&(/mouse(out|leave|move)/.test(b.type)&&(g||h)))try{b.preventDefault(),b.stopImmediatePropagation()}catch(i){}else t.hide.delay>0?z.timers.hide=setTimeout(function(){z.hide(b)},t.hide.delay):z.hide(b)}function k(a){if(E.hasClass(m))return e;clearTimeout(z.timers.show),clearTimeout(z.timers.hide);var b=function(){z.toggle(d,a)};t.show.delay>0?z.timers.show=setTimeout(b,t.show.delay):b()}var c=t.position,f={show:t.show.target,hide:t.hide.target,viewport:a(c.viewport),document:a(document),body:a(document.body),window:a(b)},h={show:a.trim(""+t.show.event).split(" "),hide:a.trim(""+t.hide.event).split(" ")},j=a.browser.msie&&parseInt(a.browser.version,10)===6;E.bind("mouseenter"+F+" mouseleave"+F,function(a){var b=a.type==="mouseenter";b&&z.focus(a),E.toggleClass(q,b)}),t.hide.fixed&&(f.hide=f.hide.add(E),E.bind("mouseover"+F,function(){E.hasClass(m)||clearTimeout(z.timers.hide)})),/mouse(out|leave)/i.test(t.hide.event)?t.hide.leave==="window"&&f.window.bind("mouseout"+F+" blur"+F,function(a){/select|option/.test(a.target)&&!a.relatedTarget&&z.hide(a)}):/mouse(over|enter)/i.test(t.show.event)&&f.hide.bind("mouseleave"+F,function(a){clearTimeout(z.timers.show)}),(""+t.hide.event).indexOf("unfocus")>-1&&f.body.bind("mousedown"+F,function(b){var c=a(b.target),d=!E.hasClass(m)&&E.is(":visible");c[0]!==E[0]&&c.parents(n).length===0&&c.add(s).length>1&&!c.attr("disabled")&&z.hide(b)}),"number"===typeof t.hide.inactive&&(f.show.bind("qtip-"+w+"-inactive",o),a.each(g.inactiveEvents,function(a,b){f.hide.add(G.tooltip).bind(b+F+"-inactive",o)})),a.each(h.hide,function(b,c){var d=a.inArray(c,h.show),e=a(f.hide);d>-1&&e.add(f.show).length===e.length||c==="unfocus"?(f.show.bind(c+F,function(a){E.is(":visible")?l(a):k(a)}),delete h.show[d]):f.hide.bind(c+F,l)}),a.each(h.show,function(a,b){f.show.bind(b+F,k)}),"number"===typeof t.hide.distance&&f.show.add(E).bind("mousemove"+F,function(a){var b=H.origin||{},c=t.hide.distance,d=Math.abs;(d(a.pageX-b.pageX)>=c||d(a.pageY-b.pageY)>=c)&&z.hide(a)}),c.target==="mouse"&&(f.show.bind("mousemove"+F,function(a){i={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}}),c.adjust.mouse&&(t.hide.event&&E.bind("mouseleave"+F,function(a){(a.relatedTarget||a.target)!==f.show[0]&&z.hide(a)}),f.document.bind("mousemove"+F,function(a){!E.hasClass(m)&&E.is(":visible")&&z.reposition(a||i)}))),(c.adjust.resize||f.viewport.length)&&(a.event.special.resize?f.viewport:f.window).bind("resize"+F,p),(f.viewport.length||j&&E.css("position")==="fixed")&&f.viewport.bind("scroll"+F,p)}function P(b,d){function g(b){function i(c){c&&(delete h[c.src],clearTimeout(z.timers.img[c.src]),a(c).unbind(F)),a.isEmptyObject(h)&&(z.redraw(),d!==e&&z.reposition(H.event),b())}var g,h={};if((g=f.find("img:not([height]):not([width])")).length===0)return i();g.each(function(b,d){if(h[d.src]===c){var e=0,f=3;(function g(){if(d.height||d.width||e>f)return i(d);e+=1,z.timers.img[d.src]=setTimeout(g,700)})(),a(d).bind("error"+F+" load"+F,function(){i(this)}),h[d.src]=d}})}var f=G.content;if(!z.rendered||!b)return e;a.isFunction(b)&&(b=b.call(s,H.event,z)||""),b.jquery&&b.length>0?f.empty().append(b.css({display:"block"})):f.html(b),z.rendered<0?E.queue("fx",g):(D=0,g(a.noop));return z}function O(b,c){var d=G.title;if(!z.rendered||!b)return e;a.isFunction(b)&&(b=b.call(s,H.event,z));if(b===e)return K(e);b.jquery&&b.length>0?d.empty().append(b.css({display:"block"})):d.html(b),z.redraw(),c!==e&&z.rendered&&E.is(":visible")&&z.reposition(H.event)}function N(a){var b=G.button,c=G.title;if(!z.rendered)return e;a?(c||M(),L()):b.remove()}function M(){var b=B+"-title";G.titlebar&&K(),G.titlebar=a("
",{"class":k+"-titlebar "+(t.style.widget?"ui-widget-header":"")}).append(G.title=a("
",{id:b,"class":k+"-title","aria-atomic":d})).insertBefore(G.content).delegate(".ui-tooltip-close","mousedown keydown mouseup keyup mouseout",function(b){a(this).toggleClass("ui-state-active ui-state-focus",b.type.substr(-4)==="down")}).delegate(".ui-tooltip-close","mouseover mouseout",function(b){a(this).toggleClass("ui-state-hover",b.type==="mouseover")}),t.content.title.button?L():z.rendered&&z.redraw()}function L(){var b=t.content.title.button,c=typeof b==="string",d=c?b:"Close tooltip";G.button&&G.button.remove(),b.jquery?G.button=b:G.button=a("",{"class":"ui-state-default ui-tooltip-close "+(t.style.widget?"":k+"-icon"),title:d,"aria-label":d}).prepend(a("",{"class":"ui-icon ui-icon-close",html:"×"})),G.button.appendTo(G.titlebar).attr("role","button").click(function(a){E.hasClass(m)||z.hide(a);return e}),z.redraw()}function K(a){G.title&&(G.titlebar.remove(),G.titlebar=G.title=G.button=f,a!==e&&z.reposition())}function J(){var a=t.style.widget;E.toggleClass(l,a).toggleClass(o,!a),G.content.toggleClass(l+"-content",a),G.titlebar&&G.titlebar.toggleClass(l+"-header",a),G.button&&G.button.toggleClass(k+"-icon",!a)}function I(a){var b=0,c,d=t,e=a.split(".");while(d=d[e[b++]])b0&&!a("#"+i).length&&(E[0].id=i,G.content[0].id=i+"-content",G.title[0].id=i+"-title")},"^content.text$":function(a,b,c){P(c)},"^content.title.text$":function(a,b,c){if(!c)return K();!G.title&&c&&M(),O(c)},"^content.title.button$":function(a,b,c){N(c)},"^position.(my|at)$":function(a,b,c){"string"===typeof c&&(a[b]=new h.Corner(c))},"^position.container$":function(a,b,c){z.rendered&&E.appendTo(c)},"^show.ready$":function(){z.rendered?z.toggle(d):z.render(1)},"^style.classes$":function(a,b,c){E.attr("class",k+" qtip ui-helper-reset "+c)},"^style.widget|content.title":J,"^events.(render|show|move|hide|focus|blur)$":function(b,c,d){E[(a.isFunction(d)?"":"un")+"bind"]("tooltip"+c,d)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){var a=t.position;E.attr("tracking",a.target==="mouse"&&a.adjust.mouse),R(),Q()}},a.extend(z,{render:function(b){if(z.rendered)return z;var c=t.content.text,f=t.content.title.text,g=t.position,i=a.Event("tooltiprender");a.attr(s[0],"aria-describedby",B),E=G.tooltip=a("
",{id:B,"class":k+" qtip ui-helper-reset "+o+" "+t.style.classes+" "+k+"-pos-"+t.position.my.abbrev(),width:t.style.width||"",height:t.style.height||"",tracking:g.target==="mouse"&&g.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":e,"aria-describedby":B+"-content","aria-hidden":d}).toggleClass(m,H.disabled).data("qtip",z).appendTo(t.position.container).append(G.content=a("
",{"class":k+"-content",id:B+"-content","aria-atomic":d})),z.rendered=-1,C=D=1,f&&(M(),a.isFunction(f)||O(f,e)),a.isFunction(c)||P(c,e),z.rendered=d,J(),a.each(t.events,function(b,c){a.isFunction(c)&&E.bind(b==="toggle"?"tooltipshow tooltiphide":"tooltip"+b,c)}),a.each(h,function(){this.initialize==="render"&&this(z)}),Q(),E.queue("fx",function(a){i.originalEvent=H.event,E.trigger(i,[z]),C=D=0,z.redraw(),(t.show.ready||b)&&z.toggle(d,H.event),a()});return z},get:function(a){var b,c;switch(a.toLowerCase()){case"dimensions":b={height:E.outerHeight(),width:E.outerWidth()};break;case"offset":b=h.offset(E,t.position.container);break;default:c=I(a.toLowerCase()),b=c[0][c[1]],b=b.precedance?b.string():b}return b},set:function(b,c){function m(a,b){var c,d,e;for(c in k)for(d in k[c])if(e=(new RegExp(d,"i")).exec(a))b.push(e),k[c][d].apply(z,b)}var g=/^position\.(my|at|adjust|target|container)|style|content|show\.ready/i,h=/^content\.(title|attr)|style/i,i=e,j=e,k=z.checks,l;"string"===typeof b?(l=b,b={},b[l]=c):b=a.extend(d,{},b),a.each(b,function(c,d){var e=I(c.toLowerCase()),f;f=e[0][e[1]],e[0][e[1]]="object"===typeof d&&d.nodeType?a(d):d,b[c]=[e[0],e[1],d,f],i=g.test(c)||i,j=h.test(c)||j}),x(t),C=D=1,a.each(b,m),C=D=0,E.is(":visible")&&z.rendered&&(i&&z.reposition(t.position.target==="mouse"?f:H.event),j&&z.redraw());return z},toggle:function(b,c){function q(){b?(a.browser.msie&&E[0].style.removeAttribute("filter"),E.css("overflow",""),"string"===typeof h.autofocus&&a(h.autofocus,E).focus(),p=a.Event("tooltipvisible"),p.originalEvent=c?H.event:f,E.trigger(p,[z]),h.target.trigger("qtip-"+w+"-inactive")):E.css({display:"",visibility:"",opacity:"",left:"",top:""})}if(!z.rendered)return b?z.render(1):z;var g=b?"show":"hide",h=t[g],j=E.is(":visible"),k=!c||t[g].target.length<2||H.target[0]===c.target,l=t.position,m=t.content,o,p;(typeof b).search("boolean|number")&&(b=!j);if(!E.is(":animated")&&j===b&&k)return z;if(c){if(/over|enter/.test(c.type)&&/out|leave/.test(H.event.type)&&c.target===t.show.target[0]&&E.has(c.relatedTarget).length)return z;H.event=a.extend({},c)}p=a.Event("tooltip"+g),p.originalEvent=c?H.event:f,E.trigger(p,[z,90]);if(p.isDefaultPrevented())return z;a.attr(E[0],"aria-hidden",!b),b?(H.origin=a.extend({},i),z.focus(c),a.isFunction(m.text)&&P(m.text,e),a.isFunction(m.title.text)&&O(m.title.text,e),!v&&l.target==="mouse"&&l.adjust.mouse&&(a(document).bind("mousemove.qtip",function(a){i={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}}),v=d),z.reposition(c),(p.solo=!!h.solo)&&a(n,h.solo).not(E).qtip("hide",p)):(clearTimeout(z.timers.show),delete H.origin,v&&!a(n+'[tracking="true"]:visible',h.solo).not(E).length&&(a(document).unbind("mousemove.qtip"),v=e),z.blur(c)),k&&E.stop(0,1),h.effect===e?(E[g](),q.call(E)):a.isFunction(h.effect)?(h.effect.call(E,z),E.queue("fx",function(a){q(),a()})):E.fadeTo(90,b?1:0,q),b&&h.target.trigger("qtip-"+w+"-inactive");return z},show:function(a){return z.toggle(d,a)},hide:function(a){return z.toggle(e,a)},focus:function(b){if(!z.rendered)return z;var c=a(n),d=parseInt(E[0].style.zIndex,10),e=g.zindex+c.length,f=a.extend({},b),h,i;E.hasClass(p)||(i=a.Event("tooltipfocus"),i.originalEvent=f,E.trigger(i,[z,e]),i.isDefaultPrevented()||(d!==e&&(c.each(function(){this.style.zIndex>d&&(this.style.zIndex=this.style.zIndex-1)}),c.filter("."+p).qtip("blur",f)),E.addClass(p)[0].style.zIndex=e));return z},blur:function(b){var c=a.extend({},b),d;E.removeClass(p),d=a.Event("tooltipblur"),d.originalEvent=c,E.trigger(d,[z]);return z},reposition:function(c,d){if(!z.rendered||C)return z;C=1;var f=t.position.target,g=t.position,j=g.my,l=g.at,m=g.adjust,n=m.method.split(" "),o=E.outerWidth(),p=E.outerHeight(),q=0,r=0,s=a.Event("tooltipmove"),u=E.css("position")==="fixed",v=g.viewport,w={left:0,top:0},x=g.container,y=e,B=z.plugins.tip,D={horizontal:n[0],vertical:n[1]=n[1]||n[0],enabled:v.jquery&&f[0]!==b&&f[0]!==A&&m.method!=="none",left:function(a){var b=D.horizontal==="shift",c=-x.offset.left+v.offset.left+v.scrollLeft,d=j.x==="left"?o:j.x==="right"?-o:-o/2,e=l.x==="left"?q:l.x==="right"?-q:-q/2,f=B&&B.size?B.size.width||0:0,g=B&&B.corner&&B.corner.precedance==="x"&&!b?f:0,h=c-a+g,i=a+o-v.width-c+g,k=d-(j.precedance==="x"||j.x===j.y?e:0),n=j.x==="center";b?(g=B&&B.corner&&B.corner.precedance==="y"?f:0,k=(j.x==="left"?1:-1)*d-g,w.left+=h>0?h:i>0?-i:0,w.left=Math.max(-x.offset.left+v.offset.left+(g&&B.corner.x==="center"?B.offset:0),a-k,Math.min(Math.max(-x.offset.left+v.offset.left+v.width,a+k),w.left))):(h>0&&(j.x!=="left"||i>0)?w.left-=k:i>0&&(j.x!=="right"||h>0)&&(w.left-=n?-k:k),w.left!==a&&n&&(w.left-=m.x),w.lefti&&(w.left=a));return w.left-a},top:function(a){var b=D.vertical==="shift",c=-x.offset.top+v.offset.top+v.scrollTop,d=j.y==="top"?p:j.y==="bottom"?-p:-p/2,e=l.y==="top"?r:l.y==="bottom"?-r:-r/2,f=B&&B.size?B.size.height||0:0,g=B&&B.corner&&B.corner.precedance==="y"&&!b?f:0,h=c-a+g,i=a+p-v.height-c+g,k=d-(j.precedance==="y"||j.x===j.y?e:0),n=j.y==="center";b?(g=B&&B.corner&&B.corner.precedance==="x"?f:0,k=(j.y==="top"?1:-1)*d-g,w.top+=h>0?h:i>0?-i:0,w.top=Math.max(-x.offset.top+v.offset.top+(g&&B.corner.x==="center"?B.offset:0),a-k,Math.min(Math.max(-x.offset.top+v.offset.top+v.height,a+k),w.top))):(h>0&&(j.y!=="top"||i>0)?w.top-=k:i>0&&(j.y!=="bottom"||h>0)&&(w.top-=n?-k:k),w.top!==a&&n&&(w.top-=m.y),w.top<0&&-w.top>i&&(w.top=a));return w.top-a}},F;if(a.isArray(f)&&f.length===2)l={x:"left",y:"top"},w={left:f[0],top:f[1]};else if(f==="mouse"&&(c&&c.pageX||H.event.pageX))l={x:"left",y:"top"},c=(c&&(c.type==="resize"||c.type==="scroll")?H.event:c&&c.pageX&&c.type==="mousemove"?c:i&&i.pageX&&(m.mouse||!c||!c.pageX)?{pageX:i.pageX,pageY:i.pageY}:!m.mouse&&H.origin&&H.origin.pageX?H.origin:c)||c||H.event||i||{},w={top:c.pageY,left:c.pageX};else{f==="event"?c&&c.target&&c.type!=="scroll"&&c.type!=="resize"?f=H.target=a(c.target):f=H.target:H.target=a(f),f=a(f).eq(0);if(f.length===0)return z;f[0]===document||f[0]===b?(q=h.iOS?b.innerWidth:f.width(),r=h.iOS?b.innerHeight:f.height(),f[0]===b&&(w={top:u||h.iOS?(v||f).scrollTop():0,left:u||h.iOS?(v||f).scrollLeft():0})):f.is("area")&&h.imagemap?w=h.imagemap(f,l,D.enabled?n:e):f[0].namespaceURI==="http://www.w3.org/2000/svg"&&h.svg?w=h.svg(f,l):(q=f.outerWidth(),r=f.outerHeight(),w=h.offset(f,x)),w.offset&&(q=w.width,r=w.height,y=w.flipoffset,w=w.offset);if(h.iOS<4.1&&h.iOS>3.1||h.iOS==4.3||!h.iOS&&u)F=a(b),w.left-=F.scrollLeft(),w.top-=F.scrollTop();w.left+=l.x==="right"?q:l.x==="center"?q/2:0,w.top+=l.y==="bottom"?r:l.y==="center"?r/2:0}w.left+=m.x+(j.x==="right"?-o:j.x==="center"?-o/2:0),w.top+=m.y+(j.y==="bottom"?-p:j.y==="center"?-p/2:0),D.enabled?(v={elem:v,height:v[(v[0]===b?"h":"outerH")+"eight"](),width:v[(v[0]===b?"w":"outerW")+"idth"](),scrollLeft:u?0:v.scrollLeft(),scrollTop:u?0:v.scrollTop(),offset:v.offset()||{left:0,top:0}},x={elem:x,scrollLeft:x.scrollLeft(),scrollTop:x.scrollTop(),offset:x.offset()||{left:0,top:0}},w.adjusted={left:D.horizontal!=="none"?D.left(w.left):0,top:D.vertical!=="none"?D.top(w.top):0},w.adjusted.left+w.adjusted.top&&E.attr("class",E[0].className.replace(/ui-tooltip-pos-\w+/i,k+"-pos-"+j.abbrev())),y&&w.adjusted.left&&(w.left+=y.left),y&&w.adjusted.top&&(w.top+=y.top)):w.adjusted={left:0,top:0},s.originalEvent=a.extend({},c),E.trigger(s,[z,w,v.elem||v]);if(s.isDefaultPrevented())return z;delete w.adjusted,d===e||isNaN(w.left)||isNaN(w.top)||f==="mouse"||!a.isFunction(g.effect)?E.css(w):a.isFunction(g.effect)&&(g.effect.call(E,z,a.extend({},w)),E.queue(function(b){a(this).css({opacity:"",height:""}),a.browser.msie&&this.style.removeAttribute("filter"),b()})),C=0;return z},redraw:function(){if(z.rendered<1||D)return z;var a=t.position.container,b,c,d,e;D=1,t.style.height&&E.css("height",t.style.height),t.style.width?E.css("width",t.style.width):(E.css("width","").addClass(r),c=E.width()+1,d=E.css("max-width")||"",e=E.css("min-width")||"",b=(d+e).indexOf("%")>-1?a.width()/100:0,d=(d.indexOf("%")>-1?b:1)*parseInt(d,10)||c,e=(e.indexOf("%")>-1?b:1)*parseInt(e,10)||0,c=d+e?Math.min(Math.max(c,e),d):c,E.css("width",Math.round(c)).removeClass(r)),D=0;return z},disable:function(b){"boolean"!==typeof b&&(b=!E.hasClass(m)&&!H.disabled),z.rendered?(E.toggleClass(m,b),a.attr(E[0],"aria-disabled",b)):H.disabled=!!b;return z},enable:function(){return z.disable(e)},destroy:function(){var b=s[0],c=a.attr(b,u),d=s.data("qtip");z.rendered&&(E.remove(),a.each(z.plugins,function(){this.destroy&&this.destroy()})),clearTimeout(z.timers.show),clearTimeout(z.timers.hide),R();if(!d||z===d)a.removeData(b,"qtip"),t.suppress&&c&&(a.attr(b,"title",c),s.removeAttr(u)),s.removeAttr("aria-describedby");s.unbind(".qtip-"+w),delete j[z.id];return s}})}function x(b){var c;if(!b||"object"!==typeof b)return e;if(b.metadata===f||"object"!==typeof b.metadata)b.metadata={type:b.metadata};if("content"in b){if(b.content===f||"object"!==typeof b.content||b.content.jquery)b.content={text:b.content};c=b.content.text||e,!a.isFunction(c)&&(!c&&!c.attr||c.length<1||"object"===typeof c&&!c.jquery)&&(b.content.text=e);if("title"in b.content){if(b.content.title===f||"object"!==typeof b.content.title)b.content.title={text:b.content.title};c=b.content.title.text||e,!a.isFunction(c)&&(!c&&!c.attr||c.length<1||"object"===typeof c&&!c.jquery)&&(b.content.title.text=e)}}if("position"in b)if(b.position===f||"object"!==typeof b.position)b.position={my:b.position,at:b.position};if("show"in b)if(b.show===f||"object"!==typeof b.show)b.show.jquery?b.show={target:b.show}:b.show={event:b.show};if("hide"in b)if(b.hide===f||"object"!==typeof b.hide)b.hide.jquery?b.hide={target:b.hide}:b.hide={event:b.hide};if("style"in b)if(b.style===f||"object"!==typeof b.style)b.style={classes:b.style};a.each(h,function(){this.sanitize&&this.sanitize(b)});return b}function w(){w.history=w.history||[],w.history.push(arguments);if("object"===typeof console){var a=console[console.warn?"warn":"log"],b=Array.prototype.slice.call(arguments),c;typeof arguments[0]==="string"&&(b[0]="qTip2: "+b[0]),c=a.apply?a.apply(console,b):a(b)}}"use strict";var d=!0,e=!1,f=null,g,h,i,j={},k="ui-tooltip",l="ui-widget",m="ui-state-disabled",n="div.qtip."+k,o=k+"-default",p=k+"-focus",q=k+"-hover",r=k+"-fluid",s="-31000px",t="_replacedByqTip",u="oldtitle",v;g=a.fn.qtip=function(b,h,i){var j=(""+b).toLowerCase(),k=f,l=a.makeArray(arguments).slice(1),m=l[l.length-1],n=this[0]?a.data(this[0],"qtip"):f;if(!arguments.length&&n||j==="api")return n;if("string"===typeof b){this.each(function(){var b=a.data(this,"qtip");if(!b)return d;m&&m.timeStamp&&(b.cache.event=m);if(j!=="option"&&j!=="options"||!h)b[j]&&b[j].apply(b[j],l);else if(a.isPlainObject(h)||i!==c)b.set(h,i);else{k=b.get(h);return e}});return k!==f?k:this}if("object"===typeof b||!arguments.length){n=x(a.extend(d,{},b));return g.bind.call(this,n,m)}},g.bind=function(b,f){return this.each(function(k){function r(b){function d(){p.render(typeof b==="object"||l.show.ready),m.show.add(m.hide).unbind(o)}if(p.cache.disabled)return e;p.cache.event=a.extend({},b),p.cache.target=b?a(b.target):[c],l.show.delay>0?(clearTimeout(p.timers.show),p.timers.show=setTimeout(d,l.show.delay),n.show!==n.hide&&m.hide.bind(n.hide,function(){clearTimeout(p.timers.show)})):d()}var l,m,n,o,p,q;q=a.isArray(b.id)?b.id[k]:b.id,q=!q||q===e||q.length<1||j[q]?g.nextid++:j[q]=q,o=".qtip-"+q+"-create",p=z.call(this,q,b);if(p===e)return d;l=p.options,a.each(h,function(){this.initialize==="initialize"&&this(p)}),m={show:l.show.target,hide:l.hide.target},n={show:a.trim(""+l.show.event).replace(/ /g,o+" ")+o,hide:a.trim(""+l.hide.event).replace(/ /g,o+" ")+o},/mouse(over|enter)/i.test(n.show)&&!/mouse(out|leave)/i.test(n.hide)&&(n.hide+=" mouseleave"+o),m.show.bind("mousemove"+o,function(a){i={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}}),m.show.bind(n.show,r),(l.show.ready||l.prerender)&&r(f)})},h=g.plugins={Corner:function(a){a=(""+a).replace(/([A-Z])/," $1").replace(/middle/gi,"center").toLowerCase(),this.x=(a.match(/left|right/i)||a.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(a.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase();var b=a.charAt(0);this.precedance=b==="t"||b==="b"?"y":"x",this.string=function(){return this.precedance==="y"?this.y+this.x:this.x+this.y},this.abbrev=function(){var a=this.x.substr(0,1),b=this.y.substr(0,1);return a===b?a:a==="c"||a!=="c"&&b!=="c"?b+a:a+b},this.clone=function(){return{x:this.x,y:this.y,precedance:this.precedance,string:this.string,abbrev:this.abbrev,clone:this.clone}}},offset:function(a,b){function i(a,b){c.left+=b*a.scrollLeft(),c.top+=b*a.scrollTop()}var c=a.offset(),d=b,e=0,f=document.body,g,h;if(d){do{d.css("position")!=="static"&&(g=d[0]===f?{left:parseInt(d.css("left"),10)||0,top:parseInt(d.css("top"),10)||0}:d.position(),c.left-=g.left+(parseInt(d.css("borderLeftWidth"),10)||0)+(parseInt(d.css("marginLeft"),10)||0),c.top-=g.top+(parseInt(d.css("borderTopWidth"),10)||0),h=d.css("overflow"),(h==="scroll"||h==="auto")&&++e);if(d[0]===f)break}while(d=d.offsetParent());b[0]!==f&&e&&i(b,1)}return c},iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,3})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_","."))||e,fn:{attr:function(b,c){if(this.length){var d=this[0],e="title",f=a.data(d,"qtip");if(b===e&&f&&"object"===typeof f&&f.options.suppress){if(arguments.length<2)return a.attr(d,u);f&&f.options.content.attr===e&&f.cache.attr&&f.set("content.text",c);return this.attr(u,c)}}return a.fn["attr"+t].apply(this,arguments)},clone:function(b){var c=a([]),d="title",e=a.fn["clone"+t].apply(this,arguments);b||e.filter("["+u+"]").attr("title",function(){return a.attr(this,u)}).removeAttr(u);return e},remove:a.ui?f:function(b,c){a.ui||a(this).each(function(){c||(!b||a.filter(b,[this]).length)&&a("*",this).add(this).each(function(){a(this).triggerHandler("remove")})})}}},a.each(h.fn,function(b,c){if(!c||a.fn[b+t])return d;var e=a.fn[b+t]=a.fn[b];a.fn[b]=function(){return c.apply(this,arguments)||e.apply(this,arguments)}}),g.version="nightly",g.nextid=0,g.inactiveEvents="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),g.zindex=15e3,g.defaults={prerender:e,id:e,overwrite:d,suppress:d,content:{text:d,attr:"title",title:{text:e,button:e}},position:{my:"top left",at:"bottom right",target:e,container:e,viewport:e,adjust:{x:0,y:0,mouse:d,resize:d,method:"flip flip"},effect:function(b,c,d){a(this).animate(c,{duration:200,queue:e})}},show:{target:e,event:"mouseenter",effect:d,delay:90,solo:e,ready:e,autofocus:e},hide:{target:e,event:"mouseleave",effect:d,delay:0,fixed:e,inactive:e,leave:"window",distance:e},style:{classes:"",widget:e,width:e,height:e},events:{render:f,move:f,show:f,hide:f,toggle:f,visible:f,focus:f,blur:f}},h.svg=function(b,c){var d=a(document),e=b[0],f={width:0,height:0,offset:{top:1e10,left:1e10}},g,h,i,j,k;if(e.getBBox&&e.parentNode){g=e.getBBox(),h=e.getScreenCTM(),i=e.farthestViewportElement||e;if(!i.createSVGPoint)return f;j=i.createSVGPoint(),j.x=g.x,j.y=g.y,k=j.matrixTransform(h),f.offset.left=k.x,f.offset.top=k.y,j.x+=g.width,j.y+=g.height,k=j.matrixTransform(h),f.width=k.x-f.offset.left,f.height=k.y-f.offset.top,f.offset.left+=d.scrollLeft(),f.offset.top+=d.scrollTop()}return f}})(jQuery,window); diff --git a/javascripts/vendor/kartograph.min.js b/javascripts/vendor/kartograph.min.js new file mode 100644 index 0000000..9afe6dd --- /dev/null +++ b/javascripts/vendor/kartograph.min.js @@ -0,0 +1,23 @@ +/* + * Kartograph 0.8.2 - a svg mapping library + * Copyright (C) 2011-2013 Gregor Aisch + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * NOTE, manual modification made: + * - removed Function.bind implementation, does not work properly w/ angular 1.6 +*/ +!function(){function t(){var t={},e=[],n=1,o=1;return t.size=function(r){return arguments.length?(o=r,t):o},t.iterations=function(r){return arguments.length?(n=r,t):n},t.add=function(r){return e.push(r),t},t.means=function(){for(var t=[],i={},a=Math.min(o,e.length),s=0,l=2*a;l>s;s++){var u=e[~~(Math.random()*e.length)],p=u.x+"/"+u.y;if(!(p in i)&&(i[p]=1,t.push({x:u.x,y:u.y})>=a))break}a=t.length;for(var h=0;n>h;h++){for(var c=r().points(t),s=0;a>s;s++){var f=t[s];f.sumX=0,f.sumY=0,f.size=0,f.points=[],f.indices=[]}for(var s=0;ss;s++){var f=t[s];f.size&&(f.x=f.sumX/f.size,f.y=f.sumY/f.size)}}return t},t}function r(){function t(r,n){if(r.length){var o=a[n%a.length],i=r.length>>1;return r.sort(e(o)),{axis:o,point:r[i],left:t(r.slice(0,i),n+1),right:t(r.slice(i+1),n+1)}}}function r(t,r){for(var e=0,n=0;nr?-1:r>e?1:0}}function n(t,e,o){if(r(t.point,e)r;r++)if(r in this&&this[r]===t)return r;return-1};Br="undefined"!=typeof exports&&null!==exports?exports:this,br=Br.$K=null!=(Rr=Br.kartograph)?Rr:Br.kartograph={},br.version="0.8.1",e=Br.jQuery,br.__verbose=!1,Sr=function(){var t;try{return console.warn.apply(console,arguments)}catch(r){t=r;try{return opera.postError.apply(opera,arguments)}catch(r){return t=r,alert(Array.prototype.join.call(arguments," "))}}},xr=function(){var t;if(br.__verbose)try{return console.debug.apply(console,arguments)}catch(r){t=r;try{return opera.postError.apply(opera,arguments)}catch(r){return t=r,alert(Array.prototype.join.call(arguments," "))}}},null==(Fr=(Er=String.prototype).trim)&&(Er.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t){"use strict";if(null==this)throw new TypeError;var r=Object(this),e=r.length>>>0;if(0===e)return-1;var n=0;if(arguments.length>0&&(n=Number(arguments[1]),n!=n?n=0:0!=n&&1/0!=n&&n!=-1/0&&(n=(n>0||-1)*Math.floor(Math.abs(n)))),n>=e)return-1;for(var o=n>=0?n:Math.max(e-Math.abs(n),0);e>o;o++)if(o in r&&r[o]===t)return o;return-1}),zr=function(){var t,r,e,n,o;for(t={},o="Boolean Number String Function Array Date RegExp Undefined Null".split(" "),e=0,n=o.length;n>e;e++)r=o[e],t["[object "+r+"]"]=r.toLowerCase();return function(r){var e;return e=Object.prototype.toString.call(r),t[e]||"object"}}(),i=function(){function t(t,r,e,n){var o;null==t&&(t=0),null==r&&(r=0),null==e&&(e=null),null==n&&(n=null),o=this,null===e?(o.xmin=Number.MAX_VALUE,o.xmax=-1*Number.MAX_VALUE):(o.xmin=o.left=t,o.xmax=o.right=t+e,o.width=e),null===n?(o.ymin=Number.MAX_VALUE,o.ymax=-1*Number.MAX_VALUE):(o.ymin=o.top=r,o.ymax=o.bottom=n+r,o.height=n)}return t.prototype.update=function(t,r){var e;return null==r&&(r=t[1],t=t[0]),e=this,e.xmin=Math.min(e.xmin,t),e.ymin=Math.min(e.ymin,r),e.xmax=Math.max(e.xmax,t),e.ymax=Math.max(e.ymax,r),e.left=e.xmin,e.top=e.ymin,e.right=e.xmax,e.bottom=e.ymax,e.width=e.xmax-e.xmin,e.height=e.ymax-e.ymin,this},t.prototype.intersects=function(t){return t.lefts.left&&t.tops.top},t.prototype.inside=function(t,r){var e;return e=this,t>=e.left&&t<=e.right&&r>=e.top&&r<=e.bottom},t.prototype.join=function(t){var r;return r=this,r.update(t.left,t.top),r.update(t.right,t.bottom),this},t}(),i.fromXML=function(t){var r,e,n,o;return n=Number(t.getAttribute("x")),o=Number(t.getAttribute("y")),e=Number(t.getAttribute("w")),r=Number(t.getAttribute("h")),new br.BBox(n,o,e,r)},br.BBox=i,null==(Zr=br.geom)&&(br.geom={}),null==(Kr=(Tr=br.geom).clipping)&&(Tr.clipping={}),d=function(){function t(){}var r,e,n,o,i;return e=0,n=1,o=2,r=4,i=8,t.prototype.compute_out_code=function(t,r,e){var n,o;return o=this,n=o.INSIDE,rt.right&&(n|=o.RIGHT),et.bottom&&(n|=o.BOTTOM),n},t.prototype.clip=function(t,r,e,n,o){var i,a,s,l,u,p,h;for(u=this,a=u.compute_out_code(t,r,e),s=u.compute_out_code(t,n,o),i=False;True;){if(!(a|s)){i=True;break}if(a&s)break;l=0===code?s:a,l&u.TOP?(p=r+(n-r)*(t.top-e)/(o-e),h=t.top):l&u.BOTTOM?(p=r+(n-r)*(t.bottom-e)/(o-e),h=t.bottom):l&u.RIGHT?(h=e+(o-e)*(t.right-r)/(n-r),p=t.right):l&u.LEFT&&(h=e+(o-e)*(t.left-r)/(n-r),p=t.left),l===a?(r=p,e=h,a=u.compute_out_code(t,r,e)):(n=p,o=h,s=u.compute_out_code(t,n,o))}return i?[r,e,n,o]:null},t}(),br.geom.clipping.CohenSutherland=d,S=function(){function t(t,r,n){var o,i;i=this,i.container=o=e(t),null==r&&(r=o.width()),null==n&&(n=o.height()),0===n&&(n="auto"),i.size={h:n,w:r},i.markers=[],i.pathById={},i.container.addClass("kartograph")}return t.prototype.createSVGLayer=function(t){var r,n,o,i,a,s,l,u;return i=this,null==(u=i._layerCnt)&&(i._layerCnt=0),o=i._layerCnt++,l=i.viewport,n=i.container,a=Raphael(n[0],l.width,l.height),s=e(a.canvas),s.css({position:"absolute",top:"0px",left:"0px","z-index":o+5}),"static"===n.css("position")&&n.css({position:"relative",height:l.height+"px"}),s.addClass(t),r=e("desc",a.canvas).text(),e("desc",a.canvas).text(r.replace("with ","with kartograph "+br.version+" and ")),a},t.prototype.createHTMLLayer=function(t){var r,n,o,i,a,s;return i=this,a=i.viewport,r=i.container,null==(s=i._layerCnt)&&(i._layerCnt=0),o=i._layerCnt++,n=e('
'),n.css({position:"absolute",top:"0px",left:"0px",width:a.width+"px",height:a.height+"px","z-index":o+5}),r.append(n),n},t.prototype.load=function(t,r,n){var o,i,a,s;return i=this,o=e.Deferred(),i.clear(),i.opts=null!=n?n:{},null==(s=(a=i.opts).zoom)&&(a.zoom=1),i.mapLoadCallback=r,i._loadMapDeferred=o,i._lastMapUrl=t,i.cacheMaps&&null!=br.__mapCache[t]?i._mapLoaded(br.__mapCache[t]):e.ajax({url:t,dataType:"text",success:i._mapLoaded,context:i,error:function(t,r,e){return Sr(t,r,e)}}),o.promise()},t.prototype.loadMap=function(){return this.load.apply(this,arguments)},t.prototype.setMap=function(t,r){var e,n,o;e=this,e.opts=null!=r?r:{},null==(o=(n=e.opts).zoom)&&(n.zoom=1),e._lastMapUrl="string",e._mapLoaded(t)},t.prototype._mapLoaded=function(t){var r,n,o,a,s,l,u,p,h,c,f,d,y,m,v,g,_;l=this,l.cacheMaps&&(null==(y=br.__mapCache)&&(br.__mapCache={}),br.__mapCache[l._lastMapUrl]=t);try{t=e(t)}catch(b){return o=b,Sr("something went horribly wrong while parsing svg"),l._loadMapDeferred.reject("could not parse svg"),void 0}l.svgSrc=t,r=e("view",t),null==l.paper&&(f=l.size.w,a=l.size.h,"auto"===a&&(p=r.attr("w")/r.attr("h"),a=f/p),l.viewport=new i(0,0,f,a)),c=l.viewport,l.viewAB=n=br.View.fromXML(r[0]),u=null!=(m=l.opts.padding)?m:0,s=null!=(v=l.opts.halign)?v:"center",h=null!=(g=l.opts.valign)?g:"center",d=null!=(_=l.opts.zoom)?_:1,l.viewBC=new br.View(l.viewAB.asBBox(),c.width*d,c.height*d,u,s,h),l.proj=br.Proj.fromXML(e("proj",r)[0]),null!=l.mapLoadCallback&&l.mapLoadCallback(l),null!=l._loadMapDeferred&&l._loadMapDeferred.resolve(l)},t.prototype.addLayer=function(t,r){var n,o,i,a,s,l,u,p,h,c,f,d,y,m,v,g,_;return null==r&&(r={}),u=this,null==(v=u.layerIds)&&(u.layerIds=[]),null==(g=u.layers)&&(u.layers={}),null==u.paper&&(u.paper=u.createSVGLayer()),d=t,"object"===zr(r)?(s=r.name,c=r.key,m=r.title):r={},l=u.paper,r.add_svg_layer&&(l=u.createSVGLayer()),null==s&&(s=d),y=e("#"+d,u.svgSrc),0!==y.length?(a=new V(s,c,u,r.filter,l),n=e("*",y[0]),f=n.length,o=null!=(_=r.chunks)?_:f,i=0,h=function(){var t,e,s,l,u,c;for(t=o*i,e=u=0;o>=0?o>u:u>o;e=o>=0?++u:--u)f>t+e&&a.addPath(n.get(t+e),m);if(null!=r.styles){c=r.styles;for(s in c)l=c[s],a.style(s,l)}return i++,f>i*o?setTimeout(h,0):p()},p=function(){var t,e,n,o;for(a.paths.length>0&&(u.layers[s]=a,u.layerIds.push(s)),t=["click","mouseenter","mouseleave","dblclick","mousedown","mouseup","mouseover","mouseout"],n=0,o=t.length;o>n;n++)e=t[n],"function"===zr(r[e])&&a.on(e,r[e]);return null!=r.tooltips&&a.tooltips(r.tooltips),null!=r.done?r.done():void 0},null!=r.chunks?setTimeout(h,0):h(),u):void 0},t.prototype.getLayer=function(t){var r;return r=this,null==r.layers[t]?(Sr("could not find layer "+t),null):r.layers[t]},t.prototype.getLayerPath=function(t,r){var e,n;return n=this,e=n.getLayer(t),null!=e?"object"===zr(r)?e.getPaths(r)[0]:e.getPath(r):null},t.prototype.onLayerEvent=function(t,r,e){var n;return n=this,n.getLayer(e).on(t,r),n},t.prototype.addMarker=function(t){var r,e;return r=this,r.markers.push(t),e=r.viewBC.project(r.viewAB.project(r.proj.project(t.lonlat.lon,t.lonlat.lat))),t.render(e[0],e[1],r.container,r.paper)},t.prototype.clearMarkers=function(){var t,r,e,n,o;for(r=this,o=r.markers,e=0,n=o.length;n>e;e++)t=o[e],t.clear();return r.markers=[]},t.prototype.fadeIn=function(t){var r,e,n,o,i,a,s,l,u,p,h;null==t&&(t={}),i=this,o=null!=(l=t.layer)?l:i.layerIds[i.layerIds.length-1],e=null!=(u=t.duration)?u:500,p=i.layers[o].pathsById,h=[];for(n in p)s=p[n],h.push(function(){var t,n,o;for(o=[],t=0,n=s.length;n>t;t++)a=s[t],r="function"===zr(e)?e(a.data):e,a.svgPath.attr("opacity",0),o.push(a.svgPath.animate({opacity:1},r));return o}());return h},t.prototype.loadCoastline=function(){var t;return t=this,e.ajax({url:"coastline.json",success:t.renderCoastline,context:t})},t.prototype.resize=function(t,r){var e,n,o,i,a,s,l,u,p,h,c,f,d,y,m,v,g;a=this,e=a.container,null==t&&(t=e.width()),null==r&&(r=e.height()),a.viewport=p=new br.BBox(0,0,t,r),null!=a.paper&&a.paper.setSize(p.width,p.height),p=a.viewport,s=null!=(d=a.opts.padding)?d:0,n=null!=(y=a.opts.halign)?y:"center",u=null!=(m=a.opts.valign)?m:"center",h=a.opts.zoom,a.viewBC=new br.View(a.viewAB.asBBox(),p.width*h,p.height*h,s,n,u),v=a.layers;for(o in v)i=v[o],i.setView(a.viewBC);if(null!=a.symbolGroups)for(g=a.symbolGroups,c=0,f=g.length;f>c;c++)l=g[c],l.onResize()},t.prototype.lonlat2xy=function(t){var r,e;return e=this,2===t.length&&(t=new br.LonLat(t[0],t[1])),3===t.length&&(t=new br.LonLat(t[0],t[1],t[2])),r=e.proj.project(t.lon,t.lat,t.alt),e.viewBC.project(e.viewAB.project(r))},t.prototype.addSymbolGroup=function(t){var r,e;return r=this,null==(e=r.symbolGroups)&&(r.symbolGroups=[]),r.symbolGroups.push(t)},t.prototype.removeSymbols=function(t){var r,e,n,o,i,a;if(r=this,null!=t)return r.symbolGroups[t].remove();for(i=r.symbolGroups,a=[],n=0,o=i.length;o>n;n++)e=i[n],a.push(e.remove());return a},t.prototype.clear=function(){var t,r,n,o,i,a;if(r=this,null!=r.layers){for(t in r.layers)r.layers[t].remove();r.layers={},r.layerIds=[]}if(null!=r.symbolGroups){for(a=r.symbolGroups,o=0,i=a.length;i>o;o++)n=a[o],n.remove();r.symbolGroups=[]}return null!=r.paper?(e(r.paper.canvas).remove(),r.paper=void 0):void 0},t.prototype.loadCSS=function(t,r){var n;return n=this,Raphael.svg?(e("body").append(''),r()):e.ajax({url:t,dataType:"text",success:function(t){return n.styles=br.parsecss(t),r()},error:function(r,e,n){return Sr("error while loading "+t,r,e,n)}})},t.prototype.applyCSS=function(t,r){var e,n,o,i,a,s,l,u,p,h,c,f,d,y,m;if(o=this,null==o.styles)return t;null==(f=o._pathTypes)&&(o._pathTypes=["path","circle","rectangle","ellipse"]),null==(d=o._regardStyles)&&(o._regardStyles=["fill","stroke","fill-opacity","stroke-width","stroke-opacity"]);for(s in o.styles)for(i=s,y=i.split(","),u=0,h=y.length;h>u;u++)if(l=y[u],i=l.split(" "),i=i[i.length-1],i=i.split(":"),!(i.length>1||(i=i[0].split("."),e=i.slice(1),e.length>0&&e.indexOf(r)<0||(i=i[0],o._pathTypes.indexOf(i)>=0&&i!==t.type))))for(a=o.styles[s],m=o._regardStyles,p=0,c=m.length;c>p;p++)n=m[p],null!=a[n]&&t.attr(n,a[n]);return t},t.prototype.style=function(t,r,e,n,o){var i;return i=this,t=i.getLayer(t),null!=t?t.style(r,e,n,o):void 0},t}(),L=br,Br.kartograph=function(t,r,e){return new S(t,r,e)},br.map=function(t,r,e){return new S(t,r,e)},br.__mapCache={},e.extend(Br.kartograph,L),R=function(){function t(t,r,e){null==e&&(e=0),this.lon=Number(t),this.lat=Number(r),this.alt=Number(e)}return t.prototype.distance=function(t){var r,e,n,o,i,a,s,l,u;return u=this,r=6371,a=Math.PI/180,o=(t.lat-u.lat)*a,i=(t.lon-u.lon)*a,s=u.lat*a,l=t.lat*a,e=Math.sin(o/2)*Math.sin(o/2)+Math.sin(i/2)*Math.sin(i/2)*Math.cos(s)*Math.cos(l),n=2*Math.atan2(Math.sqrt(e),Math.sqrt(1-e)),r*n},t}(),G=function(t){function r(t,e,n){null==n&&(n=0),r.__super__.constructor.call(this,e,t,n)}return ae(r,t),r}(R),br.LonLat=R,br.LatLon=G,V=function(){function t(t,r,e,n,o){var i;i=this,i.id=t,i.path_id=r,i.paper=null!=o?o:e.paper,i.view=e.viewBC,i.map=e,i.filter=n}return t.prototype.addPath=function(t,r){var e,n,o,i,a,s,l;return n=this,null==(a=n.paths)&&(n.paths=[]),e=new O(t,n.id,n,r),"function"===zr(n.filter)&&n.filter(e.data)===!1?(e.remove(),void 0):(n.paths.push(e),null!=n.path_id?(null==(s=n.pathsById)&&(n.pathsById={}),null==(l=(o=n.pathsById)[i=e.data[n.path_id]])&&(o[i]=[]),n.pathsById[e.data[n.path_id]].push(e)):void 0)},t.prototype.hasPath=function(t){var r;return r=this,null!=r.pathsById&&null!=r.pathsById[t]},t.prototype.getPathsData=function(){var t,r,e,n,o,i;for(t=this,e=[],i=t.paths,n=0,o=i.length;o>n;n++)r=i[n],e.push(r.data);return e},t.prototype.getPath=function(t){var r;return r=this,r.hasPath(t)?r.pathsById[t][0]:null},t.prototype.getPaths=function(t){var r,e,n,o,i,a,s,l;if(o=this,n=[],"object"===zr(t))for(l=o.paths,a=0,s=l.length;s>a;a++){i=l[a],e=!0;for(r in t)e=e&&i.data[r]===t[r];e&&n.push(i)}return n},t.prototype.setView=function(t){var r,e,n,o,i;for(r=this,i=r.paths,n=0,o=i.length;o>n;n++)e=i[n],e.setView(t);return r},t.prototype.remove=function(){var t,r,e,n,o,i;for(t=this,o=t.paths,i=[],e=0,n=o.length;n>e;e++)r=o[e],i.push(r.remove());return i},t.prototype.style=function(t,r,e,n){var o,i,a,s,l,u,p,h,c,f,d;if(u=this,"object"===zr(t)){for(l in t)h=t[l],u.style(l,h);return u}for(null==e&&(e=0),null==n&&(n=0),d=u.paths,c=0,f=d.length;f>c;c++)p=d[c],h=jr(r,p.data),s=jr(e,p.data),a=jr(n,p.data),s>0?(i={},i[t]=h,o=Raphael.animation(i,1e3*s),p.svgPath.animate(o.delay(1e3*a))):p.svgPath.attr(t,h);return u},t.prototype.on=function(t,r){var n,o,i,a,s,l,u;for(i=this,n=function(){function t(t,r,e){this.type=t,this.cb=r,this.layer=e,this.handle=se(this.handle,this)}return t.prototype.handle=function(t){var r;return i=this,r=i.layer.map.pathById[t.target.getAttribute("id")],i.cb(r.data,r.svgPath,t)},t}(),o=new n(t,r,i),u=i.paths,s=0,l=u.length;l>s;s++)a=u[s],e(a.svgPath.node).bind(t,o.handle);return i},t.prototype.tooltips=function(t,r){var n,o,i,a,s,l,u;for(n=this,i=function(t,n){var o;return o={position:{target:"mouse",viewport:e(window),adjust:{x:7,y:7}},show:{delay:null!=r?r:20},events:{show:function(t,r){return e(".qtip").filter(function(){return this!==r.elements.tooltip.get(0)}).hide()}},content:{}},null!=n?"string"==typeof n?o.content.text=n:e.isArray(n)&&(o.content.title=n[0],o.content.text=n[1]):o.content.text="n/a",e(t.svgPath.node).qtip(o)},u=n.paths,s=0,l=u.length;l>s;s++)o=u[s],a=jr(t,o.data),i(o,a);return n},t.prototype.sort=function(t){var r,e,n,o,i,a;for(e=this,e.paths.sort(function(r,e){var n,o,i;return n=t(r.data),o=t(e.data),n===o?0:null!=(i=n>o)?i:{1:-1}}),r=!1,a=e.paths,o=0,i=a.length;i>o;o++)n=a[o],r&&n.svgPath.insertAfter(r.svgPath),r=n;return e},t}(),jr=function(t,r){return"function"===zr(t)?t(r):t},wr=0,O=function(){function t(t,r,e,n){var o,i,a,s,l,u,p,h,c,f,d,y,m,v;for(l=this,u=e.paper,s=e.map,d=s.viewBC,l.path=p=br.geom.Path.fromSVG(t),l.vpath=d.projectPath(p),l.svgPath=l.vpath.toSVG(u),l.svgPath.data("path",l),null==s.styles?Raphael.svg&&l.svgPath.node.setAttribute("class",r):s.applyCSS(l.svgPath,r),c="path_"+wr++,l.svgPath.node.setAttribute("id",c),s.pathById[c]=l,i={},a=m=0,v=t.attributes.length-1;v>=0?v>=m:m>=v;a=v>=0?++m:--m)o=t.attributes[a],"data-"===o.name.substr(0,5)&&(f=o.value,y=Number(f),""===f.trim()||y!==f||isNaN(y)||(f=y),i[o.name.substr(5)]=f);l.data=i,"string"===zr(n)?h=n:"function"===zr(n)&&(h=n(i)),null!=h&&l.svgPath.attr("title",h)}return t.prototype.setView=function(t){var r,e,n;return r=this,e=t.projectPath(r.path),r.vpath=e,"path"===r.path.type?(n=e.svgString(),r.svgPath.attr({path:n})):"circle"===r.path.type?r.svgPath.attr({cx:e.x,cy:e.y,r:e.r}):void 0},t.prototype.remove=function(){var t;return t=this,t.svgPath.remove()},t}(),br.parsecss=function(t,r){var e,n,o,i,a,s,l,u;for(i={},t=Mr(t),u=t.split("`b%"),s=0,l=u.length;l>s;s++)if(e=u[s],e=e.split("%b`"),!(e.length<2))if(e[0]=Ar(e[0]),o=Cr(e[1]),null!=i[e[0]])for(n in o)a=o[n],i[e[0]][n]=a;else i[e[0]]=o;return"function"!==zr(r)?i:(r(i),void 0)},Pr={},Cr=function(t){var r,e,n,o,i,a;for(n=Pr[t].replace(/^{|}$/g,""),n=Mr(n),e={},a=n.split(";"),o=0,i=a.length;i>o;o++)r=a[o],r=r.split(":"),r.length<2||(e[Ar(r[0])]=Ar(r.slice(1).join(":")));return e},J=/{[^{}]*}/,rr=/\[[^\[\]]*\]|{[^{}]*}|\([^()]*\)|function(\s+\w+)?(\s*%b`\d+`b%){2}/,tr=/(?:\/\*(?:[^\*]|\*[^\/])*\*\/)|(\\.|"(?:[^\\\"]|\\.|\\\n)*"|'(?:[^\\\']|\\.|\\\n)*')/g,er=/%\w`(\d+)`\w%/,Lr=0,Mr=function(t,r){var e,n,o;for(t=t.replace(tr,function(t,r){var e;return r?(e="%s`"+ ++Lr+"`s%",Pr[Lr]=r.replace(/^\\/,""),e):""}),e=r?rr:J;n=e.exec(t);)o="%b`"+ ++Lr+"`b%",Pr[Lr]=n[0],t=t.replace(e,o);return t},Ar=function(t){var r;if(null==t)return t;for(;r=er.exec(t);)t=t.replace(er,Pr[r[1]]);return t.trim()},null==(Jr=br.geom)&&(br.geom={}),Q=function(){function t(t,r,e){var n,o,i,a;for(null==e&&(e=!0),o=this,o.type=t,o.contours=[],i=0,a=r.length;a>i;i++)n=r[i],Ir(n)||n.reverse(),o.contours.push(n);o.closed=e}return t.prototype.clipToBBox=function(){throw"path clipping is not implemented yet"},t.prototype.toSVG=function(t){var r;return r=this.svgString(),t.path(r)},t.prototype.svgString=function(){var t,r,e,n,o,i,a,s,l,u,p,h,c;for(n=this,o="",e=n.closed?"Z M":"M",h=n.contours,s=0,u=h.length;u>s;s++)for(t=h[s],r=!0,o+=""===o?"M":e,l=0,p=t.length;p>l;l++)c=t[l],i=c[0],a=c[1],r||(o+="L"),o+=i+","+a,r=!1;return n.closed&&(o+="Z"),o},t.prototype.area=function(){var t,r,e,n,o,i;if(e=this,null!=e.areas)return e._area;for(e.areas=[],e._area=0,i=e.contours,n=0,o=i.length;o>n;n++)r=i[n],t=kr(r),e.areas.push(t),e._area+=t;return e._area},t.prototype.centroid=function(){var t,r,e,n,o,i,a,s,l,u,p,h,c,f,d,y,m,v,g,_,b,x,w,M,P,C,j,A,B,L,S,k,I,N,G,z,E;if(y=this,null!=y._centroid)return y._centroid;for(e=y.area(),i=a=0,p=j=0,I=y.contours.length-1;I>=0?I>=j:j>=I;p=I>=0?++j:--j)if(o=y.contours[p],n=[],f=o.length,r=y.areas[p],c=r/e,0!==c){for(h=A=0,N=f-1;N>=0?N>=A:A>=N;h=N>=0?++A:--A)if(m=o[h],v=o[(h+1)%f],s=0,n.push(m),m[0]===v[0]&&(s=Math.abs(m[1]-v[1])),m[1]===v[1]&&(s=Math.abs(m[0]-v[0])),s>10)for(t=Math.floor(2*s),g=B=1,G=t-1;G>=1?G>=B:B>=G;g=G>=1?++B:--B)_=[m[0]+g/t*(v[0]-m[0]),m[1]+g/t*(v[1]-m[1])],n.push(_);for(w=P=M=C=0,f=n.length,S=[],b=0,h=L=0,z=f-1;z>=0?z>=L:L>=z;h=z>=0?++L:--L)m=n[h],v=n[(h+1)%f],l=v[0]-m[0],u=v[1]-m[1],d=Math.sqrt(l*l+u*u),S.push(d),b+=d;for(h=k=0,E=f-1;E>=0?E>=k:k>=E;h=E>=0?++k:--k)m=n[h],x=S[h]/b,w+=x*m[0],P+=x*m[1];i+=w*c,a+=P*c}return y._centroid=[i,a],y._centroid},t.prototype.isInside=function(t,r){var e,n,o,i,a,s;if(i=this,e=i._bbox,te[2]||re[3])return!1;for(o=a=0,s=i.contours.length-1;s>=0?s>=a:a>=s;o=s>=0?++a:--a)if(n=i.contours[o],Nr(n,[t,r]))return!0;return!1},t}(),br.geom.Path=Q,f=function(t){function r(t,e,n){this.x=t,this.y=e,this.r=n,r.__super__.constructor.call(this,"circle",null,!0)}return ae(r,t),r.prototype.toSVG=function(t){var r;return r=this,t.circle(r.x,r.y,r.r)},r.prototype.centroid=function(){var t;return t=this,[t.x,t.y]},r.prototype.area=function(){var t;return t=this,Math.PI*t.r*m.r},r}(Q),br.geom.Circle=f,Q.fromSVG=function(t){var r,e,n,o,i,a,s,l,u,p,h,c,f,d;if(o=[],c=t.nodeName,p=null,"path"===c){for(l=t.getAttribute("d").trim(),s=Raphael.parsePathString(l),r="Z"===s[s.length-1],h=r?"Z M":"M",n=[],f=0,d=s.length;d>f;f++)e=s[f],0!==e.length&&("M"===e[0]?(n.length>2&&(o.push(n),n=[]),n.push([e[1],e[2]])):"L"===e[0]?n.push([e[1],e[2]]):"Z"===e[0]&&n.length>2&&(o.push(n),n=[]));n.length>=2&&(o.push(n),n=[]),p=new br.geom.Path(c,o,r)}else"circle"===c&&(i=t.getAttribute("cx"),a=t.getAttribute("cy"),u=t.getAttribute("r"),p=new br.geom.Circle(i,a,u));return p},z=function(){function t(t){this.points=t}return t.prototype.clipToBBox=function(r){var e,n,o,i,a,s,l,u,p,h,c,f,d,y,m,v,g,_,b,x;for(c=this,e=(new br.geom.clipping.CohenSutherland).clip,h=[],a=[],i=!1,o=v=0,g=c.points.length-2;g>=0?g>=v:v>=g;o=g>=0?++v:--v){_=c.points[o],s=_[0],l=_[1],b=c.points[o+1],u=b[0],p=b[1];try{x=e(r,s,l,u,p),f=x[0],y=x[1],d=x[2],m=x[3],i=!0,h.push([f,y]),(u!==d||p!==y||o===len(c.points)-2)&&h.push([d,m])}catch(w){n=w,i&&h.length>1&&(a.push(new t(h)),h=[]),i=!1}}return h.length>1&&a.push(new t(h)),a},t.prototype.toSVG=function(){var t,r,e,n,o,i,a,s;for(r=this,t=[],a=r.points,o=0,i=a.length;i>o;o++)s=a[o],e=s[0],n=s[1],t.push(e+","+n);return"M"+t.join("L")},t}(),br.geom.Line=z,Nr=function(t,r){var e,n,o,i,a,s,l,u,p,h,c,f,d,y,m;for(s=Math.PI,n=Math.atan2,p=2*s,a=t.length,e=0,i=y=0,m=a-1;m>=0?m>=y:y>=m;i=m>=0?++y:--y){for(h=t[i][0]-r[0],f=t[i][1]-r[1],c=t[(i+1)%a][0]-r[0],d=t[(i+1)%a][1]-r[1],l=n(f,h),u=n(d,c),o=u-l;o>s;)o-=p;for(;-s>o;)o+=p;e+=o}return Math.abs(e)>=s},Ir=function(t){return kr(t)>0},kr=function(t){var r,e,n,o,i,a,s,l;for(n=0,e=t.length,r=l=0;e>=0?e>l:l>e;r=e>=0?++l:--l)o=t[r][0],a=t[r][1],i=t[(r+1)%e][0],s=t[(r+1)%e][1],n+=o*s-i*a;return n*=.5},Gr=br.proj={},W=function(){function t(t){var r,e,n;r=this,r.lon0=null!=(e=t.lon0)?e:0,r.lat0=null!=(n=t.lat0)?n:0,r.PI=Math.PI,r.HALFPI=.5*r.PI,r.QUARTERPI=.25*r.PI,r.RAD=r.PI/180,r.DEG=180/r.PI,r.lam0=r.rad(this.lon0),r.phi0=r.rad(this.lat0),r.minLat=-90,r.maxLat=90}return t.parameters=[],t.title="Projection",t.prototype.rad=function(t){return t*this.RAD},t.prototype.deg=function(t){return t*this.DEG},t.prototype.plot=function(t,r){var e,n,o,i,a,s,l,u,p,h,c;for(null==r&&(r=!0),i=[],e=!0,u=0,p=t.length;p>u;u++)h=t[u],o=h[0],n=h[1],a=this._visible(o,n),a&&(e=!1),c=this.project(o,n),s=c[0],l=c[1],!a&&r?i.push(this._truncate(s,l)):i.push([s,l]);return e?null:[i]},t.prototype.sea=function(){var t,r,e,n,o,i,a,s,l,u,p,h,c,f;for(i=this,o=i.project.bind(this),n=[],t=i.lon0,i.lon0=0,e=a=-180;180>=a;e=++a)n.push(o(e,i.maxLat));for(r=s=p=i.maxLat,h=i.minLat;h>=p?h>=s:s>=h;r=h>=p?++s:--s)n.push(o(180,r));for(e=l=180;l>=-180;e=--l)n.push(o(e,i.minLat));for(r=u=c=i.minLat,f=i.maxLat;f>=c?f>=u:u>=f;r=f>=c?++u:--u)n.push(o(-180,r));return i.lon0=t,n},t.prototype.world_bbox=function(){var t,r,e,n,o,i;for(r=this.project.bind(this),n=this.sea(),t=new br.BBox,o=0,i=n.length;i>o;o++)e=n[o],t.update(e[0],e[1]);return t},t.prototype.toString=function(){var t;return t=this,"[Proj: "+t.name+"]"},t}(),W.fromXML=function(t){var r,e,n,o,i,a,s;for(n=t.getAttribute("id"),o={},e=a=0,s=t.attributes.length-1;s>=0?s>=a:a>=s;e=s>=0?++a:--a)r=t.attributes[e],"id"!==r.name&&(o[r.name]=r.value);return i=new br.proj[n](o),i.name=n,i},br.Proj=W,v=function(t){function r(t){var e,n,o;null==t&&(t={}),e=this,e.flip=Number(null!=(n=t.flip)?n:0),1===e.flip&&(t.lon0=null!=(o=-t.lon0)?o:0),r.__super__.constructor.call(this,t)}return ae(r,t),r.parameters=["lon0","flip"],r.title="Cylindrical Projection",r.prototype._visible=function(){return!0},r.prototype.clon=function(t){return t-=this.lon0,-180>t?t+=360:t>180&&(t-=360),t},r.prototype.ll=function(t,r){return 1===this.flip?[-t,-r]:[t,r]},r}(W),b=function(t){function r(){return te=r.__super__.constructor.apply(this,arguments)}return ae(r,t),r.title="Equirectangular Projection",r.prototype.project=function(t,r){var e;return e=this.ll(t,r),t=e[0],r=e[1],t=this.clon(t),[1e3*t*Math.cos(this.phi0),1e3*-1*r]},r}(v),Gr.lonlat=b,h=function(t){function r(t){var e;r.__super__.constructor.call(this,t),this.lat1=null!=(e=t.lat1)?e:0,this.phi1=this.rad(this.lat1)}return ae(r,t),r.parameters=["lon0","lat1","flip"],r.title="Cylindrical Equal Area",r.prototype.project=function(t,r){var e,n,o,i,a;return a=this.ll(t,r),t=a[0],r=a[1],e=this.rad(this.clon(t)),n=this.rad(-1*r),o=e*Math.cos(this.phi1),i=Math.sin(n)/Math.cos(this.phi1),[1e3*o,1e3*i]},r}(v),Gr.cea=h,w=function(t){function r(t){t.lat1=45,r.__super__.constructor.call(this,t)}return ae(r,t),r.title="Gall-Peters Projection",r.parameters=["lon0","flip"],r}(h),Gr.gallpeters=w,j=function(t){function r(t){t.lat1=37.7,r.__super__.constructor.call(this,t)}return ae(r,t),r.title="Hobo-Dyer Projection",r.parameters=["lon0","flip"],r}(h),Gr.hobodyer=j,l=function(t){function r(t){t.lat1=30,r.__super__.constructor.call(this,t)}return ae(r,t),r.title="Behrmann Projection",r.parameters=["lon0","flip"],r}(h),Gr.behrmann=l,a=function(t){function r(t){t.lat1=50,r.__super__.constructor.call(this,t)}return ae(r,t),r.title="Balthasart Projection",r.parameters=["lon0","flip"],r}(h),Gr.balthasart=a,H=function(t){function r(t){r.__super__.constructor.call(this,t),this.minLat=-85,this.maxLat=85}return ae(r,t),r.title="Mercator Projection",r.prototype.project=function(t,r){var e,n,o,i,a,s,l;return i=this,l=i.ll(t,r),t=l[0],r=l[1],n=Math,e=i.rad(i.clon(t)),o=i.rad(-1*r),a=1e3*e,s=1e3*n.log((1+n.sin(o))/n.cos(o)),[a,s]},r}(v),Gr.mercator=H,$=function(t){function r(){return re=r.__super__.constructor.apply(this,arguments)}return ae(r,t),r.title="Pseudo-Cylindrical Projection",r}(v),q=function(t){function r(t){var e;r.__super__.constructor.call(this,t),e=this,e.A0=.8707,e.A1=-.131979,e.A2=-.013791,e.A3=.003971,e.A4=-.001529,e.B0=1.007226,e.B1=.015085,e.B2=-.044475,e.B3=.028874,e.B4=-.005916,e.C0=e.B0,e.C1=3*e.B1,e.C2=7*e.B2,e.C3=9*e.B3,e.C4=11*e.B4,e.EPS=1e-11,e.MAX_Y=.8707*.52*Math.PI}return ae(r,t),r.title="Natural Earth Projection",r.prototype.project=function(t,r){var e,n,o,i,a,s,l,u;return a=this,u=a.ll(t,r),t=u[0],r=u[1],e=a.rad(a.clon(t)),n=a.rad(-1*r),o=n*n,i=o*o,s=180*e*(a.A0+o*(a.A1+o*(a.A2+i*o*(a.A3+o*a.A4))))+500,l=180*n*(a.B0+o*(a.B1+i*(a.B2+a.B3*o+a.B4*i)))+270,[s,l]},r}($),Gr.naturalearth=q,nr=function(t){function r(t){var e;r.__super__.constructor.call(this,t),e=this,e.X=[1,-5.67239e-12,-715511e-10,311028e-11,.9986,-482241e-9,-24897e-9,-133094e-11,.9954,-831031e-9,-44861e-9,-9.86588e-7,.99,-.00135363,-596598e-10,367749e-11,.9822,-.00167442,-44975e-10,-572394e-11,.973,-.00214869,-903565e-10,1.88767e-8,.96,-.00305084,-900732e-10,164869e-11,.9427,-.00382792,-653428e-10,-261493e-11,.9216,-.00467747,-104566e-9,48122e-10,.8962,-.00536222,-323834e-10,-543445e-11,.8679,-.00609364,-1139e-7,332521e-11,.835,-.00698325,-640219e-10,9.34582e-7,.7986,-.00755337,-500038e-10,9.35532e-7,.7597,-.00798325,-359716e-10,-227604e-11,.7186,-.00851366,-70112e-9,-863072e-11,.6732,-.00986209,-199572e-9,191978e-10,.6213,-.010418,883948e-10,624031e-11,.5722,-.00906601,181999e-9,624033e-11,.5322,0,0,0],e.Y=[0,.0124,3.72529e-10,1.15484e-9,.062,.0124001,1.76951e-8,-5.92321e-9,.124,.0123998,-7.09668e-8,2.25753e-8,.186,.0124008,2.66917e-7,-8.44523e-8,.248,.0123971,-9.99682e-7,3.15569e-7,.31,.0124108,373349e-11,-11779e-10,.372,.0123598,-13935e-9,439588e-11,.434,.0125501,520034e-10,-100051e-10,.4968,.0123198,-980735e-10,922397e-11,.5571,.0120308,402857e-10,-52901e-10,.6176,.0120369,-390662e-10,7.36117e-7,.6769,.0117015,-280246e-10,-8.54283e-7,.7346,.0113572,-408389e-10,-5.18524e-7,.7903,.0109099,-486169e-10,-10718e-10,.8435,.0103433,-646934e-10,5.36384e-9,.8936,.00969679,-646129e-10,-854894e-11,.9394,.00840949,-192847e-9,-421023e-11,.9761,.00616525,-256001e-9,-421021e-11,1,0,0,0],e.NODES=18,e.FXC=.8487,e.FYC=1.3523,e.C1=11.459155902616464,e.RC1=.08726646259971647,e.ONEEPS=1.000001,e.EPS=1e-8}return ae(r,t),r.title="Robinson Projection",r.prototype._poly=function(t,r,e){return t[r]+e*(t[r+1]+e*(t[r+2]+e*t[r+3]))},r.prototype.project=function(t,r){var e,n,o,i,a,s,l,u;return a=this,u=a.ll(t,r),t=u[0],r=u[1],t=a.clon(t),n=a.rad(t),o=a.rad(-1*r),i=Math.abs(o),e=Math.floor(i*a.C1),e>=a.NODES&&(e=a.NODES-1),i=a.deg(i-a.RC1*e),e*=4,s=1e3*a._poly(a.X,e,i)*a.FXC*n,l=1e3*a._poly(a.Y,e,i)*a.FYC,0>o&&(l=-l),[s,l]},r}($),Gr.robinson=nr,g=function(t){function r(t){var e;r.__super__.constructor.call(this,t),e=this,e.C_x=.4222382003157712,e.C_y=1.3265004281770023,e.RC_y=.7538633073600218,e.C_p=3.5707963267948966,e.RC_p=.2800495767557787,e.EPS=1e-7,e.NITER=6}return ae(r,t),r.title="Eckert IV Projection",r.prototype.project=function(t,r){var e,n,o,i,a,s,l,u,p,h,c;for(s=this,c=s.ll(t,r),t=c[0],r=c[1],i=s.rad(s.clon(t)),a=s.rad(-1*r),l=s.C_p*Math.sin(a),e=a*a,a*=.895168+e*(.0218849+.00826809*e),o=s.NITER;o>0&&(n=Math.cos(a),u=Math.sin(a),e=(a+u*(n+2)-l)/(1+n*(n+2)-u*u),a-=e,!(Math.abs(e)a?-s.C_y:s.C_y):(p=s.C_x*i*(1+Math.cos(a)),h=s.C_y*Math.sin(a)),[p,h]},r}($),Gr.eckert4=g,ar=function(t){function r(){return ee=r.__super__.constructor.apply(this,arguments)}return ae(r,t),r.title="Sinusoidal Projection",r.prototype.project=function(t,r){var e,n,o,i,a,s;return n=this,s=n.ll(t,r),t=s[0],r=s[1],e=n.rad(n.clon(t)),o=n.rad(-1*r),i=1032*e*Math.cos(o),a=1032*o,[i,a]},r}($),Gr.sinusoidal=ar,X=function(t){function r(t,e,n,o,i){var a,s,l,u;null==e&&(e=1.5707963267948966),null==n&&(n=null),null==o&&(o=null),null==i&&(i=null),r.__super__.constructor.call(this,t),a=this,a.MAX_ITER=10,a.TOLERANCE=1e-7,null!=e?(s=e+e,u=Math.sin(e),l=Math.sqrt(2*Math.PI*u/(s+Math.sin(s))),a.cx=2*l/Math.PI,a.cy=l/u,a.cp=s+Math.sin(s)):null!=n&&null!=o&&"undefined"!=typeof cz&&null!==cz?(a.cx=n,a.cy=o,a.cp=i):Sr("kartograph.proj.Mollweide: either p or cx,cy,cp must be defined")}return ae(r,t),r.title="Mollweide Projection",r.prototype.project=function(t,r){var e,n,o,i,a,s,l,u,p,h,c;for(s=this,c=s.ll(t,r),t=c[0],r=c[1],a=Math,e=a.abs,i=s.rad(s.clon(t)),l=s.rad(r),o=s.cp*a.sin(l),n=s.MAX_ITER;0!==n&&(u=(l+a.sin(l)-o)/(1+a.cos(l)),l-=u,!(e(u)=0?s.HALFPI:-s.HALFPI:l*=.5,p=1e3*s.cx*i*a.cos(l),h=1e3*s.cy*a.sin(l),[p,-1*h]},r}($),Gr.mollweide=X,dr=function(t){function r(t){r.__super__.constructor.call(this,t,1.0471975511965976)}return ae(r,t),r.title="Wagner IV Projection",r}(X),Gr.wagner4=dr,yr=function(t){function r(t){r.__super__.constructor.call(this,t,null,.90977,1.65014,3.00896)}return ae(r,t),r.title="Wagner V Projection",r}(X),Gr.wagner5=yr,F=function(t){function r(){return ne=r.__super__.constructor.apply(this,arguments)}var e,n;return ae(r,t),n=-89,e=89,r.parameters=["lon0","lat0","flip"],r.title="Loximuthal Projection (equidistant)",r.prototype.project=function(t,r){var e,n,o,i,a,s,l;return o=this,l=o.ll(t,r),t=l[0],r=l[1],n=Math,e=o.rad(o.clon(t)),i=o.rad(r),a=i===o.phi0?e*n.cos(o.phi0):e*(i-o.phi0)/(n.log(n.tan(o.QUARTERPI+.5*i))-n.log(n.tan(o.QUARTERPI+.5*o.phi0))),a*=1e3,s=1e3*(i-o.phi0),[a,-1*s]},r}($),Gr.loximuthal=F,c=function(t){function r(){return oe=r.__super__.constructor.apply(this,arguments)}var e,n,o,i,a;return ae(r,t),r.title="Canters Modified Sinusoidal I",r.parameters=["lon0"],e=1.1966,n=-.129,o=3*n,i=-.0076,a=5*i,r.prototype.project=function(t,r){var s,l,u,p,h,c;return s=this,c=s.ll(t,r),t=c[0],r=c[1],t=s.rad(s.clon(t)),r=s.rad(r),p=r*r,h=p*p,l=1e3*t*Math.cos(r)/(e+o*p+a*h),u=1e3*r*(e+n*p+i*h),[l,-1*u]},r}($),Gr.canters1=c,C=function(t){function r(t){r.__super__.constructor.call(this,t)}var e,n,o,i,a,s,l,u,p,h,c,f,d;return ae(r,t),r.title="Hatano Projection",l=20,o=1e-7,u=1.000001,e=2.67595,n=2.43763,p=.3736990601468637,h=.4102345310814193,a=1.75859,s=1.93052,f=.5686373742600607,d=.5179951515653813,i=.85,c=1.1764705882352942,r.prototype.project=function(t,r){var u,p,h,c,f,d,y,m,v,g; +for(c=this,g=c.ll(t,r),t=g[0],r=g[1],h=c.rad(c.clon(t)),f=c.rad(r),u=Math.sin(f)*(0>f?n:e),p=v=l;v>=1&&(d=(f+Math.sin(f)-u)/(1+Math.cos(f)),f-=d,!(Math.abs(d)f?s:a),[y,-1*m]},r}($),Gr.hatano=C,P=function(t){function r(t){var e;r.__super__.constructor.call(this,t),e=this,e.lat1=41.737,e.p1=new X,e.p0=new ar}return ae(r,t),r.title="Goode Homolosine Projection",r.parameters=["lon0"],r.prototype.project=function(t,r){var e,n;return e=this,n=e.ll(t,r),t=n[0],r=n[1],t=e.clon(t),Math.abs(r)>e.lat1?e.p1.project(t,r):e.p0.project(t,r)},r}($),Gr.goodehomolosine=P,D=function(t){function r(t){r.__super__.constructor.call(this,t),this.r=100*this.HALFPI}var e;return ae(r,t),r.title="Nicolosi Globular Projection",r.parameters=["lon0"],e=1e-10,r.prototype._visible=function(t){var r;return r=this,t=r.clon(t),t>-90&&90>t},r.prototype.project=function(t,r){var n,o,i,a,s,l,u,p,h,c,f,d,y;return s=this,y=s.ll(t,r),t=y[0],r=y[1],i=s.rad(s.clon(t)),u=s.rad(r),Math.abs(i)i?-f:f)),d=Math.sqrt(l*l-(h*h/p+o*h-1)/(1+1/p)),d=s.HALFPI*(l+(0>u?d:-d))),[100*f,-100*d]},r.prototype.sea=function(){var t,r,e,n,o;for(r=[],n=this.r,t=Math,e=o=0;360>=o;e=++o)r.push([t.cos(this.rad(e))*n,t.sin(this.rad(e))*n]);return r},r.prototype.world_bbox=function(){var t;return t=this.r,new br.BBox(-t,-t,2*t,2*t)},r}($),Gr.nicolosi=D,o=function(t){function r(t,e){var n;null==e&&(e=1e3),r.__super__.constructor.call(this,t),n=this,n.r=e,n.elevation0=n.to_elevation(n.lat0),n.azimuth0=n.to_azimuth(n.lon0)}return ae(r,t),r.parameters=["lon0","lat0"],r.title="Azimuthal Projection",r.prototype.to_elevation=function(t){var r;return r=this,(t+90)/180*r.PI-r.HALFPI},r.prototype.to_azimuth=function(t){var r;return r=this,2*(t+180)/360*r.PI-r.PI},r.prototype._visible=function(t,r){var e,n,o,i,a;return a=this,i=Math,o=a.to_elevation(r),e=a.to_azimuth(t),n=i.sin(o)*i.sin(a.elevation0)+i.cos(a.elevation0)*i.cos(o)*i.cos(e-a.azimuth0),n>=0},r.prototype._truncate=function(t,r){var e,n,o,i,a;return e=Math,n=this.r,o=e.atan2(r-n,t-n),i=n+n*e.cos(o),a=n+n*e.sin(o),[i,a]},r.prototype.sea=function(){var t,r,e,n,o;for(r=[],n=this.r,t=Math,e=o=0;360>=o;e=++o)r.push([n+t.cos(this.rad(e))*n,n+t.sin(this.rad(e))*n]);return r},r.prototype.world_bbox=function(){var t;return t=this.r,new br.BBox(0,0,2*t,2*t)},r}(W),U=function(t){function r(){return Vr=r.__super__.constructor.apply(this,arguments)}return ae(r,t),r.title="Orthographic Projection",r.prototype.project=function(t,r){var e,n,o,i,a,s,l,u;return i=this,o=Math,n=i.to_elevation(r),e=i.to_azimuth(t),s=i.r*o.cos(n)*o.sin(e-i.azimuth0),u=-i.r*(o.cos(i.elevation0)*o.sin(n)-o.sin(i.elevation0)*o.cos(n)*o.cos(e-i.azimuth0)),a=i.r+s,l=i.r+u,[a,l]},r}(o),Gr.ortho=U,k=function(t){function r(t){r.__super__.constructor.call(this,t),this.scale=.5*Math.sqrt(2)}return ae(r,t),r.title="Lambert Azimuthal Equal-Area Projection",r.prototype.project=function(t,r){var e,n,o,i,a,s,l,u,p,h;return a=this.rad(r),o=this.rad(t),i=Math,s=i.sin,e=i.cos,n=i.pow(2/(1+s(this.phi0)*s(a)+e(this.phi0)*e(a)*e(o-this.lam0)),.5),n*=this.scale,u=this.r*n*e(a)*s(o-this.lam0),h=-this.r*n*(e(this.phi0)*s(a)-s(this.phi0)*e(a)*e(o-this.lam0)),l=this.r+u,p=this.r+h,[l,p]},r}(o),Gr.laea=k,ur=function(t){function r(){return Or=r.__super__.constructor.apply(this,arguments)}return ae(r,t),r.title="Stereographic Projection",r.prototype.project=function(t,r){var e,n,o,i,a,s,l,u,p,h,c;return s=this.rad(r),i=this.rad(t),a=Math,l=a.sin,e=a.cos,o=.5,n=2*o/(1+l(this.phi0)*l(s)+e(this.phi0)*e(s)*e(i-this.lam0)),p=this.r*n*e(s)*l(i-this.lam0),c=-this.r*n*(e(this.phi0)*l(s)-l(this.phi0)*e(s)*e(i-this.lam0)),u=this.r+p,h=this.r+c,[u,h]},r}(o),Gr.stereo=ur,or=function(t){function r(t){var e,n,o,i,a,s,l,u,p,h;for(r.__super__.constructor.call(this,{lon0:0,lat0:0}),this.dist=null!=(u=t.dist)?u:3,this.up=this.rad(null!=(p=t.up)?p:0),this.tilt=this.rad(null!=(h=t.tilt)?h:0),this.scale=1,i=Number.MAX_VALUE,o=-1*Number.MAX_VALUE,e=s=0;179>=s;e=++s)for(n=l=0;360>=l;n=++l)a=this.project(n-180,e-90),i=Math.min(a[0],i),o=Math.max(a[0],o);this.scale=2*this.r/(o-i),r.__super__.constructor.call(this,t)}return ae(r,t),r.parameters=["lon0","lat0","tilt","dist","up"],r.title="Satellite Projection",r.prototype.project=function(t,r,e){var n,o,i,a,s,l,u,p,h,c,f,d,y,m,v,g,_,b,x,w,M;return null==e&&(e=0),c=this.rad(r),p=this.rad(t),h=Math,y=h.sin,i=h.cos,f=this.r,d=f*(e+6371)/3671,a=y(this.phi0)*y(c)+i(this.phi0)*i(c)*i(p-this.lam0),u=(this.dist-1)/(this.dist-a),u=(this.dist-1)/(this.dist-a),u*=this.scale,_=d*u*i(c)*y(p-this.lam0),w=-d*u*(i(this.phi0)*y(c)-y(this.phi0)*i(c)*i(p-this.lam0)),l=i(this.up),v=y(this.up),s=i(this.tilt),m=y(this.tilt),o=d*(this.dist-1),n=(w*l+_*v)*y(this.tilt)/o+s,b=(_*l-w*v)*i(this.tilt)/n,M=(w*l+_*v)/n,g=f+b,x=f+M,[g,x]},r.prototype._visible=function(t,r){var e,n,o,i;return o=this.to_elevation(r),e=this.to_azimuth(t),i=Math,n=i.sin(o)*i.sin(this.elevation0)+i.cos(this.elevation0)*i.cos(o)*i.cos(e-this.azimuth0),n>=1/this.dist},r.prototype.sea=function(){var t,r,e,n,o;for(r=[],n=this.r,t=Math,e=o=0;360>=o;e=++o)r.push([n+t.cos(this.rad(e))*n,n+t.sin(this.rad(e))*n]);return r},r}(o),Gr.satellite=or,_=function(t){function r(){return Hr=r.__super__.constructor.apply(this,arguments)}return ae(r,t),r.title="Equidistant Azimuthal Projection",r.prototype.project=function(t,r){var e,n,o,i,a,s,l,u,p,h,c,f,d;return l=this,u=l.rad(r),a=l.rad(t),s=Math,p=s.sin,n=s.cos,o=p(this.phi0)*p(u)+n(this.phi0)*n(u)*n(a-this.lam0),e=s.acos(o),i=.325*e/p(e),c=this.r*i*n(u)*p(a-this.lam0),d=-this.r*i*(n(this.phi0)*p(u)-p(this.phi0)*n(u)*n(a-this.lam0)),h=this.r+c,f=this.r+d,[h,f]},r.prototype._visible=function(){return!0},r}(o),Gr.equi=_,n=function(t){function r(t){var e;e=this,t.lat0=0,r.__super__.constructor.call(this,t),e.lam0=0}var e;return ae(r,t),r.title="Aitoff Projection",r.parameters=["lon0"],e=.6366197723675814,r.prototype.project=function(t,r){var n,o,i,a,s,l,u,p;return a=this,p=a.ll(t,r),t=p[0],r=p[1],t=a.clon(t),i=a.rad(t),s=a.rad(r),n=.5*i,o=Math.acos(Math.cos(s)*Math.cos(n)),0!==o?(u=1/Math.sin(o),l=2*o*Math.cos(s)*Math.sin(n)*u,u*=o*Math.sin(s)):l=u=0,a.winkel&&(l=.5*(l+i*e),u=.5*(u+s)),[1e3*l,-1e3*u]},r.prototype._visible=function(){return!0},r}($),Gr.aitoff=n,mr=function(t){function r(t){r.__super__.constructor.call(this,t),this.winkel=!0}return ae(r,t),r.title="Winkel Tripel Projection",r}(n),Gr.winkel3=mr,y=function(t){function r(t){var e,n,o;e=this,r.__super__.constructor.call(this,t),e.lat1=null!=(n=t.lat1)?n:30,e.phi1=e.rad(e.lat1),e.lat2=null!=(o=t.lat2)?o:50,e.phi2=e.rad(e.lat2)}return ae(r,t),r.title="Conic Projection",r.parameters=["lon0","lat0","lat1","lat2"],r.prototype._visible=function(t,r){var e;return e=this,r>e.minLat&&rt?t+=360:t>180&&(t-=360),t},r}(W),I=function(t){function r(t){var e,n,o,i,a,s,l,u,p,h,c,f,d;p=this,r.__super__.constructor.call(this,t),a=Math,d=[a.sin,a.cos,a.abs,a.log,a.tan,a.pow],h=d[0],o=d[1],e=d[2],xr=d[3],f=d[4],l=d[5],p.n=s=c=h(p.phi1),i=o(p.phi1),u=e(p.phi1-p.phi2)>=1e-10,u&&(s=xr(i/o(p.phi2))/xr(f(p.QUARTERPI+.5*p.phi2)/f(p.QUARTERPI+.5*p.phi1))),p.c=n=i*l(f(p.QUARTERPI+.5*p.phi1),s)/s,p.rho0=e(e(p.phi0)-p.HALFPI)<1e-10?0:n*l(f(p.QUARTERPI+.5*p.phi0),-s),p.minLat=-60,p.maxLat=85}return ae(r,t),r.title="Lambert Conformal Conic Projection",r.prototype.project=function(t,r){var e,n,o,i,a,s,l,u,p,h,c,f,d,y,m;return h=this,l=h.rad(r),o=h.rad(h.clon(t)),a=Math,m=[a.sin,a.cos,a.abs,a.log,a.tan,a.pow],c=m[0],n=m[1],e=m[2],xr=m[3],f=m[4],u=m[5],s=h.n,p=e(e(l)-h.HALFPI)<1e-10?0:h.c*u(f(h.QUARTERPI+.5*l),-s),i=o*s,d=1e3*p*c(i),y=1e3*(h.rho0-p*n(i)),[d,-1*y]},r}(y),Gr.lcc=I,Z=function(t){function r(){return Xr=r.__super__.constructor.apply(this,arguments)}return ae(r,t),r}(y),fr=function(){function t(t,r,e,n,o,i){var a;a=this,a.bbox=t,a.width=r,a.padding=null!=n?n:0,a.halign=null!=o?o:"center",a.valign=null!=i?i:"center",a.height=e,a.scale=Math.min((r-2*n)/t.width,(e-2*n)/t.height)}return t.prototype.project=function(t,r){var e,n,o,i,a,s,l;return null==r&&(r=t[1],t=t[0]),o=this,i=o.scale,e=o.bbox,n=o.height,a=o.width,s="center"===o.halign?.5*(a-e.width*i):"left"===o.halign?o.padding*i:a-(e.width-o.padding)*i,l="center"===o.valign?.5*(n-e.height*i):"top"===o.valign?o.padding*i:0,t=(t-e.left)*i+s,r=(r-e.top)*i+l,[t,r]},t.prototype.projectPath=function(t){var r,e,n,o,i,a,s,l,u,p,h,c,f,d,y,m,v;if(o=this,"path"===t.type){for(n=[],r=[99999,99999,-99999,-99999],d=t.contours,p=0,c=d.length;c>p;p++){for(a=d[p],e=[],h=0,f=a.length;f>h;h++)y=a[h],l=y[0],u=y[1],m=o.project(l,u),l=m[0],u=m[1],e.push([l,u]),r[0]=Math.min(r[0],l),r[1]=Math.min(r[1],u),r[2]=Math.max(r[2],l),r[3]=Math.max(r[3],u);n.push(e)}return i=new br.geom.Path(t.type,n,t.closed),i._bbox=r,i}return"circle"===t.type?(v=o.project(t.x,t.y),l=v[0],u=v[1],s=t.r*o.scale,new br.geom.Circle(l,u,s)):void 0},t.prototype.asBBox=function(){var t;return t=this,new br.BBox(0,0,t.width,t.height)},t}(),fr.fromXML=function(t){var r,e,n,o,a;return a=Number(t.getAttribute("w")),n=Number(t.getAttribute("h")),o=Number(t.getAttribute("padding")),e=t.getElementsByTagName("bbox")[0],r=i.fromXML(e),new br.View(r,a,n,o)},br.View=fr,S.prototype.dotgrid=function(t){var r,e,n,o,i,a,s,l,u,p,h,c,f,d,y,m,v,g,_,b,x,w,M,P,C,j,A,B,L,S,k,I,N,G,z,E,T,R,F,V,O,H,X,q,D,U,Q,Y,W;if(v=this,m=null!=(T=t.layer)?T:v.layerIds[v.layerIds.length-1],!v.layers.hasOwnProperty(m))return Sr('dotgrid error: layer "'+m+'" not found'),void 0;if(y=v.layers[m],e=t.data,n=t.value,o=t.key,_={},null!=o&&"array"===zr(e))for(A=0,k=e.length;k>A;A++)w=e[A],d=w[o],_[String(d)]=w;else for(d in e)w=e[d],_[String(d)]=w;if(l=null!=(R=t.style)?R:{fill:"black",stroke:"none"},P=t.size,f=null!=(F=t.gridsize)?F:15,s=null!=(V=y.dotgrid)?V:y.dotgrid={gridsize:f,grid:[]},s.gridsize!==f)for(O=s.grid,B=0,I=O.length;I>B;B++)c=O[B],null!=c.shape&&(c.shape.remove(),c.shape=null);if(f>0){if(0===s.grid.length)for(C=L=0,H=v.viewport.width;f>0?H>=L:L>=H;C=L+=f)for(j=S=0,X=v.viewport.height;f>0?X>=S:S>=X;j=S+=f){c={x:C+.2*(Math.random()-.5)*f,y:j+.2*(Math.random()-.5)*f,pathid:!1},h=!1,q=y.pathsById;for(d in q){for(b=q[d],z=0,N=b.length;N>z;z++)if(g=b[z],g.vpath.isInside(c.x,c.y)){h=!0,x=null!=(D=_[d])?D:null,M=P(x),c.pathid=d,c.shape=y.paper.circle(c.x,c.y,1);break}if(h)break}s.grid.push(c)}for(U=s.grid,E=0,G=U.length;G>E;E++)c=U[E],c.pathid&&(x=null!=(Q=_[c.pathid])?Q:null,M=P(x),p=null!=(Y=t.duration)?Y:0,i=null!=(W=t.delay)?W:0,a="function"===zr(i)?i(x):i,p>0&&Raphael.svg?(r=Raphael.animation({r:.5*M},p),c.shape.animate(r.delay(a))):c.shape.attr({r:.5*M}),u="function"===zr(l)?l(x):l,c.shape.attr(u))}},gr=null!=(qr=br.filter)?qr:br.filter={},gr.__knownFilter={},gr.__patternFills=0,V.prototype.SVG=function(t,r){var e,n;if("string"==typeof t&&(t=window.document.createElementNS("http://www.w3.org/2000/svg",t)),r)for(e in r)n=r[e],t.setAttribute(e,n);return t},S.prototype.addFilter=function(t,r,e){var n,o,i;if(null==e&&(e={}),i=this,n=window.document,null==br.filter[r])throw"unknown filter type "+r;return o=new br.filter[r](e).getFilter(t),i.paper.defs.appendChild(o)},V.prototype.applyFilter=function(t){var r;return r=this,e("."+r.id,r.paper.canvas).attr({filter:"url(#"+t+")"})},V.prototype.applyTexture=function(t,r,e){var n,o,i,a,s,l;for(null==r&&(r=!1),null==e&&(e="#000"),o=this,gr.__patternFills+=1,s=o.paths,l=[],i=0,a=s.length;a>i;i++)n=s[i],!r||r(n.data)?l.push(n.svgPath.attr({fill:"url("+t+")"})):l.push(n.svgPath.attr("fill",e));return l},x=function(){function t(t){this.params=null!=t?t:{}}return t.prototype.getFilter=function(t){var r,e;return e=this,r=e.SVG("filter",{id:t}),e.buildFilter(r),r},t.prototype._getFilter=function(){throw"not implemented"},t.prototype.SVG=function(t,r){var e,n;if("string"==typeof t&&(t=window.document.createElementNS("http://www.w3.org/2000/svg",t)),r)for(e in r)n=r[e],t.setAttribute(e,n);return t},t}(),u=function(t){function r(){return Dr=r.__super__.constructor.apply(this,arguments)}return ae(r,t),r.prototype.buildFilter=function(t){var r,e,n;return n=this,r=n.SVG,e=r("feGaussianBlur",{stdDeviation:n.params.size||4,result:"blur"}),t.appendChild(e)},r}(x),gr.blur=u,_r=function(t){var r,e,n,o;if(t.trim().match(/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/))return(4===t.length||7===t.length)&&(t=t.substr(1)),3===t.length&&(t=t.split(""),t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),o=parseInt(t,16),n=o>>16,e=255&o>>8,r=255&o,[n,e,r];throw'unknown color format: "'+t+'"'},M=function(t){function r(){return Ur=r.__super__.constructor.apply(this,arguments)}return ae(r,t),r.prototype.buildFilter=function(t){var r,e,n,o,i,a,s,l,u,p,h,c,f;i=this,e=null!=(l=i.params.blur)?l:4,s=null!=(u=i.params.strength)?u:1,a=null!=(p=i.params.color)?p:"#D1BEB0","string"===zr(a)&&(a=_r(a)),n=null!=(h=i.params.inner)?h:!1,o=null!=(c=i.params.knockout)?c:!1,r=null!=(f=i.params.alpha)?f:1,n?i.innerGlow(t,e,s,a,r,o):i.outerGlow(t,e,s,a,r,o)},r.prototype.outerGlow=function(t,r,e,n,o,i){var a,s,l,u,p,h,c;return p=this,a=p.SVG,u=a("feColorMatrix",{"in":"SourceGraphic",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0",result:"mask"}),t.appendChild(u),e>0&&(c=a("feMorphology",{"in":"mask",radius:e,operator:"dilate",result:"mask"}),t.appendChild(c)),u=a("feColorMatrix",{"in":"mask",type:"matrix",values:"0 0 0 0 "+n[0]/255+" 0 0 0 0 "+n[1]/255+" 0 0 0 0 "+n[2]/255+" 0 0 0 1 0",result:"r0"}),t.appendChild(u),s=a("feGaussianBlur",{"in":"r0",stdDeviation:r,result:"r1"}),t.appendChild(s),l=a("feComposite",{operator:"out","in":"r1",in2:"mask",result:"comp"}),t.appendChild(l),h=a("feMerge"),i||h.appendChild(a("feMergeNode",{"in":"SourceGraphic"})),h.appendChild(a("feMergeNode",{"in":"r1"})),t.appendChild(h)},r.prototype.innerGlow=function(t,r,e,n,o,i){var a,s,l,u,p,h,c;return p=this,a=p.SVG,xr("innerglow"),u=a("feColorMatrix",{"in":"SourceGraphic",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 500 0",result:"mask"}),t.appendChild(u),c=a("feMorphology",{"in":"mask",radius:e,operator:"erode",result:"r1"}),t.appendChild(c),s=a("feGaussianBlur",{"in":"r1",stdDeviation:r,result:"r2"}),t.appendChild(s),u=a("feColorMatrix",{type:"matrix","in":"r2",values:"1 0 0 0 "+n[0]/255+" 0 1 0 0 "+n[1]/255+" 0 0 1 0 "+n[2]/255+" 0 0 0 -1 1",result:"r3"}),t.appendChild(u),l=a("feComposite",{operator:"in","in":"r3",in2:"mask",result:"comp"}),t.appendChild(l),h=a("feMerge"),i||h.appendChild(a("feMergeNode",{"in":"SourceGraphic"})),h.appendChild(a("feMergeNode",{"in":"comp"})),t.appendChild(h)},r}(x),gr.glow=M,S.prototype.addGeoPath=function(t,r,e){var n,o,i;return null==r&&(r=[]),null==e&&(e=""),n=this,i=n.getGeoPathStr(t,r),o=n.paper.path(i),""!==e&&o.node.setAttribute("class",e),o},S.prototype.getGeoPathStr=function(t,r){var e,n,o,i,a,s,l;null==r&&(r=[]),o=this,"string"===zr(r)&&(r=r.split("")),0===r.length&&r.push("M"),i="";for(n in t)a=t[n],e=null!=(l=r[n])?l:"L",s=o.lonlat2xy(a),isNaN(s[0])||isNaN(s[1])||(i+=e+s[0]+","+s[1]);return i},S.prototype.addGeoPolygon=function(t,r){var e,n,o;o=this,e=["M"];for(n in t)e.push("L");return e.push("Z"),o.addGeoPath(t,e,r)},ir=function(){function t(t,r,e){var n,o,i,a;null==t&&(t=[0,1]),null==r&&(r=null),null==e&&(e=null),this.rangedScale=se(this.rangedScale,this),this.scale=se(this.scale,this),o=this,a=[];for(n in t)("function"!==zr(e)||e(t[n])!==!1)&&(i=null!=r?"function"===zr(r)?r(t[n]):t[n][r]:t[n],isNaN(i)||a.push(i));a=a.sort(function(t,r){return t-r}),o.values=a,o._range=[0,1],o.rangedScale.range=function(t){return o._range=t,o.rangedScale}}return t.prototype.scale=function(t){return t},t.prototype.rangedScale=function(t){var r,e;return r=this,t=r.scale(t),e=r._range,t*(e[1]-e[0])+e[0]},t}(),E=function(t){function r(){return this.scale=se(this.scale,this),Qr=r.__super__.constructor.apply(this,arguments)}return ae(r,t),r.prototype.scale=function(t){var r,e;return r=this,e=r.values,(t-e[0])/(e[e.length-1]-e[0])},r}(ir),T=function(t){function r(){return this.scale=se(this.scale,this),Yr=r.__super__.constructor.apply(this,arguments)}return ae(r,t),r.prototype.scale=function(t){var r,e;return r=this,e=r.values,xr=Math.log,(xr(t)-xr(e[0]))/(xr(e[e.length-1])-xr(e[0]))},r}(ir),sr=function(t){function r(){return this.scale=se(this.scale,this),Wr=r.__super__.constructor.apply(this,arguments)}return ae(r,t),r.prototype.scale=function(t){var r,e;return r=this,e=r.values,Math.sqrt((t-e[0])/(e[e.length-1]-e[0]))},r}(ir),K=function(t){function r(){return this.scale=se(this.scale,this),$r=r.__super__.constructor.apply(this,arguments)}return ae(r,t),r.prototype.scale=function(t){var r,e,n,o,i,a;n=this,a=n.values,e=a.length-1;for(r in a){if(i=a[Number(r)],o=a[Number(r)+1],t===i)return r/e;if(e>r&&t>i&&o>t)return r/e+(t-i)/(o-i)}},r}(ir),br.scale={},br.scale.identity=function(){return new ir(domain,prop,gr).rangedScale},br.scale.linear=function(t,r,e){return new E(t,r,e).rangedScale},br.scale.log=function(t,r,e){return new T(t,r,e).rangedScale},br.scale.sqrt=function(t,r,e){return new sr(t,r,e).rangedScale},br.scale.quantile=function(t,r,e){return new K(t,r,e).rangedScale},hr=function(){function t(t){r=this,r.location=t.location,r.data=t.data,r.map=t.map,r.layers=t.layers,r.key=t.key,r.x=t.x,r.y=t.y}var r;return r=null,t.prototype.init=function(){return r},t.prototype.overlaps=function(){return!1},t.prototype.update=function(){return r},t.prototype.nodes=function(){return[]},t.prototype.clear=function(){return r},t}(),br.Symbol=hr,cr=function(){function r(t){this._initTooltips=se(this._initTooltips,this),this._noverlap=se(this._noverlap,this),this._kMeans=se(this._kMeans,this);var e,o,i,a,s,l,u,p,h,c,f,d,y,m,v,g,_,b,x,w;for(n=this,c=["data","location","type","map"],p=["filter","tooltip","click","delay","sortBy","clustering","aggregate","clusteringOpts","mouseenter","mouseleave"],f=0,v=c.length;v>f;f++){if(h=c[f],null==t[h])throw"SymbolGroup: missing argument '"+h+"'";n[h]=t[h]}for(d=0,g=p.length;g>d;d++)h=p[d],null!=t[h]&&(n[h]=t[h]);if(e=n.type,null==e)return Sr("could not resolve symbol type",n.type),void 0;for(x=e.props,y=0,_=x.length;_>y;y++)h=x[y],null!=t[h]&&(n[h]=t[h]);for(n.layers={mapcanvas:n.map.paper},w=e.layers,m=0,b=w.length;b>m;m++)s=w[m],u=r._layerid++,a="sl_"+u,"svg"===s.type?l=n.map.createSVGLayer(a):"html"===s.type&&(l=n.map.createHTMLLayer(a)),n.layers[s.id]=l;n.symbols=[];for(i in n.data)o=n.data[i],"function"===zr(n.filter)?n.filter(o,i)&&n.add(o,i):n.add(o,i);n.layout(),n.render(),n.map.addSymbolGroup(n)}var n;return n=null,r.prototype.add=function(t,r){var e,o,i,a,s,l,u,p;for(n=this,e=n.type,o=n._evaluate(n.location,t,r),"array"===zr(o)&&(o=new br.LonLat(o[0],o[1])),a={layers:n.layers,location:o,data:t,key:null!=r?r:n.symbols.length,map:n.map},p=e.props,l=0,u=p.length;u>l;l++)i=p[l],null!=n[i]&&(a[i]=n._evaluate(n[i],t,r));return s=new e(a),n.symbols.push(s),s},r.prototype.layout=function(){var t,r,e,o,i,a,s,l,u,p;for(u=n.symbols,s=0,l=u.length;l>s;s++){if(i=u[s],r=i.location,"string"===zr(r)){if(p=r.split("."),t=p[0],o=p[1],e=n.map.getLayerPath(t,o),null==e){Sr("could not find layer path "+t+"."+o);continue}a=n.map.viewBC.project(e.path.centroid())}else a=n.map.lonlat2xy(r);i.x=a[0],i.y=a[1]}return"k-means"===n.clustering?n._kMeans():"noverlap"===n.clustering&&n._noverlap(),n},r.prototype.render=function(){var t,r,o,i,a,s,l,u,p,h,c;for(n=this,n.sortBy&&(i="asc","string"===zr(n.sortBy)&&(n.sortBy=n.sortBy.split(" ",2),o=n.sortBy[0],i=null!=(p=n.sortBy[1])?p:"asc"),n.symbols=n.symbols.sort(function(t,r){var e,a,s;return"function"===zr(n.sortBy)?(a=n.sortBy(t.data,t),s=n.sortBy(r.data,r)):(a=t[o],s=r[o]),a===s?0:(e="asc"===i?1:-1,a>s?1*e:-1*e)})),h=n.symbols,a=0,l=h.length;l>a;a++)for(r=h[a],r.render(),c=r.nodes(),s=0,u=c.length;u>s;s++)t=c[s],t.symbol=r;return"function"===zr(n.tooltip)&&n._initTooltips(),e.each(["click","mouseenter","mouseleave"],function(o,i){var a,s,l,u;if("function"===zr(n[i])){for(l=n.symbols,u=[],a=0,s=l.length;s>a;a++)r=l[a],u.push(function(){var o,a,s,l;for(s=r.nodes(),l=[],o=0,a=s.length;a>o;o++)t=s[o],l.push(e(t)[i](function(t){var r;for(r=t.target;!r.symbol;)r=e(r).parent().get(0);return t.stopPropagation(),n[i](r.symbol.data,r.symbol,t)}));return l}.call(this));return u}}),n},r.prototype.tooltips=function(t){return n=this,n.tooltips=t,n._initTooltips(),n},r.prototype.remove=function(t){var r,e,o,i,a,s,l,u,p,h;for(n=this,o=[],u=n.symbols,s=0,l=u.length;l>s;s++)if(a=u[s],null==t||t(a.data))try{a.clear()}catch(c){r=c,Sr("error: symbolgroup.remove")}else o.push(a);if(null==t){p=n.layers,h=[];for(e in p)i=p[e],"mapcanvas"!==e?h.push(i.remove()):h.push(void 0);return h}return n.symbols=o},r.prototype._evaluate=function(t,r,e){var n;return n="function"===zr(t)?t(r,e):t},r.prototype._kMeans=function(){var r,e,o,i,a,s,l,u,p,h,c,f,d,y,m,v,g,_,b,x,w,M,P;for(n=this,null==(x=n.osymbols)&&(n.osymbols=n.symbols),r=n.type,null!=n.clusteringOpts&&(h=n.clusteringOpts.size),null==h&&(h=64),e=t().iterations(16).size(h),w=n.osymbols,f=0,v=w.length;v>f;f++)p=w[f],e.add({x:p.x,y:p.y});for(s=e.means(),l=[],d=0,g=s.length;g>d;d++)if(a=s[d],0!==a.size){for(o=[],M=a.indices,y=0,_=M.length;_>y;y++)i=M[y],o.push(n.osymbols[i].data);for(o=n.aggregate(o),c={layers:n.layers,location:!1,data:o,map:n.map},P=r.props,m=0,b=P.length;b>m;m++)u=P[m],null!=n[u]&&(c[u]=n._evaluate(n[u],o));p=new r(c),p.x=a.x,p.y=a.y,l.push(p)}return n.symbols=l},r.prototype._noverlap=function(){var t,r,e,o,i,a,s,l,u,p,h,c,f,d,y,m,v,g,_,b,x,w,M,P,C,j,A,B,L,S,k,I,N,G,z,E,T,R,F,V,O,H,X,q,D,U,Q;if(n=this,null==(H=n.osymbols)&&(n.osymbols=n.symbols),u=3,t=n.type,le.call(t.props,"radius")<0)return Sr('noverlap layout only available for symbols with property "radius"'),void 0;for(j=n.osymbols.slice(),null!=n.clusteringOpts&&(L=n.clusteringOpts.tolerance,f=n.clusteringOpts.maxRatio),null==L&&(L=.05),null==f&&(f=.8),s=N=0,X=u-1;X>=0?X>=N:N>=X;s=X>=0?++N:--N){for(j.sort(function(t,r){return r.radius-t.radius}),p=j.length,d=[],y=G=0,q=p-3;q>=0?q>=G:G>=q;y=q>=0?++G:--G)if(M=j[y]){for(b=M.radius*(1-L),h=M.x-b,g=M.x+b,A=M.y-b,r=M.y+b,l=[],m=z=D=y+1,U=p-2;U>=D?U>=z:z>=U;m=U>=D?++z:--z)P=j[m],P&&(x=P.radius,c=P.x-x,_=P.x+x,B=P.y-x,e=P.y+x,x/M.radiusg||h>_||B>r||A>e||(i=P.x-M.x,a=P.y-M.y,(b+x)*(b+x)>i*i+a*a&&l.push(m))));if(l.length>0){for(o=[M.data],v=M.radius*M.radius,E=0,T=l.length;T>E;E++)s=l[E],o.push(j[s].data),v+=j[s].radius*j[s].radius;for(o=n.aggregate(o),C={layers:n.layers,location:!1,data:o,map:n.map},Q=t.props,V=0,R=Q.length;R>V;V++)y=Q[V],null!=n[y]&&(C[y]=n._evaluate(n[y],o));for(w=new t(C),S=M.radius*M.radius/v,k=M.x*S,I=M.y*S,O=0,F=l.length;F>O;O++)s=l[O],P=j[s],S=P.radius*P.radius/v,k+=P.x*S,I+=P.y*S,j[s]=void 0;w.x=k,w.y=I,j[y]=void 0,d.push(w)}else d.push(M)}j=d}return n.symbols=j},r.prototype._initTooltips=function(){var t,r,o,i,a,s,l,u,p,h,c;for(n=this,i=n.tooltip,h=n.symbols,s=0,u=h.length;u>s;s++)for(o=h[s],t={position:{target:"mouse",viewport:e(window),adjust:{x:7,y:7}},show:{delay:20},content:{},events:{show:function(t,r){return e(".qtip").filter(function(){return this!==r.elements.tooltip.get(0)}).hide()}}},a=i(o.data,o.key),"string"===zr(a)?t.content.text=a:"array"===zr(a)&&(t.content.title=a[0],t.content.text=a[1]),c=o.nodes(),l=0,p=c.length;p>l;l++)r=c[l],e(r).qtip(t)},r.prototype.onResize=function(){var t,r,e,o;for(n=this,n.layout(),o=n.symbols,r=0,e=o.length;e>r;r++)t=o[r],t.update()},r.prototype.update=function(t,r,e){var o,i,a,s,l,u,p,h;for(n=this,null==t&&(t={}),p=n.symbols,a=0,l=p.length;l>a;a++){for(i=p[a],h=n.type.props,s=0,u=h.length;u>s;s++)o=h[s],null!=t[o]?i[o]=n._evaluate(t[o],i.data):null!=n[o]&&(i[o]=n._evaluate(n[o],i.data));i.update(r,e)}return n},r}(),cr._layerid=0,br.SymbolGroup=cr,S.prototype.addSymbols=function(t){return t.map=this,new cr(t)},br.dorlingLayout=function(t,r){var n,o,i,a,s,l,u,p,h,c,f,d,y,m,v;for(null==r&&(r=40),f=[],e.each(t.symbols,function(t,r){return f.push({i:t,x:r.path.attrs.cx,y:r.path.attrs.cy,r:r.path.attrs.r})}),f.sort(function(t,r){return r.r-t.r}),i=function(){var r,e,n;for(e=0,n=f.length;n>e;e++)r=f[e],t.symbols[r.i].path.attr({cx:r.x,cy:r.y})},d=v=1;r>=1?r>=v:v>=r;d=r>=1?++v:--v)for(h in f)for(c in f)if(c>h){if(n=f[h],o=f[c],n.x+n.ro.x+o.r)continue;if(n.y+n.ro.y+o.r)continue;l=n.x-o.x,u=n.y-o.y,s=l*l+u*u,y=n.r+o.r,m=y*y,m>s&&(a=Math.sqrt(s),p=10/a,n.x+=l*p*(1-n.r/y),n.y+=u*p*(1-n.r/y),o.x-=l*p*(1-o.r/y),o.y-=u*p*(1-o.r/y))}return i()},p=function(t){function r(t){this.nodes=se(this.nodes,this),this.clear=se(this.clear,this),this.update=se(this.update,this),this.render=se(this.render,this),this.overlaps=se(this.overlaps,this);var e,n,o;e=this,r.__super__.constructor.call(this,t),e.radius=null!=(n=t.radius)?n:4,e.style=t.style,e.attrs=t.attrs,e.title=t.title,e["class"]=null!=(o=t["class"])?o:"bubble"}return ae(r,t),r.prototype.overlaps=function(t){var r,e,n,o,i,a,s,l,u,p,h;return n=this,p=[n.x,n.y,n.radius],a=p[0],l=p[1],o=p[2],h=[t.x,t.y,t.radius],s=h[0],u=h[1],i=h[2],a-o>s+i||s-i>a+o||l-o>u+i||u-i>l+o?!1:(r=a-s,e=l-u,r*r+e*e>(o+i)*(o+i)?!1:!0)},r.prototype.render=function(){var t;return t=this,null==t.path&&(t.path=t.layers.mapcanvas.circle(t.x,t.y,t.radius)),t.update(),t.map.applyCSS(t.path),t},r.prototype.update=function(t,r){var n,o,i;return null==t&&(t=!1),null==r&&(r="expo-out"),o=this,i=o.path,n={cx:o.x,cy:o.y,r:o.radius},null!=o.attrs&&(n=e.extend(n,o.attrs)),t?i.animate(n,t,r):i.attr(n),null!=i.node&&(null!=o.style&&i.node.setAttribute("style",o.style),null!=o["class"]&&i.node.setAttribute("class",o["class"])),null!=o.title&&i.attr("title",o.title),o},r.prototype.clear=function(){var t;return t=this,t.path.remove(),t},r.prototype.nodes=function(){var t;return t=this,[t.path.node]},r}(hr),p.props=["radius","style","class","title","attrs"],p.layers=[],br.Bubble=p,B=function(t){function r(t){var e,n,o,i,a,s;e=this,r.__super__.constructor.call(this,t),e.icon=null!=(n=t.icon)?n:"",e.offset=null!=(o=t.offset)?o:[0,0],e.iconsize=null!=(i=t.iconsize)?i:[10,10],e["class"]=null!=(a=t["class"])?a:"",e.title=null!=(s=t.title)?s:""}return ae(r,t),r.prototype.render=function(){var t,r;return r=this,t=r.map.container,r.img=e(""),r.img.attr({src:r.icon,title:r.title,alt:r.title,width:r.iconsize[0],height:r.iconsize[1]}),r.img.addClass(r["class"]),r.img.css({position:"absolute","z-index":1e3,cursor:"pointer"}),r.img[0].symbol=r,t.append(r.img),r.update()},r.prototype.update=function(){var t;return t=this,t.img.css({left:t.x+t.offset[0]+"px",top:t.y+t.offset[1]+"px"})},r.prototype.clear=function(){var t;return t=this,t.img.remove(),t},r.prototype.nodes=function(){var t;return t=this,[t.img]},r}(br.Symbol),B.props=["icon","offset","class","title","iconsize"],B.layers=[],br.Icon=B,pr=function(t){function r(t){var e,n,o,i,a;e=this,r.__super__.constructor.call(this,t),e.text=null!=(n=t.text)?n:"",e.style=null!=(o=t.style)?o:"",e["class"]=null!=(i=t["class"])?i:"",e.offset=null!=(a=t.offset)?a:[0,0]}return ae(r,t),r.prototype.render=function(){var t,r;return r=this,r.lbl=t=r.layers.mapcanvas.text(r.x,r.y,r.text),r.update(),r},r.prototype.update=function(){var t;return t=this,t.lbl.attr({x:t.x+t.offset[0],y:t.y+t.offset[1]}),t.lbl.node.setAttribute("style",t.style),t.lbl.node.setAttribute("class",t["class"])},r.prototype.clear=function(){var t;return t=this,t.lbl.remove(),t},r.prototype.nodes=function(){var t;return t=this,[t.lbl.node]},r}(br.Symbol),pr.props=["text","style","class","offset"],pr.layers=[],br.Label=pr,A=function(t){function r(t){var e,n,o,i;e=this,r.__super__.constructor.call(this,t),e.text=null!=(n=t.text)?n:"",e.css=null!=(o=t.css)?o:"",e["class"]=null!=(i=t["class"])?i:""}return ae(r,t),r.prototype.render=function(){var t,r,n;return n=this,t=e("
"+n.text+"
"),t.css({width:"80px",position:"absolute",left:"-40px","text-align":"center"}),n.lbl=r=e('
'),r.append(t),n.layers.lbl.append(r),t.css({height:t.height()+"px",top:t.height()*-.4+"px"}),n.update(),n},r.prototype.update=function(){var t;return t=this,t.lbl.css({position:"absolute",left:t.x+"px",top:t.y+"px"}),t.lbl.css(t.css)},r.prototype.clear=function(){var t;return t=this,t.lbl.remove(),t},r.prototype.nodes=function(){var t;return t=this,[t.lbl[0]]},r}(br.Symbol),A.props=["text","css","class"],A.layers=[{id:"lbl",type:"html"}],br.HtmlLabel=A,N=function(t){function r(t){this.nodes=se(this.nodes,this),this.clear=se(this.clear,this),this.update=se(this.update,this),this.render=se(this.render,this);var e,n,o;e=this,r.__super__.constructor.call(this,t),e.labelattrs=null!=(n=t.labelattrs)?n:{},e.buffer=t.buffer,e.center=null!=(o=t.center)?o:!0}return ae(r,t),r.prototype.render=function(t){var e;return e=this,null!=e.title&&""!==String(e.title).trim()&&(e.buffer&&(e.bufferlabel=e.layers.mapcanvas.text(e.x,e.y,e.title)),e.label=e.layers.mapcanvas.text(e.x,e.y,e.title)),r.__super__.render.call(this,t),e},r.prototype.update=function(t,n){var o,i,a,s,l;return null==t&&(t=!1),null==n&&(n="expo-out"),i=this,r.__super__.update.call(this,t,n),null!=i.label&&(a=i.map.viewport,o=e.extend({},i.labelattrs),s=i.x,l=i.y,i.center?l-=0:s>.5*a.width?(o["text-anchor"]="end",s-=i.radius+5):s<.5*a.width&&(o["text-anchor"]="start",s+=i.radius+5),o.x=s,o.y=l,i.buffer&&(i.bufferlabel.attr(o),i.bufferlabel.attr({stroke:"#fff",fill:"#fff","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":6})),i.label.attr(o),i.label.toFront()),i},r.prototype.clear=function(){var t;return t=this,r.__super__.clear.apply(this,arguments)},r.prototype.nodes=function(){var t,e;return t=this,e=r.__super__.nodes.apply(this,arguments),t.label&&e.push(t.label.node),t.bufferlabel&&e.push(t.bufferlabel.node),e},r}(p),N.props=["radius","style","class","title","labelattrs","buffer","center","attrs"],N.layers=[],br.LabeledBubble=N,Y=function(t){function r(t){var n,o,i,a,s,l,u,p,h,c;e=this,r.__super__.constructor.call(this,t),e.radius=null!=(o=t.radius)?o:4,e.styles=null!=(i=t.styles)?i:"",e.colors=null!=(a=t.colors)?a:["#3cc","#c3c","#33c","#cc3"],e.titles=null!=(s=t.titles)?s:["","","","",""],e.values=null!=(l=t.values)?l:[],e.border=null!=(u=t.border)?u:!1,e.borderWidth=null!=(p=t.borderWidth)?p:2,e["class"]=null!=(h=t["class"])?h:"piechart",null==(c=(n=Raphael.fn).pieChart)&&(n.pieChart=vr)}var e;return ae(r,t),e=null,r.prototype.overlaps=function(t){var r,n,o,i,a,s,l,u,p,h;return p=[e.x,e.y,e.radius],a=p[0],l=p[1],o=p[2],h=[t.x,t.y,t.radius],s=h[0],u=h[1],i=h[2],a-o>s+i||s-i>a+o||l-o>u+i||u-i>l+o?!1:(r=a-s,n=l-u,r*r+n*n>(o+i)*(o+i)?!1:!0)},r.prototype.render=function(){var t;return e=this,null!=e.border&&(t=e.layers.mapcanvas.circle(e.x,e.y,e.radius+e.borderWidth).attr({stroke:"none",fill:e.border})),e.chart=e.layers.mapcanvas.pieChart(e.x,e.y,e.radius,e.values,e.titles,e.colors,"none"),e.chart.push(t),e},r.prototype.update=function(){},r.prototype.clear=function(){var t,r,n,o;for(e=this,o=e.chart,r=0,n=o.length;n>r;r++)t=o[r],t.remove();return e},r.prototype.nodes=function(){var t,r,n,o,i;for(o=e.chart,i=[],r=0,n=o.length;n>r;r++)t=o[r],i.push(t.node);return i},r}(hr),Y.props=["radius","values","styles","class","titles","colors","border","borderWidth"],Y.layers=[],br.PieChart=Y,vr=function(t,r,e,n,o,i,a){var s,l,u,p,h,c,f,d,y,m,v;if(isNaN(t)||isNaN(r)||isNaN(e))return[];for(p=this,c=Math.PI/180,l=p.set(),f=function(t,r,e,n,o,i){var a,s,l,u;return a=t+e*Math.cos(-n*c),s=t+e*Math.cos(-o*c),l=r+e*Math.sin(-n*c),u=r+e*Math.sin(-o*c),p.path(["M",t,r,"L",a,l,"A",e,e,0,+(o-n>180),0,s,u,"z"]).attr(i)},s=-270,d=0,h=function(o){var u,p,h,c,y,m,v;v=n[o],u=360*v/d,m=s+.5*u,p=i[o],c=500,h=30,y=f(t,r,e,s,s+u,{fill:p,stroke:a,"stroke-width":1}),y.mouseover(function(){y.stop().animate({transform:"s1.1 1.1 "+t+" "+r},c,"elastic") +}),y.mouseout(function(){y.stop().animate({transform:""},c,"elastic")}),s+=u,l.push(y)},m=0,v=n.length;v>m;m++)y=n[m],d+=y;for(u in n)h(u);return l},drawStackedBars=function(t,r,e,n,o,i,a,s){function l(t,r,e,n,o){return u.rect(t,r,e,n).attr(o)}for(var u=this,p=this.set(),h=0,c=0,f=function(i){var u=o[i],f=n*u/c,d=t-.5*e,y=r+.5*n-h,m=e,v=a[i],g=500,_=l(d,y-f,m,f,{fill:v,stroke:s,"stroke-width":1});h+=f,_.mouseover(function(){_.stop().animate({transform:"s1.1 1.1 "+t+" "+r},g,"elastic")}).mouseout(function(){_.stop().animate({transform:""},g,"elastic")}),p.push(_)},d=0,y=o.length;y>d;d++)c+=o[d];for(d=0;y>d;d++)f(d);return p},lr=function(t){function r(t){var e,n,o,i,a,s,l,u,p,h;e=this,r.__super__.constructor.call(this,t),e.styles=null!=(o=t.styles)?o:"",e.colors=null!=(i=t.colors)?i:[],e.titles=null!=(a=t.titles)?a:["","","","",""],e.values=null!=(s=t.values)?s:[],e.width=null!=(l=t.width)?l:17,e.height=null!=(u=t.height)?u:30,e["class"]=null!=(p=t["class"])?p:"barchart",null==(h=(n=Raphael.fn).drawStackedBarChart)&&(n.drawStackedBarChart=drawStackedBars)}return ae(r,t),r.prototype.overlaps=function(t){var r,e,n,o,i,a,s,l,u,p,h;return n=this,p=[n.x,n.y,n.radius],a=p[0],l=p[1],o=p[2],h=[t.x,t.y,t.radius],s=h[0],u=h[1],i=h[2],a-o>s+i||s-i>a+o||l-o>u+i||u-i>l+o?!1:(r=a-s,e=l-u,r*r+e*e>(o+i)*(o+i)?!1:!0)},r.prototype.render=function(){var t,r,e,n,o,i;return e=this,n=e.width,r=e.height,o=e.x,i=e.y,t=e.layers.mapcanvas.rect(o-.5*n-2,i-.5*r-2,n+4,r+4).attr({stroke:"none",fill:"#fff"}),e.chart=e.layers.mapcanvas.drawStackedBarChart(e.x,e.y,e.width,e.height,e.values,e.titles,e.colors,"none"),e.chart.push(t),e},r.prototype.update=function(){var t;t=this},r.prototype.clear=function(){var t,r,e,n,o;for(t=this,o=t.chart,e=0,n=o.length;n>e;e++)r=o[e],r.remove();return t.chart=[],t},r.prototype.nodes=function(){var t,r,e,n,o,i;for(r=this,o=r.chart,i=[],e=0,n=o.length;n>e;e++)t=o[e],i.push(t.node);return i},r}(br.Symbol),lr.props=["values","styles","class","titles","colors","width","height"],lr.layers=[],br.StackedBarChart=lr}.call(this); \ No newline at end of file diff --git a/javascripts/vendor/raphael.min.js b/javascripts/vendor/raphael.min.js new file mode 100644 index 0000000..4b9ab15 --- /dev/null +++ b/javascripts/vendor/raphael.min.js @@ -0,0 +1,11 @@ +// ┌───────────────────────────────────────────────────────────────────────────────────────────────────────┐ \\ +// │ Raphaël 2.2.7 - JavaScript Vector Library │ \\ +// ├───────────────────────────────────────────────────────────────────────────────────────────────────────┤ \\ +// │ Copyright © 2008-2016 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ +// │ Copyright © 2008-2016 Sencha Labs (http://sencha.com) │ \\ +// ├───────────────────────────────────────────────────────────────────────────────────────────────────────┤ \\ +// │ Licensed under the MIT (https://github.com/DmitryBaranovskiy/raphael/blob/master/license.txt) license.│ \\ +// └───────────────────────────────────────────────────────────────────────────────────────────────────────┘ \\ +!function t(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.Raphael=r():e.Raphael=r()}(this,function(){return function(t){function e(i){if(r[i])return r[i].exports;var n=r[i]={exports:{},id:i,loaded:!1};return t[i].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){var i,n;i=[r(1),r(3),r(4)],n=function(t){return t}.apply(e,i),!(void 0!==n&&(t.exports=n))},function(t,e,r){var i,n;i=[r(2)],n=function(t){function e(r){if(e.is(r,"function"))return w?r():t.on("raphael.DOMload",r);if(e.is(r,Q))return e._engine.create[z](e,r.splice(0,3+e.is(r[0],$))).add(r);var i=Array.prototype.slice.call(arguments,0);if(e.is(i[i.length-1],"function")){var n=i.pop();return w?n.call(e._engine.create[z](e,i)):t.on("raphael.DOMload",function(){n.call(e._engine.create[z](e,i))})}return e._engine.create[z](e,arguments)}function r(t){if("function"==typeof t||Object(t)!==t)return t;var e=new t.constructor;for(var i in t)t[A](i)&&(e[i]=r(t[i]));return e}function i(t,e){for(var r=0,i=t.length;r=1e3&&delete o[l.shift()],l.push(s),o[s]=t[z](e,a),r?r(o[s]):o[s])}return n}function a(){return this.hex}function s(t,e){for(var r=[],i=0,n=t.length;n-2*!e>i;i+=2){var a=[{x:+t[i-2],y:+t[i-1]},{x:+t[i],y:+t[i+1]},{x:+t[i+2],y:+t[i+3]},{x:+t[i+4],y:+t[i+5]}];e?i?n-4==i?a[3]={x:+t[0],y:+t[1]}:n-2==i&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[n-2],y:+t[n-1]}:n-4==i?a[3]=a[2]:i||(a[0]={x:+t[i],y:+t[i+1]}),r.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return r}function o(t,e,r,i,n){var a=-3*e+9*r-9*i+3*n,s=t*a+6*e-12*r+6*i;return t*s-3*e+3*r}function l(t,e,r,i,n,a,s,l,h){null==h&&(h=1),h=h>1?1:h<0?0:h;for(var u=h/2,c=12,f=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],p=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,g=0;gd;)c/=2,f+=(pW(n,s)||W(e,i)W(a,o))){var l=(t*i-e*r)*(n-s)-(t-r)*(n*o-a*s),h=(t*i-e*r)*(a-o)-(e-i)*(n*o-a*s),u=(t-r)*(a-o)-(e-i)*(n-s);if(u){var c=l/u,f=h/u,p=+c.toFixed(2),d=+f.toFixed(2);if(!(p<+G(t,r).toFixed(2)||p>+W(t,r).toFixed(2)||p<+G(n,s).toFixed(2)||p>+W(n,s).toFixed(2)||d<+G(e,i).toFixed(2)||d>+W(e,i).toFixed(2)||d<+G(a,o).toFixed(2)||d>+W(a,o).toFixed(2)))return{x:c,y:f}}}}function c(t,e){return p(t,e)}function f(t,e){return p(t,e,1)}function p(t,r,i){var n=e.bezierBBox(t),a=e.bezierBBox(r);if(!e.isBBoxIntersect(n,a))return i?0:[];for(var s=l.apply(0,t),o=l.apply(0,r),h=W(~~(s/5),1),c=W(~~(o/5),1),f=[],p=[],d={},g=i?0:[],v=0;v=0&&S<=1.001&&A>=0&&A<=1.001&&(i?g++:g.push({x:C.x,y:C.y,t1:G(S,1),t2:G(A,1)}))}}return g}function d(t,r,i){t=e._path2curve(t),r=e._path2curve(r);for(var n,a,s,o,l,h,u,c,f,d,g=i?0:[],v=0,x=t.length;vi)return i;for(;ra?r=n:i=n,n=(i-r)/2+r}return n}var h=3*e,u=3*(i-e)-h,c=1-h-u,f=3*r,p=3*(n-r)-f,d=1-f-p;return o(t,1/(200*a))}function m(t,e){var r=[],i={};if(this.ms=e,this.times=1,t){for(var n in t)t[A](n)&&(i[ht(n)]=t[n],r.push(ht(n)));r.sort(Bt)}this.anim=i,this.top=r[r.length-1],this.percents=r}function b(r,i,n,a,s,o){n=ht(n);var l,h,u,c=[],f,p,d,v=r.ms,x={},m={},b={};if(a)for(w=0,B=Ee.length;wa*r.top){n=r.percents[w],p=r.percents[w-1]||0,v=v/r.top*(n-p),f=r.percents[w+1],l=r.anim[n];break}a&&i.attr(r.anim[r.percents[w]])}if(l){if(h)h.initstatus=a,h.start=new Date-h.ms*a;else{for(var C in l)if(l[A](C)&&(pt[A](C)||i.paper.customAttributes[A](C)))switch(x[C]=i.attr(C),null==x[C]&&(x[C]=ft[C]),m[C]=l[C],pt[C]){case $:b[C]=(m[C]-x[C])/v;break;case"colour":x[C]=e.getRGB(x[C]);var S=e.getRGB(m[C]);b[C]={r:(S.r-x[C].r)/v,g:(S.g-x[C].g)/v,b:(S.b-x[C].b)/v};break;case"path":var T=Qt(x[C],m[C]),E=T[1];for(x[C]=T[0],b[C]=[],w=0,B=x[C].length;w',Lt=Nt.firstChild,Lt.style.behavior="url(#default#VML)",!Lt||"object"!=typeof Lt.adj)return e.type=R;Nt=null}e.svg=!(e.vml="VML"==e.type),e._Paper=M,e.fn=N=M.prototype=e.prototype,e._id=0,e.is=function(t,e){return e=O.call(e),"finite"==e?!at[A](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||tt.call(t).slice(8,-1).toLowerCase()==e},e.angle=function(t,r,i,n,a,s){if(null==a){var o=t-i,l=r-n;return o||l?(180+180*Y.atan2(-l,-o)/U+360)%360:0}return e.angle(t,r,a,s)-e.angle(i,n,a,s)},e.rad=function(t){return t%360*U/180},e.deg=function(t){return Math.round(180*t/U%360*1e3)/1e3},e.snapTo=function(t,r,i){if(i=e.is(i,"finite")?i:10,e.is(t,Q)){for(var n=t.length;n--;)if(H(t[n]-r)<=i)return t[n]}else{t=+t;var a=r%t;if(at-i)return r-a+t}return r};var zt=e.createUUID=function(t,e){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(t,e).toUpperCase()}}(/[xy]/g,function(t){var e=16*Y.random()|0,r="x"==t?e:3&e|8;return r.toString(16)});e.setWindow=function(r){t("raphael.setWindow",e,T.win,r),T.win=r,T.doc=T.win.document,e._engine.initWin&&e._engine.initWin(T.win)};var Pt=function(t){if(e.vml){var r=/^\s+|\s+$/g,i;try{var a=new ActiveXObject("htmlfile");a.write(""),a.close(),i=a.body}catch(s){i=createPopup().document.body}var o=i.createTextRange();Pt=n(function(t){try{i.style.color=I(t).replace(r,R);var e=o.queryCommandValue("ForeColor");return e=(255&e)<<16|65280&e|(16711680&e)>>>16,"#"+("000000"+e.toString(16)).slice(-6)}catch(n){return"none"}})}else{var l=T.doc.createElement("i");l.title="Raphaël Colour Picker",l.style.display="none",T.doc.body.appendChild(l),Pt=n(function(t){return l.style.color=t,T.doc.defaultView.getComputedStyle(l,R).getPropertyValue("color")})}return Pt(t)},Ft=function(){return"hsb("+[this.h,this.s,this.b]+")"},Rt=function(){return"hsl("+[this.h,this.s,this.l]+")"},jt=function(){return this.hex},It=function(t,r,i){if(null==r&&e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(i=t.b,r=t.g,t=t.r),null==r&&e.is(t,Z)){var n=e.getRGB(t);t=n.r,r=n.g,i=n.b}return(t>1||r>1||i>1)&&(t/=255,r/=255,i/=255),[t,r,i]},qt=function(t,r,i,n){t*=255,r*=255,i*=255;var a={r:t,g:r,b:i,hex:e.rgb(t,r,i),toString:jt};return e.is(n,"finite")&&(a.opacity=n),a};e.color=function(t){var r;return e.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(r=e.hsb2rgb(t),t.r=r.r,t.g=r.g,t.b=r.b,t.hex=r.hex):e.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(r=e.hsl2rgb(t),t.r=r.r,t.g=r.g,t.b=r.b,t.hex=r.hex):(e.is(t,"string")&&(t=e.getRGB(t)),e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(r=e.rgb2hsl(t),t.h=r.h,t.s=r.s,t.l=r.l,r=e.rgb2hsb(t),t.v=r.b):(t={hex:"none"},t.r=t.g=t.b=t.h=t.s=t.v=t.l=-1)),t.toString=jt,t},e.hsb2rgb=function(t,e,r,i){this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(r=t.b,e=t.s,i=t.o,t=t.h),t*=360;var n,a,s,o,l;return t=t%360/60,l=r*e,o=l*(1-H(t%2-1)),n=a=s=r-l,t=~~t,n+=[l,o,0,0,o,l][t],a+=[o,l,l,o,0,0][t],s+=[0,0,o,l,l,o][t],qt(n,a,s,i)},e.hsl2rgb=function(t,e,r,i){this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(r=t.l,e=t.s,t=t.h),(t>1||e>1||r>1)&&(t/=360,e/=100,r/=100),t*=360;var n,a,s,o,l;return t=t%360/60,l=2*e*(r<.5?r:1-r),o=l*(1-H(t%2-1)),n=a=s=r-l/2,t=~~t,n+=[l,o,0,0,o,l][t],a+=[o,l,l,o,0,0][t],s+=[0,0,o,l,l,o][t],qt(n,a,s,i)},e.rgb2hsb=function(t,e,r){r=It(t,e,r),t=r[0],e=r[1],r=r[2];var i,n,a,s;return a=W(t,e,r),s=a-G(t,e,r),i=0==s?null:a==t?(e-r)/s:a==e?(r-t)/s+2:(t-e)/s+4,i=(i+360)%6*60/360,n=0==s?0:s/a,{h:i,s:n,b:a,toString:Ft}},e.rgb2hsl=function(t,e,r){r=It(t,e,r),t=r[0],e=r[1],r=r[2];var i,n,a,s,o,l;return s=W(t,e,r),o=G(t,e,r),l=s-o,i=0==l?null:s==t?(e-r)/l:s==e?(r-t)/l+2:(t-e)/l+4,i=(i+360)%6*60/360,a=(s+o)/2,n=0==l?0:a<.5?l/(2*a):l/(2-2*a),{h:i,s:n,l:a,toString:Rt}},e._path2string=function(){return this.join(",").replace(xt,"$1")};var Dt=e._preload=function(t,e){var r=T.doc.createElement("img");r.style.cssText="position:absolute;left:-9999em;top:-9999em",r.onload=function(){e.call(this),this.onload=null,T.doc.body.removeChild(this)},r.onerror=function(){T.doc.body.removeChild(this)},T.doc.body.appendChild(r),r.src=t};e.getRGB=n(function(t){if(!t||(t=I(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:a};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:a};!(vt[A](t.toLowerCase().substring(0,2))||"#"==t.charAt())&&(t=Pt(t));var r,i,n,s,o,l,h,u=t.match(nt);return u?(u[2]&&(s=ut(u[2].substring(5),16),n=ut(u[2].substring(3,5),16),i=ut(u[2].substring(1,3),16)),u[3]&&(s=ut((l=u[3].charAt(3))+l,16),n=ut((l=u[3].charAt(2))+l,16),i=ut((l=u[3].charAt(1))+l,16)),u[4]&&(h=u[4][q](gt),i=ht(h[0]),"%"==h[0].slice(-1)&&(i*=2.55),n=ht(h[1]),"%"==h[1].slice(-1)&&(n*=2.55),s=ht(h[2]),"%"==h[2].slice(-1)&&(s*=2.55),"rgba"==u[1].toLowerCase().slice(0,4)&&(o=ht(h[3])),h[3]&&"%"==h[3].slice(-1)&&(o/=100)),u[5]?(h=u[5][q](gt),i=ht(h[0]),"%"==h[0].slice(-1)&&(i*=2.55),n=ht(h[1]),"%"==h[1].slice(-1)&&(n*=2.55),s=ht(h[2]),"%"==h[2].slice(-1)&&(s*=2.55),("deg"==h[0].slice(-3)||"°"==h[0].slice(-1))&&(i/=360),"hsba"==u[1].toLowerCase().slice(0,4)&&(o=ht(h[3])),h[3]&&"%"==h[3].slice(-1)&&(o/=100),e.hsb2rgb(i,n,s,o)):u[6]?(h=u[6][q](gt),i=ht(h[0]),"%"==h[0].slice(-1)&&(i*=2.55),n=ht(h[1]),"%"==h[1].slice(-1)&&(n*=2.55),s=ht(h[2]),"%"==h[2].slice(-1)&&(s*=2.55),("deg"==h[0].slice(-3)||"°"==h[0].slice(-1))&&(i/=360),"hsla"==u[1].toLowerCase().slice(0,4)&&(o=ht(h[3])),h[3]&&"%"==h[3].slice(-1)&&(o/=100),e.hsl2rgb(i,n,s,o)):(u={r:i,g:n,b:s,toString:a},u.hex="#"+(16777216|s|n<<8|i<<16).toString(16).slice(1),e.is(o,"finite")&&(u.opacity=o),u)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:a}},e),e.hsb=n(function(t,r,i){return e.hsb2rgb(t,r,i).hex}),e.hsl=n(function(t,r,i){return e.hsl2rgb(t,r,i).hex}),e.rgb=n(function(t,e,r){function i(t){return t+.5|0}return"#"+(16777216|i(r)|i(e)<<8|i(t)<<16).toString(16).slice(1)}),e.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},r=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),r.hex},e.getColor.reset=function(){delete this.start},e.parsePathString=function(t){if(!t)return null;var r=Vt(t);if(r.arr)return Yt(r.arr);var i={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},n=[];return e.is(t,Q)&&e.is(t[0],Q)&&(n=Yt(t)),n.length||I(t).replace(yt,function(t,e,r){var a=[],s=e.toLowerCase();if(r.replace(bt,function(t,e){e&&a.push(+e)}),"m"==s&&a.length>2&&(n.push([e][P](a.splice(0,2))),s="l",e="m"==e?"l":"L"),"r"==s)n.push([e][P](a));else for(;a.length>=i[s]&&(n.push([e][P](a.splice(0,i[s]))),i[s]););}),n.toString=e._path2string,r.arr=Yt(n),n},e.parseTransformString=n(function(t){if(!t)return null;var r={r:3,s:4,t:2,m:6},i=[];return e.is(t,Q)&&e.is(t[0],Q)&&(i=Yt(t)),i.length||I(t).replace(mt,function(t,e,r){var n=[],a=O.call(e);r.replace(bt,function(t,e){e&&n.push(+e)}),i.push([e][P](n))}),i.toString=e._path2string,i});var Vt=function(t){var e=Vt.ps=Vt.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var r in e)e[A](r)&&r!=t&&(e[r].sleep--,!e[r].sleep&&delete e[r])}),e[t]};e.findDotsAtSegment=function(t,e,r,i,n,a,s,o,l){var h=1-l,u=X(h,3),c=X(h,2),f=l*l,p=f*l,d=u*t+3*c*l*r+3*h*l*l*n+p*s,g=u*e+3*c*l*i+3*h*l*l*a+p*o,v=t+2*l*(r-t)+f*(n-2*r+t),x=e+2*l*(i-e)+f*(a-2*i+e),y=r+2*l*(n-r)+f*(s-2*n+r),m=i+2*l*(a-i)+f*(o-2*a+i),b=h*t+l*r,_=h*e+l*i,w=h*n+l*s,k=h*a+l*o,B=90-180*Y.atan2(v-y,x-m)/U;return(v>y||x=t.x&&e<=t.x2&&r>=t.y&&r<=t.y2},e.isBBoxIntersect=function(t,r){var i=e.isPointInsideBBox;return i(r,t.x,t.y)||i(r,t.x2,t.y)||i(r,t.x,t.y2)||i(r,t.x2,t.y2)||i(t,r.x,r.y)||i(t,r.x2,r.y)||i(t,r.x,r.y2)||i(t,r.x2,r.y2)||(t.xr.x||r.xt.x)&&(t.yr.y||r.yt.y)},e.pathIntersection=function(t,e){return d(t,e)},e.pathIntersectionNumber=function(t,e){return d(t,e,1)},e.isPointInsidePath=function(t,r,i){var n=e.pathBBox(t);return e.isPointInsideBBox(n,r,i)&&d(t,[["M",r,i],["H",n.x2+10]],1)%2==1},e._removedFactory=function(e){return function(){t("raphael.log",null,"Raphaël: you are calling to method “"+e+"” of removed object",e)}};var Ot=e.pathBBox=function(t){var e=Vt(t);if(e.bbox)return r(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};t=Qt(t);for(var i=0,n=0,a=[],s=[],o,l=0,h=t.length;l1&&(b=Y.sqrt(b),r=b*r,i=b*i);var _=r*r,w=i*i,k=(s==o?-1:1)*Y.sqrt(H((_*w-_*m*m-w*y*y)/(_*m*m+w*y*y))),B=k*r*m/i+(t+l)/2,C=k*-i*y/r+(e+h)/2,S=Y.asin(((e-C)/i).toFixed(9)),A=Y.asin(((h-C)/i).toFixed(9));S=tA&&(S-=2*U),!o&&A>S&&(A-=2*U)}var T=A-S;if(H(T)>c){var E=A,M=l,N=h;A=S+c*(o&&A>S?1:-1),l=B+r*Y.cos(A),h=C+i*Y.sin(A),p=Ut(l,h,r,i,a,0,o,M,N,[A,E,B,C])}T=A-S;var L=Y.cos(S),z=Y.sin(S),F=Y.cos(A),R=Y.sin(A),j=Y.tan(T/4),I=4/3*r*j,D=4/3*i*j,V=[t,e],O=[t+I*z,e-D*L],W=[l+I*R,h-D*F],G=[l,h];if(O[0]=2*V[0]-O[0],O[1]=2*V[1]-O[1],u)return[O,W,G][P](p);p=[O,W,G][P](p).join()[q](",");for(var X=[],$=0,Z=p.length;$"1e12"&&(c=.5),H(f)>"1e12"&&(f=.5),c>0&&c<1&&(g=$t(t,e,r,i,n,a,s,o,c),d.push(g.x),p.push(g.y)),f>0&&f<1&&(g=$t(t,e,r,i,n,a,s,o,f),d.push(g.x),p.push(g.y)),l=a-2*i+e-(o-2*a+i),h=2*(i-e)-2*(a-i),u=e-i,c=(-h+Y.sqrt(h*h-4*l*u))/2/l,f=(-h-Y.sqrt(h*h-4*l*u))/2/l,H(c)>"1e12"&&(c=.5),H(f)>"1e12"&&(f=.5),c>0&&c<1&&(g=$t(t,e,r,i,n,a,s,o,c),d.push(g.x),p.push(g.y)),f>0&&f<1&&(g=$t(t,e,r,i,n,a,s,o,f),d.push(g.x),p.push(g.y)),{min:{x:G[z](0,d),y:G[z](0,p)},max:{x:W[z](0,d),y:W[z](0,p)}}}),Qt=e._path2curve=n(function(t,e){var r=!e&&Vt(t);if(!e&&r.curve)return Yt(r.curve);for(var i=Gt(t),n=e&&Gt(e),a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},o=(function(t,e,r){var i,n,a={T:1,Q:1};if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in a)&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][P](Ut[z](0,[e.x,e.y][P](t.slice(1))));break;case"S":"C"==r||"S"==r?(i=2*e.x-e.bx,n=2*e.y-e.by):(i=e.x,n=e.y),t=["C",i,n][P](t.slice(1));break;case"T":"Q"==r||"T"==r?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][P](Xt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][P](Xt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][P](Ht(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][P](Ht(e.x,e.y,t[1],e.y));break;case"V":t=["C"][P](Ht(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][P](Ht(e.x,e.y,e.X,e.Y))}return t}),l=function(t,e){if(t[e].length>7){t[e].shift();for(var r=t[e];r.length;)u[e]="A",n&&(c[e]="A"),t.splice(e++,0,["C"][P](r.splice(0,6)));t.splice(e,1),g=W(i.length,n&&n.length||0)}},h=function(t,e,r,a,s){t&&e&&"M"==t[s][0]&&"M"!=e[s][0]&&(e.splice(s,0,["M",a.x,a.y]),r.bx=0,r.by=0,r.x=t[s][1],r.y=t[s][2],g=W(i.length,n&&n.length||0))},u=[],c=[],f="",p="",d=0,g=W(i.length,n&&n.length||0);dn){if(r&&!c.start){if(f=ke(s,o,l[1],l[2],l[3],l[4],l[5],l[6],n-p),u+=["C"+f.start.x,f.start.y,f.m.x,f.m.y,f.x,f.y],a)return u;c.start=u,u=["M"+f.x,f.y+"C"+f.n.x,f.n.y,f.end.x,f.end.y,l[5],l[6]].join(),p+=h,s=+l[5],o=+l[6];continue}if(!t&&!r)return f=ke(s,o,l[1],l[2],l[3],l[4],l[5],l[6],n-p),{x:f.x,y:f.y,alpha:f.alpha}}p+=h,s=+l[5],o=+l[6]}u+=l.shift()+l}return c.end=u,f=t?p:r?c:e.findDotsAtSegment(s,o,l[0],l[1],l[2],l[3],l[4],l[5],1),f.alpha&&(f={x:f.x,y:f.y,alpha:f.alpha}),f}},Ce=Be(1),Se=Be(),Ae=Be(0,1);e.getTotalLength=Ce,e.getPointAtLength=Se,e.getSubpath=function(t,e,r){if(this.getTotalLength(t)-r<1e-6)return Ae(t,e).end;var i=Ae(t,r,1);return e?Ae(i,e).end:i},ye.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():Ce(t)},ye.getPointAtLength=function(t){var e=this.getPath();if(e)return Se(e,t)},ye.getPath=function(){var t,r=e._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return r&&(t=r(this)),t},ye.getSubpath=function(t,r){var i=this.getPath();if(i)return e.getSubpath(i,t,r)};var Te=e.easing_formulas={linear:function(t){return t},"<":function(t){return X(t,1.7)},">":function(t){return X(t,.48)},"<>":function(t){var e=.48-t/1.04,r=Y.sqrt(.1734+e*e),i=r-e,n=X(H(i),1/3)*(i<0?-1:1),a=-r-e,s=X(H(a),1/3)*(a<0?-1:1),o=n+s+.5;return 3*(1-o)*o*o+o*o*o},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){t-=1;var e=1.70158;return t*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:X(2,-10*t)*Y.sin((t-.075)*(2*U)/.3)+1},bounce:function(t){var e=7.5625,r=2.75,i;return t<1/r?i=e*t*t:t<2/r?(t-=1.5/r,i=e*t*t+.75):t<2.5/r?(t-=2.25/r,i=e*t*t+.9375):(t-=2.625/r,i=e*t*t+.984375),i}};Te.easeIn=Te["ease-in"]=Te["<"],Te.easeOut=Te["ease-out"]=Te[">"],Te.easeInOut=Te["ease-in-out"]=Te["<>"],Te["back-in"]=Te.backIn,Te["back-out"]=Te.backOut;var Ee=[],Me=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,16)},Ne=function(){for(var r=+new Date,i=0;i1&&!n.next){for(v in u)u[A](v)&&(g[v]=n.totalOrigin[v]);n.el.attr(g),b(n.anim,n.el,n.anim.percents[0],null,n.totalOrigin,n.repeat-1)}n.next&&!n.stop&&b(n.anim,n.el,n.next,null,n.totalOrigin,n.repeat)}}}Ee.length&&Me(Ne)},Le=function(t){return t>255?255:t<0?0:t};ye.animateWith=function(t,r,i,n,a,s){var o=this;if(o.removed)return s&&s.call(o),o;var l=i instanceof m?i:e.animation(i,n,a,s),h,u;b(l,o,l.percents[0],null,o.attr());for(var c=0,f=Ee.length;cl&&(l=u)}l+="%",!t[l].callback&&(t[l].callback=n)}return new m(t,r)},ye.animate=function(t,r,i,n){var a=this;if(a.removed)return n&&n.call(a),a;var s=t instanceof m?t:e.animation(t,r,i,n);return b(s,a,s.percents[0],null,a.attr()),a},ye.setTime=function(t,e){return t&&null!=e&&this.status(t,G(e,t.ms)/t.ms),this},ye.status=function(t,e){var r=[],i=0,n,a;if(null!=e)return b(t,this,-1,G(e,1)),this;for(n=Ee.length;i1)for(var i=0,n=r.length;i.5)-1;l(f-.5,2)+l(p-.5,2)>.25&&(p=a.sqrt(.25-l(f-.5,2))*n+.5)&&.5!=p&&(p=p.toFixed(5)-1e-5*n)}return c}),n=n.split(/\s*\-\s*/),"linear"==h){var b=n.shift();if(b=-i(b),isNaN(b))return null;var _=[0,0,a.cos(t.rad(b)),a.sin(t.rad(b))],w=1/(s(o(_[2]),o(_[3]))||1);_[2]*=w,_[3]*=w,_[2]<0&&(_[0]=-_[2],_[2]=0),_[3]<0&&(_[1]=-_[3],_[3]=0)}var k=t._parseDots(n);if(!k)return null;if(u=u.replace(/[\(\)\s,\xb0#]/g,"_"),e.gradient&&u!=e.gradient.id&&(g.defs.removeChild(e.gradient),delete e.gradient),!e.gradient){y=v(h+"Gradient",{id:u}),e.gradient=y,v(y,"radial"==h?{fx:f,fy:p}:{x1:_[0],y1:_[1],x2:_[2],y2:_[3],gradientTransform:e.matrix.invert()}),g.defs.appendChild(y);for(var B=0,C=k.length;B1?z.opacity/100:z.opacity});case"stroke":z=t.getRGB(g),l.setAttribute(d,z.hex),"stroke"==d&&z[e]("opacity")&&v(l,{"stroke-opacity":z.opacity>1?z.opacity/100:z.opacity}),"stroke"==d&&i._.arrows&&("startString"in i._.arrows&&_(i,i._.arrows.startString),"endString"in i._.arrows&&_(i,i._.arrows.endString,1));break;case"gradient":("circle"==i.type||"ellipse"==i.type||"r"!=r(g).charAt())&&x(i,g);break;case"opacity":u.gradient&&!u[e]("stroke-opacity")&&v(l,{"stroke-opacity":g>1?g/100:g});case"fill-opacity":if(u.gradient){P=t._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,c)),P&&(F=P.getElementsByTagName("stop"),v(F[F.length-1],{"stop-opacity":g}));break}default:"font-size"==d&&(g=n(g,10)+"px");var R=d.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});l.style[R]=g,i._.dirty=1,l.setAttribute(d,g)}}S(i,a),l.style.visibility=f},C=1.2,S=function(i,a){if("text"==i.type&&(a[e]("text")||a[e]("font")||a[e]("font-size")||a[e]("x")||a[e]("y"))){var s=i.attrs,o=i.node,l=o.firstChild?n(t._g.doc.defaultView.getComputedStyle(o.firstChild,c).getPropertyValue("font-size"),10):10;if(a[e]("text")){for(s.text=a.text;o.firstChild;)o.removeChild(o.firstChild);for(var h=r(a.text).split("\n"),u=[],f,p=0,d=h.length;p"));var Z=X.getBoundingClientRect();m.W=f.w=(Z.right-Z.left)/U,m.H=f.h=(Z.bottom-Z.top)/U,m.X=f.x,m.Y=f.y+m.H/2,("x"in l||"y"in l)&&(m.path.v=t.format("m{0},{1}l{2},{1}",a(f.x*b),a(f.y*b),a(f.x*b)+1));for(var Q=["x","y","text","font","font-family","font-weight","font-style","font-size"],J=0,K=Q.length;J.25&&(r=n.sqrt(.25-l(e-.5,2))*(2*(r>.5)-1)+.5),f=e+p+r),d}),a=a.split(/\s*\-\s*/),"linear"==c){var g=a.shift();if(g=-i(g),isNaN(g))return null}var v=t._parseDots(a);if(!v)return null;if(e=e.shape||e.node,v.length){e.removeChild(s),s.on=!0,s.method="none",s.color=v[0].color,s.color2=v[v.length-1].color;for(var x=[],y=0,m=v.length;y')}}catch(r){N=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},t._engine.initWin(t._g.win),t._engine.create=function(){var e=t._getContainer.apply(0,arguments),r=e.container,i=e.height,n,a=e.width,s=e.x,o=e.y;if(!r)throw new Error("VML container not found.");var l=new t._Paper,h=l.canvas=t._g.doc.createElement("div"),u=h.style;return s=s||0,o=o||0,a=a||512,i=i||342,l.width=a,l.height=i,a==+a&&(a+="px"),i==+i&&(i+="px"),l.coordsize=1e3*b+p+1e3*b,l.coordorigin="0 0",l.span=t._g.doc.createElement("span"),l.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",h.appendChild(l.span),u.cssText=t.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",a,i),1==r?(t._g.doc.body.appendChild(h),u.left=s+"px",u.top=o+"px",u.position="absolute"):r.firstChild?r.insertBefore(h,r.firstChild):r.appendChild(h),l.renderfix=function(){},l},t.prototype.clear=function(){t.eve("raphael.clear",this),this.canvas.innerHTML=d,this.span=t._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},t.prototype.remove=function(){t.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;return!0};var L=t.st;for(var z in M)M[e](z)&&!L[e](z)&&(L[z]=function(t){return function(){var e=arguments;return this.forEach(function(r){r[t].apply(r,e)})}}(z))}}.apply(e,i),!(void 0!==n&&(t.exports=n))}])}); diff --git a/javascripts/visitor-map.js b/javascripts/visitor-map.js new file mode 100644 index 0000000..acdf412 --- /dev/null +++ b/javascripts/visitor-map.js @@ -0,0 +1,1419 @@ +/*! + * Piwik - free/libre analytics platform + * + * Visitors Map with zoom in continents / countries. Cities + Region view. + * Using Kartograph.js http://kartograph.org/ + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + +(function () { + + // create a global namespace for UserCountryMap plugin + // this is used both by visitor map and realtime map + window.UserCountryMapIslandora = window.UserCountryMapIslandora || {}; + + // the main class for this widget, provides the interface for the template + var VisitorMapIslandora = window.UserCountryMapIslandora.VisitorMap = function (config, theWidget) { + this.config = config; + this.theWidget = theWidget || false; + this.run(); + }; + + $.extend(VisitorMapIslandora.prototype, { + + /* + * initializes the map after widget creation + */ + run: function () { + var self = this, + config = self.config, + colorManager = piwik.ColorManager, + colorNames = ['no-data-color', 'one-country-color', 'color-range-start-choropleth', + 'color-range-start-normal', 'color-range-end-choropleth', 'color-range-end-normal', + 'country-highlight-color', 'unknown-region-fill-color', 'unknown-region-stroke-color', + 'region-stroke-color', 'invisible-region-background', 'city-label-color', + 'city-stroke-color', 'city-highlight-stroke-color', 'city-highlight-fill-color', + 'city-highlight-label-color', 'city-label-fill-color', 'city-selected-color', + 'city-selected-label-color', 'region-layer-stroke-color', 'country-selected-color', + 'region-selected-color', 'region-highlight-color'], + colors = colorManager.getColors('visitor-map', colorNames), + noDataColor = colors['no-data-color'], + oneCountryColor = colors['one-country-color'], + colorRangeStartChoropleth = colors['color-range-start-choropleth'], + colorRangeStartNormal = colors['color-range-start-normal'], + colorRangeEndChoropleth = colors['color-range-end-choropleth'], + colorRangeEndNormal = colors['color-range-end-normal'], + specialMetricsColorScale = colorManager.getColors( + 'visitor-map', + ['special-metrics-color-scale-1', 'special-metrics-color-scale-2', 'special-metrics-color-scale-3', + 'special-metrics-color-scale-4'], + true + ), + countryHighlightColor = colors['country-highlight-color'], + countrySelectedColor = colors['country-selected-color'], + unknownRegionFillColor = colors['unknown-region-fill-color'], + unknownRegionStrokeColor = colors['unknown-region-stroke-color'], + regionStrokeColor = colors['region-stroke-color'], + regionSelectedColor = colors['region-selected-color'], + regionHighlightColor = colors['region-highlight-color'], + invisibleRegionBackgroundColor = colors['invisible-region-background'], + cityLabelColor = colors['city-label-color'], + cityLabelFillColor = colors['city-label-fill-color'], + cityStrokeColor = colors['city-stroke-color'], + cityHighlightStrokeColor = colors['city-highlight-stroke-color'], + cityHighlightFillColor = colors['city-highlight-fill-color'], + cityHighlightLabelColor = colors['city-highlight-label-color'], + citySelectedColor = colors['city-selected-color'], + citySelectedLabelColor = colors['city-selected-label-color'], + regionLayerStrokeColor = colors['region-layer-stroke-color'], + hasUserZoomed = false; + ; + + /* + * our own custom selector to only select stuff of this widget + */ + function $$(selector) { + return $(selector, self.theWidget ? self.theWidget.element : undefined); + } + + var mapContainer = $$('.UserCountryMapIslandora_map').get(0), + map = self.map = $K.map(mapContainer), + main = $$('.UserCountryIslandoraMap_container'), + worldTotalVisits = 0, + width = main.width(), + _ = config._; + + config.noDataColor = noDataColor; + self.widget = $$('.widgetUserCountryMapvisitorMap').parent(); + + //window.__mapInstances = window.__mapInstances || []; + //window.__mapInstances.push(map); + + function _reportParams(module, action, countryFilter) { + var params = $.extend(config.reqParams, { + module: 'API', + method: 'API.getProcessedReport', + apiModule: module, + apiAction: action, + filter_limit: -1, + limit: -1, + format_metrics: 0, + showRawMetrics: 1 + }); + if (countryFilter) { + $.extend(params, { + filter_column: 'country', + filter_sort_column: 'nb_visits', + filter_pattern: countryFilter + }); + } + return params; + } + + /* + * wrapper around jQuery.ajax, moves token_auth parameter + * to POST data while keeping other parameters as GET + */ + function ajax(params, dataType) { + dataType = dataType || 'json'; + params = $.extend({}, params); + var token_auth = '' + params.token_auth; + delete params['token_auth']; + return $.ajax({ + url: 'index.php?' + $.param(params), + dataType: dataType, + data: { token_auth: token_auth }, + type: 'POST' + }); + } + + function minmax(values) { + values = values.sort(function (a, b) { return Number(a) - Number(b); }); + return { + min: values[0], + max: values[values.length - 1], + median: values[Math.floor(values.length * 0.5)], + p33: values[Math.floor(values.length * 0.33)], + p66: values[Math.floor(values.length * 0.66)], + p90: values[Math.floor(values.length * 0.9)] + }; + } + + function formatNumber(v, metric, first) { + v = Number(v); + + if (v > 1000000) { + return (v / 1000000).toFixed(1) + 'm'; + } + + if (v > 1000) { + return (v / 1000).toFixed(1) + 'k'; + } + + if (!metric) { + return v; + } + + if (metric == 'avg_time_on_site') { + v += first ? ' sec' : 's'; + } else if (metric == 'bounce_rate') { + v += '%'; + } else if (metric === 'nb_actions_per_visit') { + if (parseInt(v, 10) === v) { + return v; + } + + return v.toFixed(1); + } + + return v; + } + + // + // Since some metrics are transmitted in an non-numeric format like + // "61.45%", we need to parse the numbers to make sure they can be + // used for color scales etc. The parsed metrics will be stored as + // METRIC_raw + // + function formatValueForTooltips(data, metric, id) { + + var val = data[metric] % 1 === 0 || Number(data[metric]) != data[metric] ? data[metric] : data[metric].toFixed(1); + if (metric == 'bounce_rate') { + val = NumberFormatter.formatPercent(val); + } else if (metric == 'avg_time_on_site') { + val = new Date(0, 0, 0, val / 3600, val % 3600 / 60, val % 60) + .toTimeString() + .replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1"); + } else { + val = NumberFormatter.formatNumber(val); + } + + var v = _[metric].replace('%s', '' + val + ''); + + if (val == 1 && metric == 'nb_visits') v = _.one_visit; + + if (metric.substr(0, 3) == 'nb_' && metric != 'nb_actions_per_visit') { + var total; + if (id.length == 3) total = UserCountryMap.countriesByIso[id][metric]; + else if (id == 'world') total = _worldTotal; + else { + total = 0; + $.each(UserCountryMap.countriesByIso, function (iso, country) { + if (UserCountryMap.ISO3toCONT[iso] == id) { + total += country[metric]; + } + }); + } + if (total) { + v += ' (' + formatPercentage(data[metric] / total) + ')'; + } + } else if (metric == 'avg_time_on_site') { + v += '
(' + _.nb_visits.replace('%s', data.nb_visits) + ')'; + } + return v; + } + + function getColorScale(rows, metric, filter, choropleth) { + + var colscale; + + function addLegendItem(val, first) { + var d = $('
'), r = $('
'), l = $('
'), + metric = $$('.userCountryMapSelectMetrics').val(), + v = formatNumber(Math.round(val), metric, first); + + d.css({ width: 17, height: 17, float: 'left', background: colscale(val) }); + l.css({ 'margin-left': 20, 'line-height': '20px', 'text-align': 'right' }).html(v); + r.css({ clear: 'both', height: 19 }); + r.append(d).append(l); + $('.UserCountryMap-legend .content').append(r); + } + + var stats, values = [], id = self.lastSelected, c, showLegend; + + $.each(rows, function (i, r) { + if (!$.isFunction(filter) || filter(r)) { + var v = quantify(r, metric); + if (!isNaN(v)) values.push(v); + } + }); + + stats = minmax(values); + showLegend = values.length > 0; + + if (stats.min == stats.max) { + colscale = function () { return chroma.hex(oneCountryColor); }; + if (choropleth) { + $('.UserCountryMap-legend .content').html('').show(); + if (showLegend) { + addLegendItem(stats.min, true); + } + } + return colscale; + } + + colscale = chroma.scale() + .range([choropleth ? colorRangeStartChoropleth : colorRangeStartNormal, + choropleth ? colorRangeEndChoropleth : colorRangeEndNormal]) + .domain(values, 4, 'c') + .mode('lch'); + + if (metric == 'avg_time_on_site' || metric == 'nb_actions_per_visit' || metric == 'bounce_rate') { + if (id.length == 3) { + c = (stats.p90 - stats.min) / (stats.max - stats.min); + colscale = chroma.scale(specialMetricsColorScale, [0, c, c + 0.001, 1]) + .domain(chroma.limits(rows, 'c', 5, 'curMetric', filter), 4, 'c') + .mode('hsl'); + } + } + + // a good place to update the legend, isn't it? + if (choropleth && showLegend) { + $('.UserCountryMap-legend .content').html('').show(); + var itemExists = {}; + $.each(chroma.limits(values, 'k', 3), function (i, v) { + if (itemExists[v]) return; + addLegendItem(v, i === 0); + itemExists[v] = true; + }); + + } else { + $('.UserCountryMap-legend .content').hide(); + } + + return colscale; + } + + function formatPercentage(val) { + if (val < 0.001) { + return '< ' + NumberFormatter.formatPercent(0.1); + } + return NumberFormatter.formatPercent(Math.round(1000 * val) / 10); + } + + /* + * to ensure that onResize is not called a hundred times + * while resizing the browser window, this functions + * makes sure to only call onResize at the end + */ + function onResizeLazy() { + clearTimeout(self._resizeTimer); + self._resizeTimer = setTimeout(self.resize.bind(self), 300); + } + // Save a reference to the function so it can be cleanly removed + // as a listener later. + self._onResizeLazy = onResizeLazy; + + function activateButton(btn) { + $$('.UserCountryMap-view-mode-buttons a').removeClass('activeIcon'); + btn.addClass('activeIcon'); + $$('.UserCountryMap-activeItem').offset({ left: btn.offset().left }); + } + + function initUserInterface() { + // react to changes of country select + $$('.userCountryMapSelectCountry').off('change').change(function () { + hasUserZoomed = true; + updateState($$('.userCountryMapSelectCountry').val()); + }); + + function zoomOut() { + hasUserZoomed = true; + var t = self.lastSelected, + tgt = 'world'; // zoom out to world per default.. + if (t.length == 3 && UserCountryMap.ISO3toCONT[t] !== undefined) { + tgt = UserCountryMap.ISO3toCONT[t]; // ..but zoom to continent if we know it + } + updateState(tgt); + } + + // enable zoom-out + $$('.UserCountryMap-btn-zoom').off('click').click(zoomOut); + $$('.UserCountryMap_map').off('click').click(zoomOut); + + // handle window resizes + $(window).resize(onResizeLazy); + + // enable metric changes + $$('.userCountryMapSelectMetrics').off('change').change(function () { + updateState(self.lastSelected); + }); + + // handle city button + (function (btn) { + btn.off('click').click(function () { + if (self.lastSelected.length == 3) { + if (self.mode != "city") { + self.mode = "city"; + hasUserZoomed = true; + updateState(self.lastSelected); + } + } + }); + })($$('.UserCountryMap-btn-city')); + + // handle region button + (function (btn) { + btn.off('click').click(function () { + if (self.mode != "region") { + $$('.UserCountryMap-view-mode-buttons a').removeClass('activeIcon'); + self.mode = "region"; + hasUserZoomed = true; + updateState(self.lastSelected); + } + }); + })($$('.UserCountryMap-btn-region')); + + // add loading indicator overlay + + var bl = $('
'); + bl.hide(); + $$('.UserCountryMap_map').append(bl); + + var infobtn = $('.UserCountryMap-info-btn'); + infobtn.off('mouseenter').on('mouseenter',function (e) { + $(infobtn.data('tooltip-target')).show(); + }).off('mouseleave').on('mouseleave', function (e) { + $(infobtn.data('tooltip-target')).hide(); + }); + $('.UserCountryMap-tooltip').hide(); + } + + /* + * updateState, called whenever the view changes + */ + function updateState(id) { + // double check view mode + if (self.mode == "city" && id.length != 3) { + // city mode is reserved for country views + self.mode = "region"; + } + + var metric = $$('.userCountryMapSelectMetrics').val(); + // store current map state + self.widget.dashboardWidget('setParameters', { + lastMap: id, viewMode: self.mode, lastMetric: metric + }); + + $('.UserCountryMap-info-btn').hide(); + + try { + // check which map to render + if (id.length == 3) { + // country map + renderCountryMap(id, metric); + } else { + // world or continent map + renderWorldMap(id, metric); + } + + } catch (e) { + // console.error(e); + $('.UserCountryMap-info .content').html(e); + $('.UserCountryMap-info').show(); + } + + _updateUI(id, metric); + + self.lastSelected = id; + } + + /* + * update the widgets ui according to the currently selected view + */ + function _updateUI(id, metric) { + // update UI + if (self.mode == "city") { + activateButton($$('.UserCountryMap-btn-city')); + } else { + activateButton($$('.UserCountryMap-btn-region')); + } + var countrySelect = $$('.userCountryMapSelectCountry'); + countrySelect.val(id); + + var zoom = $$('.UserCountryMap-btn-zoom'); + if (id == 'world') zoom.addClass('inactiveIcon'); + else zoom.removeClass('inactiveIcon'); + + // show flag icon in select box + var flag = $$('.userCountryMapFlag'), + regionBtn = $$('.UserCountryMap-btn-region'); + if (id.length == 3) { + if (UserCountryMap.countriesByIso[id]) { // we have visits in this country + flag.css({ + 'background-image': 'url(' + UserCountryMap.countriesByIso[id].flag + ')', + 'background-repeat': 'no-repeat', + 'background-position': '5px 5px' + }); + $$('.UserCountryMap-btn-city').removeClass('inactiveIcon').show(); + $('span', regionBtn).html(regionBtn.data('region')); + } else { + // not a single visit in this country + $$('.UserCountryMap-btn-city').addClass('inactiveIcon'); + $('.map-stats').html(_.no_data); + $('.map-title').html(''); + return; + } + + } else { + flag.css({ + 'background': 'none' + }); + $$('.UserCountryMap-btn-city').addClass('inactiveIcon').hide(); + $('span', regionBtn).html(regionBtn.data('country')); + } + + var mapTitle = id.length == 3 ? + UserCountryMap.countriesByIso[id].name : + $$('.userCountryMapSelectCountry option[value=' + id + ']').html(), + totalVisits = 0, + totalMetricValue = 0; + // update map title + $('.map-title').html(mapTitle); + $$('.widgetUserCountryMapvisitorMap .widgetName .map-title').html(' – ' + mapTitle); + // update total visits for that region + if (id.length == 3) { + totalVisits = UserCountryMap.countriesByIso[id]['nb_visits']; + totalMetricValue = UserCountryMap.countriesByIso[id][metric]; + } else if (id.length == 2) { + $.each(UserCountryMap.countriesByIso, function (iso, country) { + if (UserCountryMap.ISO3toCONT[iso] == id) { + totalVisits += country['nb_visits']; + totalMetricValue += country[metric]; + } + }); + } else { + totalVisits = self.config.visitsSummary['nb_visits']; + totalMetricValue = self.config.visitsSummary[metric]; + } + + var data = {}; + data[metric] = totalMetricValue; + $('.map-stats').html( + '' + formatValueForTooltips(data, metric, false) + '' + + (id != 'world' ? (' (' + formatPercentage(totalMetricValue / self.config.visitsSummary[metric]) + ')') : '') + ); + } + + /* + * called by updateState if either the world or a continent is selected + */ + function renderWorldMap(target, metric) { + + /** + * update the colors of the countrys + */ + function updateColorsAndTooltips(metric) { + + // Create a chroma ColorScale for the selected metric that regards only the + // countries that are visible in the map. + colscale = getColorScale(UserCountryMap.countryData, metric, function (r) { + if (target.length == 2) { + return UserCountryMap.ISO3toCONT[r.iso] == target; + } else { + return true; + } + }, true); + + function countryFill(data) { + var d = UserCountryMap.countriesByIso[data.iso]; + if (d === null) { + return self.config.noDataColor; + } else { + return colscale(d[metric]); + } + } + + var countryLayer = map.getLayer('countries'); + if(countryLayer) { + // Apply the color scale to the map. + countryLayer + .style('fill', countryFill) + .on('mouseenter', function (d, path, evt) { + if (evt.shiftKey) { // highlight on mouseover with shift pressed + path.attr('fill', countryHighlightColor); + } + }) + .on('mouseleave', function (d, path, evt) { + if ($.inArray(UserCountryMap.countriesByIso[d.iso].name, _rowEvolution.labels) == -1) { + path.attr('fill', countryFill(d)); // reset color + } + }); + + // Update the map tooltips. + countryLayer.tooltips(function (data) { + var metric = $$('.userCountryMapSelectMetrics').val(), + country = UserCountryMap.countriesByIso[data.iso]; + return '

' + country.name + '

' + + formatValueForTooltips(country, metric, target); + }); + } + + } + + // if the view hasn't changed (but probably the selected metric), + // all we need to do is to recolor the current map. + if (target == self.lastSelected) { + updateColorsAndTooltips(metric); + return; + } + + // otherwise we need to load another map svg + _updateMap(target + '.svg', function () { + + // add a layer for non-selectable countries = for which no data is + // defined in the current report + map.addLayer('countries', { + name: 'context', + filter: function (pd) { + return UserCountryMap.countriesByIso[pd.iso] === undefined; + }, + tooltips: function (pd) { + var countryName = pd.name; + for (var iso in self.config.countryNames) { + if (UserCountryMap.ISO2toISO3[iso.toUpperCase()] == pd.iso) { + countryName = self.config.countryNames[iso]; + break; + } + } + return '

' + countryName + '

' + _.no_visit; + } + }); + + // add a layer for selectable countries = for which we have data + // available in the current report + map.addLayer('countries', { name: 'countryBG', filter: function (pd) { + return UserCountryMap.countriesByIso[pd.iso] !== undefined; + }}); + + map.addLayer('countries', { + key: 'iso', + filter: function (pd) { + return UserCountryMap.countriesByIso[pd.iso] !== undefined; + }, + click: function (data, path, evt) { + evt.stopPropagation(); + // Remove row evolution. We don't want to expose data to general users. + var tgt; + if (self.lastSelected != 'world' || UserCountryMap.countriesByIso[data.iso] === undefined) { + tgt = data.iso; + } else { + tgt = UserCountryMap.ISO3toCONT[data.iso]; + } + hasUserZoomed = true; + updateState(tgt); + } + }); + + updateColorsAndTooltips(metric); + }); + } + + /* + * updateMap is called by renderCountryMap() and renderWorldMap() + */ + function _updateMap(svgUrl, callback) { + map.loadMap(config.svgBasePath + svgUrl, function () { + + map.clear(); + self.resize(); + callback(); + + $('.ui-tooltip').remove(); // remove all existing tooltips + + }, { padding: -3}); + } + + function indicateLoading() { + $$('.UserCountryMap-black').show(); + $$('.UserCountryMap-black').css('opacity', 0); + $$('.UserCountryMap-black').animate({ opacity: 0.5 }, 400); + $$('.UserCountryMap .loadingPiwik').show(); + } + + function loadingComplete() { + $$('.UserCountryMap-black').hide(); + $$('.UserCountryMap .loadingPiwik').hide(); + } + + /* + * returns a quantifiable value for a given metric + */ + function quantify(d, metric) { + if (!metric) metric = $$('.userCountryMapSelectMetrics').val(); + switch (metric) { + default: + return d[metric]; + } + } + + /* + * Aggregates a list of report rows by a given grouping function + * + * the groupBy function gets a row as argument add should return a + * group-id or false, if the row should be ignored. + * + * all rows for which groupBy returns the same group-id are + * aggregated according to the given metric. + */ + function aggregate(rows, groupBy) { + + var groups = {}; + $.each(rows, function (i, row) { + var g_id = groupBy ? groupBy(row) : 'X'; + g_id = g_id === true ? $.isNumeric(i) && i === Number(i) ? false : i : g_id; + if (g_id) { + if (!groups[g_id]) { + groups[g_id] = { + nb_visits: 0, + nb_actions: 0, + sum_visit_length: 0, + bounce_count: 0 + }; + } + $.each(groups[g_id], function (metric) { + groups[g_id][metric] += row[metric]; + }); + } + }); + + $.each(groups, function (g_id, group) { + var apv = group.nb_actions / group.nb_visits, + ats = group.sum_visit_length / group.nb_visits, + br = group.bounce_count / group.nb_visits; + group['nb_actions_per_visit'] = apv; + group['avg_time_on_site'] = new Date(0, 0, 0, ats / 3600, ats % 3600 / 60, ats % 60).toLocaleTimeString(); + group['bounce_rate'] = (br % 1 !== 0 ? br.toFixed(1) : br) + "%"; + }); + + return groupBy ? groups : groups.X; + } + + function displayUnlocatableCount(unlocated, total, regionOrCity) { + $('.unlocated-stats').html( + $('.unlocated-stats').data('tpl') + .replace('%s', unlocated) + .replace('%p', '(' + formatPercentage(unlocated / total) + ')') + .replace('%c', UserCountryMap.countriesByIso[self.lastSelected].name) + ); + $('.UserCountryMap-info-btn').show(); + + var zoomTitle = ''; + if (regionOrCity == 'region') { + zoomTitle = ' ' + _pk_translate('UserCountryMap_WithUnknownRegion', [unlocated]); + } else if (regionOrCity == 'city') { + zoomTitle = ' ' + _pk_translate('UserCountryMap_WithUnknownCity', [unlocated]); + } + + if (unlocated && zoomTitle) { + if ($('.map-stats .unlocatableCount').length) { + $('.map-stats .unlocatableCount').html(zoomTitle); + } else { + $('.map-stats').append('' + zoomTitle + ''); + } + } + } + + /* + * renders a country map (either region or city view) + */ + function renderCountryMap(iso) { + + var countryMap = { + zoomed: false, + lastRequest: false, + lastResponse: false + }; + + /* + * updates the colors in the current region map + * this happens once a new country is loaded and + * whenever the metric changes + */ + function updateRegionColors() { + indicateLoading(); + // load data from Piwik API + ajax(_reportParams('UserCountry', 'getRegion', UserCountryMap.countriesByIso[iso].iso2)) + .done(function (data) { + convertBounceRatesToPercents(data); + + loadingComplete(); + + var regionDict = {}, + totalCountryVisits = UserCountryMap.countriesByIso[iso].nb_visits, + unlocated = totalCountryVisits; + // self.lastReportMetricStats = {}; + + function regionCode(region) { + var key = UserCountryMap.keys[iso] || 'fips'; + return key.substr(0, 4) == "fips" ? (region[key] || "").substr(2) : region[key]; // cut first two letters from fips code (=country code) + } + + function regionExistsInMap(code) { + var key = UserCountryMap.keys[iso] || 'fips', q = {}; + q[key] = key.substr(0, 4) == 'fips' ? UserCountryMap.countriesByIso[iso].fips + code : code; + if (map.getLayer('regions').getPaths(q).length === 0) { + return false; + } + return true; + } + + $.each(data.reportData, function (i, row) { + regionDict[data.reportMetadata[i].region] = $.extend(row, data.reportMetadata[i], { + curMetric: quantify(row, metric) + }); + }); + + var metric = $$('.userCountryMapSelectMetrics').val(); + + if (UserCountryMap.aggregate[iso]) { + var aggregated = aggregate(regionDict, function (row) { + var id = row.region, res = false; + $.each(UserCountryMap.aggregate[iso].groups, function (group, codes) { + if ($.inArray(id, codes) > -1) { + res = group; + } + }); + return res; + }); + //if (!UserCountryMap.aggregate.partial) regionDict = {}; + $.each(aggregated, function (id, group) { + group.curMetric = quantify(group, metric); + regionDict[id] = group; + }); + } + + $.each(regionDict, function (key, region) { + if (regionExistsInMap(key)) unlocated -= region.nb_visits; + }); + displayUnlocatableCount(unlocated, totalCountryVisits, 'region'); + + // create color scale + colscale = getColorScale(regionDict, 'curMetric', null, true); + + function regionFill(data) { + var code = regionCode(data); + return regionDict[code] === undefined ? unknownRegionFillColor : colscale(regionDict[code].curMetric); + } + + // apply colors to map + map.getLayer('regions') + .style('fill', regionFill) + .style('stroke',function (data) { + return regionDict[regionCode(data)] === undefined ? unknownRegionStrokeColor : regionStrokeColor; + }).sort(function (data) { + var code = regionCode(data); + return regionDict[code] === undefined ? -1 : regionDict[code].curMetric; + }).tooltips(function (data) { + var metric = $$('.userCountryMapSelectMetrics').val(), + region = regionDict[regionCode(data)]; + if (region === undefined) { + return '

' + data.name + '

' + _.nb_visits.replace('%s', '0') + '

'; + } + return '

' + data.name + '

' + + formatValueForTooltips(region, metric, iso); + }).on('click',function (d, path, evt) { + var region = regionDict[regionCode(d)]; + if (region && region.label) { + map.getLayer('regions').style('fill', regionFill); + } + }).on('mouseenter',function (d, path, evt) { + var region = regionDict[regionCode(d)]; + if (region && region.label) { + if (evt.shiftKey) { + path.attr('fill', regionHighlightColor); + } + } + }).on('mouseleave',function (d, path, evt) { + var region = regionDict[regionCode(d)]; + if (region && region.label) { + if ($.inArray(region.label, _rowEvolution.labels) == -1) { + // reset color + path.attr('fill', regionFill(d)); + } + } + }).style('cursor', function (d) { + return regionDict[regionCode(d)] && regionDict[regionCode(d)].label ? 'pointer' : 'default'; + }); + + // check for regions missing in the map + $.each(regionDict, function (code, region) { + if (!regionExistsInMap(code)) { + console.warn('possible region mismatch!', code, region.nb_visits); + } + }); + }); + } + + /* + * updates the city symbols in the current map + * this happens once a new country is loaded and + * whenever the metric changes + */ + function updateCitySymbols() { + // color regions in white as background for symbols + var layerName = self.mode != "region" ? "regions2" : "regions"; + if (map.getLayer(layerName)) map.getLayer(layerName).style('fill', invisibleRegionBackgroundColor); + + indicateLoading(); + + // get visits per city from API + ajax(_reportParams('UserCountry', 'getCity', UserCountryMap.countriesByIso[iso].iso2)) + .done(function (data) { + convertBounceRatesToPercents(data); + + loadingComplete(); + + var metric = $$('.userCountryMapSelectMetrics').val(), + colscale, + totalCountryVisits = UserCountryMap.countriesByIso[iso].nb_visits, + unlocated = totalCountryVisits, + cities = []; + + // merge reportData and reportMetadata to cities array + $.each(data.reportData, function (i, row) { + unlocated -= row.nb_visits; + cities.push($.extend(row, data.reportMetadata[i], { + curMetric: quantify(row, metric) + })); + }); + + displayUnlocatableCount(unlocated, totalCountryVisits, 'city'); + + // sort by current metric + cities.sort(function (a, b) { return b.curMetric - a.curMetric; }); + + colscale = getColorScale(cities, metric); + + // construct scale + var radscale = $K.scale.linear(cities.concat({ curMetric: 0 }), 'curMetric'); + + var area = map.container.width() * map.container.height(), + sumArea = 0, + f = { + nb_visits: 0.002, + nb_uniq_visitors: 0.002, + nb_actions: 0.002, + avg_time_on_site: 0.02, + nb_actions_per_visit: 0.02, + bounce_rate: 0.02 + }, + maxRad; + + $.each(cities, function (i, city) { + sumArea += isNaN(city.curMetric) ? 0 : Math.pow(radscale(city.curMetric), 2); + }); + + maxRad = Math.sqrt(area * f[metric] / sumArea); + + radscale = $K.scale.sqrt(cities.concat({ curMetric: 0 }), 'curMetric').range([2, maxRad + 2]); + + var citySymbols = map.addSymbols({ + type: $K.LabeledBubble, + data: cities, + clustering: 'noverlap', + clusteringOpts: { + size: 128, + tolerance: 0 + }, + title: function (d) { + var v = d.curMetric; + if (isNaN(v)) { + return ''; + } + + if (metric === 'bounce_rate') { + v = Number((''+ v).replace('%', '')); + } else if (metric === 'avg_time_on_site') { + v = Number(v); + } + + if (isNaN(v)) { + return ''; + } + + if (radscale(v) > 10) { + return formatNumber(d.curMetric, metric); + } + + return ''; + }, + labelattrs: { + fill: cityLabelColor, + 'font-size': 11, + stroke: false, + cursor: 'pointer' + }, + filter: function (d) { + if (isNaN(d.lat) || isNaN(d.long)) return false; + return !!d.curMetric && d.curMetric !== '0'; + }, + aggregate: function (rows) { + var row = aggregate(rows); + row.city_names = []; + row.label = rows[0].label; // keep label of biggest city for row evolution + $.each(rows, function (i, r) { + row.city_names = row.city_names.concat(r.city_names ? r.city_names : [r.city_name]); + }); + row.city_name = row.city_names[0] + (row.city_names.length > 1 ? ' ' + _.and_n_others.replace('%s', (row.city_names.length - 1)) : ''); + row.curMetric = quantify(row, metric); + return row; + }, + sortBy: 'radius desc', + location: function (city) { return [city.long, city.lat]; }, + radius: function (city) { + var scale = radscale(city.curMetric); + if (isNaN(scale)) { + return 0.01; + } + return scale; + }, + tooltip: function (city) { + return '

' + city.city_name + '

' + + formatValueForTooltips(city, metric, iso); + }, + attrs: function (city) { + var color = colscale(city.curMetric); + if (color && color.hex) { + color = color.hex(); + } + return { + fill: color, + 'fill-opacity': 0.7, + stroke: cityStrokeColor, + cursor: 'pointer' + }; + }, + mouseenter: function (city, symbol, evt) { + symbol.path.attr({ + 'fill-opacity': 1, + 'stroke': cityHighlightStrokeColor, + 'stroke-opacity': 1, + 'stroke-width': 2 + }); + if (evt.shiftKey) { + symbol.path.attr({ fill: cityHighlightFillColor }); + if (symbol.label) symbol.label.attr({ fill: cityHighlightLabelColor }); + } + }, + mouseleave: function (city, symbol) { + symbol.path.attr({ + 'fill-opacity': 0.7, + 'stroke-opacity': 1, + 'stroke-width': 1, + 'stroke': cityLabelColor + }); + if ($.inArray(city.label, _rowEvolution.labels) == -1) { + symbol.path.attr({ fill: colscale(city.curMetric) }); + if (symbol.label) symbol.label.attr({ fill: cityLabelFillColor }); + } + }, + click: function (city, symbol, evt) { + showRowEvolution('getCity', city.label); + citySymbols.update({ + attrs: function (city) { + return { fill: colscale(city.curMetric) }; + } + }); + } + }); + }); + } + + _updateMap(iso + '.svg', function () { + + // add background + map.addLayer('context', { + key: 'iso', + filter: function (pd) { + return UserCountryMap.countriesByIso[pd.iso] === undefined; + } + }); + map.addLayer('context', { + key: 'iso', + name: 'context-clickable', + filter: function (pd) { + return UserCountryMap.countriesByIso[pd.iso] !== undefined; + }, + click: function (path, p, evt) { // add click events for surrounding countries + evt.stopPropagation(); + hasUserZoomed = true; + updateState(path.iso); + }, + tooltips: function (data) { + if (UserCountryMap.countriesByIso[data.iso] === undefined) { + return 'no data'; + } + var metric = $$('.userCountryMapSelectMetrics').val(), + country = UserCountryMap.countriesByIso[data.iso]; + return '

' + country.name + '

' + + formatValueForTooltips(country, metric, 'world'); + } + }); + function isThisCountry(d) { return d.iso == iso;} + + map.addLayer("context", { + name: "regionBG", + filter: isThisCountry + }); + map.addLayer("context", { + name: "regionBG-fill", + filter: isThisCountry + }); + map.addLayer('regions', { + key: 'fips', + name: self.mode != "region" ? "regions2" : "regions", + styles: { + stroke: regionLayerStrokeColor + }, + click: function (d, p, evt) { + evt.stopPropagation(); + } + }); + function filtCountryLabels(data) { + return data.iso != iso && + map.getLayer('context-clickable') && + map.getLayer('context-clickable').getPath(data.iso) && + Math.abs(map.getLayer('context-clickable').getPath(data.iso).path.area()) > 700; + } + + // returns either the reference to the country polygon or a custom label + // position if defined in UserCountryMap.customLabelPositions + function countryLabelPos(data) { + var CLP = UserCountryMap.customLabelPositions; + if (CLP[iso] && CLP[iso][data.iso]) return CLP[iso][data.iso]; + return 'context-clickable.' + data.iso; + } + + map.addSymbols({ + data: map.getLayer('context-clickable').getPathsData(), + type: $K.Label, + filter: filtCountryLabels, + location: countryLabelPos, + text: function (data) { return UserCountryMap.countriesByIso[data.iso].iso2; }, + 'class': 'countryLabelBg' + }); + map.addSymbols({ + data: map.getLayer('context-clickable').getPathsData(), + type: $K.Label, + filter: filtCountryLabels, + location: countryLabelPos, + text: function (data) { return UserCountryMap.countriesByIso[data.iso].iso2; }, + 'class': 'countryLabel' + }); + + if (!UserCountryMap.countriesByIso[iso]) return; + + if (self.mode == "region") { + updateRegionColors(); + } else { + updateCitySymbols(); + } + + }); + } + + var _rowEvolution = { labels: [], method: false }; + + // now load the metrics for all countries + ajax(_reportParams('UserCountry', 'getCountry')) + .done(function (report) { + convertBounceRatesToPercents(report); + + var metrics = $$('.userCountryMapSelectMetrics option'); + var countryData = [], countrySelect = $$('.userCountryMapSelectCountry'), + countriesByIso = {}; + UserCountryMap.lastReportMetricStats = {}; + // read api result to countryData and countriesByIso + $.each(report.reportData, function (i, data) { + var meta = report.reportMetadata[i], + country = { + name: data.label, + iso2: meta.code.toUpperCase(), + fips: meta.code.toUpperCase(), + iso: UserCountryMap.ISO2toISO3[meta.code.toUpperCase()], + flag: meta.logo + }; + if (UserCountryMap.differentFIPS[country.iso2]) { + country.fips = UserCountryMap.differentFIPS[country.iso2]; + } + $.each(metrics, function (i, metric) { + metric = $(metric).val(); + country[metric] = data[metric]; + }); + countryData.push(country); + countriesByIso[country.iso] = country; + worldTotalVisits += country['nb_visits']; + }); + _worldTotal = worldTotalVisits; + // sort countries by name + countryData.sort(function (a, b) { return a.name > b.name ? 1 : -1; }); + + // store country data globally + UserCountryMap.countryData = countryData; + UserCountryMap.countriesByIso = countriesByIso; + + function postCSSLoad() { + // map stylesheets are loaded + + // hide loading indicator + $$('.UserCountryMap .loadingPiwik').hide(); + $('.mapWidgetStatus').height(0); + + // start with default view (or saved state??) + var params = self.widget.dashboardWidget('getWidgetObject').parameters; + self.mode = params && params.viewMode ? params.viewMode : 'region'; + if (params && params.lastMetric) $$('.userCountryMapSelectMetrics').val(params.lastMetric); + // alert('updateState: '+params && params.lastMap ? params.lastMap : 'world'); + + // populate country select + var isoCodes = []; + $.each(countryData, function (i, country) { + if (!!country.iso) { + isoCodes.push(country.iso); + countrySelect.append(''); + } + }); + + if (!hasUserZoomed && isoCodes.length === 1 && isoCodes[0] && isoCodes[0] !== 'UNK') { + updateState(isoCodes[0]); + } else { + updateState(params && params.lastMap ? params.lastMap : 'world'); + } + + initUserInterface(); + + } + // check if CSS is already loaded + if (!$("link[href='" + config.mapCssPath + "']").length) { + // not loaded + map.loadCSS(config.mapCssPath, postCSSLoad); + } else { + // already loaded + postCSSLoad(); + } + }); + + function hideOverlay(e) { + var overlay = $('.content', $(e.target).parents('.UserCountryMap-overlay')); + if (overlay.data('locked')) return; + overlay.data('locked', true); + overlay.fadeOut(200); + + $$('.UserCountryMap').mouseleave(function () { + overlay.fadeIn(200); + $$('.UserCountryMap').parent().off('mouseleave'); + setTimeout(function () { + overlay.data('locked', false); + }, 1000); + }); + var offset = $$('.UserCountryMap').offset(), + dim = { + x: overlay.offset().left - offset.left, + y: overlay.offset().top - offset.top, + w: overlay.width(), + h: overlay.height() + }; + $$('.UserCountryMap').mousemove(function (e) { + var mx = e.pageX - offset.left, my = e.pageY - offset.top, pad = 20, + outside = mx < dim.x - pad || mx > dim.x + dim.w + pad || my < dim.y - pad || my > dim.y + dim.h + pad; + if (outside) { + $$('.UserCountryMap').parent().off('mouseleave'); + setTimeout(function () { + overlay.fadeIn(200); + setTimeout(function () { + overlay.data('locked', false); + }, 1000); + }, 100); + } + }); + /*setTimeout(function() { + overlay.fadeIn(1000); + }, 3000);*/ + } + + $('.UserCountryMap-overlay').off('mouseenter').on('mouseenter', hideOverlay); + $$('.widgetUserCountryMapIslandoravisitorMap .widgetName span').remove(); + $$('.widgetUserCountryMapIslandoravisitorMap .widgetName').append(''); + + // converts bounce rate quotients to numeric percents, eg, .12 => 12 + function convertBounceRatesToPercents(report) { + $.each(report.reportData, function (i, row) { + if (row['bounce_rate']) { + row['bounce_rate'] = parseFloat(row['bounce_rate']) * 100; + } + }); + } + }, + + /* + * resizes the map + */ + resize: function () { + var ratio, w, h, + map = this.map; + + ratio = map.viewAB.width / map.viewAB.height; + w = map.container.width(); + h = w / ratio; + + // special handling for widgetize mode + if (!this.theWidget && map.container.parents('.widget').length) { + var maxHeight = $(window).height() - ($('html').height() - map.container.height()); + h = Math.min(maxHeight, h); + } + + map.container.height(h - 2); + map.resize(w, h); + + if (w < 355) $('.UserCountryMapIslandora .tableIcon span').hide(); + else $('.UserCountryMapIslandora .tableIcon span').show(); + }, + + /* + * removes the map + */ + destroy: function () { + this.map.clear(); + $(this.map.container).html(''); + $(window).off('resize', this._onResizeLazy) + } + + }); + +}()); + +/* + * Some static data used both by VisitorMap and RealtimeMap + */ +$.extend(UserCountryMap, { + + // iso alpha-2 --> iso alpha-3 + ISO2toISO3: {"BD": "BGD", "BE": "BEL", "BF": "BFA", "BG": "BGR", "BA": "BIH", "BB": "BRB", "WF": "WLF", "BL": "BLM", "BM": "BMU", "BN": "BRN", "BO": "BOL", "BH": "BHR", "BI": "BDI", "BJ": "BEN", "BT": "BTN", "JM": "JAM", "BV": "BVT", "BW": "BWA", "WS": "WSM", "BQ": "BES", "BR": "BRA", "BS": "BHS", "JE": "JEY", "BY": "BLR", "BZ": "BLZ", "RU": "RUS", "RW": "RWA", "RS": "SRB", "TL": "TLS", "RE": "REU", "TM": "TKM", "TJ": "TJK", "RO": "ROU", "TK": "TKL", "GW": "GNB", "GU": "GUM", "GT": "GTM", "GS": "SGS", "GR": "GRC", "GQ": "GNQ", "GP": "GLP", "JP": "JPN", "GY": "GUY", "GG": "GGY", "GF": "GUF", "GE": "GEO", "GD": "GRD", "GB": "GBR", "GA": "GAB", "SV": "SLV", "GN": "GIN", "GM": "GMB", "GL": "GRL", "GI": "GIB", "GH": "GHA", "OM": "OMN", "TN": "TUN", "JO": "JOR", "HR": "HRV", "HT": "HTI", "HU": "HUN", "HK": "HKG", "HN": "HND", "HM": "HMD", "VE": "VEN", "PR": "PRI", "PS": "PSE", "PW": "PLW", "PT": "PRT", "SJ": "SJM", "PY": "PRY", "IQ": "IRQ", "PA": "PAN", "PF": "PYF", "PG": "PNG", "PE": "PER", "PK": "PAK", "PH": "PHL", "PN": "PCN", "PL": "POL", "PM": "SPM", "ZM": "ZMB", "EH": "ESH", "EE": "EST", "EG": "EGY", "ZA": "ZAF", "EC": "ECU", "IT": "ITA", "VN": "VNM", "SB": "SLB", "ET": "ETH", "SO": "SOM", "ZW": "ZWE", "SA": "SAU", "ES": "ESP", "ER": "ERI", "ME": "MNE", "MD": "MDA", "MG": "MDG", "MF": "MAF", "MA": "MAR", "MC": "MCO", "UZ": "UZB", "MM": "MMR", "ML": "MLI", "MO": "MAC", "MN": "MNG", "MH": "MHL", "MK": "MKD", "MU": "MUS", "MT": "MLT", "MW": "MWI", "MV": "MDV", "MQ": "MTQ", "MP": "MNP", "MS": "MSR", "MR": "MRT", "IM": "IMN", "UG": "UGA", "TZ": "TZA", "MY": "MYS", "MX": "MEX", "IL": "ISR", "FR": "FRA", "IO": "IOT", "SH": "SHN", "FI": "FIN", "FJ": "FJI", "FK": "FLK", "FM": "FSM", "FO": "FRO", "NI": "NIC", "NL": "NLD", "NO": "NOR", "NA": "NAM", "VU": "VUT", "NC": "NCL", "NE": "NER", "NF": "NFK", "NG": "NGA", "NZ": "NZL", "NP": "NPL", "NR": "NRU", "NU": "NIU", "CK": "COK", "XK": "XKX", "CI": "CIV", "CH": "CHE", "CO": "COL", "CN": "CHN", "CM": "CMR", "CL": "CHL", "CC": "CCK", "CA": "CAN", "CG": "COG", "CF": "CAF", "CD": "COD", "CZ": "CZE", "CY": "CYP", "CX": "CXR", "CS": "SCG", "CR": "CRI", "CW": "CUW", "CV": "CPV", "CU": "CUB", "SZ": "SWZ", "SY": "SYR", "SX": "SXM", "KG": "KGZ", "KE": "KEN", "SS": "SSD", "SR": "SUR", "KI": "KIR", "KH": "KHM", "KN": "KNA", "KM": "COM", "ST": "STP", "SK": "SVK", "KR": "KOR", "SI": "SVN", "KP": "PRK", "KW": "KWT", "SN": "SEN", "SM": "SMR", "SL": "SLE", "SC": "SYC", "KZ": "KAZ", "KY": "CYM", "SG": "SGP", "SE": "SWE", "SD": "SDN", "DO": "DOM", "DM": "DMA", "DJ": "DJI", "DK": "DNK", "VG": "VGB", "DE": "DEU", "YE": "YEM", "DZ": "DZA", "US": "USA", "UY": "URY", "YT": "MYT", "UM": "UMI", "LB": "LBN", "LC": "LCA", "LA": "LAO", "TV": "TUV", "TW": "TWN", "TT": "TTO", "TR": "TUR", "LK": "LKA", "LI": "LIE", "LV": "LVA", "TO": "TON", "LT": "LTU", "LU": "LUX", "LR": "LBR", "LS": "LSO", "TH": "THA", "TF": "ATF", "TG": "TGO", "TD": "TCD", "TC": "TCA", "LY": "LBY", "VA": "VAT", "VC": "VCT", "AE": "ARE", "AD": "AND", "AG": "ATG", "AF": "AFG", "AI": "AIA", "VI": "VIR", "IS": "ISL", "IR": "IRN", "AM": "ARM", "AL": "ALB", "AO": "AGO", "AN": "ANT", "AQ": "ATA", "AS": "ASM", "AR": "ARG", "AU": "AUS", "AT": "AUT", "AW": "ABW", "IN": "IND", "AX": "ALA", "AZ": "AZE", "IE": "IRL", "ID": "IDN", "UA": "UKR", "QA": "QAT", "MZ": "MOZ"}, + + // iso alpha-3 --> continent code + ISO3toCONT: {"AGO": "AF", "DZA": "AF", "EGY": "AF", "BGD": "AS", "NER": "AF", "LIE": "EU", "NAM": "AF", "BGR": "EU", "BOL": "SA", "GHA": "AF", "CCK": "AS", "PAK": "AS", "CPV": "AF", "JOR": "AS", "LBR": "AF", "LBY": "AF", "MYS": "AS", "DOM": "NA", "PRI": "NA", "SXM": "NA", "PRK": "AS", "PSE": "AS", "TZA": "AF", "BWA": "AF", "KHM": "AS", "UMI": "OC", "NIC": "NA", "TTO": "NA", "ETH": "AF", "PRY": "SA", "HKG": "AS", "SAU": "AS", "LBN": "AS", "SVN": "EU", "BFA": "AF", "CHE": "EU", "MRT": "AF", "HRV": "EU", "CHL": "SA", "CHN": "AS", "KNA": "NA", "SLE": "AF", "JAM": "NA", "SMR": "EU", "GIB": "EU", "DJI": "AF", "GIN": "AF", "FIN": "EU", "URY": "SA", "THA": "AS", "STP": "AF", "SYC": "AF", "NPL": "AS", "CXR": "AS", "LAO": "AS", "YEM": "AS", "BVT": "AN", "ZAF": "AF", "KIR": "OC", "PHL": "AS", "ROU": "EU", "VIR": "NA", "SYR": "AS", "MAC": "AS", "MAF": "NA", "MLT": "EU", "KAZ": "AS", "TCA": "NA", "PYF": "OC", "NIU": "OC", "DMA": "NA", "BEN": "AF", "GUF": "SA", "BEL": "EU", "MSR": "NA", "TGO": "AF", "DEU": "EU", "GUM": "OC", "LKA": "AS", "SSD": "AF", "FLK": "SA", "GBR": "EU", "BES": "NA", "GUY": "SA", "CRI": "NA", "CMR": "AF", "MAR": "AF", "MNP": "OC", "LSO": "AF", "HUN": "EU", "TKM": "AS", "SUR": "SA", "NLD": "EU", "BMU": "NA", "HMD": "AN", "TCD": "AF", "GEO": "AS", "MNE": "EU", "MNG": "AS", "MHL": "OC", "MTQ": "NA", "BLZ": "NA", "NFK": "OC", "MMR": "AS", "AFG": "AS", "BDI": "AF", "VGB": "NA", "BLR": "EU", "BLM": "NA", "GRD": "NA", "TKL": "OC", "GRC": "EU", "RUS": "EU", "GRL": "NA", "SHN": "AF", "AND": "EU", "MOZ": "AF", "TJK": "AS", "XKX": "EU", "HTI": "NA", "MEX": "NA", "ANT": "NA", "ZWE": "AF", "LCA": "NA", "IND": "AS", "LVA": "EU", "BTN": "AS", "VCT": "NA", "VNM": "AS", "NOR": "EU", "CZE": "EU", "ATF": "AN", "ATG": "NA", "FJI": "OC", "IOT": "AS", "HND": "NA", "MUS": "AF", "ATA": "AN", "LUX": "EU", "ISR": "AS", "FSM": "OC", "PER": "SA", "REU": "AF", "IDN": "AS", "VUT": "OC", "MKD": "EU", "COD": "AF", "COG": "AF", "ISL": "EU", "GLP": "NA", "COK": "OC", "COM": "AF", "COL": "SA", "NGA": "AF", "TLS": "OC", "TWN": "AS", "PRT": "EU", "MDA": "EU", "GGY": "EU", "MDG": "AF", "ECU": "SA", "SEN": "AF", "NZL": "OC", "MDV": "AS", "ASM": "OC", "SPM": "NA", "CUW": "NA", "FRA": "EU", "LTU": "EU", "RWA": "AF", "ZMB": "AF", "GMB": "AF", "WLF": "OC", "JEY": "EU", "FRO": "EU", "GTM": "NA", "DNK": "EU", "IMN": "EU", "AUS": "OC", "AUT": "EU", "SJM": "EU", "VEN": "SA", "PLW": "OC", "KEN": "AF", "MYT": "AF", "WSM": "OC", "TUR": "AS", "ALB": "EU", "OMN": "AS", "TUV": "OC", "ALA": "EU", "BRN": "AS", "TUN": "AF", "PCN": "OC", "BRB": "NA", "BRA": "SA", "CIV": "AF", "SRB": "EU", "GNQ": "AF", "USA": "NA", "QAT": "AS", "SWE": "EU", "AZE": "AS", "GNB": "AF", "SWZ": "AF", "TON": "OC", "CAN": "NA", "UKR": "EU", "KOR": "AS", "AIA": "NA", "CAF": "AF", "SVK": "EU", "CYP": "EU", "BIH": "EU", "SGP": "AS", "SGS": "AN", "SOM": "AF", "UZB": "AS", "ERI": "AF", "POL": "EU", "KWT": "AS", "SCG": "EU", "GAB": "AF", "CYM": "NA", "VAT": "EU", "EST": "EU", "MWI": "AF", "ESP": "EU", "IRQ": "AS", "SLV": "NA", "MLI": "AF", "IRL": "EU", "IRN": "AS", "ABW": "NA", "PNG": "OC", "PAN": "NA", "SDN": "AF", "SLB": "OC", "ESH": "AF", "MCO": "EU", "ITA": "EU", "JPN": "AS", "KGZ": "AS", "UGA": "AF", "NCL": "OC", "ARE": "AS", "ARG": "SA", "BHS": "NA", "BHR": "AS", "ARM": "AS", "NRU": "OC", "CUB": "NA"}, + + // special region aggregation for some countries + aggregate: { + GBR: { + groups: { + "East Midlands": ["H5", "D2", "D3", "H7", "J1", "H4", "L4", "J8", "J9"], + "West Midlands": ["", "O2", "P3", "F7", "Q4", "N1", "N4", "L6"], + "South West": ["E6", "A4", "B7", "J4", "M6", "M3", "D4", "B2", "D6", "K5", "C6", "K4", "O4", "N9", "P8"], + "North East": ["", "D1", "D8", "F5", "I5", "K9", "N3", "J6"], + "Scotland": ["U4", "U5", "U7", "V2", "V4", "U5", "V8", "W2", "W4", "W5", "W7", "T5", "T6", "U9", "V9", "W6", "U1", "W1", "T7", "U3", "V1", "U6", "U8", "V5", "W9", "T9", "U2", "U9", "V3", "T8", "W8"], + "South East": ["F2", "M4", "I6", "B9", "", "B6", "E2", "I3", "P6", "K2", "N7", "G2", "K6", "G5"], + "North West": ["", "E9", "C5", "A8", "H2", "C9", "P2", "I2"], + "Yorkshire and the Humber": ["G6", "J2", "J3", "Q5", "E1", "J7", "", ""], + "Northern Ireland": ["R3", "S6", "T3", "Q8", "S9", "R2", "R8", "S1", "S5", "R7", "Q6", "S7", "Q9", "S3", "R4", "T1", "T2", "R9", "R6", "R1", "S4", "R5", "T4", "S2", "Q7", "S8"], + "London": ["H9", "A1", "A6", "B5", "B8", "C4", "C8", "D9", "E3", "E7", "F1", "G1", "G3", "G4", "I4", "K8", "L1", "N8", "O5", "O9", "P1", "P5", "F6", "F9", "G7", "E8", "F3", "F4", "H1", "H6", "I8", "M8"], + "East": ["M5", "A5", "F8", "C3", "E4", "N5", "I9", "O3", "I1", "K3"], + "Wales": ["X7", "X6", "Y7", "Y8", "X3", "X4", "Y3", "Y9", "X5", "Z3", "Y5", "Z1", "X9", "Y1", "Z4", "X1", "X8", "Y2", "X2", "Y4", "Y6", "Z2"] + } + }, + SVN: { + groups: { + "PS": ["08", "54", "B6"], + "NO": ["I7", "00", "13", "38", "91", "94"], + "KO": ["E6", "93", "A4", "00", "A5", "16", "25", "74", "76", "81", "A2", "C2"], + "SP": ["14", "36", "D2", "01", "06", "07", "44", "46", "J5", "E1", "84", "00"], + "LJ": ["D4", "E3", "E5", "G4", "G7", "H6", "00", "00", "00", "00", "05", "09", "22", "32", "37", "39", "I5", "61", "64", "68", "71", "72", "77", "C1"], + "JP": ["19", "35", "40", "49", "50", "J9", "B7"], + "JS": ["00", "J7", "L1", "00", "00", "00", "00", "00", "00", "17", "66", "73", "B1", "B4", "B8", "D4"], + "PD": ["42", "28", "42", "87", "E9", "00", "00", "00", "18", "I3", "J1", "K7", "L3", "L8", "N2", "00", "00", "00", "00", "00", "00", "00", "00", "00", "70", "00", "00", "26", "45", "55", "89", "98", "B3", "C8"], + "GO": ["03", "04", "32", "52", "53", "62", "A3", "B9", "D5", "F1", "F2", "K5", "00", "H4", "00", "12", "B2"], + "SA": ["D7", "E2", "F3", "I9", "92", "L7", "N3", "N5", "00", "00", "00", "00", "00", "00", "00", "00", "00", "", "11", "30", "08", "57", "62", "79", "83", "99", "A7", "A8", "C4", "C5", "C6", "C7", "C9"], + "ZS": ["E7", "34", "C9", "C9"], + "PM": ["02", "47", "78", "80", "86", "D1", "D6", "33", "I2", "00", "00", "15", "59", "I6", "00", "00", "00", "00", "00", "10", "29", "97", "97", "A1", "A6"] + } + }, + FRA: { + partial: true, + groups: { + "A5": ["A5", "B5"] + } + }, + POL: { + partial: true, + groups: { + "82": ["82", "60"], + "85": ["85", "47", "H9"] + } + }, + CZE: { + partial: true, + groups: { + "82": ["82", "70", "23", "20"], + "88": ["88", "41"] + } + }, + BEL: { + partial: true, + groups: { + "12": ["12", "02"] + } + }, + DNK: { + partial: true, + groups: { + "19": ["19", "07"], + "18": ["18", "15"], + "20": ["20", "12"], + "21": ["21", "11", "04"] + } + } + }, + + // which key should be used, defaults to fips + keys: { + "SVN": "region", + "GBR": "region", + "ESP": "fips-", + "USA": "p", "CAN": "p" + }, + + // custom country label positions [lon, lat] + customLabelPositions: { + CZE: { DEU: [12.3, 49] }, + DEU: { AUT: [13.9, 48.1] }, + ESP: { PRT: [-8.5, 39.6] }, + NLD: { BEL: [4.6, 51, 1], DEU: [6.9, 51.5] }, + CHE: { FRA: [6.2, 47.2], AUT: [9.95, 47.2], ITA: [9.7, 46.0], DEU: [8.14, 47.83] }, + USA: { MEX: [-102, 24], CAN: [-97, 52] }, + BIH: { HRV: [15.3, 45] } + }, + + // countries where FIPS differs from 2-letter ISO code + differentFIPS: { + AD: 'AN', AG: 'AC', AI: 'AV', AQ: 'AY', AS: 'AQ', AT: 'AU', AU: 'AS', AW: 'AA', + AZ: 'AJ', BA: 'BK', BD: 'BG', BF: 'UV', BG: 'BU', BH: 'BA', BI: 'BY', BJ: 'BN', + BL: 'TB', BM: 'BD', BN: 'BX', BO: 'BL', BS: 'BF', BW: 'BC', BY: 'BO', BZ: 'BH', + CC: 'CK', CD: 'CG', CF: 'CT', CG: 'CF', CH: 'SZ', CI: 'IV', CK: 'CW', CL: 'CI', + CN: 'CH', CR: 'CS', CW: 'UC', CX: 'KT', CZ: 'EZ', DE: 'GM', DK: 'DA', DM: 'DO', + DO: 'DR', DZ: 'AG', EE: 'EN', EH: 'WI', ES: 'SP', GA: 'GB', GB: 'UK', GD: 'GJ', + GE: 'GG', GF: 'FG', GG: 'GK', GM: 'GA', GN: 'GV', GQ: 'EK', GS: 'SX', GU: 'GQ', + GW: 'PU', HN: 'HO', HT: 'HA', IE: 'EI', IL: 'IS', IQ: 'IZ', IS: 'IC', JP: 'JA', + KH: 'CB', KI: 'KR', KM: 'CN', KN: 'SC', KP: 'KN', KR: 'KS', XK: 'KV', KW: 'KU', + KY: 'CJ', LB: 'LE', LC: 'ST', LI: 'LS', LK: 'CE', LR: 'LI', LS: 'LT', LT: 'LH', + LV: 'LG', MA: 'MO', MC: 'MN', ME: 'MJ', MF: 'RN', MG: 'MA', MH: 'RM', MM: 'BM', + MN: 'MG', MO: 'MC', MP: 'CQ', MQ: 'MB', MS: 'MH', MU: 'MP', MW: 'MI', NA: 'WA', + NE: 'NG', NG: 'NI', NI: 'NU', NU: 'NE', OM: 'MU', PA: 'PM', PF: 'FP', PG: 'PP', + PH: 'RP', PM: 'SB', PN: 'PC', PR: 'RQ', PS: 'WE', PT: 'PO', PW: 'PS', PY: 'PA', + RS: 'RI', RU: 'RS', SB: 'BP', SC: 'SE', SD: 'SU', SS: 'OD', SE: 'SW', SG: 'SN', + SJ: 'SV', SK: 'LO', SN: 'SG', SR: 'NS', ST: 'TP', SV: 'ES', SX: 'NN', SZ: 'WZ', + TC: 'TK', TD: 'CD', TF: 'FS', TG: 'TO', TJ: 'TI', TK: 'TL', TL: 'TT', TM: 'TX', + TN: 'TS', TO: 'TN', TR: 'TU', TT: 'TD', UA: 'UP', VA: 'VT', VG: 'VI', VI: 'VQ', + VN: 'VM', VU: 'NH', YE: 'YM', YT: 'MF', ZA: 'SF', ZM: 'ZA', ZW: 'ZI', CS: 'YI', + AN: 'NT' + }, + + // mapping from Piwik continents to continents used in this widget + cont2cont: { + afr: 'AF', eur: 'EU', amn: 'NA', ams: 'SA', asi: 'AS', oce: 'OC', amc: 'SA' + } + +}); + diff --git a/lang/ar.json b/lang/ar.json new file mode 100644 index 0000000..b9b4de2 --- /dev/null +++ b/lang/ar.json @@ -0,0 +1,5 @@ +{ + "UserCountryMapIslandora": { + "map": "خريطة" + } +} \ No newline at end of file diff --git a/lang/be.json b/lang/be.json new file mode 100644 index 0000000..fcadccd --- /dev/null +++ b/lang/be.json @@ -0,0 +1,5 @@ +{ + "UserCountryMapIslandora": { + "map": "карта" + } +} \ No newline at end of file diff --git a/lang/bg.json b/lang/bg.json new file mode 100644 index 0000000..c0500cc --- /dev/null +++ b/lang/bg.json @@ -0,0 +1,22 @@ +{ + "UserCountryMapIslandora": { + "AndNOthers": "и %s други", + "Cities": "Градове", + "Countries": "Държави", + "DaysAgo": "преди %s дни", + "GoalConversions": "%s достигнати цели", + "HoursAgo": "преди %s часа", + "map": "карта", + "MinutesAgo": "преди %s минути", + "None": "Няма", + "NoVisit": "Няма посещения", + "RealTimeMap": "Карта на посетителите в реално време", + "Regions": "Региони", + "Searches": "%s търсения", + "SecondsAgo": "преди %s секунди", + "ShowingVisits": "Последни посещения базирани на географско местоположение", + "Unlocated": "%s<\/b> %p посещения от %c вашето местоположение не може да бъде открито.", + "VisitorMap": "Карта на посетителите", + "WorldWide": "По целия свят" + } +} \ No newline at end of file diff --git a/lang/bn.json b/lang/bn.json new file mode 100644 index 0000000..730e84e --- /dev/null +++ b/lang/bn.json @@ -0,0 +1,5 @@ +{ + "UserCountryMapIslandora": { + "None": "কিছুই না" + } +} \ No newline at end of file diff --git a/lang/ca.json b/lang/ca.json new file mode 100644 index 0000000..e58c532 --- /dev/null +++ b/lang/ca.json @@ -0,0 +1,6 @@ +{ + "UserCountryMapIslandora": { + "map": "mapa", + "ShowingVisits": "Visites geolocalitzades des de l'última vegada" + } +} \ No newline at end of file diff --git a/lang/cs.json b/lang/cs.json new file mode 100644 index 0000000..97e9264 --- /dev/null +++ b/lang/cs.json @@ -0,0 +1,25 @@ +{ + "UserCountryMapIslandora": { + "PluginDescription": "Tento modul poskytuje widgety Mapa návštěvníků a Real-time Mapa. Poznámka: Vyžaduje povolený UserCountry plugin.", + "AndNOthers": "a %s dalších", + "Cities": "Města", + "Countries": "Země", + "DaysAgo": "před %s dny", + "GoalConversions": "%s konverzí cíle", + "HoursAgo": "před %s hodinami", + "map": "mapa", + "MinutesAgo": "před %s minutami", + "None": "Žádní", + "NoVisit": "Žádná návštěva", + "RealTimeMap": "Mapa v reálném čase", + "Regions": "Regiony", + "Searches": "%s vyhledávání", + "SecondsAgo": "před %s sekundami", + "ShowingVisits": "Geolokované návštěvy posledních", + "Unlocated": "%s<\/b> %p z návštěv z %c nebylo možné geolokovat.", + "VisitorMap": "Mapa návštěvníků", + "WorldWide": "Celosvětová", + "WithUnknownRegion": "%s s neznámým regionem", + "WithUnknownCity": "%s s neznámým městem" + } +} \ No newline at end of file diff --git a/lang/da.json b/lang/da.json new file mode 100644 index 0000000..7e017dd --- /dev/null +++ b/lang/da.json @@ -0,0 +1,25 @@ +{ + "UserCountryMapIslandora": { + "PluginDescription": "Denne udvidelse leverer de to widgets Besøgerkort og Realtidskort. Bemærk: Kræver at BrugerLand-udvidelsen er aktiveret.", + "AndNOthers": "og %s andre", + "Cities": "Byer", + "Countries": "Lande", + "DaysAgo": "%s dage siden", + "GoalConversions": "%s målkonverteringer", + "HoursAgo": "%s timer siden", + "map": "kort", + "MinutesAgo": "%s minutter siden", + "None": "Ingen", + "NoVisit": "Ingen besøg", + "RealTimeMap": "Realtidskort", + "Regions": "Regioner", + "Searches": "%s søgninger", + "SecondsAgo": "%s sekunder siden", + "ShowingVisits": "Geografisk placeret besøg af sidste", + "Unlocated": "%s<\/b> besøg %p fra %c kunne ikke placeres geografisk.", + "VisitorMap": "Besøgerkort", + "WorldWide": "Hele verden", + "WithUnknownRegion": "%s med ukendt region", + "WithUnknownCity": "%s med ukendt by" + } +} \ No newline at end of file diff --git a/lang/de.json b/lang/de.json new file mode 100644 index 0000000..2aed99a --- /dev/null +++ b/lang/de.json @@ -0,0 +1,27 @@ +{ + "UserCountryMapIslandora": { + "PluginDescription": "Dieses Plugin stellt die Widgets \"Besucherkarte\" sowie \"Besucherkarte in Echtzeit\" bereit. Hinweis: Hierfür muss das Plugin \"UserCountry\" aktiviert sein.", + "AndNOthers": "und %s andere", + "Cities": "Städte", + "Countries": "Länder", + "DaysAgo": "vor %s Tagen", + "GoalConversions": "%s Ziel-Konversionen", + "HoursAgo": "vor %s Stunden", + "map": "Karte", + "MinutesAgo": "vor %s Minuten", + "None": "Keine", + "NoVisit": "Keine Besuche", + "RealTimeMap": "Besucherkarte in Echtzeit", + "Regions": "Regionen", + "Searches": "%s Suchen", + "SecondsAgo": "vor %s Sekunden", + "ShowingVisits": "Lokalisierte Besuche der letzten", + "Unlocated": "%s<\/b> %p der Besuche von %c konnten nicht lokalisiert werden.", + "VisitorMap": "Besucherkarte", + "WorldWide": "Weltweit", + "WithUnknownRegion": "%s mit unbekannter Region", + "WithUnknownCity": "%s mit unbekannter Stadt", + "NoVisitsInfo": "Es werden aktuell keine Besuche angezeigt, weil für diesen Zeitraum kein Besuch mit korrekten Geolocation Informationen (Längengrad & Breitengrad) existiert.", + "NoVisitsInfo2": "Um das Problem zu lösen, stellen Sie sicher, dass Sie einen GeoIP Geolocation Provider mit einer GeoIP Stadt Datenbank verwenden. Wenn dies Ihr Problem nicht löst, dann ist es möglich (wenn auch unwahrscheinlich) dass Ihre Besuche IP Adressen haben, die nicht geolokalisiert werden können." + } +} \ No newline at end of file diff --git a/lang/el.json b/lang/el.json new file mode 100644 index 0000000..3f4d6fe --- /dev/null +++ b/lang/el.json @@ -0,0 +1,27 @@ +{ + "UserCountryMapIslandora": { + "PluginDescription": "Το πρόσθετο αυτό παρέχει το γραφικό συστατικό Χάρτης Επισκεπτών και τον Χάρτη Σε Πραγματικό Χρόνο. Σημείωση: Απαιτεί να είναι ενεργοποιημένο το πρόσθετο UserCountry.", + "AndNOthers": "και %s άλλοι", + "Cities": "Πόλεις", + "Countries": "Χώρες", + "DaysAgo": "πριν %s ημέρες", + "GoalConversions": "%s μετατροπές στόχων", + "HoursAgo": "πριν %s ώρες", + "map": "χάρτης", + "MinutesAgo": "πριν %s λεπτά", + "None": "Κανένα", + "NoVisit": "Δεν υπάρχουν επισκέψεις", + "RealTimeMap": "Χάρτης σε πραγματικό χρόνο", + "Regions": "Περιοχές", + "Searches": "%s αναζητήσεις", + "SecondsAgo": "πριν %s δευτερόλεπτα", + "ShowingVisits": "Επισκέψεις με γεωτοποθεσία στα τελευταία", + "Unlocated": "%s<\/b> %p από τις επισκέψεις από %c δεν ήταν δυνατόν να χαρακτηριστούν με γεωτοποθεσία.", + "VisitorMap": "Χάρτης Επισκεπτών", + "WorldWide": "Παγκοσμίως", + "WithUnknownRegion": "%s με άγνωστη περιοχή", + "WithUnknownCity": "%s με άγνωστη πόλη", + "NoVisitsInfo": "Δεν εμφανίζονται αυτή τη στιγμή επισκέψεις, διότι δεν υπήρξε επίσκεψη για αυτήν την περίοδο με σωστή πληροφορία γεωτοποθεσίας (πλάτος και μήκος).", + "NoVisitsInfo2": "Για να λυθεί το ζήτημα, βεβαιωθείτε ότι χρησιμοποιείτε ένα πάροχο γεωτοποθεσίας με βάση δεδομένων πόλεων. Αν αυτό δεν λύσει το θέμα σας, τότε υπάρχει περίπτωση (όμως όχι τόσο πιθανό) ότι έχετε επισκέψεις με διευθύνσεις IP που δεν επιλύονται στην γεωτοποθεσία τους." + } +} \ No newline at end of file diff --git a/lang/en.json b/lang/en.json new file mode 100644 index 0000000..8a57b1e --- /dev/null +++ b/lang/en.json @@ -0,0 +1,27 @@ +{ + "UserCountryMapIslandora": { + "PluginDescription": "This plugin provides the widgets Visitor Map and Real-time Map. Note: Requires the UserCountry plugin enabled.", + "AndNOthers": "and %s others", + "Cities": "Cities", + "Countries": "Countries", + "DaysAgo": "%s days ago", + "GoalConversions": "%s goal conversions", + "HoursAgo": "%s hours ago", + "map": "map", + "MinutesAgo": "%s minutes ago", + "None": "None", + "NoVisit": "No visit", + "RealTimeMap": "Real-time Map", + "Regions": "Regions", + "Searches": "%s searches", + "SecondsAgo": "%s seconds ago", + "ShowingVisits": "Geo-located visits of last", + "Unlocated": "%s<\/b> %p of the visits from %c couldn't be geo located.", + "VisitorMap": "Visitor Map", + "WorldWide": "World-Wide", + "WithUnknownRegion": "%s with unknown region", + "WithUnknownCity": "%s with unknown city", + "NoVisitsInfo": "There are no visits displayed currently, because no visit for this period has the correct geolocation information (latitude & longitude).", + "NoVisitsInfo2": "To resolve this issue, make sure you are using a GeoIP geolocation provider with a GeoIP city database. If this does not resolve your issue, then it is possible (though unlikely) that your visits have IP addresses that just cannot be geolocated." + } +} \ No newline at end of file diff --git a/lang/es-ar.json b/lang/es-ar.json new file mode 100644 index 0000000..ed32736 --- /dev/null +++ b/lang/es-ar.json @@ -0,0 +1,22 @@ +{ + "UserCountryMapIslandora": { + "AndNOthers": "y %s otros", + "Cities": "Ciudades", + "Countries": "Países", + "DaysAgo": "Hace %s días", + "GoalConversions": "%s conversiones de objetivo", + "HoursAgo": "Hace %s horas", + "map": "mapa", + "MinutesAgo": "Hace %s minutos", + "None": "Ninguno", + "NoVisit": "Ninguna visita", + "RealTimeMap": "Mapa en Tiempo Real", + "Regions": "Regiones", + "Searches": "%s búsquedas", + "SecondsAgo": "Hace %s segundos", + "ShowingVisits": "Geo-ubicadas últimas visitas", + "Unlocated": "%s<\/b> %p de las visitas desde %c no pudieron ser geo ubicadas.", + "VisitorMap": "Mapa de Visitantes", + "WorldWide": "Mundial" + } +} \ No newline at end of file diff --git a/lang/es.json b/lang/es.json new file mode 100644 index 0000000..02a989a --- /dev/null +++ b/lang/es.json @@ -0,0 +1,27 @@ +{ + "UserCountryMapIslandora": { + "PluginDescription": "Este complemento suministra los módulos Mapa de visitante y Mapa en tiempo real. Nota: Requiere el complemento UserCountry habilitado.", + "AndNOthers": "y %s otros", + "Cities": "Ciudades", + "Countries": "Países", + "DaysAgo": "%s días atrás", + "GoalConversions": "%s conversiones de objetivo", + "HoursAgo": "%s horas atrás", + "map": "mapa", + "MinutesAgo": "Hace %s minutos", + "None": "Ninguno", + "NoVisit": "Sin visitas", + "RealTimeMap": "Mapa en Tiempo real", + "Regions": "Regiones", + "Searches": "%s búsquedas", + "SecondsAgo": "Hace %s segundos", + "ShowingVisits": "Visitas geolocalizadas desde la última vez", + "Unlocated": "%s<\/b> %p de las visitas desde %c no pudieron ser geolocalizadas.", + "VisitorMap": "Mapa de visitantes", + "WorldWide": "Global", + "WithUnknownRegion": "%s con región desconocida", + "WithUnknownCity": "%s con ciudad desconocida", + "NoVisitsInfo": "No hay visitas mostradas actualmente, porque ninguna visita para este período tiene la información de geolocalización correcta (latitud y longitud).", + "NoVisitsInfo2": "Para resolver este problema, asegúrese de que está utilizando un proveedor de geolocalización GeoIP con una base de datos de la ciudad GeoIP. Si esto no resuelve su problema, entonces es posible (aunque improbable) que sus visitas tengan direcciones IP que simplemente no se puedan geolocalizar." + } +} \ No newline at end of file diff --git a/lang/et.json b/lang/et.json new file mode 100644 index 0000000..44f0bf0 --- /dev/null +++ b/lang/et.json @@ -0,0 +1,21 @@ +{ + "UserCountryMapIslandora": { + "AndNOthers": "ja %s muud", + "Cities": "Linnad", + "Countries": "Riigid", + "DaysAgo": "%s päeva tagasi", + "GoalConversions": "%s tulutoovaid eesmärke", + "HoursAgo": "%s tundi tagasi", + "map": "kaart", + "MinutesAgo": "%s minutit tagasi", + "None": "Mitte ükski", + "NoVisit": "Külastused puuduvad", + "RealTimeMap": "Reaalaja kaart", + "Regions": "Regioonid", + "Searches": "%s otsingut", + "SecondsAgo": "%s sekundit tagasi", + "ShowingVisits": "Tuvastatud asukohaga külastused viimase", + "VisitorMap": "Külastuste kaart", + "WorldWide": "Globaalne" + } +} \ No newline at end of file diff --git a/lang/fa.json b/lang/fa.json new file mode 100644 index 0000000..b76142e --- /dev/null +++ b/lang/fa.json @@ -0,0 +1,21 @@ +{ + "UserCountryMapIslandora": { + "AndNOthers": "و%s سایر", + "Cities": "شهرها", + "Countries": "کشورها", + "DaysAgo": "%s روز پیش", + "GoalConversions": "%s تبدیل هدف", + "HoursAgo": "%s ساعت پیش", + "map": "نقشه", + "MinutesAgo": "%s دقیقه پیش", + "None": "هیچ", + "NoVisit": "بدون بازدید", + "RealTimeMap": "نقشه در همین لحظه", + "Regions": "منطقه ها", + "Searches": "%sجستجو", + "SecondsAgo": "%s ثانیه پیش", + "ShowingVisits": "مکان اخرین بازدید کنندگان", + "VisitorMap": "نقشه بازدیدکننده", + "WorldWide": "سراسر جهان" + } +} \ No newline at end of file diff --git a/lang/fi.json b/lang/fi.json new file mode 100644 index 0000000..9bda533 --- /dev/null +++ b/lang/fi.json @@ -0,0 +1,25 @@ +{ + "UserCountryMapIslandora": { + "PluginDescription": "Tämä lisäosa tarjoaa käyttäjäkartan ja reaaliaikakartan. Huom: \"UserCountry\"-liitännäisen tulee olla päällä.", + "AndNOthers": "ja %s muuta", + "Cities": "Kaupungit", + "Countries": "Maat", + "DaysAgo": "%s päivää sitten", + "GoalConversions": "%s tavoitekonversiot", + "HoursAgo": "%s tuntia sitten", + "map": "kartta", + "MinutesAgo": "%s minuuttia sitten", + "None": "Ei mitään", + "NoVisit": "Ei käyntejä", + "RealTimeMap": "Reaaliaikainen kartta", + "Regions": "Alueet", + "Searches": "%s hakua", + "SecondsAgo": "%s sekuntia sitten", + "ShowingVisits": "Geopaikannetut käynnit viimeiset", + "Unlocated": "%s<\/b> %p käynneistä %c:sta ei voitu geopaikantaa.", + "VisitorMap": "Kartta kävijöistä", + "WorldWide": "Maailmanlaajuinen", + "WithUnknownRegion": "%s tuntemattomalta alueelta", + "WithUnknownCity": "%s tuntemattomista kaupungeista" + } +} \ No newline at end of file diff --git a/lang/fr.json b/lang/fr.json new file mode 100644 index 0000000..289bfd8 --- /dev/null +++ b/lang/fr.json @@ -0,0 +1,27 @@ +{ + "UserCountryMapIslandora": { + "PluginDescription": "Ce composant fournit les gadgets Carte du Visiteur et Carte en temps réel. Note : requiert que le composant Pays du Visiteur soit activé.", + "AndNOthers": "et %s autres", + "Cities": "Villes", + "Countries": "Pays", + "DaysAgo": "%s jours", + "GoalConversions": "%s conversions d'objectifs", + "HoursAgo": "%s heures", + "map": "carte", + "MinutesAgo": "%s minutes", + "None": "aucun", + "NoVisit": "Aucune visite", + "RealTimeMap": "Carte en temps-réel", + "Regions": "Régions", + "Searches": "%s recherches", + "SecondsAgo": "%s secondes", + "ShowingVisits": "Dernières visites géo-localisées", + "Unlocated": "%s<\/b> %p des dernières visites de %c n'ont pas pu être géo-localisées.", + "VisitorMap": "Carte des visiteurs", + "WorldWide": "Mondialement", + "WithUnknownRegion": "%s avec une région inconnue", + "WithUnknownCity": "%s avec une ville inconnue", + "NoVisitsInfo": "Il n'y a aucune visite affichée en ce moment car aucune visite pour cette période n'a les bonnes informations de géolocalisation (latitude & longitude).", + "NoVisitsInfo2": "Afin de résoudre ce problème, assurez-vous que vous utilisez un fournisseur de géolocalisation GeoIP avec une base de donnée GeoIP City. Si cela ne résout pas votre problème, il est possible (mais improbable) que vos visites ont des adresses IP qui ne peuvent pas être géolocalisées." + } +} \ No newline at end of file diff --git a/lang/he.json b/lang/he.json new file mode 100644 index 0000000..2dc9981 --- /dev/null +++ b/lang/he.json @@ -0,0 +1,10 @@ +{ + "UserCountryMapIslandora": { + "Cities": "ערים", + "Countries": "מדינות", + "map": "מפה", + "MinutesAgo": "לפני %s דקות", + "VisitorMap": "מפת מבקרים", + "WorldWide": "כלל-עולמי" + } +} \ No newline at end of file diff --git a/lang/hi.json b/lang/hi.json new file mode 100644 index 0000000..85ae98b --- /dev/null +++ b/lang/hi.json @@ -0,0 +1,23 @@ +{ + "UserCountryMapIslandora": { + "PluginDescription": "इस प्लगइन विगेट्स आगंतुक मानचित्र और वास्तविक समय का नक्शा प्रदान करता है। नोट: सक्षम UserCountry प्लगइन की आवश्यकता है।", + "AndNOthers": "और %s दूसरों के", + "Cities": "शहरों", + "Countries": "देश", + "DaysAgo": "%s दिन पहले", + "GoalConversions": "%s लक्ष्य रूपांतरण", + "HoursAgo": "%s घंटे पहले", + "map": "नक्शा", + "MinutesAgo": "%s मिनट पहले", + "None": "कोई नहीं", + "NoVisit": "कोई यात्रा", + "RealTimeMap": "वास्तविक समय नक्शा", + "Regions": "क्षेत्र", + "Searches": "%s खोजों", + "SecondsAgo": "%s सेकंड पहले", + "ShowingVisits": "आखिरी का भू स्थित दौरा", + "Unlocated": "%s<\/b> %p से यात्राओं की %c भौगोलिक स्थित खोजा नहीं जा सकता है.", + "VisitorMap": "आगंतुक मानचित्र", + "WorldWide": "विश्व व्यापक" + } +} \ No newline at end of file diff --git a/lang/hr.json b/lang/hr.json new file mode 100644 index 0000000..552db23 --- /dev/null +++ b/lang/hr.json @@ -0,0 +1,5 @@ +{ + "UserCountryMapIslandora": { + "VisitorMap": "Mapa posjetitelja" + } +} \ No newline at end of file diff --git a/lang/hu.json b/lang/hu.json new file mode 100644 index 0000000..923d186 --- /dev/null +++ b/lang/hu.json @@ -0,0 +1,5 @@ +{ + "UserCountryMapIslandora": { + "map": "térkép" + } +} \ No newline at end of file diff --git a/lang/id.json b/lang/id.json new file mode 100644 index 0000000..5df2af1 --- /dev/null +++ b/lang/id.json @@ -0,0 +1,25 @@ +{ + "UserCountryMapIslandora": { + "PluginDescription": "Pengaya ini menyediakan gawit Peta Pengunjung dan Peta Waktu-Nyata. Catatan: Membutuhkan pengaya NegaraPengguna diaktifkan.", + "AndNOthers": "dan %s lain", + "Cities": "Kita", + "Countries": "Negara", + "DaysAgo": "%s hari lalu", + "GoalConversions": "%s konversi tujuan", + "HoursAgo": "%s jam lalu", + "map": "peta", + "MinutesAgo": "%s menit lalu", + "None": "Tidak Ada", + "NoVisit": "Tidak ada kunjungan", + "RealTimeMap": "Peta Waktu-Nyata", + "Regions": "Wilayah", + "Searches": "%s pencarian", + "SecondsAgo": "%s detik lalu", + "ShowingVisits": "Kunjungan Lokasi-Geo terakhir", + "Unlocated": "%s<\/b> %p kunjungan dari %c lokasi-geo tidak diketahui.", + "VisitorMap": "Peta Pengunjung", + "WorldWide": "Seluruh Dunia", + "WithUnknownRegion": "%s dengan wilayah tidak dikenal", + "WithUnknownCity": "%s dengan kota tidak dikenal" + } +} \ No newline at end of file diff --git a/lang/it.json b/lang/it.json new file mode 100644 index 0000000..65ece6b --- /dev/null +++ b/lang/it.json @@ -0,0 +1,27 @@ +{ + "UserCountryMapIslandora": { + "PluginDescription": "Questo plugin fornisce i widget Mappa Visitatori e Mappa in Tempo Reale. Richiede che sia abilitato il plugin UserCountry.", + "AndNOthers": "e %s altri", + "Cities": "Città", + "Countries": "Nazioni", + "DaysAgo": "%s giorni fa", + "GoalConversions": "%s conversioni obiettivi", + "HoursAgo": "%s ore fa", + "map": "mappa", + "MinutesAgo": "%s minuti fa", + "None": "Nessuno", + "NoVisit": "Nessuna visita", + "RealTimeMap": "Mappa Real Time", + "Regions": "Regioni", + "Searches": "%s ricerche", + "SecondsAgo": "%s secondi fa", + "ShowingVisits": "Visite geolocalizzate degli ultimi", + "Unlocated": "%s<\/b> %p delle visite da %c non possono essere geolocalizzate.", + "VisitorMap": "Mappa Visitatori", + "WorldWide": "Tutto il Mondo", + "WithUnknownRegion": "%s con regione sconosciuta", + "WithUnknownCity": "%s con città sconosciuta", + "NoVisitsInfo": "Al momento non vengono mostrate visite, poiché in questo periodo non ci sono visite con le corrette informazioni di geo-localizzazione (latitudine\/longitudine)", + "NoVisitsInfo2": "Per risolvere questo problema, assicurati di utilizzare un provider di geo-localizzazione GeoIP con un database di città GeoIP. Se ciò non risolve il tuo problema, è possibile (anche se improbabile) che le tue visite abbiano degli indirizzi IP che proprio non possono essere geo-localizzati." + } +} \ No newline at end of file diff --git a/lang/ja.json b/lang/ja.json new file mode 100644 index 0000000..576637d --- /dev/null +++ b/lang/ja.json @@ -0,0 +1,27 @@ +{ + "UserCountryMapIslandora": { + "PluginDescription": "このプラグインでは、ビジターマップとリアルタイムマップウィジェットを提供します。注:利用可能なユーザーカントリープラグインが必要。", + "AndNOthers": "と、%s ほか", + "Cities": "都市", + "Countries": "国", + "DaysAgo": "%s 日前", + "GoalConversions": "%s 目標コンバージョン", + "HoursAgo": "%s 時間前", + "map": "地図", + "MinutesAgo": "%s 分前", + "None": "なし", + "NoVisit": "訪問なし", + "RealTimeMap": "リアルタイムマップ", + "Regions": "地域", + "Searches": "%s 検索", + "SecondsAgo": "%s 秒前", + "ShowingVisits": "位置情報が探索された最後の訪問", + "Unlocated": "%c からの訪問の %s <\/b> %p は、位置情報が特定できませんでした。", + "VisitorMap": "ビジターマップ", + "WorldWide": "世界規模", + "WithUnknownRegion": "未知の地域と %s", + "WithUnknownCity": "未知の都市と %s", + "NoVisitsInfo": "この期間のビジットには、正しい地理情報(緯度と経度)がないため、現在表示されているビジットはありません。", + "NoVisitsInfo2": "この問題を解決するには、GeoIP ジオロケーションプロバイダを GeoIP の都市データベースで使用していることを確認してください。 これで問題が解決しない場合、このビジットには地理的に配置できない IP アドレスが含まれている可能性(通常ではありえませんが)があります。" + } +} \ No newline at end of file diff --git a/lang/ka.json b/lang/ka.json new file mode 100644 index 0000000..1d9a882 --- /dev/null +++ b/lang/ka.json @@ -0,0 +1,5 @@ +{ + "UserCountryMapIslandora": { + "map": "რუკა" + } +} \ No newline at end of file diff --git a/lang/ko.json b/lang/ko.json new file mode 100644 index 0000000..d499013 --- /dev/null +++ b/lang/ko.json @@ -0,0 +1,25 @@ +{ + "UserCountryMapIslandora": { + "PluginDescription": "이 플러그인은 방문자 지도 및 실시간 지도 위젯을 제공합니다. 주의: UserCountry 플러그인이 활성화 되어 있어야 합니다.", + "AndNOthers": ", 기타 %s", + "Cities": "도시", + "Countries": "국가", + "DaysAgo": "%s일 전", + "GoalConversions": "%s 목표 전환", + "HoursAgo": "%s시간 전", + "map": "지도", + "MinutesAgo": "%s분 전", + "None": "없음", + "NoVisit": "방문 없음", + "RealTimeMap": "실시간 지도", + "Regions": "지역", + "Searches": "%s 검색", + "SecondsAgo": "%s초 전", + "ShowingVisits": "최근 방문의 지리적 위치", + "Unlocated": "%s<\/b> %c 방문에서 %p의 지리적 위치를 찾을 수 없습니다.", + "VisitorMap": "방문자 지도", + "WorldWide": "전세계", + "WithUnknownRegion": "%s 알 수 없는 지역", + "WithUnknownCity": "%s 알 수 없는 도시" + } +} \ No newline at end of file diff --git a/lang/lt.json b/lang/lt.json new file mode 100644 index 0000000..d09b294 --- /dev/null +++ b/lang/lt.json @@ -0,0 +1,10 @@ +{ + "UserCountryMapIslandora": { + "Countries": "Šalys", + "DaysAgo": "Prieš %s dienų", + "HoursAgo": "Prieš %s valandų", + "map": "žemėlapis", + "MinutesAgo": "Prieš %s minučių", + "SecondsAgo": "Prieš %s sekundžių" + } +} \ No newline at end of file diff --git a/lang/lv.json b/lang/lv.json new file mode 100644 index 0000000..7d3637d --- /dev/null +++ b/lang/lv.json @@ -0,0 +1,5 @@ +{ + "UserCountryMapIslandora": { + "map": "karte" + } +} \ No newline at end of file diff --git a/lang/nb.json b/lang/nb.json new file mode 100644 index 0000000..93f1763 --- /dev/null +++ b/lang/nb.json @@ -0,0 +1,25 @@ +{ + "UserCountryMapIslandora": { + "PluginDescription": "Denne utvidelsen gir deg widgetene Kart over besøkende og Sanntidskart. Merk: krever at UserCountry-utvidelsen er aktivert.", + "AndNOthers": "og %s andre", + "Cities": "Byer", + "Countries": "Land", + "DaysAgo": "%s dager siden", + "GoalConversions": "%s målkonverteringer", + "HoursAgo": "%s timer siden", + "map": "kart", + "MinutesAgo": "%s minutter siden", + "None": "Ingen", + "NoVisit": "Ingen besøk", + "RealTimeMap": "Sanntidskart", + "Regions": "Regioner", + "Searches": "%s søk", + "SecondsAgo": "%s sekunder siden", + "ShowingVisits": "Stedsbestemte besøk siste", + "Unlocated": "%s<\/b> %p av besøkene fra %c kunne ikke stedsbestemmes.", + "VisitorMap": "Kart over besøkende", + "WorldWide": "Verdensbasis", + "WithUnknownRegion": "%s med ukjent region", + "WithUnknownCity": "%s med ukjent by" + } +} \ No newline at end of file diff --git a/lang/nl.json b/lang/nl.json new file mode 100644 index 0000000..7214ef5 --- /dev/null +++ b/lang/nl.json @@ -0,0 +1,25 @@ +{ + "UserCountryMapIslandora": { + "PluginDescription": "Deze plugin verzorgt de widgets Bezoekers landkaart en Real-time landkaart. Opmerking: Vereist dat de UserCountry plugin is ingeschakeld.", + "AndNOthers": "en %s anderen", + "Cities": "Steden", + "Countries": "Landen", + "DaysAgo": "%s dagen geleden", + "GoalConversions": "%s doelconversies", + "HoursAgo": "%s uur geleden", + "map": "kaart", + "MinutesAgo": "%s minuten geleden", + "None": "Geen", + "NoVisit": "Geen bezoek", + "RealTimeMap": "Realtime Kaart", + "Regions": "Regio's", + "Searches": "%s zoekopdrachten", + "SecondsAgo": "%s seconden geleden", + "ShowingVisits": "Gelokaliseerde bezoeken van laatste", + "Unlocated": "%s<\/b> %p van de bezoeken vanaf %c konden niet worden gelokaliseerd.", + "VisitorMap": "Bezoekersmap", + "WorldWide": "Wereldwijd", + "WithUnknownRegion": "%s met onbekende regio", + "WithUnknownCity": "%s met onbekende stad" + } +} \ No newline at end of file diff --git a/lang/pl.json b/lang/pl.json new file mode 100644 index 0000000..bc22f1b --- /dev/null +++ b/lang/pl.json @@ -0,0 +1,25 @@ +{ + "UserCountryMapIslandora": { + "PluginDescription": "Wtyczka dostarcza widżetów Mapa Odwiedzin i Mapa Czasu Rzeczywistego. NOTKA: Wymaga włączenia wtyczki UserCountry.", + "AndNOthers": "i %s innych", + "Cities": "Miasta", + "Countries": "Państw", + "DaysAgo": "%s dni temu", + "GoalConversions": "%s konwersji celów", + "HoursAgo": "%s godzin temu", + "map": "mapa", + "MinutesAgo": "%s minut temu", + "None": "Brak", + "NoVisit": "Brak wizyt", + "RealTimeMap": "Mapa Czasu Rzeczywistego", + "Regions": "Regiony", + "Searches": "%s wyszukań", + "SecondsAgo": "%s sekund temu", + "ShowingVisits": "Geolokalizowane wizyty z ostatnich", + "Unlocated": "%s<\/b> %p wizyt z %c nie mogło zostać zlokalizowane.", + "VisitorMap": "Mapa Odwiedzin", + "WorldWide": "World-Wide", + "WithUnknownRegion": "%s z nieznanego regionu", + "WithUnknownCity": "%s z nieznanego miasta" + } +} \ No newline at end of file diff --git a/lang/pt-br.json b/lang/pt-br.json new file mode 100644 index 0000000..280d019 --- /dev/null +++ b/lang/pt-br.json @@ -0,0 +1,27 @@ +{ + "UserCountryMapIslandora": { + "PluginDescription": "Este plugin fornece os widgets Mapa de Visitantes e o Mapa Tempo-Real. Nota: Requer o plugin UserCountry ativado.", + "AndNOthers": "e %s outros", + "Cities": "Cidades", + "Countries": "Países", + "DaysAgo": "%s dias atrás", + "GoalConversions": "%s conversões de meta", + "HoursAgo": "%s horas atrás", + "map": "mapa", + "MinutesAgo": "%s minutos atrás", + "None": "Nenhum", + "NoVisit": "Nenhuma visita", + "RealTimeMap": "Mapa em tempo real", + "Regions": "Regiões", + "Searches": "%s buscas", + "SecondsAgo": "%s segundos atrás", + "ShowingVisits": "Geo-localização das últimas visitas", + "Unlocated": "%s<\/b> %p das visitas de %c não puderam ser geo localizados.", + "VisitorMap": "Mapa de visitantes", + "WorldWide": "World-Wide", + "WithUnknownRegion": "%s com região desconhecida", + "WithUnknownCity": "%s com cidade desconhecida", + "NoVisitsInfo": "Não há visitas exibidas atualmente, porque nenhuma visita para este período possui a informação de geolocalização correta (latitude e longitude).", + "NoVisitsInfo2": "Para resolver este problema, verifique se você está usando um provedor de geolocalização GeoIP com um banco de cidades GeoIP. Se isso não resolver o problema, é possível (embora improvável) que suas visitas tenham endereços IPs que não possam ser geolocalizados." + } +} \ No newline at end of file diff --git a/lang/pt.json b/lang/pt.json new file mode 100644 index 0000000..7854663 --- /dev/null +++ b/lang/pt.json @@ -0,0 +1,27 @@ +{ + "UserCountryMapIslandora": { + "PluginDescription": "Esta extensão fornece as widgets do Mapa de visitantes e o Mapa em tempo real. Nota: Requer que a extensão UserCountry esteja ativa.", + "AndNOthers": "e %s outros", + "Cities": "Cidades", + "Countries": "Países", + "DaysAgo": "Há %s dias", + "GoalConversions": "%s conversões de objetivos", + "HoursAgo": "Há %s horas", + "map": "mapa", + "MinutesAgo": "Há %s minutos", + "None": "Nenhum", + "NoVisit": "Nenhuma visita", + "RealTimeMap": "Mapa em tempo real", + "Regions": "Regiões", + "Searches": "%s pesquisas", + "SecondsAgo": "Há %s segundos", + "ShowingVisits": "Visitas geolocalizadas dos últimos", + "Unlocated": "%s<\/b> %p das visitas de %c não puderam ser geolocalizadas.", + "VisitorMap": "Mapa de visitantes", + "WorldWide": "Mundial", + "WithUnknownRegion": "%s com uma região desconhecida", + "WithUnknownCity": "%s com uma cidade desconhecida", + "NoVisitsInfo": "Não existem visitas atualmente a serem mostradas porque nenhuma visita para este período tem informações corretas de geolocalização (latitude e longitude).", + "NoVisitsInfo2": "Para resolver este problema, confirme que está a utilizar um fornecedor de localização GeoIP com uma base de dados GeoIP de cidades. Se isto não resolver o seu problema, então é possível (embora pouco provável) que as suas visitas têm endereços de IP que não podem ser geolocalizados." + } +} \ No newline at end of file diff --git a/lang/ro.json b/lang/ro.json new file mode 100644 index 0000000..22109ab --- /dev/null +++ b/lang/ro.json @@ -0,0 +1,22 @@ +{ + "UserCountryMapIslandora": { + "AndNOthers": "si %s altii", + "Cities": "Oraşe", + "Countries": "Ţări", + "DaysAgo": "%s zile în urmă", + "GoalConversions": "%s obiectivul conversiilor", + "HoursAgo": "%s ore în urmă", + "map": "harta", + "MinutesAgo": "%s acum cateva minute", + "None": "Nu sunt", + "NoVisit": "Nici o vizita", + "RealTimeMap": "Harta în timp real", + "Regions": "Regiuni", + "Searches": "%s cautari", + "SecondsAgo": "%s acum o secunda", + "ShowingVisits": "Ultimile vizite geo-localizate", + "Unlocated": "%s<\/b> %p vizitelor de la %c nu au putut fi geolocalizate.", + "VisitorMap": "Harta vizitatori", + "WorldWide": "World-Wide" + } +} \ No newline at end of file diff --git a/lang/ru.json b/lang/ru.json new file mode 100644 index 0000000..2117c8a --- /dev/null +++ b/lang/ru.json @@ -0,0 +1,25 @@ +{ + "UserCountryMapIslandora": { + "PluginDescription": "Этот плагин предоставляет виджеты Visitor Map и Real-time Map. Внимание: требуется включенный плагин UserCountry.", + "AndNOthers": "и %s других", + "Cities": "Города", + "Countries": "Страны", + "DaysAgo": "%s дней назад", + "GoalConversions": "%s целей достигнуто", + "HoursAgo": "%s часов назад", + "map": "карта", + "MinutesAgo": "%s минут назад", + "None": "Нет", + "NoVisit": "Без посещений", + "RealTimeMap": "Карта в реальном времени", + "Regions": "Регионы", + "Searches": "%s поисковых запросов", + "SecondsAgo": "%s секунд назад", + "ShowingVisits": "Последние геолокационные посещения", + "Unlocated": "%s<\/b> %p посещения из %c не могут быть геолокализованны.", + "VisitorMap": "Карта посещений", + "WorldWide": "Весь мир", + "WithUnknownRegion": "%s с неизвестным регионом", + "WithUnknownCity": "%s с неизвестным городом" + } +} \ No newline at end of file diff --git a/lang/sk.json b/lang/sk.json new file mode 100644 index 0000000..48d6917 --- /dev/null +++ b/lang/sk.json @@ -0,0 +1,12 @@ +{ + "UserCountryMapIslandora": { + "Cities": "Mestá", + "Countries": "Krajiny", + "map": "mapa", + "None": "Nič", + "NoVisit": "Žiadna návšteva", + "RealTimeMap": "Mapa v reálnom čase", + "Regions": "Regióny", + "VisitorMap": "Mapa návštev" + } +} \ No newline at end of file diff --git a/lang/sl.json b/lang/sl.json new file mode 100644 index 0000000..d2a08df --- /dev/null +++ b/lang/sl.json @@ -0,0 +1,9 @@ +{ + "UserCountryMapIslandora": { + "map": "zemljevid", + "RealTimeMap": "Zemljevid v realnem času", + "Regions": "Regije", + "VisitorMap": "Zemljevid obiskovalcev", + "WorldWide": "Cel svet" + } +} \ No newline at end of file diff --git a/lang/sq.json b/lang/sq.json new file mode 100644 index 0000000..6dd484e --- /dev/null +++ b/lang/sq.json @@ -0,0 +1,27 @@ +{ + "UserCountryMapIslandora": { + "PluginDescription": "Kjo shtojcë ofron widget-et Hartë Vizitorësh dhe Hartë Në Kohë Reale. Shënim: Lyp shtojcën UserCountry të aktivizuar.", + "AndNOthers": "dhe %s të tjerë", + "Cities": "Qytete", + "Countries": "Vende", + "DaysAgo": "%s ditë më parë", + "GoalConversions": "%s shndërrime objektivash", + "HoursAgo": "%s orë më parë", + "map": "hartë", + "MinutesAgo": "%s minuta më parë", + "None": "Asnjë", + "NoVisit": "Pa vizita", + "RealTimeMap": "Hartë e Atypëratyshme", + "Regions": "Rajone", + "Searches": "%s kërkime", + "SecondsAgo": "%s sekonda më parë", + "ShowingVisits": "Vizita të gjeovendëzuara, për pjesën e fundit të", + "Unlocated": "%s<\/b> %p e vizitës prej %c s’u gjeovendëzua dot.", + "VisitorMap": "Hartë Vizitorësh", + "WorldWide": "Anembanë Botës", + "WithUnknownRegion": "%s me rajon të panjohur", + "WithUnknownCity": "%s me qytet të panjohur", + "NoVisitsInfo": "Hëpërhë s’ka vizita të shfaqura, ngaqë për këtë periudhë asnjë vizitë nuk ka të dhëna të sakta gjeolokalizimi (gjerësi & gjatësi gjeografike).", + "NoVisitsInfo2": "Për ta zgjidhur këtë problem, sigurohuni që po përdorni një shërbim gjeolokalizimi GeoIP me një bazë të dhënash GeoIP qytetesh. Nëse kjo nuk e zgjidh problemin tuaj, atëherë ka mundësi (edhe pse zor) që vizitat tuaja të kenë adresa IP që nuk gjeolokalizohen dot." + } +} \ No newline at end of file diff --git a/lang/sr.json b/lang/sr.json new file mode 100644 index 0000000..7d19baa --- /dev/null +++ b/lang/sr.json @@ -0,0 +1,25 @@ +{ + "UserCountryMapIslandora": { + "PluginDescription": "Ovaj dodatak donosi vidžete Mapa posetilaca i Mapa u realnom vremenu. Zahteva UserCountry dodatak.", + "AndNOthers": "i %s ostalih", + "Cities": "Gradovi", + "Countries": "Države", + "DaysAgo": "pre %s dana", + "GoalConversions": "%s ispunjenih ciljeva", + "HoursAgo": "pre %s sati", + "map": "mapa", + "MinutesAgo": "pre %s minuta", + "None": "Ništa", + "NoVisit": "Nema poseta", + "RealTimeMap": "Mapa u realnom vremenu", + "Regions": "Regioni", + "Searches": "%s pretraga", + "SecondsAgo": "pre %s sekundi", + "ShowingVisits": "Geolocirane posete od poslednjih", + "Unlocated": "%s<\/b> %p od poseta sa %c nije moguće geolocirati.", + "VisitorMap": "Mapa posetilaca", + "WorldWide": "Ceo svet", + "WithUnknownRegion": "%s sa nepoznatim regionom", + "WithUnknownCity": "%s sa nepoznatim gradom" + } +} \ No newline at end of file diff --git a/lang/sv.json b/lang/sv.json new file mode 100644 index 0000000..5016dba --- /dev/null +++ b/lang/sv.json @@ -0,0 +1,27 @@ +{ + "UserCountryMapIslandora": { + "PluginDescription": "Denna plugin ger dig widgetarna besökskarta och realtidskarta. Notera: Kräver aktiverad UserCountry-plugin.", + "AndNOthers": "och %s andra", + "Cities": "Städer", + "Countries": "Länder", + "DaysAgo": "%s dagar sedan", + "GoalConversions": "%s målomvandlingar", + "HoursAgo": "%s timmar sedan", + "map": "karta", + "MinutesAgo": "%s minuter sedan", + "None": "Ingen", + "NoVisit": "Inga besök", + "RealTimeMap": "Realtidskarta", + "Regions": "Regioner", + "Searches": "%s sökningar", + "SecondsAgo": "%s sekunder sedan", + "ShowingVisits": "Geolokaliserade besök de senaste", + "Unlocated": "%s<\/b> %p av besöken från %c kunde inte geolokaliseras.", + "VisitorMap": "Besökskarta", + "WorldWide": "Hela världen", + "WithUnknownRegion": "%s med okänd region", + "WithUnknownCity": "%s med okänd stad", + "NoVisitsInfo": "Det finns inga besök som visas för tillfället, eftersom inget besök för denna period har rätt geografisk platsinformation (latitud och longitud).", + "NoVisitsInfo2": "För att lösa detta problem se till att du använder en GeoIP leverantör med en databas över städer. Om det inte löser problemet är det möjligt (men osannolikt) att dina besök har IP-adresser som inte kan geopositioneras." + } +} \ No newline at end of file diff --git a/lang/te.json b/lang/te.json new file mode 100644 index 0000000..bad005a --- /dev/null +++ b/lang/te.json @@ -0,0 +1,5 @@ +{ + "UserCountryMapIslandora": { + "map": "పటం" + } +} \ No newline at end of file diff --git a/lang/th.json b/lang/th.json new file mode 100644 index 0000000..d77c20d --- /dev/null +++ b/lang/th.json @@ -0,0 +1,5 @@ +{ + "UserCountryMapIslandora": { + "map": "แผนที่" + } +} \ No newline at end of file diff --git a/lang/tl.json b/lang/tl.json new file mode 100644 index 0000000..c9c2c4d --- /dev/null +++ b/lang/tl.json @@ -0,0 +1,24 @@ +{ + "UserCountryMapIslandora": { + "AndNOthers": "at %s iba", + "Cities": "Lungsod", + "Countries": "Mga Bansa", + "DaysAgo": "araw %s na ang nakalipas", + "GoalConversions": "Mga %s goal conversion", + "HoursAgo": "oras %s na ang nakalipas", + "map": "mapa", + "MinutesAgo": "%s minuto ang nakalipas", + "None": "Wala", + "NoVisit": "walang bumisita", + "RealTimeMap": "Real-time Map", + "Regions": "Mga Rehiyon", + "Searches": "%s searches", + "SecondsAgo": "segundo %s na ang nakalipas", + "ShowingVisits": "Geo-located na pagbisita ng huling", + "Unlocated": " %s %p sa mga pagbisita mula sa %c ay hindi pwedeng i-geolocated.", + "VisitorMap": "Mapa ng bumisita", + "WorldWide": "World-Wide", + "WithUnknownRegion": "%s na may hindi kilalang rehiyon", + "WithUnknownCity": "%s hindi kilalang lungsod" + } +} \ No newline at end of file diff --git a/lang/tr.json b/lang/tr.json new file mode 100644 index 0000000..2a1d264 --- /dev/null +++ b/lang/tr.json @@ -0,0 +1,27 @@ +{ + "UserCountryMapIslandora": { + "PluginDescription": "Bu uygulama eki Ziyaretçi Haritası ve Gerçek Zamanlı Harita gereçlerini görüntüler. Not: Kullanıcı Ülkesi uygulama ekinin etkinleştirilmiş olması gerekir.", + "AndNOthers": "ve %s diğer", + "Cities": "İller", + "Countries": "Ülkeler", + "DaysAgo": "%s gün önce", + "GoalConversions": "%s hedef tutturma", + "HoursAgo": "%s saat önce", + "map": "harita", + "MinutesAgo": "%s dakika önce", + "None": "Yok", + "NoVisit": "Henüz bir ziyaret yok", + "RealTimeMap": "Gerçek Zamanlı Harita", + "Regions": "Bölgeler", + "Searches": "%s arama", + "SecondsAgo": "%s saniye önce", + "ShowingVisits": "Son dönemdeki ziyaret coğrafi konumları", + "Unlocated": "%c üzerinden %s<\/b> %p ziyaretin coğrafi konumu belirlenemedi.", + "VisitorMap": "Ziyaretçi Haritası", + "WorldWide": "Dünya Geneli", + "WithUnknownRegion": "%s ziyaretin bölgesi bilinmiyor", + "WithUnknownCity": "%s ziyaretin ili bilinmiyor", + "NoVisitsInfo": "Bu aralıkta doğru coğrafi konum bilgilerine (enlem ve boylam) sahip herhangi bir ziyaret olmadığından, şu anda görüntülenecek bir ziyaret yok.", + "NoVisitsInfo2": "Bu sorunu çözmek için GeoIP il veritabanı ile bir GeoIP hizmeti sağlayıcısını kullandığınızdan emin olun. Sorun çözülmez ise (pek olası olmamakla birlikte) ziyaretçilerinizin IP adresleri coğrafi kodlaması yapılamayan adreslerdir." + } +} \ No newline at end of file diff --git a/lang/uk.json b/lang/uk.json new file mode 100644 index 0000000..5fa33f2 --- /dev/null +++ b/lang/uk.json @@ -0,0 +1,25 @@ +{ + "UserCountryMapIslandora": { + "PluginDescription": "Цей плагін надає віджет відображення відвідувачів на карті в реальному часі. Примітка: вимагає активації плагіну UserCountry.", + "AndNOthers": "та %s інших", + "Cities": "Міста", + "Countries": "Країни", + "DaysAgo": "%s днів назад", + "GoalConversions": "%s цілей досягнуто", + "HoursAgo": "%s годин тому", + "map": "мапа", + "MinutesAgo": "%s хвилин тому", + "None": "Немає", + "NoVisit": "Без відвідувань", + "RealTimeMap": "Мапа в реальному часі", + "Regions": "Регіони", + "Searches": "%s пошукових запитів", + "SecondsAgo": "%s секунд тому", + "ShowingVisits": "Останні геолокаційні відвідування", + "Unlocated": "%s<\/b> %p відвідування з %c не можуть бути геолокалізованни.", + "VisitorMap": "Мапа відвідувань", + "WorldWide": "Весь світ", + "WithUnknownRegion": "%s з невідомим регіоном", + "WithUnknownCity": "%s з невідомим містом" + } +} \ No newline at end of file diff --git a/lang/vi.json b/lang/vi.json new file mode 100644 index 0000000..a3c908f --- /dev/null +++ b/lang/vi.json @@ -0,0 +1,22 @@ +{ + "UserCountryMapIslandora": { + "AndNOthers": "và %s khác", + "Cities": "Các thành phố", + "Countries": "Các quốc gia", + "DaysAgo": "%s ngày cách đây", + "GoalConversions": "%s các chuyển đổi mục tiêu", + "HoursAgo": "%s giờ cách đây", + "map": "Bản đồ", + "MinutesAgo": "%s phút cách đây", + "None": "Không có gì", + "NoVisit": "Không có truy cập nào", + "RealTimeMap": "Bản đồ thời gian thực", + "Regions": "Các vùng", + "Searches": "%s tìm kiếm", + "SecondsAgo": "%s giây cách đây", + "ShowingVisits": "Định vị lượt truy cập cuối cùng", + "Unlocated": "%s<\/b> %p các lượt truy cập từ %c có thể không được định vị.", + "VisitorMap": "Bản đồ khách truy cập", + "WorldWide": "Khắp thế giới" + } +} \ No newline at end of file diff --git a/lang/zh-cn.json b/lang/zh-cn.json new file mode 100644 index 0000000..0373bf8 --- /dev/null +++ b/lang/zh-cn.json @@ -0,0 +1,25 @@ +{ + "UserCountryMapIslandora": { + "PluginDescription": "这个插件提供了访客地图和实时地图的小工具。注意:需要激活UserCountry插件。", + "AndNOthers": "和 %s 其它", + "Cities": "城市", + "Countries": "国家", + "DaysAgo": "%s 天前", + "GoalConversions": "%s 目标转化", + "HoursAgo": "%s 小时前", + "map": "地图", + "MinutesAgo": "%s 分钟前", + "None": "无", + "NoVisit": "没有访问", + "RealTimeMap": "实时地图", + "Regions": "地区", + "Searches": "%s 次搜索", + "SecondsAgo": "%s 秒前", + "ShowingVisits": "最后访客地理位置", + "Unlocated": "%s<\/b> %p 的访问来自 %c 无法定位地理位置。", + "VisitorMap": "访客地图", + "WorldWide": "全世界", + "WithUnknownRegion": "%s未知区域", + "WithUnknownCity": "%s未知城市" + } +} \ No newline at end of file diff --git a/lang/zh-tw.json b/lang/zh-tw.json new file mode 100644 index 0000000..a54ec2f --- /dev/null +++ b/lang/zh-tw.json @@ -0,0 +1,27 @@ +{ + "UserCountryMapIslandora": { + "PluginDescription": "這個外掛提供訪客地圖和即時地圖外掛。注意:需要啟用 UserCountry 外掛。", + "AndNOthers": "和其他 %s 人", + "Cities": "城市", + "Countries": "國家", + "DaysAgo": "%s 天前", + "GoalConversions": "%s 個目標轉換", + "HoursAgo": "%s 小時前", + "map": "地圖", + "MinutesAgo": "%s 分前", + "None": "無", + "NoVisit": "沒有資料", + "RealTimeMap": "即時地圖", + "Regions": "地區", + "Searches": "%s 個搜尋次數", + "SecondsAgo": "%s 秒前", + "ShowingVisits": "訪客地理位置從過去的", + "Unlocated": "來自 %c 的訪客 %s<\/b> %p 無法定位地理位置。", + "VisitorMap": "訪客分佈地圖", + "WorldWide": "全球", + "WithUnknownRegion": "%s 個未知地區", + "WithUnknownCity": "%s 個未知城市", + "NoVisitsInfo": "由於這段期間內沒有任何包含正確地理位置資訊(經度、緯度)的訪問,因此目前沒有顯示任何訪問。", + "NoVisitsInfo2": "要解決這個問題,確定你正在使用包含 GeoIP 程式資料庫的 GeoIP 地理位置供應商。如果這沒有解決你的問題,那麼有可能(雖然不太可能)是你的訪客使用了無法被定位的 IP 位址。" + } +} \ No newline at end of file diff --git a/plugin.json b/plugin.json new file mode 100644 index 0000000..f390d88 --- /dev/null +++ b/plugin.json @@ -0,0 +1,20 @@ +{ + "name": "UserCountryMapIslandora", + "version": "1.0.0", + "description": "Custom Map with no Popups, 90% based on UserCountryMap", + "keywords": ["Map", "Embed"], + "license": "GPL v3+", + "homepage": "http://piwik.org", + "require": { + "piwik": ">=3.0.0-b1,<4.0.0-b1" + }, + "support": { + "source": "https://github.com/diegopino/plugin-UserCountryMapIslandora" + }, + "authors": [ + { + "name": "Diego Pino", + "email": "dpino@metro.org", + } + ] +} diff --git a/stylesheets/map.css b/stylesheets/map.css new file mode 100644 index 0000000..6bd3a73 --- /dev/null +++ b/stylesheets/map.css @@ -0,0 +1,83 @@ +/* + * Stylesheets for Kartograph map + */ + +.UserCountryMapIslandora_map svg path { + stroke-linejoin: round; +} + +.UserCountryMapIslandora svg .countries { + cursor: pointer; + stroke-width: 0.5px; + stroke: #545C6D; +} + +.UserCountryMapIslandora svg .context { + stroke: #BBBBBB; + fill: #F6F5F3; + stroke-width: 0.5px; +} + +.UserCountryMapIslandora svg .context-clickable { + cursor: pointer; + stroke: #BBBBBB; + fill: #F2F1ED; + stroke-width: 0.5px; +} + +.UserCountryMapIslandora svg .context-clickable:hover { + fill: #E4E2D7; +} + +.UserCountryMapIslandora svg .regionBG { + stroke-width: 6px; + stroke: #fff; + fill: none; +} + +.UUserCountryMapIslandora svg .regionBG-fill { + stroke: #555; + stroke-width: 0.2px; + fill: #F6F5F3; +} + +.UserCountryMapIslandora svg .regionBG-3 { + stroke: #ccc; + fill: #F2F1ED; + stroke-width: 1px; +} + +.UUserCountryMapIslandora svg .countryBG { + stroke: #fff; + fill: #fff; + stroke-width: 4px; +} + +.UserCountryMapIslandora svg .regions { + stroke-width: 1px; +} + +.UserCountryMapIslandora svg .regions2 { + stroke-width: 1px; + stroke: #aaa; + fill: #fff; +} + +.UserCountryMapIslandora svg .countryLabelBg { + font-weight: bold; + font-size: 10px; + font-family: Arial, Verdana, Helvetica, sans-serif; + fill: #F6F5F3; + stroke: #F6F5F3; + stroke-width: 3px; + stroke-linejoin: round; + stroke-linecap: round; +} + +.UserCountryMapIslandora svg .countryLabel { + font-weight: bold; + font-size: 10px; + font-family: Arial, Verdana, Helvetica, sans-serif; + fill: #808888; +} + diff --git a/stylesheets/visitor-map.less b/stylesheets/visitor-map.less new file mode 100644 index 0000000..6becb0c --- /dev/null +++ b/stylesheets/visitor-map.less @@ -0,0 +1,239 @@ +.UserCountryMap-black { + position: absolute; + right: 0; + left: 0; + z-index: 900; + width: 1000px; + height: 1000px; + background: #D5D3C8; +} + +.UserCountryMap .unlocatableCount { + font-size: 11px; + color: @color-silver-l60; +} + +.UserCountryMap .loadingPiwik { + position: absolute !important; + top: 42% !important; + right: 10px !important; + left: 10px !important; + z-index: 100 !important; + display: block; + font-size: 12px; + color: #000; + vertical-align: middle !important; + text-align: center; + text-shadow: 0 0 5px #fff; +} + +.tableIcon.inactiveIcon { + color: #99a; +} + +.UserCountryMap .UserCountryMap-legend { + opacity: 0; +} + +.UserCountryMap:hover .UserCountryMap-legend { + opacity: 1; +} + +.UserCountryMap-overlay, +.UserCountryMap-tooltip { + display: block; + position: absolute; + z-index: 40; +} + +.UserCountryMap-overlay .content, +.UserCountryMap-tooltip .content { + padding: 5px; + border-radius: 3px; + background: rgba(255, 255, 255, 0.9); +} + +.UserCountryMap-title { + top: 5px; + left: 5px; +} + +.UserCountryMap-legend { + right: 5px; + font-size: 9px; + bottom: 24px; +} + +.UserCountryMap-info { + left: 5px; + font-size: 11px; + bottom: 60px; + max-width: 42%; +} + +.UserCountryMap-info-btn { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAA3NCSVQICAjb4U/gAAAAOVBMVEX///8AAAAAAABXV1dSUlKsrKzExMTd3d3V1dXp6end3d3p6enz8/P7+/v39/f///+vqZ6oopWUjH2LPulWAAAAE3RSTlMAESIzM2Z3mZmqqrvd7u7/////UUgTXgAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNXG14zYAAAAYdEVYdENyZWF0aW9uIFRpbWUAMDMuMDEuMjAxM8rVeD8AAABnSURBVBiVhY/LFoAgCEQZ0p4W6f9/bIJ4slV3oTIeBoaICGADIAO8ibEwWn2IcwVovev7znqmCYRon9kEWUFvg3IysXyIXSil3fOvELupC9XUx7pQx/piDV1sVFLwMNF80sw97hj/AXRPCjtYdmhtAAAAAElFTkSuQmCC); + width: 16px; + height: 16px; + cursor: pointer; + left: 13px; + bottom: 40px; + position: absolute; + z-index: 700; + opacity: 0.9; +} + +/* this should me moved to TableView css sometimes */ +.dataTableFooterIcons .inactiveIcon:hover { + background-color: #F2F1ED; +} + +.dataTableFooterIcons .inactiveIcon { + cursor: default; +} + +.dataTableFooterIcons .inactiveIcon img { + opacity: 0.3; + -moz-opacity: 0.3; + filter: alpha(opacity=3); +} + +.mapWidgetStatus { + padding-bottom: 24px; +} + +.widgetUserCountryMapvisitorMap .widgetTop .button { + z-index: 3; + position: relative; +} + +.widgetUserCountryMapvisitorMap .widgetName { + white-space: nowrap; + text-overflow: ellipsis; +} + +.widgetUserCountryMapvisitorMap.widgetHover .widgetName { + width: 75%; + overflow: hidden; +} + +// visitor map colors +.visitor-map[data-name=no-data-color] { + color: #E4E2D7; +} + +.visitor-map[data-name=one-country-color] { + color: #CDDAEF; +} + +.visitor-map[data-name=color-range-start-choropleth] { + color: #CDDAEF; +} + +.visitor-map[data-name=color-range-start-normal] { + color: #385993; +} + +.visitor-map[data-name=color-range-end-choropleth] { + color: #385993; +} + +.visitor-map[data-name=color-range-end-normal] { + color: #385993; +} + +.visitor-map[data-name=country-highlight-color] { + color: #f4f45b; +} + +.visitor-map[data-name=country-selected-color] { + color: #f4f45b; +} + +.visitor-map[data-name=unknown-region-fill-color] { + color: @theme-color-background-base; +} + +.visitor-map[data-name=unknown-region-stroke-color] { + color: #bbb; +} + +.visitor-map[data-name=region-stroke-color] { + color: #3C6FB6; +} + +.visitor-map[data-name=region-selected-color] { + color: #f4f45b; +} + +.visitor-map[data-name=region-highlight-color] { + color: #f4f45b; +} + +.visitor-map[data-name=invisible-region-background] { + color: @theme-color-background-base; +} + +.visitor-map[data-name=city-label-color] { + color: @theme-color-background-base; +} + +.visitor-map[data-name=city-stroke-color] { + color: @theme-color-background-base; +} + +.visitor-map[data-name=city-highlight-stroke-color] { + color: #000000; +} + +.visitor-map[data-name=city-highlight-fill-color] { + color: #f4f45b; +} + +.visitor-map[data-name=city-highlight-label-color] { + color: #000; +} + +.visitor-map[data-name=city-label-fill-color] { + color: @theme-color-background-base; +} + +.visitor-map[data-name=city-selected-color] { + color: #f4f45b; +} + +.visitor-map[data-name=city-selected-label-color] { + color: #000; +} + +.visitor-map[data-name=region-layer-stroke-color] { + color: #aaa; +} + +.visitor-map[data-name=special-metrics-color-scale-1] { + color: #385993; +} + +.visitor-map[data-name=special-metrics-color-scale-2] { + color: #385993; +} + +.visitor-map[data-name=special-metrics-color-scale-3] { + color: #E87500; +} + +.visitor-map[data-name=special-metrics-color-scale-4] { + color: #E87500; +} + +.userCountryMapSelectCountry, .userCountryMapSelectMetrics { + float: right; + margin-right: 5px; + margin-bottom: 5px; + max-width: 10em; + font-size: 10px; +} + +.ui-tooltip.qtip { + min-width: 100px; +} \ No newline at end of file diff --git a/svg/AF.svg b/svg/AF.svg new file mode 100644 index 0000000..02430b3 --- /dev/null +++ b/svg/AF.svg @@ -0,0 +1,2 @@ + diff --git a/svg/AFG.svg b/svg/AFG.svg new file mode 100644 index 0000000..1d90e28 --- /dev/null +++ b/svg/AFG.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/AGO.svg b/svg/AGO.svg new file mode 100644 index 0000000..74ae37c --- /dev/null +++ b/svg/AGO.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/ALB.svg b/svg/ALB.svg new file mode 100644 index 0000000..2812a5c --- /dev/null +++ b/svg/ALB.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/ARE.svg b/svg/ARE.svg new file mode 100644 index 0000000..0270a3c --- /dev/null +++ b/svg/ARE.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/ARG.svg b/svg/ARG.svg new file mode 100644 index 0000000..677c406 --- /dev/null +++ b/svg/ARG.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/ARM.svg b/svg/ARM.svg new file mode 100644 index 0000000..5b42fa7 --- /dev/null +++ b/svg/ARM.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/AS.svg b/svg/AS.svg new file mode 100644 index 0000000..b425e8d --- /dev/null +++ b/svg/AS.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/AUS.svg b/svg/AUS.svg new file mode 100644 index 0000000..2a919f5 --- /dev/null +++ b/svg/AUS.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/AUT.svg b/svg/AUT.svg new file mode 100644 index 0000000..4955787 --- /dev/null +++ b/svg/AUT.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/AZE.svg b/svg/AZE.svg new file mode 100644 index 0000000..f7fea03 --- /dev/null +++ b/svg/AZE.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/BDI.svg b/svg/BDI.svg new file mode 100644 index 0000000..8cda2dc --- /dev/null +++ b/svg/BDI.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/BEL.svg b/svg/BEL.svg new file mode 100644 index 0000000..4b3a0f8 --- /dev/null +++ b/svg/BEL.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svg/BEN.svg b/svg/BEN.svg new file mode 100644 index 0000000..10956f7 --- /dev/null +++ b/svg/BEN.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/BFA.svg b/svg/BFA.svg new file mode 100644 index 0000000..4e016e6 --- /dev/null +++ b/svg/BFA.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/BGD.svg b/svg/BGD.svg new file mode 100644 index 0000000..fa82fa1 --- /dev/null +++ b/svg/BGD.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/BGR.svg b/svg/BGR.svg new file mode 100644 index 0000000..141ae02 --- /dev/null +++ b/svg/BGR.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/BIH.svg b/svg/BIH.svg new file mode 100644 index 0000000..ffe908f --- /dev/null +++ b/svg/BIH.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/BLR.svg b/svg/BLR.svg new file mode 100644 index 0000000..6c0004e --- /dev/null +++ b/svg/BLR.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/BLZ.svg b/svg/BLZ.svg new file mode 100644 index 0000000..e118f1d --- /dev/null +++ b/svg/BLZ.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/BOL.svg b/svg/BOL.svg new file mode 100644 index 0000000..d29c426 --- /dev/null +++ b/svg/BOL.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/BRA.svg b/svg/BRA.svg new file mode 100644 index 0000000..1e85137 --- /dev/null +++ b/svg/BRA.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/BRB.svg b/svg/BRB.svg new file mode 100644 index 0000000..2b7ef1f --- /dev/null +++ b/svg/BRB.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/BRN.svg b/svg/BRN.svg new file mode 100644 index 0000000..82361e5 --- /dev/null +++ b/svg/BRN.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/BTN.svg b/svg/BTN.svg new file mode 100644 index 0000000..4d6ba17 --- /dev/null +++ b/svg/BTN.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/BWA.svg b/svg/BWA.svg new file mode 100644 index 0000000..f6557ba --- /dev/null +++ b/svg/BWA.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/CAF.svg b/svg/CAF.svg new file mode 100644 index 0000000..639ddc7 --- /dev/null +++ b/svg/CAF.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/CAN.svg b/svg/CAN.svg new file mode 100644 index 0000000..d946475 --- /dev/null +++ b/svg/CAN.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/CHE.svg b/svg/CHE.svg new file mode 100644 index 0000000..f9990fb --- /dev/null +++ b/svg/CHE.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/CHL.svg b/svg/CHL.svg new file mode 100644 index 0000000..b47bddb --- /dev/null +++ b/svg/CHL.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/CHN.svg b/svg/CHN.svg new file mode 100644 index 0000000..e414fbb --- /dev/null +++ b/svg/CHN.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/CIV.svg b/svg/CIV.svg new file mode 100644 index 0000000..583a3d9 --- /dev/null +++ b/svg/CIV.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/CMR.svg b/svg/CMR.svg new file mode 100644 index 0000000..bb6905c --- /dev/null +++ b/svg/CMR.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/COD.svg b/svg/COD.svg new file mode 100644 index 0000000..46aba0a --- /dev/null +++ b/svg/COD.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/COG.svg b/svg/COG.svg new file mode 100644 index 0000000..87606ea --- /dev/null +++ b/svg/COG.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/COL.svg b/svg/COL.svg new file mode 100644 index 0000000..6cd0a80 --- /dev/null +++ b/svg/COL.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/CRI.svg b/svg/CRI.svg new file mode 100644 index 0000000..549ab9a --- /dev/null +++ b/svg/CRI.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/CUB.svg b/svg/CUB.svg new file mode 100644 index 0000000..7eba9f6 --- /dev/null +++ b/svg/CUB.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/CYP.svg b/svg/CYP.svg new file mode 100644 index 0000000..2d6f4e9 --- /dev/null +++ b/svg/CYP.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/CZE.svg b/svg/CZE.svg new file mode 100644 index 0000000..c3ba77a --- /dev/null +++ b/svg/CZE.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svg/DEU.svg b/svg/DEU.svg new file mode 100644 index 0000000..dc2f760 --- /dev/null +++ b/svg/DEU.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svg/DJI.svg b/svg/DJI.svg new file mode 100644 index 0000000..c52dee6 --- /dev/null +++ b/svg/DJI.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/DMA.svg b/svg/DMA.svg new file mode 100644 index 0000000..e8d51fe --- /dev/null +++ b/svg/DMA.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/DNK.svg b/svg/DNK.svg new file mode 100644 index 0000000..760d8d5 --- /dev/null +++ b/svg/DNK.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svg/DOM.svg b/svg/DOM.svg new file mode 100644 index 0000000..1713a8d --- /dev/null +++ b/svg/DOM.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/DZA.svg b/svg/DZA.svg new file mode 100644 index 0000000..1b4c966 --- /dev/null +++ b/svg/DZA.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/ECU.svg b/svg/ECU.svg new file mode 100644 index 0000000..25e490c --- /dev/null +++ b/svg/ECU.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/EGY.svg b/svg/EGY.svg new file mode 100644 index 0000000..e0bff90 --- /dev/null +++ b/svg/EGY.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/ERI.svg b/svg/ERI.svg new file mode 100644 index 0000000..42de412 --- /dev/null +++ b/svg/ERI.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/ESP.svg b/svg/ESP.svg new file mode 100644 index 0000000..3cd091c --- /dev/null +++ b/svg/ESP.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/EST.svg b/svg/EST.svg new file mode 100644 index 0000000..46342af --- /dev/null +++ b/svg/EST.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/ETH.svg b/svg/ETH.svg new file mode 100644 index 0000000..1cdf5d1 --- /dev/null +++ b/svg/ETH.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/EU.svg b/svg/EU.svg new file mode 100644 index 0000000..bed2b60 --- /dev/null +++ b/svg/EU.svg @@ -0,0 +1,2 @@ + diff --git a/svg/FIN.svg b/svg/FIN.svg new file mode 100644 index 0000000..fd6f395 --- /dev/null +++ b/svg/FIN.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/FJI.svg b/svg/FJI.svg new file mode 100644 index 0000000..8f0c1d2 --- /dev/null +++ b/svg/FJI.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/FRA.svg b/svg/FRA.svg new file mode 100644 index 0000000..0a22bf3 --- /dev/null +++ b/svg/FRA.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svg/FRO.svg b/svg/FRO.svg new file mode 100644 index 0000000..ddc6a76 --- /dev/null +++ b/svg/FRO.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/GAB.svg b/svg/GAB.svg new file mode 100644 index 0000000..1f00849 --- /dev/null +++ b/svg/GAB.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/GBR.svg b/svg/GBR.svg new file mode 100644 index 0000000..6485875 --- /dev/null +++ b/svg/GBR.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svg/GEO.svg b/svg/GEO.svg new file mode 100644 index 0000000..58f6454 --- /dev/null +++ b/svg/GEO.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/GHA.svg b/svg/GHA.svg new file mode 100644 index 0000000..8828300 --- /dev/null +++ b/svg/GHA.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/GIN.svg b/svg/GIN.svg new file mode 100644 index 0000000..c852f02 --- /dev/null +++ b/svg/GIN.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/GMB.svg b/svg/GMB.svg new file mode 100644 index 0000000..5c9eddf --- /dev/null +++ b/svg/GMB.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/GNB.svg b/svg/GNB.svg new file mode 100644 index 0000000..8e3e6df --- /dev/null +++ b/svg/GNB.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/GNQ.svg b/svg/GNQ.svg new file mode 100644 index 0000000..f71be08 --- /dev/null +++ b/svg/GNQ.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/GRC.svg b/svg/GRC.svg new file mode 100644 index 0000000..f41f4f4 --- /dev/null +++ b/svg/GRC.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/GRL.svg b/svg/GRL.svg new file mode 100644 index 0000000..ce1d349 --- /dev/null +++ b/svg/GRL.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/GTM.svg b/svg/GTM.svg new file mode 100644 index 0000000..9279c25 --- /dev/null +++ b/svg/GTM.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/GUY.svg b/svg/GUY.svg new file mode 100644 index 0000000..0d513e1 --- /dev/null +++ b/svg/GUY.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/HND.svg b/svg/HND.svg new file mode 100644 index 0000000..e7f480a --- /dev/null +++ b/svg/HND.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/HRV.svg b/svg/HRV.svg new file mode 100644 index 0000000..ab731b2 --- /dev/null +++ b/svg/HRV.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/HTI.svg b/svg/HTI.svg new file mode 100644 index 0000000..0a4c8eb --- /dev/null +++ b/svg/HTI.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/HUN.svg b/svg/HUN.svg new file mode 100644 index 0000000..8e136d2 --- /dev/null +++ b/svg/HUN.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/IDN.svg b/svg/IDN.svg new file mode 100644 index 0000000..19965e4 --- /dev/null +++ b/svg/IDN.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/IND.svg b/svg/IND.svg new file mode 100644 index 0000000..8607b7e --- /dev/null +++ b/svg/IND.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/IRL.svg b/svg/IRL.svg new file mode 100644 index 0000000..36baa2d --- /dev/null +++ b/svg/IRL.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/IRN.svg b/svg/IRN.svg new file mode 100644 index 0000000..714f6e9 --- /dev/null +++ b/svg/IRN.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/IRQ.svg b/svg/IRQ.svg new file mode 100644 index 0000000..deeeb41 --- /dev/null +++ b/svg/IRQ.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/ISL.svg b/svg/ISL.svg new file mode 100644 index 0000000..686c5ba --- /dev/null +++ b/svg/ISL.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/ISR.svg b/svg/ISR.svg new file mode 100644 index 0000000..056cf07 --- /dev/null +++ b/svg/ISR.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/ITA.svg b/svg/ITA.svg new file mode 100644 index 0000000..a2d0317 --- /dev/null +++ b/svg/ITA.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/JAM.svg b/svg/JAM.svg new file mode 100644 index 0000000..5fa702c --- /dev/null +++ b/svg/JAM.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/JOR.svg b/svg/JOR.svg new file mode 100644 index 0000000..1e65f8d --- /dev/null +++ b/svg/JOR.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/JPN.svg b/svg/JPN.svg new file mode 100644 index 0000000..b5cbd9a --- /dev/null +++ b/svg/JPN.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svg/KAZ.svg b/svg/KAZ.svg new file mode 100644 index 0000000..1afb67e --- /dev/null +++ b/svg/KAZ.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/KEN.svg b/svg/KEN.svg new file mode 100644 index 0000000..e9e6ba8 --- /dev/null +++ b/svg/KEN.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/KGZ.svg b/svg/KGZ.svg new file mode 100644 index 0000000..155b179 --- /dev/null +++ b/svg/KGZ.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/KHM.svg b/svg/KHM.svg new file mode 100644 index 0000000..4a7c2db --- /dev/null +++ b/svg/KHM.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/KOR.svg b/svg/KOR.svg new file mode 100644 index 0000000..93348e0 --- /dev/null +++ b/svg/KOR.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/KWT.svg b/svg/KWT.svg new file mode 100644 index 0000000..8493dda --- /dev/null +++ b/svg/KWT.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/LAO.svg b/svg/LAO.svg new file mode 100644 index 0000000..c029e74 --- /dev/null +++ b/svg/LAO.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/LBN.svg b/svg/LBN.svg new file mode 100644 index 0000000..aebb292 --- /dev/null +++ b/svg/LBN.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/LBR.svg b/svg/LBR.svg new file mode 100644 index 0000000..bd42df5 --- /dev/null +++ b/svg/LBR.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/LBY.svg b/svg/LBY.svg new file mode 100644 index 0000000..7a471af --- /dev/null +++ b/svg/LBY.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/LKA.svg b/svg/LKA.svg new file mode 100644 index 0000000..4ff6455 --- /dev/null +++ b/svg/LKA.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/LSO.svg b/svg/LSO.svg new file mode 100644 index 0000000..7c6b211 --- /dev/null +++ b/svg/LSO.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/LTU.svg b/svg/LTU.svg new file mode 100644 index 0000000..65e6efd --- /dev/null +++ b/svg/LTU.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/LUX.svg b/svg/LUX.svg new file mode 100644 index 0000000..da81e22 --- /dev/null +++ b/svg/LUX.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/LVA.svg b/svg/LVA.svg new file mode 100644 index 0000000..b71dd3e --- /dev/null +++ b/svg/LVA.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/MAR.svg b/svg/MAR.svg new file mode 100644 index 0000000..3ed5e22 --- /dev/null +++ b/svg/MAR.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/MDA.svg b/svg/MDA.svg new file mode 100644 index 0000000..c7669c4 --- /dev/null +++ b/svg/MDA.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/MDG.svg b/svg/MDG.svg new file mode 100644 index 0000000..f6dc836 --- /dev/null +++ b/svg/MDG.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/MEX.svg b/svg/MEX.svg new file mode 100644 index 0000000..d7bc895 --- /dev/null +++ b/svg/MEX.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/MKD.svg b/svg/MKD.svg new file mode 100644 index 0000000..3f4c7f0 --- /dev/null +++ b/svg/MKD.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/MLI.svg b/svg/MLI.svg new file mode 100644 index 0000000..687f25b --- /dev/null +++ b/svg/MLI.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/MMR.svg b/svg/MMR.svg new file mode 100644 index 0000000..4cb5346 --- /dev/null +++ b/svg/MMR.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/MNE.svg b/svg/MNE.svg new file mode 100644 index 0000000..1f993bb --- /dev/null +++ b/svg/MNE.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/MNG.svg b/svg/MNG.svg new file mode 100644 index 0000000..6db1d54 --- /dev/null +++ b/svg/MNG.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/MOZ.svg b/svg/MOZ.svg new file mode 100644 index 0000000..a6b4e3e --- /dev/null +++ b/svg/MOZ.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/MRT.svg b/svg/MRT.svg new file mode 100644 index 0000000..7e2ccfd --- /dev/null +++ b/svg/MRT.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/MWI.svg b/svg/MWI.svg new file mode 100644 index 0000000..bcdff56 --- /dev/null +++ b/svg/MWI.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/MYS.svg b/svg/MYS.svg new file mode 100644 index 0000000..0d3fd84 --- /dev/null +++ b/svg/MYS.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/NA.svg b/svg/NA.svg new file mode 100644 index 0000000..e119622 --- /dev/null +++ b/svg/NA.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/NAM.svg b/svg/NAM.svg new file mode 100644 index 0000000..e54144f --- /dev/null +++ b/svg/NAM.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/NCL.svg b/svg/NCL.svg new file mode 100644 index 0000000..ebe6b62 --- /dev/null +++ b/svg/NCL.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/NER.svg b/svg/NER.svg new file mode 100644 index 0000000..c196f39 --- /dev/null +++ b/svg/NER.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/NFK.svg b/svg/NFK.svg new file mode 100644 index 0000000..12cf59f --- /dev/null +++ b/svg/NFK.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/NGA.svg b/svg/NGA.svg new file mode 100644 index 0000000..9f20cdb --- /dev/null +++ b/svg/NGA.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/NIC.svg b/svg/NIC.svg new file mode 100644 index 0000000..802241c --- /dev/null +++ b/svg/NIC.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/NLD.svg b/svg/NLD.svg new file mode 100644 index 0000000..0b6e814 --- /dev/null +++ b/svg/NLD.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/NOR.svg b/svg/NOR.svg new file mode 100644 index 0000000..51d741e --- /dev/null +++ b/svg/NOR.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/NPL.svg b/svg/NPL.svg new file mode 100644 index 0000000..4ab700c --- /dev/null +++ b/svg/NPL.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/NZL.svg b/svg/NZL.svg new file mode 100644 index 0000000..ada46d9 --- /dev/null +++ b/svg/NZL.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svg/OC.svg b/svg/OC.svg new file mode 100644 index 0000000..67efc78 --- /dev/null +++ b/svg/OC.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/OMN.svg b/svg/OMN.svg new file mode 100644 index 0000000..5b05bbe --- /dev/null +++ b/svg/OMN.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/PAK.svg b/svg/PAK.svg new file mode 100644 index 0000000..6597de8 --- /dev/null +++ b/svg/PAK.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/PAN.svg b/svg/PAN.svg new file mode 100644 index 0000000..04d4ce4 --- /dev/null +++ b/svg/PAN.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/PER.svg b/svg/PER.svg new file mode 100644 index 0000000..c03b973 --- /dev/null +++ b/svg/PER.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/PHL.svg b/svg/PHL.svg new file mode 100644 index 0000000..e656c66 --- /dev/null +++ b/svg/PHL.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/PNG.svg b/svg/PNG.svg new file mode 100644 index 0000000..cba3c65 --- /dev/null +++ b/svg/PNG.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/POL.svg b/svg/POL.svg new file mode 100644 index 0000000..d6411c2 --- /dev/null +++ b/svg/POL.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svg/PRK.svg b/svg/PRK.svg new file mode 100644 index 0000000..6f25e7a --- /dev/null +++ b/svg/PRK.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/PRT.svg b/svg/PRT.svg new file mode 100644 index 0000000..f24d9fc --- /dev/null +++ b/svg/PRT.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/PRY.svg b/svg/PRY.svg new file mode 100644 index 0000000..5f919bb --- /dev/null +++ b/svg/PRY.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/QAT.svg b/svg/QAT.svg new file mode 100644 index 0000000..482f9eb --- /dev/null +++ b/svg/QAT.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/ROU.svg b/svg/ROU.svg new file mode 100644 index 0000000..4762a69 --- /dev/null +++ b/svg/ROU.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/RUS.svg b/svg/RUS.svg new file mode 100644 index 0000000..6f53335 --- /dev/null +++ b/svg/RUS.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/RWA.svg b/svg/RWA.svg new file mode 100644 index 0000000..bdebc08 --- /dev/null +++ b/svg/RWA.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/SA.svg b/svg/SA.svg new file mode 100644 index 0000000..7d7a587 --- /dev/null +++ b/svg/SA.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/SAU.svg b/svg/SAU.svg new file mode 100644 index 0000000..a294832 --- /dev/null +++ b/svg/SAU.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/SDN.svg b/svg/SDN.svg new file mode 100644 index 0000000..decf7b2 --- /dev/null +++ b/svg/SDN.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/SEN.svg b/svg/SEN.svg new file mode 100644 index 0000000..d47af16 --- /dev/null +++ b/svg/SEN.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/SLB.svg b/svg/SLB.svg new file mode 100644 index 0000000..eab488f --- /dev/null +++ b/svg/SLB.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/SLE.svg b/svg/SLE.svg new file mode 100644 index 0000000..1630e18 --- /dev/null +++ b/svg/SLE.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/SLV.svg b/svg/SLV.svg new file mode 100644 index 0000000..51001f2 --- /dev/null +++ b/svg/SLV.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/SOM.svg b/svg/SOM.svg new file mode 100644 index 0000000..0b363e0 --- /dev/null +++ b/svg/SOM.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/SRB.svg b/svg/SRB.svg new file mode 100644 index 0000000..36b6e8d --- /dev/null +++ b/svg/SRB.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/SSD.svg b/svg/SSD.svg new file mode 100644 index 0000000..d1b200c --- /dev/null +++ b/svg/SSD.svg @@ -0,0 +1,2 @@ + diff --git a/svg/SUR.svg b/svg/SUR.svg new file mode 100644 index 0000000..9eca3f1 --- /dev/null +++ b/svg/SUR.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/SVK.svg b/svg/SVK.svg new file mode 100644 index 0000000..9df27fd --- /dev/null +++ b/svg/SVK.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/SVN.svg b/svg/SVN.svg new file mode 100644 index 0000000..30c0d83 --- /dev/null +++ b/svg/SVN.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svg/SWE.svg b/svg/SWE.svg new file mode 100644 index 0000000..c67a194 --- /dev/null +++ b/svg/SWE.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/SWZ.svg b/svg/SWZ.svg new file mode 100644 index 0000000..e21b25d --- /dev/null +++ b/svg/SWZ.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/SYR.svg b/svg/SYR.svg new file mode 100644 index 0000000..c3f99cf --- /dev/null +++ b/svg/SYR.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/TCD.svg b/svg/TCD.svg new file mode 100644 index 0000000..888ca01 --- /dev/null +++ b/svg/TCD.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/TGO.svg b/svg/TGO.svg new file mode 100644 index 0000000..816a644 --- /dev/null +++ b/svg/TGO.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/THA.svg b/svg/THA.svg new file mode 100644 index 0000000..e42fb46 --- /dev/null +++ b/svg/THA.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/TJK.svg b/svg/TJK.svg new file mode 100644 index 0000000..e7a1ca3 --- /dev/null +++ b/svg/TJK.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/TKM.svg b/svg/TKM.svg new file mode 100644 index 0000000..ab60c5c --- /dev/null +++ b/svg/TKM.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/TLS.svg b/svg/TLS.svg new file mode 100644 index 0000000..e1c22a0 --- /dev/null +++ b/svg/TLS.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/TTO.svg b/svg/TTO.svg new file mode 100644 index 0000000..6c59789 --- /dev/null +++ b/svg/TTO.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/TUN.svg b/svg/TUN.svg new file mode 100644 index 0000000..f395f1f --- /dev/null +++ b/svg/TUN.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/TUR.svg b/svg/TUR.svg new file mode 100644 index 0000000..178c296 --- /dev/null +++ b/svg/TUR.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/TWN.svg b/svg/TWN.svg new file mode 100644 index 0000000..b0a2e25 --- /dev/null +++ b/svg/TWN.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/TZA.svg b/svg/TZA.svg new file mode 100644 index 0000000..2d1436b --- /dev/null +++ b/svg/TZA.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/UGA.svg b/svg/UGA.svg new file mode 100644 index 0000000..cdb157a --- /dev/null +++ b/svg/UGA.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/UKR.svg b/svg/UKR.svg new file mode 100644 index 0000000..7569efb --- /dev/null +++ b/svg/UKR.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/URY.svg b/svg/URY.svg new file mode 100644 index 0000000..ee27c7d --- /dev/null +++ b/svg/URY.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/USA.svg b/svg/USA.svg new file mode 100644 index 0000000..586c550 --- /dev/null +++ b/svg/USA.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svg/UZB.svg b/svg/UZB.svg new file mode 100644 index 0000000..9463718 --- /dev/null +++ b/svg/UZB.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/VEN.svg b/svg/VEN.svg new file mode 100644 index 0000000..03cd368 --- /dev/null +++ b/svg/VEN.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/VNM.svg b/svg/VNM.svg new file mode 100644 index 0000000..df77e0a --- /dev/null +++ b/svg/VNM.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/VUT.svg b/svg/VUT.svg new file mode 100644 index 0000000..a77b3b0 --- /dev/null +++ b/svg/VUT.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/YEM.svg b/svg/YEM.svg new file mode 100644 index 0000000..6e3b561 --- /dev/null +++ b/svg/YEM.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/ZAF.svg b/svg/ZAF.svg new file mode 100644 index 0000000..ab2d6e8 --- /dev/null +++ b/svg/ZAF.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/ZMB.svg b/svg/ZMB.svg new file mode 100644 index 0000000..542bb26 --- /dev/null +++ b/svg/ZMB.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/ZWE.svg b/svg/ZWE.svg new file mode 100644 index 0000000..5f0ac14 --- /dev/null +++ b/svg/ZWE.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/tmp.svg b/svg/tmp.svg new file mode 100644 index 0000000..fd6f395 --- /dev/null +++ b/svg/tmp.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/svg/world.svg b/svg/world.svg new file mode 100644 index 0000000..8929e6a --- /dev/null +++ b/svg/world.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/templates/visitorMap.twig b/templates/visitorMap.twig new file mode 100644 index 0000000..66f6a5c --- /dev/null +++ b/templates/visitorMap.twig @@ -0,0 +1,106 @@ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {% if noData %} +
{{ 'CoreHome_ThereIsNoDataForThisReport'|translate }}
+ {% else %} + + + {{ 'General_LoadingData'|translate }}... + + {% endif %} +
+
+
+ + + + +
+
+
+
+ +{% if not noData %} + + +{% endif %}