rails_mini_profiler 0.1.3 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -10
  3. data/app/assets/fonts/rails_mini_profiler/LICENSE.txt +202 -0
  4. data/app/assets/fonts/rails_mini_profiler/OpenSans-Bold.ttf +0 -0
  5. data/app/assets/fonts/rails_mini_profiler/OpenSans-Regular.ttf +0 -0
  6. data/app/assets/fonts/rails_mini_profiler/OpenSans-SemiBold.ttf +0 -0
  7. data/app/assets/javascripts/rails_mini_profiler.js +2 -0
  8. data/app/assets/stylesheets/rails_mini_profiler/application.css +23 -1
  9. data/app/assets/stylesheets/rails_mini_profiler/traces.css +1 -1
  10. data/app/models/rails_mini_profiler/application_record.rb +1 -1
  11. data/app/views/layouts/rails_mini_profiler/application.html.erb +0 -4
  12. data/lib/generators/rails_mini_profiler/install_generator.rb +5 -0
  13. data/lib/generators/rails_mini_profiler/templates/rails_mini_profiler.rb.erb +18 -7
  14. data/lib/rails_mini_profiler.rb +29 -3
  15. data/lib/rails_mini_profiler/badge.rb +18 -1
  16. data/lib/rails_mini_profiler/configuration.rb +24 -0
  17. data/lib/rails_mini_profiler/engine.rb +3 -0
  18. data/lib/rails_mini_profiler/guard.rb +18 -7
  19. data/lib/rails_mini_profiler/logger.rb +5 -0
  20. data/lib/rails_mini_profiler/models/base_model.rb +5 -0
  21. data/lib/rails_mini_profiler/models/trace.rb +28 -0
  22. data/lib/rails_mini_profiler/redirect.rb +8 -0
  23. data/lib/rails_mini_profiler/request_context.rb +24 -5
  24. data/lib/rails_mini_profiler/storage.rb +18 -0
  25. data/lib/rails_mini_profiler/tracers.rb +1 -1
  26. data/lib/rails_mini_profiler/version.rb +1 -1
  27. data/vendor/assets/javascripts/popper.js +6 -0
  28. data/vendor/assets/javascripts/tippy.js +2 -0
  29. metadata +8 -3
  30. data/lib/rails_mini_profiler/errors.rb +0 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5967d57f7e1091612b43ac198023ec78af212efd45039cdfd70e9c1cfc030422
4
- data.tar.gz: 5c3e03fd7ef6f6317c95618b3c01d6b0113c09749971e95bebb68bb3ad22bf1a
3
+ metadata.gz: 0024a0bf06919b656615d69145f2f68cbd18cca28a1ff1358aa0a06ab0bf2955
4
+ data.tar.gz: 9d3eb7af567564dc6458125cde850d8dd5db1117e50b4bf298bc07024f2cc533
5
5
  SHA512:
6
- metadata.gz: 3e8ab13ca5a216ce467d853bfe65cbed989286b290c40d930eeb913594630779e57584dc8526bb93985b84478ceac48a2867d1c80182a501e9c2e5f312bc98b5
7
- data.tar.gz: cff4e83fefaabb3c1d7db55e03d2a4353b3a3ded37f17a96dcf189c549df98c403c182579822602023c70aee6495d9366a9f0351a275e53aea4af2fcce573dfd
6
+ metadata.gz: 7c24ccb1d9c71acc7fa565f51d3832844e78969438080d5f849ca79734b9cbe77be0de055067f077ed07ec6f5a5d85d6e0a9ab8906adb361b126ac07bd4aa9ab
7
+ data.tar.gz: 9a440fb88d0066f1caf5d89115c1e3479dfa44bf01fe0b617f79ddc87a6ddba80365ca02a39d9154b101fc479dd3255d01ba34a6f0939ab68274a4a9390a3f68
data/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  [![Gem Version](https://badge.fury.io/rb/rails_mini_profiler.svg)](https://badge.fury.io/rb/rails_mini_profiler)
10
10
  [![Main](https://github.com/hschne/rails-mini-profiler/actions/workflows/main.yml/badge.svg)](https://github.com/hschne/rails-mini-profiler/actions/workflows/main.yml)
11
- [![Main](https://img.shields.io/github/license/hschne/rails-mini-profiler)](https://img.shields.io/github/license/hschne/rails-mini-profiler)
11
+ [![License](https://img.shields.io/github/license/hschne/rails-mini-profiler)](https://img.shields.io/github/license/hschne/rails-mini-profiler)
12
12
 
13
13
  [![Maintainability](https://api.codeclimate.com/v1/badges/1fcc2f4d01ab5bf7a260/maintainability)](https://codeclimate.com/github/hschne/rails-mini-profiler/maintainability)
14
14
  [![Test Coverage](https://api.codeclimate.com/v1/badges/1fcc2f4d01ab5bf7a260/test_coverage)](https://codeclimate.com/github/hschne/rails-mini-profiler/test_coverage)
@@ -91,17 +91,20 @@ By clicking on individual traces you can find out detailed information.
91
91
 
92
92
  ### Flamegraphs
93
93
 
94
- Rails Mini Profiler per default records Flamegraphs for every profiled request for convenience. Note that Flamegraphs recording
95
- incur a significant performance penalty, and can take up a lot of space.
94
+ Rails Mini Profiler automatically records Flamegraphs for profiled requests. To enable this feature, add [Stackprof](https://github.com/tmm1/stackprof)
95
+ to your Gemfile:
96
96
 
97
- To change the default behavior see [Configuration](#Configuration).
97
+ ```ruby
98
+ gem 'stackprof'
99
+ ```
100
+
101
+ For convenience, Flamegraphs are recorded for every request. This may incur a significant performance penalty. To change the default behavior see [Configuration](#Configuration).
98
102
 
99
- Flamegraphs are rendered using [Speedscope](https://github.com/jlfwong/speedscope). If Flamegraphs are not rendering
100
- you may have to amend your content security policy. See [Troubleshooting](#Troubleshooting)
103
+ Flamegraphs are rendered using [Speedscope](https://github.com/jlfwong/speedscope). See [Troubleshooting](#Troubleshooting) if Flamegraphs are not rendering correctly.
101
104
 
102
105
  ## Configuration
103
106
 
104
- You can set the following configuration options in Rails Mini Profiler:
107
+ Rails Mini Profiler provides a wide array of configuration options. You can find details below. For an example configuration check `initializers/rails_mini_profiler.rb` (or [the template file](https://github.com/hschne/rails-mini-profiler/blob/main/lib/generators/rails_mini_profiler/templates/rails_mini_profiler.rb.erb)).
105
108
 
106
109
  | Option | Default | Description |
107
110
  | ------------------------ | ---------------------------- | ----------------------------------------------------------------------------------------------- |
@@ -136,7 +139,7 @@ traces and requests are stored.
136
139
 
137
140
  Rails Mini Profiler does not offer an automatic way to clean up old profiling information. It is recommended you add a sweeper job to clean up old profiled requests periodically (e.g. using [clockwork](https://github.com/adamwiggins/clockwork). For example, with ActiveJob:
138
141
 
139
- ```
142
+ ```ruby
140
143
  # Clockwork
141
144
  every(1.month, 'purge rails mini profiler' do
142
145
  ProfiledRequestCleanupJob.perform_later
@@ -166,8 +169,6 @@ You may also explicitly set the user from the application itself:
166
169
 
167
170
  ```ruby
168
171
  class ApplicationController < ActionController::Base
169
- ...
170
-
171
172
  before_action do
172
173
  RailsMiniProfiler::User.authorize(current_user.id)
173
174
  end
@@ -243,6 +244,14 @@ end
243
244
 
244
245
  **Note: Sprockets and flash are currently required for some of Rails Mini Profiler's UI features. These modifications may no longer be needed in the future.
245
246
 
247
+ ### No Flamegraphs are being recored?
248
+
249
+ Make sure you have added [StackProf](https://github.com/tmm1/stackprof) to your Gemfile.
250
+
251
+ ```ruby
252
+ gem 'stackprof'
253
+ ```
254
+
246
255
  ### Flamegraphs are not rendering?
247
256
 
248
257
  Flamegraphs are loaded into [Speedscope](https://github.com/jlfwong/speedscope) using an Iframe and URI Encoded blobs (see [source](https://github.com/hschne/rails-mini-profiler/blob/main/app/views/rails_mini_profiler/flamegraphs/show.html.erb))
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -12,6 +12,8 @@
12
12
  //
13
13
  //= require rails-ujs
14
14
  //= require_tree .
15
+ //= require popper
16
+ //= require tippy
15
17
 
16
18
  function setupRequestSearch() {
17
19
  const profiledRequestNameSearch = document.getElementById('profiled-request-search')
@@ -14,6 +14,27 @@
14
14
  *= require_self
15
15
  */
16
16
 
17
+ @font-face {
18
+ font-family: 'Open Sans';
19
+ font-weight: 400;
20
+ font-style: normal;
21
+ src: url('OpenSans-Regular.ttf') format("truetype");
22
+ }
23
+
24
+ @font-face {
25
+ font-family: 'Open Sans';
26
+ font-weight: 600;
27
+ font-style: normal;
28
+ src: url('OpenSans-SemiBold.ttf') format("truetype");
29
+ }
30
+
31
+ @font-face {
32
+ font-family: 'Open Sans';
33
+ font-weight: 700;
34
+ font-style: normal;
35
+ src: url('OpenSans-Bold.ttf') format("truetype");
36
+ }
37
+
17
38
  html {
18
39
  width: 100%;
19
40
  height: 100%;
@@ -49,7 +70,8 @@ html {
49
70
  --border-color: var(--grey-200);
50
71
  --text-color: var(--grey-900);
51
72
 
52
- font-family: 'Open Sans', sans-serif;
73
+ font-family: 'Open Sans', monospace;
74
+
53
75
  }
54
76
 
55
77
  body {
@@ -71,7 +71,7 @@
71
71
 
72
72
  .sequel-trace-binds {
73
73
  margin: 0 0 1em 0;
74
- padding: .5em 0;
74
+ padding: .5em 1em;
75
75
  font-size: 12px;
76
76
  overflow: auto;
77
77
  max-height: 100px;
@@ -3,7 +3,7 @@
3
3
  module RailsMiniProfiler
4
4
  class ApplicationRecord < ActiveRecord::Base
5
5
  if RailsMiniProfiler.storage_configuration.database.present?
6
- establish_connection(RailsMiniProfiler.storage_configuration.database.present?)
6
+ establish_connection(RailsMiniProfiler.storage_configuration.database)
7
7
  end
8
8
 
9
9
  self.abstract_class = true
@@ -7,10 +7,6 @@
7
7
 
8
8
  <%= javascript_include_tag "rails_mini_profiler" %>
9
9
  <%= stylesheet_link_tag "rails_mini_profiler/application", media: "all" %>
10
- <link rel="preconnect" href="https://fonts.gstatic.com">
11
- <script src="https://unpkg.com/@popperjs/core@2"></script>
12
- <script src="https://unpkg.com/tippy.js@6"></script>
13
- <link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;0,800;1,300;1,400;1,600;1,700;1,800&display=swap" rel="stylesheet">
14
10
  </head>
15
11
  <body>
16
12
 
@@ -1,10 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsMiniProfiler
4
+ # Generators for Rails Mini Profiler
4
5
  module Generators
6
+ # A basic installation generator to help set up users apps
5
7
  class InstallGenerator < Rails::Generators::Base
6
8
  source_root File.expand_path('templates', __dir__)
7
9
 
10
+ # Install Rails Mini Profiler to your Rails app
11
+ #
12
+ # Updates the routes file to mount the engine, adds an initializer and copies a migration.
8
13
  desc 'Install rails-mini-profiler'
9
14
  def install
10
15
  route("mount RailsMiniProfiler::Engine => '/rails_mini_profiler'")
@@ -1,13 +1,24 @@
1
1
  RailsMiniProfiler.configure do |config|
2
2
  # Customize when Rails Mini Profiler should run
3
- # config.enabled = proc { |env| Rails.env.development? || request.headers[RMP_ENABLED].present? }
3
+ config.enabled = proc { |env| Rails.env.development? || env['HTTP_RMP_ENABLED'].present? }
4
4
 
5
- # Disable Flamegraph generation
6
- # config.flamegraph_enabled = false
5
+ # Configure how hedgehog badge is rendered
6
+ config.badge_enabled = true
7
+ # config.badge_position = 'top-left'
7
8
 
8
- # Use RailsMiniProfiler::Storage::ActiveRecord to store profiles in your Database
9
- config.storage = RailsMiniProfiler::Storage
9
+ # Configure Flamegraph generation
10
+ config.flamegraph_enabled = true
11
+ # config.flamegraph_sample_rate = 0.5
10
12
 
11
- # Uncomment to customize how users are detected
12
- # config.user_provider = proc { |env| Rack::Request.new(env).ip }
13
+ # Configure endpoints to profile
14
+ config.skip_paths = []
15
+
16
+ # Configure how Rails Mini Profiler stores profiling information
17
+ # config.storage.database = :rmp_database
18
+ # config.storage.profiled_requests_table = :rmp_profiled_requests
19
+ # config.storage.traces_table = :rmp_traces
20
+ # config.storage.flamegraphs_table = :rmp_flamegraphs
21
+
22
+ # Customize how users are detected
23
+ config.user_provider = proc { |env| Rack::Request.new(env).ip }
13
24
  end
@@ -6,8 +6,6 @@ require 'inline_svg'
6
6
  require 'rails_mini_profiler/version'
7
7
  require 'rails_mini_profiler/engine'
8
8
 
9
- require 'rails_mini_profiler/errors'
10
-
11
9
  require 'rails_mini_profiler/user'
12
10
  require 'rails_mini_profiler/request_context'
13
11
 
@@ -26,28 +24,56 @@ require 'rails_mini_profiler/badge'
26
24
  require 'rails_mini_profiler/tracers'
27
25
  require 'rails_mini_profiler/middleware'
28
26
 
27
+ # Main namespace for Rails Mini Profiler
29
28
  module RailsMiniProfiler
30
29
  class << self
30
+ # Create a new configuration object
31
+ #
32
+ # @return [Configuration] a new configuration
31
33
  def configuration
32
34
  @configuration ||= Configuration.new
33
35
  end
34
36
 
37
+ # Configure Rails Mini Profiler
38
+ #
39
+ # You may use this to configure where and how Rails Mini Profiler stores profiling and storage information.
40
+ #
41
+ # @see https://github.com/hschne/rails-mini-profiler#configuration
42
+ #
43
+ # @yieldreturn [Configuration] a new configuration
35
44
  def configure
36
45
  yield(configuration)
37
46
  end
38
47
 
48
+ # Access storage configuration.
49
+ #
50
+ #
51
+ # @return [Storage] a new storage configuration
39
52
  def storage_configuration
40
- configuration.storage.configuration
53
+ configuration.storage
41
54
  end
42
55
 
56
+ # Access the current logger
57
+ #
58
+ # @return [Logger] the logger instance
43
59
  def logger
44
60
  @logger ||= configuration.logger
45
61
  end
46
62
 
63
+ # Authorize the current user for this request
64
+ #
65
+ # @param current_user [Object] the current user
66
+ #
67
+ # @see User#current_user
47
68
  def authorize!(current_user)
48
69
  RailsMiniProfiler::User.current_user = current_user
49
70
  end
50
71
 
72
+ # Set the current user for this request
73
+ #
74
+ # @param current_user [Object] the current user
75
+ #
76
+ # @see User#current_user
51
77
  def current_user=(current_user)
52
78
  RailsMiniProfiler::User.current_user = current_user
53
79
  end
@@ -1,16 +1,24 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsMiniProfiler
4
+ # Wraps functionality to render an interactive badge on top of HTML responses
5
+ #
6
+ # @api private
4
7
  class Badge
5
8
  include InlineSvg::ActionView::Helpers
6
9
  include Engine.routes.url_helpers
7
10
 
11
+ # @param request_context [RequestContext] The current request context
12
+ # @param configuration [Configuration] The current configuration
8
13
  def initialize(request_context, configuration: RailsMiniProfiler.configuration)
9
14
  @configuration = configuration
10
15
  @profiled_request = request_context.profiled_request
11
16
  @original_response = request_context.response
12
17
  end
13
18
 
19
+ # Inject the badge into the response
20
+ #
21
+ # @return [ResponseWrapper] The modified response
14
22
  def render
15
23
  content_type = @original_response.headers['Content-Type']
16
24
  return @original_response unless content_type =~ %r{text/html}
@@ -29,6 +37,9 @@ module RailsMiniProfiler
29
37
 
30
38
  private
31
39
 
40
+ # Modify the body of the original response
41
+ #
42
+ # @return String The modified body
32
43
  def modified_body
33
44
  body = @original_response.response.body
34
45
  index = body.rindex(%r{</body>}i) || body.rindex(%r{</html>}i)
@@ -39,6 +50,9 @@ module RailsMiniProfiler
39
50
  end
40
51
  end
41
52
 
53
+ # Render the badge template
54
+ #
55
+ # @return String The badge HTML content to be injected
42
56
  def badge_content
43
57
  html = IO.read(File.expand_path('../../app/views/rails_mini_profiler/badge.html.erb', __dir__))
44
58
  @position = css_position
@@ -46,8 +60,11 @@ module RailsMiniProfiler
46
60
  template.result(binding)
47
61
  end
48
62
 
63
+ # Transform the configuration position into CSS styles
64
+ #
65
+ # @return String The badge position as CSS style
49
66
  def css_position
50
- case RailsMiniProfiler.configuration.badge_position
67
+ case @configuration.badge_position
51
68
  when 'top-right'
52
69
  'top: 5px; right: 5px;'
53
70
  when 'bottom-left'
@@ -1,6 +1,25 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsMiniProfiler
4
+ # The main Rails Mini Profiler configuration object
5
+ #
6
+ # @!attribute [r] logger
7
+ # @return [Logger] the current logger
8
+ # @!attribute enabled
9
+ # @return [Boolean] if the profiler is enabled
10
+ # @!attribute badge_position
11
+ # @see Badge
12
+ # @return [String] the position of the interactive HTML badge.
13
+ # @!attribute flamegraph_enabled
14
+ # @return [Boolean] if Flamegraph recording is enabled
15
+ # @!attribute flamegraph_sample_rate
16
+ # @return [Float] the sample rate in samples per millisecond
17
+ # @!attribute skip_paths
18
+ # @return [Array<String>] a list of regex patterns for paths to skip
19
+ # @!attribute storage
20
+ # @return [Storage] the storage configuration
21
+ # @!attribute user_provider
22
+ # @return [Proc] a proc to identify a user based on a rack env
4
23
  class Configuration
5
24
  attr_reader :logger
6
25
 
@@ -18,6 +37,7 @@ module RailsMiniProfiler
18
37
  kwargs.each { |key, value| instance_variable_set("@#{key}", value) }
19
38
  end
20
39
 
40
+ # Reset the configuration to default values
21
41
  def reset
22
42
  @enabled = proc { |_env| Rails.env.development? || Rails.env.test? }
23
43
  @badge_enabled = true
@@ -30,6 +50,10 @@ module RailsMiniProfiler
30
50
  @user_provider = proc { |env| Rack::Request.new(env).ip }
31
51
  end
32
52
 
53
+ # Set the logger
54
+ #
55
+ # @param logger [Logger]
56
+ # The logger to be used. If set to nil, the Rails default logger is used and the log level set to fatal
33
57
  def logger=(logger)
34
58
  if logger.nil?
35
59
  @logger.level = Logger::FATAL
@@ -1,6 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsMiniProfiler
4
+ # The Rails Mini Profiler engine
5
+ #
6
+ # Injects a a custom [Middleware] into an existing Rails app to record request profiling information.
4
7
  class Engine < ::Rails::Engine
5
8
  isolate_namespace RailsMiniProfiler
6
9
 
@@ -1,13 +1,22 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsMiniProfiler
4
+ # Encapsulates guard conditions on whether or not to run certain parts of the profiler.
4
5
  class Guard
6
+ # @param request_context [RequestContext] the current request context
7
+ # @param configuration [Configuration] the current configuration
5
8
  def initialize(request_context, configuration: RailsMiniProfiler.configuration)
6
9
  @request_context = request_context
7
10
  @request = request_context.request
8
11
  @configuration = configuration
9
12
  end
10
13
 
14
+ # Whether or not to profile
15
+ #
16
+ # Profiling is disabled the profiler has been flat out disabled in the configuration or if the current request path
17
+ # matches on of the ignored paths.
18
+ #
19
+ # @return [Boolean] false if no profiling should be done
11
20
  def profile?
12
21
  return false unless enabled?
13
22
 
@@ -16,26 +25,28 @@ module RailsMiniProfiler
16
25
  true
17
26
  end
18
27
 
19
- def store?
20
- return false unless @request_context.user
21
-
22
- true
23
- end
24
-
25
28
  private
26
29
 
30
+ # Is the path of the current request an ignored one?
31
+ #
32
+ # @return [Boolean] true if the path is ignored. Per default, paths going to the engine itself are ignored, as are
33
+ # asset requests, and the paths the user has configured.
27
34
  def ignored_path?
28
35
  return true if /#{Engine.routes.find_script_name({})}/.match?(@request.path)
29
36
 
30
37
  return true if /assets/.match?(@request.path)
31
38
 
32
39
  ignored_paths = @configuration.skip_paths
33
-
34
40
  return true if Regexp.union(ignored_paths).match?(@request.path)
35
41
 
36
42
  false
37
43
  end
38
44
 
45
+ # Is the profiler enabled?
46
+ #
47
+ # Takes into account the current request env to decide if the profiler is enabled.
48
+ #
49
+ # @return [Boolean] false if the profiler is disabled
39
50
  def enabled?
40
51
  enabled = @configuration.enabled
41
52
  return enabled unless enabled.respond_to?(:call)
@@ -1,7 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsMiniProfiler
4
+ # Construct a new custom logger to log from within the engine
4
5
  module Logger
6
+ # Extends a logger with additional formatting
7
+ #
8
+ # @return [Logger] a customized logger
5
9
  def self.new(logger)
6
10
  logger = logger.dup
7
11
 
@@ -11,6 +15,7 @@ module RailsMiniProfiler
11
15
  logger.extend(self)
12
16
  end
13
17
 
18
+ # Custom formatter to add a RailsMiniProfiler tag to log messages
14
19
  module Formatter
15
20
  def call(severity, timestamp, progname, msg)
16
21
  super(severity, timestamp, progname, "[RailsMiniProfiler] #{msg}")
@@ -1,7 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsMiniProfiler
4
+ # Thin wrappers around request/response classes
5
+ #
6
+ # @api private
4
7
  module Models
8
+ # A pseudo model to be used to wrap profiling information. We can't use regular models, as their connecting
9
+ # to the database results in problems when profiling.
5
10
  class BaseModel
6
11
  include ActiveModel::Model
7
12
 
@@ -2,6 +2,34 @@
2
2
 
3
3
  module RailsMiniProfiler
4
4
  module Models
5
+ # A simplified representation of a trace.
6
+ #
7
+ # Is transformed into [RailsMiniProfiler::Trace] when recording has finished.
8
+ #
9
+ # @see https://guides.rubyonrails.org/active_support_instrumentation.html
10
+ #
11
+ # @!attribute id
12
+ # @return [Integer] the trace ID
13
+ # @!attribute name
14
+ # @return [Integer] the trace type.
15
+ # @!attribute start
16
+ # @return [Integer] the trace start as microsecond timestamp
17
+ # @!attribute finish
18
+ # @return [Integer] the trace finish as microsecond timestamp
19
+ # @!attribute duration
20
+ # @return [Integer] the trace duration
21
+ # @!attribute payload
22
+ # @return [Hash] a subset of trace data
23
+ # @!attribute backtrace
24
+ # @return [String] the line where this trace was recorded
25
+ # @!attribute allocations
26
+ # @return [Integer] the number of alloactions
27
+ # @!attribute created_at
28
+ # @return [DateTime] the creation date
29
+ # @!attribute updated_at
30
+ # @return [DateTime] the last updated date
31
+ #
32
+ # @api private
5
33
  class Trace < BaseModel
6
34
  attr_accessor :id, :name, :start, :finish, :duration, :payload, :backtrace, :allocations, :created_at, :updated_at
7
35
  end
@@ -1,14 +1,22 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsMiniProfiler
4
+ # Renders a redirect response if the user should be redirected from the original request
4
5
  class Redirect
5
6
  include Engine.routes.url_helpers
6
7
 
8
+ # @param request_context [RequestContext] the current request context
7
9
  def initialize(request_context)
8
10
  @request = request_context.request
9
11
  @profiled_request = request_context.profiled_request
10
12
  end
11
13
 
14
+ # Renders a redirect to a specific resource under certain conditions
15
+ #
16
+ # When the user requests a Flamegraph using a parameter for a specific request, they are being served a redirect.
17
+ #
18
+ # @return [Boolean] false if no redirect happens
19
+ # @return [Array] response with status 302 and the new location to redirect to
12
20
  def render
13
21
  params = CGI.parse(@request.query_string).transform_values(&:first).with_indifferent_access
14
22
  return redirect_to(flamegraph_path(@profiled_request.id)) if params[:rmp_flamegraph]
@@ -1,11 +1,27 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsMiniProfiler
4
+ # A working context for the duration of a request, as it runs through Rails Mini Profiler's middleware
5
+ #
6
+ # Contains all information that is being gathered while profiling is active. At the end of the request processing,
7
+ # the request context is converted into a models which are then stored in the host apps database.
8
+ #
9
+ # @!attribute [r] request
10
+ # @return [RequestWrapper] the request as sent to the application
11
+ # @!attribute response
12
+ # @return [ResponseWrapper] the response as rendered by the application
13
+ # @!attribute profiled_request
14
+ # @return [ProfiledRequest] the profiling data as gathered during profiling
15
+ # @!attribute traces
16
+ # @return [Array<Models::Trace>] trace wrappers gathered during profiling
17
+ # @!attribute flamegraph
18
+ # @return [Flamegraph] a Flamegraph, if recorded
4
19
  class RequestContext
5
20
  attr_reader :request
6
21
 
7
22
  attr_accessor :response, :profiled_request, :traces, :flamegraph
8
23
 
24
+ # @param request [RequestWrapper] the request as sent to the application
9
25
  def initialize(request)
10
26
  @request = request
11
27
  @env = request.env
@@ -13,16 +29,16 @@ module RailsMiniProfiler
13
29
  @complete = false
14
30
  end
15
31
 
16
- def user_id
17
- @user_id ||= User.current_user
18
- end
19
-
32
+ # If a user is currently authorized
33
+ #
34
+ # @return [Boolean] true if the user is authorized
20
35
  def authorized?
21
36
  @authorized ||= User.get(@env).present?
22
37
  end
23
38
 
39
+ # Completes profiling, setting all data and preparing for saving it.
24
40
  def complete_profiling!
25
- profiled_request.user_id = user_id
41
+ profiled_request.user_id = User.current_user
26
42
  profiled_request.request = @request
27
43
  profiled_request.response = @response
28
44
  total_time = traces.find { |trace| trace.name == 'rails_mini_profiler.total_time' }
@@ -30,6 +46,9 @@ module RailsMiniProfiler
30
46
  @complete = true
31
47
  end
32
48
 
49
+ # Save profiling data in the database.
50
+ #
51
+ # This will store the profiled request, as well as any attached traces and Flamgraph.
33
52
  def save_results!
34
53
  ActiveRecord::Base.transaction do
35
54
  profiled_request.flamegraph = RailsMiniProfiler::Flamegraph.new(data: flamegraph) if flamegraph.present?
@@ -1,14 +1,31 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsMiniProfiler
4
+ # Configure how profiling data is stored within your Rails app.
5
+ #
6
+ # @!attribute database
7
+ # @return [Symbol] which database to connect to
8
+ # @!attribute profiled_requests_table
9
+ # @return [Symbol] where to store profiled requests
10
+ # @!attribute traces_table
11
+ # @return [Symbol] where to store traces
12
+ # @!attribute flamegraphs_table
13
+ # @return [Symbol] where to store flamegraphs
4
14
  class Storage
5
15
  class << self
16
+ # Construct a new configuration instance
17
+ #
18
+ # @return [Storage] a new storage configuration
6
19
  def configuration
7
20
  @configuration ||= new
8
21
  end
9
22
 
23
+ # Configure how profiling data is stored
24
+ #
25
+ # @yieldreturn [Storage] a new storage configuration object
10
26
  def configure
11
27
  yield(configuration)
28
+ configuration
12
29
  end
13
30
  end
14
31
 
@@ -19,6 +36,7 @@ module RailsMiniProfiler
19
36
  kwargs.each { |key, value| instance_variable_set("@#{key}", value) }
20
37
  end
21
38
 
39
+ # Reset the configuration to default values
22
40
  def defaults!
23
41
  @database = nil
24
42
  @profiled_requests_table = 'rmp_profiled_requests'
@@ -60,7 +60,7 @@ module RailsMiniProfiler
60
60
  typecasted_binds = payload[:type_casted_binds]
61
61
  # Sometimes, typecasted binds are a proc. Not sure why. In those instances, we extract the typecasted
62
62
  # values from the proc by executing call.
63
- typecasted_binds = typecasted_binds.respond_to?(:call) ? typecasted_binds.call : typecasted_binds
63
+ typecasted_binds = typecasted_binds.call if typecasted_binds.respond_to?(:call)
64
64
  payload[:binds] = transform_binds(payload[:binds], typecasted_binds)
65
65
  payload.delete(:type_casted_binds)
66
66
  payload.reject { |_k, v| v.blank? }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsMiniProfiler
4
- VERSION = '0.1.3'
4
+ VERSION = '0.2.1'
5
5
  end
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @popperjs/core v2.9.2 - MIT License
3
+ */
4
+
5
+ "use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Popper={})}(this,(function(e){function t(e){return{width:(e=e.getBoundingClientRect()).width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function n(e){return null==e?window:"[object Window]"!==e.toString()?(e=e.ownerDocument)&&e.defaultView||window:e}function o(e){return{scrollLeft:(e=n(e)).pageXOffset,scrollTop:e.pageYOffset}}function r(e){return e instanceof n(e).Element||e instanceof Element}function i(e){return e instanceof n(e).HTMLElement||e instanceof HTMLElement}function a(e){return"undefined"!=typeof ShadowRoot&&(e instanceof n(e).ShadowRoot||e instanceof ShadowRoot)}function s(e){return e?(e.nodeName||"").toLowerCase():null}function f(e){return((r(e)?e.ownerDocument:e.document)||window.document).documentElement}function p(e){return t(f(e)).left+o(e).scrollLeft}function c(e){return n(e).getComputedStyle(e)}function l(e){return e=c(e),/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function u(e,r,a){void 0===a&&(a=!1);var c=f(r);e=t(e);var u=i(r),d={scrollLeft:0,scrollTop:0},m={x:0,y:0};return(u||!u&&!a)&&(("body"!==s(r)||l(c))&&(d=r!==n(r)&&i(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:o(r)),i(r)?((m=t(r)).x+=r.clientLeft,m.y+=r.clientTop):c&&(m.x=p(c))),{x:e.left+d.scrollLeft-m.x,y:e.top+d.scrollTop-m.y,width:e.width,height:e.height}}function d(e){var n=t(e),o=e.offsetWidth,r=e.offsetHeight;return 1>=Math.abs(n.width-o)&&(o=n.width),1>=Math.abs(n.height-r)&&(r=n.height),{x:e.offsetLeft,y:e.offsetTop,width:o,height:r}}function m(e){return"html"===s(e)?e:e.assignedSlot||e.parentNode||(a(e)?e.host:null)||f(e)}function h(e){return 0<=["html","body","#document"].indexOf(s(e))?e.ownerDocument.body:i(e)&&l(e)?e:h(m(e))}function v(e,t){var o;void 0===t&&(t=[]);var r=h(e);return e=r===(null==(o=e.ownerDocument)?void 0:o.body),o=n(r),r=e?[o].concat(o.visualViewport||[],l(r)?r:[]):r,t=t.concat(r),e?t:t.concat(v(m(r)))}function g(e){return i(e)&&"fixed"!==c(e).position?e.offsetParent:null}function y(e){for(var t=n(e),o=g(e);o&&0<=["table","td","th"].indexOf(s(o))&&"static"===c(o).position;)o=g(o);if(o&&("html"===s(o)||"body"===s(o)&&"static"===c(o).position))return t;if(!o)e:{if(o=-1!==navigator.userAgent.toLowerCase().indexOf("firefox"),-1===navigator.userAgent.indexOf("Trident")||!i(e)||"fixed"!==c(e).position)for(e=m(e);i(e)&&0>["html","body"].indexOf(s(e));){var r=c(e);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||o&&"filter"===r.willChange||o&&r.filter&&"none"!==r.filter){o=e;break e}e=e.parentNode}o=null}return o||t}function b(e){function t(e){o.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){o.has(e)||(e=n.get(e))&&t(e)})),r.push(e)}var n=new Map,o=new Set,r=[];return e.forEach((function(e){n.set(e.name,e)})),e.forEach((function(e){o.has(e.name)||t(e)})),r}function w(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}function x(e){return e.split("-")[0]}function O(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&a(n))do{if(t&&e.isSameNode(t))return!0;t=t.parentNode||t.host}while(t);return!1}function j(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function E(e,r){if("viewport"===r){r=n(e);var a=f(e);r=r.visualViewport;var s=a.clientWidth;a=a.clientHeight;var l=0,u=0;r&&(s=r.width,a=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(l=r.offsetLeft,u=r.offsetTop)),e=j(e={width:s,height:a,x:l+p(e),y:u})}else i(r)?((e=t(r)).top+=r.clientTop,e.left+=r.clientLeft,e.bottom=e.top+r.clientHeight,e.right=e.left+r.clientWidth,e.width=r.clientWidth,e.height=r.clientHeight,e.x=e.left,e.y=e.top):(u=f(e),e=f(u),s=o(u),r=null==(a=u.ownerDocument)?void 0:a.body,a=_(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),l=_(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),u=-s.scrollLeft+p(u),s=-s.scrollTop,"rtl"===c(r||e).direction&&(u+=_(e.clientWidth,r?r.clientWidth:0)-a),e=j({width:a,height:l,x:u,y:s}));return e}function D(e,t,n){return t="clippingParents"===t?function(e){var t=v(m(e)),n=0<=["absolute","fixed"].indexOf(c(e).position)&&i(e)?y(e):e;return r(n)?t.filter((function(e){return r(e)&&O(e,n)&&"body"!==s(e)})):[]}(e):[].concat(t),(n=(n=[].concat(t,[n])).reduce((function(t,n){return n=E(e,n),t.top=_(n.top,t.top),t.right=U(n.right,t.right),t.bottom=U(n.bottom,t.bottom),t.left=_(n.left,t.left),t}),E(e,n[0]))).width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}function L(e){return 0<=["top","bottom"].indexOf(e)?"x":"y"}function P(e){var t=e.reference,n=e.element,o=(e=e.placement)?x(e):null;e=e?e.split("-")[1]:null;var r=t.x+t.width/2-n.width/2,i=t.y+t.height/2-n.height/2;switch(o){case"top":r={x:r,y:t.y-n.height};break;case"bottom":r={x:r,y:t.y+t.height};break;case"right":r={x:t.x+t.width,y:i};break;case"left":r={x:t.x-n.width,y:i};break;default:r={x:t.x,y:t.y}}if(null!=(o=o?L(o):null))switch(i="y"===o?"height":"width",e){case"start":r[o]-=t[i]/2-n[i]/2;break;case"end":r[o]+=t[i]/2-n[i]/2}return r}function M(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function k(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function A(e,n){void 0===n&&(n={});var o=n;n=void 0===(n=o.placement)?e.placement:n;var i=o.boundary,a=void 0===i?"clippingParents":i,s=void 0===(i=o.rootBoundary)?"viewport":i;i=void 0===(i=o.elementContext)?"popper":i;var p=o.altBoundary,c=void 0!==p&&p;o=M("number"!=typeof(o=void 0===(o=o.padding)?0:o)?o:k(o,C));var l=e.elements.reference;p=e.rects.popper,a=D(r(c=e.elements[c?"popper"===i?"reference":"popper":i])?c:c.contextElement||f(e.elements.popper),a,s),c=P({reference:s=t(l),element:p,strategy:"absolute",placement:n}),p=j(Object.assign({},p,c)),s="popper"===i?p:s;var u={top:a.top-s.top+o.top,bottom:s.bottom-a.bottom+o.bottom,left:a.left-s.left+o.left,right:s.right-a.right+o.right};if(e=e.modifiersData.offset,"popper"===i&&e){var d=e[n];Object.keys(u).forEach((function(e){var t=0<=["right","bottom"].indexOf(e)?1:-1,n=0<=["top","bottom"].indexOf(e)?"y":"x";u[e]+=d[n]*t}))}return u}function W(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function B(e){void 0===e&&(e={});var t=e.defaultModifiers,n=void 0===t?[]:t,o=void 0===(e=e.defaultOptions)?F:e;return function(e,t,i){function a(){f.forEach((function(e){return e()})),f=[]}void 0===i&&(i=o);var s={placement:"bottom",orderedModifiers:[],options:Object.assign({},F,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},f=[],p=!1,c={state:s,setOptions:function(i){return a(),s.options=Object.assign({},o,s.options,i),s.scrollParents={reference:r(e)?v(e):e.contextElement?v(e.contextElement):[],popper:v(t)},i=function(e){var t=b(e);return I.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(n,s.options.modifiers))),s.orderedModifiers=i.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options;n=void 0===n?{}:n,"function"==typeof(e=e.effect)&&(t=e({state:s,name:t,instance:c,options:n}),f.push(t||function(){}))})),c.update()},forceUpdate:function(){if(!p){var e=s.elements,t=e.reference;if(W(t,e=e.popper))for(s.rects={reference:u(t,y(e),"fixed"===s.options.strategy),popper:d(e)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)})),t=0;t<s.orderedModifiers.length;t++)if(!0===s.reset)s.reset=!1,t=-1;else{var n=s.orderedModifiers[t];e=n.fn;var o=n.options;o=void 0===o?{}:o,n=n.name,"function"==typeof e&&(s=e({state:s,options:o,name:n,instance:c})||s)}}},update:w((function(){return new Promise((function(e){c.forceUpdate(),e(s)}))})),destroy:function(){a(),p=!0}};return W(e,t)?(c.setOptions(i).then((function(e){!p&&i.onFirstUpdate&&i.onFirstUpdate(e)})),c):c}}function T(e){var t,o=e.popper,r=e.popperRect,i=e.placement,a=e.offsets,s=e.position,p=e.gpuAcceleration,l=e.adaptive;if(!0===(e=e.roundOffsets)){e=a.y;var u=window.devicePixelRatio||1;e={x:z(z(a.x*u)/u)||0,y:z(z(e*u)/u)||0}}else e="function"==typeof e?e(a):a;e=void 0===(e=(u=e).x)?0:e,u=void 0===(u=u.y)?0:u;var d=a.hasOwnProperty("x");a=a.hasOwnProperty("y");var m,h="left",v="top",g=window;if(l){var b=y(o),w="clientHeight",x="clientWidth";b===n(o)&&("static"!==c(b=f(o)).position&&(w="scrollHeight",x="scrollWidth")),"top"===i&&(v="bottom",u-=b[w]-r.height,u*=p?1:-1),"left"===i&&(h="right",e-=b[x]-r.width,e*=p?1:-1)}return o=Object.assign({position:s},l&&J),p?Object.assign({},o,((m={})[v]=a?"0":"",m[h]=d?"0":"",m.transform=2>(g.devicePixelRatio||1)?"translate("+e+"px, "+u+"px)":"translate3d("+e+"px, "+u+"px, 0)",m)):Object.assign({},o,((t={})[v]=a?u+"px":"",t[h]=d?e+"px":"",t.transform="",t))}function H(e){return e.replace(/left|right|bottom|top/g,(function(e){return $[e]}))}function R(e){return e.replace(/start|end/g,(function(e){return ee[e]}))}function S(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function q(e){return["top","right","bottom","left"].some((function(t){return 0<=e[t]}))}var C=["top","bottom","right","left"],N=C.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),V=[].concat(C,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),I="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),_=Math.max,U=Math.min,z=Math.round,F={placement:"bottom",modifiers:[],strategy:"absolute"},X={passive:!0},Y={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,o=e.instance,r=(e=e.options).scroll,i=void 0===r||r,a=void 0===(e=e.resize)||e,s=n(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&f.forEach((function(e){e.addEventListener("scroll",o.update,X)})),a&&s.addEventListener("resize",o.update,X),function(){i&&f.forEach((function(e){e.removeEventListener("scroll",o.update,X)})),a&&s.removeEventListener("resize",o.update,X)}},data:{}},G={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=P({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},J={top:"auto",right:"auto",bottom:"auto",left:"auto"},K={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options;e=void 0===(e=n.gpuAcceleration)||e;var o=n.adaptive;o=void 0===o||o,n=void 0===(n=n.roundOffsets)||n,e={placement:x(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e},null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,T(Object.assign({},e,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:n})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,T(Object.assign({},e,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:n})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Q={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},r=t.elements[e];i(r)&&s(r)&&(Object.assign(r.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],r=t.attributes[e]||{};e=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{}),i(o)&&s(o)&&(Object.assign(o.style,e),Object.keys(r).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]},Z={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.name,o=void 0===(e=e.options.offset)?[0,0]:e,r=(e=V.reduce((function(e,n){var r=t.rects,i=x(n),a=0<=["left","top"].indexOf(i)?-1:1,s="function"==typeof o?o(Object.assign({},r,{placement:n})):o;return r=(r=s[0])||0,s=((s=s[1])||0)*a,i=0<=["left","right"].indexOf(i)?{x:s,y:r}:{x:r,y:s},e[n]=i,e}),{}))[t.placement],i=r.x;r=r.y,null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=i,t.modifiersData.popperOffsets.y+=r),t.modifiersData[n]=e}},$={left:"right",right:"left",bottom:"top",top:"bottom"},ee={start:"end",end:"start"},te={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options;if(e=e.name,!t.modifiersData[e]._skip){var o=n.mainAxis;o=void 0===o||o;var r=n.altAxis;r=void 0===r||r;var i=n.fallbackPlacements,a=n.padding,s=n.boundary,f=n.rootBoundary,p=n.altBoundary,c=n.flipVariations,l=void 0===c||c,u=n.allowedAutoPlacements;c=x(n=t.options.placement),i=i||(c!==n&&l?function(e){if("auto"===x(e))return[];var t=H(e);return[R(e),t,R(t)]}(n):[H(n)]);var d=[n].concat(i).reduce((function(e,n){return e.concat("auto"===x(n)?function(e,t){void 0===t&&(t={});var n=t.boundary,o=t.rootBoundary,r=t.padding,i=t.flipVariations,a=t.allowedAutoPlacements,s=void 0===a?V:a,f=t.placement.split("-")[1];0===(i=(t=f?i?N:N.filter((function(e){return e.split("-")[1]===f})):C).filter((function(e){return 0<=s.indexOf(e)}))).length&&(i=t);var p=i.reduce((function(t,i){return t[i]=A(e,{placement:i,boundary:n,rootBoundary:o,padding:r})[x(i)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:s,rootBoundary:f,padding:a,flipVariations:l,allowedAutoPlacements:u}):n)}),[]);n=t.rects.reference,i=t.rects.popper;var m=new Map;c=!0;for(var h=d[0],v=0;v<d.length;v++){var g=d[v],y=x(g),b="start"===g.split("-")[1],w=0<=["top","bottom"].indexOf(y),O=w?"width":"height",j=A(t,{placement:g,boundary:s,rootBoundary:f,altBoundary:p,padding:a});if(b=w?b?"right":"left":b?"bottom":"top",n[O]>i[O]&&(b=H(b)),O=H(b),w=[],o&&w.push(0>=j[y]),r&&w.push(0>=j[b],0>=j[O]),w.every((function(e){return e}))){h=g,c=!1;break}m.set(g,w)}if(c)for(o=function(e){var t=d.find((function(t){if(t=m.get(t))return t.slice(0,e).every((function(e){return e}))}));if(t)return h=t,"break"},r=l?3:1;0<r&&"break"!==o(r);r--);t.placement!==h&&(t.modifiersData[e]._skip=!0,t.placement=h,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},ne={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options;e=e.name;var o=n.mainAxis,r=void 0===o||o,i=void 0!==(o=n.altAxis)&&o;o=void 0===(o=n.tether)||o;var a=n.tetherOffset,s=void 0===a?0:a,f=A(t,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary});n=x(t.placement);var p=t.placement.split("-")[1],c=!p,l=L(n);n="x"===l?"y":"x",a=t.modifiersData.popperOffsets;var u=t.rects.reference,m=t.rects.popper,h="function"==typeof s?s(Object.assign({},t.rects,{placement:t.placement})):s;if(s={x:0,y:0},a){if(r||i){var v="y"===l?"top":"left",g="y"===l?"bottom":"right",b="y"===l?"height":"width",w=a[l],O=a[l]+f[v],j=a[l]-f[g],E=o?-m[b]/2:0,D="start"===p?u[b]:m[b];p="start"===p?-m[b]:-u[b],m=t.elements.arrow,m=o&&m?d(m):{width:0,height:0};var P=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0};v=P[v],g=P[g],m=_(0,U(u[b],m[b])),D=c?u[b]/2-E-m-v-h:D-m-v-h,u=c?-u[b]/2+E+m+g+h:p+m+g+h,c=t.elements.arrow&&y(t.elements.arrow),h=t.modifiersData.offset?t.modifiersData.offset[t.placement][l]:0,c=a[l]+D-h-(c?"y"===l?c.clientTop||0:c.clientLeft||0:0),u=a[l]+u-h,r&&(r=o?U(O,c):O,j=o?_(j,u):j,r=_(r,U(w,j)),a[l]=r,s[l]=r-w),i&&(r=(i=a[n])+f["x"===l?"top":"left"],f=i-f["x"===l?"bottom":"right"],r=o?U(r,c):r,o=o?_(f,u):f,o=_(r,U(i,o)),a[n]=o,s[n]=o-i)}t.modifiersData[e]=s}},requiresIfExists:["offset"]},oe={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,o=e.name,r=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=x(n.placement);if(e=L(s),s=0<=["left","right"].indexOf(s)?"height":"width",i&&a){r=M("number"!=typeof(r="function"==typeof(r=r.padding)?r(Object.assign({},n.rects,{placement:n.placement})):r)?r:k(r,C));var f=d(i),p="y"===e?"top":"left",c="y"===e?"bottom":"right",l=n.rects.reference[s]+n.rects.reference[e]-a[e]-n.rects.popper[s];a=a[e]-n.rects.reference[e],a=(i=(i=y(i))?"y"===e?i.clientHeight||0:i.clientWidth||0:0)/2-f[s]/2+(l/2-a/2),s=_(r[p],U(a,i-f[s]-r[c])),n.modifiersData[o]=((t={})[e]=s,t.centerOffset=s-a,t)}},effect:function(e){var t=e.state;if(null!=(e=void 0===(e=e.options.element)?"[data-popper-arrow]":e)){if("string"==typeof e&&!(e=t.elements.popper.querySelector(e)))return;O(t.elements.popper,e)&&(t.elements.arrow=e)}},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},re={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state;e=e.name;var n=t.rects.reference,o=t.rects.popper,r=t.modifiersData.preventOverflow,i=A(t,{elementContext:"reference"}),a=A(t,{altBoundary:!0});n=S(i,n),o=S(a,o,r),r=q(n),a=q(o),t.modifiersData[e]={referenceClippingOffsets:n,popperEscapeOffsets:o,isReferenceHidden:r,hasPopperEscaped:a},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":r,"data-popper-escaped":a})}},ie=B({defaultModifiers:[Y,G,K,Q]}),ae=[Y,G,K,Q,Z,te,ne,oe,re],se=B({defaultModifiers:ae});e.applyStyles=Q,e.arrow=oe,e.computeStyles=K,e.createPopper=se,e.createPopperLite=ie,e.defaultModifiers=ae,e.detectOverflow=A,e.eventListeners=Y,e.flip=te,e.hide=re,e.offset=Z,e.popperGenerator=B,e.popperOffsets=G,e.preventOverflow=ne,Object.defineProperty(e,"__esModule",{value:!0})}));
6
+ //# sourceMappingURL=popper.min.js.map
@@ -0,0 +1,2 @@
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t=t||self).tippy=e(t.Popper)}(this,(function(t){"use strict";var e="undefined"!=typeof window&&"undefined"!=typeof document,n=e?navigator.userAgent:"",r=/MSIE |Trident\//.test(n),i={passive:!0,capture:!0};function o(t,e,n){if(Array.isArray(t)){var r=t[e];return null==r?Array.isArray(n)?n[e]:n:r}return t}function a(t,e){var n={}.toString.call(t);return 0===n.indexOf("[object")&&n.indexOf(e+"]")>-1}function s(t,e){return"function"==typeof t?t.apply(void 0,e):t}function p(t,e){return 0===e?t:function(r){clearTimeout(n),n=setTimeout((function(){t(r)}),e)};var n}function u(t,e){var n=Object.assign({},t);return e.forEach((function(t){delete n[t]})),n}function c(t){return[].concat(t)}function f(t,e){-1===t.indexOf(e)&&t.push(e)}function l(t){return t.split("-")[0]}function d(t){return[].slice.call(t)}function v(){return document.createElement("div")}function m(t){return["Element","Fragment"].some((function(e){return a(t,e)}))}function g(t){return a(t,"MouseEvent")}function h(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function b(t){return m(t)?[t]:function(t){return a(t,"NodeList")}(t)?d(t):Array.isArray(t)?t:d(document.querySelectorAll(t))}function y(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function w(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function x(t){var e,n=c(t)[0];return(null==n||null==(e=n.ownerDocument)?void 0:e.body)?n.ownerDocument:document}function E(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[r](e,n)}))}var O={isTouch:!1},C=0;function T(){O.isTouch||(O.isTouch=!0,window.performance&&document.addEventListener("mousemove",A))}function A(){var t=performance.now();t-C<20&&(O.isTouch=!1,document.removeEventListener("mousemove",A)),C=t}function L(){var t=document.activeElement;if(h(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var D=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),k=Object.keys(D);function R(t){var e=(t.plugins||[]).reduce((function(e,n){var r=n.name,i=n.defaultValue;return r&&(e[r]=void 0!==t[r]?t[r]:i),e}),{});return Object.assign({},t,{},e)}function j(t,e){var n=Object.assign({},e,{content:s(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(R(Object.assign({},D,{plugins:e}))):k).reduce((function(e,n){var r=(t.getAttribute("data-tippy-"+n)||"").trim();if(!r)return e;if("content"===n)e[n]=r;else try{e[n]=JSON.parse(r)}catch(t){e[n]=r}return e}),{})}(t,e.plugins));return n.aria=Object.assign({},D.aria,{},n.aria),n.aria={expanded:"auto"===n.aria.expanded?e.interactive:n.aria.expanded,content:"auto"===n.aria.content?e.interactive?null:"describedby":n.aria.content},n}function M(t,e){t.innerHTML=e}function P(t){var e=v();return!0===t?e.className="tippy-arrow":(e.className="tippy-svg-arrow",m(t)?e.appendChild(t):M(e,t)),e}function V(t,e){m(e.content)?(M(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?M(t,e.content):t.textContent=e.content)}function I(t){var e=t.firstElementChild,n=d(e.children);return{box:e,content:n.find((function(t){return t.classList.contains("tippy-content")})),arrow:n.find((function(t){return t.classList.contains("tippy-arrow")||t.classList.contains("tippy-svg-arrow")})),backdrop:n.find((function(t){return t.classList.contains("tippy-backdrop")}))}}function S(t){var e=v(),n=v();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=v();function i(n,r){var i=I(e),o=i.box,a=i.content,s=i.arrow;r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),"string"==typeof r.animation?o.setAttribute("data-animation",r.animation):o.removeAttribute("data-animation"),r.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?o.setAttribute("role",r.role):o.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||V(a,t.props),r.arrow?s?n.arrow!==r.arrow&&(o.removeChild(s),o.appendChild(P(r.arrow))):o.appendChild(P(r.arrow)):s&&o.removeChild(s)}return r.className="tippy-content",r.setAttribute("data-state","hidden"),V(r,t.props),e.appendChild(n),n.appendChild(r),i(t.props,t.props),{popper:e,onUpdate:i}}S.$$tippy=!0;var B=1,H=[],N=[];function U(e,n){var a,u,m,h,b,C,T,A,L,k=j(e,Object.assign({},D,{},R((a=n,Object.keys(a).reduce((function(t,e){return void 0!==a[e]&&(t[e]=a[e]),t}),{}))))),M=!1,P=!1,V=!1,S=!1,U=[],_=p(bt,k.interactiveDebounce),z=B++,F=(L=k.plugins).filter((function(t,e){return L.indexOf(t)===e})),W={id:z,reference:e,popper:v(),popperInstance:null,props:k,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:F,clearDelayTimeouts:function(){clearTimeout(u),clearTimeout(m),cancelAnimationFrame(h)},setProps:function(t){if(W.state.isDestroyed)return;it("onBeforeUpdate",[W,t]),gt();var n=W.props,r=j(e,Object.assign({},W.props,{},t,{ignoreAttributes:!0}));W.props=r,mt(),n.interactiveDebounce!==r.interactiveDebounce&&(st(),_=p(bt,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?c(n.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");at(),rt(),q&&q(n,r);W.popperInstance&&(Et(),Ct().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));it("onAfterUpdate",[W,t])},setContent:function(t){W.setProps({content:t})},show:function(){var t=W.state.isVisible,e=W.state.isDestroyed,n=!W.state.isEnabled,r=O.isTouch&&!W.props.touch,i=o(W.props.duration,0,D.duration);if(t||e||n||r)return;if(Z().hasAttribute("disabled"))return;if(it("onShow",[W],!1),!1===W.props.onShow(W))return;W.state.isVisible=!0,Q()&&(Y.style.visibility="visible");rt(),ft(),W.state.isMounted||(Y.style.transition="none");if(Q()){var a=et(),p=a.box,u=a.content;y([p,u],0)}T=function(){var t;if(W.state.isVisible&&!S){if(S=!0,Y.offsetHeight,Y.style.transition=W.props.moveTransition,Q()&&W.props.animation){var e=et(),n=e.box,r=e.content;y([n,r],i),w([n,r],"visible")}ot(),at(),f(N,W),null==(t=W.popperInstance)||t.forceUpdate(),W.state.isMounted=!0,it("onMount",[W]),W.props.animation&&Q()&&function(t,e){dt(t,e)}(i,(function(){W.state.isShown=!0,it("onShown",[W])}))}},function(){var t,e=W.props.appendTo,n=Z();t=W.props.interactive&&e===D.appendTo||"parent"===e?n.parentNode:s(e,[n]);t.contains(Y)||t.appendChild(Y);Et()}()},hide:function(){var t=!W.state.isVisible,e=W.state.isDestroyed,n=!W.state.isEnabled,r=o(W.props.duration,1,D.duration);if(t||e||n)return;if(it("onHide",[W],!1),!1===W.props.onHide(W))return;W.state.isVisible=!1,W.state.isShown=!1,S=!1,M=!1,Q()&&(Y.style.visibility="hidden");if(st(),lt(),rt(),Q()){var i=et(),a=i.box,s=i.content;W.props.animation&&(y([a,s],r),w([a,s],"hidden"))}ot(),at(),W.props.animation?Q()&&function(t,e){dt(t,(function(){!W.state.isVisible&&Y.parentNode&&Y.parentNode.contains(Y)&&e()}))}(r,W.unmount):W.unmount()},hideWithInteractivity:function(t){tt().addEventListener("mousemove",_),f(H,_),_(t)},enable:function(){W.state.isEnabled=!0},disable:function(){W.hide(),W.state.isEnabled=!1},unmount:function(){W.state.isVisible&&W.hide();if(!W.state.isMounted)return;Ot(),Ct().forEach((function(t){t._tippy.unmount()})),Y.parentNode&&Y.parentNode.removeChild(Y);N=N.filter((function(t){return t!==W})),W.state.isMounted=!1,it("onHidden",[W])},destroy:function(){if(W.state.isDestroyed)return;W.clearDelayTimeouts(),W.unmount(),gt(),delete e._tippy,W.state.isDestroyed=!0,it("onDestroy",[W])}};if(!k.render)return W;var X=k.render(W),Y=X.popper,q=X.onUpdate;Y.setAttribute("data-tippy-root",""),Y.id="tippy-"+W.id,W.popper=Y,e._tippy=W,Y._tippy=W;var $=F.map((function(t){return t.fn(W)})),J=e.hasAttribute("aria-expanded");return mt(),at(),rt(),it("onCreate",[W]),k.showOnCreate&&Tt(),Y.addEventListener("mouseenter",(function(){W.props.interactive&&W.state.isVisible&&W.clearDelayTimeouts()})),Y.addEventListener("mouseleave",(function(t){W.props.interactive&&W.props.trigger.indexOf("mouseenter")>=0&&(tt().addEventListener("mousemove",_),_(t))})),W;function G(){var t=W.props.touch;return Array.isArray(t)?t:[t,0]}function K(){return"hold"===G()[0]}function Q(){var t;return!!(null==(t=W.props.render)?void 0:t.$$tippy)}function Z(){return A||e}function tt(){var t=Z().parentNode;return t?x(t):document}function et(){return I(Y)}function nt(t){return W.state.isMounted&&!W.state.isVisible||O.isTouch||b&&"focus"===b.type?0:o(W.props.delay,t?0:1,D.delay)}function rt(){Y.style.pointerEvents=W.props.interactive&&W.state.isVisible?"":"none",Y.style.zIndex=""+W.props.zIndex}function it(t,e,n){var r;(void 0===n&&(n=!0),$.forEach((function(n){n[t]&&n[t].apply(void 0,e)})),n)&&(r=W.props)[t].apply(r,e)}function ot(){var t=W.props.aria;if(t.content){var n="aria-"+t.content,r=Y.id;c(W.props.triggerTarget||e).forEach((function(t){var e=t.getAttribute(n);if(W.state.isVisible)t.setAttribute(n,e?e+" "+r:r);else{var i=e&&e.replace(r,"").trim();i?t.setAttribute(n,i):t.removeAttribute(n)}}))}}function at(){!J&&W.props.aria.expanded&&c(W.props.triggerTarget||e).forEach((function(t){W.props.interactive?t.setAttribute("aria-expanded",W.state.isVisible&&t===Z()?"true":"false"):t.removeAttribute("aria-expanded")}))}function st(){tt().removeEventListener("mousemove",_),H=H.filter((function(t){return t!==_}))}function pt(t){if(!(O.isTouch&&(V||"mousedown"===t.type)||W.props.interactive&&Y.contains(t.target))){if(Z().contains(t.target)){if(O.isTouch)return;if(W.state.isVisible&&W.props.trigger.indexOf("click")>=0)return}else it("onClickOutside",[W,t]);!0===W.props.hideOnClick&&(W.clearDelayTimeouts(),W.hide(),P=!0,setTimeout((function(){P=!1})),W.state.isMounted||lt())}}function ut(){V=!0}function ct(){V=!1}function ft(){var t=tt();t.addEventListener("mousedown",pt,!0),t.addEventListener("touchend",pt,i),t.addEventListener("touchstart",ct,i),t.addEventListener("touchmove",ut,i)}function lt(){var t=tt();t.removeEventListener("mousedown",pt,!0),t.removeEventListener("touchend",pt,i),t.removeEventListener("touchstart",ct,i),t.removeEventListener("touchmove",ut,i)}function dt(t,e){var n=et().box;function r(t){t.target===n&&(E(n,"remove",r),e())}if(0===t)return e();E(n,"remove",C),E(n,"add",r),C=r}function vt(t,n,r){void 0===r&&(r=!1),c(W.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),U.push({node:e,eventType:t,handler:n,options:r})}))}function mt(){var t;K()&&(vt("touchstart",ht,{passive:!0}),vt("touchend",yt,{passive:!0})),(t=W.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(vt(t,ht),t){case"mouseenter":vt("mouseleave",yt);break;case"focus":vt(r?"focusout":"blur",wt);break;case"focusin":vt("focusout",wt)}}))}function gt(){U.forEach((function(t){var e=t.node,n=t.eventType,r=t.handler,i=t.options;e.removeEventListener(n,r,i)})),U=[]}function ht(t){var e,n=!1;if(W.state.isEnabled&&!xt(t)&&!P){var r="focus"===(null==(e=b)?void 0:e.type);b=t,A=t.currentTarget,at(),!W.state.isVisible&&g(t)&&H.forEach((function(e){return e(t)})),"click"===t.type&&(W.props.trigger.indexOf("mouseenter")<0||M)&&!1!==W.props.hideOnClick&&W.state.isVisible?n=!0:Tt(t),"click"===t.type&&(M=!n),n&&!r&&At(t)}}function bt(t){var e=t.target,n=Z().contains(e)||Y.contains(e);"mousemove"===t.type&&n||function(t,e){var n=e.clientX,r=e.clientY;return t.every((function(t){var e=t.popperRect,i=t.popperState,o=t.props.interactiveBorder,a=l(i.placement),s=i.modifiersData.offset;if(!s)return!0;var p="bottom"===a?s.top.y:0,u="top"===a?s.bottom.y:0,c="right"===a?s.left.x:0,f="left"===a?s.right.x:0,d=e.top-r+p>o,v=r-e.bottom-u>o,m=e.left-n+c>o,g=n-e.right-f>o;return d||v||m||g}))}(Ct().concat(Y).map((function(t){var e,n=null==(e=t._tippy.popperInstance)?void 0:e.state;return n?{popperRect:t.getBoundingClientRect(),popperState:n,props:k}:null})).filter(Boolean),t)&&(st(),At(t))}function yt(t){xt(t)||W.props.trigger.indexOf("click")>=0&&M||(W.props.interactive?W.hideWithInteractivity(t):At(t))}function wt(t){W.props.trigger.indexOf("focusin")<0&&t.target!==Z()||W.props.interactive&&t.relatedTarget&&Y.contains(t.relatedTarget)||At(t)}function xt(t){return!!O.isTouch&&K()!==t.type.indexOf("touch")>=0}function Et(){Ot();var n=W.props,r=n.popperOptions,i=n.placement,o=n.offset,a=n.getReferenceClientRect,s=n.moveTransition,p=Q()?I(Y).arrow:null,u=a?{getBoundingClientRect:a,contextElement:a.contextElement||Z()}:e,c=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(Q()){var n=et().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?n.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?n.setAttribute("data-"+t,""):n.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];Q()&&p&&c.push({name:"arrow",options:{element:p,padding:3}}),c.push.apply(c,(null==r?void 0:r.modifiers)||[]),W.popperInstance=t.createPopper(u,Y,Object.assign({},r,{placement:i,onFirstUpdate:T,modifiers:c}))}function Ot(){W.popperInstance&&(W.popperInstance.destroy(),W.popperInstance=null)}function Ct(){return d(Y.querySelectorAll("[data-tippy-root]"))}function Tt(t){W.clearDelayTimeouts(),t&&it("onTrigger",[W,t]),ft();var e=nt(!0),n=G(),r=n[0],i=n[1];O.isTouch&&"hold"===r&&i&&(e=i),e?u=setTimeout((function(){W.show()}),e):W.show()}function At(t){if(W.clearDelayTimeouts(),it("onUntrigger",[W,t]),W.state.isVisible){if(!(W.props.trigger.indexOf("mouseenter")>=0&&W.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&M)){var e=nt(!1);e?m=setTimeout((function(){W.state.isVisible&&W.hide()}),e):h=requestAnimationFrame((function(){W.hide()}))}}else lt()}}function _(t,e){void 0===e&&(e={});var n=D.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",T,i),window.addEventListener("blur",L);var r=Object.assign({},e,{plugins:n}),o=b(t).reduce((function(t,e){var n=e&&U(e,r);return n&&t.push(n),t}),[]);return m(t)?o[0]:o}_.defaultProps=D,_.setDefaultProps=function(t){Object.keys(t).forEach((function(e){D[e]=t[e]}))},_.currentInput=O;var z=Object.assign({},t.applyStyles,{effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow)}}),F={mouseover:"mouseenter",focusin:"focus",click:"click"};var W={name:"animateFill",defaultValue:!1,fn:function(t){var e;if(!(null==(e=t.props.render)?void 0:e.$$tippy))return{};var n=I(t.popper),r=n.box,i=n.content,o=t.props.animateFill?function(){var t=v();return t.className="tippy-backdrop",w([t],"hidden"),t}():null;return{onCreate:function(){o&&(r.insertBefore(o,r.firstElementChild),r.setAttribute("data-animatefill",""),r.style.overflow="hidden",t.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(o){var t=r.style.transitionDuration,e=Number(t.replace("ms",""));i.style.transitionDelay=Math.round(e/10)+"ms",o.style.transitionDuration=t,w([o],"visible")}},onShow:function(){o&&(o.style.transitionDuration="0ms")},onHide:function(){o&&w([o],"hidden")}}}};var X={clientX:0,clientY:0},Y=[];function q(t){var e=t.clientX,n=t.clientY;X={clientX:e,clientY:n}}var $={name:"followCursor",defaultValue:!1,fn:function(t){var e=t.reference,n=x(t.props.triggerTarget||e),r=!1,i=!1,o=!0,a=t.props;function s(){return"initial"===t.props.followCursor&&t.state.isVisible}function p(){n.addEventListener("mousemove",f)}function u(){n.removeEventListener("mousemove",f)}function c(){r=!0,t.setProps({getReferenceClientRect:null}),r=!1}function f(n){var r=!n.target||e.contains(n.target),i=t.props.followCursor,o=n.clientX,a=n.clientY,s=e.getBoundingClientRect(),p=o-s.left,u=a-s.top;!r&&t.props.interactive||t.setProps({getReferenceClientRect:function(){var t=e.getBoundingClientRect(),n=o,r=a;"initial"===i&&(n=t.left+p,r=t.top+u);var s="horizontal"===i?t.top:r,c="vertical"===i?t.right:n,f="horizontal"===i?t.bottom:r,l="vertical"===i?t.left:n;return{width:c-l,height:f-s,top:s,right:c,bottom:f,left:l}}})}function l(){t.props.followCursor&&(Y.push({instance:t,doc:n}),function(t){t.addEventListener("mousemove",q)}(n))}function d(){0===(Y=Y.filter((function(e){return e.instance!==t}))).filter((function(t){return t.doc===n})).length&&function(t){t.removeEventListener("mousemove",q)}(n)}return{onCreate:l,onDestroy:d,onBeforeUpdate:function(){a=t.props},onAfterUpdate:function(e,n){var o=n.followCursor;r||void 0!==o&&a.followCursor!==o&&(d(),o?(l(),!t.state.isMounted||i||s()||p()):(u(),c()))},onMount:function(){t.props.followCursor&&!i&&(o&&(f(X),o=!1),s()||p())},onTrigger:function(t,e){g(e)&&(X={clientX:e.clientX,clientY:e.clientY}),i="focus"===e.type},onHidden:function(){t.props.followCursor&&(c(),u(),o=!0)}}}};var J={name:"inlinePositioning",defaultValue:!1,fn:function(t){var e,n=t.reference;var r=-1,i=!1,o={name:"tippyInlinePositioning",enabled:!0,phase:"afterWrite",fn:function(i){var o=i.state;t.props.inlinePositioning&&(e!==o.placement&&t.setProps({getReferenceClientRect:function(){return function(t){return function(t,e,n,r){if(n.length<2||null===t)return e;if(2===n.length&&r>=0&&n[0].left>n[1].right)return n[r]||e;switch(t){case"top":case"bottom":var i=n[0],o=n[n.length-1],a="top"===t,s=i.top,p=o.bottom,u=a?i.left:o.left,c=a?i.right:o.right;return{top:s,bottom:p,left:u,right:c,width:c-u,height:p-s};case"left":case"right":var f=Math.min.apply(Math,n.map((function(t){return t.left}))),l=Math.max.apply(Math,n.map((function(t){return t.right}))),d=n.filter((function(e){return"left"===t?e.left===f:e.right===l})),v=d[0].top,m=d[d.length-1].bottom;return{top:v,bottom:m,left:f,right:l,width:l-f,height:m-v};default:return e}}(l(t),n.getBoundingClientRect(),d(n.getClientRects()),r)}(o.placement)}}),e=o.placement)}};function a(){var e;i||(e=function(t,e){var n;return{popperOptions:Object.assign({},t.popperOptions,{modifiers:[].concat(((null==(n=t.popperOptions)?void 0:n.modifiers)||[]).filter((function(t){return t.name!==e.name})),[e])})}}(t.props,o),i=!0,t.setProps(e),i=!1)}return{onCreate:a,onAfterUpdate:a,onTrigger:function(e,n){if(g(n)){var i=d(t.reference.getClientRects()),o=i.find((function(t){return t.left-2<=n.clientX&&t.right+2>=n.clientX&&t.top-2<=n.clientY&&t.bottom+2>=n.clientY}));r=i.indexOf(o)}},onUntrigger:function(){r=-1}}}};var G={name:"sticky",defaultValue:!1,fn:function(t){var e=t.reference,n=t.popper;function r(e){return!0===t.props.sticky||t.props.sticky===e}var i=null,o=null;function a(){var s=r("reference")?(t.popperInstance?t.popperInstance.state.elements.reference:e).getBoundingClientRect():null,p=r("popper")?n.getBoundingClientRect():null;(s&&K(i,s)||p&&K(o,p))&&t.popperInstance&&t.popperInstance.update(),i=s,o=p,t.state.isMounted&&requestAnimationFrame(a)}return{onMount:function(){t.props.sticky&&a()}}}};function K(t,e){return!t||!e||(t.top!==e.top||t.right!==e.right||t.bottom!==e.bottom||t.left!==e.left)}return e&&function(t){var e=document.createElement("style");e.textContent=t,e.setAttribute("data-tippy-stylesheet","");var n=document.head,r=document.querySelector("head>style,head>link");r?n.insertBefore(e,r):n.appendChild(e)}('.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}'),_.setDefaultProps({plugins:[W,$,J,G],render:S}),_.createSingleton=function(t,e){var n;void 0===e&&(e={});var r,i=t,o=[],a=e.overrides,s=[],p=!1;function c(){o=i.map((function(t){return t.reference}))}function f(t){i.forEach((function(e){t?e.enable():e.disable()}))}function l(t){return i.map((function(e){var n=e.setProps;return e.setProps=function(i){n(i),e.reference===r&&t.setProps(i)},function(){e.setProps=n}}))}function d(t,e){var n=o.indexOf(e);if(e!==r){r=e;var s=(a||[]).concat("content").reduce((function(t,e){return t[e]=i[n].props[e],t}),{});t.setProps(Object.assign({},s,{getReferenceClientRect:"function"==typeof s.getReferenceClientRect?s.getReferenceClientRect:function(){return e.getBoundingClientRect()}}))}}f(!1),c();var m={fn:function(){return{onDestroy:function(){f(!0)},onHidden:function(){r=null},onClickOutside:function(t){t.props.showOnCreate&&!p&&(p=!0,r=null)},onShow:function(t){t.props.showOnCreate&&!p&&(p=!0,d(t,o[0]))},onTrigger:function(t,e){d(t,e.currentTarget)}}}},g=_(v(),Object.assign({},u(e,["overrides"]),{plugins:[m].concat(e.plugins||[]),triggerTarget:o,popperOptions:Object.assign({},e.popperOptions,{modifiers:[].concat((null==(n=e.popperOptions)?void 0:n.modifiers)||[],[z])})})),h=g.show;g.show=function(t){if(h(),!r&&null==t)return d(g,o[0]);if(!r||null!=t){if("number"==typeof t)return o[t]&&d(g,o[t]);if(i.includes(t)){var e=t.reference;return d(g,e)}return o.includes(t)?d(g,t):void 0}},g.showNext=function(){var t=o[0];if(!r)return g.show(0);var e=o.indexOf(r);g.show(o[e+1]||t)},g.showPrevious=function(){var t=o[o.length-1];if(!r)return g.show(t);var e=o.indexOf(r),n=o[e-1]||t;g.show(n)};var b=g.setProps;return g.setProps=function(t){a=t.overrides||a,b(t)},g.setInstances=function(t){f(!0),s.forEach((function(t){return t()})),i=t,f(!1),c(),l(g),g.setProps({triggerTarget:o})},s=l(g),g},_.delegate=function(t,e){var n=[],r=[],o=!1,a=e.target,s=u(e,["target"]),p=Object.assign({},s,{trigger:"manual",touch:!1}),f=Object.assign({},s,{showOnCreate:!0}),l=_(t,p);function d(t){if(t.target&&!o){var n=t.target.closest(a);if(n){var i=n.getAttribute("data-tippy-trigger")||e.trigger||D.trigger;if(!n._tippy&&!("touchstart"===t.type&&"boolean"==typeof f.touch||"touchstart"!==t.type&&i.indexOf(F[t.type])<0)){var s=_(n,f);s&&(r=r.concat(s))}}}}function v(t,e,r,i){void 0===i&&(i=!1),t.addEventListener(e,r,i),n.push({node:t,eventType:e,handler:r,options:i})}return c(l).forEach((function(t){var e=t.destroy,a=t.enable,s=t.disable;t.destroy=function(t){void 0===t&&(t=!0),t&&r.forEach((function(t){t.destroy()})),r=[],n.forEach((function(t){var e=t.node,n=t.eventType,r=t.handler,i=t.options;e.removeEventListener(n,r,i)})),n=[],e()},t.enable=function(){a(),r.forEach((function(t){return t.enable()})),o=!1},t.disable=function(){s(),r.forEach((function(t){return t.disable()})),o=!0},function(t){var e=t.reference;v(e,"touchstart",d,i),v(e,"mouseover",d),v(e,"focusin",d),v(e,"click",d)}(t)})),l},_.hideAll=function(t){var e=void 0===t?{}:t,n=e.exclude,r=e.duration;N.forEach((function(t){var e=!1;if(n&&(e=h(n)?t.reference===n:t.popper===n.popper),!e){var i=t.props.duration;t.setProps({duration:r}),t.hide(),t.state.isDestroyed||t.setProps({duration:i})}}))},_.roundArrow='<svg width="16" height="6" xmlns="http://www.w3.org/2000/svg"><path d="M0 6s1.796-.013 4.67-3.615C5.851.9 6.93.006 8 0c1.07-.006 2.148.887 3.343 2.385C14.233 6.005 16 6 16 6H0z"></svg>',_}));
2
+ //# sourceMappingURL=tippy-bundle.umd.min.js.map
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_mini_profiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - hschne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-02 00:00:00.000000000 Z
11
+ date: 2021-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inline_svg
@@ -48,6 +48,10 @@ files:
48
48
  - README.md
49
49
  - Rakefile
50
50
  - app/assets/config/rails_mini_profiler_manifest.js
51
+ - app/assets/fonts/rails_mini_profiler/LICENSE.txt
52
+ - app/assets/fonts/rails_mini_profiler/OpenSans-Bold.ttf
53
+ - app/assets/fonts/rails_mini_profiler/OpenSans-Regular.ttf
54
+ - app/assets/fonts/rails_mini_profiler/OpenSans-SemiBold.ttf
51
55
  - app/assets/images/rails_mini_profiler/bookmark.svg
52
56
  - app/assets/images/rails_mini_profiler/chart.svg
53
57
  - app/assets/images/rails_mini_profiler/delete.svg
@@ -106,7 +110,6 @@ files:
106
110
  - lib/rails_mini_profiler/badge.rb
107
111
  - lib/rails_mini_profiler/configuration.rb
108
112
  - lib/rails_mini_profiler/engine.rb
109
- - lib/rails_mini_profiler/errors.rb
110
113
  - lib/rails_mini_profiler/flamegraph_guard.rb
111
114
  - lib/rails_mini_profiler/guard.rb
112
115
  - lib/rails_mini_profiler/logger.rb
@@ -138,6 +141,8 @@ files:
138
141
  - public/rails_mini_profiler/speedscope/source-map.438fa06b.js.map
139
142
  - public/rails_mini_profiler/speedscope/speedscope.026f36b0.js
140
143
  - public/rails_mini_profiler/speedscope/speedscope.026f36b0.js.map
144
+ - vendor/assets/javascripts/popper.js
145
+ - vendor/assets/javascripts/tippy.js
141
146
  homepage: https://github.com/hschne/rails-mini-profiler
142
147
  licenses:
143
148
  - MIT
@@ -1,8 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RailsMiniProfiler
4
- RailsMiniProfilerError = Class.new(StandardError)
5
-
6
- # Storage errors
7
- StorageError = Class.new(RailsMiniProfilerError)
8
- end