rails_mini_profiler 0.6.0 → 0.7.0

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 (40) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +47 -35
  3. data/app/adapters/rails_mini_profiler/database_adapter.rb +16 -0
  4. data/app/controllers/rails_mini_profiler/application_controller.rb +9 -6
  5. data/app/controllers/rails_mini_profiler/profiled_requests_controller.rb +15 -4
  6. data/app/helpers/rails_mini_profiler/profiled_requests_helper.rb +10 -0
  7. data/app/javascript/js/clipboard_controller.js +9 -2
  8. data/app/javascript/js/filter_controller.js +4 -0
  9. data/app/javascript/stylesheets/components/buttons.scss +59 -0
  10. data/app/javascript/stylesheets/components/{profiled_request_table/profiled_request_table.scss → dropdown.scss} +0 -76
  11. data/app/javascript/stylesheets/components/input.scss +10 -0
  12. data/app/javascript/stylesheets/{navbar.scss → components/navbar.scss} +0 -0
  13. data/app/javascript/stylesheets/components/page_header.scss +7 -0
  14. data/app/javascript/stylesheets/components/{profiled_request_table/placeholder.scss → placeholder.scss} +4 -1
  15. data/app/javascript/stylesheets/components/profiled_request_table.scss +55 -0
  16. data/app/javascript/stylesheets/components/trace.scss +93 -0
  17. data/app/javascript/stylesheets/profiled_requests.scss +3 -67
  18. data/app/javascript/stylesheets/rails-mini-profiler.scss +16 -30
  19. data/app/javascript/stylesheets/traces.scss +44 -76
  20. data/app/presenters/rails_mini_profiler/profiled_request_presenter.rb +2 -2
  21. data/app/presenters/rails_mini_profiler/trace_presenter.rb +9 -7
  22. data/app/search/rails_mini_profiler/profiled_request_search.rb +0 -1
  23. data/app/search/rails_mini_profiler/trace_search.rb +27 -0
  24. data/app/views/rails_mini_profiler/profiled_requests/shared/header/_header.erb +1 -2
  25. data/app/views/rails_mini_profiler/profiled_requests/shared/table/_table_head.erb +7 -7
  26. data/app/views/rails_mini_profiler/profiled_requests/{shared → show}/_trace.html.erb +23 -21
  27. data/app/views/rails_mini_profiler/profiled_requests/show/_trace_list.erb +12 -0
  28. data/app/views/rails_mini_profiler/profiled_requests/show/_trace_list_header.erb +87 -0
  29. data/app/views/rails_mini_profiler/profiled_requests/show/_trace_list_placeholder.erb +12 -0
  30. data/app/views/rails_mini_profiler/profiled_requests/show.html.erb +4 -17
  31. data/lib/generators/rails_mini_profiler/templates/rails_mini_profiler.rb.erb +1 -0
  32. data/lib/rails_mini_profiler/configuration/user_interface.rb +18 -0
  33. data/lib/rails_mini_profiler/flamegraph_guard.rb +10 -6
  34. data/lib/rails_mini_profiler/middleware.rb +2 -0
  35. data/lib/rails_mini_profiler/user.rb +1 -1
  36. data/lib/rails_mini_profiler/version.rb +1 -1
  37. data/vendor/assets/javascripts/rails-mini-profiler.css +1 -1
  38. data/vendor/assets/javascripts/rails-mini-profiler.js +1 -1
  39. metadata +25 -9
  40. data/app/javascript/stylesheets/components/page_header/page_header.scss +0 -3
@@ -22,6 +22,7 @@ RailsMiniProfiler.configure do |config|
22
22
  # Configure the Rails Mini Profiler User Interface
23
23
  # config.ui.badge_enabled = true
24
24
  # config.ui.badge_position = 'top-left'
25
+ # config.ui.base_controller = 'ApplicationController'
25
26
  # config.ui.page_size = 25
26
27
  # config.ui.webpacker_enabled = true
27
28
 
@@ -9,6 +9,8 @@ module RailsMiniProfiler
9
9
  # @!attribute badge_position
10
10
  # @see Badge
11
11
  # @return [String] the position of the interactive HTML badge
12
+ # @!attribute base_controller
13
+ # @return [class] the controller the UI controllers should inherit from
12
14
  # @!attribute page_size
13
15
  # @return [Integer] how many items to render per page in list views
14
16
  # @!attribute webpacker_enabled
@@ -33,6 +35,7 @@ module RailsMiniProfiler
33
35
 
34
36
  attr_accessor :badge_enabled,
35
37
  :badge_position,
38
+ :base_controller,
36
39
  :page_size,
37
40
  :webpacker_enabled
38
41
 
@@ -45,8 +48,23 @@ module RailsMiniProfiler
45
48
  def defaults!
46
49
  @badge_enabled = true
47
50
  @badge_position = 'top-left'
51
+ @base_controller = default_base_controller
48
52
  @page_size = 25
49
53
  @webpacker_enabled = true
50
54
  end
55
+
56
+ def default_base_controller
57
+ app_controller_exists = class_exists?('::ApplicationController')
58
+ return ::ApplicationController if app_controller_exists && ::ApplicationController < ActionController::Base
59
+
60
+ ActionController::Base
61
+ end
62
+
63
+ def class_exists?(class_name)
64
+ klass = Module.const_get(class_name)
65
+ klass.is_a?(Class)
66
+ rescue NameError
67
+ false
68
+ end
51
69
  end
52
70
  end
@@ -11,17 +11,12 @@ module RailsMiniProfiler
11
11
  def record(&block)
12
12
  return block.call unless enabled?
13
13
 
14
- sample_rate = @configuration.flamegraph_sample_rate
15
14
  if StackProf.running?
16
15
  RailsMiniProfiler.logger.error('Stackprof is already running, cannot record Flamegraph')
17
16
  return block.call
18
17
  end
19
18
 
20
- result = nil
21
- flamegraph = StackProf.run(mode: :wall, raw: true, aggregate: false, interval: (sample_rate * 1000).to_i) do
22
- result = block.call
23
- end
24
-
19
+ flamegraph, result = record_flamegraph(block)
25
20
  unless flamegraph
26
21
  RailsMiniProfiler.logger.error('Failed to record Flamegraph, possibly due to concurrent requests')
27
22
  return result
@@ -33,6 +28,15 @@ module RailsMiniProfiler
33
28
 
34
29
  private
35
30
 
31
+ def record_flamegraph(block)
32
+ sample_rate = @configuration.flamegraph_sample_rate
33
+ result = nil
34
+ flamegraph = StackProf.run(mode: :wall, raw: true, aggregate: false, interval: (sample_rate * 1000).to_i) do
35
+ result = block.call
36
+ end
37
+ [flamegraph, result]
38
+ end
39
+
36
40
  def enabled?
37
41
  defined?(StackProf) && StackProf.respond_to?(:run) && config_enabled?
38
42
  end
@@ -20,6 +20,8 @@ module RailsMiniProfiler
20
20
  request_context.response = ResponseWrapper.new(*result)
21
21
  complete!(request_context)
22
22
  request_context.saved? ? render_response(request_context) : result
23
+ ensure
24
+ User.current_user = nil
23
25
  end
24
26
 
25
27
  def traces
@@ -30,7 +30,7 @@ module RailsMiniProfiler
30
30
  end
31
31
 
32
32
  def find_current_user
33
- return unless Rails.env.development? || Rails.env.test?
33
+ return if Rails.env.production?
34
34
 
35
35
  user = RailsMiniProfiler.configuration.user_provider.call(@env)
36
36
  User.current_user = user
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsMiniProfiler
4
- VERSION = '0.6.0'
4
+ VERSION = '0.7.0'
5
5
  end
