hyrax 3.2.0 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +3 -6
- data/.dassie/.env +1 -2
- data/.dassie/Gemfile +7 -3
- data/.dassie/app/models/user.rb +0 -2
- data/.dassie/config/analytics.yml +12 -5
- data/.dassie/config/environments/development.rb +2 -0
- data/.dassie/config/initializers/hyrax.rb +2 -0
- data/.dassie/db/migrate/20210921150120_enable_uuid_extension.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20210921150121_create_orm_resources.valkyrie_engine.rb +19 -0
- data/.dassie/db/migrate/20210921150122_add_model_type_to_orm_resources.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20210921150123_change_model_type_to_internal_model.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20210921150124_create_path_gin_index.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20210921150125_create_internal_resource_index.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20210921150126_create_updated_at_index.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20210921150127_add_optimistic_locking_to_orm_resources.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20211130181150_create_default_administrative_set.rb +8 -0
- data/.dassie/db/schema.rb +20 -1
- data/.env +7 -4
- data/.github/workflows/main.yml +17 -0
- data/.github/workflows/release.yml +17 -0
- data/.gitignore +1 -0
- data/.regen +1 -1
- data/CONTAINERS.md +13 -10
- data/README.md +37 -0
- data/app/assets/javascripts/hyrax/admin/graphs.es6 +34 -37
- data/app/assets/javascripts/hyrax/analytics_events.js +69 -0
- data/app/assets/javascripts/hyrax/collapse.js +24 -0
- data/app/assets/javascripts/hyrax/collections.js +1 -2
- data/app/assets/javascripts/hyrax/ga_events.js +2 -8
- data/app/assets/javascripts/hyrax/reports-buttons.js +33 -0
- data/app/assets/javascripts/hyrax.js +2 -1
- data/app/assets/stylesheets/_bootstrap-default-overrides.scss +9 -0
- data/app/authorities/qa/authorities/collections.rb +4 -5
- data/app/authorities/qa/authorities/find_works.rb +1 -1
- data/app/controllers/concerns/hyrax/breadcrumbs_for_collection_analytics.rb +26 -0
- data/app/controllers/concerns/hyrax/breadcrumbs_for_works_analytics.rb +26 -0
- data/app/controllers/concerns/hyrax/controller.rb +22 -0
- data/app/controllers/hyrax/admin/analytics/analytics_controller.rb +40 -0
- data/app/controllers/hyrax/admin/analytics/collection_reports_controller.rb +61 -0
- data/app/controllers/hyrax/admin/analytics/work_reports_controller.rb +122 -0
- data/app/controllers/hyrax/collections_controller.rb +4 -1
- data/app/controllers/hyrax/dashboard/collections_controller.rb +15 -6
- data/app/controllers/hyrax/dashboard_controller.rb +8 -0
- data/app/controllers/hyrax/stats_controller.rb +3 -1
- data/app/forms/hyrax/forms/pcdm_collection_form.rb +3 -0
- data/app/indexers/hyrax/valkyrie_file_set_indexer.rb +1 -1
- data/app/jobs/characterize_job.rb +28 -1
- data/app/jobs/valkyrie_ingest_job.rb +56 -0
- data/app/models/concerns/hyrax/ability.rb +26 -5
- data/app/models/concerns/hyrax/solr_document/metadata.rb +1 -0
- data/app/models/file_download_stat.rb +4 -4
- data/app/models/hyrax/default_administrative_set.rb +42 -0
- data/app/models/hyrax/statistic.rb +31 -4
- data/app/presenters/hyrax/admin/dashboard_presenter.rb +8 -6
- data/app/presenters/hyrax/admin/repository_growth_presenter.rb +10 -5
- data/app/presenters/hyrax/admin/user_activity_presenter.rb +8 -12
- data/app/presenters/hyrax/file_set_presenter.rb +2 -0
- data/app/presenters/hyrax/menu_presenter.rb +4 -0
- data/app/presenters/hyrax/pcdm_member_presenter_factory.rb +1 -1
- data/app/presenters/hyrax/work_show_presenter.rb +5 -2
- data/app/presenters/hyrax/work_usage.rb +1 -0
- data/app/search_builders/hyrax/README.md +1 -1
- data/app/search_builders/hyrax/dashboard/collections_search_builder.rb +1 -1
- data/app/search_builders/hyrax/my/collections_search_builder.rb +1 -1
- data/app/services/hyrax/admin_set_create_service.rb +76 -14
- data/app/services/hyrax/analytics/google/events.rb +37 -0
- data/app/services/hyrax/analytics/google/events_daily.rb +72 -0
- data/app/services/hyrax/analytics/google/visits.rb +44 -0
- data/app/services/hyrax/analytics/google/visits_daily.rb +49 -0
- data/app/services/hyrax/analytics/google.rb +204 -0
- data/app/services/hyrax/analytics/matomo.rb +193 -0
- data/app/services/hyrax/analytics/results.rb +79 -0
- data/app/services/hyrax/analytics.rb +12 -82
- data/app/services/hyrax/characterization/valkyrie_characterization_service.rb +134 -0
- data/app/services/hyrax/collections/nested_collection_query_service.rb +8 -3
- data/app/services/hyrax/listeners/acl_index_listener.rb +3 -1
- data/app/services/hyrax/listeners/active_fedora_acl_index_listener.rb +3 -1
- data/app/services/hyrax/listeners/batch_notification_listener.rb +3 -1
- data/app/services/hyrax/listeners/file_metadata_listener.rb +19 -0
- data/app/services/hyrax/listeners/file_set_lifecycle_listener.rb +6 -2
- data/app/services/hyrax/listeners/file_set_lifecycle_notification_listener.rb +6 -2
- data/app/services/hyrax/listeners/member_cleanup_listener.rb +3 -0
- data/app/services/hyrax/listeners/metadata_index_listener.rb +9 -3
- data/app/services/hyrax/listeners/object_lifecycle_listener.rb +9 -3
- data/app/services/hyrax/listeners/proxy_deposit_listener.rb +3 -1
- data/app/services/hyrax/listeners/trophy_cleanup_listener.rb +3 -0
- data/app/services/hyrax/listeners/workflow_listener.rb +3 -1
- data/app/services/hyrax/listeners.rb +8 -0
- data/app/services/hyrax/restriction_service.rb +4 -0
- data/app/services/hyrax/statistics/users/over_time.rb +8 -5
- data/app/services/hyrax/statistics/works/over_time.rb +10 -0
- data/app/services/hyrax/work_uploads_handler.rb +4 -1
- data/app/views/hyrax/admin/analytics/_date_range_form.html.erb +11 -0
- data/app/views/hyrax/admin/analytics/collection_reports/_custom_range.html.erb +39 -0
- data/app/views/hyrax/admin/analytics/collection_reports/_monthly_summary.html.erb +48 -0
- data/app/views/hyrax/admin/analytics/collection_reports/_summary.html.erb +55 -0
- data/app/views/hyrax/admin/analytics/collection_reports/_top_collections.html.erb +55 -0
- data/app/views/hyrax/admin/analytics/collection_reports/index.html.erb +70 -0
- data/app/views/hyrax/admin/analytics/collection_reports/show.html.erb +94 -0
- data/app/views/hyrax/admin/analytics/work_reports/_custom_range.html.erb +43 -0
- data/app/views/hyrax/admin/analytics/work_reports/_monthly_summary.html.erb +35 -0
- data/app/views/hyrax/admin/analytics/work_reports/_summary.html.erb +60 -0
- data/app/views/hyrax/admin/analytics/work_reports/_top_file_set_downloads.html.erb +33 -0
- data/app/views/hyrax/admin/analytics/work_reports/_top_works.html.erb +40 -0
- data/app/views/hyrax/admin/analytics/work_reports/_work_counts.html.erb +18 -0
- data/app/views/hyrax/admin/analytics/work_reports/_work_files.html.erb +41 -0
- data/app/views/hyrax/admin/analytics/work_reports/index.html.erb +77 -0
- data/app/views/hyrax/admin/analytics/work_reports/show.html.erb +90 -0
- data/app/views/hyrax/admin/stats/show.html.erb +1 -1
- data/app/views/hyrax/base/_relationships_parent_row.html.erb +0 -1
- data/app/views/hyrax/base/show.html.erb +6 -0
- data/app/views/hyrax/collections/show.html.erb +4 -0
- data/app/views/hyrax/dashboard/_repository_growth.html.erb +5 -5
- data/app/views/hyrax/dashboard/_resource_type_graph.html.erb +41 -0
- data/app/views/hyrax/dashboard/_sidebar.html.erb +4 -1
- data/app/views/hyrax/dashboard/_tabs.html.erb +11 -0
- data/app/views/hyrax/dashboard/_user_activity.html.erb +17 -23
- data/app/views/hyrax/dashboard/_user_activity_graph.html.erb +55 -0
- data/app/views/hyrax/dashboard/_visibility_graph.html.erb +31 -0
- data/app/views/hyrax/dashboard/_work_type_graph.html.erb +41 -0
- data/app/views/hyrax/dashboard/collections/_form.html.erb +2 -1
- data/app/views/hyrax/dashboard/show_admin.html.erb +24 -45
- data/app/views/hyrax/dashboard/sidebar/_activity.html.erb +22 -0
- data/app/views/hyrax/file_sets/_actions.html.erb +4 -3
- data/app/views/hyrax/file_sets/show.html.erb +6 -0
- data/app/views/hyrax/my/collections/index.html.erb +1 -1
- data/app/views/hyrax/stats/_downloads.html.erb +18 -0
- data/app/views/hyrax/stats/_pageviews.html.erb +18 -0
- data/app/views/hyrax/stats/work.html.erb +17 -9
- data/app/views/layouts/_head_tag_content.html.erb +7 -2
- data/app/views/{_ga.html.erb → shared/_ga.html.erb} +3 -7
- data/app/views/shared/_matomo.html.erb +15 -0
- data/chart/hyrax/Chart.yaml +1 -1
- data/chart/hyrax/values.yaml +1 -1
- data/config/i18n-tasks.yml +2 -2
- data/config/initializers/listeners.rb +5 -5
- data/config/locales/hyrax.de.yml +194 -0
- data/config/locales/hyrax.en.yml +190 -12
- data/config/locales/hyrax.es.yml +194 -0
- data/config/locales/hyrax.fr.yml +194 -0
- data/config/locales/hyrax.it.yml +194 -0
- data/config/locales/hyrax.pt-BR.yml +194 -0
- data/config/locales/hyrax.zh.yml +194 -0
- data/config/routes.rb +4 -0
- data/docker-compose.yml +3 -1
- data/documentation/developing-your-hyrax-based-app.md +2 -2
- data/documentation/legacyREADME.md +1 -1
- data/hyrax.gemspec +3 -1
- data/lib/generators/hyrax/templates/config/analytics.yml +13 -7
- data/lib/generators/hyrax/templates/config/initializers/hyrax.rb +0 -13
- data/lib/generators/hyrax/templates/db/migrate/20211130181150_create_default_administrative_set.rb.erb +8 -0
- data/lib/generators/hyrax/work/templates/feature_spec.rb.erb +3 -1
- data/lib/hyrax/configuration.rb +67 -5
- data/lib/hyrax/engine.rb +7 -6
- data/lib/hyrax/publisher.rb +4 -0
- data/lib/hyrax/transactions/admin_set_create.rb +22 -0
- data/lib/hyrax/transactions/container.rb +11 -0
- data/lib/hyrax/version.rb +1 -1
- data/lib/tasks/regenerate_derivatives.rake +1 -1
- data/lib/wings/setup.rb +15 -0
- data/lib/wings/valkyrie/persister.rb +16 -0
- data/template.rb +1 -1
- data/vendor/assets/javascripts/morris/morris.min.js +1 -7
- data/vendor/assets/stylesheets/morris.js/0.5.1/morris.css +1 -1
- metadata +87 -11
- data/app/views/hyrax/dashboard/_repository_objects.html.erb +0 -28
@@ -5,7 +5,7 @@ namespace :hyrax do
|
|
5
5
|
desc 'Regenerate derivatives for all FileSets in the repository'
|
6
6
|
task regenerate_derivatives: :environment do
|
7
7
|
FileSet.all.each do |fs|
|
8
|
-
fs.files.each { |fi| CreateDerivativesJob.perform_later(fs, fi) }
|
8
|
+
fs.files.each { |fi| CreateDerivativesJob.perform_later(fs, fi.id) }
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
data/lib/wings/setup.rb
CHANGED
@@ -42,6 +42,21 @@ module ActiveFedora
|
|
42
42
|
def self.properties
|
43
43
|
metadata.properties
|
44
44
|
end
|
45
|
+
|
46
|
+
def self.default_sort_params
|
47
|
+
["system_create_dtsi asc"]
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
module WithMetadata
|
52
|
+
class MetadataNode
|
53
|
+
##
|
54
|
+
# @note fcrepo rejects `:file_hash` updates. the attribute is managed by
|
55
|
+
# the data store. always drop it from changed attributes.
|
56
|
+
def changed_attributes
|
57
|
+
super.except(:file_hash)
|
58
|
+
end
|
59
|
+
end
|
45
60
|
end
|
46
61
|
|
47
62
|
module Associations
|
@@ -34,6 +34,9 @@ module Wings
|
|
34
34
|
|
35
35
|
resource_factory.to_resource(object: af_object)
|
36
36
|
rescue ActiveFedora::RecordInvalid, RuntimeError => err
|
37
|
+
raise MissingOrUnsavedFileError.new(err.message, obj: af_object) if
|
38
|
+
err.message == 'Save the file first'
|
39
|
+
|
37
40
|
raise FailedSaveError.new(err.message, obj: af_object)
|
38
41
|
end
|
39
42
|
|
@@ -69,10 +72,23 @@ module Wings
|
|
69
72
|
|
70
73
|
def initialize(msg = nil, obj:)
|
71
74
|
self.obj = obj
|
75
|
+
msg = "Failed to save object {obj}.\n" + msg
|
72
76
|
super(msg)
|
73
77
|
end
|
74
78
|
end
|
75
79
|
|
80
|
+
class MissingOrUnsavedFileError < FailedSaveError
|
81
|
+
def initialize(msg = nil, obj:)
|
82
|
+
msg = "Wings tried to save metadata for a file which has not " \
|
83
|
+
"been saved. Fedora creates a metadata node when the file is " \
|
84
|
+
"created, so it's not possible to add metadata for a file " \
|
85
|
+
"until the file contents are persisted.\n Use the " \
|
86
|
+
"Hyrax.storage_adapter to save the file before trying to " \
|
87
|
+
"save metadata.\n" + msg
|
88
|
+
super(msg, obj: obj)
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
76
92
|
private
|
77
93
|
|
78
94
|
##
|
data/template.rb
CHANGED
@@ -1,7 +1 @@
|
|
1
|
-
/* @license
|
2
|
-
morris.js v0.5.0
|
3
|
-
Copyright 2014 Olly Smith All rights reserved.
|
4
|
-
Licensed under the BSD-2-Clause License.
|
5
|
-
*/
|
6
|
-
(function(){var a,b,c,d,e=[].slice,f=function(a,b){return function(){return a.apply(b,arguments)}},g={}.hasOwnProperty,h=function(a,b){function c(){this.constructor=a}for(var d in b)g.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},i=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=window.Morris={},a=jQuery,b.EventEmitter=function(){function a(){}return a.prototype.on=function(a,b){return null==this.handlers&&(this.handlers={}),null==this.handlers[a]&&(this.handlers[a]=[]),this.handlers[a].push(b),this},a.prototype.fire=function(){var a,b,c,d,f,g,h;if(c=arguments[0],a=2<=arguments.length?e.call(arguments,1):[],null!=this.handlers&&null!=this.handlers[c]){for(g=this.handlers[c],h=[],d=0,f=g.length;f>d;d++)b=g[d],h.push(b.apply(null,a));return h}},a}(),b.commas=function(a){var b,c,d,e;return null!=a?(d=0>a?"-":"",b=Math.abs(a),c=Math.floor(b).toFixed(0),d+=c.replace(/(?=(?:\d{3})+$)(?!^)/g,","),e=b.toString(),e.length>c.length&&(d+=e.slice(c.length)),d):"-"},b.pad2=function(a){return(10>a?"0":"")+a},b.Grid=function(c){function d(b){this.resizeHandler=f(this.resizeHandler,this);var c=this;if(this.el="string"==typeof b.element?a(document.getElementById(b.element)):a(b.element),null==this.el||0===this.el.length)throw new Error("Graph container element not found");"static"===this.el.css("position")&&this.el.css("position","relative"),this.options=a.extend({},this.gridDefaults,this.defaults||{},b),"string"==typeof this.options.units&&(this.options.postUnits=b.units),this.raphael=new Raphael(this.el[0]),this.elementWidth=null,this.elementHeight=null,this.dirty=!1,this.selectFrom=null,this.init&&this.init(),this.setData(this.options.data),this.el.bind("mousemove",function(a){var b,d,e,f,g;return d=c.el.offset(),g=a.pageX-d.left,c.selectFrom?(b=c.data[c.hitTest(Math.min(g,c.selectFrom))]._x,e=c.data[c.hitTest(Math.max(g,c.selectFrom))]._x,f=e-b,c.selectionRect.attr({x:b,width:f})):c.fire("hovermove",g,a.pageY-d.top)}),this.el.bind("mouseleave",function(){return c.selectFrom&&(c.selectionRect.hide(),c.selectFrom=null),c.fire("hoverout")}),this.el.bind("touchstart touchmove touchend",function(a){var b,d;return d=a.originalEvent.touches[0]||a.originalEvent.changedTouches[0],b=c.el.offset(),c.fire("hovermove",d.pageX-b.left,d.pageY-b.top)}),this.el.bind("click",function(a){var b;return b=c.el.offset(),c.fire("gridclick",a.pageX-b.left,a.pageY-b.top)}),this.options.rangeSelect&&(this.selectionRect=this.raphael.rect(0,0,0,this.el.innerHeight()).attr({fill:this.options.rangeSelectColor,stroke:!1}).toBack().hide(),this.el.bind("mousedown",function(a){var b;return b=c.el.offset(),c.startRange(a.pageX-b.left)}),this.el.bind("mouseup",function(a){var b;return b=c.el.offset(),c.endRange(a.pageX-b.left),c.fire("hovermove",a.pageX-b.left,a.pageY-b.top)})),this.options.resize&&a(window).bind("resize",function(){return null!=c.timeoutId&&window.clearTimeout(c.timeoutId),c.timeoutId=window.setTimeout(c.resizeHandler,100)}),this.el.css("-webkit-tap-highlight-color","rgba(0,0,0,0)"),this.postInit&&this.postInit()}return h(d,c),d.prototype.gridDefaults={dateFormat:null,axes:!0,grid:!0,gridLineColor:"#aaa",gridStrokeWidth:.5,gridTextColor:"#888",gridTextSize:12,gridTextFamily:"sans-serif",gridTextWeight:"normal",hideHover:!1,yLabelFormat:null,xLabelAngle:0,numLines:5,padding:25,parseTime:!0,postUnits:"",preUnits:"",ymax:"auto",ymin:"auto 0",goals:[],goalStrokeWidth:1,goalLineColors:["#666633","#999966","#cc6666","#663333"],events:[],eventStrokeWidth:1,eventLineColors:["#005a04","#ccffbb","#3a5f0b","#005502"],rangeSelect:null,rangeSelectColor:"#eef",resize:!1},d.prototype.setData=function(a,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;return null==c&&(c=!0),this.options.data=a,null==a||0===a.length?(this.data=[],this.raphael.clear(),null!=this.hover&&this.hover.hide(),void 0):(o=this.cumulative?0:null,p=this.cumulative?0:null,this.options.goals.length>0&&(h=Math.min.apply(Math,this.options.goals),g=Math.max.apply(Math,this.options.goals),p=null!=p?Math.min(p,h):h,o=null!=o?Math.max(o,g):g),this.data=function(){var c,d,g;for(g=[],f=c=0,d=a.length;d>c;f=++c)j=a[f],i={src:j},i.label=j[this.options.xkey],this.options.parseTime?(i.x=b.parseDate(i.label),this.options.dateFormat?i.label=this.options.dateFormat(i.x):"number"==typeof i.label&&(i.label=new Date(i.label).toString())):(i.x=f,this.options.xLabelFormat&&(i.label=this.options.xLabelFormat(i))),l=0,i.y=function(){var a,b,c,d;for(c=this.options.ykeys,d=[],e=a=0,b=c.length;b>a;e=++a)n=c[e],q=j[n],"string"==typeof q&&(q=parseFloat(q)),null!=q&&"number"!=typeof q&&(q=null),null!=q&&(this.cumulative?l+=q:null!=o?(o=Math.max(q,o),p=Math.min(q,p)):o=p=q),this.cumulative&&null!=l&&(o=Math.max(l,o),p=Math.min(l,p)),d.push(q);return d}.call(this),g.push(i);return g}.call(this),this.options.parseTime&&(this.data=this.data.sort(function(a,b){return(a.x>b.x)-(b.x>a.x)})),this.xmin=this.data[0].x,this.xmax=this.data[this.data.length-1].x,this.events=[],this.options.events.length>0&&(this.events=this.options.parseTime?function(){var a,c,e,f;for(e=this.options.events,f=[],a=0,c=e.length;c>a;a++)d=e[a],f.push(b.parseDate(d));return f}.call(this):this.options.events,this.xmax=Math.max(this.xmax,Math.max.apply(Math,this.events)),this.xmin=Math.min(this.xmin,Math.min.apply(Math,this.events))),this.xmin===this.xmax&&(this.xmin-=1,this.xmax+=1),this.ymin=this.yboundary("min",p),this.ymax=this.yboundary("max",o),this.ymin===this.ymax&&(p&&(this.ymin-=1),this.ymax+=1),((r=this.options.axes)===!0||"both"===r||"y"===r||this.options.grid===!0)&&(this.options.ymax===this.gridDefaults.ymax&&this.options.ymin===this.gridDefaults.ymin?(this.grid=this.autoGridLines(this.ymin,this.ymax,this.options.numLines),this.ymin=Math.min(this.ymin,this.grid[0]),this.ymax=Math.max(this.ymax,this.grid[this.grid.length-1])):(k=(this.ymax-this.ymin)/(this.options.numLines-1),this.grid=function(){var a,b,c,d;for(d=[],m=a=b=this.ymin,c=this.ymax;k>0?c>=a:a>=c;m=a+=k)d.push(m);return d}.call(this))),this.dirty=!0,c?this.redraw():void 0)},d.prototype.yboundary=function(a,b){var c,d;return c=this.options["y"+a],"string"==typeof c?"auto"===c.slice(0,4)?c.length>5?(d=parseInt(c.slice(5),10),null==b?d:Math[a](b,d)):null!=b?b:0:parseInt(c,10):c},d.prototype.autoGridLines=function(a,b,c){var d,e,f,g,h,i,j,k,l;return h=b-a,l=Math.floor(Math.log(h)/Math.log(10)),j=Math.pow(10,l),e=Math.floor(a/j)*j,d=Math.ceil(b/j)*j,i=(d-e)/(c-1),1===j&&i>1&&Math.ceil(i)!==i&&(i=Math.ceil(i),d=e+i*(c-1)),0>e&&d>0&&(e=Math.floor(a/i)*i,d=Math.ceil(b/i)*i),1>i?(g=Math.floor(Math.log(i)/Math.log(10)),f=function(){var a,b;for(b=[],k=a=e;i>0?d>=a:a>=d;k=a+=i)b.push(parseFloat(k.toFixed(1-g)));return b}()):f=function(){var a,b;for(b=[],k=a=e;i>0?d>=a:a>=d;k=a+=i)b.push(k);return b}(),f},d.prototype._calc=function(){var a,b,c,d,e,f,g,h;return e=this.el.width(),c=this.el.height(),(this.elementWidth!==e||this.elementHeight!==c||this.dirty)&&(this.elementWidth=e,this.elementHeight=c,this.dirty=!1,this.left=this.options.padding,this.right=this.elementWidth-this.options.padding,this.top=this.options.padding,this.bottom=this.elementHeight-this.options.padding,((g=this.options.axes)===!0||"both"===g||"y"===g)&&(f=function(){var a,c,d,e;for(d=this.grid,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(this.measureText(this.yAxisFormat(b)).width);return e}.call(this),this.left+=Math.max.apply(Math,f)),((h=this.options.axes)===!0||"both"===h||"x"===h)&&(a=function(){var a,b,c;for(c=[],d=a=0,b=this.data.length;b>=0?b>a:a>b;d=b>=0?++a:--a)c.push(this.measureText(this.data[d].text,-this.options.xLabelAngle).height);return c}.call(this),this.bottom-=Math.max.apply(Math,a)),this.width=Math.max(1,this.right-this.left),this.height=Math.max(1,this.bottom-this.top),this.dx=this.width/(this.xmax-this.xmin),this.dy=this.height/(this.ymax-this.ymin),this.calc)?this.calc():void 0},d.prototype.transY=function(a){return this.bottom-(a-this.ymin)*this.dy},d.prototype.transX=function(a){return 1===this.data.length?(this.left+this.right)/2:this.left+(a-this.xmin)*this.dx},d.prototype.redraw=function(){return this.raphael.clear(),this._calc(),this.drawGrid(),this.drawGoals(),this.drawEvents(),this.draw?this.draw():void 0},d.prototype.measureText=function(a,b){var c,d;return null==b&&(b=0),d=this.raphael.text(100,100,a).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).rotate(b),c=d.getBBox(),d.remove(),c},d.prototype.yAxisFormat=function(a){return this.yLabelFormat(a)},d.prototype.yLabelFormat=function(a){return"function"==typeof this.options.yLabelFormat?this.options.yLabelFormat(a):""+this.options.preUnits+b.commas(a)+this.options.postUnits},d.prototype.drawGrid=function(){var a,b,c,d,e,f,g,h;if(this.options.grid!==!1||(e=this.options.axes)===!0||"both"===e||"y"===e){for(f=this.grid,h=[],c=0,d=f.length;d>c;c++)a=f[c],b=this.transY(a),((g=this.options.axes)===!0||"both"===g||"y"===g)&&this.drawYAxisLabel(this.left-this.options.padding/2,b,this.yAxisFormat(a)),this.options.grid?h.push(this.drawGridLine("M"+this.left+","+b+"H"+(this.left+this.width))):h.push(void 0);return h}},d.prototype.drawGoals=function(){var a,b,c,d,e,f,g;for(f=this.options.goals,g=[],c=d=0,e=f.length;e>d;c=++d)b=f[c],a=this.options.goalLineColors[c%this.options.goalLineColors.length],g.push(this.drawGoal(b,a));return g},d.prototype.drawEvents=function(){var a,b,c,d,e,f,g;for(f=this.events,g=[],c=d=0,e=f.length;e>d;c=++d)b=f[c],a=this.options.eventLineColors[c%this.options.eventLineColors.length],g.push(this.drawEvent(b,a));return g},d.prototype.drawGoal=function(a,b){return this.raphael.path("M"+this.left+","+this.transY(a)+"H"+this.right).attr("stroke",b).attr("stroke-width",this.options.goalStrokeWidth)},d.prototype.drawEvent=function(a,b){return this.raphael.path("M"+this.transX(a)+","+this.bottom+"V"+this.top).attr("stroke",b).attr("stroke-width",this.options.eventStrokeWidth)},d.prototype.drawYAxisLabel=function(a,b,c){return this.raphael.text(a,b,c).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor).attr("text-anchor","end")},d.prototype.drawGridLine=function(a){return this.raphael.path(a).attr("stroke",this.options.gridLineColor).attr("stroke-width",this.options.gridStrokeWidth)},d.prototype.startRange=function(a){return this.hover.hide(),this.selectFrom=a,this.selectionRect.attr({x:a,width:0}).show()},d.prototype.endRange=function(a){var b,c;return this.selectFrom?(c=Math.min(this.selectFrom,a),b=Math.max(this.selectFrom,a),this.options.rangeSelect.call(this.el,{start:this.data[this.hitTest(c)].x,end:this.data[this.hitTest(b)].x}),this.selectFrom=null):void 0},d.prototype.resizeHandler=function(){return this.timeoutId=null,this.raphael.setSize(this.el.width(),this.el.height()),this.redraw()},d}(b.EventEmitter),b.parseDate=function(a){var b,c,d,e,f,g,h,i,j,k,l;return"number"==typeof a?a:(c=a.match(/^(\d+) Q(\d)$/),e=a.match(/^(\d+)-(\d+)$/),f=a.match(/^(\d+)-(\d+)-(\d+)$/),h=a.match(/^(\d+) W(\d+)$/),i=a.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+)(Z|([+-])(\d\d):?(\d\d))?$/),j=a.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+):(\d+(\.\d+)?)(Z|([+-])(\d\d):?(\d\d))?$/),c?new Date(parseInt(c[1],10),3*parseInt(c[2],10)-1,1).getTime():e?new Date(parseInt(e[1],10),parseInt(e[2],10)-1,1).getTime():f?new Date(parseInt(f[1],10),parseInt(f[2],10)-1,parseInt(f[3],10)).getTime():h?(k=new Date(parseInt(h[1],10),0,1),4!==k.getDay()&&k.setMonth(0,1+(4-k.getDay()+7)%7),k.getTime()+6048e5*parseInt(h[2],10)):i?i[6]?(g=0,"Z"!==i[6]&&(g=60*parseInt(i[8],10)+parseInt(i[9],10),"+"===i[7]&&(g=0-g)),Date.UTC(parseInt(i[1],10),parseInt(i[2],10)-1,parseInt(i[3],10),parseInt(i[4],10),parseInt(i[5],10)+g)):new Date(parseInt(i[1],10),parseInt(i[2],10)-1,parseInt(i[3],10),parseInt(i[4],10),parseInt(i[5],10)).getTime():j?(l=parseFloat(j[6]),b=Math.floor(l),d=Math.round(1e3*(l-b)),j[8]?(g=0,"Z"!==j[8]&&(g=60*parseInt(j[10],10)+parseInt(j[11],10),"+"===j[9]&&(g=0-g)),Date.UTC(parseInt(j[1],10),parseInt(j[2],10)-1,parseInt(j[3],10),parseInt(j[4],10),parseInt(j[5],10)+g,b,d)):new Date(parseInt(j[1],10),parseInt(j[2],10)-1,parseInt(j[3],10),parseInt(j[4],10),parseInt(j[5],10),b,d).getTime()):new Date(parseInt(a,10),0,1).getTime())},b.Hover=function(){function c(c){null==c&&(c={}),this.options=a.extend({},b.Hover.defaults,c),this.el=a("<div class='"+this.options["class"]+"'></div>"),this.el.hide(),this.options.parent.append(this.el)}return c.defaults={"class":"morris-hover morris-default-style"},c.prototype.update=function(a,b,c){return a?(this.html(a),this.show(),this.moveTo(b,c)):this.hide()},c.prototype.html=function(a){return this.el.html(a)},c.prototype.moveTo=function(a,b){var c,d,e,f,g,h;return g=this.options.parent.innerWidth(),f=this.options.parent.innerHeight(),d=this.el.outerWidth(),c=this.el.outerHeight(),e=Math.min(Math.max(0,a-d/2),g-d),null!=b?(h=b-c-10,0>h&&(h=b+10,h+c>f&&(h=f/2-c/2))):h=f/2-c/2,this.el.css({left:e+"px",top:parseInt(h)+"px"})},c.prototype.show=function(){return this.el.show()},c.prototype.hide=function(){return this.el.hide()},c}(),b.Line=function(a){function c(a){return this.hilight=f(this.hilight,this),this.onHoverOut=f(this.onHoverOut,this),this.onHoverMove=f(this.onHoverMove,this),this.onGridClick=f(this.onGridClick,this),this instanceof b.Line?(c.__super__.constructor.call(this,a),void 0):new b.Line(a)}return h(c,a),c.prototype.init=function(){return"always"!==this.options.hideHover?(this.hover=new b.Hover({parent:this.el}),this.on("hovermove",this.onHoverMove),this.on("hoverout",this.onHoverOut),this.on("gridclick",this.onGridClick)):void 0},c.prototype.defaults={lineWidth:3,pointSize:4,lineColors:["#0b62a4","#7A92A3","#4da74d","#afd8f8","#edc240","#cb4b4b","#9440ed"],pointStrokeWidths:[1],pointStrokeColors:["#ffffff"],pointFillColors:[],smooth:!0,xLabels:"auto",xLabelFormat:null,xLabelMargin:24,hideHover:!1},c.prototype.calc=function(){return this.calcPoints(),this.generatePaths()},c.prototype.calcPoints=function(){var a,b,c,d,e,f;for(e=this.data,f=[],c=0,d=e.length;d>c;c++)a=e[c],a._x=this.transX(a.x),a._y=function(){var c,d,e,f;for(e=a.y,f=[],c=0,d=e.length;d>c;c++)b=e[c],null!=b?f.push(this.transY(b)):f.push(b);return f}.call(this),f.push(a._ymax=Math.min.apply(Math,[this.bottom].concat(function(){var c,d,e,f;for(e=a._y,f=[],c=0,d=e.length;d>c;c++)b=e[c],null!=b&&f.push(b);return f}())));return f},c.prototype.hitTest=function(a){var b,c,d,e,f;if(0===this.data.length)return null;for(f=this.data.slice(1),b=d=0,e=f.length;e>d&&(c=f[b],!(a<(c._x+this.data[b]._x)/2));b=++d);return b},c.prototype.onGridClick=function(a,b){var c;return c=this.hitTest(a),this.fire("click",c,this.data[c].src,a,b)},c.prototype.onHoverMove=function(a){var b;return b=this.hitTest(a),this.displayHoverForRow(b)},c.prototype.onHoverOut=function(){return this.options.hideHover!==!1?this.displayHoverForRow(null):void 0},c.prototype.displayHoverForRow=function(a){var b;return null!=a?((b=this.hover).update.apply(b,this.hoverContentForRow(a)),this.hilight(a)):(this.hover.hide(),this.hilight())},c.prototype.hoverContentForRow=function(a){var b,c,d,e,f,g,h;for(d=this.data[a],b="<div class='morris-hover-row-label'>"+d.label+"</div>",h=d.y,c=f=0,g=h.length;g>f;c=++f)e=h[c],b+="<div class='morris-hover-point' style='color: "+this.colorFor(d,c,"label")+"'>\n "+this.options.labels[c]+":\n "+this.yLabelFormat(e)+"\n</div>";return"function"==typeof this.options.hoverCallback&&(b=this.options.hoverCallback(a,this.options,b,d.src)),[b,d._x,d._ymax]},c.prototype.generatePaths=function(){var a,c,d,e;return this.paths=function(){var f,g,h,j;for(j=[],c=f=0,g=this.options.ykeys.length;g>=0?g>f:f>g;c=g>=0?++f:--f)e="boolean"==typeof this.options.smooth?this.options.smooth:(h=this.options.ykeys[c],i.call(this.options.smooth,h)>=0),a=function(){var a,b,e,f;for(e=this.data,f=[],a=0,b=e.length;b>a;a++)d=e[a],void 0!==d._y[c]&&f.push({x:d._x,y:d._y[c]});return f}.call(this),a.length>1?j.push(b.Line.createPath(a,e,this.bottom)):j.push(null);return j}.call(this)},c.prototype.draw=function(){var a;return((a=this.options.axes)===!0||"both"===a||"x"===a)&&this.drawXAxis(),this.drawSeries(),this.options.hideHover===!1?this.displayHoverForRow(this.data.length-1):void 0},c.prototype.drawXAxis=function(){var a,c,d,e,f,g,h,i,j,k,l=this;for(h=this.bottom+this.options.padding/2,f=null,e=null,a=function(a,b){var c,d,g,i,j;return c=l.drawXAxisLabel(l.transX(b),h,a),j=c.getBBox(),c.transform("r"+-l.options.xLabelAngle),d=c.getBBox(),c.transform("t0,"+d.height/2+"..."),0!==l.options.xLabelAngle&&(i=-.5*j.width*Math.cos(l.options.xLabelAngle*Math.PI/180),c.transform("t"+i+",0...")),d=c.getBBox(),(null==f||f>=d.x+d.width||null!=e&&e>=d.x)&&d.x>=0&&d.x+d.width<l.el.width()?(0!==l.options.xLabelAngle&&(g=1.25*l.options.gridTextSize/Math.sin(l.options.xLabelAngle*Math.PI/180),e=d.x-g),f=d.x-l.options.xLabelMargin):c.remove()},d=this.options.parseTime?1===this.data.length&&"auto"===this.options.xLabels?[[this.data[0].label,this.data[0].x]]:b.labelSeries(this.xmin,this.xmax,this.width,this.options.xLabels,this.options.xLabelFormat):function(){var a,b,c,d;for(c=this.data,d=[],a=0,b=c.length;b>a;a++)g=c[a],d.push([g.label,g.x]);return d}.call(this),d.reverse(),k=[],i=0,j=d.length;j>i;i++)c=d[i],k.push(a(c[0],c[1]));return k},c.prototype.drawSeries=function(){var a,b,c,d,e,f;for(this.seriesPoints=[],a=b=d=this.options.ykeys.length-1;0>=d?0>=b:b>=0;a=0>=d?++b:--b)this._drawLineFor(a);for(f=[],a=c=e=this.options.ykeys.length-1;0>=e?0>=c:c>=0;a=0>=e?++c:--c)f.push(this._drawPointFor(a));return f},c.prototype._drawPointFor=function(a){var b,c,d,e,f,g;for(this.seriesPoints[a]=[],f=this.data,g=[],d=0,e=f.length;e>d;d++)c=f[d],b=null,null!=c._y[a]&&(b=this.drawLinePoint(c._x,c._y[a],this.colorFor(c,a,"point"),a)),g.push(this.seriesPoints[a].push(b));return g},c.prototype._drawLineFor=function(a){var b;return b=this.paths[a],null!==b?this.drawLinePath(b,this.colorFor(null,a,"line"),a):void 0},c.createPath=function(a,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r;for(k="",c&&(g=b.Line.gradients(a)),l={y:null},h=q=0,r=a.length;r>q;h=++q)e=a[h],null!=e.y&&(null!=l.y?c?(f=g[h],j=g[h-1],i=(e.x-l.x)/4,m=l.x+i,o=Math.min(d,l.y+i*j),n=e.x-i,p=Math.min(d,e.y-i*f),k+="C"+m+","+o+","+n+","+p+","+e.x+","+e.y):k+="L"+e.x+","+e.y:c&&null==g[h]||(k+="M"+e.x+","+e.y)),l=e;return k},c.gradients=function(a){var b,c,d,e,f,g,h,i;for(c=function(a,b){return(a.y-b.y)/(a.x-b.x)},i=[],d=g=0,h=a.length;h>g;d=++g)b=a[d],null!=b.y?(e=a[d+1]||{y:null},f=a[d-1]||{y:null},null!=f.y&&null!=e.y?i.push(c(f,e)):null!=f.y?i.push(c(f,b)):null!=e.y?i.push(c(b,e)):i.push(null)):i.push(null);return i},c.prototype.hilight=function(a){var b,c,d,e,f;if(null!==this.prevHilight&&this.prevHilight!==a)for(b=c=0,e=this.seriesPoints.length-1;e>=0?e>=c:c>=e;b=e>=0?++c:--c)this.seriesPoints[b][this.prevHilight]&&this.seriesPoints[b][this.prevHilight].animate(this.pointShrinkSeries(b));if(null!==a&&this.prevHilight!==a)for(b=d=0,f=this.seriesPoints.length-1;f>=0?f>=d:d>=f;b=f>=0?++d:--d)this.seriesPoints[b][a]&&this.seriesPoints[b][a].animate(this.pointGrowSeries(b));return this.prevHilight=a},c.prototype.colorFor=function(a,b,c){return"function"==typeof this.options.lineColors?this.options.lineColors.call(this,a,b,c):"point"===c?this.options.pointFillColors[b%this.options.pointFillColors.length]||this.options.lineColors[b%this.options.lineColors.length]:this.options.lineColors[b%this.options.lineColors.length]},c.prototype.drawXAxisLabel=function(a,b,c){return this.raphael.text(a,b,c).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor)},c.prototype.drawLinePath=function(a,b,c){return this.raphael.path(a).attr("stroke",b).attr("stroke-width",this.lineWidthForSeries(c))},c.prototype.drawLinePoint=function(a,b,c,d){return this.raphael.circle(a,b,this.pointSizeForSeries(d)).attr("fill",c).attr("stroke-width",this.pointStrokeWidthForSeries(d)).attr("stroke",this.pointStrokeColorForSeries(d))},c.prototype.pointStrokeWidthForSeries=function(a){return this.options.pointStrokeWidths[a%this.options.pointStrokeWidths.length]},c.prototype.pointStrokeColorForSeries=function(a){return this.options.pointStrokeColors[a%this.options.pointStrokeColors.length]},c.prototype.lineWidthForSeries=function(a){return this.options.lineWidth instanceof Array?this.options.lineWidth[a%this.options.lineWidth.length]:this.options.lineWidth},c.prototype.pointSizeForSeries=function(a){return this.options.pointSize instanceof Array?this.options.pointSize[a%this.options.pointSize.length]:this.options.pointSize},c.prototype.pointGrowSeries=function(a){return Raphael.animation({r:this.pointSizeForSeries(a)+3},25,"linear")},c.prototype.pointShrinkSeries=function(a){return Raphael.animation({r:this.pointSizeForSeries(a)},25,"linear")},c}(b.Grid),b.labelSeries=function(c,d,e,f,g){var h,i,j,k,l,m,n,o,p,q,r;if(j=200*(d-c)/e,i=new Date(c),n=b.LABEL_SPECS[f],void 0===n)for(r=b.AUTO_LABEL_ORDER,p=0,q=r.length;q>p;p++)if(k=r[p],m=b.LABEL_SPECS[k],j>=m.span){n=m;break}for(void 0===n&&(n=b.LABEL_SPECS.second),g&&(n=a.extend({},n,{fmt:g})),h=n.start(i),l=[];(o=h.getTime())<=d;)o>=c&&l.push([n.fmt(h),o]),n.incr(h);return l},c=function(a){return{span:60*a*1e3,start:function(a){return new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours())},fmt:function(a){return""+b.pad2(a.getHours())+":"+b.pad2(a.getMinutes())},incr:function(b){return b.setUTCMinutes(b.getUTCMinutes()+a)}}},d=function(a){return{span:1e3*a,start:function(a){return new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes())},fmt:function(a){return""+b.pad2(a.getHours())+":"+b.pad2(a.getMinutes())+":"+b.pad2(a.getSeconds())},incr:function(b){return b.setUTCSeconds(b.getUTCSeconds()+a)}}},b.LABEL_SPECS={decade:{span:1728e8,start:function(a){return new Date(a.getFullYear()-a.getFullYear()%10,0,1)},fmt:function(a){return""+a.getFullYear()},incr:function(a){return a.setFullYear(a.getFullYear()+10)}},year:{span:1728e7,start:function(a){return new Date(a.getFullYear(),0,1)},fmt:function(a){return""+a.getFullYear()},incr:function(a){return a.setFullYear(a.getFullYear()+1)}},month:{span:24192e5,start:function(a){return new Date(a.getFullYear(),a.getMonth(),1)},fmt:function(a){return""+a.getFullYear()+"-"+b.pad2(a.getMonth()+1)},incr:function(a){return a.setMonth(a.getMonth()+1)}},week:{span:6048e5,start:function(a){return new Date(a.getFullYear(),a.getMonth(),a.getDate())},fmt:function(a){return""+a.getFullYear()+"-"+b.pad2(a.getMonth()+1)+"-"+b.pad2(a.getDate())},incr:function(a){return a.setDate(a.getDate()+7)}},day:{span:864e5,start:function(a){return new Date(a.getFullYear(),a.getMonth(),a.getDate())},fmt:function(a){return""+a.getFullYear()+"-"+b.pad2(a.getMonth()+1)+"-"+b.pad2(a.getDate())},incr:function(a){return a.setDate(a.getDate()+1)}},hour:c(60),"30min":c(30),"15min":c(15),"10min":c(10),"5min":c(5),minute:c(1),"30sec":d(30),"15sec":d(15),"10sec":d(10),"5sec":d(5),second:d(1)},b.AUTO_LABEL_ORDER=["decade","year","month","week","day","hour","30min","15min","10min","5min","minute","30sec","15sec","10sec","5sec","second"],b.Area=function(c){function d(c){var f;return this instanceof b.Area?(f=a.extend({},e,c),this.cumulative=!f.behaveLikeLine,"auto"===f.fillOpacity&&(f.fillOpacity=f.behaveLikeLine?.8:1),d.__super__.constructor.call(this,f),void 0):new b.Area(c)}var e;return h(d,c),e={fillOpacity:"auto",behaveLikeLine:!1},d.prototype.calcPoints=function(){var a,b,c,d,e,f,g;for(f=this.data,g=[],d=0,e=f.length;e>d;d++)a=f[d],a._x=this.transX(a.x),b=0,a._y=function(){var d,e,f,g;for(f=a.y,g=[],d=0,e=f.length;e>d;d++)c=f[d],this.options.behaveLikeLine?g.push(this.transY(c)):(b+=c||0,g.push(this.transY(b)));return g}.call(this),g.push(a._ymax=Math.max.apply(Math,a._y));return g},d.prototype.drawSeries=function(){var a,b,c,d,e,f,g,h;for(this.seriesPoints=[],b=this.options.behaveLikeLine?function(){f=[];for(var a=0,b=this.options.ykeys.length-1;b>=0?b>=a:a>=b;b>=0?a++:a--)f.push(a);return f}.apply(this):function(){g=[];for(var a=e=this.options.ykeys.length-1;0>=e?0>=a:a>=0;0>=e?a++:a--)g.push(a);return g}.apply(this),h=[],c=0,d=b.length;d>c;c++)a=b[c],this._drawFillFor(a),this._drawLineFor(a),h.push(this._drawPointFor(a));return h},d.prototype._drawFillFor=function(a){var b;return b=this.paths[a],null!==b?(b+="L"+this.transX(this.xmax)+","+this.bottom+"L"+this.transX(this.xmin)+","+this.bottom+"Z",this.drawFilledPath(b,this.fillForSeries(a))):void 0},d.prototype.fillForSeries=function(a){var b;return b=Raphael.rgb2hsl(this.colorFor(this.data[a],a,"line")),Raphael.hsl(b.h,this.options.behaveLikeLine?.9*b.s:.75*b.s,Math.min(.98,this.options.behaveLikeLine?1.2*b.l:1.25*b.l))},d.prototype.drawFilledPath=function(a,b){return this.raphael.path(a).attr("fill",b).attr("fill-opacity",this.options.fillOpacity).attr("stroke","none")},d}(b.Line),b.Bar=function(c){function d(c){return this.onHoverOut=f(this.onHoverOut,this),this.onHoverMove=f(this.onHoverMove,this),this.onGridClick=f(this.onGridClick,this),this instanceof b.Bar?(d.__super__.constructor.call(this,a.extend({},c,{parseTime:!1})),void 0):new b.Bar(c)}return h(d,c),d.prototype.init=function(){return this.cumulative=this.options.stacked,"always"!==this.options.hideHover?(this.hover=new b.Hover({parent:this.el}),this.on("hovermove",this.onHoverMove),this.on("hoverout",this.onHoverOut),this.on("gridclick",this.onGridClick)):void 0},d.prototype.defaults={barSizeRatio:.75,barGap:3,barColors:["#0b62a4","#7a92a3","#4da74d","#afd8f8","#edc240","#cb4b4b","#9440ed"],barOpacity:1,barRadius:[0,0,0,0],xLabelMargin:50},d.prototype.calc=function(){var a;return this.calcBars(),this.options.hideHover===!1?(a=this.hover).update.apply(a,this.hoverContentForRow(this.data.length-1)):void 0},d.prototype.calcBars=function(){var a,b,c,d,e,f,g;for(f=this.data,g=[],a=d=0,e=f.length;e>d;a=++d)b=f[a],b._x=this.left+this.width*(a+.5)/this.data.length,g.push(b._y=function(){var a,d,e,f;for(e=b.y,f=[],a=0,d=e.length;d>a;a++)c=e[a],null!=c?f.push(this.transY(c)):f.push(null);return f}.call(this));return g},d.prototype.draw=function(){var a;return((a=this.options.axes)===!0||"both"===a||"x"===a)&&this.drawXAxis(),this.drawSeries()},d.prototype.drawXAxis=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m;for(j=this.bottom+(this.options.xAxisLabelTopPadding||this.options.padding/2),g=null,f=null,m=[],a=k=0,l=this.data.length;l>=0?l>k:k>l;a=l>=0?++k:--k)h=this.data[this.data.length-1-a],b=this.drawXAxisLabel(h._x,j,h.label),i=b.getBBox(),b.transform("r"+-this.options.xLabelAngle),c=b.getBBox(),b.transform("t0,"+c.height/2+"..."),0!==this.options.xLabelAngle&&(e=-.5*i.width*Math.cos(this.options.xLabelAngle*Math.PI/180),b.transform("t"+e+",0...")),(null==g||g>=c.x+c.width||null!=f&&f>=c.x)&&c.x>=0&&c.x+c.width<this.el.width()?(0!==this.options.xLabelAngle&&(d=1.25*this.options.gridTextSize/Math.sin(this.options.xLabelAngle*Math.PI/180),f=c.x-d),m.push(g=c.x-this.options.xLabelMargin)):m.push(b.remove());return m},d.prototype.drawSeries=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;return c=this.width/this.options.data.length,h=this.options.stacked?1:this.options.ykeys.length,a=(c*this.options.barSizeRatio-this.options.barGap*(h-1))/h,this.options.barSize&&(a=Math.min(a,this.options.barSize)),l=c-a*h-this.options.barGap*(h-1),g=l/2,o=this.ymin<=0&&this.ymax>=0?this.transY(0):null,this.bars=function(){var h,l,p,q;for(p=this.data,q=[],d=h=0,l=p.length;l>h;d=++h)i=p[d],e=0,q.push(function(){var h,l,p,q;for(p=i._y,q=[],j=h=0,l=p.length;l>h;j=++h)n=p[j],null!==n?(o?(m=Math.min(n,o),b=Math.max(n,o)):(m=n,b=this.bottom),f=this.left+d*c+g,this.options.stacked||(f+=j*(a+this.options.barGap)),k=b-m,this.options.verticalGridCondition&&this.options.verticalGridCondition(i.x)&&this.drawBar(this.left+d*c,this.top,c,Math.abs(this.top-this.bottom),this.options.verticalGridColor,this.options.verticalGridOpacity,this.options.barRadius),this.options.stacked&&(m-=e),this.drawBar(f,m,a,k,this.colorFor(i,j,"bar"),this.options.barOpacity,this.options.barRadius),q.push(e+=k)):q.push(null);return q}.call(this));return q}.call(this)},d.prototype.colorFor=function(a,b,c){var d,e;return"function"==typeof this.options.barColors?(d={x:a.x,y:a.y[b],label:a.label},e={index:b,key:this.options.ykeys[b],label:this.options.labels[b]},this.options.barColors.call(this,d,e,c)):this.options.barColors[b%this.options.barColors.length]},d.prototype.hitTest=function(a){return 0===this.data.length?null:(a=Math.max(Math.min(a,this.right),this.left),Math.min(this.data.length-1,Math.floor((a-this.left)/(this.width/this.data.length))))},d.prototype.onGridClick=function(a,b){var c;return c=this.hitTest(a),this.fire("click",c,this.data[c].src,a,b)},d.prototype.onHoverMove=function(a){var b,c;return b=this.hitTest(a),(c=this.hover).update.apply(c,this.hoverContentForRow(b))},d.prototype.onHoverOut=function(){return this.options.hideHover!==!1?this.hover.hide():void 0},d.prototype.hoverContentForRow=function(a){var b,c,d,e,f,g,h,i;for(d=this.data[a],b="<div class='morris-hover-row-label'>"+d.label+"</div>",i=d.y,c=g=0,h=i.length;h>g;c=++g)f=i[c],b+="<div class='morris-hover-point' style='color: "+this.colorFor(d,c,"label")+"'>\n "+this.options.labels[c]+":\n "+this.yLabelFormat(f)+"\n</div>";return"function"==typeof this.options.hoverCallback&&(b=this.options.hoverCallback(a,this.options,b,d.src)),e=this.left+(a+.5)*this.width/this.data.length,[b,e]},d.prototype.drawXAxisLabel=function(a,b,c){var d;return d=this.raphael.text(a,b,c).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor)},d.prototype.drawBar=function(a,b,c,d,e,f,g){var h,i;return h=Math.max.apply(Math,g),i=0===h||h>d?this.raphael.rect(a,b,c,d):this.raphael.path(this.roundedRect(a,b,c,d,g)),i.attr("fill",e).attr("fill-opacity",f).attr("stroke","none")},d.prototype.roundedRect=function(a,b,c,d,e){return null==e&&(e=[0,0,0,0]),["M",a,e[0]+b,"Q",a,b,a+e[0],b,"L",a+c-e[1],b,"Q",a+c,b,a+c,b+e[1],"L",a+c,b+d-e[2],"Q",a+c,b+d,a+c-e[2],b+d,"L",a+e[3],b+d,"Q",a,b+d,a,b+d-e[3],"Z"]},d}(b.Grid),b.Donut=function(c){function d(c){this.resizeHandler=f(this.resizeHandler,this),this.select=f(this.select,this),this.click=f(this.click,this);var d=this;if(!(this instanceof b.Donut))return new b.Donut(c);if(this.options=a.extend({},this.defaults,c),this.el="string"==typeof c.element?a(document.getElementById(c.element)):a(c.element),null===this.el||0===this.el.length)throw new Error("Graph placeholder not found.");void 0!==c.data&&0!==c.data.length&&(this.raphael=new Raphael(this.el[0]),this.options.resize&&a(window).bind("resize",function(){return null!=d.timeoutId&&window.clearTimeout(d.timeoutId),d.timeoutId=window.setTimeout(d.resizeHandler,100)}),this.setData(c.data))}return h(d,c),d.prototype.defaults={colors:["#0B62A4","#3980B5","#679DC6","#95BBD7","#B0CCE1","#095791","#095085","#083E67","#052C48","#042135"],backgroundColor:"#FFFFFF",labelColor:"#000000",formatter:b.commas,resize:!1},d.prototype.redraw=function(){var a,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x;for(this.raphael.clear(),c=this.el.width()/2,d=this.el.height()/2,n=(Math.min(c,d)-10)/3,l=0,u=this.values,o=0,r=u.length;r>o;o++)m=u[o],l+=m;for(i=5/(2*n),a=1.9999*Math.PI-i*this.data.length,g=0,f=0,this.segments=[],v=this.values,e=p=0,s=v.length;s>p;e=++p)m=v[e],j=g+i+a*(m/l),k=new b.DonutSegment(c,d,2*n,n,g,j,this.data[e].color||this.options.colors[f%this.options.colors.length],this.options.backgroundColor,f,this.raphael),k.render(),this.segments.push(k),k.on("hover",this.select),k.on("click",this.click),g=j,f+=1;for(this.text1=this.drawEmptyDonutLabel(c,d-10,this.options.labelColor,15,800),this.text2=this.drawEmptyDonutLabel(c,d+10,this.options.labelColor,14),h=Math.max.apply(Math,this.values),f=0,w=this.values,x=[],q=0,t=w.length;t>q;q++){if(m=w[q],m===h){this.select(f);
|
7
|
-
break}x.push(f+=1)}return x},d.prototype.setData=function(a){var b;return this.data=a,this.values=function(){var a,c,d,e;for(d=this.data,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(parseFloat(b.value));return e}.call(this),this.redraw()},d.prototype.click=function(a){return this.fire("click",a,this.data[a])},d.prototype.select=function(a){var b,c,d,e,f,g;for(g=this.segments,e=0,f=g.length;f>e;e++)c=g[e],c.deselect();return d=this.segments[a],d.select(),b=this.data[a],this.setLabels(b.label,this.options.formatter(b.value,b))},d.prototype.setLabels=function(a,b){var c,d,e,f,g,h,i,j;return c=2*(Math.min(this.el.width()/2,this.el.height()/2)-10)/3,f=1.8*c,e=c/2,d=c/3,this.text1.attr({text:a,transform:""}),g=this.text1.getBBox(),h=Math.min(f/g.width,e/g.height),this.text1.attr({transform:"S"+h+","+h+","+(g.x+g.width/2)+","+(g.y+g.height)}),this.text2.attr({text:b,transform:""}),i=this.text2.getBBox(),j=Math.min(f/i.width,d/i.height),this.text2.attr({transform:"S"+j+","+j+","+(i.x+i.width/2)+","+i.y})},d.prototype.drawEmptyDonutLabel=function(a,b,c,d,e){var f;return f=this.raphael.text(a,b,"").attr("font-size",d).attr("fill",c),null!=e&&f.attr("font-weight",e),f},d.prototype.resizeHandler=function(){return this.timeoutId=null,this.raphael.setSize(this.el.width(),this.el.height()),this.redraw()},d}(b.EventEmitter),b.DonutSegment=function(a){function b(a,b,c,d,e,g,h,i,j,k){this.cx=a,this.cy=b,this.inner=c,this.outer=d,this.color=h,this.backgroundColor=i,this.index=j,this.raphael=k,this.deselect=f(this.deselect,this),this.select=f(this.select,this),this.sin_p0=Math.sin(e),this.cos_p0=Math.cos(e),this.sin_p1=Math.sin(g),this.cos_p1=Math.cos(g),this.is_long=g-e>Math.PI?1:0,this.path=this.calcSegment(this.inner+3,this.inner+this.outer-5),this.selectedPath=this.calcSegment(this.inner+3,this.inner+this.outer),this.hilight=this.calcArc(this.inner)}return h(b,a),b.prototype.calcArcPoints=function(a){return[this.cx+a*this.sin_p0,this.cy+a*this.cos_p0,this.cx+a*this.sin_p1,this.cy+a*this.cos_p1]},b.prototype.calcSegment=function(a,b){var c,d,e,f,g,h,i,j,k,l;return k=this.calcArcPoints(a),c=k[0],e=k[1],d=k[2],f=k[3],l=this.calcArcPoints(b),g=l[0],i=l[1],h=l[2],j=l[3],"M"+c+","+e+("A"+a+","+a+",0,"+this.is_long+",0,"+d+","+f)+("L"+h+","+j)+("A"+b+","+b+",0,"+this.is_long+",1,"+g+","+i)+"Z"},b.prototype.calcArc=function(a){var b,c,d,e,f;return f=this.calcArcPoints(a),b=f[0],d=f[1],c=f[2],e=f[3],"M"+b+","+d+("A"+a+","+a+",0,"+this.is_long+",0,"+c+","+e)},b.prototype.render=function(){var a=this;return this.arc=this.drawDonutArc(this.hilight,this.color),this.seg=this.drawDonutSegment(this.path,this.color,this.backgroundColor,function(){return a.fire("hover",a.index)},function(){return a.fire("click",a.index)})},b.prototype.drawDonutArc=function(a,b){return this.raphael.path(a).attr({stroke:b,"stroke-width":2,opacity:0})},b.prototype.drawDonutSegment=function(a,b,c,d,e){return this.raphael.path(a).attr({fill:b,stroke:c,"stroke-width":3}).hover(d).click(e)},b.prototype.select=function(){return this.selected?void 0:(this.seg.animate({path:this.selectedPath},150,"<>"),this.arc.animate({opacity:1},150,"<>"),this.selected=!0)},b.prototype.deselect=function(){return this.selected?(this.seg.animate({path:this.path},150,"<>"),this.arc.animate({opacity:0},150,"<>"),this.selected=!1):void 0},b}(b.EventEmitter)}).call(this);
|
1
|
+
(function(){var t,i,e,n,o=[].slice,s=function(t,i){return function(){return t.apply(i,arguments)}},r={}.hasOwnProperty,h=function(t,i){for(var e in i)r.call(i,e)&&(t[e]=i[e]);function n(){this.constructor=t}return n.prototype=i.prototype,t.prototype=new n,t.__super__=i.prototype,t},a=[].indexOf||function(t){for(var i=0,e=this.length;i<e;i++)if(i in this&&this[i]===t)return i;return-1};i=window.Morris={},t=jQuery,i.EventEmitter=function(){function t(){}return t.prototype.on=function(t,i){return null==this.handlers&&(this.handlers={}),null==this.handlers[t]&&(this.handlers[t]=[]),this.handlers[t].push(i),this},t.prototype.fire=function(){var t,i,e,n,s,r,h;if(e=arguments[0],t=2<=arguments.length?o.call(arguments,1):[],null!=this.handlers&&null!=this.handlers[e]){for(h=[],n=0,s=(r=this.handlers[e]).length;n<s;n++)i=r[n],h.push(i.apply(null,t));return h}},t}(),i.commas=function(t){var i,e,n,o;return null!=t?(n=t<0?"-":"",i=Math.abs(t),n+=(e=Math.floor(i).toFixed(0)).replace(/(?=(?:\d{3})+$)(?!^)/g,","),(o=i.toString()).length>e.length&&(n+=o.slice(e.length)),n):"-"},i.pad2=function(t){return(t<10?"0":"")+t},i.Grid=function(e){function n(i){this.resizeHandler=s(this.resizeHandler,this);var e=this;if("string"==typeof i.element?this.el=t(document.getElementById(i.element)):this.el=t(i.element),null==this.el||0===this.el.length)throw new Error("Graph container element not found");"static"===this.el.css("position")&&this.el.css("position","relative"),this.options=t.extend({},this.gridDefaults,this.defaults||{},i),"string"==typeof this.options.units&&(this.options.postUnits=i.units),this.raphael=new Raphael(this.el[0]),this.elementWidth=null,this.elementHeight=null,this.dirty=!1,this.selectFrom=null,this.init&&this.init(),this.setData(this.options.data),this.el.bind("mousemove",function(t){var i,n,o,s;return n=e.el.offset(),s=t.pageX-n.left,e.selectFrom?(i=e.data[e.hitTest(Math.min(s,e.selectFrom))]._x,o=e.data[e.hitTest(Math.max(s,e.selectFrom))]._x-i,e.selectionRect.attr({x:i,width:o})):e.fire("hovermove",s,t.pageY-n.top)}),this.el.bind("mouseleave",function(t){return e.selectFrom&&(e.selectionRect.hide(),e.selectFrom=null),e.fire("hoverout")}),this.el.bind("touchstart touchmove touchend",function(t){var i,n;return n=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],i=e.el.offset(),e.fire("hover",n.pageX-i.left,n.pageY-i.top),n}),this.el.bind("click",function(t){var i;return i=e.el.offset(),e.fire("gridclick",t.pageX-i.left,t.pageY-i.top)}),this.options.rangeSelect&&(this.selectionRect=this.raphael.rect(0,0,0,this.el.innerHeight()).attr({fill:this.options.rangeSelectColor,stroke:!1}).toBack().hide(),this.el.bind("mousedown",function(t){var i;return i=e.el.offset(),e.startRange(t.pageX-i.left)}),this.el.bind("mouseup",function(t){var i;return i=e.el.offset(),e.endRange(t.pageX-i.left),e.fire("hovermove",t.pageX-i.left,t.pageY-i.top)})),this.options.resize&&t(window).bind("resize",function(t){return null!=e.timeoutId&&window.clearTimeout(e.timeoutId),e.timeoutId=window.setTimeout(e.resizeHandler,100)}),this.postInit&&this.postInit()}return h(n,e),n.prototype.gridDefaults={dateFormat:null,axes:!0,grid:!0,gridLineColor:"#aaa",gridStrokeWidth:.5,gridTextColor:"#888",gridTextSize:12,gridTextFamily:"sans-serif",gridTextWeight:"normal",gridIntegers:!1,hideHover:!1,yLabelFormat:null,xLabelAngle:0,numLines:5,padding:25,parseTime:!0,postUnits:"",preUnits:"",ymax:"auto",ymin:"auto 0",goals:[],goalStrokeWidth:1,goalLineColors:["#666633","#999966","#cc6666","#663333"],events:[],eventStrokeWidth:1,eventLineColors:["#005a04","#ccffbb","#3a5f0b","#005502"],rangeSelect:null,rangeSelectColor:"#eef",resize:!1},n.prototype.setData=function(t,e){var n,o,s,r,h,a,l,p,u,c,d,f,g,m,y;return null==e&&(e=!0),this.options.data=t,null==t||0===t.length?(this.data=[],this.raphael.clear(),void(null!=this.hover&&this.hover.hide())):(f=this.cumulative?0:null,g=this.cumulative?0:null,this.options.goals.length>0&&(h=Math.min.apply(Math,this.options.goals),r=Math.max.apply(Math,this.options.goals),g=null!=g?Math.min(g,h):h,f=null!=f?Math.max(f,r):r),this.data=function(){var e,n,r;for(r=[],s=e=0,n=t.length;e<n;s=++e)l=t[s],(a={src:l}).label=l[this.options.xkey],this.options.parseTime?(a.x=i.parseDate(a.label),this.options.dateFormat?a.label=this.options.dateFormat(a.x):"number"==typeof a.label&&(a.label=new Date(a.label).toString())):(a.x=s,this.options.xLabelFormat&&(a.label=this.options.xLabelFormat(a))),u=0,a.y=function(){var t,i,e,n;for(e=this.options.ykeys,n=[],o=t=0,i=e.length;t<i;o=++t)d=e[o],"string"==typeof(m=l[d])&&(m=parseFloat(m)),null!=m&&"number"!=typeof m&&(m=null),null!=m&&(this.cumulative?u+=m:null!=f?(f=Math.max(m,f),g=Math.min(m,g)):f=g=m),this.cumulative&&null!=u&&(f=Math.max(u,f),g=Math.min(u,g)),n.push(m);return n}.call(this),r.push(a);return r}.call(this),this.options.parseTime&&(this.data=this.data.sort(function(t,i){return(t.x>i.x)-(i.x>t.x)})),this.xmin=this.data[0].x,this.xmax=this.data[this.data.length-1].x,this.events=[],this.options.events.length>0&&(this.options.parseTime?this.events=function(){var t,e,o,s;for(s=[],t=0,e=(o=this.options.events).length;t<e;t++)n=o[t],s.push(i.parseDate(n));return s}.call(this):this.events=this.options.events,this.xmax=Math.max(this.xmax,Math.max.apply(Math,this.events)),this.xmin=Math.min(this.xmin,Math.min.apply(Math,this.events))),this.xmin===this.xmax&&(this.xmin-=1,this.xmax+=1),this.ymin=this.yboundary("min",g),this.ymax=this.yboundary("max",f),this.ymin===this.ymax&&(g&&(this.ymin-=1),this.ymax+=1),!0!==(y=this.options.axes)&&"both"!==y&&"y"!==y&&!0!==this.options.grid||(this.options.ymax===this.gridDefaults.ymax&&this.options.ymin===this.gridDefaults.ymin?(this.grid=this.autoGridLines(this.ymin,this.ymax,this.options.numLines),this.ymin=Math.min(this.ymin,this.grid[0]),this.ymax=Math.max(this.ymax,this.grid[this.grid.length-1])):(p=(this.ymax-this.ymin)/(this.options.numLines-1),this.options.gridIntegers&&(p=Math.max(1,Math.round(p))),this.grid=function(){var t,i,e;for(e=[],c=t=this.ymin,i=this.ymax;p>0?t<=i:t>=i;c=t+=p)e.push(c);return e}.call(this))),this.dirty=!0,e?this.redraw():void 0)},n.prototype.yboundary=function(t,i){var e,n;return"string"==typeof(e=this.options["y"+t])?"auto"===e.slice(0,4)?e.length>5?(n=parseInt(e.slice(5),10),null==i?n:Math[t](i,n)):null!=i?i:0:parseInt(e,10):e},n.prototype.autoGridLines=function(t,i,e){var n,o,s,r,h,a,l,p,u;return h=i-t,u=Math.floor(Math.log(h)/Math.log(10)),l=Math.pow(10,u),o=Math.floor(t/l)*l,n=Math.ceil(i/l)*l,a=(n-o)/(e-1),1===l&&a>1&&Math.ceil(a)!==a&&(a=Math.ceil(a),n=o+a*(e-1)),o<0&&n>0&&(o=Math.floor(t/a)*a,n=Math.ceil(i/a)*a),a<1?(r=Math.floor(Math.log(a)/Math.log(10)),s=function(){var t,i;for(i=[],p=t=o;a>0?t<=n:t>=n;p=t+=a)i.push(parseFloat(p.toFixed(1-r)));return i}()):s=function(){var t,i;for(i=[],p=t=o;a>0?t<=n:t>=n;p=t+=a)i.push(p);return i}(),s},n.prototype._calc=function(){var t,i,e,n,o,s,r,h;if(o=this.el.width(),e=this.el.height(),(this.elementWidth!==o||this.elementHeight!==e||this.dirty)&&(this.elementWidth=o,this.elementHeight=e,this.dirty=!1,this.left=this.options.padding,this.right=this.elementWidth-this.options.padding,this.top=this.options.padding,this.bottom=this.elementHeight-this.options.padding,!0!==(r=this.options.axes)&&"both"!==r&&"y"!==r||(s=function(){var t,e,n,o;for(o=[],t=0,e=(n=this.grid).length;t<e;t++)i=n[t],o.push(this.measureText(this.yAxisFormat(i)).width);return o}.call(this),this.left+=Math.max.apply(Math,s)),!0!==(h=this.options.axes)&&"both"!==h&&"x"!==h||(t=function(){var t,i,e;for(e=[],n=t=0,i=this.data.length;0<=i?t<i:t>i;n=0<=i?++t:--t)e.push(this.measureText(this.data[n].text,-this.options.xLabelAngle).height);return e}.call(this),this.bottom-=Math.max.apply(Math,t)),this.width=Math.max(1,this.right-this.left),this.height=Math.max(1,this.bottom-this.top),this.dx=this.width/(this.xmax-this.xmin),this.dy=this.height/(this.ymax-this.ymin),this.calc))return this.calc()},n.prototype.transY=function(t){return this.bottom-(t-this.ymin)*this.dy},n.prototype.transX=function(t){return 1===this.data.length?(this.left+this.right)/2:this.left+(t-this.xmin)*this.dx},n.prototype.redraw=function(){if(this.raphael.clear(),this._calc(),this.drawGrid(),this.drawGoals(),this.drawEvents(),this.draw)return this.draw()},n.prototype.measureText=function(t,i){var e,n;return null==i&&(i=0),e=(n=this.raphael.text(100,100,t).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).rotate(i)).getBBox(),n.remove(),e},n.prototype.yAxisFormat=function(t){return this.yLabelFormat(t)},n.prototype.yLabelFormat=function(t){return"function"==typeof this.options.yLabelFormat?this.options.yLabelFormat(t):""+this.options.preUnits+i.commas(t)+this.options.postUnits},n.prototype.drawGrid=function(){var t,i,e,n,o,s,r,h;if(!1!==this.options.grid||!0===(o=this.options.axes)||"both"===o||"y"===o){for(h=[],e=0,n=(s=this.grid).length;e<n;e++)t=s[e],i=this.transY(t),!0!==(r=this.options.axes)&&"both"!==r&&"y"!==r||this.drawYAxisLabel(this.left-this.options.padding/2,i,this.yAxisFormat(t)),this.options.grid?h.push(this.drawGridLine("M"+this.left+","+i+"H"+(this.left+this.width))):h.push(void 0);return h}},n.prototype.drawGoals=function(){var t,i,e,n,o,s,r;for(r=[],e=n=0,o=(s=this.options.goals).length;n<o;e=++n)i=s[e],t=this.options.goalLineColors[e%this.options.goalLineColors.length],r.push(this.drawGoal(i,t));return r},n.prototype.drawEvents=function(){var t,i,e,n,o,s,r;for(r=[],e=n=0,o=(s=this.events).length;n<o;e=++n)i=s[e],t=this.options.eventLineColors[e%this.options.eventLineColors.length],r.push(this.drawEvent(i,t));return r},n.prototype.drawGoal=function(t,i){return this.raphael.path("M"+this.left+","+this.transY(t)+"H"+this.right).attr("stroke",i).attr("stroke-width",this.options.goalStrokeWidth)},n.prototype.drawEvent=function(t,i){return this.raphael.path("M"+this.transX(t)+","+this.bottom+"V"+this.top).attr("stroke",i).attr("stroke-width",this.options.eventStrokeWidth)},n.prototype.drawYAxisLabel=function(t,i,e){return this.raphael.text(t,i,e).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor).attr("text-anchor","end")},n.prototype.drawGridLine=function(t){return this.raphael.path(t).attr("stroke",this.options.gridLineColor).attr("stroke-width",this.options.gridStrokeWidth)},n.prototype.startRange=function(t){return this.hover.hide(),this.selectFrom=t,this.selectionRect.attr({x:t,width:0}).show()},n.prototype.endRange=function(t){var i,e;if(this.selectFrom)return e=Math.min(this.selectFrom,t),i=Math.max(this.selectFrom,t),this.options.rangeSelect.call(this.el,{start:this.data[this.hitTest(e)].x,end:this.data[this.hitTest(i)].x}),this.selectFrom=null},n.prototype.resizeHandler=function(){return this.timeoutId=null,this.raphael.setSize(this.el.width(),this.el.height()),this.redraw()},n}(i.EventEmitter),i.parseDate=function(t){var i,e,n,o,s,r,h,a,l,p,u;return"number"==typeof t?t:(e=t.match(/^(\d+) Q(\d)$/),o=t.match(/^(\d+)-(\d+)$/),s=t.match(/^(\d+)-(\d+)-(\d+)$/),h=t.match(/^(\d+) W(\d+)$/),a=t.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+)(Z|([+-])(\d\d):?(\d\d))?$/),l=t.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+):(\d+(\.\d+)?)(Z|([+-])(\d\d):?(\d\d))?$/),e?new Date(parseInt(e[1],10),3*parseInt(e[2],10)-1,1).getTime():o?new Date(parseInt(o[1],10),parseInt(o[2],10)-1,1).getTime():s?new Date(parseInt(s[1],10),parseInt(s[2],10)-1,parseInt(s[3],10)).getTime():h?(4!==(p=new Date(parseInt(h[1],10),0,1)).getDay()&&p.setMonth(0,1+(4-p.getDay()+7)%7),p.getTime()+6048e5*parseInt(h[2],10)):a?a[6]?(r=0,"Z"!==a[6]&&(r=60*parseInt(a[8],10)+parseInt(a[9],10),"+"===a[7]&&(r=0-r)),Date.UTC(parseInt(a[1],10),parseInt(a[2],10)-1,parseInt(a[3],10),parseInt(a[4],10),parseInt(a[5],10)+r)):new Date(parseInt(a[1],10),parseInt(a[2],10)-1,parseInt(a[3],10),parseInt(a[4],10),parseInt(a[5],10)).getTime():l?(u=parseFloat(l[6]),i=Math.floor(u),n=Math.round(1e3*(u-i)),l[8]?(r=0,"Z"!==l[8]&&(r=60*parseInt(l[10],10)+parseInt(l[11],10),"+"===l[9]&&(r=0-r)),Date.UTC(parseInt(l[1],10),parseInt(l[2],10)-1,parseInt(l[3],10),parseInt(l[4],10),parseInt(l[5],10)+r,i,n)):new Date(parseInt(l[1],10),parseInt(l[2],10)-1,parseInt(l[3],10),parseInt(l[4],10),parseInt(l[5],10),i,n).getTime()):new Date(parseInt(t,10),0,1).getTime())},i.Hover=function(){function e(e){null==e&&(e={}),this.options=t.extend({},i.Hover.defaults,e),this.el=t("<div class='"+this.options.class+"'></div>"),this.el.hide(),this.options.parent.append(this.el)}return e.defaults={class:"morris-hover morris-default-style"},e.prototype.update=function(t,i,e){return this.html(t),this.show(),this.moveTo(i,e)},e.prototype.html=function(t){return this.el.html(t)},e.prototype.moveTo=function(t,i){var e,n,o,s,r,h;return r=this.options.parent.innerWidth(),s=this.options.parent.innerHeight(),n=this.el.outerWidth(),e=this.el.outerHeight(),o=Math.min(Math.max(0,t-n/2),r-n),null!=i?(h=i-e-10)<0&&(h=i+10)+e>s&&(h=s/2-e/2):h=s/2-e/2,this.el.css({left:o+"px",top:parseInt(h)+"px"})},e.prototype.show=function(){return this.el.show()},e.prototype.hide=function(){return this.el.hide()},e}(),i.Line=function(t){function e(t){if(this.hilight=s(this.hilight,this),this.onHoverOut=s(this.onHoverOut,this),this.onHoverMove=s(this.onHoverMove,this),this.onGridClick=s(this.onGridClick,this),!(this instanceof i.Line))return new i.Line(t);e.__super__.constructor.call(this,t)}return h(e,t),e.prototype.init=function(){if("always"!==this.options.hideHover)return this.hover=new i.Hover({parent:this.el}),this.on("hovermove",this.onHoverMove),this.on("hoverout",this.onHoverOut),this.on("gridclick",this.onGridClick)},e.prototype.defaults={lineWidth:3,pointSize:4,lineColors:["#0b62a4","#7A92A3","#4da74d","#afd8f8","#edc240","#cb4b4b","#9440ed"],pointStrokeWidths:[1],pointStrokeColors:["#ffffff"],pointFillColors:[],smooth:!0,xLabels:"auto",xLabelFormat:null,xLabelMargin:24,continuousLine:!0,hideHover:!1},e.prototype.calc=function(){return this.calcPoints(),this.generatePaths()},e.prototype.calcPoints=function(){var t,i,e,n,o,s;for(s=[],e=0,n=(o=this.data).length;e<n;e++)(t=o[e])._x=this.transX(t.x),t._y=function(){var e,n,o,s;for(s=[],e=0,n=(o=t.y).length;e<n;e++)null!=(i=o[e])?s.push(this.transY(i)):s.push(i);return s}.call(this),s.push(t._ymax=Math.min.apply(Math,[this.bottom].concat(function(){var e,n,o,s;for(s=[],e=0,n=(o=t._y).length;e<n;e++)null!=(i=o[e])&&s.push(i);return s}())));return s},e.prototype.hitTest=function(t){var i,e,n,o;if(0===this.data.length)return null;for(i=e=0,n=(o=this.data.slice(1)).length;e<n&&!(t<(o[i]._x+this.data[i]._x)/2);i=++e);return i},e.prototype.onGridClick=function(t,i){var e;return e=this.hitTest(t),this.fire("click",e,this.data[e].src,t,i)},e.prototype.onHoverMove=function(t,i){var e;return e=this.hitTest(t),this.displayHoverForRow(e)},e.prototype.onHoverOut=function(){if(!1!==this.options.hideHover)return this.displayHoverForRow(null)},e.prototype.displayHoverForRow=function(t){var i;return null!=t?((i=this.hover).update.apply(i,this.hoverContentForRow(t)),this.hilight(t)):(this.hover.hide(),this.hilight())},e.prototype.hoverContentForRow=function(t){var i,e,n,o,s,r,h;for(i="<div class='morris-hover-row-label'>"+(n=this.data[t]).label+"</div>",e=s=0,r=(h=n.y).length;s<r;e=++s)o=h[e],i+="<div class='morris-hover-point' style='color: "+this.colorFor(n,e,"label")+"'>\n "+this.options.labels[e]+":\n "+this.yLabelFormat(o)+"\n</div>";return"function"==typeof this.options.hoverCallback&&(i=this.options.hoverCallback(t,this.options,i,n.src)),[i,n._x,n._ymax]},e.prototype.generatePaths=function(){var t,e,n,o,s;return this.paths=function(){var r,h,l,p;for(p=[],n=r=0,h=this.options.ykeys.length;0<=h?r<h:r>h;n=0<=h?++r:--r)s="boolean"==typeof this.options.smooth?this.options.smooth:(l=this.options.ykeys[n],a.call(this.options.smooth,l)>=0),e=function(){var t,i,e,s;for(s=[],t=0,i=(e=this.data).length;t<i;t++)void 0!==(o=e[t])._y[n]&&s.push({x:o._x,y:o._y[n]});return s}.call(this),this.options.continuousLine&&(e=function(){var i,n,o;for(o=[],i=0,n=e.length;i<n;i++)null!==(t=e[i]).y&&o.push(t);return o}()),e.length>1?p.push(i.Line.createPath(e,s,this.bottom)):p.push(null);return p}.call(this)},e.prototype.draw=function(){var t;if(!0!==(t=this.options.axes)&&"both"!==t&&"x"!==t||this.drawXAxis(),this.drawSeries(),!1===this.options.hideHover)return this.displayHoverForRow(this.data.length-1)},e.prototype.drawXAxis=function(){var t,e,n,o,s,r,h,a,l,p,u=this;for(h=this.bottom+this.options.padding/2,s=null,o=null,t=function(t,i){var e,n,r,a,l;return l=(e=u.drawXAxisLabel(u.transX(i),h,t)).getBBox(),e.transform("r"+-u.options.xLabelAngle),n=e.getBBox(),e.transform("t0,"+n.height/2+"..."),0!==u.options.xLabelAngle&&(a=-.5*l.width*Math.cos(u.options.xLabelAngle*Math.PI/180),e.transform("t"+a+",0...")),n=e.getBBox(),(null==s||s>=n.x+n.width||null!=o&&o>=n.x)&&n.x>=0&&n.x+n.width<u.el.width()?(0!==u.options.xLabelAngle&&(r=1.25*u.options.gridTextSize/Math.sin(u.options.xLabelAngle*Math.PI/180),o=n.x-r),s=n.x-u.options.xLabelMargin):e.remove()},(n=this.options.parseTime?1===this.data.length&&"auto"===this.options.xLabels?[[this.data[0].label,this.data[0].x]]:i.labelSeries(this.xmin,this.xmax,this.width,this.options.xLabels,this.options.xLabelFormat):function(){var t,i,e,n;for(n=[],t=0,i=(e=this.data).length;t<i;t++)r=e[t],n.push([r.label,r.x]);return n}.call(this)).reverse(),p=[],a=0,l=n.length;a<l;a++)e=n[a],p.push(t(e[0],e[1]));return p},e.prototype.drawSeries=function(){var t,i,e,n,o,s;for(this.seriesPoints=[],t=i=n=this.options.ykeys.length-1;n<=0?i<=0:i>=0;t=n<=0?++i:--i)this._drawLineFor(t);for(s=[],t=e=o=this.options.ykeys.length-1;o<=0?e<=0:e>=0;t=o<=0?++e:--e)s.push(this._drawPointFor(t));return s},e.prototype._drawPointFor=function(t){var i,e,n,o,s,r;for(this.seriesPoints[t]=[],r=[],n=0,o=(s=this.data).length;n<o;n++)i=null,null!=(e=s[n])._y[t]&&(i=this.drawLinePoint(e._x,e._y[t],this.colorFor(e,t,"point"),t)),r.push(this.seriesPoints[t].push(i));return r},e.prototype._drawLineFor=function(t){var i;if(null!==(i=this.paths[t]))return this.drawLinePath(i,this.colorFor(null,t,"line"),t)},e.createPath=function(t,e,n){var o,s,r,h,a,l,p,u,c,d;for(p="",e&&(r=i.Line.gradients(t)),u={y:null},h=c=0,d=t.length;c<d;h=++c)null!=(o=t[h]).y&&(null!=u.y?e?(s=r[h],l=r[h-1],a=(o.x-u.x)/4,p+="C"+(u.x+a)+","+Math.min(n,u.y+a*l)+","+(o.x-a)+","+Math.min(n,o.y-a*s)+","+o.x+","+o.y):p+="L"+o.x+","+o.y:e&&null==r[h]||(p+="M"+o.x+","+o.y)),u=o;return p},e.gradients=function(t){var i,e,n,o,s,r,h,a;for(e=function(t,i){return(t.y-i.y)/(t.x-i.x)},a=[],n=r=0,h=t.length;r<h;n=++r)null!=(i=t[n]).y?(o=t[n+1]||{y:null},null!=(s=t[n-1]||{y:null}).y&&null!=o.y?a.push(e(s,o)):null!=s.y?a.push(e(s,i)):null!=o.y?a.push(e(i,o)):a.push(null)):a.push(null);return a},e.prototype.hilight=function(t){var i,e,n,o,s;if(null!==this.prevHilight&&this.prevHilight!==t)for(i=e=0,o=this.seriesPoints.length-1;0<=o?e<=o:e>=o;i=0<=o?++e:--e)this.seriesPoints[i][this.prevHilight]&&this.seriesPoints[i][this.prevHilight].animate(this.pointShrinkSeries(i));if(null!==t&&this.prevHilight!==t)for(i=n=0,s=this.seriesPoints.length-1;0<=s?n<=s:n>=s;i=0<=s?++n:--n)this.seriesPoints[i][t]&&this.seriesPoints[i][t].animate(this.pointGrowSeries(i));return this.prevHilight=t},e.prototype.colorFor=function(t,i,e){return"function"==typeof this.options.lineColors?this.options.lineColors.call(this,t,i,e):"point"===e&&this.options.pointFillColors[i%this.options.pointFillColors.length]||this.options.lineColors[i%this.options.lineColors.length]},e.prototype.drawXAxisLabel=function(t,i,e){return this.raphael.text(t,i,e).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor)},e.prototype.drawLinePath=function(t,i,e){return this.raphael.path(t).attr("stroke",i).attr("stroke-width",this.lineWidthForSeries(e))},e.prototype.drawLinePoint=function(t,i,e,n){return this.raphael.circle(t,i,this.pointSizeForSeries(n)).attr("fill",e).attr("stroke-width",this.pointStrokeWidthForSeries(n)).attr("stroke",this.pointStrokeColorForSeries(n))},e.prototype.pointStrokeWidthForSeries=function(t){return this.options.pointStrokeWidths[t%this.options.pointStrokeWidths.length]},e.prototype.pointStrokeColorForSeries=function(t){return this.options.pointStrokeColors[t%this.options.pointStrokeColors.length]},e.prototype.lineWidthForSeries=function(t){return this.options.lineWidth instanceof Array?this.options.lineWidth[t%this.options.lineWidth.length]:this.options.lineWidth},e.prototype.pointSizeForSeries=function(t){return this.options.pointSize instanceof Array?this.options.pointSize[t%this.options.pointSize.length]:this.options.pointSize},e.prototype.pointGrowSeries=function(t){return Raphael.animation({r:this.pointSizeForSeries(t)+3},25,"linear")},e.prototype.pointShrinkSeries=function(t){return Raphael.animation({r:this.pointSizeForSeries(t)},25,"linear")},e}(i.Grid),i.labelSeries=function(e,n,o,s,r){var h,a,l,p,u,c,d,f,g,m,y;if(l=200*(n-e)/o,a=new Date(e),void 0===(d=i.LABEL_SPECS[s]))for(g=0,m=(y=i.AUTO_LABEL_ORDER).length;g<m;g++)if(p=y[g],l>=(c=i.LABEL_SPECS[p]).span){d=c;break}for(void 0===d&&(d=i.LABEL_SPECS.second),r&&(d=t.extend({},d,{fmt:r})),h=d.start(a),u=[];(f=h.getTime())<=n;)f>=e&&u.push([d.fmt(h),f]),d.incr(h);return u},e=function(t){return{span:60*t*1e3,start:function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours())},fmt:function(t){return i.pad2(t.getHours())+":"+i.pad2(t.getMinutes())},incr:function(i){return i.setUTCMinutes(i.getUTCMinutes()+t)}}},n=function(t){return{span:1e3*t,start:function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes())},fmt:function(t){return i.pad2(t.getHours())+":"+i.pad2(t.getMinutes())+":"+i.pad2(t.getSeconds())},incr:function(i){return i.setUTCSeconds(i.getUTCSeconds()+t)}}},i.LABEL_SPECS={decade:{span:1728e8,start:function(t){return new Date(t.getFullYear()-t.getFullYear()%10,0,1)},fmt:function(t){return""+t.getFullYear()},incr:function(t){return t.setFullYear(t.getFullYear()+10)}},year:{span:1728e7,start:function(t){return new Date(t.getFullYear(),0,1)},fmt:function(t){return""+t.getFullYear()},incr:function(t){return t.setFullYear(t.getFullYear()+1)}},month:{span:24192e5,start:function(t){return new Date(t.getFullYear(),t.getMonth(),1)},fmt:function(t){return t.getFullYear()+"-"+i.pad2(t.getMonth()+1)},incr:function(t){return t.setMonth(t.getMonth()+1)}},week:{span:6048e5,start:function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate())},fmt:function(t){return t.getFullYear()+"-"+i.pad2(t.getMonth()+1)+"-"+i.pad2(t.getDate())},incr:function(t){return t.setDate(t.getDate()+7)}},day:{span:864e5,start:function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate())},fmt:function(t){return t.getFullYear()+"-"+i.pad2(t.getMonth()+1)+"-"+i.pad2(t.getDate())},incr:function(t){return t.setDate(t.getDate()+1)}},hour:e(60),"30min":e(30),"15min":e(15),"10min":e(10),"5min":e(5),minute:e(1),"30sec":n(30),"15sec":n(15),"10sec":n(10),"5sec":n(5),second:n(1)},i.AUTO_LABEL_ORDER=["decade","year","month","week","day","hour","30min","15min","10min","5min","minute","30sec","15sec","10sec","5sec","second"],i.Area=function(e){var n;function o(e){var s;if(!(this instanceof i.Area))return new i.Area(e);s=t.extend({},n,e),this.cumulative=!s.behaveLikeLine,"auto"===s.fillOpacity&&(s.fillOpacity=s.behaveLikeLine?.8:1),o.__super__.constructor.call(this,s)}return h(o,e),n={fillOpacity:"auto",behaveLikeLine:!1},o.prototype.calcPoints=function(){var t,i,e,n,o,s,r;for(r=[],n=0,o=(s=this.data).length;n<o;n++)(t=s[n])._x=this.transX(t.x),i=0,t._y=function(){var n,o,s,r;for(r=[],n=0,o=(s=t.y).length;n<o;n++)e=s[n],this.options.behaveLikeLine?r.push(this.transY(e)):(i+=e||0,r.push(this.transY(i)));return r}.call(this),r.push(t._ymax=Math.max.apply(Math,t._y));return r},o.prototype.drawSeries=function(){var t,i,e,n,o,s,r,h;for(this.seriesPoints=[],h=[],e=0,n=(i=this.options.behaveLikeLine?function(){s=[];for(var t=0,i=this.options.ykeys.length-1;0<=i?t<=i:t>=i;0<=i?t++:t--)s.push(t);return s}.apply(this):function(){r=[];for(var t=o=this.options.ykeys.length-1;o<=0?t<=0:t>=0;o<=0?t++:t--)r.push(t);return r}.apply(this)).length;e<n;e++)t=i[e],this._drawFillFor(t),this._drawLineFor(t),h.push(this._drawPointFor(t));return h},o.prototype._drawFillFor=function(t){var i;if(null!==(i=this.paths[t]))return i=i+"L"+this.transX(this.xmax)+","+this.bottom+"L"+this.transX(this.xmin)+","+this.bottom+"Z",this.drawFilledPath(i,this.fillForSeries(t))},o.prototype.fillForSeries=function(t){var i;return i=Raphael.rgb2hsl(this.colorFor(this.data[t],t,"line")),Raphael.hsl(i.h,this.options.behaveLikeLine?.9*i.s:.75*i.s,Math.min(.98,this.options.behaveLikeLine?1.2*i.l:1.25*i.l))},o.prototype.drawFilledPath=function(t,i){return this.raphael.path(t).attr("fill",i).attr("fill-opacity",this.options.fillOpacity).attr("stroke","none")},o}(i.Line),i.Bar=function(e){function n(e){if(this.onHoverOut=s(this.onHoverOut,this),this.onHoverMove=s(this.onHoverMove,this),this.onGridClick=s(this.onGridClick,this),!(this instanceof i.Bar))return new i.Bar(e);n.__super__.constructor.call(this,t.extend({},e,{parseTime:!1}))}return h(n,e),n.prototype.init=function(){if(this.cumulative=this.options.stacked,"always"!==this.options.hideHover)return this.hover=new i.Hover({parent:this.el}),this.on("hovermove",this.onHoverMove),this.on("hoverout",this.onHoverOut),this.on("gridclick",this.onGridClick)},n.prototype.defaults={barSizeRatio:.75,barGap:3,barColors:["#0b62a4","#7a92a3","#4da74d","#afd8f8","#edc240","#cb4b4b","#9440ed"],barOpacity:1,barRadius:[0,0,0,0],xLabelMargin:50},n.prototype.calc=function(){var t;if(this.calcBars(),!1===this.options.hideHover)return(t=this.hover).update.apply(t,this.hoverContentForRow(this.data.length-1))},n.prototype.calcBars=function(){var t,i,e,n,o,s,r;for(r=[],t=n=0,o=(s=this.data).length;n<o;t=++n)(i=s[t])._x=this.left+this.width*(t+.5)/this.data.length,r.push(i._y=function(){var t,n,o,s;for(s=[],t=0,n=(o=i.y).length;t<n;t++)null!=(e=o[t])?s.push(this.transY(e)):s.push(null);return s}.call(this));return r},n.prototype.draw=function(){var t;return!0!==(t=this.options.axes)&&"both"!==t&&"x"!==t||this.drawXAxis(),this.drawSeries()},n.prototype.drawXAxis=function(){var t,i,e,n,o,s,r,h,a,l,p,u,c;for(l=this.bottom+(this.options.xAxisLabelTopPadding||this.options.padding/2),r=null,s=null,c=[],t=p=0,u=this.data.length;0<=u?p<u:p>u;t=0<=u?++p:--p)h=this.data[this.data.length-1-t],a=(i=this.drawXAxisLabel(h._x,l,h.label)).getBBox(),i.transform("r"+-this.options.xLabelAngle),e=i.getBBox(),i.transform("t0,"+e.height/2+"..."),0!==this.options.xLabelAngle&&(o=-.5*a.width*Math.cos(this.options.xLabelAngle*Math.PI/180),i.transform("t"+o+",0...")),(null==r||r>=e.x+e.width||null!=s&&s>=e.x)&&e.x>=0&&e.x+e.width<this.el.width()?(0!==this.options.xLabelAngle&&(n=1.25*this.options.gridTextSize/Math.sin(this.options.xLabelAngle*Math.PI/180),s=e.x-n),c.push(r=e.x-this.options.xLabelMargin)):c.push(i.remove());return c},n.prototype.drawSeries=function(){var t,i,e,n,o,s,r,h,a,l,p,u,c,d;return e=this.width/this.options.data.length,h=null!=this.options.stacked?1:this.options.ykeys.length,t=(e*this.options.barSizeRatio-this.options.barGap*(h-1))/h,r=e*(1-this.options.barSizeRatio)/2,d=this.ymin<=0&&this.ymax>=0?this.transY(0):null,this.bars=function(){var h,f,g,m;for(g=this.data,m=[],n=h=0,f=g.length;h<f;n=++h)a=g[n],o=0,m.push(function(){var h,f,g,m;for(g=a._y,m=[],l=h=0,f=g.length;h<f;l=++h)null!==(c=g[l])?(d?(u=Math.min(c,d),i=Math.max(c,d)):(u=c,i=this.bottom),s=this.left+n*e+r,this.options.stacked||(s+=l*(t+this.options.barGap)),p=i-u,this.options.stacked&&(u-=o),this.drawBar(s,u,t,p,this.colorFor(a,l,"bar"),this.options.barOpacity,this.options.barRadius),m.push(o+=p)):m.push(null);return m}.call(this));return m}.call(this)},n.prototype.colorFor=function(t,i,e){var n,o;return"function"==typeof this.options.barColors?(n={x:t.x,y:t.y[i],label:t.label},o={index:i,key:this.options.ykeys[i],label:this.options.labels[i]},this.options.barColors.call(this,n,o,e)):this.options.barColors[i%this.options.barColors.length]},n.prototype.hitTest=function(t){return 0===this.data.length?null:(t=Math.max(Math.min(t,this.right),this.left),Math.min(this.data.length-1,Math.floor((t-this.left)/(this.width/this.data.length))))},n.prototype.onGridClick=function(t,i){var e;return e=this.hitTest(t),this.fire("click",e,this.data[e].src,t,i)},n.prototype.onHoverMove=function(t,i){var e,n;return e=this.hitTest(t),(n=this.hover).update.apply(n,this.hoverContentForRow(e))},n.prototype.onHoverOut=function(){if(!1!==this.options.hideHover)return this.hover.hide()},n.prototype.hoverContentForRow=function(t){var i,e,n,o,s,r,h;for(i="<div class='morris-hover-row-label'>"+(n=this.data[t]).label+"</div>",e=s=0,r=(h=n.y).length;s<r;e=++s)o=h[e],i+="<div class='morris-hover-point' style='color: "+this.colorFor(n,e,"label")+"'>\n "+this.options.labels[e]+":\n "+this.yLabelFormat(o)+"\n</div>";return"function"==typeof this.options.hoverCallback&&(i=this.options.hoverCallback(t,this.options,i,n.src)),[i,this.left+(t+.5)*this.width/this.data.length]},n.prototype.drawXAxisLabel=function(t,i,e){return this.raphael.text(t,i,e).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor)},n.prototype.drawBar=function(t,i,e,n,o,s,r){var h;return(0===(h=Math.max.apply(Math,r))||h>n?this.raphael.rect(t,i,e,n):this.raphael.path(this.roundedRect(t,i,e,n,r))).attr("fill",o).attr("fill-opacity",s).attr("stroke","none")},n.prototype.roundedRect=function(t,i,e,n,o){return null==o&&(o=[0,0,0,0]),["M",t,o[0]+i,"Q",t,i,t+o[0],i,"L",t+e-o[1],i,"Q",t+e,i,t+e,i+o[1],"L",t+e,i+n-o[2],"Q",t+e,i+n,t+e-o[2],i+n,"L",t+o[3],i+n,"Q",t,i+n,t,i+n-o[3],"Z"]},n}(i.Grid),i.Donut=function(e){function n(e){this.resizeHandler=s(this.resizeHandler,this),this.select=s(this.select,this),this.click=s(this.click,this);var n=this;if(!(this instanceof i.Donut))return new i.Donut(e);if(this.options=t.extend({},this.defaults,e),"string"==typeof e.element?this.el=t(document.getElementById(e.element)):this.el=t(e.element),null===this.el||0===this.el.length)throw new Error("Graph placeholder not found.");void 0!==e.data&&0!==e.data.length&&(this.raphael=new Raphael(this.el[0]),this.options.resize&&t(window).bind("resize",function(t){return null!=n.timeoutId&&window.clearTimeout(n.timeoutId),n.timeoutId=window.setTimeout(n.resizeHandler,100)}),this.setData(e.data))}return h(n,e),n.prototype.defaults={colors:["#0B62A4","#3980B5","#679DC6","#95BBD7","#B0CCE1","#095791","#095085","#083E67","#052C48","#042135"],backgroundColor:"#FFFFFF",labelColor:"#000000",formatter:i.commas,resize:!1},n.prototype.redraw=function(){var t,e,n,o,s,r,h,a,l,p,u,c,d,f,g,m,y,v,x,w,b,M;for(this.raphael.clear(),e=this.el.width()/2,n=this.el.height()/2,c=(Math.min(e,n)-10)/3,u=0,d=0,m=(x=this.values).length;d<m;d++)u+=x[d];for(a=5/(2*c),t=1.9999*Math.PI-a*this.data.length,r=0,s=0,this.segments=[],o=f=0,y=(w=this.values).length;f<y;o=++f)l=r+a+t*(w[o]/u),(p=new i.DonutSegment(e,n,2*c,c,r,l,this.data[o].color||this.options.colors[s%this.options.colors.length],this.options.backgroundColor,s,this.raphael)).render(),this.segments.push(p),p.on("hover",this.select),p.on("click",this.click),r=l,s+=1;for(this.text1=this.drawEmptyDonutLabel(e,n-10,this.options.labelColor,15,800),this.text2=this.drawEmptyDonutLabel(e,n+10,this.options.labelColor,14),h=Math.max.apply(Math,this.values),s=0,M=[],g=0,v=(b=this.values).length;g<v;g++){if(b[g]===h){this.select(s);break}M.push(s+=1)}return M},n.prototype.setData=function(t){var i;return this.data=t,this.values=function(){var t,e,n,o;for(o=[],t=0,e=(n=this.data).length;t<e;t++)i=n[t],o.push(parseFloat(i.value));return o}.call(this),this.redraw()},n.prototype.click=function(t){return this.fire("click",t,this.data[t])},n.prototype.select=function(t){var i,e,n,o;for(e=0,n=(o=this.segments).length;e<n;e++)o[e].deselect();return this.segments[t].select(),i=this.data[t],this.setLabels(i.label,this.options.formatter(i.value,i))},n.prototype.setLabels=function(t,i){var e,n,o,s,r,h,a,l;return s=1.8*(e=2*(Math.min(this.el.width()/2,this.el.height()/2)-10)/3),o=e/2,n=e/3,this.text1.attr({text:t,transform:""}),r=this.text1.getBBox(),h=Math.min(s/r.width,o/r.height),this.text1.attr({transform:"S"+h+","+h+","+(r.x+r.width/2)+","+(r.y+r.height)}),this.text2.attr({text:i,transform:""}),a=this.text2.getBBox(),l=Math.min(s/a.width,n/a.height),this.text2.attr({transform:"S"+l+","+l+","+(a.x+a.width/2)+","+a.y})},n.prototype.drawEmptyDonutLabel=function(t,i,e,n,o){var s;return s=this.raphael.text(t,i,"").attr("font-size",n).attr("fill",e),null!=o&&s.attr("font-weight",o),s},n.prototype.resizeHandler=function(){return this.timeoutId=null,this.raphael.setSize(this.el.width(),this.el.height()),this.redraw()},n}(i.EventEmitter),i.DonutSegment=function(t){function i(t,i,e,n,o,r,h,a,l,p){this.cx=t,this.cy=i,this.inner=e,this.outer=n,this.color=h,this.backgroundColor=a,this.index=l,this.raphael=p,this.deselect=s(this.deselect,this),this.select=s(this.select,this),this.sin_p0=Math.sin(o),this.cos_p0=Math.cos(o),this.sin_p1=Math.sin(r),this.cos_p1=Math.cos(r),this.is_long=r-o>Math.PI?1:0,this.path=this.calcSegment(this.inner+3,this.inner+this.outer-5),this.selectedPath=this.calcSegment(this.inner+3,this.inner+this.outer),this.hilight=this.calcArc(this.inner)}return h(i,t),i.prototype.calcArcPoints=function(t){return[this.cx+t*this.sin_p0,this.cy+t*this.cos_p0,this.cx+t*this.sin_p1,this.cy+t*this.cos_p1]},i.prototype.calcSegment=function(t,i){var e,n,o,s,r,h,a,l,p,u;return e=(p=this.calcArcPoints(t))[0],o=p[1],n=p[2],s=p[3],r=(u=this.calcArcPoints(i))[0],a=u[1],h=u[2],l=u[3],"M"+e+","+o+"A"+t+","+t+",0,"+this.is_long+",0,"+n+","+s+"L"+h+","+l+"A"+i+","+i+",0,"+this.is_long+",1,"+r+","+a+"Z"},i.prototype.calcArc=function(t){var i,e,n,o,s;return i=(s=this.calcArcPoints(t))[0],n=s[1],e=s[2],o=s[3],"M"+i+","+n+"A"+t+","+t+",0,"+this.is_long+",0,"+e+","+o},i.prototype.render=function(){var t=this;return this.arc=this.drawDonutArc(this.hilight,this.color),this.seg=this.drawDonutSegment(this.path,this.color,this.backgroundColor,function(){return t.fire("hover",t.index)},function(){return t.fire("click",t.index)})},i.prototype.drawDonutArc=function(t,i){return this.raphael.path(t).attr({stroke:i,"stroke-width":2,opacity:0})},i.prototype.drawDonutSegment=function(t,i,e,n,o){return this.raphael.path(t).attr({fill:i,stroke:e,"stroke-width":3}).hover(n).click(o)},i.prototype.select=function(){if(!this.selected)return this.seg.animate({path:this.selectedPath},150,"<>"),this.arc.animate({opacity:1},150,"<>"),this.selected=!0},i.prototype.deselect=function(){if(this.selected)return this.seg.animate({path:this.path},150,"<>"),this.arc.animate({opacity:0},150,"<>"),this.selected=!1},i}(i.EventEmitter)}).call(this);
|
@@ -1,2 +1,2 @@
|
|
1
|
-
.morris-hover{position:absolute;z-index:1000}.morris-hover.morris-default-style{border-radius:10px;padding:6px;color:#666;background:rgba(255,255,255,
|
1
|
+
.morris-hover{position:absolute;z-index:1000}.morris-hover.morris-default-style{border-radius:10px;padding:6px;color:#666;background:rgba(255,255,255,1);border:solid 2px rgba(230,230,230,0.8);font-family:sans-serif;font-size:12px;text-align:center}.morris-hover.morris-default-style .morris-hover-row-label{font-weight:bold;margin:0.25em 0}
|
2
2
|
.morris-hover.morris-default-style .morris-hover-point{white-space:nowrap;margin:0.1em 0}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hyrax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date:
|
17
|
+
date: 2022-01-24 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: rails
|
@@ -328,6 +328,20 @@ dependencies:
|
|
328
328
|
- - ">="
|
329
329
|
- !ruby/object:Gem::Version
|
330
330
|
version: 5.0.4
|
331
|
+
- !ruby/object:Gem::Dependency
|
332
|
+
name: hydra-file_characterization
|
333
|
+
requirement: !ruby/object:Gem::Requirement
|
334
|
+
requirements:
|
335
|
+
- - "~>"
|
336
|
+
- !ruby/object:Gem::Version
|
337
|
+
version: 1.1.2
|
338
|
+
type: :runtime
|
339
|
+
prerelease: false
|
340
|
+
version_requirements: !ruby/object:Gem::Requirement
|
341
|
+
requirements:
|
342
|
+
- - "~>"
|
343
|
+
- !ruby/object:Gem::Version
|
344
|
+
version: 1.1.2
|
331
345
|
- !ruby/object:Gem::Dependency
|
332
346
|
name: hydra-head
|
333
347
|
requirement: !ruby/object:Gem::Requirement
|
@@ -355,9 +369,6 @@ dependencies:
|
|
355
369
|
- - ">="
|
356
370
|
- !ruby/object:Gem::Version
|
357
371
|
version: '0.16'
|
358
|
-
- - "<"
|
359
|
-
- !ruby/object:Gem::Version
|
360
|
-
version: '2.0'
|
361
372
|
type: :runtime
|
362
373
|
prerelease: false
|
363
374
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -365,9 +376,6 @@ dependencies:
|
|
365
376
|
- - ">="
|
366
377
|
- !ruby/object:Gem::Version
|
367
378
|
version: '0.16'
|
368
|
-
- - "<"
|
369
|
-
- !ruby/object:Gem::Version
|
370
|
-
version: '2.0'
|
371
379
|
- !ruby/object:Gem::Dependency
|
372
380
|
name: iiif_manifest
|
373
381
|
requirement: !ruby/object:Gem::Requirement
|
@@ -962,6 +970,20 @@ dependencies:
|
|
962
970
|
- - ">="
|
963
971
|
- !ruby/object:Gem::Version
|
964
972
|
version: '0'
|
973
|
+
- !ruby/object:Gem::Dependency
|
974
|
+
name: pg
|
975
|
+
requirement: !ruby/object:Gem::Requirement
|
976
|
+
requirements:
|
977
|
+
- - "~>"
|
978
|
+
- !ruby/object:Gem::Version
|
979
|
+
version: '1.2'
|
980
|
+
type: :development
|
981
|
+
prerelease: false
|
982
|
+
version_requirements: !ruby/object:Gem::Requirement
|
983
|
+
requirements:
|
984
|
+
- - "~>"
|
985
|
+
- !ruby/object:Gem::Version
|
986
|
+
version: '1.2'
|
965
987
|
- !ruby/object:Gem::Dependency
|
966
988
|
name: rspec-activemodel-mocks
|
967
989
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1389,6 +1411,15 @@ files:
|
|
1389
1411
|
- ".dassie/db/migrate/20200821212885_create_qa_local_authority_entries.rb"
|
1390
1412
|
- ".dassie/db/migrate/20200821212902_create_minter_states.noid_rails_engine.rb"
|
1391
1413
|
- ".dassie/db/migrate/20200821212903_rename_minter_state_random_to_rand.noid_rails_engine.rb"
|
1414
|
+
- ".dassie/db/migrate/20210921150120_enable_uuid_extension.valkyrie_engine.rb"
|
1415
|
+
- ".dassie/db/migrate/20210921150121_create_orm_resources.valkyrie_engine.rb"
|
1416
|
+
- ".dassie/db/migrate/20210921150122_add_model_type_to_orm_resources.valkyrie_engine.rb"
|
1417
|
+
- ".dassie/db/migrate/20210921150123_change_model_type_to_internal_model.valkyrie_engine.rb"
|
1418
|
+
- ".dassie/db/migrate/20210921150124_create_path_gin_index.valkyrie_engine.rb"
|
1419
|
+
- ".dassie/db/migrate/20210921150125_create_internal_resource_index.valkyrie_engine.rb"
|
1420
|
+
- ".dassie/db/migrate/20210921150126_create_updated_at_index.valkyrie_engine.rb"
|
1421
|
+
- ".dassie/db/migrate/20210921150127_add_optimistic_locking_to_orm_resources.valkyrie_engine.rb"
|
1422
|
+
- ".dassie/db/migrate/20211130181150_create_default_administrative_set.rb"
|
1392
1423
|
- ".dassie/db/schema.rb"
|
1393
1424
|
- ".dassie/db/seeds.rb"
|
1394
1425
|
- ".dassie/lib/assets/.keep"
|
@@ -1431,6 +1462,8 @@ files:
|
|
1431
1462
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
1432
1463
|
- ".github/SUPPORT.md"
|
1433
1464
|
- ".github/stale.yml"
|
1465
|
+
- ".github/workflows/main.yml"
|
1466
|
+
- ".github/workflows/release.yml"
|
1434
1467
|
- ".gitignore"
|
1435
1468
|
- ".hound.yml"
|
1436
1469
|
- ".regen"
|
@@ -1499,6 +1532,7 @@ files:
|
|
1499
1532
|
- app/assets/javascripts/hyrax/admin/collection_type/settings.es6
|
1500
1533
|
- app/assets/javascripts/hyrax/admin/collection_type_controls.es6
|
1501
1534
|
- app/assets/javascripts/hyrax/admin/graphs.es6
|
1535
|
+
- app/assets/javascripts/hyrax/analytics_events.js
|
1502
1536
|
- app/assets/javascripts/hyrax/app.js.erb
|
1503
1537
|
- app/assets/javascripts/hyrax/authority_select.es6
|
1504
1538
|
- app/assets/javascripts/hyrax/autocomplete.es6
|
@@ -1553,6 +1587,7 @@ files:
|
|
1553
1587
|
- app/assets/javascripts/hyrax/relationships/registry.es6
|
1554
1588
|
- app/assets/javascripts/hyrax/relationships/registry_entry.es6
|
1555
1589
|
- app/assets/javascripts/hyrax/relationships/resource.es6
|
1590
|
+
- app/assets/javascripts/hyrax/reports-buttons.js
|
1556
1591
|
- app/assets/javascripts/hyrax/save_work.es6
|
1557
1592
|
- app/assets/javascripts/hyrax/save_work/checklist_item.es6
|
1558
1593
|
- app/assets/javascripts/hyrax/save_work/deposit_agreement.es6
|
@@ -1634,8 +1669,10 @@ files:
|
|
1634
1669
|
- app/controllers/concerns/hyrax/admin/users_controller_behavior.rb
|
1635
1670
|
- app/controllers/concerns/hyrax/api.rb
|
1636
1671
|
- app/controllers/concerns/hyrax/breadcrumbs.rb
|
1672
|
+
- app/controllers/concerns/hyrax/breadcrumbs_for_collection_analytics.rb
|
1637
1673
|
- app/controllers/concerns/hyrax/breadcrumbs_for_collections.rb
|
1638
1674
|
- app/controllers/concerns/hyrax/breadcrumbs_for_works.rb
|
1675
|
+
- app/controllers/concerns/hyrax/breadcrumbs_for_works_analytics.rb
|
1639
1676
|
- app/controllers/concerns/hyrax/collections.rb
|
1640
1677
|
- app/controllers/concerns/hyrax/collections/accepts_batches.rb
|
1641
1678
|
- app/controllers/concerns/hyrax/collections_controller_behavior.rb
|
@@ -1649,6 +1686,9 @@ files:
|
|
1649
1686
|
- app/controllers/concerns/hyrax/themed_layout_controller.rb
|
1650
1687
|
- app/controllers/concerns/hyrax/works_controller_behavior.rb
|
1651
1688
|
- app/controllers/hyrax/admin/admin_sets_controller.rb
|
1689
|
+
- app/controllers/hyrax/admin/analytics/analytics_controller.rb
|
1690
|
+
- app/controllers/hyrax/admin/analytics/collection_reports_controller.rb
|
1691
|
+
- app/controllers/hyrax/admin/analytics/work_reports_controller.rb
|
1652
1692
|
- app/controllers/hyrax/admin/appearances_controller.rb
|
1653
1693
|
- app/controllers/hyrax/admin/collection_type_participants_controller.rb
|
1654
1694
|
- app/controllers/hyrax/admin/collection_types_controller.rb
|
@@ -1824,6 +1864,7 @@ files:
|
|
1824
1864
|
- app/jobs/resolrize_job.rb
|
1825
1865
|
- app/jobs/stream_notifications_job.rb
|
1826
1866
|
- app/jobs/user_edit_profile_event_job.rb
|
1867
|
+
- app/jobs/valkyrie_ingest_job.rb
|
1827
1868
|
- app/jobs/visibility_copy_job.rb
|
1828
1869
|
- app/mailers/hyrax/contact_mailer.rb
|
1829
1870
|
- app/models/admin_set.rb
|
@@ -1885,6 +1926,7 @@ files:
|
|
1885
1926
|
- app/models/hyrax/collection_type.rb
|
1886
1927
|
- app/models/hyrax/collection_type_participant.rb
|
1887
1928
|
- app/models/hyrax/contact_form.rb
|
1929
|
+
- app/models/hyrax/default_administrative_set.rb
|
1888
1930
|
- app/models/hyrax/download.rb
|
1889
1931
|
- app/models/hyrax/embargo.rb
|
1890
1932
|
- app/models/hyrax/event.rb
|
@@ -2046,6 +2088,13 @@ files:
|
|
2046
2088
|
- app/services/hyrax/admin_set_member_service.rb
|
2047
2089
|
- app/services/hyrax/admin_set_service.rb
|
2048
2090
|
- app/services/hyrax/analytics.rb
|
2091
|
+
- app/services/hyrax/analytics/google.rb
|
2092
|
+
- app/services/hyrax/analytics/google/events.rb
|
2093
|
+
- app/services/hyrax/analytics/google/events_daily.rb
|
2094
|
+
- app/services/hyrax/analytics/google/visits.rb
|
2095
|
+
- app/services/hyrax/analytics/google/visits_daily.rb
|
2096
|
+
- app/services/hyrax/analytics/matomo.rb
|
2097
|
+
- app/services/hyrax/analytics/results.rb
|
2049
2098
|
- app/services/hyrax/batch_create_failure_service.rb
|
2050
2099
|
- app/services/hyrax/batch_create_success_service.rb
|
2051
2100
|
- app/services/hyrax/caching_iiif_manifest_builder.rb
|
@@ -2053,6 +2102,7 @@ files:
|
|
2053
2102
|
- app/services/hyrax/change_content_depositor_service.rb
|
2054
2103
|
- app/services/hyrax/characterization/file_set_description.rb
|
2055
2104
|
- app/services/hyrax/characterization/model_wrapper.rb
|
2105
|
+
- app/services/hyrax/characterization/valkyrie_characterization_service.rb
|
2056
2106
|
- app/services/hyrax/child_types.rb
|
2057
2107
|
- app/services/hyrax/collection_member_service.rb
|
2058
2108
|
- app/services/hyrax/collection_thumbnail_path_service.rb
|
@@ -2117,6 +2167,7 @@ files:
|
|
2117
2167
|
- app/services/hyrax/listeners/acl_index_listener.rb
|
2118
2168
|
- app/services/hyrax/listeners/active_fedora_acl_index_listener.rb
|
2119
2169
|
- app/services/hyrax/listeners/batch_notification_listener.rb
|
2170
|
+
- app/services/hyrax/listeners/file_metadata_listener.rb
|
2120
2171
|
- app/services/hyrax/listeners/file_set_lifecycle_listener.rb
|
2121
2172
|
- app/services/hyrax/listeners/file_set_lifecycle_notification_listener.rb
|
2122
2173
|
- app/services/hyrax/listeners/member_cleanup_listener.rb
|
@@ -2216,7 +2267,6 @@ files:
|
|
2216
2267
|
- app/values/hyrax/chart_data.rb
|
2217
2268
|
- app/views/_controls.html.erb
|
2218
2269
|
- app/views/_flash_msg.html.erb
|
2219
|
-
- app/views/_ga.html.erb
|
2220
2270
|
- app/views/_head_tag_extras.html.erb
|
2221
2271
|
- app/views/_logo.html.erb
|
2222
2272
|
- app/views/_masthead.html.erb
|
@@ -2250,6 +2300,22 @@ files:
|
|
2250
2300
|
- app/views/hyrax/admin/admin_sets/index.json.jbuilder
|
2251
2301
|
- app/views/hyrax/admin/admin_sets/new.html.erb
|
2252
2302
|
- app/views/hyrax/admin/admin_sets/show.html.erb
|
2303
|
+
- app/views/hyrax/admin/analytics/_date_range_form.html.erb
|
2304
|
+
- app/views/hyrax/admin/analytics/collection_reports/_custom_range.html.erb
|
2305
|
+
- app/views/hyrax/admin/analytics/collection_reports/_monthly_summary.html.erb
|
2306
|
+
- app/views/hyrax/admin/analytics/collection_reports/_summary.html.erb
|
2307
|
+
- app/views/hyrax/admin/analytics/collection_reports/_top_collections.html.erb
|
2308
|
+
- app/views/hyrax/admin/analytics/collection_reports/index.html.erb
|
2309
|
+
- app/views/hyrax/admin/analytics/collection_reports/show.html.erb
|
2310
|
+
- app/views/hyrax/admin/analytics/work_reports/_custom_range.html.erb
|
2311
|
+
- app/views/hyrax/admin/analytics/work_reports/_monthly_summary.html.erb
|
2312
|
+
- app/views/hyrax/admin/analytics/work_reports/_summary.html.erb
|
2313
|
+
- app/views/hyrax/admin/analytics/work_reports/_top_file_set_downloads.html.erb
|
2314
|
+
- app/views/hyrax/admin/analytics/work_reports/_top_works.html.erb
|
2315
|
+
- app/views/hyrax/admin/analytics/work_reports/_work_counts.html.erb
|
2316
|
+
- app/views/hyrax/admin/analytics/work_reports/_work_files.html.erb
|
2317
|
+
- app/views/hyrax/admin/analytics/work_reports/index.html.erb
|
2318
|
+
- app/views/hyrax/admin/analytics/work_reports/show.html.erb
|
2253
2319
|
- app/views/hyrax/admin/appearances/show.html.erb
|
2254
2320
|
- app/views/hyrax/admin/collection_types/_form.html.erb
|
2255
2321
|
- app/views/hyrax/admin/collection_types/_form_appearance.html.erb
|
@@ -2377,9 +2443,13 @@ files:
|
|
2377
2443
|
- app/views/hyrax/dashboard/_index_partials/_proxy_rights.html.erb
|
2378
2444
|
- app/views/hyrax/dashboard/_index_partials/_transfers.html.erb
|
2379
2445
|
- app/views/hyrax/dashboard/_repository_growth.html.erb
|
2380
|
-
- app/views/hyrax/dashboard/
|
2446
|
+
- app/views/hyrax/dashboard/_resource_type_graph.html.erb
|
2381
2447
|
- app/views/hyrax/dashboard/_sidebar.html.erb
|
2448
|
+
- app/views/hyrax/dashboard/_tabs.html.erb
|
2382
2449
|
- app/views/hyrax/dashboard/_user_activity.html.erb
|
2450
|
+
- app/views/hyrax/dashboard/_user_activity_graph.html.erb
|
2451
|
+
- app/views/hyrax/dashboard/_visibility_graph.html.erb
|
2452
|
+
- app/views/hyrax/dashboard/_work_type_graph.html.erb
|
2383
2453
|
- app/views/hyrax/dashboard/collections/_batch_edits_actions.html.erb
|
2384
2454
|
- app/views/hyrax/dashboard/collections/_bookmark_control.html.erb
|
2385
2455
|
- app/views/hyrax/dashboard/collections/_button_create_collection.html.erb
|
@@ -2550,6 +2620,8 @@ files:
|
|
2550
2620
|
- app/views/hyrax/single_use_links_viewer/single_use_error.html.erb
|
2551
2621
|
- app/views/hyrax/static/mendeley.html.erb
|
2552
2622
|
- app/views/hyrax/static/zotero.html.erb
|
2623
|
+
- app/views/hyrax/stats/_downloads.html.erb
|
2624
|
+
- app/views/hyrax/stats/_pageviews.html.erb
|
2553
2625
|
- app/views/hyrax/stats/file.html.erb
|
2554
2626
|
- app/views/hyrax/stats/work.html.erb
|
2555
2627
|
- app/views/hyrax/transfers/_received.html.erb
|
@@ -2608,7 +2680,9 @@ files:
|
|
2608
2680
|
- app/views/shared/_appearance_styles.html.erb
|
2609
2681
|
- app/views/shared/_citations.html.erb
|
2610
2682
|
- app/views/shared/_footer.html.erb
|
2683
|
+
- app/views/shared/_ga.html.erb
|
2611
2684
|
- app/views/shared/_locale_picker.html.erb
|
2685
|
+
- app/views/shared/_matomo.html.erb
|
2612
2686
|
- app/views/shared/_nav_safety_modal.html.erb
|
2613
2687
|
- app/views/shared/_read_only.html.erb
|
2614
2688
|
- app/views/shared/_select_work_type_modal.html.erb
|
@@ -2768,6 +2842,7 @@ files:
|
|
2768
2842
|
- lib/generators/hyrax/templates/db/migrate/20180406202557_add_badge_color_to_collection_types.rb.erb
|
2769
2843
|
- lib/generators/hyrax/templates/db/migrate/20180612002029_update_single_use_links_column_names.rb.erb
|
2770
2844
|
- lib/generators/hyrax/templates/db/migrate/20200617002029_change_sipity_entity_specific_responsibility.rb.erb
|
2845
|
+
- lib/generators/hyrax/templates/db/migrate/20211130181150_create_default_administrative_set.rb.erb
|
2771
2846
|
- lib/generators/hyrax/templates/db/seeds.rb
|
2772
2847
|
- lib/generators/hyrax/templates/hyrax.scss
|
2773
2848
|
- lib/generators/hyrax/templates/hyrax_helper.rb
|
@@ -2865,6 +2940,7 @@ files:
|
|
2865
2940
|
- lib/hyrax/specs/shared_specs/workflow_method.rb
|
2866
2941
|
- lib/hyrax/specs/spy_listener.rb
|
2867
2942
|
- lib/hyrax/transactions.rb
|
2943
|
+
- lib/hyrax/transactions/admin_set_create.rb
|
2868
2944
|
- lib/hyrax/transactions/apply_change_set.rb
|
2869
2945
|
- lib/hyrax/transactions/collection_create.rb
|
2870
2946
|
- lib/hyrax/transactions/collection_update.rb
|
@@ -2985,7 +3061,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
2985
3061
|
- !ruby/object:Gem::Version
|
2986
3062
|
version: '0'
|
2987
3063
|
requirements: []
|
2988
|
-
rubygems_version: 3.
|
3064
|
+
rubygems_version: 3.1.6
|
2989
3065
|
signing_key:
|
2990
3066
|
specification_version: 4
|
2991
3067
|
summary: Hyrax is a front-end based on the robust Samvera framework, providing a user
|
@@ -1,28 +0,0 @@
|
|
1
|
-
<div class="panel-heading">
|
2
|
-
<h3 class="panel-title"><%= t('.title') %></h3>
|
3
|
-
<div><%= t('.subtitle') %></div>
|
4
|
-
</div>
|
5
|
-
<div class="panel-body text-center">
|
6
|
-
<% repository_objects = @presenter.repository_objects.to_json %>
|
7
|
-
<div id="dashboard-repository-objects" aria-hidden="true" style="height: 200px"><script>
|
8
|
-
//<![CDATA[
|
9
|
-
Hyrax.statistics.repositoryObjects = <%== repository_objects %>
|
10
|
-
//]]>
|
11
|
-
</script></div>
|
12
|
-
<table aria-label="<%= t('.title') %>, <%= t('.subtitle') %>" class="table table-striped sr-only text-left">
|
13
|
-
<thead>
|
14
|
-
<tr>
|
15
|
-
<th><%= t('.status') %></th>
|
16
|
-
<th></th>
|
17
|
-
</tr>
|
18
|
-
</thead>
|
19
|
-
<tbody>
|
20
|
-
<% JSON.parse(repository_objects).each do |row| %>
|
21
|
-
<tr>
|
22
|
-
<td><%= row["label"] %></td>
|
23
|
-
<td><%= row["value"] %></td>
|
24
|
-
</tr>
|
25
|
-
<% end %>
|
26
|
-
</tbody>
|
27
|
-
</table>
|
28
|
-
</div>
|