@@ -1 +1 @@
1
- @import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap");.flash{border-radius:5px;margin-top:1rem;padding:1rem}.flash-error{background:var(--red-500);color:#fff}.flash-notice{background:var(--green-400);color:#fff}#wrapper{height:100vh;width:100%}#speedscope-iframe{border:none;height:100%;width:100%}.header{background:var(--primary);box-shadow:0 0 20px 0 rgba(0,0,0,.2);display:flex;justify-content:center;margin:0;padding:1.5rem 0}.header a{color:#fff;text-decoration:none}.nav{justify-content:space-between;width:var(--main-width)}.home,.nav{display:flex}.home{align-items:center;text-decoration:none}.home-logo{height:64px;width:64px}.home-title{margin:0;padding:0 0 0 1rem}.header-links{font-weight:700;list-style:none;margin:0;padding:0}.header-links,.placeholder{align-items:center;display:flex}.placeholder{flex-direction:column;justify-content:center;padding-bottom:2rem;width:100%}.placeholder-image{-webkit-filter:grayscale(1) brightness(2.5);height:30%;width:30%}.placeholder-text{padding:1rem 0;text-align:center}.placeholder-link,.placeholder-link:visited,.placeholder-text{color:var(--grey-400)}.placeholder-link:hover{color:var(--grey-900)}.table{border:1px hidden var(--border-color);border-collapse:collapse;border-radius:5px;box-shadow:0 0 0 1px var(--border-color);table-layout:fixed;width:100%}.table td,.table th{padding:.5rem 1rem}.table thead tr{border:1px hidden var(--border-color);box-shadow:0 0 0 1px var(--border-color);color:var(--grey-400)}.table tr:nth-child(2n){background:var(--grey-50)}.table thead th{font-weight:400}.table-filter-icon{margin-left:.5rem;width:14px}.table tbody tr:not(.no-row){border:1px solid var(--border-color);color:var(--grey-700);cursor:pointer}.table tbody tr:not(.no-row):hover{background:var(--grey-100)}.request-checkbox{height:1rem;width:1rem;z-index:1}.dropdown-body{padding:.33rem .5rem}.dropdown-search-field{border:1px solid var(--grey-400);border-radius:5px;color:var(--grey-700);padding:.5rem}.dropdown-toggle{align-items:center;color:inherit;display:flex}.dropdown-toggle:hover{color:var(--grey-900)}.dropdown-container{background:#fff;border:1px solid var(--grey-200);border-radius:5px;box-shadow:0 8px 30px rgba(0,0,0,.12);box-sizing:border-box;color:var(--grey-400);cursor:default;margin-top:.3em;min-width:240px;overflow:hidden;position:absolute;z-index:1}.dropdown-container,.dropdown-search,.dropdown-search button{display:flex;flex-direction:column}.dropdown-entry{display:flex;padding:.33rem 1rem;text-decoration:none}.dropdown-entry:hover{background:var(--grey-100);color:var(--grey-900)}.dropdown-entry input{margin-right:.5em}.dropdown-header{align-items:center;background:var(--grey-100);border-bottom:1px solid var(--grey-200);display:flex;font-size:.833rem;justify-content:space-between;padding:.5rem 1rem;text-align:left}.dropdown-header button{background:none;border:none;color:var(--grey-500);font-size:.833rem;outline:none;padding:0;text-decoration:underline}.dropdown-header button:hover{box-shadow:none;color:var(--grey-900)}.dropdown-footer{background:var(--red-500);border:none;border-radius:0;color:#fff;font-weight:600;outline:none;padding:.5rem;width:100%}.dropdown-footer:hover{background:var(--red-600)}.dropdown-search-button{background:var(--red-500);border:none;border-radius:5px;color:#fff;cursor:pointer;display:inline-block;font-size:1rem;font-weight:600;padding:.5em;text-align:center;text-decoration:none}.dropdown-search-button:hover{background:var(--red-600)}.request-path{max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}main{display:flex;justify-content:center;width:100%}.main-section{width:var(--main-width)}.search-field{border:1px solid var(--grey-400);border-radius:5px;box-sizing:border-box;padding:.5rem}.request-details-data{display:flex;padding:1rem 0}.request-details-actions{align-items:center;display:flex;justify-content:space-between;margin:0;padding:0 0 1rem}.data-item{align-items:flex-start;display:flex;flex-direction:column;list-style:none;margin-right:3rem;padding:0}.data-item small{color:var(--grey-400)}.data-item span{margin:.25rem 0}[class*=request-method-get],[class*=request-status-2]{background:var(--green-400)!important;color:#fff}[class*=request-method-patch],[class*=request-method-put],[class*=request-status-4]{background:var(--yellow-400)!important;color:#fff}[class*=request-method-delete],[class*=request-status-5]{background:var(--red-500)!important;color:#fff}.flamegraph-button button{background:var(--grey-200)}.clear-action button{background:var(--red-500);color:#fff;font-weight:600}.clear-action button:hover{background:var(--red-600)}.profiled-requests-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between}.trace-list{margin:2rem 0;padding:0}.trace{align-items:center;display:flex;justify-content:flex-start;list-style:none;padding:.25em 0}.trace:nth-child(odd){background:var(--grey-100)}.trace .trace-bar{background:linear-gradient(to top right,var(--grey-500),var(--grey-400));cursor:pointer;height:16px;margin:0;padding:0;position:relative}.instantiation-trace .trace-bar{background:linear-gradient(to top right,var(--green-400),var(--green-300))}.sequel-trace .trace-bar{background:linear-gradient(to top right,var(--green-500),var(--green-400))}.controller-trace .trace-bar{background:linear-gradient(to top right,var(--yellow-500),var(--yellow-400))}.render-partial-trace .trace-bar,.render-template-trace .trace-bar{background:linear-gradient(to top right,var(--blue-500),var(--blue-400))}.trace-name{box-sizing:border-box;color:var(--grey-400);font-size:14px;margin:0;overflow:hidden;padding:0 .5em;text-align:right;text-overflow:ellipsis}.trace-payload{margin:0}.sequel-trace-query{background:var(--grey-100);padding:1em}.sequel-trace-binds,.sequel-trace-query{max-height:100px;overflow:auto;white-space:pre-wrap}.sequel-trace-binds{background:var(--grey-50);font-size:12px;margin:0 0 1em;padding:.5em 1em}.trace-table{border:1px hidden var(--border-color);border-collapse:collapse;margin-top:1em;width:100%}.backtrace{align-items:center;background:var(--grey-100);display:flex;flex-direction:row;justify-content:space-between;padding:.5em}.backtrace button{background:none;color:var(--grey-500);height:20px;margin:0;padding:0;transition:color .2s ease-in-out;width:20px}.backtrace button.copied{color:var(--green-400)}.backtrace button svg{height:20px;width:20px}.pagy-nav{align-items:center;display:flex;justify-content:center;padding:1em 0}.pagy-nav>.page.active,.pagy-nav>.page.disabled,.pagy-nav>.page>a{background:#fff;border:1px solid var(--border-color);border-right:none;color:var(--grey-900);cursor:pointer;padding:.5rem 1rem;text-decoration:none}.pagy-nav>.page.prev.disabled,.pagy-nav>.page.prev a{border-radius:5px 0 0 5px}.pagy-nav>.page.next.disabled,.pagy-nav>.page.next a{border-radius:0 5px 5px 0;border-right:1px solid var(--border-color)}.pagy-nav>.page.active{border-color:var(--red-500);color:#fff;cursor:default}.pagy-nav>.page.active,.pagy-nav>.page.active:hover{background:var(--red-500)}.pagy-nav>.page.disabled{color:var(--grey-500);cursor:default}.pagy-nav>.page.disabled:hover{background:#fff}.pagy-nav>.page.active:hover,.pagy-nav>.page.disabled:hover,.pagy-nav>.page>a:hover{background:var(--grey-100)}.page-header{padding:2rem 0}@font-face{font-family:Open Sans;font-style:normal;font-weight:400}@font-face{font-family:Open Sans;font-style:normal;font-weight:600}@font-face{font-family:Open Sans;font-style:normal;font-weight:700}html{--grey-50:#f9fafb;--grey-100:#f3f4f6;--grey-200:#e5e7eb;--grey-400:#9ca3af;--grey-500:#6b7280;--grey-700:#374151;--grey-900:#111827;--red-400:#f87171;--red-500:#ef4444;--red-600:#dc2626;--yellow-400:#fbbf24;--yellow-500:#fbbf24;--yellow-600:#d97706;--yellow-700:#b45309;--green-300:#6ee7b7;--green-400:#34d399;--green-500:#10b981;--blue-400:#60a5fa;--blue-500:#3b82f6;--main-width:1056px;--primary:var(--red-600);--border-color:var(--grey-200);--text-color:var(--grey-900);font-family:Open Sans,monospace;height:100%;width:100%}*,body,html{margin:0;padding:0}body{color:var(--text-color);height:100%;width:100%}.button,button{border:none;border-radius:.25rem;cursor:pointer;display:inline-block;font-size:1rem;padding:.5em;text-align:center;text-decoration:none}.button:disabled,button:disabled{background:var(--grey-200);cursor:not-allowed}button:hover{box-shadow:0 .25rem .25rem 0 var(--grey-50)}button.none{background:none;border:none;outline:none;padding:0}button.none:hover{box-shadow:none}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.hidden{display:none}.flex-row{display:flex;flex-direction:row}.flex-column{display:flex;flex-direction:column}.pill{background:var(--grey-200);border-radius:5px;font-size:.9rem;font-weight:600;letter-spacing:.1rem;margin:.2rem 0;padding:.1rem .4rem}.popover{color:#000;display:flex;flex-direction:column;padding:1em;width:600px}.popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding-bottom:1em}.popover-description{margin:0;padding:0}.popover-close{background:transparent;color:var(--grey-400);font-size:20px;font-weight:700;padding:0}.popover-body{padding:1em 0}.popover-footer{border-top:1px solid var(--grey-50)}.tippy-box[data-theme~=rmp]{background:#fff;border-radius:5px;box-shadow:8px 0 30px 4px rgba(0,0,0,.2),8px 4px 10px 0 rgba(0,0,0,.05);transition:all .2s cubic-bezier(.19,1,.22,1)}.tippy-box[data-theme~=rmp][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=rmp][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff}.tippy-box[data-theme~=rmp][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=rmp][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff}
1
+ @import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap");.flash{border-radius:5px;margin-top:1rem;padding:1rem}.flash-error{background:var(--red-500);color:#fff}.flash-notice{background:var(--green-400);color:#fff}#wrapper{height:100vh;width:100%}#speedscope-iframe{border:none;height:100%;width:100%}.table{border:1px hidden var(--border-color);border-collapse:collapse;border-radius:5px;box-shadow:0 0 0 1px var(--border-color);table-layout:fixed;width:100%}.table td,.table th{padding:.5rem 1rem}.table thead tr{color:var(--grey-500)}.table tr:nth-child(2n){background:var(--grey-50)}.table thead th{font-weight:400}.table-filter-icon{margin-left:.5rem;width:14px}.table tbody tr:not(.no-row){border:1px solid var(--border-color);color:var(--grey-700);cursor:pointer}.table tbody tr:not(.no-row):hover{background:var(--grey-100)}.request-checkbox{height:1rem;width:1rem;z-index:1}.request-path{max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.search-field{border:1px solid var(--grey-400);border-radius:5px;box-sizing:border-box;padding:.5rem}.profiled-requests-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between}.clear-action button{background:var(--red-500);color:#fff;font-weight:600}.clear-action button:hover{background:var(--red-600)}.profiled-request-details{align-items:center;display:flex;justify-content:space-between;padding-bottom:2rem}.data-item,.request-details-data{display:flex}.data-item{align-items:flex-start;flex-direction:column;list-style:none;margin-right:3rem;padding:0}.data-item small{color:var(--grey-400)}.data-item span{margin:.25rem 0}[class*=request-method-get],[class*=request-status-2]{background:var(--green-400)!important;color:#fff}[class*=request-method-patch],[class*=request-method-put],[class*=request-status-4]{background:var(--yellow-400)!important;color:#fff}[class*=request-method-delete],[class*=request-status-5]{background:var(--red-500)!important;color:#fff}.trace-list{border:1px solid var(--grey-200);border-radius:5px;padding:1rem}.trace-details-table{border:1px hidden var(--border-color);border-collapse:collapse;margin-top:1em;width:100%}.trace-details-table tr th{font-weight:var(--fw-semibold)}.trace-list-header{padding-bottom:1rem}.trace-list-filters,.trace-list-header{align-items:center;display:flex;justify-content:space-between}.trace-list-filters{color:var(--grey-500);width:60%}.button,button{border:none;border-radius:5px;cursor:pointer;display:inline-block;font-size:1rem;padding:.5em;text-align:center;text-decoration:none}.button:disabled,button:disabled{background:var(--grey-200);cursor:not-allowed}.btn-red{background:var(--red-500);color:#fff;font-weight:600;outline:none}.btn-red:hover{background:var(--red-600)}.btn-grey{background:var(--grey-200)}.btn-grey:hover{background:var(--grey-100)}.btn-white{background:#fff;border:1px solid var(--grey-200)}.btn-white:hover{background:var(--grey-100)}button:hover{box-shadow:0 .25rem .25rem 0 var(--grey-50)}button.none{background:none;border:none;outline:none;padding:0}button.none:hover{box-shadow:none}input[type=submit]{border:none;border-radius:5px;cursor:pointer;display:inline-block;font-size:1rem;padding:.5em;text-align:center;text-decoration:none}.header{background:var(--primary);box-shadow:0 0 20px 0 rgba(0,0,0,.2);display:flex;justify-content:center;margin:0;padding:1.5rem 0}.header a{color:#fff;text-decoration:none}.nav{justify-content:space-between;width:var(--main-width)}.home,.nav{display:flex}.home{align-items:center;text-decoration:none}.home-logo{height:64px;width:64px}.home-title{margin:0;padding:0 0 0 1rem}.header-links{font-weight:700;list-style:none;margin:0;padding:0}.header-links,.pagy-nav{align-items:center;display:flex}.pagy-nav{justify-content:center;padding:1em 0}.pagy-nav>.page.active,.pagy-nav>.page.disabled,.pagy-nav>.page>a{background:#fff;border:1px solid var(--border-color);border-right:none;color:var(--grey-900);cursor:pointer;padding:.5rem 1rem;text-decoration:none}.pagy-nav>.page.prev.disabled,.pagy-nav>.page.prev a{border-radius:5px 0 0 5px}.pagy-nav>.page.next.disabled,.pagy-nav>.page.next a{border-radius:0 5px 5px 0;border-right:1px solid var(--border-color)}.pagy-nav>.page.active{border-color:var(--red-500);color:#fff;cursor:default}.pagy-nav>.page.active,.pagy-nav>.page.active:hover{background:var(--red-500)}.pagy-nav>.page.disabled{color:var(--grey-500);cursor:default}.pagy-nav>.page.disabled:hover{background:#fff}.pagy-nav>.page.active:hover,.pagy-nav>.page.disabled:hover,.pagy-nav>.page>a:hover{background:var(--grey-100)}.page-header{padding:2.5rem 0}.page-header h1{font-size:28px}.dropdown-body{padding:.33rem .5rem}.dropdown-search-field{border:1px solid var(--grey-400);border-radius:5px;color:var(--grey-700);padding:.5rem}.dropdown-toggle{align-items:center;color:inherit;display:flex}.dropdown-toggle:hover{color:var(--grey-900)}.dropdown-container{background:#fff;border:1px solid var(--grey-200);border-radius:5px;box-shadow:0 8px 30px rgba(0,0,0,.12);box-sizing:border-box;color:var(--grey-400);cursor:default;margin-top:.3em;min-width:240px;overflow:hidden;position:absolute;z-index:1}.dropdown-container,.dropdown-search,.dropdown-search button{display:flex;flex-direction:column}.dropdown-entry{display:flex;padding:.33rem 1rem;text-decoration:none}.dropdown-entry:hover{background:var(--grey-100);color:var(--grey-900)}.dropdown-entry input{margin-right:.5em}.dropdown-header{align-items:center;background:var(--grey-100);border-bottom:1px solid var(--grey-200);display:flex;font-size:.833rem;justify-content:space-between;padding:.5rem 1rem;text-align:left}.dropdown-header button{background:none;border:none;color:var(--grey-500);font-size:.833rem;outline:none;padding:0;text-decoration:underline}.dropdown-header button:hover{box-shadow:none;color:var(--grey-900)}.dropdown-footer{background:var(--red-500);border:none;border-radius:0;color:#fff;font-weight:600;outline:none;padding:.5rem;width:100%}.dropdown-footer:hover{background:var(--red-600)}.placeholder{align-items:center;display:flex;flex-direction:column;justify-content:center;padding-bottom:2rem;width:100%}.placeholder-image{-webkit-filter:grayscale(1) brightness(2.5);height:30%;width:30%}.placeholder-text{color:var(--grey-400);padding:1rem 0;text-align:center}.placeholder-text h2{padding-bottom:1rem}.placeholder-link,.placeholder-link:visited{color:var(--grey-400)}.placeholder-link:hover{color:var(--grey-900)}.trace{align-items:center;display:flex;justify-content:flex-start;list-style:none;padding:.25em 0}.trace:nth-child(odd){background:var(--grey-100)}.trace .trace-bar{background:linear-gradient(to top right,var(--grey-500),var(--grey-400));cursor:pointer;height:16px;margin:0;padding:0;position:relative}.instantiation-trace .trace-bar{background:linear-gradient(to top right,var(--green-400),var(--green-300))}.sequel-trace .trace-bar{background:linear-gradient(to top right,var(--green-500),var(--green-400))}.controller-trace .trace-bar{background:linear-gradient(to top right,var(--yellow-500),var(--yellow-400))}.render-partial-trace .trace-bar,.render-template-trace .trace-bar{background:linear-gradient(to top right,var(--blue-500),var(--blue-400))}.trace-name{box-sizing:border-box;color:var(--grey-400);font-size:14px;margin:0;overflow:hidden;padding:0 .5em;text-align:right;text-overflow:ellipsis}.trace-payload{margin:0}.sequel-trace-query{background:var(--grey-100);padding:1em}.sequel-trace-binds,.sequel-trace-query{max-height:100px;overflow:auto;white-space:pre-wrap}.sequel-trace-binds{background:var(--grey-50);font-size:12px;margin:0 0 1em;padding:.5em 1em}.backtrace{align-items:center;background:var(--grey-100);display:flex;flex-direction:row;justify-content:space-between;padding:.5em}.backtrace button{background:none;color:var(--grey-500);height:20px;margin:0;overflow:auto;padding:0}.backtrace button svg{height:20px;width:20px}@font-face{font-family:Open Sans;font-style:normal;font-weight:400}@font-face{font-family:Open Sans;font-style:normal;font-weight:600}@font-face{font-family:Open Sans;font-style:normal;font-weight:700}html{--grey-50:#f9fafb;--grey-100:#f3f4f6;--grey-200:#e5e7eb;--grey-400:#9ca3af;--grey-500:#6b7280;--grey-700:#374151;--grey-900:#111827;--red-400:#f87171;--red-500:#ef4444;--red-600:#dc2626;--yellow-400:#fbbf24;--yellow-500:#fbbf24;--yellow-600:#d97706;--yellow-700:#b45309;--green-300:#6ee7b7;--green-400:#34d399;--green-500:#10b981;--blue-400:#60a5fa;--blue-500:#3b82f6;--main-width:1056px;--primary:var(--red-600);--border-color:var(--grey-200);--text-color:var(--grey-900);--fw-normal:400;--fw-semibold:600;--fw-bold:700;font-family:Open Sans,monospace;height:100%;width:100%}*,body,html{margin:0;padding:0}body{color:var(--text-color);height:100%}body,main{width:100%}main{display:flex;justify-content:center}.main-section{width:var(--main-width)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.hidden{display:none}.flex-row{display:flex;flex-direction:row}.flex-column{display:flex;flex-direction:column}.pill{background:var(--grey-200);border-radius:5px;font-size:.9rem;font-weight:600;letter-spacing:.1rem;margin:.2rem 0;padding:.1rem .4rem}.popover{color:#000;display:flex;flex-direction:column;padding:1em;width:600px}.popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding-bottom:1em}.popover-description{margin:0;padding:0}.popover-close{background:transparent;color:var(--grey-400);font-size:20px;font-weight:700;padding:0}.popover-body{padding:1em 0}.popover-footer{border-top:1px solid var(--grey-50)}.tippy-box[data-theme~=rmp]{background:#fff;border-radius:5px;box-shadow:8px 0 30px 4px rgba(0,0,0,.2),8px 4px 10px 0 rgba(0,0,0,.05);transition:all .2s cubic-bezier(.19,1,.22,1)}.tippy-box[data-theme~=rmp][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=rmp][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff}.tippy-box[data-theme~=rmp][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=rmp][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff}
@@ -1 +1 @@
1
- !function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";var e="top",t="bottom",n="right",r="left",i="auto",s=[e,t,n,r],o="start",a="end",c="viewport",l="popper",u=s.reduce((function(e,t){return e.concat([t+"-"+o,t+"-"+a])}),[]),h=[].concat(s,[i]).reduce((function(e,t){return e.concat([t,t+"-"+o,t+"-"+a])}),[]),d=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function p(e){return e?(e.nodeName||"").toLowerCase():null}function f(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function g(e){return e instanceof f(e).Element||e instanceof Element}function m(e){return e instanceof f(e).HTMLElement||e instanceof HTMLElement}function v(e){return"undefined"!=typeof ShadowRoot&&(e instanceof f(e).ShadowRoot||e instanceof ShadowRoot)}var b={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]||{},r=t.attributes[e]||{},i=t.elements[e];m(i)&&p(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.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 r=t.elements[e],i=t.attributes[e]||{},s=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});m(r)&&p(r)&&(Object.assign(r.style,s),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function y(e){return e.split("-")[0]}var w=Math.round;function T(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,i=1;return m(e)&&t&&(r=n.width/e.offsetWidth||1,i=n.height/e.offsetHeight||1),{width:w(n.width/r),height:w(n.height/i),top:w(n.top/i),right:w(n.right/r),bottom:w(n.bottom/i),left:w(n.left/r),x:w(n.left/r),y:w(n.top/i)}}function E(e){var t=T(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function O(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&v(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function A(e){return f(e).getComputedStyle(e)}function x(e){return["table","td","th"].indexOf(p(e))>=0}function k(e){return((g(e)?e.ownerDocument:e.document)||window.document).documentElement}function C(e){return"html"===p(e)?e:e.assignedSlot||e.parentNode||(v(e)?e.host:null)||k(e)}function L(e){return m(e)&&"fixed"!==A(e).position?e.offsetParent:null}function M(e){for(var t=f(e),n=L(e);n&&x(n)&&"static"===A(n).position;)n=L(n);return n&&("html"===p(n)||"body"===p(n)&&"static"===A(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&m(e)&&"fixed"===A(e).position)return null;for(var n=C(e);m(n)&&["html","body"].indexOf(p(n))<0;){var r=A(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function D(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}var B=Math.max,N=Math.min,S=Math.round;function j(e,t,n){return B(e,N(t,n))}function I(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function V(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var F={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $(i){var s,o=i.popper,a=i.popperRect,c=i.placement,l=i.offsets,u=i.position,h=i.gpuAcceleration,d=i.adaptive,p=i.roundOffsets,g=!0===p?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:S(S(t*r)/r)||0,y:S(S(n*r)/r)||0}}(l):"function"==typeof p?p(l):l,m=g.x,v=void 0===m?0:m,b=g.y,y=void 0===b?0:b,w=l.hasOwnProperty("x"),T=l.hasOwnProperty("y"),E=r,O=e,x=window;if(d){var C=M(o),L="clientHeight",D="clientWidth";C===f(o)&&"static"!==A(C=k(o)).position&&(L="scrollHeight",D="scrollWidth"),C=C,c===e&&(O=t,y-=C[L]-a.height,y*=h?1:-1),c===r&&(E=n,v-=C[D]-a.width,v*=h?1:-1)}var B,N=Object.assign({position:u},d&&F);return h?Object.assign({},N,((B={})[O]=T?"0":"",B[E]=w?"0":"",B.transform=(x.devicePixelRatio||1)<2?"translate("+v+"px, "+y+"px)":"translate3d("+v+"px, "+y+"px, 0)",B)):Object.assign({},N,((s={})[O]=T?y+"px":"",s[E]=w?v+"px":"",s.transform="",s))}var _={passive:!0};var P={left:"right",right:"left",bottom:"top",top:"bottom"};function R(e){return e.replace(/left|right|bottom|top/g,(function(e){return P[e]}))}var K={start:"end",end:"start"};function U(e){return e.replace(/start|end/g,(function(e){return K[e]}))}function W(e){var t=f(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function H(e){return T(k(e)).left+W(e).scrollLeft}function q(e){var t=A(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function z(e){return["html","body","#document"].indexOf(p(e))>=0?e.ownerDocument.body:m(e)&&q(e)?e:z(C(e))}function Y(e,t){var n;void 0===t&&(t=[]);var r=z(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),s=f(r),o=i?[s].concat(s.visualViewport||[],q(r)?r:[]):r,a=t.concat(o);return i?a:a.concat(Y(C(o)))}function J(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function X(e,t){return t===c?J(function(e){var t=f(e),n=k(e),r=t.visualViewport,i=n.clientWidth,s=n.clientHeight,o=0,a=0;return r&&(i=r.width,s=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=r.offsetLeft,a=r.offsetTop)),{width:i,height:s,x:o+H(e),y:a}}(e)):m(t)?function(e){var t=T(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):J(function(e){var t,n=k(e),r=W(e),i=null==(t=e.ownerDocument)?void 0:t.body,s=B(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=B(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+H(e),c=-r.scrollTop;return"rtl"===A(i||n).direction&&(a+=B(n.clientWidth,i?i.clientWidth:0)-s),{width:s,height:o,x:a,y:c}}(k(e)))}function Q(e,t,n){var r="clippingParents"===t?function(e){var t=Y(C(e)),n=["absolute","fixed"].indexOf(A(e).position)>=0&&m(e)?M(e):e;return g(n)?t.filter((function(e){return g(e)&&O(e,n)&&"body"!==p(e)})):[]}(e):[].concat(t),i=[].concat(r,[n]),s=i[0],o=i.reduce((function(t,n){var r=X(e,n);return t.top=B(r.top,t.top),t.right=N(r.right,t.right),t.bottom=N(r.bottom,t.bottom),t.left=B(r.left,t.left),t}),X(e,s));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function G(e){return e.split("-")[1]}function Z(i){var s,c=i.reference,l=i.element,u=i.placement,h=u?y(u):null,d=u?G(u):null,p=c.x+c.width/2-l.width/2,f=c.y+c.height/2-l.height/2;switch(h){case e:s={x:p,y:c.y-l.height};break;case t:s={x:p,y:c.y+c.height};break;case n:s={x:c.x+c.width,y:f};break;case r:s={x:c.x-l.width,y:f};break;default:s={x:c.x,y:c.y}}var g=h?D(h):null;if(null!=g){var m="y"===g?"height":"width";switch(d){case o:s[g]=s[g]-(c[m]/2-l[m]/2);break;case a:s[g]=s[g]+(c[m]/2-l[m]/2)}}return s}function ee(r,i){void 0===i&&(i={});var o=i,a=o.placement,u=void 0===a?r.placement:a,h=o.boundary,d=void 0===h?"clippingParents":h,p=o.rootBoundary,f=void 0===p?c:p,m=o.elementContext,v=void 0===m?l:m,b=o.altBoundary,y=void 0!==b&&b,w=o.padding,E=void 0===w?0:w,O=I("number"!=typeof E?E:V(E,s)),A=v===l?"reference":l,x=r.elements.reference,C=r.rects.popper,L=r.elements[y?A:v],M=Q(g(L)?L:L.contextElement||k(r.elements.popper),d,f),D=T(x),B=Z({reference:D,element:C,strategy:"absolute",placement:u}),N=J(Object.assign({},C,B)),S=v===l?N:D,j={top:M.top-S.top+O.top,bottom:S.bottom-M.bottom+O.bottom,left:M.left-S.left+O.left,right:S.right-M.right+O.right},F=r.modifiersData.offset;if(v===l&&F){var $=F[u];Object.keys(j).forEach((function(r){var i=[n,t].indexOf(r)>=0?1:-1,s=[e,t].indexOf(r)>=0?"y":"x";j[r]+=$[s]*i}))}return j}function te(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,c=n.flipVariations,l=n.allowedAutoPlacements,d=void 0===l?h:l,p=G(r),f=p?c?u:u.filter((function(e){return G(e)===p})):s,g=f.filter((function(e){return d.indexOf(e)>=0}));0===g.length&&(g=f);var m=g.reduce((function(t,n){return t[n]=ee(e,{placement:n,boundary:i,rootBoundary:o,padding:a})[y(n)],t}),{});return Object.keys(m).sort((function(e,t){return m[e]-m[t]}))}function ne(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 re(i){return[e,n,t,r].some((function(e){return i[e]>=0}))}function ie(e,t,n){void 0===n&&(n=!1);var r,i,s=m(t),o=m(t)&&function(e){var t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return 1!==n||1!==r}(t),a=k(t),c=T(e,o),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(s||!s&&!n)&&(("body"!==p(t)||q(a))&&(l=(r=t)!==f(r)&&m(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:W(r)),m(t)?((u=T(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=H(a))),{x:c.left+l.scrollLeft-u.x,y:c.top+l.scrollTop-u.y,width:c.width,height:c.height}}function se(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}var oe={placement:"bottom",modifiers:[],strategy:"absolute"};function ae(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function ce(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,i=t.defaultOptions,s=void 0===i?oe:i;return function(e,t,n){void 0===n&&(n=s);var i,o,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},oe,s),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],l=!1,u={state:a,setOptions:function(n){h(),a.options=Object.assign({},s,a.options,n),a.scrollParents={reference:g(e)?Y(e):e.contextElement?Y(e.contextElement):[],popper:Y(t)};var i,o,l=function(e){var t=se(e);return d.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((i=[].concat(r,a.options.modifiers),o=i.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}),{}),Object.keys(o).map((function(e){return o[e]}))));return a.orderedModifiers=l.filter((function(e){return e.enabled})),a.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"==typeof i){var s=i({state:a,name:t,instance:u,options:r}),o=function(){};c.push(s||o)}})),u.update()},forceUpdate:function(){if(!l){var e=a.elements,t=e.reference,n=e.popper;if(ae(t,n)){a.rects={reference:ie(t,M(n),"fixed"===a.options.strategy),popper:E(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(e){return a.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<a.orderedModifiers.length;r++)if(!0!==a.reset){var i=a.orderedModifiers[r],s=i.fn,o=i.options,c=void 0===o?{}:o,h=i.name;"function"==typeof s&&(a=s({state:a,options:c,name:h,instance:u})||a)}else a.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(e){u.forceUpdate(),e(a)}))},function(){return o||(o=new Promise((function(e){Promise.resolve().then((function(){o=void 0,e(i())}))}))),o}),destroy:function(){h(),l=!0}};if(!ae(e,t))return u;function h(){c.forEach((function(e){return e()})),c=[]}return u.setOptions(n).then((function(e){!l&&n.onFirstUpdate&&n.onFirstUpdate(e)})),u}}var le=ce({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,s=void 0===i||i,o=r.resize,a=void 0===o||o,c=f(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&l.forEach((function(e){e.addEventListener("scroll",n.update,_)})),a&&c.addEventListener("resize",n.update,_),function(){s&&l.forEach((function(e){e.removeEventListener("scroll",n.update,_)})),a&&c.removeEventListener("resize",n.update,_)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Z({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,s=n.adaptive,o=void 0===s||s,a=n.roundOffsets,c=void 0===a||a,l={placement:y(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,$(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,$(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},b,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var i=t.state,s=t.options,o=t.name,a=s.offset,c=void 0===a?[0,0]:a,l=h.reduce((function(t,s){return t[s]=function(t,i,s){var o=y(t),a=[r,e].indexOf(o)>=0?-1:1,c="function"==typeof s?s(Object.assign({},i,{placement:t})):s,l=c[0],u=c[1];return l=l||0,u=(u||0)*a,[r,n].indexOf(o)>=0?{x:u,y:l}:{x:l,y:u}}(s,i.rects,c),t}),{}),u=l[i.placement],d=u.x,p=u.y;null!=i.modifiersData.popperOffsets&&(i.modifiersData.popperOffsets.x+=d,i.modifiersData.popperOffsets.y+=p),i.modifiersData[o]=l}},{name:"flip",enabled:!0,phase:"main",fn:function(s){var a=s.state,c=s.options,l=s.name;if(!a.modifiersData[l]._skip){for(var u=c.mainAxis,h=void 0===u||u,d=c.altAxis,p=void 0===d||d,f=c.fallbackPlacements,g=c.padding,m=c.boundary,v=c.rootBoundary,b=c.altBoundary,w=c.flipVariations,T=void 0===w||w,E=c.allowedAutoPlacements,O=a.options.placement,A=y(O),x=f||(A===O||!T?[R(O)]:function(e){if(y(e)===i)return[];var t=R(e);return[U(e),t,U(t)]}(O)),k=[O].concat(x).reduce((function(e,t){return e.concat(y(t)===i?te(a,{placement:t,boundary:m,rootBoundary:v,padding:g,flipVariations:T,allowedAutoPlacements:E}):t)}),[]),C=a.rects.reference,L=a.rects.popper,M=new Map,D=!0,B=k[0],N=0;N<k.length;N++){var S=k[N],j=y(S),I=G(S)===o,V=[e,t].indexOf(j)>=0,F=V?"width":"height",$=ee(a,{placement:S,boundary:m,rootBoundary:v,altBoundary:b,padding:g}),_=V?I?n:r:I?t:e;C[F]>L[F]&&(_=R(_));var P=R(_),K=[];if(h&&K.push($[j]<=0),p&&K.push($[_]<=0,$[P]<=0),K.every((function(e){return e}))){B=S,D=!1;break}M.set(S,K)}if(D)for(var W=function(e){var t=k.find((function(t){var n=M.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return B=t,"break"},H=T?3:1;H>0;H--){if("break"===W(H))break}a.placement!==B&&(a.modifiersData[l]._skip=!0,a.placement=B,a.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(i){var s=i.state,a=i.options,c=i.name,l=a.mainAxis,u=void 0===l||l,h=a.altAxis,d=void 0!==h&&h,p=a.boundary,f=a.rootBoundary,g=a.altBoundary,m=a.padding,v=a.tether,b=void 0===v||v,w=a.tetherOffset,T=void 0===w?0:w,O=ee(s,{boundary:p,rootBoundary:f,padding:m,altBoundary:g}),A=y(s.placement),x=G(s.placement),k=!x,C=D(A),L="x"===C?"y":"x",S=s.modifiersData.popperOffsets,I=s.rects.reference,V=s.rects.popper,F="function"==typeof T?T(Object.assign({},s.rects,{placement:s.placement})):T,$={x:0,y:0};if(S){if(u||d){var _="y"===C?e:r,P="y"===C?t:n,R="y"===C?"height":"width",K=S[C],U=S[C]+O[_],W=S[C]-O[P],H=b?-V[R]/2:0,q=x===o?I[R]:V[R],z=x===o?-V[R]:-I[R],Y=s.elements.arrow,J=b&&Y?E(Y):{width:0,height:0},X=s.modifiersData["arrow#persistent"]?s.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Q=X[_],Z=X[P],te=j(0,I[R],J[R]),ne=k?I[R]/2-H-te-Q-F:q-te-Q-F,re=k?-I[R]/2+H+te+Z+F:z+te+Z+F,ie=s.elements.arrow&&M(s.elements.arrow),se=ie?"y"===C?ie.clientTop||0:ie.clientLeft||0:0,oe=s.modifiersData.offset?s.modifiersData.offset[s.placement][C]:0,ae=S[C]+ne-oe-se,ce=S[C]+re-oe;if(u){var le=j(b?N(U,ae):U,K,b?B(W,ce):W);S[C]=le,$[C]=le-K}if(d){var ue="x"===C?e:r,he="x"===C?t:n,de=S[L],pe=de+O[ue],fe=de-O[he],ge=j(b?N(pe,ae):pe,de,b?B(fe,ce):fe);S[L]=ge,$[L]=ge-de}}s.modifiersData[c]=$}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(i){var o,a=i.state,c=i.name,l=i.options,u=a.elements.arrow,h=a.modifiersData.popperOffsets,d=y(a.placement),p=D(d),f=[r,n].indexOf(d)>=0?"height":"width";if(u&&h){var g=function(e,t){return I("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:V(e,s))}(l.padding,a),m=E(u),v="y"===p?e:r,b="y"===p?t:n,w=a.rects.reference[f]+a.rects.reference[p]-h[p]-a.rects.popper[f],T=h[p]-a.rects.reference[p],O=M(u),A=O?"y"===p?O.clientHeight||0:O.clientWidth||0:0,x=w/2-T/2,k=g[v],C=A-m[f]-g[b],L=A/2-m[f]/2+x,B=j(k,L,C),N=p;a.modifiersData[c]=((o={})[N]=B,o.centerOffset=B-L,o)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&O(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,s=t.modifiersData.preventOverflow,o=ee(t,{elementContext:"reference"}),a=ee(t,{altBoundary:!0}),c=ne(o,r),l=ne(a,i,s),u=re(c),h=re(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":h})}}]}),ue="tippy-content",he="tippy-arrow",de="tippy-svg-arrow",pe={passive:!0,capture:!0};function fe(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function ge(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function me(e,t){return"function"==typeof e?e.apply(void 0,t):e}function ve(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function be(e){return[].concat(e)}function ye(e,t){-1===e.indexOf(t)&&e.push(t)}function we(e){return[].slice.call(e)}function Te(){return document.createElement("div")}function Ee(e){return["Element","Fragment"].some((function(t){return ge(e,t)}))}function Oe(e){return Ee(e)?[e]:function(e){return ge(e,"NodeList")}(e)?we(e):Array.isArray(e)?e:we(document.querySelectorAll(e))}function Ae(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function xe(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function ke(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}var Ce={isTouch:!1},Le=0;function Me(){Ce.isTouch||(Ce.isTouch=!0,window.performance&&document.addEventListener("mousemove",De))}function De(){var e=performance.now();e-Le<20&&(Ce.isTouch=!1,document.removeEventListener("mousemove",De)),Le=e}function Be(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var Ne="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",Se=/MSIE |Trident\//.test(Ne),je=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}),Ie=Object.keys(je);function Ve(e){var t=(e.plugins||[]).reduce((function(t,n){var r=n.name,i=n.defaultValue;return r&&(t[r]=void 0!==e[r]?e[r]:i),t}),{});return Object.assign({},e,{},t)}function Fe(e,t){var n=Object.assign({},t,{content:me(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Ve(Object.assign({},je,{plugins:t}))):Ie).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},je.aria,{},n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function $e(e,t){e.innerHTML=t}function _e(e){var t=Te();return!0===e?t.className=he:(t.className=de,Ee(e)?t.appendChild(e):$e(t,e)),t}function Pe(e,t){Ee(t.content)?($e(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?$e(e,t.content):e.textContent=t.content)}function Re(e){var t=e.firstElementChild,n=we(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(ue)})),arrow:n.find((function(e){return e.classList.contains(he)||e.classList.contains(de)})),backdrop:n.find((function(e){return e.classList.contains("tippy-backdrop")}))}}function Ke(e){var t=Te(),n=Te();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Te();function i(n,r){var i=Re(t),s=i.box,o=i.content,a=i.arrow;r.theme?s.setAttribute("data-theme",r.theme):s.removeAttribute("data-theme"),"string"==typeof r.animation?s.setAttribute("data-animation",r.animation):s.removeAttribute("data-animation"),r.inertia?s.setAttribute("data-inertia",""):s.removeAttribute("data-inertia"),s.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?s.setAttribute("role",r.role):s.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||Pe(o,e.props),r.arrow?a?n.arrow!==r.arrow&&(s.removeChild(a),s.appendChild(_e(r.arrow))):s.appendChild(_e(r.arrow)):a&&s.removeChild(a)}return r.className=ue,r.setAttribute("data-state","hidden"),Pe(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props),{popper:t,onUpdate:i}}Ke.$$tippy=!0;var Ue=1,We=[],He=[];function qe(e,t){var n,r,i,s,o,a,c,l,u,h=Fe(e,Object.assign({},je,{},Ve((n=t,Object.keys(n).reduce((function(e,t){return void 0!==n[t]&&(e[t]=n[t]),e}),{}))))),d=!1,p=!1,f=!1,g=!1,m=[],v=ve(Y,h.interactiveDebounce),b=Ue++,y=(u=h.plugins).filter((function(e,t){return u.indexOf(e)===t})),w={id:b,reference:e,popper:Te(),popperInstance:null,props:h,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(s)},setProps:function(t){if(w.state.isDestroyed)return;j("onBeforeUpdate",[w,t]),q();var n=w.props,r=Fe(e,Object.assign({},w.props,{},t,{ignoreAttributes:!0}));w.props=r,H(),n.interactiveDebounce!==r.interactiveDebounce&&(F(),v=ve(Y,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?be(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");V(),S(),O&&O(n,r);w.popperInstance&&(G(),ee().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));j("onAfterUpdate",[w,t])},setContent:function(e){w.setProps({content:e})},show:function(){var e=w.state.isVisible,t=w.state.isDestroyed,n=!w.state.isEnabled,r=Ce.isTouch&&!w.props.touch,i=fe(w.props.duration,0,je.duration);if(e||t||n||r)return;if(M().hasAttribute("disabled"))return;if(j("onShow",[w],!1),!1===w.props.onShow(w))return;w.state.isVisible=!0,L()&&(E.style.visibility="visible");S(),R(),w.state.isMounted||(E.style.transition="none");if(L()){var s=B(),o=s.box,a=s.content;Ae([o,a],0)}c=function(){var e;if(w.state.isVisible&&!g){if(g=!0,E.offsetHeight,E.style.transition=w.props.moveTransition,L()&&w.props.animation){var t=B(),n=t.box,r=t.content;Ae([n,r],i),xe([n,r],"visible")}I(),V(),ye(He,w),null==(e=w.popperInstance)||e.forceUpdate(),w.state.isMounted=!0,j("onMount",[w]),w.props.animation&&L()&&function(e,t){U(e,t)}(i,(function(){w.state.isShown=!0,j("onShown",[w])}))}},function(){var e,t=w.props.appendTo,n=M();e=w.props.interactive&&t===je.appendTo||"parent"===t?n.parentNode:me(t,[n]);e.contains(E)||e.appendChild(E);G()}()},hide:function(){var e=!w.state.isVisible,t=w.state.isDestroyed,n=!w.state.isEnabled,r=fe(w.props.duration,1,je.duration);if(e||t||n)return;if(j("onHide",[w],!1),!1===w.props.onHide(w))return;w.state.isVisible=!1,w.state.isShown=!1,g=!1,d=!1,L()&&(E.style.visibility="hidden");if(F(),K(),S(),L()){var i=B(),s=i.box,o=i.content;w.props.animation&&(Ae([s,o],r),xe([s,o],"hidden"))}I(),V(),w.props.animation?L()&&function(e,t){U(e,(function(){!w.state.isVisible&&E.parentNode&&E.parentNode.contains(E)&&t()}))}(r,w.unmount):w.unmount()},hideWithInteractivity:function(e){D().addEventListener("mousemove",v),ye(We,v),v(e)},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;Z(),ee().forEach((function(e){e._tippy.unmount()})),E.parentNode&&E.parentNode.removeChild(E);He=He.filter((function(e){return e!==w})),w.state.isMounted=!1,j("onHidden",[w])},destroy:function(){if(w.state.isDestroyed)return;w.clearDelayTimeouts(),w.unmount(),q(),delete e._tippy,w.state.isDestroyed=!0,j("onDestroy",[w])}};if(!h.render)return w;var T=h.render(w),E=T.popper,O=T.onUpdate;E.setAttribute("data-tippy-root",""),E.id="tippy-"+w.id,w.popper=E,e._tippy=w,E._tippy=w;var A=y.map((function(e){return e.fn(w)})),x=e.hasAttribute("aria-expanded");return H(),V(),S(),j("onCreate",[w]),h.showOnCreate&&te(),E.addEventListener("mouseenter",(function(){w.props.interactive&&w.state.isVisible&&w.clearDelayTimeouts()})),E.addEventListener("mouseleave",(function(e){w.props.interactive&&w.props.trigger.indexOf("mouseenter")>=0&&(D().addEventListener("mousemove",v),v(e))})),w;function k(){var e=w.props.touch;return Array.isArray(e)?e:[e,0]}function C(){return"hold"===k()[0]}function L(){var e;return!!(null==(e=w.props.render)?void 0:e.$$tippy)}function M(){return l||e}function D(){var e,t,n=M().parentNode;return n?(null==(t=be(n)[0])||null==(e=t.ownerDocument)?void 0:e.body)?t.ownerDocument:document:document}function B(){return Re(E)}function N(e){return w.state.isMounted&&!w.state.isVisible||Ce.isTouch||o&&"focus"===o.type?0:fe(w.props.delay,e?0:1,je.delay)}function S(){E.style.pointerEvents=w.props.interactive&&w.state.isVisible?"":"none",E.style.zIndex=""+w.props.zIndex}function j(e,t,n){var r;(void 0===n&&(n=!0),A.forEach((function(n){n[e]&&n[e].apply(void 0,t)})),n)&&(r=w.props)[e].apply(r,t)}function I(){var t=w.props.aria;if(t.content){var n="aria-"+t.content,r=E.id;be(w.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(w.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var i=t&&t.replace(r,"").trim();i?e.setAttribute(n,i):e.removeAttribute(n)}}))}}function V(){!x&&w.props.aria.expanded&&be(w.props.triggerTarget||e).forEach((function(e){w.props.interactive?e.setAttribute("aria-expanded",w.state.isVisible&&e===M()?"true":"false"):e.removeAttribute("aria-expanded")}))}function F(){D().removeEventListener("mousemove",v),We=We.filter((function(e){return e!==v}))}function $(e){if(!(Ce.isTouch&&(f||"mousedown"===e.type)||w.props.interactive&&E.contains(e.target))){if(M().contains(e.target)){if(Ce.isTouch)return;if(w.state.isVisible&&w.props.trigger.indexOf("click")>=0)return}else j("onClickOutside",[w,e]);!0===w.props.hideOnClick&&(w.clearDelayTimeouts(),w.hide(),p=!0,setTimeout((function(){p=!1})),w.state.isMounted||K())}}function _(){f=!0}function P(){f=!1}function R(){var e=D();e.addEventListener("mousedown",$,!0),e.addEventListener("touchend",$,pe),e.addEventListener("touchstart",P,pe),e.addEventListener("touchmove",_,pe)}function K(){var e=D();e.removeEventListener("mousedown",$,!0),e.removeEventListener("touchend",$,pe),e.removeEventListener("touchstart",P,pe),e.removeEventListener("touchmove",_,pe)}function U(e,t){var n=B().box;function r(e){e.target===n&&(ke(n,"remove",r),t())}if(0===e)return t();ke(n,"remove",a),ke(n,"add",r),a=r}function W(t,n,r){void 0===r&&(r=!1),be(w.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),m.push({node:e,eventType:t,handler:n,options:r})}))}function H(){var e;C()&&(W("touchstart",z,{passive:!0}),W("touchend",J,{passive:!0})),(e=w.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(W(e,z),e){case"mouseenter":W("mouseleave",J);break;case"focus":W(Se?"focusout":"blur",X);break;case"focusin":W("focusout",X)}}))}function q(){m.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)})),m=[]}function z(e){var t,n=!1;if(w.state.isEnabled&&!Q(e)&&!p){var r="focus"===(null==(t=o)?void 0:t.type);o=e,l=e.currentTarget,V(),!w.state.isVisible&&ge(e,"MouseEvent")&&We.forEach((function(t){return t(e)})),"click"===e.type&&(w.props.trigger.indexOf("mouseenter")<0||d)&&!1!==w.props.hideOnClick&&w.state.isVisible?n=!0:te(e),"click"===e.type&&(d=!n),n&&!r&&ne(e)}}function Y(e){var t=e.target,n=M().contains(t)||E.contains(t);"mousemove"===e.type&&n||function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,i=e.popperState,s=e.props.interactiveBorder,o=i.placement.split("-")[0],a=i.modifiersData.offset;if(!a)return!0;var c="bottom"===o?a.top.y:0,l="top"===o?a.bottom.y:0,u="right"===o?a.left.x:0,h="left"===o?a.right.x:0,d=t.top-r+c>s,p=r-t.bottom-l>s,f=t.left-n+u>s,g=n-t.right-h>s;return d||p||f||g}))}(ee().concat(E).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:h}:null})).filter(Boolean),e)&&(F(),ne(e))}function J(e){Q(e)||w.props.trigger.indexOf("click")>=0&&d||(w.props.interactive?w.hideWithInteractivity(e):ne(e))}function X(e){w.props.trigger.indexOf("focusin")<0&&e.target!==M()||w.props.interactive&&e.relatedTarget&&E.contains(e.relatedTarget)||ne(e)}function Q(e){return!!Ce.isTouch&&C()!==e.type.indexOf("touch")>=0}function G(){Z();var t=w.props,n=t.popperOptions,r=t.placement,i=t.offset,s=t.getReferenceClientRect,o=t.moveTransition,a=L()?Re(E).arrow:null,l=s?{getBoundingClientRect:s,contextElement:s.contextElement||M()}:e,u=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!o}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(L()){var n=B().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];L()&&a&&u.push({name:"arrow",options:{element:a,padding:3}}),u.push.apply(u,(null==n?void 0:n.modifiers)||[]),w.popperInstance=le(l,E,Object.assign({},n,{placement:r,onFirstUpdate:c,modifiers:u}))}function Z(){w.popperInstance&&(w.popperInstance.destroy(),w.popperInstance=null)}function ee(){return we(E.querySelectorAll("[data-tippy-root]"))}function te(e){w.clearDelayTimeouts(),e&&j("onTrigger",[w,e]),R();var t=N(!0),n=k(),i=n[0],s=n[1];Ce.isTouch&&"hold"===i&&s&&(t=s),t?r=setTimeout((function(){w.show()}),t):w.show()}function ne(e){if(w.clearDelayTimeouts(),j("onUntrigger",[w,e]),w.state.isVisible){if(!(w.props.trigger.indexOf("mouseenter")>=0&&w.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=N(!1);t?i=setTimeout((function(){w.state.isVisible&&w.hide()}),t):s=requestAnimationFrame((function(){w.hide()}))}}else K()}}function ze(e,t){void 0===t&&(t={});var n=je.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",Me,pe),window.addEventListener("blur",Be);var r=Object.assign({},t,{plugins:n}),i=Oe(e).reduce((function(e,t){var n=t&&qe(t,r);return n&&e.push(n),e}),[]);return Ee(e)?i[0]:i}ze.defaultProps=je,ze.setDefaultProps=function(e){Object.keys(e).forEach((function(t){je[t]=e[t]}))},ze.currentInput=Ce,Object.assign({},b,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),ze.setDefaultProps({render:Ke});class Ye{constructor(e,t,n){this.eventTarget=e,this.eventName=t,this.eventOptions=n,this.unorderedBindings=new Set}connect(){this.eventTarget.addEventListener(this.eventName,this,this.eventOptions)}disconnect(){this.eventTarget.removeEventListener(this.eventName,this,this.eventOptions)}bindingConnected(e){this.unorderedBindings.add(e)}bindingDisconnected(e){this.unorderedBindings.delete(e)}handleEvent(e){const t=function(e){if("immediatePropagationStopped"in e)return e;{const{stopImmediatePropagation:t}=e;return Object.assign(e,{immediatePropagationStopped:!1,stopImmediatePropagation(){this.immediatePropagationStopped=!0,t.call(this)}})}}(e);for(const e of this.bindings){if(t.immediatePropagationStopped)break;e.handleEvent(t)}}get bindings(){return Array.from(this.unorderedBindings).sort(((e,t)=>{const n=e.index,r=t.index;return n<r?-1:n>r?1:0}))}}class Je{constructor(e){this.application=e,this.eventListenerMaps=new Map,this.started=!1}start(){this.started||(this.started=!0,this.eventListeners.forEach((e=>e.connect())))}stop(){this.started&&(this.started=!1,this.eventListeners.forEach((e=>e.disconnect())))}get eventListeners(){return Array.from(this.eventListenerMaps.values()).reduce(((e,t)=>e.concat(Array.from(t.values()))),[])}bindingConnected(e){this.fetchEventListenerForBinding(e).bindingConnected(e)}bindingDisconnected(e){this.fetchEventListenerForBinding(e).bindingDisconnected(e)}handleError(e,t,n={}){this.application.handleError(e,`Error ${t}`,n)}fetchEventListenerForBinding(e){const{eventTarget:t,eventName:n,eventOptions:r}=e;return this.fetchEventListener(t,n,r)}fetchEventListener(e,t,n){const r=this.fetchEventListenerMapForEventTarget(e),i=this.cacheKey(t,n);let s=r.get(i);return s||(s=this.createEventListener(e,t,n),r.set(i,s)),s}createEventListener(e,t,n){const r=new Ye(e,t,n);return this.started&&r.connect(),r}fetchEventListenerMapForEventTarget(e){let t=this.eventListenerMaps.get(e);return t||(t=new Map,this.eventListenerMaps.set(e,t)),t}cacheKey(e,t){const n=[e];return Object.keys(t).sort().forEach((e=>{n.push(`${t[e]?"":"!"}${e}`)})),n.join(":")}}const Xe=/^((.+?)(@(window|document))?->)?(.+?)(#([^:]+?))(:(.+))?$/;function Qe(e){return"window"==e?window:"document"==e?document:void 0}function Ge(e){return e.replace(/(?:[_-])([a-z0-9])/g,((e,t)=>t.toUpperCase()))}function Ze(e){return e.charAt(0).toUpperCase()+e.slice(1)}function et(e){return e.replace(/([A-Z])/g,((e,t)=>`-${t.toLowerCase()}`))}const tt={a:e=>"click",button:e=>"click",form:e=>"submit",details:e=>"toggle",input:e=>"submit"==e.getAttribute("type")?"click":"input",select:e=>"change",textarea:e=>"input"};function nt(e){throw new Error(e)}function rt(e){try{return JSON.parse(e)}catch(t){return e}}class it{constructor(e,t){this.context=e,this.action=t}get index(){return this.action.index}get eventTarget(){return this.action.eventTarget}get eventOptions(){return this.action.eventOptions}get identifier(){return this.context.identifier}handleEvent(e){this.willBeInvokedByEvent(e)&&this.invokeWithEvent(e)}get eventName(){return this.action.eventName}get method(){const e=this.controller[this.methodName];if("function"==typeof e)return e;throw new Error(`Action "${this.action}" references undefined method "${this.methodName}"`)}invokeWithEvent(e){const{target:t,currentTarget:n}=e;try{const{params:r}=this.action,i=Object.assign(e,{params:r});this.method.call(this.controller,i),this.context.logDebugActivity(this.methodName,{event:e,target:t,currentTarget:n,action:this.methodName})}catch(t){const{identifier:n,controller:r,element:i,index:s}=this,o={identifier:n,controller:r,element:i,index:s,event:e};this.context.handleError(t,`invoking action "${this.action}"`,o)}}willBeInvokedByEvent(e){const t=e.target;return this.element===t||(t instanceof Element&&this.element.contains(t)?this.scope.containsElement(t):this.scope.containsElement(this.action.element))}get controller(){return this.context.controller}get methodName(){return this.action.methodName}get element(){return this.scope.element}get scope(){return this.context.scope}}class st{constructor(e,t){this.mutationObserverInit={attributes:!0,childList:!0,subtree:!0},this.element=e,this.started=!1,this.delegate=t,this.elements=new Set,this.mutationObserver=new MutationObserver((e=>this.processMutations(e)))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,this.mutationObserverInit),this.refresh())}pause(e){this.started&&(this.mutationObserver.disconnect(),this.started=!1),e(),this.started||(this.mutationObserver.observe(this.element,this.mutationObserverInit),this.started=!0)}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started){const e=new Set(this.matchElementsInTree());for(const t of Array.from(this.elements))e.has(t)||this.removeElement(t);for(const t of Array.from(e))this.addElement(t)}}processMutations(e){if(this.started)for(const t of e)this.processMutation(t)}processMutation(e){"attributes"==e.type?this.processAttributeChange(e.target,e.attributeName):"childList"==e.type&&(this.processRemovedNodes(e.removedNodes),this.processAddedNodes(e.addedNodes))}processAttributeChange(e,t){const n=e;this.elements.has(n)?this.delegate.elementAttributeChanged&&this.matchElement(n)?this.delegate.elementAttributeChanged(n,t):this.removeElement(n):this.matchElement(n)&&this.addElement(n)}processRemovedNodes(e){for(const t of Array.from(e)){const e=this.elementFromNode(t);e&&this.processTree(e,this.removeElement)}}processAddedNodes(e){for(const t of Array.from(e)){const e=this.elementFromNode(t);e&&this.elementIsActive(e)&&this.processTree(e,this.addElement)}}matchElement(e){return this.delegate.matchElement(e)}matchElementsInTree(e=this.element){return this.delegate.matchElementsInTree(e)}processTree(e,t){for(const n of this.matchElementsInTree(e))t.call(this,n)}elementFromNode(e){if(e.nodeType==Node.ELEMENT_NODE)return e}elementIsActive(e){return e.isConnected==this.element.isConnected&&this.element.contains(e)}addElement(e){this.elements.has(e)||this.elementIsActive(e)&&(this.elements.add(e),this.delegate.elementMatched&&this.delegate.elementMatched(e))}removeElement(e){this.elements.has(e)&&(this.elements.delete(e),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(e))}}class ot{constructor(e,t,n){this.attributeName=t,this.delegate=n,this.elementObserver=new st(e,this)}get element(){return this.elementObserver.element}get selector(){return`[${this.attributeName}]`}start(){this.elementObserver.start()}pause(e){this.elementObserver.pause(e)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get started(){return this.elementObserver.started}matchElement(e){return e.hasAttribute(this.attributeName)}matchElementsInTree(e){const t=this.matchElement(e)?[e]:[],n=Array.from(e.querySelectorAll(this.selector));return t.concat(n)}elementMatched(e){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(e,this.attributeName)}elementUnmatched(e){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(e,this.attributeName)}elementAttributeChanged(e,t){this.delegate.elementAttributeValueChanged&&this.attributeName==t&&this.delegate.elementAttributeValueChanged(e,t)}}class at{constructor(e,t){this.element=e,this.delegate=t,this.started=!1,this.stringMap=new Map,this.mutationObserver=new MutationObserver((e=>this.processMutations(e)))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,attributeOldValue:!0}),this.refresh())}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started)for(const e of this.knownAttributeNames)this.refreshAttribute(e,null)}processMutations(e){if(this.started)for(const t of e)this.processMutation(t)}processMutation(e){const t=e.attributeName;t&&this.refreshAttribute(t,e.oldValue)}refreshAttribute(e,t){const n=this.delegate.getStringMapKeyForAttribute(e);if(null!=n){this.stringMap.has(e)||this.stringMapKeyAdded(n,e);const r=this.element.getAttribute(e);if(this.stringMap.get(e)!=r&&this.stringMapValueChanged(r,n,t),null==r){const t=this.stringMap.get(e);this.stringMap.delete(e),t&&this.stringMapKeyRemoved(n,e,t)}else this.stringMap.set(e,r)}}stringMapKeyAdded(e,t){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(e,t)}stringMapValueChanged(e,t,n){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(e,t,n)}stringMapKeyRemoved(e,t,n){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(e,t,n)}get knownAttributeNames(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))}get currentAttributeNames(){return Array.from(this.element.attributes).map((e=>e.name))}get recordedAttributeNames(){return Array.from(this.stringMap.keys())}}function ct(e,t){let n=e.get(t);return n||(n=new Set,e.set(t,n)),n}class lt{constructor(){this.valuesByKey=new Map}get keys(){return Array.from(this.valuesByKey.keys())}get values(){return Array.from(this.valuesByKey.values()).reduce(((e,t)=>e.concat(Array.from(t))),[])}get size(){return Array.from(this.valuesByKey.values()).reduce(((e,t)=>e+t.size),0)}add(e,t){!function(e,t,n){ct(e,t).add(n)}(this.valuesByKey,e,t)}delete(e,t){!function(e,t,n){ct(e,t).delete(n),function(e,t){const n=e.get(t);null!=n&&0==n.size&&e.delete(t)}(e,t)}(this.valuesByKey,e,t)}has(e,t){const n=this.valuesByKey.get(e);return null!=n&&n.has(t)}hasKey(e){return this.valuesByKey.has(e)}hasValue(e){return Array.from(this.valuesByKey.values()).some((t=>t.has(e)))}getValuesForKey(e){const t=this.valuesByKey.get(e);return t?Array.from(t):[]}getKeysForValue(e){return Array.from(this.valuesByKey).filter((([t,n])=>n.has(e))).map((([e,t])=>e))}}class ut{constructor(e,t,n){this.attributeObserver=new ot(e,t,this),this.delegate=n,this.tokensByElement=new lt}get started(){return this.attributeObserver.started}start(){this.attributeObserver.start()}pause(e){this.attributeObserver.pause(e)}stop(){this.attributeObserver.stop()}refresh(){this.attributeObserver.refresh()}get element(){return this.attributeObserver.element}get attributeName(){return this.attributeObserver.attributeName}elementMatchedAttribute(e){this.tokensMatched(this.readTokensForElement(e))}elementAttributeValueChanged(e){const[t,n]=this.refreshTokensForElement(e);this.tokensUnmatched(t),this.tokensMatched(n)}elementUnmatchedAttribute(e){this.tokensUnmatched(this.tokensByElement.getValuesForKey(e))}tokensMatched(e){e.forEach((e=>this.tokenMatched(e)))}tokensUnmatched(e){e.forEach((e=>this.tokenUnmatched(e)))}tokenMatched(e){this.delegate.tokenMatched(e),this.tokensByElement.add(e.element,e)}tokenUnmatched(e){this.delegate.tokenUnmatched(e),this.tokensByElement.delete(e.element,e)}refreshTokensForElement(e){const t=this.tokensByElement.getValuesForKey(e),n=this.readTokensForElement(e),r=function(e,t){const n=Math.max(e.length,t.length);return Array.from({length:n},((n,r)=>[e[r],t[r]]))}(t,n).findIndex((([e,t])=>!function(e,t){return e&&t&&e.index==t.index&&e.content==t.content}(e,t)));return-1==r?[[],[]]:[t.slice(r),n.slice(r)]}readTokensForElement(e){const t=this.attributeName;return function(e,t,n){return e.trim().split(/\s+/).filter((e=>e.length)).map(((e,r)=>({element:t,attributeName:n,content:e,index:r})))}(e.getAttribute(t)||"",e,t)}}class ht{constructor(e,t,n){this.tokenListObserver=new ut(e,t,this),this.delegate=n,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}get started(){return this.tokenListObserver.started}start(){this.tokenListObserver.start()}stop(){this.tokenListObserver.stop()}refresh(){this.tokenListObserver.refresh()}get element(){return this.tokenListObserver.element}get attributeName(){return this.tokenListObserver.attributeName}tokenMatched(e){const{element:t}=e,{value:n}=this.fetchParseResultForToken(e);n&&(this.fetchValuesByTokenForElement(t).set(e,n),this.delegate.elementMatchedValue(t,n))}tokenUnmatched(e){const{element:t}=e,{value:n}=this.fetchParseResultForToken(e);n&&(this.fetchValuesByTokenForElement(t).delete(e),this.delegate.elementUnmatchedValue(t,n))}fetchParseResultForToken(e){let t=this.parseResultsByToken.get(e);return t||(t=this.parseToken(e),this.parseResultsByToken.set(e,t)),t}fetchValuesByTokenForElement(e){let t=this.valuesByTokenByElement.get(e);return t||(t=new Map,this.valuesByTokenByElement.set(e,t)),t}parseToken(e){try{return{value:this.delegate.parseValueForToken(e)}}catch(e){return{error:e}}}}class dt{constructor(e,t){this.context=e,this.delegate=t,this.bindingsByAction=new Map}start(){this.valueListObserver||(this.valueListObserver=new ht(this.element,this.actionAttribute,this),this.valueListObserver.start())}stop(){this.valueListObserver&&(this.valueListObserver.stop(),delete this.valueListObserver,this.disconnectAllActions())}get element(){return this.context.element}get identifier(){return this.context.identifier}get actionAttribute(){return this.schema.actionAttribute}get schema(){return this.context.schema}get bindings(){return Array.from(this.bindingsByAction.values())}connectAction(e){const t=new it(this.context,e);this.bindingsByAction.set(e,t),this.delegate.bindingConnected(t)}disconnectAction(e){const t=this.bindingsByAction.get(e);t&&(this.bindingsByAction.delete(e),this.delegate.bindingDisconnected(t))}disconnectAllActions(){this.bindings.forEach((e=>this.delegate.bindingDisconnected(e))),this.bindingsByAction.clear()}parseValueForToken(e){const t=class{constructor(e,t,n){this.element=e,this.index=t,this.eventTarget=n.eventTarget||e,this.eventName=n.eventName||function(e){const t=e.tagName.toLowerCase();if(t in tt)return tt[t](e)}(e)||nt("missing event name"),this.eventOptions=n.eventOptions||{},this.identifier=n.identifier||nt("missing identifier"),this.methodName=n.methodName||nt("missing method name")}static forToken(e){return new this(e.element,e.index,function(e){const t=e.trim().match(Xe)||[];return{eventTarget:Qe(t[4]),eventName:t[2],eventOptions:t[9]?(n=t[9],n.split(":").reduce(((e,t)=>Object.assign(e,{[t.replace(/^!/,"")]:!/^!/.test(t)})),{})):{},identifier:t[5],methodName:t[7]};var n}(e.content))}toString(){const e=this.eventTargetName?`@${this.eventTargetName}`:"";return`${this.eventName}${e}->${this.identifier}#${this.methodName}`}get params(){return this.eventTarget instanceof Element?this.getParamsFromEventTargetAttributes(this.eventTarget):{}}getParamsFromEventTargetAttributes(e){const t={},n=new RegExp(`^data-${this.identifier}-(.+)-param$`);return Array.from(e.attributes).forEach((({name:e,value:r})=>{const i=e.match(n),s=i&&i[1];s&&Object.assign(t,{[Ge(s)]:rt(r)})})),t}get eventTargetName(){return(e=this.eventTarget)==window?"window":e==document?"document":void 0;var e}}.forToken(e);if(t.identifier==this.identifier)return t}elementMatchedValue(e,t){this.connectAction(t)}elementUnmatchedValue(e,t){this.disconnectAction(t)}}class pt{constructor(e,t){this.context=e,this.receiver=t,this.stringMapObserver=new at(this.element,this),this.valueDescriptorMap=this.controller.valueDescriptorMap,this.invokeChangedCallbacksForDefaultValues()}start(){this.stringMapObserver.start()}stop(){this.stringMapObserver.stop()}get element(){return this.context.element}get controller(){return this.context.controller}getStringMapKeyForAttribute(e){if(e in this.valueDescriptorMap)return this.valueDescriptorMap[e].name}stringMapKeyAdded(e,t){const n=this.valueDescriptorMap[t];this.hasValue(e)||this.invokeChangedCallback(e,n.writer(this.receiver[e]),n.writer(n.defaultValue))}stringMapValueChanged(e,t,n){const r=this.valueDescriptorNameMap[t];null!==e&&(null===n&&(n=r.writer(r.defaultValue)),this.invokeChangedCallback(t,e,n))}stringMapKeyRemoved(e,t,n){const r=this.valueDescriptorNameMap[e];this.hasValue(e)?this.invokeChangedCallback(e,r.writer(this.receiver[e]),n):this.invokeChangedCallback(e,r.writer(r.defaultValue),n)}invokeChangedCallbacksForDefaultValues(){for(const{key:e,name:t,defaultValue:n,writer:r}of this.valueDescriptors)null==n||this.controller.data.has(e)||this.invokeChangedCallback(t,r(n),void 0)}invokeChangedCallback(e,t,n){const r=`${e}Changed`,i=this.receiver[r];if("function"==typeof i){const r=this.valueDescriptorNameMap[e],s=r.reader(t);let o=n;n&&(o=r.reader(n)),i.call(this.receiver,s,o)}}get valueDescriptors(){const{valueDescriptorMap:e}=this;return Object.keys(e).map((t=>e[t]))}get valueDescriptorNameMap(){const e={};return Object.keys(this.valueDescriptorMap).forEach((t=>{const n=this.valueDescriptorMap[t];e[n.name]=n})),e}hasValue(e){const t=`has${Ze(this.valueDescriptorNameMap[e].name)}`;return this.receiver[t]}}class ft{constructor(e,t){this.context=e,this.delegate=t,this.targetsByName=new lt}start(){this.tokenListObserver||(this.tokenListObserver=new ut(this.element,this.attributeName,this),this.tokenListObserver.start())}stop(){this.tokenListObserver&&(this.disconnectAllTargets(),this.tokenListObserver.stop(),delete this.tokenListObserver)}tokenMatched({element:e,content:t}){this.scope.containsElement(e)&&this.connectTarget(e,t)}tokenUnmatched({element:e,content:t}){this.disconnectTarget(e,t)}connectTarget(e,t){var n;this.targetsByName.has(t,e)||(this.targetsByName.add(t,e),null===(n=this.tokenListObserver)||void 0===n||n.pause((()=>this.delegate.targetConnected(e,t))))}disconnectTarget(e,t){var n;this.targetsByName.has(t,e)&&(this.targetsByName.delete(t,e),null===(n=this.tokenListObserver)||void 0===n||n.pause((()=>this.delegate.targetDisconnected(e,t))))}disconnectAllTargets(){for(const e of this.targetsByName.keys)for(const t of this.targetsByName.getValuesForKey(e))this.disconnectTarget(t,e)}get attributeName(){return`data-${this.context.identifier}-target`}get element(){return this.context.element}get scope(){return this.context.scope}}class gt{constructor(e,t){this.logDebugActivity=(e,t={})=>{const{identifier:n,controller:r,element:i}=this;t=Object.assign({identifier:n,controller:r,element:i},t),this.application.logDebugActivity(this.identifier,e,t)},this.module=e,this.scope=t,this.controller=new e.controllerConstructor(this),this.bindingObserver=new dt(this,this.dispatcher),this.valueObserver=new pt(this,this.controller),this.targetObserver=new ft(this,this);try{this.controller.initialize(),this.logDebugActivity("initialize")}catch(e){this.handleError(e,"initializing controller")}}connect(){this.bindingObserver.start(),this.valueObserver.start(),this.targetObserver.start();try{this.controller.connect(),this.logDebugActivity("connect")}catch(e){this.handleError(e,"connecting controller")}}disconnect(){try{this.controller.disconnect(),this.logDebugActivity("disconnect")}catch(e){this.handleError(e,"disconnecting controller")}this.targetObserver.stop(),this.valueObserver.stop(),this.bindingObserver.stop()}get application(){return this.module.application}get identifier(){return this.module.identifier}get schema(){return this.application.schema}get dispatcher(){return this.application.dispatcher}get element(){return this.scope.element}get parentElement(){return this.element.parentElement}handleError(e,t,n={}){const{identifier:r,controller:i,element:s}=this;n=Object.assign({identifier:r,controller:i,element:s},n),this.application.handleError(e,`Error ${t}`,n)}targetConnected(e,t){this.invokeControllerMethod(`${t}TargetConnected`,e)}targetDisconnected(e,t){this.invokeControllerMethod(`${t}TargetDisconnected`,e)}invokeControllerMethod(e,...t){const n=this.controller;"function"==typeof n[e]&&n[e](...t)}}function mt(e,t){const n=bt(e);return Array.from(n.reduce(((e,n)=>(function(e,t){const n=e[t];return Array.isArray(n)?n:[]}(n,t).forEach((t=>e.add(t))),e)),new Set))}function vt(e,t){return bt(e).reduce(((e,n)=>(e.push(...function(e,t){const n=e[t];return n?Object.keys(n).map((e=>[e,n[e]])):[]}(n,t)),e)),[])}function bt(e){const t=[];for(;e;)t.push(e),e=Object.getPrototypeOf(e);return t.reverse()}function yt(e){return function(e,t){const n=Tt(e),r=function(e,t){return wt(t).reduce(((n,r)=>{const i=function(e,t,n){const r=Object.getOwnPropertyDescriptor(e,n);if(!r||!("value"in r)){const e=Object.getOwnPropertyDescriptor(t,n).value;return r&&(e.get=r.get||e.get,e.set=r.set||e.set),e}}(e,t,r);return i&&Object.assign(n,{[r]:i}),n}),{})}(e.prototype,t);return Object.defineProperties(n.prototype,r),n}(e,function(e){return mt(e,"blessings").reduce(((t,n)=>{const r=n(e);for(const e in r){const n=t[e]||{};t[e]=Object.assign(n,r[e])}return t}),{})}(e))}const wt="function"==typeof Object.getOwnPropertySymbols?e=>[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)]:Object.getOwnPropertyNames,Tt=(()=>{function e(e){function t(){return Reflect.construct(e,arguments,new.target)}return t.prototype=Object.create(e.prototype,{constructor:{value:t}}),Reflect.setPrototypeOf(t,e),t}try{return function(){const t=e((function(){this.a.call(this)}));t.prototype.a=function(){},new t}(),e}catch(e){return e=>class extends e{}}})();class Et{constructor(e,t){this.application=e,this.definition=function(e){return{identifier:e.identifier,controllerConstructor:yt(e.controllerConstructor)}}(t),this.contextsByScope=new WeakMap,this.connectedContexts=new Set}get identifier(){return this.definition.identifier}get controllerConstructor(){return this.definition.controllerConstructor}get contexts(){return Array.from(this.connectedContexts)}connectContextForScope(e){const t=this.fetchContextForScope(e);this.connectedContexts.add(t),t.connect()}disconnectContextForScope(e){const t=this.contextsByScope.get(e);t&&(this.connectedContexts.delete(t),t.disconnect())}fetchContextForScope(e){let t=this.contextsByScope.get(e);return t||(t=new gt(this,e),this.contextsByScope.set(e,t)),t}}class Ot{constructor(e){this.scope=e}has(e){return this.data.has(this.getDataKey(e))}get(e){return this.getAll(e)[0]}getAll(e){const t=this.data.get(this.getDataKey(e))||"";return t.match(/[^\s]+/g)||[]}getAttributeName(e){return this.data.getAttributeNameForKey(this.getDataKey(e))}getDataKey(e){return`${e}-class`}get data(){return this.scope.data}}class At{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get(e){const t=this.getAttributeNameForKey(e);return this.element.getAttribute(t)}set(e,t){const n=this.getAttributeNameForKey(e);return this.element.setAttribute(n,t),this.get(e)}has(e){const t=this.getAttributeNameForKey(e);return this.element.hasAttribute(t)}delete(e){if(this.has(e)){const t=this.getAttributeNameForKey(e);return this.element.removeAttribute(t),!0}return!1}getAttributeNameForKey(e){return`data-${this.identifier}-${et(e)}`}}class xt{constructor(e){this.warnedKeysByObject=new WeakMap,this.logger=e}warn(e,t,n){let r=this.warnedKeysByObject.get(e);r||(r=new Set,this.warnedKeysByObject.set(e,r)),r.has(t)||(r.add(t),this.logger.warn(n,e))}}function kt(e,t){return`[${e}~="${t}"]`}class Ct{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(e){return null!=this.find(e)}find(...e){return e.reduce(((e,t)=>e||this.findTarget(t)||this.findLegacyTarget(t)),void 0)}findAll(...e){return e.reduce(((e,t)=>[...e,...this.findAllTargets(t),...this.findAllLegacyTargets(t)]),[])}findTarget(e){const t=this.getSelectorForTargetName(e);return this.scope.findElement(t)}findAllTargets(e){const t=this.getSelectorForTargetName(e);return this.scope.findAllElements(t)}getSelectorForTargetName(e){return kt(this.schema.targetAttributeForScope(this.identifier),e)}findLegacyTarget(e){const t=this.getLegacySelectorForTargetName(e);return this.deprecate(this.scope.findElement(t),e)}findAllLegacyTargets(e){const t=this.getLegacySelectorForTargetName(e);return this.scope.findAllElements(t).map((t=>this.deprecate(t,e)))}getLegacySelectorForTargetName(e){const t=`${this.identifier}.${e}`;return kt(this.schema.targetAttribute,t)}deprecate(e,t){if(e){const{identifier:n}=this,r=this.schema.targetAttribute,i=this.schema.targetAttributeForScope(n);this.guide.warn(e,`target:${t}`,`Please replace ${r}="${n}.${t}" with ${i}="${t}". The ${r} attribute is deprecated and will be removed in a future version of Stimulus.`)}return e}get guide(){return this.scope.guide}}class Lt{constructor(e,t,n,r){this.targets=new Ct(this),this.classes=new Ot(this),this.data=new At(this),this.containsElement=e=>e.closest(this.controllerSelector)===this.element,this.schema=e,this.element=t,this.identifier=n,this.guide=new xt(r)}findElement(e){return this.element.matches(e)?this.element:this.queryElements(e).find(this.containsElement)}findAllElements(e){return[...this.element.matches(e)?[this.element]:[],...this.queryElements(e).filter(this.containsElement)]}queryElements(e){return Array.from(this.element.querySelectorAll(e))}get controllerSelector(){return kt(this.schema.controllerAttribute,this.identifier)}}class Mt{constructor(e,t,n){this.element=e,this.schema=t,this.delegate=n,this.valueListObserver=new ht(this.element,this.controllerAttribute,this),this.scopesByIdentifierByElement=new WeakMap,this.scopeReferenceCounts=new WeakMap}start(){this.valueListObserver.start()}stop(){this.valueListObserver.stop()}get controllerAttribute(){return this.schema.controllerAttribute}parseValueForToken(e){const{element:t,content:n}=e,r=this.fetchScopesByIdentifierForElement(t);let i=r.get(n);return i||(i=this.delegate.createScopeForElementAndIdentifier(t,n),r.set(n,i)),i}elementMatchedValue(e,t){const n=(this.scopeReferenceCounts.get(t)||0)+1;this.scopeReferenceCounts.set(t,n),1==n&&this.delegate.scopeConnected(t)}elementUnmatchedValue(e,t){const n=this.scopeReferenceCounts.get(t);n&&(this.scopeReferenceCounts.set(t,n-1),1==n&&this.delegate.scopeDisconnected(t))}fetchScopesByIdentifierForElement(e){let t=this.scopesByIdentifierByElement.get(e);return t||(t=new Map,this.scopesByIdentifierByElement.set(e,t)),t}}class Dt{constructor(e){this.application=e,this.scopeObserver=new Mt(this.element,this.schema,this),this.scopesByIdentifier=new lt,this.modulesByIdentifier=new Map}get element(){return this.application.element}get schema(){return this.application.schema}get logger(){return this.application.logger}get controllerAttribute(){return this.schema.controllerAttribute}get modules(){return Array.from(this.modulesByIdentifier.values())}get contexts(){return this.modules.reduce(((e,t)=>e.concat(t.contexts)),[])}start(){this.scopeObserver.start()}stop(){this.scopeObserver.stop()}loadDefinition(e){this.unloadIdentifier(e.identifier);const t=new Et(this.application,e);this.connectModule(t)}unloadIdentifier(e){const t=this.modulesByIdentifier.get(e);t&&this.disconnectModule(t)}getContextForElementAndIdentifier(e,t){const n=this.modulesByIdentifier.get(t);if(n)return n.contexts.find((t=>t.element==e))}handleError(e,t,n){this.application.handleError(e,t,n)}createScopeForElementAndIdentifier(e,t){return new Lt(this.schema,e,t,this.logger)}scopeConnected(e){this.scopesByIdentifier.add(e.identifier,e);const t=this.modulesByIdentifier.get(e.identifier);t&&t.connectContextForScope(e)}scopeDisconnected(e){this.scopesByIdentifier.delete(e.identifier,e);const t=this.modulesByIdentifier.get(e.identifier);t&&t.disconnectContextForScope(e)}connectModule(e){this.modulesByIdentifier.set(e.identifier,e);this.scopesByIdentifier.getValuesForKey(e.identifier).forEach((t=>e.connectContextForScope(t)))}disconnectModule(e){this.modulesByIdentifier.delete(e.identifier);this.scopesByIdentifier.getValuesForKey(e.identifier).forEach((t=>e.disconnectContextForScope(t)))}}const Bt={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target",targetAttributeForScope:e=>`data-${e}-target`};class Nt{constructor(e=document.documentElement,t=Bt){this.logger=console,this.debug=!1,this.logDebugActivity=(e,t,n={})=>{this.debug&&this.logFormattedMessage(e,t,n)},this.element=e,this.schema=t,this.dispatcher=new Je(this),this.router=new Dt(this)}static start(e,t){const n=new Nt(e,t);return n.start(),n}async start(){await new Promise((e=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",(()=>e())):e()})),this.logDebugActivity("application","starting"),this.dispatcher.start(),this.router.start(),this.logDebugActivity("application","start")}stop(){this.logDebugActivity("application","stopping"),this.dispatcher.stop(),this.router.stop(),this.logDebugActivity("application","stop")}register(e,t){t.shouldLoad&&this.load({identifier:e,controllerConstructor:t})}load(e,...t){(Array.isArray(e)?e:[e,...t]).forEach((e=>this.router.loadDefinition(e)))}unload(e,...t){(Array.isArray(e)?e:[e,...t]).forEach((e=>this.router.unloadIdentifier(e)))}get controllers(){return this.router.contexts.map((e=>e.controller))}getControllerForElementAndIdentifier(e,t){const n=this.router.getContextForElementAndIdentifier(e,t);return n?n.controller:null}handleError(e,t,n){var r;this.logger.error("%s\n\n%o\n\n%o",t,e,n),null===(r=window.onerror)||void 0===r||r.call(window,t,"",0,0,e)}logFormattedMessage(e,t,n={}){n=Object.assign({application:this},n),this.logger.groupCollapsed(`${e} #${t}`),this.logger.log("details:",Object.assign({},n)),this.logger.groupEnd()}}function St([e,t]){return function(e,t){const n=`${et(e)}-value`,r=function(e){const t=function(e){const t=jt(e.type);if(t){const n=It(e.default);if(t!==n)throw new Error(`Type "${t}" must match the type of the default value. Given default value: "${e.default}" as "${n}"`);return t}}(e),n=It(e),r=jt(e),i=t||n||r;if(i)return i;throw new Error(`Unknown value type "${e}"`)}(t);return{type:r,key:n,name:Ge(n),get defaultValue(){return function(e){const t=jt(e);if(t)return Vt[t];const n=e.default;return void 0!==n?n:e}(t)},get hasCustomDefaultValue(){return void 0!==It(t)},reader:Ft[r],writer:$t[r]||$t.default}}(e,t)}function jt(e){switch(e){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function It(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}return Array.isArray(e)?"array":"[object Object]"===Object.prototype.toString.call(e)?"object":void 0}const Vt={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},Ft={array(e){const t=JSON.parse(e);if(!Array.isArray(t))throw new TypeError("Expected array");return t},boolean:e=>!("0"==e||"false"==e),number:e=>Number(e),object(e){const t=JSON.parse(e);if(null===t||"object"!=typeof t||Array.isArray(t))throw new TypeError("Expected object");return t},string:e=>e},$t={default:function(e){return`${e}`},array:_t,object:_t};function _t(e){return JSON.stringify(e)}class Pt{constructor(e){this.context=e}static get shouldLoad(){return!0}get application(){return this.context.application}get scope(){return this.context.scope}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(e,{target:t=this.element,detail:n={},prefix:r=this.identifier,bubbles:i=!0,cancelable:s=!0}={}){const o=new CustomEvent(r?`${r}:${e}`:e,{detail:n,bubbles:i,cancelable:s});return t.dispatchEvent(o),o}}Pt.blessings=[function(e){return mt(e,"classes").reduce(((e,t)=>{return Object.assign(e,{[`${n=t}Class`]:{get(){const{classes:e}=this;if(e.has(n))return e.get(n);{const t=e.getAttributeName(n);throw new Error(`Missing attribute "${t}"`)}}},[`${n}Classes`]:{get(){return this.classes.getAll(n)}},[`has${Ze(n)}Class`]:{get(){return this.classes.has(n)}}});var n}),{})},function(e){return mt(e,"targets").reduce(((e,t)=>{return Object.assign(e,{[`${n=t}Target`]:{get(){const e=this.targets.find(n);if(e)return e;throw new Error(`Missing target element "${n}" for "${this.identifier}" controller`)}},[`${n}Targets`]:{get(){return this.targets.findAll(n)}},[`has${Ze(n)}Target`]:{get(){return this.targets.has(n)}}});var n}),{})},function(e){const t=vt(e,"values"),n={valueDescriptorMap:{get(){return t.reduce(((e,t)=>{const n=St(t),r=this.data.getAttributeNameForKey(n.key);return Object.assign(e,{[r]:n})}),{})}}};return t.reduce(((e,t)=>Object.assign(e,function(e){const t=St(e),{key:n,name:r,reader:i,writer:s}=t;return{[r]:{get(){const e=this.data.get(n);return null!==e?i(e):t.defaultValue},set(e){void 0===e?this.data.delete(n):this.data.set(n,s(e))}},[`has${Ze(r)}`]:{get(){return this.data.has(n)||t.hasCustomDefaultValue}}}}(t))),n)}],Pt.targets=[],Pt.values={};(class extends Pt{initialize(){this.hide()}connect(){setTimeout((()=>{this.show()}),200),this.hasDismissAfterValue&&setTimeout((()=>{this.close()}),this.dismissAfterValue)}close(){this.hide(),setTimeout((()=>{this.element.remove()}),1100)}show(){this.element.setAttribute("style","transition: 1s; transform:translate(0, 0);")}hide(){this.element.setAttribute("style","transition: 1s; transform:translate(400px, 0);")}}).values={dismissAfter:Number};(class extends Pt{connect(){this.timeout=null,this.duration=this.data.get("duration")||1e3}save(){clearTimeout(this.timeout),this.timeout=setTimeout((()=>{this.statusTarget.textContent="Saving...",Rails.fire(this.formTarget,"submit")}),this.duration)}success(){this.setStatus("Saved!")}error(){this.setStatus("Unable to save!")}setStatus(e){this.statusTarget.textContent=e,this.timeout=setTimeout((()=>{this.statusTarget.textContent=""}),2e3)}}).targets=["form","status"];class Rt extends Pt{constructor(...e){super(...e),this._onMenuButtonKeydown=e=>{switch(e.keyCode){case 13:case 32:e.preventDefault(),this.toggle()}}}connect(){this.toggleClass=this.data.get("class")||"hidden",this.visibleClass=this.data.get("visibleClass")||null,this.invisibleClass=this.data.get("invisibleClass")||null,this.activeClass=this.data.get("activeClass")||null,this.enteringClass=this.data.get("enteringClass")||null,this.leavingClass=this.data.get("leavingClass")||null,this.hasButtonTarget&&this.buttonTarget.addEventListener("keydown",this._onMenuButtonKeydown),this.element.setAttribute("aria-haspopup","true")}disconnect(){this.hasButtonTarget&&this.buttonTarget.removeEventListener("keydown",this._onMenuButtonKeydown)}toggle(){this.openValue=!this.openValue}openValueChanged(){this.openValue?this._show():this._hide()}_show(e){setTimeout((()=>{this.menuTarget.classList.remove(this.toggleClass),this.element.setAttribute("aria-expanded","true"),this._enteringClassList[0].forEach((e=>{this.menuTarget.classList.add(e)}).bind(this)),this._activeClassList[0].forEach((e=>{this.activeTarget.classList.add(e)})),this._invisibleClassList[0].forEach((e=>this.menuTarget.classList.remove(e))),this._visibleClassList[0].forEach((e=>{this.menuTarget.classList.add(e)})),setTimeout((()=>{this._enteringClassList[0].forEach((e=>this.menuTarget.classList.remove(e)))}).bind(this),this.enterTimeout[0]),"function"==typeof e&&e()}).bind(this))}_hide(e){setTimeout((()=>{this.element.setAttribute("aria-expanded","false"),this._invisibleClassList[0].forEach((e=>this.menuTarget.classList.add(e))),this._visibleClassList[0].forEach((e=>this.menuTarget.classList.remove(e))),this._activeClassList[0].forEach((e=>this.activeTarget.classList.remove(e))),this._leavingClassList[0].forEach((e=>this.menuTarget.classList.add(e))),setTimeout((()=>{this._leavingClassList[0].forEach((e=>this.menuTarget.classList.remove(e))),"function"==typeof e&&e(),this.menuTarget.classList.add(this.toggleClass)}).bind(this),this.leaveTimeout[0])}).bind(this))}show(){this.openValue=!0}hide(e){!1===this.element.contains(e.target)&&this.openValue&&(this.openValue=!1)}get activeTarget(){return this.data.has("activeTarget")?document.querySelector(this.data.get("activeTarget")):this.element}get _activeClassList(){return this.activeClass?this.activeClass.split(",").map((e=>e.split(" "))):[[],[]]}get _visibleClassList(){return this.visibleClass?this.visibleClass.split(",").map((e=>e.split(" "))):[[],[]]}get _invisibleClassList(){return this.invisibleClass?this.invisibleClass.split(",").map((e=>e.split(" "))):[[],[]]}get _enteringClassList(){return this.enteringClass?this.enteringClass.split(",").map((e=>e.split(" "))):[[],[]]}get _leavingClassList(){return this.leavingClass?this.leavingClass.split(",").map((e=>e.split(" "))):[[],[]]}get enterTimeout(){return(this.data.get("enterTimeout")||"0,0").split(",").map((e=>parseInt(e)))}get leaveTimeout(){return(this.data.get("leaveTimeout")||"0,0").split(",").map((e=>parseInt(e)))}}Rt.targets=["menu","button"],Rt.values={open:Boolean};(class extends Pt{connect(){this.toggleClass=this.data.get("class")||"hidden",this.backgroundId=this.data.get("backgroundId")||"modal-background",this.backgroundHtml=this.data.get("backgroundHtml")||this._backgroundHTML(),this.allowBackgroundClose="true"===(this.data.get("allowBackgroundClose")||"true"),this.preventDefaultActionOpening="true"===(this.data.get("preventDefaultActionOpening")||"true"),this.preventDefaultActionClosing="true"===(this.data.get("preventDefaultActionClosing")||"true")}disconnect(){this.close()}open(e){this.preventDefaultActionOpening&&e.preventDefault(),e.target.blur&&e.target.blur(),this.lockScroll(),this.containerTarget.classList.remove(this.toggleClass),this.data.get("disable-backdrop")||(document.body.insertAdjacentHTML("beforeend",this.backgroundHtml),this.background=document.querySelector(`#${this.backgroundId}`))}close(e){e&&this.preventDefaultActionClosing&&e.preventDefault(),this.unlockScroll(),this.containerTarget.classList.add(this.toggleClass),this.background&&this.background.remove()}closeBackground(e){this.allowBackgroundClose&&e.target===this.containerTarget&&this.close(e)}closeWithKeyboard(e){27!==e.keyCode||this.containerTarget.classList.contains(this.toggleClass)||this.close(e)}_backgroundHTML(){return`<div id="${this.backgroundId}" class="fixed top-0 left-0 w-full h-full" style="background-color: rgba(0, 0, 0, 0.8); z-index: 9998;"></div>`}lockScroll(){const e=window.innerWidth-document.documentElement.clientWidth;document.body.style.paddingRight=`${e}px`,this.saveScrollPosition(),document.body.classList.add("fixed","inset-x-0","overflow-hidden"),document.body.style.top=`-${this.scrollPosition}px`}unlockScroll(){document.body.style.paddingRight=null,document.body.classList.remove("fixed","inset-x-0","overflow-hidden"),this.restoreScrollPosition(),document.body.style.top=null}saveScrollPosition(){this.scrollPosition=window.pageYOffset||document.body.scrollTop}restoreScrollPosition(){document.documentElement.scrollTop=this.scrollPosition}}).targets=["container"];(class extends Pt{connect(){this.activeTabClasses=(this.data.get("activeTab")||"active").split(" "),this.inactiveTabClasses=(this.data.get("inactiveTab")||"inactive").split(" "),this.anchor&&(this.index=this.tabTargets.findIndex((e=>e.id===this.anchor))),this.showTab()}change(e){e.preventDefault(),this.index=e.currentTarget.dataset.index?e.currentTarget.dataset.index:e.currentTarget.dataset.id?this.tabTargets.findIndex((t=>t.id==e.currentTarget.dataset.id)):this.tabTargets.indexOf(e.currentTarget),window.dispatchEvent(new CustomEvent("tsc:tab-change"))}showTab(){this.tabTargets.forEach(((e,t)=>{const n=this.panelTargets[t];t===this.index?(n.classList.remove("hidden"),e.classList.remove(...this.inactiveTabClasses),e.classList.add(...this.activeTabClasses),e.id&&(location.hash=e.id)):(n.classList.add("hidden"),e.classList.remove(...this.activeTabClasses),e.classList.add(...this.inactiveTabClasses))}))}get index(){return parseInt(this.data.get("index")||0)}set index(e){this.data.set("index",e>=0?e:0),this.showTab()}get anchor(){return document.URL.split("#").length>1?document.URL.split("#")[1]:null}}).targets=["tab","panel"];class Kt extends Pt{connect(){this.toggleClass=this.data.get("class")||"hidden"}toggle(e){e.preventDefault(),this.openValue=!this.openValue}hide(e){e.preventDefault(),this.openValue=!1}show(e){e.preventDefault(),this.openValue=!0}openValueChanged(){this.toggleClass&&this.toggleableTargets.forEach((e=>{e.classList.toggle(this.toggleClass)}))}}Kt.targets=["toggleable"],Kt.values={open:Boolean};(class extends Pt{initialize(){this.contentTarget.setAttribute("style",`transform:translate(${this.data.get("translateX")}, ${this.data.get("translateY")});`)}mouseOver(){this.contentTarget.classList.remove("hidden")}mouseOut(){this.contentTarget.classList.add("hidden")}}).targets=["content"];(class extends Rt{_show(){this.overlayTarget.classList.remove(this.toggleClass),super._show((()=>{this._activeClassList[1].forEach((e=>this.overlayTarget.classList.add(e))),this._invisibleClassList[1].forEach((e=>this.overlayTarget.classList.remove(e))),this._visibleClassList[1].forEach((e=>this.overlayTarget.classList.add(e))),setTimeout((()=>{this._enteringClassList[1].forEach((e=>this.overlayTarget.classList.remove(e)))}).bind(this),this.enterTimeout[1])}).bind(this))}_hide(){this._leavingClassList[1].forEach((e=>this.overlayTarget.classList.add(e))),super._hide((()=>{setTimeout((()=>{this._visibleClassList[1].forEach((e=>this.overlayTarget.classList.remove(e))),this._invisibleClassList[1].forEach((e=>this.overlayTarget.classList.add(e))),this._activeClassList[1].forEach((e=>this.overlayTarget.classList.remove(e))),this._leavingClassList[1].forEach((e=>this.overlayTarget.classList.remove(e))),this.overlayTarget.classList.add(this.toggleClass)}).bind(this),this.leaveTimeout[1])}).bind(this))}}).targets=["menu","overlay"];function Ut(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ht(e,t,n){return t&&Wt(e.prototype,t),n&&Wt(e,n),e}function qt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jt(e,t)}function Yt(e){return(Yt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Jt(e,t){return(Jt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xt(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Qt(e,t,n){return(Qt=Xt()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Jt(i,n.prototype),i}).apply(null,arguments)}function Gt(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Zt(e){var t=Xt();return function(){var n,r=Yt(e);if(t){var i=Yt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Gt(this,n)}}function en(e){return function(e){if(Array.isArray(e))return tn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return tn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tn(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}(class extends Pt{connect(){this.styleProperty=this.data.get("style")||"backgroundColor"}update(){this.preview=this.color}set preview(e){this.previewTarget.style[this.styleProperty]=e;const t=this._getContrastYIQ(e);"color"===this.styleProperty?this.previewTarget.style.backgroundColor=t:this.previewTarget.style.color=t}get color(){return this.colorTarget.value}_getContrastYIQ(e){return e=e.replace("#",""),(299*parseInt(e.substr(0,2),16)+587*parseInt(e.substr(2,2),16)+114*parseInt(e.substr(4,2),16))/1e3>=128?"#000":"#fff"}}).targets=["preview","color"];var nn=function(e){zt(n,e);var t=Zt(n);function n(){return Ut(this,n),t.apply(this,arguments)}return Ht(n,[{key:"connect",value:function(){this.setCount()}},{key:"checkAll",value:function(){this.setAllCheckboxes(!0),this.setCount()}},{key:"checkNone",value:function(){this.setAllCheckboxes(!1),this.setCount()}},{key:"onChecked",value:function(){this.setCount()}},{key:"setAllCheckboxes",value:function(e){this.checkboxes.forEach((function(t){var n=t;n.disabled||(n.checked=e)}))}},{key:"setCount",value:function(){if(this.hasCountTarget){var e=this.selectedCheckboxes.length;this.countTarget.innerHTML="".concat(e," selected")}}},{key:"selectedCheckboxes",get:function(){return this.checkboxes.filter((function(e){return e.checked}))}},{key:"checkboxes",get:function(){return Qt(Array,en(this.element.querySelectorAll("input[type=checkbox]")))}}]),n}(Pt);qt(nn,"targets",["count"]);var rn=function(e){zt(n,e);var t=Zt(n);function n(){return Ut(this,n),t.apply(this,arguments)}return Ht(n,[{key:"selectAll",value:function(e){var t=e.target.checked;this.allTarget.indeterminate=!1,this._setAllCheckboxes(t),this._dispatch("change",{count:this.selectedCount})}},{key:"onSelected",value:function(){this.allTarget.indeterminate=!!this._indeterminate,this._dispatch("change",{count:this.selectedCount})}},{key:"selectedCount",get:function(){return this.selected.length}},{key:"selected",get:function(){return this.selectables.filter((function(e){return e.checked}))}},{key:"selectables",get:function(){return Qt(Array,en(this.selectableTargets))}},{key:"_setAllCheckboxes",value:function(e){this.selectables.forEach((function(t){var n=t;n.disabled||(n.checked=e)}))}},{key:"_indeterminate",get:function(){return this.selected.length!==this.selectableTargets.length&&this.selected.length>0}},{key:"_dispatch",value:function(e,t){window.dispatchEvent(new CustomEvent("rmp:select:".concat(e),{bubbles:!0,detail:t}))}}]),n}(Pt);qt(rn,"targets",["all","selectable"]);var sn=function(e){zt(n,e);var t=Zt(n);function n(){return Ut(this,n),t.apply(this,arguments)}return Ht(n,[{key:"apply",value:function(){location.href="".concat(window.location.pathname,"?").concat(this.params)}},{key:"post",value:function(){var e=document.head.querySelector('meta[name="csrf-token"]').content,t="".concat(window.location.pathname,"/destroy_all?").concat(this.params);fetch(t,{method:"DELETE",redirect:"follow",headers:{"Content-Type":"application/json",credentials:"same-origin"},body:JSON.stringify({authenticity_token:e})}).then((function(e){e.redirected&&(window.location.href=e.url)}))}},{key:"params",get:function(){return this.activeFilterTargets().map((function(e){return"".concat(e.name,"=").concat(e.value)})).join("&")}},{key:"activeFilterTargets",value:function(){return this.filterTargets.filter((function(e){return"checkbox"===e.type||"radio"===e.type?e.checked:e.value.length>0}))}}]),n}(Pt);qt(sn,"targets",["filter"]);var on=function(e){zt(n,e);var t=Zt(n);function n(){return Ut(this,n),t.apply(this,arguments)}return Ht(n,[{key:"clear",value:function(){this.eventTarget.value=null,window.dispatchEvent(new CustomEvent("search-controller:submit",{}))}},{key:"submit",value:function(e){e.preventDefault(),"Enter"!==e.key&&"click"!==e.type||window.dispatchEvent(new CustomEvent("search-controller:submit",{}))}}]),n}(Pt);qt(on,"targets",["field"]);var an=function(e){zt(n,e);var t=Zt(n);function n(){return Ut(this,n),t.apply(this,arguments)}return Ht(n,[{key:"enable",value:function(){this.enableTarget.disabled=!1}},{key:"disable",value:function(){this.enableTarget.disabled=!0}},{key:"change",value:function(e){e.type.match(/rmp:select:.*/)&&(e.detail.count>0?this.enable():this.disable())}}]),n}(Pt);qt(an,"targets",["enable"]);var cn=function(e){zt(n,e);var t=Zt(n);function n(){return Ut(this,n),t.apply(this,arguments)}return Ht(n,[{key:"connect",value:function(){this.hasButtonTarget&&(this.originalText=this.buttonTarget.innerText,this.successDuration=2e3)}},{key:"copy",value:function(e){e.preventDefault();var t=this.sourceTarget.innerText,n=this.data.get("filter");n&&(t=new RegExp(n).exec(t)[0]);var r=document.createElement("textarea");r.value=t,document.body.appendChild(r),r.select(),document.execCommand("copy"),document.body.removeChild(r),this.copied()}},{key:"copied",value:function(){var e=this;if(this.hasButtonTarget){this.timeout&&clearTimeout(this.timeout);var t=this.data.get("copiedClass");console.log(t),this.buttonTarget.classList.add(t),this.timeout=setTimeout((function(){e.buttonTarget.classList.remove(t)}),this.successDuration)}}}]),n}(Pt);qt(cn,"targets",["button","source"]);var ln=Nt.start();ln.register("dropdown",Rt),ln.register("checklist",nn),ln.register("selectable",rn),ln.register("filters",sn),ln.register("search",on),ln.register("enable",an),ln.register("clipboard",cn),document.addEventListener("DOMContentLoaded",(function(){var e;!function(){var e=document.getElementById("profiled-requests-table");if(e)for(var t=e.rows,n=function(t){var n=e.rows[t],r=n.dataset.link;r&&(n.onclick=function(){window.location.href=r})},r=1;r<t.length;r++)n(r)}(),document.querySelectorAll(".trace-bar").forEach((function(e){ze(e,{trigger:"click",content:e.children[0],theme:"rmp",maxWidth:"700px",placement:"bottom",interactive:!0,onShow:function(e){e.popper.querySelector(".popover-close").addEventListener("click",(function(){e.hide()}))},onHide:function(e){e.popper.querySelector(".popover-close").removeEventListener("click",(function(){e.hide()}))}})})),(e=document.getElementById("trace-search"))&&e.addEventListener("keyup",(function(e){"Enter"===e.key&&(e.preventDefault(),document.getElementById("trace-form").submit())}))}),!1)}));
1
+ !function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";var e="top",t="bottom",n="right",r="left",i="auto",s=[e,t,n,r],o="start",a="end",c="viewport",l="popper",u=s.reduce((function(e,t){return e.concat([t+"-"+o,t+"-"+a])}),[]),h=[].concat(s,[i]).reduce((function(e,t){return e.concat([t,t+"-"+o,t+"-"+a])}),[]),d=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function p(e){return e?(e.nodeName||"").toLowerCase():null}function f(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function g(e){return e instanceof f(e).Element||e instanceof Element}function m(e){return e instanceof f(e).HTMLElement||e instanceof HTMLElement}function v(e){return"undefined"!=typeof ShadowRoot&&(e instanceof f(e).ShadowRoot||e instanceof ShadowRoot)}var b={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]||{},r=t.attributes[e]||{},i=t.elements[e];m(i)&&p(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.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 r=t.elements[e],i=t.attributes[e]||{},s=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});m(r)&&p(r)&&(Object.assign(r.style,s),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function y(e){return e.split("-")[0]}var w=Math.round;function T(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,i=1;return m(e)&&t&&(r=n.width/e.offsetWidth||1,i=n.height/e.offsetHeight||1),{width:w(n.width/r),height:w(n.height/i),top:w(n.top/i),right:w(n.right/r),bottom:w(n.bottom/i),left:w(n.left/r),x:w(n.left/r),y:w(n.top/i)}}function E(e){var t=T(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function O(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&v(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function A(e){return f(e).getComputedStyle(e)}function x(e){return["table","td","th"].indexOf(p(e))>=0}function k(e){return((g(e)?e.ownerDocument:e.document)||window.document).documentElement}function C(e){return"html"===p(e)?e:e.assignedSlot||e.parentNode||(v(e)?e.host:null)||k(e)}function L(e){return m(e)&&"fixed"!==A(e).position?e.offsetParent:null}function M(e){for(var t=f(e),n=L(e);n&&x(n)&&"static"===A(n).position;)n=L(n);return n&&("html"===p(n)||"body"===p(n)&&"static"===A(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&m(e)&&"fixed"===A(e).position)return null;for(var n=C(e);m(n)&&["html","body"].indexOf(p(n))<0;){var r=A(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function D(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}var B=Math.max,N=Math.min,S=Math.round;function j(e,t,n){return B(e,N(t,n))}function I(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function V(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var F={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $(i){var s,o=i.popper,a=i.popperRect,c=i.placement,l=i.offsets,u=i.position,h=i.gpuAcceleration,d=i.adaptive,p=i.roundOffsets,g=!0===p?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:S(S(t*r)/r)||0,y:S(S(n*r)/r)||0}}(l):"function"==typeof p?p(l):l,m=g.x,v=void 0===m?0:m,b=g.y,y=void 0===b?0:b,w=l.hasOwnProperty("x"),T=l.hasOwnProperty("y"),E=r,O=e,x=window;if(d){var C=M(o),L="clientHeight",D="clientWidth";C===f(o)&&"static"!==A(C=k(o)).position&&(L="scrollHeight",D="scrollWidth"),C=C,c===e&&(O=t,y-=C[L]-a.height,y*=h?1:-1),c===r&&(E=n,v-=C[D]-a.width,v*=h?1:-1)}var B,N=Object.assign({position:u},d&&F);return h?Object.assign({},N,((B={})[O]=T?"0":"",B[E]=w?"0":"",B.transform=(x.devicePixelRatio||1)<2?"translate("+v+"px, "+y+"px)":"translate3d("+v+"px, "+y+"px, 0)",B)):Object.assign({},N,((s={})[O]=T?y+"px":"",s[E]=w?v+"px":"",s.transform="",s))}var _={passive:!0};var P={left:"right",right:"left",bottom:"top",top:"bottom"};function R(e){return e.replace(/left|right|bottom|top/g,(function(e){return P[e]}))}var K={start:"end",end:"start"};function U(e){return e.replace(/start|end/g,(function(e){return K[e]}))}function W(e){var t=f(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function H(e){return T(k(e)).left+W(e).scrollLeft}function q(e){var t=A(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function z(e){return["html","body","#document"].indexOf(p(e))>=0?e.ownerDocument.body:m(e)&&q(e)?e:z(C(e))}function Y(e,t){var n;void 0===t&&(t=[]);var r=z(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),s=f(r),o=i?[s].concat(s.visualViewport||[],q(r)?r:[]):r,a=t.concat(o);return i?a:a.concat(Y(C(o)))}function J(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function X(e,t){return t===c?J(function(e){var t=f(e),n=k(e),r=t.visualViewport,i=n.clientWidth,s=n.clientHeight,o=0,a=0;return r&&(i=r.width,s=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=r.offsetLeft,a=r.offsetTop)),{width:i,height:s,x:o+H(e),y:a}}(e)):m(t)?function(e){var t=T(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):J(function(e){var t,n=k(e),r=W(e),i=null==(t=e.ownerDocument)?void 0:t.body,s=B(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=B(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+H(e),c=-r.scrollTop;return"rtl"===A(i||n).direction&&(a+=B(n.clientWidth,i?i.clientWidth:0)-s),{width:s,height:o,x:a,y:c}}(k(e)))}function Q(e,t,n){var r="clippingParents"===t?function(e){var t=Y(C(e)),n=["absolute","fixed"].indexOf(A(e).position)>=0&&m(e)?M(e):e;return g(n)?t.filter((function(e){return g(e)&&O(e,n)&&"body"!==p(e)})):[]}(e):[].concat(t),i=[].concat(r,[n]),s=i[0],o=i.reduce((function(t,n){var r=X(e,n);return t.top=B(r.top,t.top),t.right=N(r.right,t.right),t.bottom=N(r.bottom,t.bottom),t.left=B(r.left,t.left),t}),X(e,s));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function G(e){return e.split("-")[1]}function Z(i){var s,c=i.reference,l=i.element,u=i.placement,h=u?y(u):null,d=u?G(u):null,p=c.x+c.width/2-l.width/2,f=c.y+c.height/2-l.height/2;switch(h){case e:s={x:p,y:c.y-l.height};break;case t:s={x:p,y:c.y+c.height};break;case n:s={x:c.x+c.width,y:f};break;case r:s={x:c.x-l.width,y:f};break;default:s={x:c.x,y:c.y}}var g=h?D(h):null;if(null!=g){var m="y"===g?"height":"width";switch(d){case o:s[g]=s[g]-(c[m]/2-l[m]/2);break;case a:s[g]=s[g]+(c[m]/2-l[m]/2)}}return s}function ee(r,i){void 0===i&&(i={});var o=i,a=o.placement,u=void 0===a?r.placement:a,h=o.boundary,d=void 0===h?"clippingParents":h,p=o.rootBoundary,f=void 0===p?c:p,m=o.elementContext,v=void 0===m?l:m,b=o.altBoundary,y=void 0!==b&&b,w=o.padding,E=void 0===w?0:w,O=I("number"!=typeof E?E:V(E,s)),A=v===l?"reference":l,x=r.elements.reference,C=r.rects.popper,L=r.elements[y?A:v],M=Q(g(L)?L:L.contextElement||k(r.elements.popper),d,f),D=T(x),B=Z({reference:D,element:C,strategy:"absolute",placement:u}),N=J(Object.assign({},C,B)),S=v===l?N:D,j={top:M.top-S.top+O.top,bottom:S.bottom-M.bottom+O.bottom,left:M.left-S.left+O.left,right:S.right-M.right+O.right},F=r.modifiersData.offset;if(v===l&&F){var $=F[u];Object.keys(j).forEach((function(r){var i=[n,t].indexOf(r)>=0?1:-1,s=[e,t].indexOf(r)>=0?"y":"x";j[r]+=$[s]*i}))}return j}function te(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,c=n.flipVariations,l=n.allowedAutoPlacements,d=void 0===l?h:l,p=G(r),f=p?c?u:u.filter((function(e){return G(e)===p})):s,g=f.filter((function(e){return d.indexOf(e)>=0}));0===g.length&&(g=f);var m=g.reduce((function(t,n){return t[n]=ee(e,{placement:n,boundary:i,rootBoundary:o,padding:a})[y(n)],t}),{});return Object.keys(m).sort((function(e,t){return m[e]-m[t]}))}function ne(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 re(i){return[e,n,t,r].some((function(e){return i[e]>=0}))}function ie(e,t,n){void 0===n&&(n=!1);var r,i,s=m(t),o=m(t)&&function(e){var t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return 1!==n||1!==r}(t),a=k(t),c=T(e,o),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(s||!s&&!n)&&(("body"!==p(t)||q(a))&&(l=(r=t)!==f(r)&&m(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:W(r)),m(t)?((u=T(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=H(a))),{x:c.left+l.scrollLeft-u.x,y:c.top+l.scrollTop-u.y,width:c.width,height:c.height}}function se(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}var oe={placement:"bottom",modifiers:[],strategy:"absolute"};function ae(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function ce(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,i=t.defaultOptions,s=void 0===i?oe:i;return function(e,t,n){void 0===n&&(n=s);var i,o,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},oe,s),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],l=!1,u={state:a,setOptions:function(n){h(),a.options=Object.assign({},s,a.options,n),a.scrollParents={reference:g(e)?Y(e):e.contextElement?Y(e.contextElement):[],popper:Y(t)};var i,o,l=function(e){var t=se(e);return d.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((i=[].concat(r,a.options.modifiers),o=i.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}),{}),Object.keys(o).map((function(e){return o[e]}))));return a.orderedModifiers=l.filter((function(e){return e.enabled})),a.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"==typeof i){var s=i({state:a,name:t,instance:u,options:r}),o=function(){};c.push(s||o)}})),u.update()},forceUpdate:function(){if(!l){var e=a.elements,t=e.reference,n=e.popper;if(ae(t,n)){a.rects={reference:ie(t,M(n),"fixed"===a.options.strategy),popper:E(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(e){return a.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<a.orderedModifiers.length;r++)if(!0!==a.reset){var i=a.orderedModifiers[r],s=i.fn,o=i.options,c=void 0===o?{}:o,h=i.name;"function"==typeof s&&(a=s({state:a,options:c,name:h,instance:u})||a)}else a.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(e){u.forceUpdate(),e(a)}))},function(){return o||(o=new Promise((function(e){Promise.resolve().then((function(){o=void 0,e(i())}))}))),o}),destroy:function(){h(),l=!0}};if(!ae(e,t))return u;function h(){c.forEach((function(e){return e()})),c=[]}return u.setOptions(n).then((function(e){!l&&n.onFirstUpdate&&n.onFirstUpdate(e)})),u}}var le=ce({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,s=void 0===i||i,o=r.resize,a=void 0===o||o,c=f(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&l.forEach((function(e){e.addEventListener("scroll",n.update,_)})),a&&c.addEventListener("resize",n.update,_),function(){s&&l.forEach((function(e){e.removeEventListener("scroll",n.update,_)})),a&&c.removeEventListener("resize",n.update,_)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Z({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,s=n.adaptive,o=void 0===s||s,a=n.roundOffsets,c=void 0===a||a,l={placement:y(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,$(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,$(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},b,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var i=t.state,s=t.options,o=t.name,a=s.offset,c=void 0===a?[0,0]:a,l=h.reduce((function(t,s){return t[s]=function(t,i,s){var o=y(t),a=[r,e].indexOf(o)>=0?-1:1,c="function"==typeof s?s(Object.assign({},i,{placement:t})):s,l=c[0],u=c[1];return l=l||0,u=(u||0)*a,[r,n].indexOf(o)>=0?{x:u,y:l}:{x:l,y:u}}(s,i.rects,c),t}),{}),u=l[i.placement],d=u.x,p=u.y;null!=i.modifiersData.popperOffsets&&(i.modifiersData.popperOffsets.x+=d,i.modifiersData.popperOffsets.y+=p),i.modifiersData[o]=l}},{name:"flip",enabled:!0,phase:"main",fn:function(s){var a=s.state,c=s.options,l=s.name;if(!a.modifiersData[l]._skip){for(var u=c.mainAxis,h=void 0===u||u,d=c.altAxis,p=void 0===d||d,f=c.fallbackPlacements,g=c.padding,m=c.boundary,v=c.rootBoundary,b=c.altBoundary,w=c.flipVariations,T=void 0===w||w,E=c.allowedAutoPlacements,O=a.options.placement,A=y(O),x=f||(A===O||!T?[R(O)]:function(e){if(y(e)===i)return[];var t=R(e);return[U(e),t,U(t)]}(O)),k=[O].concat(x).reduce((function(e,t){return e.concat(y(t)===i?te(a,{placement:t,boundary:m,rootBoundary:v,padding:g,flipVariations:T,allowedAutoPlacements:E}):t)}),[]),C=a.rects.reference,L=a.rects.popper,M=new Map,D=!0,B=k[0],N=0;N<k.length;N++){var S=k[N],j=y(S),I=G(S)===o,V=[e,t].indexOf(j)>=0,F=V?"width":"height",$=ee(a,{placement:S,boundary:m,rootBoundary:v,altBoundary:b,padding:g}),_=V?I?n:r:I?t:e;C[F]>L[F]&&(_=R(_));var P=R(_),K=[];if(h&&K.push($[j]<=0),p&&K.push($[_]<=0,$[P]<=0),K.every((function(e){return e}))){B=S,D=!1;break}M.set(S,K)}if(D)for(var W=function(e){var t=k.find((function(t){var n=M.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return B=t,"break"},H=T?3:1;H>0;H--){if("break"===W(H))break}a.placement!==B&&(a.modifiersData[l]._skip=!0,a.placement=B,a.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(i){var s=i.state,a=i.options,c=i.name,l=a.mainAxis,u=void 0===l||l,h=a.altAxis,d=void 0!==h&&h,p=a.boundary,f=a.rootBoundary,g=a.altBoundary,m=a.padding,v=a.tether,b=void 0===v||v,w=a.tetherOffset,T=void 0===w?0:w,O=ee(s,{boundary:p,rootBoundary:f,padding:m,altBoundary:g}),A=y(s.placement),x=G(s.placement),k=!x,C=D(A),L="x"===C?"y":"x",S=s.modifiersData.popperOffsets,I=s.rects.reference,V=s.rects.popper,F="function"==typeof T?T(Object.assign({},s.rects,{placement:s.placement})):T,$={x:0,y:0};if(S){if(u||d){var _="y"===C?e:r,P="y"===C?t:n,R="y"===C?"height":"width",K=S[C],U=S[C]+O[_],W=S[C]-O[P],H=b?-V[R]/2:0,q=x===o?I[R]:V[R],z=x===o?-V[R]:-I[R],Y=s.elements.arrow,J=b&&Y?E(Y):{width:0,height:0},X=s.modifiersData["arrow#persistent"]?s.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Q=X[_],Z=X[P],te=j(0,I[R],J[R]),ne=k?I[R]/2-H-te-Q-F:q-te-Q-F,re=k?-I[R]/2+H+te+Z+F:z+te+Z+F,ie=s.elements.arrow&&M(s.elements.arrow),se=ie?"y"===C?ie.clientTop||0:ie.clientLeft||0:0,oe=s.modifiersData.offset?s.modifiersData.offset[s.placement][C]:0,ae=S[C]+ne-oe-se,ce=S[C]+re-oe;if(u){var le=j(b?N(U,ae):U,K,b?B(W,ce):W);S[C]=le,$[C]=le-K}if(d){var ue="x"===C?e:r,he="x"===C?t:n,de=S[L],pe=de+O[ue],fe=de-O[he],ge=j(b?N(pe,ae):pe,de,b?B(fe,ce):fe);S[L]=ge,$[L]=ge-de}}s.modifiersData[c]=$}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(i){var o,a=i.state,c=i.name,l=i.options,u=a.elements.arrow,h=a.modifiersData.popperOffsets,d=y(a.placement),p=D(d),f=[r,n].indexOf(d)>=0?"height":"width";if(u&&h){var g=function(e,t){return I("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:V(e,s))}(l.padding,a),m=E(u),v="y"===p?e:r,b="y"===p?t:n,w=a.rects.reference[f]+a.rects.reference[p]-h[p]-a.rects.popper[f],T=h[p]-a.rects.reference[p],O=M(u),A=O?"y"===p?O.clientHeight||0:O.clientWidth||0:0,x=w/2-T/2,k=g[v],C=A-m[f]-g[b],L=A/2-m[f]/2+x,B=j(k,L,C),N=p;a.modifiersData[c]=((o={})[N]=B,o.centerOffset=B-L,o)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&O(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,s=t.modifiersData.preventOverflow,o=ee(t,{elementContext:"reference"}),a=ee(t,{altBoundary:!0}),c=ne(o,r),l=ne(a,i,s),u=re(c),h=re(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":h})}}]}),ue="tippy-content",he="tippy-arrow",de="tippy-svg-arrow",pe={passive:!0,capture:!0};function fe(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function ge(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function me(e,t){return"function"==typeof e?e.apply(void 0,t):e}function ve(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function be(e){return[].concat(e)}function ye(e,t){-1===e.indexOf(t)&&e.push(t)}function we(e){return[].slice.call(e)}function Te(){return document.createElement("div")}function Ee(e){return["Element","Fragment"].some((function(t){return ge(e,t)}))}function Oe(e){return Ee(e)?[e]:function(e){return ge(e,"NodeList")}(e)?we(e):Array.isArray(e)?e:we(document.querySelectorAll(e))}function Ae(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function xe(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function ke(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}var Ce={isTouch:!1},Le=0;function Me(){Ce.isTouch||(Ce.isTouch=!0,window.performance&&document.addEventListener("mousemove",De))}function De(){var e=performance.now();e-Le<20&&(Ce.isTouch=!1,document.removeEventListener("mousemove",De)),Le=e}function Be(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var Ne="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",Se=/MSIE |Trident\//.test(Ne),je=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}),Ie=Object.keys(je);function Ve(e){var t=(e.plugins||[]).reduce((function(t,n){var r=n.name,i=n.defaultValue;return r&&(t[r]=void 0!==e[r]?e[r]:i),t}),{});return Object.assign({},e,{},t)}function Fe(e,t){var n=Object.assign({},t,{content:me(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Ve(Object.assign({},je,{plugins:t}))):Ie).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},je.aria,{},n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function $e(e,t){e.innerHTML=t}function _e(e){var t=Te();return!0===e?t.className=he:(t.className=de,Ee(e)?t.appendChild(e):$e(t,e)),t}function Pe(e,t){Ee(t.content)?($e(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?$e(e,t.content):e.textContent=t.content)}function Re(e){var t=e.firstElementChild,n=we(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(ue)})),arrow:n.find((function(e){return e.classList.contains(he)||e.classList.contains(de)})),backdrop:n.find((function(e){return e.classList.contains("tippy-backdrop")}))}}function Ke(e){var t=Te(),n=Te();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Te();function i(n,r){var i=Re(t),s=i.box,o=i.content,a=i.arrow;r.theme?s.setAttribute("data-theme",r.theme):s.removeAttribute("data-theme"),"string"==typeof r.animation?s.setAttribute("data-animation",r.animation):s.removeAttribute("data-animation"),r.inertia?s.setAttribute("data-inertia",""):s.removeAttribute("data-inertia"),s.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?s.setAttribute("role",r.role):s.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||Pe(o,e.props),r.arrow?a?n.arrow!==r.arrow&&(s.removeChild(a),s.appendChild(_e(r.arrow))):s.appendChild(_e(r.arrow)):a&&s.removeChild(a)}return r.className=ue,r.setAttribute("data-state","hidden"),Pe(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props),{popper:t,onUpdate:i}}Ke.$$tippy=!0;var Ue=1,We=[],He=[];function qe(e,t){var n,r,i,s,o,a,c,l,u,h=Fe(e,Object.assign({},je,{},Ve((n=t,Object.keys(n).reduce((function(e,t){return void 0!==n[t]&&(e[t]=n[t]),e}),{}))))),d=!1,p=!1,f=!1,g=!1,m=[],v=ve(Y,h.interactiveDebounce),b=Ue++,y=(u=h.plugins).filter((function(e,t){return u.indexOf(e)===t})),w={id:b,reference:e,popper:Te(),popperInstance:null,props:h,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(s)},setProps:function(t){if(w.state.isDestroyed)return;j("onBeforeUpdate",[w,t]),q();var n=w.props,r=Fe(e,Object.assign({},w.props,{},t,{ignoreAttributes:!0}));w.props=r,H(),n.interactiveDebounce!==r.interactiveDebounce&&(F(),v=ve(Y,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?be(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");V(),S(),O&&O(n,r);w.popperInstance&&(G(),ee().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));j("onAfterUpdate",[w,t])},setContent:function(e){w.setProps({content:e})},show:function(){var e=w.state.isVisible,t=w.state.isDestroyed,n=!w.state.isEnabled,r=Ce.isTouch&&!w.props.touch,i=fe(w.props.duration,0,je.duration);if(e||t||n||r)return;if(M().hasAttribute("disabled"))return;if(j("onShow",[w],!1),!1===w.props.onShow(w))return;w.state.isVisible=!0,L()&&(E.style.visibility="visible");S(),R(),w.state.isMounted||(E.style.transition="none");if(L()){var s=B(),o=s.box,a=s.content;Ae([o,a],0)}c=function(){var e;if(w.state.isVisible&&!g){if(g=!0,E.offsetHeight,E.style.transition=w.props.moveTransition,L()&&w.props.animation){var t=B(),n=t.box,r=t.content;Ae([n,r],i),xe([n,r],"visible")}I(),V(),ye(He,w),null==(e=w.popperInstance)||e.forceUpdate(),w.state.isMounted=!0,j("onMount",[w]),w.props.animation&&L()&&function(e,t){U(e,t)}(i,(function(){w.state.isShown=!0,j("onShown",[w])}))}},function(){var e,t=w.props.appendTo,n=M();e=w.props.interactive&&t===je.appendTo||"parent"===t?n.parentNode:me(t,[n]);e.contains(E)||e.appendChild(E);G()}()},hide:function(){var e=!w.state.isVisible,t=w.state.isDestroyed,n=!w.state.isEnabled,r=fe(w.props.duration,1,je.duration);if(e||t||n)return;if(j("onHide",[w],!1),!1===w.props.onHide(w))return;w.state.isVisible=!1,w.state.isShown=!1,g=!1,d=!1,L()&&(E.style.visibility="hidden");if(F(),K(),S(),L()){var i=B(),s=i.box,o=i.content;w.props.animation&&(Ae([s,o],r),xe([s,o],"hidden"))}I(),V(),w.props.animation?L()&&function(e,t){U(e,(function(){!w.state.isVisible&&E.parentNode&&E.parentNode.contains(E)&&t()}))}(r,w.unmount):w.unmount()},hideWithInteractivity:function(e){D().addEventListener("mousemove",v),ye(We,v),v(e)},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;Z(),ee().forEach((function(e){e._tippy.unmount()})),E.parentNode&&E.parentNode.removeChild(E);He=He.filter((function(e){return e!==w})),w.state.isMounted=!1,j("onHidden",[w])},destroy:function(){if(w.state.isDestroyed)return;w.clearDelayTimeouts(),w.unmount(),q(),delete e._tippy,w.state.isDestroyed=!0,j("onDestroy",[w])}};if(!h.render)return w;var T=h.render(w),E=T.popper,O=T.onUpdate;E.setAttribute("data-tippy-root",""),E.id="tippy-"+w.id,w.popper=E,e._tippy=w,E._tippy=w;var A=y.map((function(e){return e.fn(w)})),x=e.hasAttribute("aria-expanded");return H(),V(),S(),j("onCreate",[w]),h.showOnCreate&&te(),E.addEventListener("mouseenter",(function(){w.props.interactive&&w.state.isVisible&&w.clearDelayTimeouts()})),E.addEventListener("mouseleave",(function(e){w.props.interactive&&w.props.trigger.indexOf("mouseenter")>=0&&(D().addEventListener("mousemove",v),v(e))})),w;function k(){var e=w.props.touch;return Array.isArray(e)?e:[e,0]}function C(){return"hold"===k()[0]}function L(){var e;return!!(null==(e=w.props.render)?void 0:e.$$tippy)}function M(){return l||e}function D(){var e,t,n=M().parentNode;return n?(null==(t=be(n)[0])||null==(e=t.ownerDocument)?void 0:e.body)?t.ownerDocument:document:document}function B(){return Re(E)}function N(e){return w.state.isMounted&&!w.state.isVisible||Ce.isTouch||o&&"focus"===o.type?0:fe(w.props.delay,e?0:1,je.delay)}function S(){E.style.pointerEvents=w.props.interactive&&w.state.isVisible?"":"none",E.style.zIndex=""+w.props.zIndex}function j(e,t,n){var r;(void 0===n&&(n=!0),A.forEach((function(n){n[e]&&n[e].apply(void 0,t)})),n)&&(r=w.props)[e].apply(r,t)}function I(){var t=w.props.aria;if(t.content){var n="aria-"+t.content,r=E.id;be(w.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(w.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var i=t&&t.replace(r,"").trim();i?e.setAttribute(n,i):e.removeAttribute(n)}}))}}function V(){!x&&w.props.aria.expanded&&be(w.props.triggerTarget||e).forEach((function(e){w.props.interactive?e.setAttribute("aria-expanded",w.state.isVisible&&e===M()?"true":"false"):e.removeAttribute("aria-expanded")}))}function F(){D().removeEventListener("mousemove",v),We=We.filter((function(e){return e!==v}))}function $(e){if(!(Ce.isTouch&&(f||"mousedown"===e.type)||w.props.interactive&&E.contains(e.target))){if(M().contains(e.target)){if(Ce.isTouch)return;if(w.state.isVisible&&w.props.trigger.indexOf("click")>=0)return}else j("onClickOutside",[w,e]);!0===w.props.hideOnClick&&(w.clearDelayTimeouts(),w.hide(),p=!0,setTimeout((function(){p=!1})),w.state.isMounted||K())}}function _(){f=!0}function P(){f=!1}function R(){var e=D();e.addEventListener("mousedown",$,!0),e.addEventListener("touchend",$,pe),e.addEventListener("touchstart",P,pe),e.addEventListener("touchmove",_,pe)}function K(){var e=D();e.removeEventListener("mousedown",$,!0),e.removeEventListener("touchend",$,pe),e.removeEventListener("touchstart",P,pe),e.removeEventListener("touchmove",_,pe)}function U(e,t){var n=B().box;function r(e){e.target===n&&(ke(n,"remove",r),t())}if(0===e)return t();ke(n,"remove",a),ke(n,"add",r),a=r}function W(t,n,r){void 0===r&&(r=!1),be(w.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),m.push({node:e,eventType:t,handler:n,options:r})}))}function H(){var e;C()&&(W("touchstart",z,{passive:!0}),W("touchend",J,{passive:!0})),(e=w.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(W(e,z),e){case"mouseenter":W("mouseleave",J);break;case"focus":W(Se?"focusout":"blur",X);break;case"focusin":W("focusout",X)}}))}function q(){m.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)})),m=[]}function z(e){var t,n=!1;if(w.state.isEnabled&&!Q(e)&&!p){var r="focus"===(null==(t=o)?void 0:t.type);o=e,l=e.currentTarget,V(),!w.state.isVisible&&ge(e,"MouseEvent")&&We.forEach((function(t){return t(e)})),"click"===e.type&&(w.props.trigger.indexOf("mouseenter")<0||d)&&!1!==w.props.hideOnClick&&w.state.isVisible?n=!0:te(e),"click"===e.type&&(d=!n),n&&!r&&ne(e)}}function Y(e){var t=e.target,n=M().contains(t)||E.contains(t);"mousemove"===e.type&&n||function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,i=e.popperState,s=e.props.interactiveBorder,o=i.placement.split("-")[0],a=i.modifiersData.offset;if(!a)return!0;var c="bottom"===o?a.top.y:0,l="top"===o?a.bottom.y:0,u="right"===o?a.left.x:0,h="left"===o?a.right.x:0,d=t.top-r+c>s,p=r-t.bottom-l>s,f=t.left-n+u>s,g=n-t.right-h>s;return d||p||f||g}))}(ee().concat(E).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:h}:null})).filter(Boolean),e)&&(F(),ne(e))}function J(e){Q(e)||w.props.trigger.indexOf("click")>=0&&d||(w.props.interactive?w.hideWithInteractivity(e):ne(e))}function X(e){w.props.trigger.indexOf("focusin")<0&&e.target!==M()||w.props.interactive&&e.relatedTarget&&E.contains(e.relatedTarget)||ne(e)}function Q(e){return!!Ce.isTouch&&C()!==e.type.indexOf("touch")>=0}function G(){Z();var t=w.props,n=t.popperOptions,r=t.placement,i=t.offset,s=t.getReferenceClientRect,o=t.moveTransition,a=L()?Re(E).arrow:null,l=s?{getBoundingClientRect:s,contextElement:s.contextElement||M()}:e,u=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!o}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(L()){var n=B().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];L()&&a&&u.push({name:"arrow",options:{element:a,padding:3}}),u.push.apply(u,(null==n?void 0:n.modifiers)||[]),w.popperInstance=le(l,E,Object.assign({},n,{placement:r,onFirstUpdate:c,modifiers:u}))}function Z(){w.popperInstance&&(w.popperInstance.destroy(),w.popperInstance=null)}function ee(){return we(E.querySelectorAll("[data-tippy-root]"))}function te(e){w.clearDelayTimeouts(),e&&j("onTrigger",[w,e]),R();var t=N(!0),n=k(),i=n[0],s=n[1];Ce.isTouch&&"hold"===i&&s&&(t=s),t?r=setTimeout((function(){w.show()}),t):w.show()}function ne(e){if(w.clearDelayTimeouts(),j("onUntrigger",[w,e]),w.state.isVisible){if(!(w.props.trigger.indexOf("mouseenter")>=0&&w.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=N(!1);t?i=setTimeout((function(){w.state.isVisible&&w.hide()}),t):s=requestAnimationFrame((function(){w.hide()}))}}else K()}}function ze(e,t){void 0===t&&(t={});var n=je.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",Me,pe),window.addEventListener("blur",Be);var r=Object.assign({},t,{plugins:n}),i=Oe(e).reduce((function(e,t){var n=t&&qe(t,r);return n&&e.push(n),e}),[]);return Ee(e)?i[0]:i}ze.defaultProps=je,ze.setDefaultProps=function(e){Object.keys(e).forEach((function(t){je[t]=e[t]}))},ze.currentInput=Ce,Object.assign({},b,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),ze.setDefaultProps({render:Ke});class Ye{constructor(e,t,n){this.eventTarget=e,this.eventName=t,this.eventOptions=n,this.unorderedBindings=new Set}connect(){this.eventTarget.addEventListener(this.eventName,this,this.eventOptions)}disconnect(){this.eventTarget.removeEventListener(this.eventName,this,this.eventOptions)}bindingConnected(e){this.unorderedBindings.add(e)}bindingDisconnected(e){this.unorderedBindings.delete(e)}handleEvent(e){const t=function(e){if("immediatePropagationStopped"in e)return e;{const{stopImmediatePropagation:t}=e;return Object.assign(e,{immediatePropagationStopped:!1,stopImmediatePropagation(){this.immediatePropagationStopped=!0,t.call(this)}})}}(e);for(const e of this.bindings){if(t.immediatePropagationStopped)break;e.handleEvent(t)}}get bindings(){return Array.from(this.unorderedBindings).sort(((e,t)=>{const n=e.index,r=t.index;return n<r?-1:n>r?1:0}))}}class Je{constructor(e){this.application=e,this.eventListenerMaps=new Map,this.started=!1}start(){this.started||(this.started=!0,this.eventListeners.forEach((e=>e.connect())))}stop(){this.started&&(this.started=!1,this.eventListeners.forEach((e=>e.disconnect())))}get eventListeners(){return Array.from(this.eventListenerMaps.values()).reduce(((e,t)=>e.concat(Array.from(t.values()))),[])}bindingConnected(e){this.fetchEventListenerForBinding(e).bindingConnected(e)}bindingDisconnected(e){this.fetchEventListenerForBinding(e).bindingDisconnected(e)}handleError(e,t,n={}){this.application.handleError(e,`Error ${t}`,n)}fetchEventListenerForBinding(e){const{eventTarget:t,eventName:n,eventOptions:r}=e;return this.fetchEventListener(t,n,r)}fetchEventListener(e,t,n){const r=this.fetchEventListenerMapForEventTarget(e),i=this.cacheKey(t,n);let s=r.get(i);return s||(s=this.createEventListener(e,t,n),r.set(i,s)),s}createEventListener(e,t,n){const r=new Ye(e,t,n);return this.started&&r.connect(),r}fetchEventListenerMapForEventTarget(e){let t=this.eventListenerMaps.get(e);return t||(t=new Map,this.eventListenerMaps.set(e,t)),t}cacheKey(e,t){const n=[e];return Object.keys(t).sort().forEach((e=>{n.push(`${t[e]?"":"!"}${e}`)})),n.join(":")}}const Xe=/^((.+?)(@(window|document))?->)?(.+?)(#([^:]+?))(:(.+))?$/;function Qe(e){return"window"==e?window:"document"==e?document:void 0}function Ge(e){return e.replace(/(?:[_-])([a-z0-9])/g,((e,t)=>t.toUpperCase()))}function Ze(e){return e.charAt(0).toUpperCase()+e.slice(1)}function et(e){return e.replace(/([A-Z])/g,((e,t)=>`-${t.toLowerCase()}`))}const tt={a:e=>"click",button:e=>"click",form:e=>"submit",details:e=>"toggle",input:e=>"submit"==e.getAttribute("type")?"click":"input",select:e=>"change",textarea:e=>"input"};function nt(e){throw new Error(e)}function rt(e){try{return JSON.parse(e)}catch(t){return e}}class it{constructor(e,t){this.context=e,this.action=t}get index(){return this.action.index}get eventTarget(){return this.action.eventTarget}get eventOptions(){return this.action.eventOptions}get identifier(){return this.context.identifier}handleEvent(e){this.willBeInvokedByEvent(e)&&this.invokeWithEvent(e)}get eventName(){return this.action.eventName}get method(){const e=this.controller[this.methodName];if("function"==typeof e)return e;throw new Error(`Action "${this.action}" references undefined method "${this.methodName}"`)}invokeWithEvent(e){const{target:t,currentTarget:n}=e;try{const{params:r}=this.action,i=Object.assign(e,{params:r});this.method.call(this.controller,i),this.context.logDebugActivity(this.methodName,{event:e,target:t,currentTarget:n,action:this.methodName})}catch(t){const{identifier:n,controller:r,element:i,index:s}=this,o={identifier:n,controller:r,element:i,index:s,event:e};this.context.handleError(t,`invoking action "${this.action}"`,o)}}willBeInvokedByEvent(e){const t=e.target;return this.element===t||(t instanceof Element&&this.element.contains(t)?this.scope.containsElement(t):this.scope.containsElement(this.action.element))}get controller(){return this.context.controller}get methodName(){return this.action.methodName}get element(){return this.scope.element}get scope(){return this.context.scope}}class st{constructor(e,t){this.mutationObserverInit={attributes:!0,childList:!0,subtree:!0},this.element=e,this.started=!1,this.delegate=t,this.elements=new Set,this.mutationObserver=new MutationObserver((e=>this.processMutations(e)))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,this.mutationObserverInit),this.refresh())}pause(e){this.started&&(this.mutationObserver.disconnect(),this.started=!1),e(),this.started||(this.mutationObserver.observe(this.element,this.mutationObserverInit),this.started=!0)}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started){const e=new Set(this.matchElementsInTree());for(const t of Array.from(this.elements))e.has(t)||this.removeElement(t);for(const t of Array.from(e))this.addElement(t)}}processMutations(e){if(this.started)for(const t of e)this.processMutation(t)}processMutation(e){"attributes"==e.type?this.processAttributeChange(e.target,e.attributeName):"childList"==e.type&&(this.processRemovedNodes(e.removedNodes),this.processAddedNodes(e.addedNodes))}processAttributeChange(e,t){const n=e;this.elements.has(n)?this.delegate.elementAttributeChanged&&this.matchElement(n)?this.delegate.elementAttributeChanged(n,t):this.removeElement(n):this.matchElement(n)&&this.addElement(n)}processRemovedNodes(e){for(const t of Array.from(e)){const e=this.elementFromNode(t);e&&this.processTree(e,this.removeElement)}}processAddedNodes(e){for(const t of Array.from(e)){const e=this.elementFromNode(t);e&&this.elementIsActive(e)&&this.processTree(e,this.addElement)}}matchElement(e){return this.delegate.matchElement(e)}matchElementsInTree(e=this.element){return this.delegate.matchElementsInTree(e)}processTree(e,t){for(const n of this.matchElementsInTree(e))t.call(this,n)}elementFromNode(e){if(e.nodeType==Node.ELEMENT_NODE)return e}elementIsActive(e){return e.isConnected==this.element.isConnected&&this.element.contains(e)}addElement(e){this.elements.has(e)||this.elementIsActive(e)&&(this.elements.add(e),this.delegate.elementMatched&&this.delegate.elementMatched(e))}removeElement(e){this.elements.has(e)&&(this.elements.delete(e),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(e))}}class ot{constructor(e,t,n){this.attributeName=t,this.delegate=n,this.elementObserver=new st(e,this)}get element(){return this.elementObserver.element}get selector(){return`[${this.attributeName}]`}start(){this.elementObserver.start()}pause(e){this.elementObserver.pause(e)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get started(){return this.elementObserver.started}matchElement(e){return e.hasAttribute(this.attributeName)}matchElementsInTree(e){const t=this.matchElement(e)?[e]:[],n=Array.from(e.querySelectorAll(this.selector));return t.concat(n)}elementMatched(e){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(e,this.attributeName)}elementUnmatched(e){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(e,this.attributeName)}elementAttributeChanged(e,t){this.delegate.elementAttributeValueChanged&&this.attributeName==t&&this.delegate.elementAttributeValueChanged(e,t)}}class at{constructor(e,t){this.element=e,this.delegate=t,this.started=!1,this.stringMap=new Map,this.mutationObserver=new MutationObserver((e=>this.processMutations(e)))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,attributeOldValue:!0}),this.refresh())}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started)for(const e of this.knownAttributeNames)this.refreshAttribute(e,null)}processMutations(e){if(this.started)for(const t of e)this.processMutation(t)}processMutation(e){const t=e.attributeName;t&&this.refreshAttribute(t,e.oldValue)}refreshAttribute(e,t){const n=this.delegate.getStringMapKeyForAttribute(e);if(null!=n){this.stringMap.has(e)||this.stringMapKeyAdded(n,e);const r=this.element.getAttribute(e);if(this.stringMap.get(e)!=r&&this.stringMapValueChanged(r,n,t),null==r){const t=this.stringMap.get(e);this.stringMap.delete(e),t&&this.stringMapKeyRemoved(n,e,t)}else this.stringMap.set(e,r)}}stringMapKeyAdded(e,t){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(e,t)}stringMapValueChanged(e,t,n){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(e,t,n)}stringMapKeyRemoved(e,t,n){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(e,t,n)}get knownAttributeNames(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))}get currentAttributeNames(){return Array.from(this.element.attributes).map((e=>e.name))}get recordedAttributeNames(){return Array.from(this.stringMap.keys())}}function ct(e,t){let n=e.get(t);return n||(n=new Set,e.set(t,n)),n}class lt{constructor(){this.valuesByKey=new Map}get keys(){return Array.from(this.valuesByKey.keys())}get values(){return Array.from(this.valuesByKey.values()).reduce(((e,t)=>e.concat(Array.from(t))),[])}get size(){return Array.from(this.valuesByKey.values()).reduce(((e,t)=>e+t.size),0)}add(e,t){!function(e,t,n){ct(e,t).add(n)}(this.valuesByKey,e,t)}delete(e,t){!function(e,t,n){ct(e,t).delete(n),function(e,t){const n=e.get(t);null!=n&&0==n.size&&e.delete(t)}(e,t)}(this.valuesByKey,e,t)}has(e,t){const n=this.valuesByKey.get(e);return null!=n&&n.has(t)}hasKey(e){return this.valuesByKey.has(e)}hasValue(e){return Array.from(this.valuesByKey.values()).some((t=>t.has(e)))}getValuesForKey(e){const t=this.valuesByKey.get(e);return t?Array.from(t):[]}getKeysForValue(e){return Array.from(this.valuesByKey).filter((([t,n])=>n.has(e))).map((([e,t])=>e))}}class ut{constructor(e,t,n){this.attributeObserver=new ot(e,t,this),this.delegate=n,this.tokensByElement=new lt}get started(){return this.attributeObserver.started}start(){this.attributeObserver.start()}pause(e){this.attributeObserver.pause(e)}stop(){this.attributeObserver.stop()}refresh(){this.attributeObserver.refresh()}get element(){return this.attributeObserver.element}get attributeName(){return this.attributeObserver.attributeName}elementMatchedAttribute(e){this.tokensMatched(this.readTokensForElement(e))}elementAttributeValueChanged(e){const[t,n]=this.refreshTokensForElement(e);this.tokensUnmatched(t),this.tokensMatched(n)}elementUnmatchedAttribute(e){this.tokensUnmatched(this.tokensByElement.getValuesForKey(e))}tokensMatched(e){e.forEach((e=>this.tokenMatched(e)))}tokensUnmatched(e){e.forEach((e=>this.tokenUnmatched(e)))}tokenMatched(e){this.delegate.tokenMatched(e),this.tokensByElement.add(e.element,e)}tokenUnmatched(e){this.delegate.tokenUnmatched(e),this.tokensByElement.delete(e.element,e)}refreshTokensForElement(e){const t=this.tokensByElement.getValuesForKey(e),n=this.readTokensForElement(e),r=function(e,t){const n=Math.max(e.length,t.length);return Array.from({length:n},((n,r)=>[e[r],t[r]]))}(t,n).findIndex((([e,t])=>!function(e,t){return e&&t&&e.index==t.index&&e.content==t.content}(e,t)));return-1==r?[[],[]]:[t.slice(r),n.slice(r)]}readTokensForElement(e){const t=this.attributeName;return function(e,t,n){return e.trim().split(/\s+/).filter((e=>e.length)).map(((e,r)=>({element:t,attributeName:n,content:e,index:r})))}(e.getAttribute(t)||"",e,t)}}class ht{constructor(e,t,n){this.tokenListObserver=new ut(e,t,this),this.delegate=n,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}get started(){return this.tokenListObserver.started}start(){this.tokenListObserver.start()}stop(){this.tokenListObserver.stop()}refresh(){this.tokenListObserver.refresh()}get element(){return this.tokenListObserver.element}get attributeName(){return this.tokenListObserver.attributeName}tokenMatched(e){const{element:t}=e,{value:n}=this.fetchParseResultForToken(e);n&&(this.fetchValuesByTokenForElement(t).set(e,n),this.delegate.elementMatchedValue(t,n))}tokenUnmatched(e){const{element:t}=e,{value:n}=this.fetchParseResultForToken(e);n&&(this.fetchValuesByTokenForElement(t).delete(e),this.delegate.elementUnmatchedValue(t,n))}fetchParseResultForToken(e){let t=this.parseResultsByToken.get(e);return t||(t=this.parseToken(e),this.parseResultsByToken.set(e,t)),t}fetchValuesByTokenForElement(e){let t=this.valuesByTokenByElement.get(e);return t||(t=new Map,this.valuesByTokenByElement.set(e,t)),t}parseToken(e){try{return{value:this.delegate.parseValueForToken(e)}}catch(e){return{error:e}}}}class dt{constructor(e,t){this.context=e,this.delegate=t,this.bindingsByAction=new Map}start(){this.valueListObserver||(this.valueListObserver=new ht(this.element,this.actionAttribute,this),this.valueListObserver.start())}stop(){this.valueListObserver&&(this.valueListObserver.stop(),delete this.valueListObserver,this.disconnectAllActions())}get element(){return this.context.element}get identifier(){return this.context.identifier}get actionAttribute(){return this.schema.actionAttribute}get schema(){return this.context.schema}get bindings(){return Array.from(this.bindingsByAction.values())}connectAction(e){const t=new it(this.context,e);this.bindingsByAction.set(e,t),this.delegate.bindingConnected(t)}disconnectAction(e){const t=this.bindingsByAction.get(e);t&&(this.bindingsByAction.delete(e),this.delegate.bindingDisconnected(t))}disconnectAllActions(){this.bindings.forEach((e=>this.delegate.bindingDisconnected(e))),this.bindingsByAction.clear()}parseValueForToken(e){const t=class{constructor(e,t,n){this.element=e,this.index=t,this.eventTarget=n.eventTarget||e,this.eventName=n.eventName||function(e){const t=e.tagName.toLowerCase();if(t in tt)return tt[t](e)}(e)||nt("missing event name"),this.eventOptions=n.eventOptions||{},this.identifier=n.identifier||nt("missing identifier"),this.methodName=n.methodName||nt("missing method name")}static forToken(e){return new this(e.element,e.index,function(e){const t=e.trim().match(Xe)||[];return{eventTarget:Qe(t[4]),eventName:t[2],eventOptions:t[9]?(n=t[9],n.split(":").reduce(((e,t)=>Object.assign(e,{[t.replace(/^!/,"")]:!/^!/.test(t)})),{})):{},identifier:t[5],methodName:t[7]};var n}(e.content))}toString(){const e=this.eventTargetName?`@${this.eventTargetName}`:"";return`${this.eventName}${e}->${this.identifier}#${this.methodName}`}get params(){return this.eventTarget instanceof Element?this.getParamsFromEventTargetAttributes(this.eventTarget):{}}getParamsFromEventTargetAttributes(e){const t={},n=new RegExp(`^data-${this.identifier}-(.+)-param$`);return Array.from(e.attributes).forEach((({name:e,value:r})=>{const i=e.match(n),s=i&&i[1];s&&Object.assign(t,{[Ge(s)]:rt(r)})})),t}get eventTargetName(){return(e=this.eventTarget)==window?"window":e==document?"document":void 0;var e}}.forToken(e);if(t.identifier==this.identifier)return t}elementMatchedValue(e,t){this.connectAction(t)}elementUnmatchedValue(e,t){this.disconnectAction(t)}}class pt{constructor(e,t){this.context=e,this.receiver=t,this.stringMapObserver=new at(this.element,this),this.valueDescriptorMap=this.controller.valueDescriptorMap,this.invokeChangedCallbacksForDefaultValues()}start(){this.stringMapObserver.start()}stop(){this.stringMapObserver.stop()}get element(){return this.context.element}get controller(){return this.context.controller}getStringMapKeyForAttribute(e){if(e in this.valueDescriptorMap)return this.valueDescriptorMap[e].name}stringMapKeyAdded(e,t){const n=this.valueDescriptorMap[t];this.hasValue(e)||this.invokeChangedCallback(e,n.writer(this.receiver[e]),n.writer(n.defaultValue))}stringMapValueChanged(e,t,n){const r=this.valueDescriptorNameMap[t];null!==e&&(null===n&&(n=r.writer(r.defaultValue)),this.invokeChangedCallback(t,e,n))}stringMapKeyRemoved(e,t,n){const r=this.valueDescriptorNameMap[e];this.hasValue(e)?this.invokeChangedCallback(e,r.writer(this.receiver[e]),n):this.invokeChangedCallback(e,r.writer(r.defaultValue),n)}invokeChangedCallbacksForDefaultValues(){for(const{key:e,name:t,defaultValue:n,writer:r}of this.valueDescriptors)null==n||this.controller.data.has(e)||this.invokeChangedCallback(t,r(n),void 0)}invokeChangedCallback(e,t,n){const r=`${e}Changed`,i=this.receiver[r];if("function"==typeof i){const r=this.valueDescriptorNameMap[e],s=r.reader(t);let o=n;n&&(o=r.reader(n)),i.call(this.receiver,s,o)}}get valueDescriptors(){const{valueDescriptorMap:e}=this;return Object.keys(e).map((t=>e[t]))}get valueDescriptorNameMap(){const e={};return Object.keys(this.valueDescriptorMap).forEach((t=>{const n=this.valueDescriptorMap[t];e[n.name]=n})),e}hasValue(e){const t=`has${Ze(this.valueDescriptorNameMap[e].name)}`;return this.receiver[t]}}class ft{constructor(e,t){this.context=e,this.delegate=t,this.targetsByName=new lt}start(){this.tokenListObserver||(this.tokenListObserver=new ut(this.element,this.attributeName,this),this.tokenListObserver.start())}stop(){this.tokenListObserver&&(this.disconnectAllTargets(),this.tokenListObserver.stop(),delete this.tokenListObserver)}tokenMatched({element:e,content:t}){this.scope.containsElement(e)&&this.connectTarget(e,t)}tokenUnmatched({element:e,content:t}){this.disconnectTarget(e,t)}connectTarget(e,t){var n;this.targetsByName.has(t,e)||(this.targetsByName.add(t,e),null===(n=this.tokenListObserver)||void 0===n||n.pause((()=>this.delegate.targetConnected(e,t))))}disconnectTarget(e,t){var n;this.targetsByName.has(t,e)&&(this.targetsByName.delete(t,e),null===(n=this.tokenListObserver)||void 0===n||n.pause((()=>this.delegate.targetDisconnected(e,t))))}disconnectAllTargets(){for(const e of this.targetsByName.keys)for(const t of this.targetsByName.getValuesForKey(e))this.disconnectTarget(t,e)}get attributeName(){return`data-${this.context.identifier}-target`}get element(){return this.context.element}get scope(){return this.context.scope}}class gt{constructor(e,t){this.logDebugActivity=(e,t={})=>{const{identifier:n,controller:r,element:i}=this;t=Object.assign({identifier:n,controller:r,element:i},t),this.application.logDebugActivity(this.identifier,e,t)},this.module=e,this.scope=t,this.controller=new e.controllerConstructor(this),this.bindingObserver=new dt(this,this.dispatcher),this.valueObserver=new pt(this,this.controller),this.targetObserver=new ft(this,this);try{this.controller.initialize(),this.logDebugActivity("initialize")}catch(e){this.handleError(e,"initializing controller")}}connect(){this.bindingObserver.start(),this.valueObserver.start(),this.targetObserver.start();try{this.controller.connect(),this.logDebugActivity("connect")}catch(e){this.handleError(e,"connecting controller")}}disconnect(){try{this.controller.disconnect(),this.logDebugActivity("disconnect")}catch(e){this.handleError(e,"disconnecting controller")}this.targetObserver.stop(),this.valueObserver.stop(),this.bindingObserver.stop()}get application(){return this.module.application}get identifier(){return this.module.identifier}get schema(){return this.application.schema}get dispatcher(){return this.application.dispatcher}get element(){return this.scope.element}get parentElement(){return this.element.parentElement}handleError(e,t,n={}){const{identifier:r,controller:i,element:s}=this;n=Object.assign({identifier:r,controller:i,element:s},n),this.application.handleError(e,`Error ${t}`,n)}targetConnected(e,t){this.invokeControllerMethod(`${t}TargetConnected`,e)}targetDisconnected(e,t){this.invokeControllerMethod(`${t}TargetDisconnected`,e)}invokeControllerMethod(e,...t){const n=this.controller;"function"==typeof n[e]&&n[e](...t)}}function mt(e,t){const n=bt(e);return Array.from(n.reduce(((e,n)=>(function(e,t){const n=e[t];return Array.isArray(n)?n:[]}(n,t).forEach((t=>e.add(t))),e)),new Set))}function vt(e,t){return bt(e).reduce(((e,n)=>(e.push(...function(e,t){const n=e[t];return n?Object.keys(n).map((e=>[e,n[e]])):[]}(n,t)),e)),[])}function bt(e){const t=[];for(;e;)t.push(e),e=Object.getPrototypeOf(e);return t.reverse()}function yt(e){return function(e,t){const n=Tt(e),r=function(e,t){return wt(t).reduce(((n,r)=>{const i=function(e,t,n){const r=Object.getOwnPropertyDescriptor(e,n);if(!r||!("value"in r)){const e=Object.getOwnPropertyDescriptor(t,n).value;return r&&(e.get=r.get||e.get,e.set=r.set||e.set),e}}(e,t,r);return i&&Object.assign(n,{[r]:i}),n}),{})}(e.prototype,t);return Object.defineProperties(n.prototype,r),n}(e,function(e){return mt(e,"blessings").reduce(((t,n)=>{const r=n(e);for(const e in r){const n=t[e]||{};t[e]=Object.assign(n,r[e])}return t}),{})}(e))}const wt="function"==typeof Object.getOwnPropertySymbols?e=>[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)]:Object.getOwnPropertyNames,Tt=(()=>{function e(e){function t(){return Reflect.construct(e,arguments,new.target)}return t.prototype=Object.create(e.prototype,{constructor:{value:t}}),Reflect.setPrototypeOf(t,e),t}try{return function(){const t=e((function(){this.a.call(this)}));t.prototype.a=function(){},new t}(),e}catch(e){return e=>class extends e{}}})();class Et{constructor(e,t){this.application=e,this.definition=function(e){return{identifier:e.identifier,controllerConstructor:yt(e.controllerConstructor)}}(t),this.contextsByScope=new WeakMap,this.connectedContexts=new Set}get identifier(){return this.definition.identifier}get controllerConstructor(){return this.definition.controllerConstructor}get contexts(){return Array.from(this.connectedContexts)}connectContextForScope(e){const t=this.fetchContextForScope(e);this.connectedContexts.add(t),t.connect()}disconnectContextForScope(e){const t=this.contextsByScope.get(e);t&&(this.connectedContexts.delete(t),t.disconnect())}fetchContextForScope(e){let t=this.contextsByScope.get(e);return t||(t=new gt(this,e),this.contextsByScope.set(e,t)),t}}class Ot{constructor(e){this.scope=e}has(e){return this.data.has(this.getDataKey(e))}get(e){return this.getAll(e)[0]}getAll(e){const t=this.data.get(this.getDataKey(e))||"";return t.match(/[^\s]+/g)||[]}getAttributeName(e){return this.data.getAttributeNameForKey(this.getDataKey(e))}getDataKey(e){return`${e}-class`}get data(){return this.scope.data}}class At{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get(e){const t=this.getAttributeNameForKey(e);return this.element.getAttribute(t)}set(e,t){const n=this.getAttributeNameForKey(e);return this.element.setAttribute(n,t),this.get(e)}has(e){const t=this.getAttributeNameForKey(e);return this.element.hasAttribute(t)}delete(e){if(this.has(e)){const t=this.getAttributeNameForKey(e);return this.element.removeAttribute(t),!0}return!1}getAttributeNameForKey(e){return`data-${this.identifier}-${et(e)}`}}class xt{constructor(e){this.warnedKeysByObject=new WeakMap,this.logger=e}warn(e,t,n){let r=this.warnedKeysByObject.get(e);r||(r=new Set,this.warnedKeysByObject.set(e,r)),r.has(t)||(r.add(t),this.logger.warn(n,e))}}function kt(e,t){return`[${e}~="${t}"]`}class Ct{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(e){return null!=this.find(e)}find(...e){return e.reduce(((e,t)=>e||this.findTarget(t)||this.findLegacyTarget(t)),void 0)}findAll(...e){return e.reduce(((e,t)=>[...e,...this.findAllTargets(t),...this.findAllLegacyTargets(t)]),[])}findTarget(e){const t=this.getSelectorForTargetName(e);return this.scope.findElement(t)}findAllTargets(e){const t=this.getSelectorForTargetName(e);return this.scope.findAllElements(t)}getSelectorForTargetName(e){return kt(this.schema.targetAttributeForScope(this.identifier),e)}findLegacyTarget(e){const t=this.getLegacySelectorForTargetName(e);return this.deprecate(this.scope.findElement(t),e)}findAllLegacyTargets(e){const t=this.getLegacySelectorForTargetName(e);return this.scope.findAllElements(t).map((t=>this.deprecate(t,e)))}getLegacySelectorForTargetName(e){const t=`${this.identifier}.${e}`;return kt(this.schema.targetAttribute,t)}deprecate(e,t){if(e){const{identifier:n}=this,r=this.schema.targetAttribute,i=this.schema.targetAttributeForScope(n);this.guide.warn(e,`target:${t}`,`Please replace ${r}="${n}.${t}" with ${i}="${t}". The ${r} attribute is deprecated and will be removed in a future version of Stimulus.`)}return e}get guide(){return this.scope.guide}}class Lt{constructor(e,t,n,r){this.targets=new Ct(this),this.classes=new Ot(this),this.data=new At(this),this.containsElement=e=>e.closest(this.controllerSelector)===this.element,this.schema=e,this.element=t,this.identifier=n,this.guide=new xt(r)}findElement(e){return this.element.matches(e)?this.element:this.queryElements(e).find(this.containsElement)}findAllElements(e){return[...this.element.matches(e)?[this.element]:[],...this.queryElements(e).filter(this.containsElement)]}queryElements(e){return Array.from(this.element.querySelectorAll(e))}get controllerSelector(){return kt(this.schema.controllerAttribute,this.identifier)}}class Mt{constructor(e,t,n){this.element=e,this.schema=t,this.delegate=n,this.valueListObserver=new ht(this.element,this.controllerAttribute,this),this.scopesByIdentifierByElement=new WeakMap,this.scopeReferenceCounts=new WeakMap}start(){this.valueListObserver.start()}stop(){this.valueListObserver.stop()}get controllerAttribute(){return this.schema.controllerAttribute}parseValueForToken(e){const{element:t,content:n}=e,r=this.fetchScopesByIdentifierForElement(t);let i=r.get(n);return i||(i=this.delegate.createScopeForElementAndIdentifier(t,n),r.set(n,i)),i}elementMatchedValue(e,t){const n=(this.scopeReferenceCounts.get(t)||0)+1;this.scopeReferenceCounts.set(t,n),1==n&&this.delegate.scopeConnected(t)}elementUnmatchedValue(e,t){const n=this.scopeReferenceCounts.get(t);n&&(this.scopeReferenceCounts.set(t,n-1),1==n&&this.delegate.scopeDisconnected(t))}fetchScopesByIdentifierForElement(e){let t=this.scopesByIdentifierByElement.get(e);return t||(t=new Map,this.scopesByIdentifierByElement.set(e,t)),t}}class Dt{constructor(e){this.application=e,this.scopeObserver=new Mt(this.element,this.schema,this),this.scopesByIdentifier=new lt,this.modulesByIdentifier=new Map}get element(){return this.application.element}get schema(){return this.application.schema}get logger(){return this.application.logger}get controllerAttribute(){return this.schema.controllerAttribute}get modules(){return Array.from(this.modulesByIdentifier.values())}get contexts(){return this.modules.reduce(((e,t)=>e.concat(t.contexts)),[])}start(){this.scopeObserver.start()}stop(){this.scopeObserver.stop()}loadDefinition(e){this.unloadIdentifier(e.identifier);const t=new Et(this.application,e);this.connectModule(t)}unloadIdentifier(e){const t=this.modulesByIdentifier.get(e);t&&this.disconnectModule(t)}getContextForElementAndIdentifier(e,t){const n=this.modulesByIdentifier.get(t);if(n)return n.contexts.find((t=>t.element==e))}handleError(e,t,n){this.application.handleError(e,t,n)}createScopeForElementAndIdentifier(e,t){return new Lt(this.schema,e,t,this.logger)}scopeConnected(e){this.scopesByIdentifier.add(e.identifier,e);const t=this.modulesByIdentifier.get(e.identifier);t&&t.connectContextForScope(e)}scopeDisconnected(e){this.scopesByIdentifier.delete(e.identifier,e);const t=this.modulesByIdentifier.get(e.identifier);t&&t.disconnectContextForScope(e)}connectModule(e){this.modulesByIdentifier.set(e.identifier,e);this.scopesByIdentifier.getValuesForKey(e.identifier).forEach((t=>e.connectContextForScope(t)))}disconnectModule(e){this.modulesByIdentifier.delete(e.identifier);this.scopesByIdentifier.getValuesForKey(e.identifier).forEach((t=>e.disconnectContextForScope(t)))}}const Bt={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target",targetAttributeForScope:e=>`data-${e}-target`};class Nt{constructor(e=document.documentElement,t=Bt){this.logger=console,this.debug=!1,this.logDebugActivity=(e,t,n={})=>{this.debug&&this.logFormattedMessage(e,t,n)},this.element=e,this.schema=t,this.dispatcher=new Je(this),this.router=new Dt(this)}static start(e,t){const n=new Nt(e,t);return n.start(),n}async start(){await new Promise((e=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",(()=>e())):e()})),this.logDebugActivity("application","starting"),this.dispatcher.start(),this.router.start(),this.logDebugActivity("application","start")}stop(){this.logDebugActivity("application","stopping"),this.dispatcher.stop(),this.router.stop(),this.logDebugActivity("application","stop")}register(e,t){t.shouldLoad&&this.load({identifier:e,controllerConstructor:t})}load(e,...t){(Array.isArray(e)?e:[e,...t]).forEach((e=>this.router.loadDefinition(e)))}unload(e,...t){(Array.isArray(e)?e:[e,...t]).forEach((e=>this.router.unloadIdentifier(e)))}get controllers(){return this.router.contexts.map((e=>e.controller))}getControllerForElementAndIdentifier(e,t){const n=this.router.getContextForElementAndIdentifier(e,t);return n?n.controller:null}handleError(e,t,n){var r;this.logger.error("%s\n\n%o\n\n%o",t,e,n),null===(r=window.onerror)||void 0===r||r.call(window,t,"",0,0,e)}logFormattedMessage(e,t,n={}){n=Object.assign({application:this},n),this.logger.groupCollapsed(`${e} #${t}`),this.logger.log("details:",Object.assign({},n)),this.logger.groupEnd()}}function St([e,t]){return function(e,t){const n=`${et(e)}-value`,r=function(e){const t=function(e){const t=jt(e.type);if(t){const n=It(e.default);if(t!==n)throw new Error(`Type "${t}" must match the type of the default value. Given default value: "${e.default}" as "${n}"`);return t}}(e),n=It(e),r=jt(e),i=t||n||r;if(i)return i;throw new Error(`Unknown value type "${e}"`)}(t);return{type:r,key:n,name:Ge(n),get defaultValue(){return function(e){const t=jt(e);if(t)return Vt[t];const n=e.default;return void 0!==n?n:e}(t)},get hasCustomDefaultValue(){return void 0!==It(t)},reader:Ft[r],writer:$t[r]||$t.default}}(e,t)}function jt(e){switch(e){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function It(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}return Array.isArray(e)?"array":"[object Object]"===Object.prototype.toString.call(e)?"object":void 0}const Vt={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},Ft={array(e){const t=JSON.parse(e);if(!Array.isArray(t))throw new TypeError("Expected array");return t},boolean:e=>!("0"==e||"false"==e),number:e=>Number(e),object(e){const t=JSON.parse(e);if(null===t||"object"!=typeof t||Array.isArray(t))throw new TypeError("Expected object");return t},string:e=>e},$t={default:function(e){return`${e}`},array:_t,object:_t};function _t(e){return JSON.stringify(e)}class Pt{constructor(e){this.context=e}static get shouldLoad(){return!0}get application(){return this.context.application}get scope(){return this.context.scope}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(e,{target:t=this.element,detail:n={},prefix:r=this.identifier,bubbles:i=!0,cancelable:s=!0}={}){const o=new CustomEvent(r?`${r}:${e}`:e,{detail:n,bubbles:i,cancelable:s});return t.dispatchEvent(o),o}}Pt.blessings=[function(e){return mt(e,"classes").reduce(((e,t)=>{return Object.assign(e,{[`${n=t}Class`]:{get(){const{classes:e}=this;if(e.has(n))return e.get(n);{const t=e.getAttributeName(n);throw new Error(`Missing attribute "${t}"`)}}},[`${n}Classes`]:{get(){return this.classes.getAll(n)}},[`has${Ze(n)}Class`]:{get(){return this.classes.has(n)}}});var n}),{})},function(e){return mt(e,"targets").reduce(((e,t)=>{return Object.assign(e,{[`${n=t}Target`]:{get(){const e=this.targets.find(n);if(e)return e;throw new Error(`Missing target element "${n}" for "${this.identifier}" controller`)}},[`${n}Targets`]:{get(){return this.targets.findAll(n)}},[`has${Ze(n)}Target`]:{get(){return this.targets.has(n)}}});var n}),{})},function(e){const t=vt(e,"values"),n={valueDescriptorMap:{get(){return t.reduce(((e,t)=>{const n=St(t),r=this.data.getAttributeNameForKey(n.key);return Object.assign(e,{[r]:n})}),{})}}};return t.reduce(((e,t)=>Object.assign(e,function(e){const t=St(e),{key:n,name:r,reader:i,writer:s}=t;return{[r]:{get(){const e=this.data.get(n);return null!==e?i(e):t.defaultValue},set(e){void 0===e?this.data.delete(n):this.data.set(n,s(e))}},[`has${Ze(r)}`]:{get(){return this.data.has(n)||t.hasCustomDefaultValue}}}}(t))),n)}],Pt.targets=[],Pt.values={};(class extends Pt{initialize(){this.hide()}connect(){setTimeout((()=>{this.show()}),200),this.hasDismissAfterValue&&setTimeout((()=>{this.close()}),this.dismissAfterValue)}close(){this.hide(),setTimeout((()=>{this.element.remove()}),1100)}show(){this.element.setAttribute("style","transition: 1s; transform:translate(0, 0);")}hide(){this.element.setAttribute("style","transition: 1s; transform:translate(400px, 0);")}}).values={dismissAfter:Number};(class extends Pt{connect(){this.timeout=null,this.duration=this.data.get("duration")||1e3}save(){clearTimeout(this.timeout),this.timeout=setTimeout((()=>{this.statusTarget.textContent="Saving...",Rails.fire(this.formTarget,"submit")}),this.duration)}success(){this.setStatus("Saved!")}error(){this.setStatus("Unable to save!")}setStatus(e){this.statusTarget.textContent=e,this.timeout=setTimeout((()=>{this.statusTarget.textContent=""}),2e3)}}).targets=["form","status"];class Rt extends Pt{constructor(...e){super(...e),this._onMenuButtonKeydown=e=>{switch(e.keyCode){case 13:case 32:e.preventDefault(),this.toggle()}}}connect(){this.toggleClass=this.data.get("class")||"hidden",this.visibleClass=this.data.get("visibleClass")||null,this.invisibleClass=this.data.get("invisibleClass")||null,this.activeClass=this.data.get("activeClass")||null,this.enteringClass=this.data.get("enteringClass")||null,this.leavingClass=this.data.get("leavingClass")||null,this.hasButtonTarget&&this.buttonTarget.addEventListener("keydown",this._onMenuButtonKeydown),this.element.setAttribute("aria-haspopup","true")}disconnect(){this.hasButtonTarget&&this.buttonTarget.removeEventListener("keydown",this._onMenuButtonKeydown)}toggle(){this.openValue=!this.openValue}openValueChanged(){this.openValue?this._show():this._hide()}_show(e){setTimeout((()=>{this.menuTarget.classList.remove(this.toggleClass),this.element.setAttribute("aria-expanded","true"),this._enteringClassList[0].forEach((e=>{this.menuTarget.classList.add(e)}).bind(this)),this._activeClassList[0].forEach((e=>{this.activeTarget.classList.add(e)})),this._invisibleClassList[0].forEach((e=>this.menuTarget.classList.remove(e))),this._visibleClassList[0].forEach((e=>{this.menuTarget.classList.add(e)})),setTimeout((()=>{this._enteringClassList[0].forEach((e=>this.menuTarget.classList.remove(e)))}).bind(this),this.enterTimeout[0]),"function"==typeof e&&e()}).bind(this))}_hide(e){setTimeout((()=>{this.element.setAttribute("aria-expanded","false"),this._invisibleClassList[0].forEach((e=>this.menuTarget.classList.add(e))),this._visibleClassList[0].forEach((e=>this.menuTarget.classList.remove(e))),this._activeClassList[0].forEach((e=>this.activeTarget.classList.remove(e))),this._leavingClassList[0].forEach((e=>this.menuTarget.classList.add(e))),setTimeout((()=>{this._leavingClassList[0].forEach((e=>this.menuTarget.classList.remove(e))),"function"==typeof e&&e(),this.menuTarget.classList.add(this.toggleClass)}).bind(this),this.leaveTimeout[0])}).bind(this))}show(){this.openValue=!0}hide(e){!1===this.element.contains(e.target)&&this.openValue&&(this.openValue=!1)}get activeTarget(){return this.data.has("activeTarget")?document.querySelector(this.data.get("activeTarget")):this.element}get _activeClassList(){return this.activeClass?this.activeClass.split(",").map((e=>e.split(" "))):[[],[]]}get _visibleClassList(){return this.visibleClass?this.visibleClass.split(",").map((e=>e.split(" "))):[[],[]]}get _invisibleClassList(){return this.invisibleClass?this.invisibleClass.split(",").map((e=>e.split(" "))):[[],[]]}get _enteringClassList(){return this.enteringClass?this.enteringClass.split(",").map((e=>e.split(" "))):[[],[]]}get _leavingClassList(){return this.leavingClass?this.leavingClass.split(",").map((e=>e.split(" "))):[[],[]]}get enterTimeout(){return(this.data.get("enterTimeout")||"0,0").split(",").map((e=>parseInt(e)))}get leaveTimeout(){return(this.data.get("leaveTimeout")||"0,0").split(",").map((e=>parseInt(e)))}}Rt.targets=["menu","button"],Rt.values={open:Boolean};(class extends Pt{connect(){this.toggleClass=this.data.get("class")||"hidden",this.backgroundId=this.data.get("backgroundId")||"modal-background",this.backgroundHtml=this.data.get("backgroundHtml")||this._backgroundHTML(),this.allowBackgroundClose="true"===(this.data.get("allowBackgroundClose")||"true"),this.preventDefaultActionOpening="true"===(this.data.get("preventDefaultActionOpening")||"true"),this.preventDefaultActionClosing="true"===(this.data.get("preventDefaultActionClosing")||"true")}disconnect(){this.close()}open(e){this.preventDefaultActionOpening&&e.preventDefault(),e.target.blur&&e.target.blur(),this.lockScroll(),this.containerTarget.classList.remove(this.toggleClass),this.data.get("disable-backdrop")||(document.body.insertAdjacentHTML("beforeend",this.backgroundHtml),this.background=document.querySelector(`#${this.backgroundId}`))}close(e){e&&this.preventDefaultActionClosing&&e.preventDefault(),this.unlockScroll(),this.containerTarget.classList.add(this.toggleClass),this.background&&this.background.remove()}closeBackground(e){this.allowBackgroundClose&&e.target===this.containerTarget&&this.close(e)}closeWithKeyboard(e){27!==e.keyCode||this.containerTarget.classList.contains(this.toggleClass)||this.close(e)}_backgroundHTML(){return`<div id="${this.backgroundId}" class="fixed top-0 left-0 w-full h-full" style="background-color: rgba(0, 0, 0, 0.8); z-index: 9998;"></div>`}lockScroll(){const e=window.innerWidth-document.documentElement.clientWidth;document.body.style.paddingRight=`${e}px`,this.saveScrollPosition(),document.body.classList.add("fixed","inset-x-0","overflow-hidden"),document.body.style.top=`-${this.scrollPosition}px`}unlockScroll(){document.body.style.paddingRight=null,document.body.classList.remove("fixed","inset-x-0","overflow-hidden"),this.restoreScrollPosition(),document.body.style.top=null}saveScrollPosition(){this.scrollPosition=window.pageYOffset||document.body.scrollTop}restoreScrollPosition(){document.documentElement.scrollTop=this.scrollPosition}}).targets=["container"];(class extends Pt{connect(){this.activeTabClasses=(this.data.get("activeTab")||"active").split(" "),this.inactiveTabClasses=(this.data.get("inactiveTab")||"inactive").split(" "),this.anchor&&(this.index=this.tabTargets.findIndex((e=>e.id===this.anchor))),this.showTab()}change(e){e.preventDefault(),this.index=e.currentTarget.dataset.index?e.currentTarget.dataset.index:e.currentTarget.dataset.id?this.tabTargets.findIndex((t=>t.id==e.currentTarget.dataset.id)):this.tabTargets.indexOf(e.currentTarget),window.dispatchEvent(new CustomEvent("tsc:tab-change"))}showTab(){this.tabTargets.forEach(((e,t)=>{const n=this.panelTargets[t];t===this.index?(n.classList.remove("hidden"),e.classList.remove(...this.inactiveTabClasses),e.classList.add(...this.activeTabClasses),e.id&&(location.hash=e.id)):(n.classList.add("hidden"),e.classList.remove(...this.activeTabClasses),e.classList.add(...this.inactiveTabClasses))}))}get index(){return parseInt(this.data.get("index")||0)}set index(e){this.data.set("index",e>=0?e:0),this.showTab()}get anchor(){return document.URL.split("#").length>1?document.URL.split("#")[1]:null}}).targets=["tab","panel"];class Kt extends Pt{connect(){this.toggleClass=this.data.get("class")||"hidden"}toggle(e){e.preventDefault(),this.openValue=!this.openValue}hide(e){e.preventDefault(),this.openValue=!1}show(e){e.preventDefault(),this.openValue=!0}openValueChanged(){this.toggleClass&&this.toggleableTargets.forEach((e=>{e.classList.toggle(this.toggleClass)}))}}Kt.targets=["toggleable"],Kt.values={open:Boolean};(class extends Pt{initialize(){this.contentTarget.setAttribute("style",`transform:translate(${this.data.get("translateX")}, ${this.data.get("translateY")});`)}mouseOver(){this.contentTarget.classList.remove("hidden")}mouseOut(){this.contentTarget.classList.add("hidden")}}).targets=["content"];(class extends Rt{_show(){this.overlayTarget.classList.remove(this.toggleClass),super._show((()=>{this._activeClassList[1].forEach((e=>this.overlayTarget.classList.add(e))),this._invisibleClassList[1].forEach((e=>this.overlayTarget.classList.remove(e))),this._visibleClassList[1].forEach((e=>this.overlayTarget.classList.add(e))),setTimeout((()=>{this._enteringClassList[1].forEach((e=>this.overlayTarget.classList.remove(e)))}).bind(this),this.enterTimeout[1])}).bind(this))}_hide(){this._leavingClassList[1].forEach((e=>this.overlayTarget.classList.add(e))),super._hide((()=>{setTimeout((()=>{this._visibleClassList[1].forEach((e=>this.overlayTarget.classList.remove(e))),this._invisibleClassList[1].forEach((e=>this.overlayTarget.classList.add(e))),this._activeClassList[1].forEach((e=>this.overlayTarget.classList.remove(e))),this._leavingClassList[1].forEach((e=>this.overlayTarget.classList.remove(e))),this.overlayTarget.classList.add(this.toggleClass)}).bind(this),this.leaveTimeout[1])}).bind(this))}}).targets=["menu","overlay"];function Ut(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ht(e,t,n){return t&&Wt(e.prototype,t),n&&Wt(e,n),e}function qt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jt(e,t)}function Yt(e){return(Yt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Jt(e,t){return(Jt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xt(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Qt(e,t,n){return(Qt=Xt()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Jt(i,n.prototype),i}).apply(null,arguments)}function Gt(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Zt(e){var t=Xt();return function(){var n,r=Yt(e);if(t){var i=Yt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Gt(this,n)}}function en(e){return function(e){if(Array.isArray(e))return tn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return tn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tn(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}(class extends Pt{connect(){this.styleProperty=this.data.get("style")||"backgroundColor"}update(){this.preview=this.color}set preview(e){this.previewTarget.style[this.styleProperty]=e;const t=this._getContrastYIQ(e);"color"===this.styleProperty?this.previewTarget.style.backgroundColor=t:this.previewTarget.style.color=t}get color(){return this.colorTarget.value}_getContrastYIQ(e){return e=e.replace("#",""),(299*parseInt(e.substr(0,2),16)+587*parseInt(e.substr(2,2),16)+114*parseInt(e.substr(4,2),16))/1e3>=128?"#000":"#fff"}}).targets=["preview","color"];var nn=function(e){zt(n,e);var t=Zt(n);function n(){return Ut(this,n),t.apply(this,arguments)}return Ht(n,[{key:"connect",value:function(){this.setCount()}},{key:"checkAll",value:function(){this.setAllCheckboxes(!0),this.setCount()}},{key:"checkNone",value:function(){this.setAllCheckboxes(!1),this.setCount()}},{key:"onChecked",value:function(){this.setCount()}},{key:"setAllCheckboxes",value:function(e){this.checkboxes.forEach((function(t){var n=t;n.disabled||(n.checked=e)}))}},{key:"setCount",value:function(){if(this.hasCountTarget){var e=this.selectedCheckboxes.length;this.countTarget.innerHTML="".concat(e," selected")}}},{key:"selectedCheckboxes",get:function(){return this.checkboxes.filter((function(e){return e.checked}))}},{key:"checkboxes",get:function(){return Qt(Array,en(this.element.querySelectorAll("input[type=checkbox]")))}}]),n}(Pt);qt(nn,"targets",["count"]);var rn=function(e){zt(n,e);var t=Zt(n);function n(){return Ut(this,n),t.apply(this,arguments)}return Ht(n,[{key:"selectAll",value:function(e){var t=e.target.checked;this.allTarget.indeterminate=!1,this._setAllCheckboxes(t),this._dispatch("change",{count:this.selectedCount})}},{key:"onSelected",value:function(){this.allTarget.indeterminate=!!this._indeterminate,this._dispatch("change",{count:this.selectedCount})}},{key:"selectedCount",get:function(){return this.selected.length}},{key:"selected",get:function(){return this.selectables.filter((function(e){return e.checked}))}},{key:"selectables",get:function(){return Qt(Array,en(this.selectableTargets))}},{key:"_setAllCheckboxes",value:function(e){this.selectables.forEach((function(t){var n=t;n.disabled||(n.checked=e)}))}},{key:"_indeterminate",get:function(){return this.selected.length!==this.selectableTargets.length&&this.selected.length>0}},{key:"_dispatch",value:function(e,t){window.dispatchEvent(new CustomEvent("rmp:select:".concat(e),{bubbles:!0,detail:t}))}}]),n}(Pt);qt(rn,"targets",["all","selectable"]);var sn=function(e){zt(n,e);var t=Zt(n);function n(){return Ut(this,n),t.apply(this,arguments)}return Ht(n,[{key:"apply",value:function(){location.href="".concat(window.location.pathname,"?").concat(this.params)}},{key:"reset",value:function(){location.href="".concat(window.location.pathname)}},{key:"post",value:function(){var e=document.head.querySelector('meta[name="csrf-token"]').content,t="".concat(window.location.pathname,"/destroy_all?").concat(this.params);fetch(t,{method:"DELETE",redirect:"follow",headers:{"Content-Type":"application/json",credentials:"same-origin"},body:JSON.stringify({authenticity_token:e})}).then((function(e){e.redirected&&(window.location.href=e.url)}))}},{key:"params",get:function(){return this.activeFilterTargets().map((function(e){return"".concat(e.name,"=").concat(e.value)})).join("&")}},{key:"activeFilterTargets",value:function(){return this.filterTargets.filter((function(e){return"checkbox"===e.type||"radio"===e.type?e.checked:e.value.length>0}))}}]),n}(Pt);qt(sn,"targets",["filter"]);var on=function(e){zt(n,e);var t=Zt(n);function n(){return Ut(this,n),t.apply(this,arguments)}return Ht(n,[{key:"clear",value:function(){this.eventTarget.value=null,window.dispatchEvent(new CustomEvent("search-controller:submit",{}))}},{key:"submit",value:function(e){e.preventDefault(),"Enter"!==e.key&&"click"!==e.type||window.dispatchEvent(new CustomEvent("search-controller:submit",{}))}}]),n}(Pt);qt(on,"targets",["field"]);var an=function(e){zt(n,e);var t=Zt(n);function n(){return Ut(this,n),t.apply(this,arguments)}return Ht(n,[{key:"enable",value:function(){this.enableTarget.disabled=!1}},{key:"disable",value:function(){this.enableTarget.disabled=!0}},{key:"change",value:function(e){e.type.match(/rmp:select:.*/)&&(e.detail.count>0?this.enable():this.disable())}}]),n}(Pt);qt(an,"targets",["enable"]);var cn=function(e){zt(n,e);var t=Zt(n);function n(){return Ut(this,n),t.apply(this,arguments)}return Ht(n,[{key:"connect",value:function(){this.hasButtonTarget&&(this.originalText=this.buttonTarget.innerText,this.successDuration=2e3)}},{key:"copy",value:function(e){e.preventDefault();var t=this.sourceTarget.innerText,n=this.data.get("filter");n&&(t=new RegExp(n).exec(t)[0]);var r=document.createElement("textarea");r.value=t,document.body.appendChild(r),r.select(),document.execCommand("copy"),document.body.removeChild(r),this.copied()}},{key:"copied",value:function(){var e=this;if(this.hasButtonTarget){this.timeout&&clearTimeout(this.timeout);var t=this.data.get("copiedClass");t&&this.buttonTarget.classList.add(t);var n=this.data.get("copiedMessage"),r=this.buttonTarget.innerHTML;n&&(this.buttonTarget.innerHTML=n),this.timeout=setTimeout((function(){e.buttonTarget.classList.remove(t),e.buttonTarget.innerHTML=r}),this.successDuration)}}}]),n}(Pt);qt(cn,"targets",["button","source"]);var ln=Nt.start();ln.register("dropdown",Rt),ln.register("checklist",nn),ln.register("selectable",rn),ln.register("filters",sn),ln.register("search",on),ln.register("enable",an),ln.register("clipboard",cn),document.addEventListener("DOMContentLoaded",(function(){var e;!function(){var e=document.getElementById("profiled-requests-table");if(e)for(var t=e.rows,n=function(t){var n=e.rows[t],r=n.dataset.link;r&&(n.onclick=function(){window.location.href=r})},r=1;r<t.length;r++)n(r)}(),document.querySelectorAll(".trace-bar").forEach((function(e){ze(e,{trigger:"click",content:e.children[0],theme:"rmp",maxWidth:"700px",placement:"bottom",interactive:!0,onShow:function(e){e.popper.querySelector(".popover-close").addEventListener("click",(function(){e.hide()}))},onHide:function(e){e.popper.querySelector(".popover-close").removeEventListener("click",(function(){e.hide()}))}})})),(e=document.getElementById("trace-search"))&&e.addEventListener("keyup",(function(e){"Enter"===e.key&&(e.preventDefault(),document.getElementById("trace-form").submit())}))}),!1)}));