overpass-doc 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +1 -0
- data/Rakefile +27 -0
- data/bin/overpass-doc +12 -0
- data/lib/overpass-doc.rb +9 -0
- data/lib/overpass-doc/assets/bootstrap.min.css +7 -0
- data/lib/overpass-doc/assets/bootstrap.min.js +7 -0
- data/lib/overpass-doc/assets/codemirror.css +176 -0
- data/lib/overpass-doc/assets/codemirror.js +3190 -0
- data/lib/overpass-doc/assets/jquery.js +2 -0
- data/lib/overpass-doc/assets/mode/clike/clike.js +303 -0
- data/lib/overpass-doc/assets/mode/clike/index.html +102 -0
- data/lib/overpass-doc/assets/mode/clike/scala.html +766 -0
- data/lib/overpass-doc/assets/mode/clike/test.js +165 -0
- data/lib/overpass-doc/assets/util/closetag.js +165 -0
- data/lib/overpass-doc/assets/util/continuecomment.js +36 -0
- data/lib/overpass-doc/assets/util/continuelist.js +29 -0
- data/lib/overpass-doc/assets/util/dialog.css +32 -0
- data/lib/overpass-doc/assets/util/dialog.js +76 -0
- data/lib/overpass-doc/assets/util/foldcode.js +196 -0
- data/lib/overpass-doc/assets/util/formatting.js +108 -0
- data/lib/overpass-doc/assets/util/javascript-hint.js +138 -0
- data/lib/overpass-doc/assets/util/loadmode.js +51 -0
- data/lib/overpass-doc/assets/util/match-highlighter.js +44 -0
- data/lib/overpass-doc/assets/util/multiplex.js +95 -0
- data/lib/overpass-doc/assets/util/overlay.js +59 -0
- data/lib/overpass-doc/assets/util/pig-hint.js +123 -0
- data/lib/overpass-doc/assets/util/runmode-standalone.js +90 -0
- data/lib/overpass-doc/assets/util/runmode.js +53 -0
- data/lib/overpass-doc/assets/util/search.js +118 -0
- data/lib/overpass-doc/assets/util/searchcursor.js +119 -0
- data/lib/overpass-doc/assets/util/simple-hint.css +16 -0
- data/lib/overpass-doc/assets/util/simple-hint.js +102 -0
- data/lib/overpass-doc/assets/util/xml-hint.js +131 -0
- data/lib/overpass-doc/generator.rb +122 -0
- data/lib/overpass-doc/query.rb +119 -0
- data/lib/overpass-doc/views/extra.erb +4 -0
- data/lib/overpass-doc/views/index.erb +37 -0
- data/lib/overpass-doc/views/layout.erb +80 -0
- data/lib/overpass-doc/views/query.erb +115 -0
- metadata +144 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: '09dc2dab218ef799c024d923e6892bed2cb74be7c557b35b9e948cfe7782c514'
|
4
|
+
data.tar.gz: d5e31bd7a8734a52c00fe9403f06482ab0ce813a0e90f8d80c5064d2c8e0e5ad
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 72df74a6ce87ac2f9dd53f9599322f43ebf0e00d7f4618d0734f664c9c5425e9553cee09b74699d4d8cf0d42a1812b75c79bb73760b73257d3349fd5464edc69
|
7
|
+
data.tar.gz: 86398341c02b2bf7d137b10bb085710ddc3dd2acd17a47357b3ae55a80d0652212dffb19da24b18547244d4a2c38c716bada6b156fe49b7b834366a4bcf9747f
|
data/README.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# Generate HTML documentation from Overpass queries
|
data/Rakefile
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'rake'
|
2
|
+
require 'rdoc/task'
|
3
|
+
require 'rake/clean'
|
4
|
+
|
5
|
+
CLEAN.include ['*.gem', 'pkg']
|
6
|
+
|
7
|
+
$spec = eval(File.read('overpass-doc.gemspec'))
|
8
|
+
|
9
|
+
Rake::RDocTask.new do |rdoc|
|
10
|
+
rdoc.rdoc_dir = 'doc/rdoc'
|
11
|
+
rdoc.options += RDOC_OPTS
|
12
|
+
rdoc.rdoc_files.include("README.md", "lib/**/*.rb")
|
13
|
+
rdoc.main = "README.md"
|
14
|
+
end
|
15
|
+
|
16
|
+
task :package do
|
17
|
+
sh %{gem build overpass-doc.gemspec}
|
18
|
+
end
|
19
|
+
|
20
|
+
task :install do
|
21
|
+
sh %{sudo gem install --no-document overpass-doc-#{$spec.version}.gem}
|
22
|
+
end
|
23
|
+
|
24
|
+
desc "Uninstall the gem"
|
25
|
+
task :uninstall => [:clean] do
|
26
|
+
sh %{sudo gem uninstall overpass-doc}
|
27
|
+
end
|
data/bin/overpass-doc
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
|
3
|
+
require 'rubygems'
|
4
|
+
require 'overpass-doc'
|
5
|
+
|
6
|
+
if ARGV[0] == nil
|
7
|
+
puts "Usage: overpass-doc path-to-queries [path-to-output-dir]"
|
8
|
+
else
|
9
|
+
output = ARGV[1] || "overpass-doc"
|
10
|
+
generator = OverpassDoc::Generator.new(ARGV[0], output)
|
11
|
+
generator.run()
|
12
|
+
end
|
data/lib/overpass-doc.rb
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
@charset "UTF-8";/*!
|
2
|
+
* Bootstrap v5.0.0-beta2 (https://getbootstrap.com/)
|
3
|
+
* Copyright 2011-2021 The Bootstrap Authors
|
4
|
+
* Copyright 2011-2021 Twitter, Inc.
|
5
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
6
|
+
*/:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-font-sans-serif:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0))}*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-font-sans-serif);font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){.h1,h1{font-size:2.5rem}}.h2,h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){.h2,h2{font-size:2rem}}.h3,h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){.h3,h3{font-size:1.75rem}}.h4,h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){.h4,h4{font-size:1.5rem}}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}.small,small{font-size:.875em}.mark,mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:var(--bs-font-monospace);font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:calc(1.625rem + 4.5vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-1{font-size:5rem}}.display-2{font-size:calc(1.575rem + 3.9vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-2{font-size:4.5rem}}.display-3{font-size:calc(1.525rem + 3.3vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-3{font-size:4rem}}.display-4{font-size:calc(1.475rem + 2.7vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-4{font-size:3.5rem}}.display-5{font-size:calc(1.425rem + 2.1vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-5{font-size:3rem}}.display-6{font-size:calc(1.375rem + 1.5vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-6{font-size:2.5rem}}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:.875em;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote>:last-child{margin-bottom:0}.blockquote-footer{margin-top:-1rem;margin-bottom:1rem;font-size:.875em;color:#6c757d}.blockquote-footer::before{content:"— "}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid #dee2e6;border-radius:.25rem;max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:.875em;color:#6c757d}.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{width:100%;padding-right:var(--bs-gutter-x,.75rem);padding-left:var(--bs-gutter-x,.75rem);margin-right:auto;margin-left:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}@media (min-width:1400px){.container,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{max-width:1320px}}.row{--bs-gutter-x:1.5rem;--bs-gutter-y:0;display:flex;flex-wrap:wrap;margin-top:calc(var(--bs-gutter-y) * -1);margin-right:calc(var(--bs-gutter-x)/ -2);margin-left:calc(var(--bs-gutter-x)/ -2)}.row>*{flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--bs-gutter-x)/ 2);padding-left:calc(var(--bs-gutter-x)/ 2);margin-top:var(--bs-gutter-y)}.col{flex:1 0 0%}.row-cols-auto>*{flex:0 0 auto;width:auto}.row-cols-1>*{flex:0 0 auto;width:100%}.row-cols-2>*{flex:0 0 auto;width:50%}.row-cols-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-4>*{flex:0 0 auto;width:25%}.row-cols-5>*{flex:0 0 auto;width:20%}.row-cols-6>*{flex:0 0 auto;width:16.6666666667%}.col-auto{flex:0 0 auto;width:auto}.col-1{flex:0 0 auto;width:8.3333333333%}.col-2{flex:0 0 auto;width:16.6666666667%}.col-3{flex:0 0 auto;width:25%}.col-4{flex:0 0 auto;width:33.3333333333%}.col-5{flex:0 0 auto;width:41.6666666667%}.col-6{flex:0 0 auto;width:50%}.col-7{flex:0 0 auto;width:58.3333333333%}.col-8{flex:0 0 auto;width:66.6666666667%}.col-9{flex:0 0 auto;width:75%}.col-10{flex:0 0 auto;width:83.3333333333%}.col-11{flex:0 0 auto;width:91.6666666667%}.col-12{flex:0 0 auto;width:100%}.offset-1{margin-left:8.3333333333%}.offset-2{margin-left:16.6666666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.3333333333%}.offset-5{margin-left:41.6666666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.3333333333%}.offset-8{margin-left:66.6666666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.3333333333%}.offset-11{margin-left:91.6666666667%}.g-0,.gx-0{--bs-gutter-x:0}.g-0,.gy-0{--bs-gutter-y:0}.g-1,.gx-1{--bs-gutter-x:0.25rem}.g-1,.gy-1{--bs-gutter-y:0.25rem}.g-2,.gx-2{--bs-gutter-x:0.5rem}.g-2,.gy-2{--bs-gutter-y:0.5rem}.g-3,.gx-3{--bs-gutter-x:1rem}.g-3,.gy-3{--bs-gutter-y:1rem}.g-4,.gx-4{--bs-gutter-x:1.5rem}.g-4,.gy-4{--bs-gutter-y:1.5rem}.g-5,.gx-5{--bs-gutter-x:3rem}.g-5,.gy-5{--bs-gutter-y:3rem}@media (min-width:576px){.col-sm{flex:1 0 0%}.row-cols-sm-auto>*{flex:0 0 auto;width:auto}.row-cols-sm-1>*{flex:0 0 auto;width:100%}.row-cols-sm-2>*{flex:0 0 auto;width:50%}.row-cols-sm-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-sm-4>*{flex:0 0 auto;width:25%}.row-cols-sm-5>*{flex:0 0 auto;width:20%}.row-cols-sm-6>*{flex:0 0 auto;width:16.6666666667%}.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-1{flex:0 0 auto;width:8.3333333333%}.col-sm-2{flex:0 0 auto;width:16.6666666667%}.col-sm-3{flex:0 0 auto;width:25%}.col-sm-4{flex:0 0 auto;width:33.3333333333%}.col-sm-5{flex:0 0 auto;width:41.6666666667%}.col-sm-6{flex:0 0 auto;width:50%}.col-sm-7{flex:0 0 auto;width:58.3333333333%}.col-sm-8{flex:0 0 auto;width:66.6666666667%}.col-sm-9{flex:0 0 auto;width:75%}.col-sm-10{flex:0 0 auto;width:83.3333333333%}.col-sm-11{flex:0 0 auto;width:91.6666666667%}.col-sm-12{flex:0 0 auto;width:100%}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.3333333333%}.offset-sm-2{margin-left:16.6666666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.3333333333%}.offset-sm-5{margin-left:41.6666666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.3333333333%}.offset-sm-8{margin-left:66.6666666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.3333333333%}.offset-sm-11{margin-left:91.6666666667%}.g-sm-0,.gx-sm-0{--bs-gutter-x:0}.g-sm-0,.gy-sm-0{--bs-gutter-y:0}.g-sm-1,.gx-sm-1{--bs-gutter-x:0.25rem}.g-sm-1,.gy-sm-1{--bs-gutter-y:0.25rem}.g-sm-2,.gx-sm-2{--bs-gutter-x:0.5rem}.g-sm-2,.gy-sm-2{--bs-gutter-y:0.5rem}.g-sm-3,.gx-sm-3{--bs-gutter-x:1rem}.g-sm-3,.gy-sm-3{--bs-gutter-y:1rem}.g-sm-4,.gx-sm-4{--bs-gutter-x:1.5rem}.g-sm-4,.gy-sm-4{--bs-gutter-y:1.5rem}.g-sm-5,.gx-sm-5{--bs-gutter-x:3rem}.g-sm-5,.gy-sm-5{--bs-gutter-y:3rem}}@media (min-width:768px){.col-md{flex:1 0 0%}.row-cols-md-auto>*{flex:0 0 auto;width:auto}.row-cols-md-1>*{flex:0 0 auto;width:100%}.row-cols-md-2>*{flex:0 0 auto;width:50%}.row-cols-md-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-md-4>*{flex:0 0 auto;width:25%}.row-cols-md-5>*{flex:0 0 auto;width:20%}.row-cols-md-6>*{flex:0 0 auto;width:16.6666666667%}.col-md-auto{flex:0 0 auto;width:auto}.col-md-1{flex:0 0 auto;width:8.3333333333%}.col-md-2{flex:0 0 auto;width:16.6666666667%}.col-md-3{flex:0 0 auto;width:25%}.col-md-4{flex:0 0 auto;width:33.3333333333%}.col-md-5{flex:0 0 auto;width:41.6666666667%}.col-md-6{flex:0 0 auto;width:50%}.col-md-7{flex:0 0 auto;width:58.3333333333%}.col-md-8{flex:0 0 auto;width:66.6666666667%}.col-md-9{flex:0 0 auto;width:75%}.col-md-10{flex:0 0 auto;width:83.3333333333%}.col-md-11{flex:0 0 auto;width:91.6666666667%}.col-md-12{flex:0 0 auto;width:100%}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.3333333333%}.offset-md-2{margin-left:16.6666666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.3333333333%}.offset-md-5{margin-left:41.6666666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.3333333333%}.offset-md-8{margin-left:66.6666666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.3333333333%}.offset-md-11{margin-left:91.6666666667%}.g-md-0,.gx-md-0{--bs-gutter-x:0}.g-md-0,.gy-md-0{--bs-gutter-y:0}.g-md-1,.gx-md-1{--bs-gutter-x:0.25rem}.g-md-1,.gy-md-1{--bs-gutter-y:0.25rem}.g-md-2,.gx-md-2{--bs-gutter-x:0.5rem}.g-md-2,.gy-md-2{--bs-gutter-y:0.5rem}.g-md-3,.gx-md-3{--bs-gutter-x:1rem}.g-md-3,.gy-md-3{--bs-gutter-y:1rem}.g-md-4,.gx-md-4{--bs-gutter-x:1.5rem}.g-md-4,.gy-md-4{--bs-gutter-y:1.5rem}.g-md-5,.gx-md-5{--bs-gutter-x:3rem}.g-md-5,.gy-md-5{--bs-gutter-y:3rem}}@media (min-width:992px){.col-lg{flex:1 0 0%}.row-cols-lg-auto>*{flex:0 0 auto;width:auto}.row-cols-lg-1>*{flex:0 0 auto;width:100%}.row-cols-lg-2>*{flex:0 0 auto;width:50%}.row-cols-lg-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-lg-4>*{flex:0 0 auto;width:25%}.row-cols-lg-5>*{flex:0 0 auto;width:20%}.row-cols-lg-6>*{flex:0 0 auto;width:16.6666666667%}.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-1{flex:0 0 auto;width:8.3333333333%}.col-lg-2{flex:0 0 auto;width:16.6666666667%}.col-lg-3{flex:0 0 auto;width:25%}.col-lg-4{flex:0 0 auto;width:33.3333333333%}.col-lg-5{flex:0 0 auto;width:41.6666666667%}.col-lg-6{flex:0 0 auto;width:50%}.col-lg-7{flex:0 0 auto;width:58.3333333333%}.col-lg-8{flex:0 0 auto;width:66.6666666667%}.col-lg-9{flex:0 0 auto;width:75%}.col-lg-10{flex:0 0 auto;width:83.3333333333%}.col-lg-11{flex:0 0 auto;width:91.6666666667%}.col-lg-12{flex:0 0 auto;width:100%}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.3333333333%}.offset-lg-2{margin-left:16.6666666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.3333333333%}.offset-lg-5{margin-left:41.6666666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.3333333333%}.offset-lg-8{margin-left:66.6666666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.3333333333%}.offset-lg-11{margin-left:91.6666666667%}.g-lg-0,.gx-lg-0{--bs-gutter-x:0}.g-lg-0,.gy-lg-0{--bs-gutter-y:0}.g-lg-1,.gx-lg-1{--bs-gutter-x:0.25rem}.g-lg-1,.gy-lg-1{--bs-gutter-y:0.25rem}.g-lg-2,.gx-lg-2{--bs-gutter-x:0.5rem}.g-lg-2,.gy-lg-2{--bs-gutter-y:0.5rem}.g-lg-3,.gx-lg-3{--bs-gutter-x:1rem}.g-lg-3,.gy-lg-3{--bs-gutter-y:1rem}.g-lg-4,.gx-lg-4{--bs-gutter-x:1.5rem}.g-lg-4,.gy-lg-4{--bs-gutter-y:1.5rem}.g-lg-5,.gx-lg-5{--bs-gutter-x:3rem}.g-lg-5,.gy-lg-5{--bs-gutter-y:3rem}}@media (min-width:1200px){.col-xl{flex:1 0 0%}.row-cols-xl-auto>*{flex:0 0 auto;width:auto}.row-cols-xl-1>*{flex:0 0 auto;width:100%}.row-cols-xl-2>*{flex:0 0 auto;width:50%}.row-cols-xl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xl-4>*{flex:0 0 auto;width:25%}.row-cols-xl-5>*{flex:0 0 auto;width:20%}.row-cols-xl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-1{flex:0 0 auto;width:8.3333333333%}.col-xl-2{flex:0 0 auto;width:16.6666666667%}.col-xl-3{flex:0 0 auto;width:25%}.col-xl-4{flex:0 0 auto;width:33.3333333333%}.col-xl-5{flex:0 0 auto;width:41.6666666667%}.col-xl-6{flex:0 0 auto;width:50%}.col-xl-7{flex:0 0 auto;width:58.3333333333%}.col-xl-8{flex:0 0 auto;width:66.6666666667%}.col-xl-9{flex:0 0 auto;width:75%}.col-xl-10{flex:0 0 auto;width:83.3333333333%}.col-xl-11{flex:0 0 auto;width:91.6666666667%}.col-xl-12{flex:0 0 auto;width:100%}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.3333333333%}.offset-xl-2{margin-left:16.6666666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.3333333333%}.offset-xl-5{margin-left:41.6666666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.3333333333%}.offset-xl-8{margin-left:66.6666666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.3333333333%}.offset-xl-11{margin-left:91.6666666667%}.g-xl-0,.gx-xl-0{--bs-gutter-x:0}.g-xl-0,.gy-xl-0{--bs-gutter-y:0}.g-xl-1,.gx-xl-1{--bs-gutter-x:0.25rem}.g-xl-1,.gy-xl-1{--bs-gutter-y:0.25rem}.g-xl-2,.gx-xl-2{--bs-gutter-x:0.5rem}.g-xl-2,.gy-xl-2{--bs-gutter-y:0.5rem}.g-xl-3,.gx-xl-3{--bs-gutter-x:1rem}.g-xl-3,.gy-xl-3{--bs-gutter-y:1rem}.g-xl-4,.gx-xl-4{--bs-gutter-x:1.5rem}.g-xl-4,.gy-xl-4{--bs-gutter-y:1.5rem}.g-xl-5,.gx-xl-5{--bs-gutter-x:3rem}.g-xl-5,.gy-xl-5{--bs-gutter-y:3rem}}@media (min-width:1400px){.col-xxl{flex:1 0 0%}.row-cols-xxl-auto>*{flex:0 0 auto;width:auto}.row-cols-xxl-1>*{flex:0 0 auto;width:100%}.row-cols-xxl-2>*{flex:0 0 auto;width:50%}.row-cols-xxl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xxl-4>*{flex:0 0 auto;width:25%}.row-cols-xxl-5>*{flex:0 0 auto;width:20%}.row-cols-xxl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xxl-auto{flex:0 0 auto;width:auto}.col-xxl-1{flex:0 0 auto;width:8.3333333333%}.col-xxl-2{flex:0 0 auto;width:16.6666666667%}.col-xxl-3{flex:0 0 auto;width:25%}.col-xxl-4{flex:0 0 auto;width:33.3333333333%}.col-xxl-5{flex:0 0 auto;width:41.6666666667%}.col-xxl-6{flex:0 0 auto;width:50%}.col-xxl-7{flex:0 0 auto;width:58.3333333333%}.col-xxl-8{flex:0 0 auto;width:66.6666666667%}.col-xxl-9{flex:0 0 auto;width:75%}.col-xxl-10{flex:0 0 auto;width:83.3333333333%}.col-xxl-11{flex:0 0 auto;width:91.6666666667%}.col-xxl-12{flex:0 0 auto;width:100%}.offset-xxl-0{margin-left:0}.offset-xxl-1{margin-left:8.3333333333%}.offset-xxl-2{margin-left:16.6666666667%}.offset-xxl-3{margin-left:25%}.offset-xxl-4{margin-left:33.3333333333%}.offset-xxl-5{margin-left:41.6666666667%}.offset-xxl-6{margin-left:50%}.offset-xxl-7{margin-left:58.3333333333%}.offset-xxl-8{margin-left:66.6666666667%}.offset-xxl-9{margin-left:75%}.offset-xxl-10{margin-left:83.3333333333%}.offset-xxl-11{margin-left:91.6666666667%}.g-xxl-0,.gx-xxl-0{--bs-gutter-x:0}.g-xxl-0,.gy-xxl-0{--bs-gutter-y:0}.g-xxl-1,.gx-xxl-1{--bs-gutter-x:0.25rem}.g-xxl-1,.gy-xxl-1{--bs-gutter-y:0.25rem}.g-xxl-2,.gx-xxl-2{--bs-gutter-x:0.5rem}.g-xxl-2,.gy-xxl-2{--bs-gutter-y:0.5rem}.g-xxl-3,.gx-xxl-3{--bs-gutter-x:1rem}.g-xxl-3,.gy-xxl-3{--bs-gutter-y:1rem}.g-xxl-4,.gx-xxl-4{--bs-gutter-x:1.5rem}.g-xxl-4,.gy-xxl-4{--bs-gutter-y:1.5rem}.g-xxl-5,.gx-xxl-5{--bs-gutter-x:3rem}.g-xxl-5,.gy-xxl-5{--bs-gutter-y:3rem}}.table{--bs-table-bg:transparent;--bs-table-striped-color:#212529;--bs-table-striped-bg:rgba(0, 0, 0, 0.05);--bs-table-active-color:#212529;--bs-table-active-bg:rgba(0, 0, 0, 0.1);--bs-table-hover-color:#212529;--bs-table-hover-bg:rgba(0, 0, 0, 0.075);width:100%;margin-bottom:1rem;color:#212529;vertical-align:top;border-color:#dee2e6}.table>:not(caption)>*>*{padding:.5rem .5rem;background-color:var(--bs-table-bg);border-bottom-width:1px;box-shadow:inset 0 0 0 9999px var(--bs-table-accent-bg)}.table>tbody{vertical-align:inherit}.table>thead{vertical-align:bottom}.table>:not(:last-child)>:last-child>*{border-bottom-color:currentColor}.caption-top{caption-side:top}.table-sm>:not(caption)>*>*{padding:.25rem .25rem}.table-bordered>:not(caption)>*{border-width:1px 0}.table-bordered>:not(caption)>*>*{border-width:0 1px}.table-borderless>:not(caption)>*>*{border-bottom-width:0}.table-striped>tbody>tr:nth-of-type(odd){--bs-table-accent-bg:var(--bs-table-striped-bg);color:var(--bs-table-striped-color)}.table-active{--bs-table-accent-bg:var(--bs-table-active-bg);color:var(--bs-table-active-color)}.table-hover>tbody>tr:hover{--bs-table-accent-bg:var(--bs-table-hover-bg);color:var(--bs-table-hover-color)}.table-primary{--bs-table-bg:#cfe2ff;--bs-table-striped-bg:#c5d7f2;--bs-table-striped-color:#000;--bs-table-active-bg:#bacbe6;--bs-table-active-color:#000;--bs-table-hover-bg:#bfd1ec;--bs-table-hover-color:#000;color:#000;border-color:#bacbe6}.table-secondary{--bs-table-bg:#e2e3e5;--bs-table-striped-bg:#d7d8da;--bs-table-striped-color:#000;--bs-table-active-bg:#cbccce;--bs-table-active-color:#000;--bs-table-hover-bg:#d1d2d4;--bs-table-hover-color:#000;color:#000;border-color:#cbccce}.table-success{--bs-table-bg:#d1e7dd;--bs-table-striped-bg:#c7dbd2;--bs-table-striped-color:#000;--bs-table-active-bg:#bcd0c7;--bs-table-active-color:#000;--bs-table-hover-bg:#c1d6cc;--bs-table-hover-color:#000;color:#000;border-color:#bcd0c7}.table-info{--bs-table-bg:#cff4fc;--bs-table-striped-bg:#c5e8ef;--bs-table-striped-color:#000;--bs-table-active-bg:#badce3;--bs-table-active-color:#000;--bs-table-hover-bg:#bfe2e9;--bs-table-hover-color:#000;color:#000;border-color:#badce3}.table-warning{--bs-table-bg:#fff3cd;--bs-table-striped-bg:#f2e7c3;--bs-table-striped-color:#000;--bs-table-active-bg:#e6dbb9;--bs-table-active-color:#000;--bs-table-hover-bg:#ece1be;--bs-table-hover-color:#000;color:#000;border-color:#e6dbb9}.table-danger{--bs-table-bg:#f8d7da;--bs-table-striped-bg:#eccccf;--bs-table-striped-color:#000;--bs-table-active-bg:#dfc2c4;--bs-table-active-color:#000;--bs-table-hover-bg:#e5c7ca;--bs-table-hover-color:#000;color:#000;border-color:#dfc2c4}.table-light{--bs-table-bg:#f8f9fa;--bs-table-striped-bg:#ecedee;--bs-table-striped-color:#000;--bs-table-active-bg:#dfe0e1;--bs-table-active-color:#000;--bs-table-hover-bg:#e5e6e7;--bs-table-hover-color:#000;color:#000;border-color:#dfe0e1}.table-dark{--bs-table-bg:#212529;--bs-table-striped-bg:#2c3034;--bs-table-striped-color:#fff;--bs-table-active-bg:#373b3e;--bs-table-active-color:#fff;--bs-table-hover-bg:#323539;--bs-table-hover-color:#fff;color:#fff;border-color:#373b3e}.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}@media (max-width:575.98px){.table-responsive-sm{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:767.98px){.table-responsive-md{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:991.98px){.table-responsive-lg{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1199.98px){.table-responsive-xl{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1399.98px){.table-responsive-xxl{overflow-x:auto;-webkit-overflow-scrolling:touch}}.form-label{margin-bottom:.5rem}.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem}.form-text{margin-top:.25rem;font-size:.875em;color:#6c757d}.form-control{display:block;width:100%;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control{transition:none}}.form-control[type=file]{overflow:hidden}.form-control[type=file]:not(:disabled):not([readonly]){cursor:pointer}.form-control:focus{color:#212529;background-color:#fff;border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-control::-webkit-date-and-time-value{height:1.5em}.form-control::-webkit-input-placeholder{color:#6c757d;opacity:1}.form-control::-moz-placeholder{color:#6c757d;opacity:1}.form-control::placeholder{color:#6c757d;opacity:1}.form-control:disabled,.form-control[readonly]{background-color:#e9ecef;opacity:1}.form-control::file-selector-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control::file-selector-button{transition:none}}.form-control:hover:not(:disabled):not([readonly])::file-selector-button{background-color:#dde0e3}.form-control::-webkit-file-upload-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;-webkit-transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control::-webkit-file-upload-button{-webkit-transition:none;transition:none}}.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button{background-color:#dde0e3}.form-control-plaintext{display:block;width:100%;padding:.375rem 0;margin-bottom:0;line-height:1.5;color:#212529;background-color:transparent;border:solid transparent;border-width:1px 0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{min-height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}.form-control-sm::file-selector-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-sm::-webkit-file-upload-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-lg{min-height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;border-radius:.3rem}.form-control-lg::file-selector-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.form-control-lg::-webkit-file-upload-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}textarea.form-control{min-height:calc(1.5em + .75rem + 2px)}textarea.form-control-sm{min-height:calc(1.5em + .5rem + 2px)}textarea.form-control-lg{min-height:calc(1.5em + 1rem + 2px)}.form-control-color{max-width:3rem;height:auto;padding:.375rem}.form-control-color:not(:disabled):not([readonly]){cursor:pointer}.form-control-color::-moz-color-swatch{height:1.5em;border-radius:.25rem}.form-control-color::-webkit-color-swatch{height:1.5em;border-radius:.25rem}.form-select{display:block;width:100%;padding:.375rem 2.25rem .375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right .75rem center;background-size:16px 12px;border:1px solid #ced4da;border-radius:.25rem;-webkit-appearance:none;-moz-appearance:none;appearance:none}.form-select:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-select[multiple],.form-select[size]:not([size="1"]){padding-right:.75rem;background-image:none}.form-select:disabled{color:#6c757d;background-color:#e9ecef}.form-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #212529}.form-select-sm{padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem}.form-select-lg{padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem}.form-check{display:block;min-height:1.5rem;padding-left:1.5em;margin-bottom:.125rem}.form-check .form-check-input{float:left;margin-left:-1.5em}.form-check-input{width:1em;height:1em;margin-top:.25em;vertical-align:top;background-color:#fff;background-repeat:no-repeat;background-position:center;background-size:contain;border:1px solid rgba(0,0,0,.25);-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact}.form-check-input[type=checkbox]{border-radius:.25em}.form-check-input[type=radio]{border-radius:50%}.form-check-input:active{filter:brightness(90%)}.form-check-input:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-check-input:checked{background-color:#0d6efd;border-color:#0d6efd}.form-check-input:checked[type=checkbox]{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e")}.form-check-input:checked[type=radio]{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e")}.form-check-input[type=checkbox]:indeterminate{background-color:#0d6efd;border-color:#0d6efd;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e")}.form-check-input:disabled{pointer-events:none;filter:none;opacity:.5}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{opacity:.5}.form-switch{padding-left:2.5em}.form-switch .form-check-input{width:2em;margin-left:-2.5em;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e");background-position:left center;border-radius:2em;transition:background-position .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-switch .form-check-input{transition:none}}.form-switch .form-check-input:focus{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2386b7fe'/%3e%3c/svg%3e")}.form-switch .form-check-input:checked{background-position:right center;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e")}.form-check-inline{display:inline-block;margin-right:1rem}.btn-check{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.btn-check:disabled+.btn,.btn-check[disabled]+.btn{pointer-events:none;filter:none;opacity:.65}.form-range{width:100%;height:1.5rem;padding:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.form-range:focus{outline:0}.form-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.form-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.form-range::-moz-focus-outer{border:0}.form-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#0d6efd;border:0;border-radius:1rem;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.form-range::-webkit-slider-thumb:active{background-color:#b6d4fe}.form-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.form-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#0d6efd;border:0;border-radius:1rem;-moz-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-range::-moz-range-thumb{-moz-transition:none;transition:none}}.form-range::-moz-range-thumb:active{background-color:#b6d4fe}.form-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.form-range:disabled{pointer-events:none}.form-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}.form-range:disabled::-moz-range-thumb{background-color:#adb5bd}.form-floating{position:relative}.form-floating>.form-control,.form-floating>.form-select{height:calc(3.5rem + 2px);padding:1rem .75rem}.form-floating>label{position:absolute;top:0;left:0;height:100%;padding:1rem .75rem;pointer-events:none;border:1px solid transparent;transform-origin:0 0;transition:opacity .1s ease-in-out,transform .1s ease-in-out}@media (prefers-reduced-motion:reduce){.form-floating>label{transition:none}}.form-floating>.form-control::-webkit-input-placeholder{color:transparent}.form-floating>.form-control::-moz-placeholder{color:transparent}.form-floating>.form-control::placeholder{color:transparent}.form-floating>.form-control:not(:-moz-placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:focus,.form-floating>.form-control:not(:placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:-webkit-autofill{padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-select{padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:not(:-moz-placeholder-shown)~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control:focus~label,.form-floating>.form-control:not(:placeholder-shown)~label,.form-floating>.form-select~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control:-webkit-autofill~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}.input-group>.form-control,.input-group>.form-select{position:relative;flex:1 1 auto;width:1%;min-width:0}.input-group>.form-control:focus,.input-group>.form-select:focus{z-index:3}.input-group .btn{position:relative;z-index:2}.input-group .btn:focus{z-index:3}.input-group-text{display:flex;align-items:center;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.25rem}.input-group-lg>.btn,.input-group-lg>.form-control,.input-group-lg>.form-select,.input-group-lg>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;border-radius:.3rem}.input-group-sm>.btn,.input-group-sm>.form-control,.input-group-sm>.form-select,.input-group-sm>.input-group-text{padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}.input-group-lg>.form-select,.input-group-sm>.form-select{padding-right:3rem}.input-group:not(.has-validation)>.dropdown-toggle:nth-last-child(n+3),.input-group:not(.has-validation)>:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu){border-top-right-radius:0;border-bottom-right-radius:0}.input-group.has-validation>.dropdown-toggle:nth-last-child(n+4),.input-group.has-validation>:nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback){margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#198754}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:rgba(25,135,84,.9);border-radius:.25rem}.is-valid~.valid-feedback,.is-valid~.valid-tooltip,.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip{display:block}.form-control.is-valid,.was-validated .form-control:valid{border-color:#198754;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:#198754;box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-valid,.was-validated .form-select:valid{border-color:#198754;padding-right:4.125rem;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"),url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-valid:focus,.was-validated .form-select:valid:focus{border-color:#198754;box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.form-check-input.is-valid,.was-validated .form-check-input:valid{border-color:#198754}.form-check-input.is-valid:checked,.was-validated .form-check-input:valid:checked{background-color:#198754}.form-check-input.is-valid:focus,.was-validated .form-check-input:valid:focus{box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#198754}.form-check-inline .form-check-input~.valid-feedback{margin-left:.5em}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#dc3545}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.25rem}.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip,.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip{display:block}.form-control.is-invalid,.was-validated .form-control:invalid{border-color:#dc3545;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.was-validated .form-control:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-invalid,.was-validated .form-select:invalid{border-color:#dc3545;padding-right:4.125rem;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"),url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-invalid:focus,.was-validated .form-select:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.form-check-input.is-invalid,.was-validated .form-check-input:invalid{border-color:#dc3545}.form-check-input.is-invalid:checked,.was-validated .form-check-input:invalid:checked{background-color:#dc3545}.form-check-input.is-invalid:focus,.was-validated .form-check-input:invalid:focus{box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#dc3545}.form-check-inline .form-check-input~.invalid-feedback{margin-left:.5em}.btn{display:inline-block;font-weight:400;line-height:1.5;color:#212529;text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:.375rem .75rem;font-size:1rem;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{color:#212529}.btn-check:focus+.btn,.btn:focus{outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.btn.disabled,.btn:disabled,fieldset:disabled .btn{pointer-events:none;opacity:.65}.btn-primary{color:#fff;background-color:#0d6efd;border-color:#0d6efd}.btn-primary:hover{color:#fff;background-color:#0b5ed7;border-color:#0a58ca}.btn-check:focus+.btn-primary,.btn-primary:focus{color:#fff;background-color:#0b5ed7;border-color:#0a58ca;box-shadow:0 0 0 .25rem rgba(49,132,253,.5)}.btn-check:active+.btn-primary,.btn-check:checked+.btn-primary,.btn-primary.active,.btn-primary:active,.show>.btn-primary.dropdown-toggle{color:#fff;background-color:#0a58ca;border-color:#0a53be}.btn-check:active+.btn-primary:focus,.btn-check:checked+.btn-primary:focus,.btn-primary.active:focus,.btn-primary:active:focus,.show>.btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(49,132,253,.5)}.btn-primary.disabled,.btn-primary:disabled{color:#fff;background-color:#0d6efd;border-color:#0d6efd}.btn-secondary{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:hover{color:#fff;background-color:#5c636a;border-color:#565e64}.btn-check:focus+.btn-secondary,.btn-secondary:focus{color:#fff;background-color:#5c636a;border-color:#565e64;box-shadow:0 0 0 .25rem rgba(130,138,145,.5)}.btn-check:active+.btn-secondary,.btn-check:checked+.btn-secondary,.btn-secondary.active,.btn-secondary:active,.show>.btn-secondary.dropdown-toggle{color:#fff;background-color:#565e64;border-color:#51585e}.btn-check:active+.btn-secondary:focus,.btn-check:checked+.btn-secondary:focus,.btn-secondary.active:focus,.btn-secondary:active:focus,.show>.btn-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(130,138,145,.5)}.btn-secondary.disabled,.btn-secondary:disabled{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-success{color:#fff;background-color:#198754;border-color:#198754}.btn-success:hover{color:#fff;background-color:#157347;border-color:#146c43}.btn-check:focus+.btn-success,.btn-success:focus{color:#fff;background-color:#157347;border-color:#146c43;box-shadow:0 0 0 .25rem rgba(60,153,110,.5)}.btn-check:active+.btn-success,.btn-check:checked+.btn-success,.btn-success.active,.btn-success:active,.show>.btn-success.dropdown-toggle{color:#fff;background-color:#146c43;border-color:#13653f}.btn-check:active+.btn-success:focus,.btn-check:checked+.btn-success:focus,.btn-success.active:focus,.btn-success:active:focus,.show>.btn-success.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(60,153,110,.5)}.btn-success.disabled,.btn-success:disabled{color:#fff;background-color:#198754;border-color:#198754}.btn-info{color:#000;background-color:#0dcaf0;border-color:#0dcaf0}.btn-info:hover{color:#000;background-color:#31d2f2;border-color:#25cff2}.btn-check:focus+.btn-info,.btn-info:focus{color:#000;background-color:#31d2f2;border-color:#25cff2;box-shadow:0 0 0 .25rem rgba(11,172,204,.5)}.btn-check:active+.btn-info,.btn-check:checked+.btn-info,.btn-info.active,.btn-info:active,.show>.btn-info.dropdown-toggle{color:#000;background-color:#3dd5f3;border-color:#25cff2}.btn-check:active+.btn-info:focus,.btn-check:checked+.btn-info:focus,.btn-info.active:focus,.btn-info:active:focus,.show>.btn-info.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(11,172,204,.5)}.btn-info.disabled,.btn-info:disabled{color:#000;background-color:#0dcaf0;border-color:#0dcaf0}.btn-warning{color:#000;background-color:#ffc107;border-color:#ffc107}.btn-warning:hover{color:#000;background-color:#ffca2c;border-color:#ffc720}.btn-check:focus+.btn-warning,.btn-warning:focus{color:#000;background-color:#ffca2c;border-color:#ffc720;box-shadow:0 0 0 .25rem rgba(217,164,6,.5)}.btn-check:active+.btn-warning,.btn-check:checked+.btn-warning,.btn-warning.active,.btn-warning:active,.show>.btn-warning.dropdown-toggle{color:#000;background-color:#ffcd39;border-color:#ffc720}.btn-check:active+.btn-warning:focus,.btn-check:checked+.btn-warning:focus,.btn-warning.active:focus,.btn-warning:active:focus,.show>.btn-warning.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(217,164,6,.5)}.btn-warning.disabled,.btn-warning:disabled{color:#000;background-color:#ffc107;border-color:#ffc107}.btn-danger{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:hover{color:#fff;background-color:#bb2d3b;border-color:#b02a37}.btn-check:focus+.btn-danger,.btn-danger:focus{color:#fff;background-color:#bb2d3b;border-color:#b02a37;box-shadow:0 0 0 .25rem rgba(225,83,97,.5)}.btn-check:active+.btn-danger,.btn-check:checked+.btn-danger,.btn-danger.active,.btn-danger:active,.show>.btn-danger.dropdown-toggle{color:#fff;background-color:#b02a37;border-color:#a52834}.btn-check:active+.btn-danger:focus,.btn-check:checked+.btn-danger:focus,.btn-danger.active:focus,.btn-danger:active:focus,.show>.btn-danger.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(225,83,97,.5)}.btn-danger.disabled,.btn-danger:disabled{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-light{color:#000;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:hover{color:#000;background-color:#f9fafb;border-color:#f9fafb}.btn-check:focus+.btn-light,.btn-light:focus{color:#000;background-color:#f9fafb;border-color:#f9fafb;box-shadow:0 0 0 .25rem rgba(211,212,213,.5)}.btn-check:active+.btn-light,.btn-check:checked+.btn-light,.btn-light.active,.btn-light:active,.show>.btn-light.dropdown-toggle{color:#000;background-color:#f9fafb;border-color:#f9fafb}.btn-check:active+.btn-light:focus,.btn-check:checked+.btn-light:focus,.btn-light.active:focus,.btn-light:active:focus,.show>.btn-light.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(211,212,213,.5)}.btn-light.disabled,.btn-light:disabled{color:#000;background-color:#f8f9fa;border-color:#f8f9fa}.btn-dark{color:#fff;background-color:#212529;border-color:#212529}.btn-dark:hover{color:#fff;background-color:#1c1f23;border-color:#1a1e21}.btn-check:focus+.btn-dark,.btn-dark:focus{color:#fff;background-color:#1c1f23;border-color:#1a1e21;box-shadow:0 0 0 .25rem rgba(66,70,73,.5)}.btn-check:active+.btn-dark,.btn-check:checked+.btn-dark,.btn-dark.active,.btn-dark:active,.show>.btn-dark.dropdown-toggle{color:#fff;background-color:#1a1e21;border-color:#191c1f}.btn-check:active+.btn-dark:focus,.btn-check:checked+.btn-dark:focus,.btn-dark.active:focus,.btn-dark:active:focus,.show>.btn-dark.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(66,70,73,.5)}.btn-dark.disabled,.btn-dark:disabled{color:#fff;background-color:#212529;border-color:#212529}.btn-outline-primary{color:#0d6efd;border-color:#0d6efd}.btn-outline-primary:hover{color:#fff;background-color:#0d6efd;border-color:#0d6efd}.btn-check:focus+.btn-outline-primary,.btn-outline-primary:focus{box-shadow:0 0 0 .25rem rgba(13,110,253,.5)}.btn-check:active+.btn-outline-primary,.btn-check:checked+.btn-outline-primary,.btn-outline-primary.active,.btn-outline-primary.dropdown-toggle.show,.btn-outline-primary:active{color:#fff;background-color:#0d6efd;border-color:#0d6efd}.btn-check:active+.btn-outline-primary:focus,.btn-check:checked+.btn-outline-primary:focus,.btn-outline-primary.active:focus,.btn-outline-primary.dropdown-toggle.show:focus,.btn-outline-primary:active:focus{box-shadow:0 0 0 .25rem rgba(13,110,253,.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{color:#0d6efd;background-color:transparent}.btn-outline-secondary{color:#6c757d;border-color:#6c757d}.btn-outline-secondary:hover{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-check:focus+.btn-outline-secondary,.btn-outline-secondary:focus{box-shadow:0 0 0 .25rem rgba(108,117,125,.5)}.btn-check:active+.btn-outline-secondary,.btn-check:checked+.btn-outline-secondary,.btn-outline-secondary.active,.btn-outline-secondary.dropdown-toggle.show,.btn-outline-secondary:active{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-check:active+.btn-outline-secondary:focus,.btn-check:checked+.btn-outline-secondary:focus,.btn-outline-secondary.active:focus,.btn-outline-secondary.dropdown-toggle.show:focus,.btn-outline-secondary:active:focus{box-shadow:0 0 0 .25rem rgba(108,117,125,.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{color:#6c757d;background-color:transparent}.btn-outline-success{color:#198754;border-color:#198754}.btn-outline-success:hover{color:#fff;background-color:#198754;border-color:#198754}.btn-check:focus+.btn-outline-success,.btn-outline-success:focus{box-shadow:0 0 0 .25rem rgba(25,135,84,.5)}.btn-check:active+.btn-outline-success,.btn-check:checked+.btn-outline-success,.btn-outline-success.active,.btn-outline-success.dropdown-toggle.show,.btn-outline-success:active{color:#fff;background-color:#198754;border-color:#198754}.btn-check:active+.btn-outline-success:focus,.btn-check:checked+.btn-outline-success:focus,.btn-outline-success.active:focus,.btn-outline-success.dropdown-toggle.show:focus,.btn-outline-success:active:focus{box-shadow:0 0 0 .25rem rgba(25,135,84,.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{color:#198754;background-color:transparent}.btn-outline-info{color:#0dcaf0;border-color:#0dcaf0}.btn-outline-info:hover{color:#000;background-color:#0dcaf0;border-color:#0dcaf0}.btn-check:focus+.btn-outline-info,.btn-outline-info:focus{box-shadow:0 0 0 .25rem rgba(13,202,240,.5)}.btn-check:active+.btn-outline-info,.btn-check:checked+.btn-outline-info,.btn-outline-info.active,.btn-outline-info.dropdown-toggle.show,.btn-outline-info:active{color:#000;background-color:#0dcaf0;border-color:#0dcaf0}.btn-check:active+.btn-outline-info:focus,.btn-check:checked+.btn-outline-info:focus,.btn-outline-info.active:focus,.btn-outline-info.dropdown-toggle.show:focus,.btn-outline-info:active:focus{box-shadow:0 0 0 .25rem rgba(13,202,240,.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{color:#0dcaf0;background-color:transparent}.btn-outline-warning{color:#ffc107;border-color:#ffc107}.btn-outline-warning:hover{color:#000;background-color:#ffc107;border-color:#ffc107}.btn-check:focus+.btn-outline-warning,.btn-outline-warning:focus{box-shadow:0 0 0 .25rem rgba(255,193,7,.5)}.btn-check:active+.btn-outline-warning,.btn-check:checked+.btn-outline-warning,.btn-outline-warning.active,.btn-outline-warning.dropdown-toggle.show,.btn-outline-warning:active{color:#000;background-color:#ffc107;border-color:#ffc107}.btn-check:active+.btn-outline-warning:focus,.btn-check:checked+.btn-outline-warning:focus,.btn-outline-warning.active:focus,.btn-outline-warning.dropdown-toggle.show:focus,.btn-outline-warning:active:focus{box-shadow:0 0 0 .25rem rgba(255,193,7,.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{color:#ffc107;background-color:transparent}.btn-outline-danger{color:#dc3545;border-color:#dc3545}.btn-outline-danger:hover{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-check:focus+.btn-outline-danger,.btn-outline-danger:focus{box-shadow:0 0 0 .25rem rgba(220,53,69,.5)}.btn-check:active+.btn-outline-danger,.btn-check:checked+.btn-outline-danger,.btn-outline-danger.active,.btn-outline-danger.dropdown-toggle.show,.btn-outline-danger:active{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-check:active+.btn-outline-danger:focus,.btn-check:checked+.btn-outline-danger:focus,.btn-outline-danger.active:focus,.btn-outline-danger.dropdown-toggle.show:focus,.btn-outline-danger:active:focus{box-shadow:0 0 0 .25rem rgba(220,53,69,.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{color:#dc3545;background-color:transparent}.btn-outline-light{color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:hover{color:#000;background-color:#f8f9fa;border-color:#f8f9fa}.btn-check:focus+.btn-outline-light,.btn-outline-light:focus{box-shadow:0 0 0 .25rem rgba(248,249,250,.5)}.btn-check:active+.btn-outline-light,.btn-check:checked+.btn-outline-light,.btn-outline-light.active,.btn-outline-light.dropdown-toggle.show,.btn-outline-light:active{color:#000;background-color:#f8f9fa;border-color:#f8f9fa}.btn-check:active+.btn-outline-light:focus,.btn-check:checked+.btn-outline-light:focus,.btn-outline-light.active:focus,.btn-outline-light.dropdown-toggle.show:focus,.btn-outline-light:active:focus{box-shadow:0 0 0 .25rem rgba(248,249,250,.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{color:#f8f9fa;background-color:transparent}.btn-outline-dark{color:#212529;border-color:#212529}.btn-outline-dark:hover{color:#fff;background-color:#212529;border-color:#212529}.btn-check:focus+.btn-outline-dark,.btn-outline-dark:focus{box-shadow:0 0 0 .25rem rgba(33,37,41,.5)}.btn-check:active+.btn-outline-dark,.btn-check:checked+.btn-outline-dark,.btn-outline-dark.active,.btn-outline-dark.dropdown-toggle.show,.btn-outline-dark:active{color:#fff;background-color:#212529;border-color:#212529}.btn-check:active+.btn-outline-dark:focus,.btn-check:checked+.btn-outline-dark:focus,.btn-outline-dark.active:focus,.btn-outline-dark.dropdown-toggle.show:focus,.btn-outline-dark:active:focus{box-shadow:0 0 0 .25rem rgba(33,37,41,.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{color:#212529;background-color:transparent}.btn-link{font-weight:400;color:#0d6efd;text-decoration:underline}.btn-link:hover{color:#0a58ca}.btn-link.disabled,.btn-link:disabled{color:#6c757d}.btn-group-lg>.btn,.btn-lg{padding:.5rem 1rem;font-size:1.25rem;border-radius:.3rem}.btn-group-sm>.btn,.btn-sm{padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}.fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.dropdown,.dropend,.dropstart,.dropup{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{position:absolute;top:100%;z-index:1000;display:none;min-width:10rem;padding:.5rem 0;margin:0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.dropdown-menu[data-bs-popper]{left:0;margin-top:.125rem}.dropdown-menu-start{--bs-position:start}.dropdown-menu-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-end{--bs-position:end}.dropdown-menu-end[data-bs-popper]{right:0;left:auto}@media (min-width:576px){.dropdown-menu-sm-start{--bs-position:start}.dropdown-menu-sm-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-sm-end{--bs-position:end}.dropdown-menu-sm-end[data-bs-popper]{right:0;left:auto}}@media (min-width:768px){.dropdown-menu-md-start{--bs-position:start}.dropdown-menu-md-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-md-end{--bs-position:end}.dropdown-menu-md-end[data-bs-popper]{right:0;left:auto}}@media (min-width:992px){.dropdown-menu-lg-start{--bs-position:start}.dropdown-menu-lg-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-lg-end{--bs-position:end}.dropdown-menu-lg-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1200px){.dropdown-menu-xl-start{--bs-position:start}.dropdown-menu-xl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xl-end{--bs-position:end}.dropdown-menu-xl-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1400px){.dropdown-menu-xxl-start{--bs-position:start}.dropdown-menu-xxl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xxl-end{--bs-position:end}.dropdown-menu-xxl-end[data-bs-popper]{right:0;left:auto}}.dropup .dropdown-menu{top:auto;bottom:100%}.dropup .dropdown-menu[data-bs-popper]{margin-top:0;margin-bottom:.125rem}.dropup .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-menu{top:0;right:auto;left:100%}.dropend .dropdown-menu[data-bs-popper]{margin-top:0;margin-left:.125rem}.dropend .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropend .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-toggle::after{vertical-align:0}.dropstart .dropdown-menu{top:0;right:100%;left:auto}.dropstart .dropdown-menu[data-bs-popper]{margin-top:0;margin-right:.125rem}.dropstart .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:""}.dropstart .dropdown-toggle::after{display:none}.dropstart .dropdown-toggle::before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropstart .dropdown-toggle:empty::after{margin-left:0}.dropstart .dropdown-toggle::before{vertical-align:0}.dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid rgba(0,0,0,.15)}.dropdown-item{display:block;width:100%;padding:.25rem 1rem;clear:both;font-weight:400;color:#212529;text-align:inherit;text-decoration:none;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:focus,.dropdown-item:hover{color:#1e2125;background-color:#e9ecef}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#0d6efd}.dropdown-item.disabled,.dropdown-item:disabled{color:#adb5bd;pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:.5rem 1rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}.dropdown-item-text{display:block;padding:.25rem 1rem;color:#212529}.dropdown-menu-dark{color:#dee2e6;background-color:#343a40;border-color:rgba(0,0,0,.15)}.dropdown-menu-dark .dropdown-item{color:#dee2e6}.dropdown-menu-dark .dropdown-item:focus,.dropdown-menu-dark .dropdown-item:hover{color:#fff;background-color:rgba(255,255,255,.15)}.dropdown-menu-dark .dropdown-item.active,.dropdown-menu-dark .dropdown-item:active{color:#fff;background-color:#0d6efd}.dropdown-menu-dark .dropdown-item.disabled,.dropdown-menu-dark .dropdown-item:disabled{color:#adb5bd}.dropdown-menu-dark .dropdown-divider{border-color:rgba(0,0,0,.15)}.dropdown-menu-dark .dropdown-item-text{color:#dee2e6}.dropdown-menu-dark .dropdown-header{color:#adb5bd}.btn-group,.btn-group-vertical{position:relative;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;flex:1 1 auto}.btn-group-vertical>.btn-check:checked+.btn,.btn-group-vertical>.btn-check:focus+.btn,.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn-check:checked+.btn,.btn-group>.btn-check:focus+.btn,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:1}.btn-toolbar{display:flex;flex-wrap:wrap;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group>.btn-group:not(:first-child),.btn-group>.btn:not(:first-child){margin-left:-1px}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:nth-child(n+3),.btn-group>:not(.btn-check)+.btn{border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split::after,.dropend .dropdown-toggle-split::after,.dropup .dropdown-toggle-split::after{margin-left:0}.dropstart .dropdown-toggle-split::before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{flex-direction:column;align-items:flex-start;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:-1px}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn~.btn{border-top-left-radius:0;border-top-right-radius:0}.nav{display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:.5rem 1rem;text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out}@media (prefers-reduced-motion:reduce){.nav-link{transition:none}}.nav-link.disabled{color:#6c757d;pointer-events:none;cursor:default}.nav-tabs{border-bottom:1px solid #dee2e6}.nav-tabs .nav-link{margin-bottom:-1px;background:0 0;border:1px solid transparent;border-top-left-radius:.25rem;border-top-right-radius:.25rem}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{border-color:#e9ecef #e9ecef #dee2e6;isolation:isolate}.nav-tabs .nav-link.disabled{color:#6c757d;background-color:transparent;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:#495057;background-color:#fff;border-color:#dee2e6 #dee2e6 #fff}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.nav-pills .nav-link{background:0 0;border:0;border-radius:.25rem}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fff;background-color:#0d6efd}.nav-fill .nav-item,.nav-fill>.nav-link{flex:1 1 auto;text-align:center}.nav-justified .nav-item,.nav-justified>.nav-link{flex-basis:0;flex-grow:1;text-align:center}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;padding-top:.5rem;padding-bottom:.5rem}.navbar>.container,.navbar>.container-fluid,.navbar>.container-lg,.navbar>.container-md,.navbar>.container-sm,.navbar>.container-xl,.navbar>.container-xxl{display:flex;flex-wrap:inherit;align-items:center;justify-content:space-between}.navbar-brand{padding-top:.3125rem;padding-bottom:.3125rem;margin-right:1rem;font-size:1.25rem;text-decoration:none;white-space:nowrap}.navbar-nav{display:flex;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link{padding-right:0;padding-left:0}.navbar-nav .dropdown-menu{position:static}.navbar-text{padding-top:.5rem;padding-bottom:.5rem}.navbar-collapse{flex-basis:100%;flex-grow:1;align-items:center}.navbar-toggler{padding:.25rem .75rem;font-size:1.25rem;line-height:1;background-color:transparent;border:1px solid transparent;border-radius:.25rem;transition:box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.navbar-toggler{transition:none}}.navbar-toggler:hover{text-decoration:none}.navbar-toggler:focus{text-decoration:none;outline:0;box-shadow:0 0 0 .25rem}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;background-repeat:no-repeat;background-position:center;background-size:100%}.navbar-nav-scroll{max-height:var(--bs-scroll-height,75vh);overflow-y:auto}@media (min-width:576px){.navbar-expand-sm{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}}@media (min-width:768px){.navbar-expand-md{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}}@media (min-width:992px){.navbar-expand-lg{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}}@media (min-width:1200px){.navbar-expand-xl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xl .navbar-nav{flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}}@media (min-width:1400px){.navbar-expand-xxl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xxl .navbar-nav{flex-direction:row}.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xxl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xxl .navbar-nav-scroll{overflow:visible}.navbar-expand-xxl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xxl .navbar-toggler{display:none}}.navbar-expand{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-light .navbar-brand{color:rgba(0,0,0,.9)}.navbar-light .navbar-brand:focus,.navbar-light .navbar-brand:hover{color:rgba(0,0,0,.9)}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.55)}.navbar-light .navbar-nav .nav-link:focus,.navbar-light .navbar-nav .nav-link:hover{color:rgba(0,0,0,.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(0,0,0,.3)}.navbar-light .navbar-nav .nav-link.active,.navbar-light .navbar-nav .show>.nav-link{color:rgba(0,0,0,.9)}.navbar-light .navbar-toggler{color:rgba(0,0,0,.55);border-color:rgba(0,0,0,.1)}.navbar-light .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-light .navbar-text{color:rgba(0,0,0,.55)}.navbar-light .navbar-text a,.navbar-light .navbar-text a:focus,.navbar-light .navbar-text a:hover{color:rgba(0,0,0,.9)}.navbar-dark .navbar-brand{color:#fff}.navbar-dark .navbar-brand:focus,.navbar-dark .navbar-brand:hover{color:#fff}.navbar-dark .navbar-nav .nav-link{color:rgba(255,255,255,.55)}.navbar-dark .navbar-nav .nav-link:focus,.navbar-dark .navbar-nav .nav-link:hover{color:rgba(255,255,255,.75)}.navbar-dark .navbar-nav .nav-link.disabled{color:rgba(255,255,255,.25)}.navbar-dark .navbar-nav .nav-link.active,.navbar-dark .navbar-nav .show>.nav-link{color:#fff}.navbar-dark .navbar-toggler{color:rgba(255,255,255,.55);border-color:rgba(255,255,255,.1)}.navbar-dark .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-dark .navbar-text{color:rgba(255,255,255,.55)}.navbar-dark .navbar-text a,.navbar-dark .navbar-text a:focus,.navbar-dark .navbar-text a:hover{color:#fff}.card{position:relative;display:flex;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid rgba(0,0,0,.125);border-radius:.25rem}.card>hr{margin-right:0;margin-left:0}.card>.list-group{border-top:inherit;border-bottom:inherit}.card>.list-group:first-child{border-top-width:0;border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card>.list-group:last-child{border-bottom-width:0;border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card>.card-header+.list-group,.card>.list-group+.card-footer{border-top:0}.card-body{flex:1 1 auto;padding:1rem 1rem}.card-title{margin-bottom:.5rem}.card-subtitle{margin-top:-.25rem;margin-bottom:0}.card-text:last-child{margin-bottom:0}.card-link:hover{text-decoration:none}.card-link+.card-link{margin-left:1rem}.card-header{padding:.5rem 1rem;margin-bottom:0;background-color:rgba(0,0,0,.03);border-bottom:1px solid rgba(0,0,0,.125)}.card-header:first-child{border-radius:calc(.25rem - 1px) calc(.25rem - 1px) 0 0}.card-footer{padding:.5rem 1rem;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.125)}.card-footer:last-child{border-radius:0 0 calc(.25rem - 1px) calc(.25rem - 1px)}.card-header-tabs{margin-right:-.5rem;margin-bottom:-.5rem;margin-left:-.5rem;border-bottom:0}.card-header-pills{margin-right:-.5rem;margin-left:-.5rem}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1rem;border-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom,.card-img-top{width:100%}.card-img,.card-img-top{border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom{border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card-group>.card{margin-bottom:.75rem}@media (min-width:576px){.card-group{display:flex;flex-flow:row wrap}.card-group>.card{flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child) .card-header,.card-group>.card:not(:last-child) .card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-footer,.card-group>.card:not(:last-child) .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child) .card-header,.card-group>.card:not(:first-child) .card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-footer,.card-group>.card:not(:first-child) .card-img-bottom{border-bottom-left-radius:0}}.accordion-button{position:relative;display:flex;align-items:center;width:100%;padding:1rem 1.25rem;font-size:1rem;color:#212529;text-align:left;background-color:transparent;border:1px solid rgba(0,0,0,.125);border-radius:0;overflow-anchor:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,border-radius .15s ease}@media (prefers-reduced-motion:reduce){.accordion-button{transition:none}}.accordion-button.collapsed{border-bottom-width:0}.accordion-button:not(.collapsed){color:#0c63e4;background-color:#e7f1ff}.accordion-button:not(.collapsed)::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230c63e4'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");transform:rotate(180deg)}.accordion-button::after{flex-shrink:0;width:1.25rem;height:1.25rem;margin-left:auto;content:"";background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");background-repeat:no-repeat;background-size:1.25rem;transition:transform .2s ease-in-out}@media (prefers-reduced-motion:reduce){.accordion-button::after{transition:none}}.accordion-button:hover{z-index:2}.accordion-button:focus{z-index:3;border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.accordion-header{margin-bottom:0}.accordion-item:first-of-type .accordion-button{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.accordion-item:last-of-type .accordion-button.collapsed{border-bottom-width:1px;border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.accordion-item:last-of-type .accordion-collapse{border-bottom-width:1px;border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.accordion-collapse{border:solid rgba(0,0,0,.125);border-width:0 1px}.accordion-body{padding:1rem 1.25rem}.accordion-flush .accordion-button{border-right:0;border-left:0;border-radius:0}.accordion-flush .accordion-collapse{border-width:0}.accordion-flush .accordion-item:first-of-type .accordion-button{border-top-width:0;border-top-left-radius:0;border-top-right-radius:0}.accordion-flush .accordion-item:last-of-type .accordion-button.collapsed{border-bottom-width:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.breadcrumb{display:flex;flex-wrap:wrap;padding:0 0;margin-bottom:1rem;list-style:none}.breadcrumb-item+.breadcrumb-item{padding-left:.5rem}.breadcrumb-item+.breadcrumb-item::before{float:left;padding-right:.5rem;color:#6c757d;content:var(--bs-breadcrumb-divider, "/")}.breadcrumb-item.active{color:#6c757d}.pagination{display:flex;padding-left:0;list-style:none}.page-link{position:relative;display:block;color:#0d6efd;text-decoration:none;background-color:#fff;border:1px solid #dee2e6;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.page-link{transition:none}}.page-link:hover{z-index:2;color:#0a58ca;background-color:#e9ecef;border-color:#dee2e6}.page-link:focus{z-index:3;color:#0a58ca;background-color:#e9ecef;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.page-item:not(:first-child) .page-link{margin-left:-1px}.page-item.active .page-link{z-index:3;color:#fff;background-color:#0d6efd;border-color:#0d6efd}.page-item.disabled .page-link{color:#6c757d;pointer-events:none;background-color:#fff;border-color:#dee2e6}.page-link{padding:.375rem .75rem}.page-item:first-child .page-link{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.page-item:last-child .page-link{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.pagination-lg .page-link{padding:.75rem 1.5rem;font-size:1.25rem}.pagination-lg .page-item:first-child .page-link{border-top-left-radius:.3rem;border-bottom-left-radius:.3rem}.pagination-lg .page-item:last-child .page-link{border-top-right-radius:.3rem;border-bottom-right-radius:.3rem}.pagination-sm .page-link{padding:.25rem .5rem;font-size:.875rem}.pagination-sm .page-item:first-child .page-link{border-top-left-radius:.2rem;border-bottom-left-radius:.2rem}.pagination-sm .page-item:last-child .page-link{border-top-right-radius:.2rem;border-bottom-right-radius:.2rem}.badge{display:inline-block;padding:.35em .65em;font-size:.75em;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.alert{position:relative;padding:1rem 1rem;margin-bottom:1rem;border:1px solid transparent;border-radius:.25rem}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:3rem}.alert-dismissible .btn-close{position:absolute;top:0;right:0;z-index:2;padding:1.25rem 1rem}.alert-primary{color:#084298;background-color:#cfe2ff;border-color:#b6d4fe}.alert-primary .alert-link{color:#06357a}.alert-secondary{color:#41464b;background-color:#e2e3e5;border-color:#d3d6d8}.alert-secondary .alert-link{color:#34383c}.alert-success{color:#0f5132;background-color:#d1e7dd;border-color:#badbcc}.alert-success .alert-link{color:#0c4128}.alert-info{color:#055160;background-color:#cff4fc;border-color:#b6effb}.alert-info .alert-link{color:#04414d}.alert-warning{color:#664d03;background-color:#fff3cd;border-color:#ffecb5}.alert-warning .alert-link{color:#523e02}.alert-danger{color:#842029;background-color:#f8d7da;border-color:#f5c2c7}.alert-danger .alert-link{color:#6a1a21}.alert-light{color:#636464;background-color:#fefefe;border-color:#fdfdfe}.alert-light .alert-link{color:#4f5050}.alert-dark{color:#141619;background-color:#d3d3d4;border-color:#bcbebf}.alert-dark .alert-link{color:#101214}@-webkit-keyframes progress-bar-stripes{0%{background-position-x:1rem}}@keyframes progress-bar-stripes{0%{background-position-x:1rem}}.progress{display:flex;height:1rem;overflow:hidden;font-size:.75rem;background-color:#e9ecef;border-radius:.25rem}.progress-bar{display:flex;flex-direction:column;justify-content:center;overflow:hidden;color:#fff;text-align:center;white-space:nowrap;background-color:#0d6efd;transition:width .6s ease}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:1rem 1rem}.progress-bar-animated{-webkit-animation:1s linear infinite progress-bar-stripes;animation:1s linear infinite progress-bar-stripes}@media (prefers-reduced-motion:reduce){.progress-bar-animated{-webkit-animation:none;animation:none}}.list-group{display:flex;flex-direction:column;padding-left:0;margin-bottom:0;border-radius:.25rem}.list-group-item-action{width:100%;color:#495057;text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{z-index:1;color:#495057;text-decoration:none;background-color:#f8f9fa}.list-group-item-action:active{color:#212529;background-color:#e9ecef}.list-group-item{position:relative;display:block;padding:.5rem 1rem;text-decoration:none;background-color:#fff;border:1px solid rgba(0,0,0,.125)}.list-group-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.list-group-item:last-child{border-bottom-right-radius:inherit;border-bottom-left-radius:inherit}.list-group-item.disabled,.list-group-item:disabled{color:#6c757d;pointer-events:none;background-color:#fff}.list-group-item.active{z-index:2;color:#fff;background-color:#0d6efd;border-color:#0d6efd}.list-group-item+.list-group-item{border-top-width:0}.list-group-item+.list-group-item.active{margin-top:-1px;border-top-width:1px}.list-group-horizontal{flex-direction:row}.list-group-horizontal>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal>.list-group-item.active{margin-top:0}.list-group-horizontal>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}@media (min-width:576px){.list-group-horizontal-sm{flex-direction:row}.list-group-horizontal-sm>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-sm>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-sm>.list-group-item.active{margin-top:0}.list-group-horizontal-sm>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-sm>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:768px){.list-group-horizontal-md{flex-direction:row}.list-group-horizontal-md>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-md>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-md>.list-group-item.active{margin-top:0}.list-group-horizontal-md>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-md>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:992px){.list-group-horizontal-lg{flex-direction:row}.list-group-horizontal-lg>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-lg>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-lg>.list-group-item.active{margin-top:0}.list-group-horizontal-lg>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-lg>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:1200px){.list-group-horizontal-xl{flex-direction:row}.list-group-horizontal-xl>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-xl>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-xl>.list-group-item.active{margin-top:0}.list-group-horizontal-xl>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-xl>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:1400px){.list-group-horizontal-xxl{flex-direction:row}.list-group-horizontal-xxl>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-xxl>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-xxl>.list-group-item.active{margin-top:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}.list-group-flush{border-radius:0}.list-group-flush>.list-group-item{border-width:0 0 1px}.list-group-flush>.list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{color:#084298;background-color:#cfe2ff}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#084298;background-color:#bacbe6}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#084298;border-color:#084298}.list-group-item-secondary{color:#41464b;background-color:#e2e3e5}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#41464b;background-color:#cbccce}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#41464b;border-color:#41464b}.list-group-item-success{color:#0f5132;background-color:#d1e7dd}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#0f5132;background-color:#bcd0c7}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#0f5132;border-color:#0f5132}.list-group-item-info{color:#055160;background-color:#cff4fc}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#055160;background-color:#badce3}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#055160;border-color:#055160}.list-group-item-warning{color:#664d03;background-color:#fff3cd}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#664d03;background-color:#e6dbb9}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#664d03;border-color:#664d03}.list-group-item-danger{color:#842029;background-color:#f8d7da}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#842029;background-color:#dfc2c4}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#842029;border-color:#842029}.list-group-item-light{color:#636464;background-color:#fefefe}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#636464;background-color:#e5e5e5}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#636464;border-color:#636464}.list-group-item-dark{color:#141619;background-color:#d3d3d4}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#141619;background-color:#bebebf}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#141619;border-color:#141619}.btn-close{box-sizing:content-box;width:1em;height:1em;padding:.25em .25em;color:#000;background:transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;border:0;border-radius:.25rem;opacity:.5}.btn-close:hover{color:#000;text-decoration:none;opacity:.75}.btn-close:focus{outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25);opacity:1}.btn-close.disabled,.btn-close:disabled{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:.25}.btn-close-white{filter:invert(1) grayscale(100%) brightness(200%)}.toast{width:350px;max-width:100%;font-size:.875rem;pointer-events:auto;background-color:rgba(255,255,255,.85);background-clip:padding-box;border:1px solid rgba(0,0,0,.1);box-shadow:0 .5rem 1rem rgba(0,0,0,.15);border-radius:.25rem}.toast:not(.showing):not(.show){opacity:0}.toast.hide{display:none}.toast-container{width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:100%;pointer-events:none}.toast-container>:not(:last-child){margin-bottom:.75rem}.toast-header{display:flex;align-items:center;padding:.5rem .75rem;color:#6c757d;background-color:rgba(255,255,255,.85);background-clip:padding-box;border-bottom:1px solid rgba(0,0,0,.05);border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.toast-header .btn-close{margin-right:-.375rem;margin-left:.75rem}.toast-body{padding:.75rem;word-wrap:break-word}.modal-open{overflow:hidden}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal{position:fixed;top:0;left:0;z-index:1050;display:none;width:100%;height:100%;overflow:hidden;outline:0}.modal-dialog{position:relative;width:auto;margin:.5rem;pointer-events:none}.modal.fade .modal-dialog{transition:transform .3s ease-out;transform:translate(0,-50px)}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{transform:none}.modal.modal-static .modal-dialog{transform:scale(1.02)}.modal-dialog-scrollable{height:calc(100% - 1rem)}.modal-dialog-scrollable .modal-content{max-height:100%;overflow:hidden}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - 1rem)}.modal-content{position:relative;display:flex;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;outline:0}.modal-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.5}.modal-header{display:flex;flex-shrink:0;align-items:center;justify-content:space-between;padding:1rem 1rem;border-bottom:1px solid #dee2e6;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.modal-header .btn-close{padding:.5rem .5rem;margin:-.5rem -.5rem -.5rem auto}.modal-title{margin-bottom:0;line-height:1.5}.modal-body{position:relative;flex:1 1 auto;padding:1rem}.modal-footer{display:flex;flex-wrap:wrap;flex-shrink:0;align-items:center;justify-content:flex-end;padding:.75rem;border-top:1px solid #dee2e6;border-bottom-right-radius:calc(.3rem - 1px);border-bottom-left-radius:calc(.3rem - 1px)}.modal-footer>*{margin:.25rem}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:576px){.modal-dialog{max-width:500px;margin:1.75rem auto}.modal-dialog-scrollable{height:calc(100% - 3.5rem)}.modal-dialog-centered{min-height:calc(100% - 3.5rem)}.modal-sm{max-width:300px}}@media (min-width:992px){.modal-lg,.modal-xl{max-width:800px}}@media (min-width:1200px){.modal-xl{max-width:1140px}}.modal-fullscreen{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen .modal-header{border-radius:0}.modal-fullscreen .modal-body{overflow-y:auto}.modal-fullscreen .modal-footer{border-radius:0}@media (max-width:575.98px){.modal-fullscreen-sm-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-sm-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-sm-down .modal-header{border-radius:0}.modal-fullscreen-sm-down .modal-body{overflow-y:auto}.modal-fullscreen-sm-down .modal-footer{border-radius:0}}@media (max-width:767.98px){.modal-fullscreen-md-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-md-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-md-down .modal-header{border-radius:0}.modal-fullscreen-md-down .modal-body{overflow-y:auto}.modal-fullscreen-md-down .modal-footer{border-radius:0}}@media (max-width:991.98px){.modal-fullscreen-lg-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-lg-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-lg-down .modal-header{border-radius:0}.modal-fullscreen-lg-down .modal-body{overflow-y:auto}.modal-fullscreen-lg-down .modal-footer{border-radius:0}}@media (max-width:1199.98px){.modal-fullscreen-xl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xl-down .modal-header{border-radius:0}.modal-fullscreen-xl-down .modal-body{overflow-y:auto}.modal-fullscreen-xl-down .modal-footer{border-radius:0}}@media (max-width:1399.98px){.modal-fullscreen-xxl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xxl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xxl-down .modal-header{border-radius:0}.modal-fullscreen-xxl-down .modal-body{overflow-y:auto}.modal-fullscreen-xxl-down .modal-footer{border-radius:0}}.tooltip{position:absolute;z-index:1070;display:block;margin:0;font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;opacity:0}.tooltip.show{opacity:.9}.tooltip .tooltip-arrow{position:absolute;display:block;width:.8rem;height:.4rem}.tooltip .tooltip-arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[data-popper-placement^=top],.bs-tooltip-top{padding:.4rem 0}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow,.bs-tooltip-top .tooltip-arrow{bottom:0}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before,.bs-tooltip-top .tooltip-arrow::before{top:-1px;border-width:.4rem .4rem 0;border-top-color:#000}.bs-tooltip-auto[data-popper-placement^=right],.bs-tooltip-end{padding:0 .4rem}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow,.bs-tooltip-end .tooltip-arrow{left:0;width:.4rem;height:.8rem}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow::before,.bs-tooltip-end .tooltip-arrow::before{right:-1px;border-width:.4rem .4rem .4rem 0;border-right-color:#000}.bs-tooltip-auto[data-popper-placement^=bottom],.bs-tooltip-bottom{padding:.4rem 0}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow,.bs-tooltip-bottom .tooltip-arrow{top:0}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before,.bs-tooltip-bottom .tooltip-arrow::before{bottom:-1px;border-width:0 .4rem .4rem;border-bottom-color:#000}.bs-tooltip-auto[data-popper-placement^=left],.bs-tooltip-start{padding:0 .4rem}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow,.bs-tooltip-start .tooltip-arrow{right:0;width:.4rem;height:.8rem}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow::before,.bs-tooltip-start .tooltip-arrow::before{left:-1px;border-width:.4rem 0 .4rem .4rem;border-left-color:#000}.tooltip-inner{max-width:200px;padding:.25rem .5rem;color:#fff;text-align:center;background-color:#000;border-radius:.25rem}.popover{position:absolute;top:0;left:0;z-index:1060;display:block;max-width:276px;font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem}.popover .popover-arrow{position:absolute;display:block;width:1rem;height:.5rem}.popover .popover-arrow::after,.popover .popover-arrow::before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow,.bs-popover-top>.popover-arrow{bottom:calc(-.5rem - 1px)}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::before,.bs-popover-top>.popover-arrow::before{bottom:0;border-width:.5rem .5rem 0;border-top-color:rgba(0,0,0,.25)}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after,.bs-popover-top>.popover-arrow::after{bottom:1px;border-width:.5rem .5rem 0;border-top-color:#fff}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow,.bs-popover-end>.popover-arrow{left:calc(-.5rem - 1px);width:.5rem;height:1rem}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::before,.bs-popover-end>.popover-arrow::before{left:0;border-width:.5rem .5rem .5rem 0;border-right-color:rgba(0,0,0,.25)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::after,.bs-popover-end>.popover-arrow::after{left:1px;border-width:.5rem .5rem .5rem 0;border-right-color:#fff}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow,.bs-popover-bottom>.popover-arrow{top:calc(-.5rem - 1px)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::before,.bs-popover-bottom>.popover-arrow::before{top:0;border-width:0 .5rem .5rem .5rem;border-bottom-color:rgba(0,0,0,.25)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::after,.bs-popover-bottom>.popover-arrow::after{top:1px;border-width:0 .5rem .5rem .5rem;border-bottom-color:#fff}.bs-popover-auto[data-popper-placement^=bottom] .popover-header::before,.bs-popover-bottom .popover-header::before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-.5rem;content:"";border-bottom:1px solid #f0f0f0}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow,.bs-popover-start>.popover-arrow{right:calc(-.5rem - 1px);width:.5rem;height:1rem}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::before,.bs-popover-start>.popover-arrow::before{right:0;border-width:.5rem 0 .5rem .5rem;border-left-color:rgba(0,0,0,.25)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::after,.bs-popover-start>.popover-arrow::after{right:1px;border-width:.5rem 0 .5rem .5rem;border-left-color:#fff}.popover-header{padding:.5rem 1rem;margin-bottom:0;font-size:1rem;background-color:#f0f0f0;border-bottom:1px solid #d8d8d8;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.popover-header:empty{display:none}.popover-body{padding:1rem 1rem;color:#212529}.carousel{position:relative}.carousel.pointer-event{touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner::after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:transform .6s ease-in-out}@media (prefers-reduced-motion:reduce){.carousel-item{transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-end,.carousel-item-next:not(.carousel-item-start){transform:translateX(100%)}.active.carousel-item-start,.carousel-item-prev:not(.carousel-item-end){transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;transform:none}.carousel-fade .carousel-item-next.carousel-item-start,.carousel-fade .carousel-item-prev.carousel-item-end,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{z-index:0;opacity:0;transition:opacity 0s .6s}@media (prefers-reduced-motion:reduce){.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;width:15%;padding:0;color:#fff;text-align:center;background:0 0;border:0;opacity:.5;transition:opacity .15s ease}@media (prefers-reduced-motion:reduce){.carousel-control-next,.carousel-control-prev{transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:2rem;height:2rem;background-repeat:no-repeat;background-position:50%;background-size:100% 100%}.carousel-control-prev-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e")}.carousel-control-next-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e")}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:2;display:flex;justify-content:center;padding:0;margin-right:15%;margin-bottom:1rem;margin-left:15%;list-style:none}.carousel-indicators [data-bs-target]{box-sizing:content-box;flex:0 1 auto;width:30px;height:3px;padding:0;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#fff;background-clip:padding-box;border:0;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media (prefers-reduced-motion:reduce){.carousel-indicators [data-bs-target]{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:1.25rem;left:15%;padding-top:1.25rem;padding-bottom:1.25rem;color:#fff;text-align:center}.carousel-dark .carousel-control-next-icon,.carousel-dark .carousel-control-prev-icon{filter:invert(1) grayscale(100)}.carousel-dark .carousel-indicators [data-bs-target]{background-color:#000}.carousel-dark .carousel-caption{color:#000}@-webkit-keyframes spinner-border{to{transform:rotate(360deg)}}@keyframes spinner-border{to{transform:rotate(360deg)}}.spinner-border{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;border:.25em solid currentColor;border-right-color:transparent;border-radius:50%;-webkit-animation:.75s linear infinite spinner-border;animation:.75s linear infinite spinner-border}.spinner-border-sm{width:1rem;height:1rem;border-width:.2em}@-webkit-keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}.spinner-grow{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;background-color:currentColor;border-radius:50%;opacity:0;-webkit-animation:.75s linear infinite spinner-grow;animation:.75s linear infinite spinner-grow}.spinner-grow-sm{width:1rem;height:1rem}@media (prefers-reduced-motion:reduce){.spinner-border,.spinner-grow{-webkit-animation-duration:1.5s;animation-duration:1.5s}}.clearfix::after{display:block;clear:both;content:""}.link-primary{color:#0d6efd}.link-primary:focus,.link-primary:hover{color:#0a58ca}.link-secondary{color:#6c757d}.link-secondary:focus,.link-secondary:hover{color:#565e64}.link-success{color:#198754}.link-success:focus,.link-success:hover{color:#146c43}.link-info{color:#0dcaf0}.link-info:focus,.link-info:hover{color:#3dd5f3}.link-warning{color:#ffc107}.link-warning:focus,.link-warning:hover{color:#ffcd39}.link-danger{color:#dc3545}.link-danger:focus,.link-danger:hover{color:#b02a37}.link-light{color:#f8f9fa}.link-light:focus,.link-light:hover{color:#f9fafb}.link-dark{color:#212529}.link-dark:focus,.link-dark:hover{color:#1a1e21}.ratio{position:relative;width:100%}.ratio::before{display:block;padding-top:var(--bs-aspect-ratio);content:""}.ratio>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-1x1{--bs-aspect-ratio:100%}.ratio-4x3{--bs-aspect-ratio:calc(3 / 4 * 100%)}.ratio-16x9{--bs-aspect-ratio:calc(9 / 16 * 100%)}.ratio-21x9{--bs-aspect-ratio:calc(9 / 21 * 100%)}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}@media (min-width:576px){.sticky-sm-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}@media (min-width:768px){.sticky-md-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}@media (min-width:992px){.sticky-lg-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}@media (min-width:1200px){.sticky-xl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}@media (min-width:1400px){.sticky-xxl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}.visually-hidden,.visually-hidden-focusable:not(:focus):not(:focus-within){position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;content:""}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.float-start{float:left!important}.float-end{float:right!important}.float-none{float:none!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.overflow-visible{overflow:visible!important}.overflow-scroll{overflow:scroll!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-grid{display:grid!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:flex!important}.d-inline-flex{display:inline-flex!important}.d-none{display:none!important}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}.shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}.shadow-none{box-shadow:none!important}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:-webkit-sticky!important;position:sticky!important}.top-0{top:0!important}.top-50{top:50%!important}.top-100{top:100%!important}.bottom-0{bottom:0!important}.bottom-50{bottom:50%!important}.bottom-100{bottom:100%!important}.start-0{left:0!important}.start-50{left:50%!important}.start-100{left:100%!important}.end-0{right:0!important}.end-50{right:50%!important}.end-100{right:100%!important}.translate-middle{transform:translate(-50%,-50%)!important}.translate-middle-x{transform:translateX(-50%)!important}.translate-middle-y{transform:translateY(-50%)!important}.border{border:1px solid #dee2e6!important}.border-0{border:0!important}.border-top{border-top:1px solid #dee2e6!important}.border-top-0{border-top:0!important}.border-end{border-right:1px solid #dee2e6!important}.border-end-0{border-right:0!important}.border-bottom{border-bottom:1px solid #dee2e6!important}.border-bottom-0{border-bottom:0!important}.border-start{border-left:1px solid #dee2e6!important}.border-start-0{border-left:0!important}.border-primary{border-color:#0d6efd!important}.border-secondary{border-color:#6c757d!important}.border-success{border-color:#198754!important}.border-info{border-color:#0dcaf0!important}.border-warning{border-color:#ffc107!important}.border-danger{border-color:#dc3545!important}.border-light{border-color:#f8f9fa!important}.border-dark{border-color:#212529!important}.border-white{border-color:#fff!important}.border-0{border-width:0!important}.border-1{border-width:1px!important}.border-2{border-width:2px!important}.border-3{border-width:3px!important}.border-4{border-width:4px!important}.border-5{border-width:5px!important}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.mw-100{max-width:100%!important}.vw-100{width:100vw!important}.min-vw-100{min-width:100vw!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mh-100{max-height:100%!important}.vh-100{height:100vh!important}.min-vh-100{min-height:100vh!important}.flex-fill{flex:1 1 auto!important}.flex-row{flex-direction:row!important}.flex-column{flex-direction:column!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-column-reverse{flex-direction:column-reverse!important}.flex-grow-0{flex-grow:0!important}.flex-grow-1{flex-grow:1!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.flex-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-0{gap:0!important}.gap-1{gap:.25rem!important}.gap-2{gap:.5rem!important}.gap-3{gap:1rem!important}.gap-4{gap:1.5rem!important}.gap-5{gap:3rem!important}.justify-content-start{justify-content:flex-start!important}.justify-content-end{justify-content:flex-end!important}.justify-content-center{justify-content:center!important}.justify-content-between{justify-content:space-between!important}.justify-content-around{justify-content:space-around!important}.justify-content-evenly{justify-content:space-evenly!important}.align-items-start{align-items:flex-start!important}.align-items-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-baseline{align-items:baseline!important}.align-items-stretch{align-items:stretch!important}.align-content-start{align-content:flex-start!important}.align-content-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-between{align-content:space-between!important}.align-content-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-self-auto{align-self:auto!important}.align-self-start{align-self:flex-start!important}.align-self-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-baseline{align-self:baseline!important}.align-self-stretch{align-self:stretch!important}.order-first{order:-1!important}.order-0{order:0!important}.order-1{order:1!important}.order-2{order:2!important}.order-3{order:3!important}.order-4{order:4!important}.order-5{order:5!important}.order-last{order:6!important}.m-0{margin:0!important}.m-1{margin:.25rem!important}.m-2{margin:.5rem!important}.m-3{margin:1rem!important}.m-4{margin:1.5rem!important}.m-5{margin:3rem!important}.m-auto{margin:auto!important}.mx-0{margin-right:0!important;margin-left:0!important}.mx-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-3{margin-right:1rem!important;margin-left:1rem!important}.mx-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-5{margin-right:3rem!important;margin-left:3rem!important}.mx-auto{margin-right:auto!important;margin-left:auto!important}.my-0{margin-top:0!important;margin-bottom:0!important}.my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-0{margin-top:0!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-3{margin-top:1rem!important}.mt-4{margin-top:1.5rem!important}.mt-5{margin-top:3rem!important}.mt-auto{margin-top:auto!important}.me-0{margin-right:0!important}.me-1{margin-right:.25rem!important}.me-2{margin-right:.5rem!important}.me-3{margin-right:1rem!important}.me-4{margin-right:1.5rem!important}.me-5{margin-right:3rem!important}.me-auto{margin-right:auto!important}.mb-0{margin-bottom:0!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:1rem!important}.mb-4{margin-bottom:1.5rem!important}.mb-5{margin-bottom:3rem!important}.mb-auto{margin-bottom:auto!important}.ms-0{margin-left:0!important}.ms-1{margin-left:.25rem!important}.ms-2{margin-left:.5rem!important}.ms-3{margin-left:1rem!important}.ms-4{margin-left:1.5rem!important}.ms-5{margin-left:3rem!important}.ms-auto{margin-left:auto!important}.p-0{padding:0!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.p-3{padding:1rem!important}.p-4{padding:1.5rem!important}.p-5{padding:3rem!important}.px-0{padding-right:0!important;padding-left:0!important}.px-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-3{padding-right:1rem!important;padding-left:1rem!important}.px-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-5{padding-right:3rem!important;padding-left:3rem!important}.py-0{padding-top:0!important;padding-bottom:0!important}.py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-0{padding-top:0!important}.pt-1{padding-top:.25rem!important}.pt-2{padding-top:.5rem!important}.pt-3{padding-top:1rem!important}.pt-4{padding-top:1.5rem!important}.pt-5{padding-top:3rem!important}.pe-0{padding-right:0!important}.pe-1{padding-right:.25rem!important}.pe-2{padding-right:.5rem!important}.pe-3{padding-right:1rem!important}.pe-4{padding-right:1.5rem!important}.pe-5{padding-right:3rem!important}.pb-0{padding-bottom:0!important}.pb-1{padding-bottom:.25rem!important}.pb-2{padding-bottom:.5rem!important}.pb-3{padding-bottom:1rem!important}.pb-4{padding-bottom:1.5rem!important}.pb-5{padding-bottom:3rem!important}.ps-0{padding-left:0!important}.ps-1{padding-left:.25rem!important}.ps-2{padding-left:.5rem!important}.ps-3{padding-left:1rem!important}.ps-4{padding-left:1.5rem!important}.ps-5{padding-left:3rem!important}.fs-1{font-size:calc(1.375rem + 1.5vw)!important}.fs-2{font-size:calc(1.325rem + .9vw)!important}.fs-3{font-size:calc(1.3rem + .6vw)!important}.fs-4{font-size:calc(1.275rem + .3vw)!important}.fs-5{font-size:1.25rem!important}.fs-6{font-size:1rem!important}.fst-italic{font-style:italic!important}.fst-normal{font-style:normal!important}.fw-light{font-weight:300!important}.fw-lighter{font-weight:lighter!important}.fw-normal{font-weight:400!important}.fw-bold{font-weight:700!important}.fw-bolder{font-weight:bolder!important}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.text-start{text-align:left!important}.text-end{text-align:right!important}.text-center{text-align:center!important}.text-primary{color:#0d6efd!important}.text-secondary{color:#6c757d!important}.text-success{color:#198754!important}.text-info{color:#0dcaf0!important}.text-warning{color:#ffc107!important}.text-danger{color:#dc3545!important}.text-light{color:#f8f9fa!important}.text-dark{color:#212529!important}.text-white{color:#fff!important}.text-body{color:#212529!important}.text-muted{color:#6c757d!important}.text-black-50{color:rgba(0,0,0,.5)!important}.text-white-50{color:rgba(255,255,255,.5)!important}.text-reset{color:inherit!important}.lh-1{line-height:1!important}.lh-sm{line-height:1.25!important}.lh-base{line-height:1.5!important}.lh-lg{line-height:2!important}.bg-primary{background-color:#0d6efd!important}.bg-secondary{background-color:#6c757d!important}.bg-success{background-color:#198754!important}.bg-info{background-color:#0dcaf0!important}.bg-warning{background-color:#ffc107!important}.bg-danger{background-color:#dc3545!important}.bg-light{background-color:#f8f9fa!important}.bg-dark{background-color:#212529!important}.bg-body{background-color:#fff!important}.bg-white{background-color:#fff!important}.bg-transparent{background-color:transparent!important}.bg-gradient{background-image:var(--bs-gradient)!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-decoration-none{text-decoration:none!important}.text-decoration-underline{text-decoration:underline!important}.text-decoration-line-through{text-decoration:line-through!important}.text-break{word-wrap:break-word!important;word-break:break-word!important}.font-monospace{font-family:var(--bs-font-monospace)!important}.user-select-all{-webkit-user-select:all!important;-moz-user-select:all!important;user-select:all!important}.user-select-auto{-webkit-user-select:auto!important;-moz-user-select:auto!important;user-select:auto!important}.user-select-none{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}.pe-none{pointer-events:none!important}.pe-auto{pointer-events:auto!important}.rounded{border-radius:.25rem!important}.rounded-0{border-radius:0!important}.rounded-1{border-radius:.2rem!important}.rounded-2{border-radius:.25rem!important}.rounded-3{border-radius:.3rem!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:50rem!important}.rounded-top{border-top-left-radius:.25rem!important;border-top-right-radius:.25rem!important}.rounded-end{border-top-right-radius:.25rem!important;border-bottom-right-radius:.25rem!important}.rounded-bottom{border-bottom-right-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.rounded-start{border-bottom-left-radius:.25rem!important;border-top-left-radius:.25rem!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media (min-width:576px){.float-sm-start{float:left!important}.float-sm-end{float:right!important}.float-sm-none{float:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-grid{display:grid!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:flex!important}.d-sm-inline-flex{display:inline-flex!important}.d-sm-none{display:none!important}.flex-sm-fill{flex:1 1 auto!important}.flex-sm-row{flex-direction:row!important}.flex-sm-column{flex-direction:column!important}.flex-sm-row-reverse{flex-direction:row-reverse!important}.flex-sm-column-reverse{flex-direction:column-reverse!important}.flex-sm-grow-0{flex-grow:0!important}.flex-sm-grow-1{flex-grow:1!important}.flex-sm-shrink-0{flex-shrink:0!important}.flex-sm-shrink-1{flex-shrink:1!important}.flex-sm-wrap{flex-wrap:wrap!important}.flex-sm-nowrap{flex-wrap:nowrap!important}.flex-sm-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-sm-0{gap:0!important}.gap-sm-1{gap:.25rem!important}.gap-sm-2{gap:.5rem!important}.gap-sm-3{gap:1rem!important}.gap-sm-4{gap:1.5rem!important}.gap-sm-5{gap:3rem!important}.justify-content-sm-start{justify-content:flex-start!important}.justify-content-sm-end{justify-content:flex-end!important}.justify-content-sm-center{justify-content:center!important}.justify-content-sm-between{justify-content:space-between!important}.justify-content-sm-around{justify-content:space-around!important}.justify-content-sm-evenly{justify-content:space-evenly!important}.align-items-sm-start{align-items:flex-start!important}.align-items-sm-end{align-items:flex-end!important}.align-items-sm-center{align-items:center!important}.align-items-sm-baseline{align-items:baseline!important}.align-items-sm-stretch{align-items:stretch!important}.align-content-sm-start{align-content:flex-start!important}.align-content-sm-end{align-content:flex-end!important}.align-content-sm-center{align-content:center!important}.align-content-sm-between{align-content:space-between!important}.align-content-sm-around{align-content:space-around!important}.align-content-sm-stretch{align-content:stretch!important}.align-self-sm-auto{align-self:auto!important}.align-self-sm-start{align-self:flex-start!important}.align-self-sm-end{align-self:flex-end!important}.align-self-sm-center{align-self:center!important}.align-self-sm-baseline{align-self:baseline!important}.align-self-sm-stretch{align-self:stretch!important}.order-sm-first{order:-1!important}.order-sm-0{order:0!important}.order-sm-1{order:1!important}.order-sm-2{order:2!important}.order-sm-3{order:3!important}.order-sm-4{order:4!important}.order-sm-5{order:5!important}.order-sm-last{order:6!important}.m-sm-0{margin:0!important}.m-sm-1{margin:.25rem!important}.m-sm-2{margin:.5rem!important}.m-sm-3{margin:1rem!important}.m-sm-4{margin:1.5rem!important}.m-sm-5{margin:3rem!important}.m-sm-auto{margin:auto!important}.mx-sm-0{margin-right:0!important;margin-left:0!important}.mx-sm-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-sm-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-sm-3{margin-right:1rem!important;margin-left:1rem!important}.mx-sm-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-sm-5{margin-right:3rem!important;margin-left:3rem!important}.mx-sm-auto{margin-right:auto!important;margin-left:auto!important}.my-sm-0{margin-top:0!important;margin-bottom:0!important}.my-sm-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-sm-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-sm-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-sm-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-sm-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-sm-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-sm-0{margin-top:0!important}.mt-sm-1{margin-top:.25rem!important}.mt-sm-2{margin-top:.5rem!important}.mt-sm-3{margin-top:1rem!important}.mt-sm-4{margin-top:1.5rem!important}.mt-sm-5{margin-top:3rem!important}.mt-sm-auto{margin-top:auto!important}.me-sm-0{margin-right:0!important}.me-sm-1{margin-right:.25rem!important}.me-sm-2{margin-right:.5rem!important}.me-sm-3{margin-right:1rem!important}.me-sm-4{margin-right:1.5rem!important}.me-sm-5{margin-right:3rem!important}.me-sm-auto{margin-right:auto!important}.mb-sm-0{margin-bottom:0!important}.mb-sm-1{margin-bottom:.25rem!important}.mb-sm-2{margin-bottom:.5rem!important}.mb-sm-3{margin-bottom:1rem!important}.mb-sm-4{margin-bottom:1.5rem!important}.mb-sm-5{margin-bottom:3rem!important}.mb-sm-auto{margin-bottom:auto!important}.ms-sm-0{margin-left:0!important}.ms-sm-1{margin-left:.25rem!important}.ms-sm-2{margin-left:.5rem!important}.ms-sm-3{margin-left:1rem!important}.ms-sm-4{margin-left:1.5rem!important}.ms-sm-5{margin-left:3rem!important}.ms-sm-auto{margin-left:auto!important}.p-sm-0{padding:0!important}.p-sm-1{padding:.25rem!important}.p-sm-2{padding:.5rem!important}.p-sm-3{padding:1rem!important}.p-sm-4{padding:1.5rem!important}.p-sm-5{padding:3rem!important}.px-sm-0{padding-right:0!important;padding-left:0!important}.px-sm-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-sm-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-sm-3{padding-right:1rem!important;padding-left:1rem!important}.px-sm-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-sm-5{padding-right:3rem!important;padding-left:3rem!important}.py-sm-0{padding-top:0!important;padding-bottom:0!important}.py-sm-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-sm-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-sm-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-sm-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-sm-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-sm-0{padding-top:0!important}.pt-sm-1{padding-top:.25rem!important}.pt-sm-2{padding-top:.5rem!important}.pt-sm-3{padding-top:1rem!important}.pt-sm-4{padding-top:1.5rem!important}.pt-sm-5{padding-top:3rem!important}.pe-sm-0{padding-right:0!important}.pe-sm-1{padding-right:.25rem!important}.pe-sm-2{padding-right:.5rem!important}.pe-sm-3{padding-right:1rem!important}.pe-sm-4{padding-right:1.5rem!important}.pe-sm-5{padding-right:3rem!important}.pb-sm-0{padding-bottom:0!important}.pb-sm-1{padding-bottom:.25rem!important}.pb-sm-2{padding-bottom:.5rem!important}.pb-sm-3{padding-bottom:1rem!important}.pb-sm-4{padding-bottom:1.5rem!important}.pb-sm-5{padding-bottom:3rem!important}.ps-sm-0{padding-left:0!important}.ps-sm-1{padding-left:.25rem!important}.ps-sm-2{padding-left:.5rem!important}.ps-sm-3{padding-left:1rem!important}.ps-sm-4{padding-left:1.5rem!important}.ps-sm-5{padding-left:3rem!important}.text-sm-start{text-align:left!important}.text-sm-end{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.float-md-start{float:left!important}.float-md-end{float:right!important}.float-md-none{float:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-grid{display:grid!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:flex!important}.d-md-inline-flex{display:inline-flex!important}.d-md-none{display:none!important}.flex-md-fill{flex:1 1 auto!important}.flex-md-row{flex-direction:row!important}.flex-md-column{flex-direction:column!important}.flex-md-row-reverse{flex-direction:row-reverse!important}.flex-md-column-reverse{flex-direction:column-reverse!important}.flex-md-grow-0{flex-grow:0!important}.flex-md-grow-1{flex-grow:1!important}.flex-md-shrink-0{flex-shrink:0!important}.flex-md-shrink-1{flex-shrink:1!important}.flex-md-wrap{flex-wrap:wrap!important}.flex-md-nowrap{flex-wrap:nowrap!important}.flex-md-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-md-0{gap:0!important}.gap-md-1{gap:.25rem!important}.gap-md-2{gap:.5rem!important}.gap-md-3{gap:1rem!important}.gap-md-4{gap:1.5rem!important}.gap-md-5{gap:3rem!important}.justify-content-md-start{justify-content:flex-start!important}.justify-content-md-end{justify-content:flex-end!important}.justify-content-md-center{justify-content:center!important}.justify-content-md-between{justify-content:space-between!important}.justify-content-md-around{justify-content:space-around!important}.justify-content-md-evenly{justify-content:space-evenly!important}.align-items-md-start{align-items:flex-start!important}.align-items-md-end{align-items:flex-end!important}.align-items-md-center{align-items:center!important}.align-items-md-baseline{align-items:baseline!important}.align-items-md-stretch{align-items:stretch!important}.align-content-md-start{align-content:flex-start!important}.align-content-md-end{align-content:flex-end!important}.align-content-md-center{align-content:center!important}.align-content-md-between{align-content:space-between!important}.align-content-md-around{align-content:space-around!important}.align-content-md-stretch{align-content:stretch!important}.align-self-md-auto{align-self:auto!important}.align-self-md-start{align-self:flex-start!important}.align-self-md-end{align-self:flex-end!important}.align-self-md-center{align-self:center!important}.align-self-md-baseline{align-self:baseline!important}.align-self-md-stretch{align-self:stretch!important}.order-md-first{order:-1!important}.order-md-0{order:0!important}.order-md-1{order:1!important}.order-md-2{order:2!important}.order-md-3{order:3!important}.order-md-4{order:4!important}.order-md-5{order:5!important}.order-md-last{order:6!important}.m-md-0{margin:0!important}.m-md-1{margin:.25rem!important}.m-md-2{margin:.5rem!important}.m-md-3{margin:1rem!important}.m-md-4{margin:1.5rem!important}.m-md-5{margin:3rem!important}.m-md-auto{margin:auto!important}.mx-md-0{margin-right:0!important;margin-left:0!important}.mx-md-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-md-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-md-3{margin-right:1rem!important;margin-left:1rem!important}.mx-md-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-md-5{margin-right:3rem!important;margin-left:3rem!important}.mx-md-auto{margin-right:auto!important;margin-left:auto!important}.my-md-0{margin-top:0!important;margin-bottom:0!important}.my-md-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-md-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-md-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-md-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-md-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-md-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-md-0{margin-top:0!important}.mt-md-1{margin-top:.25rem!important}.mt-md-2{margin-top:.5rem!important}.mt-md-3{margin-top:1rem!important}.mt-md-4{margin-top:1.5rem!important}.mt-md-5{margin-top:3rem!important}.mt-md-auto{margin-top:auto!important}.me-md-0{margin-right:0!important}.me-md-1{margin-right:.25rem!important}.me-md-2{margin-right:.5rem!important}.me-md-3{margin-right:1rem!important}.me-md-4{margin-right:1.5rem!important}.me-md-5{margin-right:3rem!important}.me-md-auto{margin-right:auto!important}.mb-md-0{margin-bottom:0!important}.mb-md-1{margin-bottom:.25rem!important}.mb-md-2{margin-bottom:.5rem!important}.mb-md-3{margin-bottom:1rem!important}.mb-md-4{margin-bottom:1.5rem!important}.mb-md-5{margin-bottom:3rem!important}.mb-md-auto{margin-bottom:auto!important}.ms-md-0{margin-left:0!important}.ms-md-1{margin-left:.25rem!important}.ms-md-2{margin-left:.5rem!important}.ms-md-3{margin-left:1rem!important}.ms-md-4{margin-left:1.5rem!important}.ms-md-5{margin-left:3rem!important}.ms-md-auto{margin-left:auto!important}.p-md-0{padding:0!important}.p-md-1{padding:.25rem!important}.p-md-2{padding:.5rem!important}.p-md-3{padding:1rem!important}.p-md-4{padding:1.5rem!important}.p-md-5{padding:3rem!important}.px-md-0{padding-right:0!important;padding-left:0!important}.px-md-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-md-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-md-3{padding-right:1rem!important;padding-left:1rem!important}.px-md-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-md-5{padding-right:3rem!important;padding-left:3rem!important}.py-md-0{padding-top:0!important;padding-bottom:0!important}.py-md-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-md-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-md-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-md-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-md-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-md-0{padding-top:0!important}.pt-md-1{padding-top:.25rem!important}.pt-md-2{padding-top:.5rem!important}.pt-md-3{padding-top:1rem!important}.pt-md-4{padding-top:1.5rem!important}.pt-md-5{padding-top:3rem!important}.pe-md-0{padding-right:0!important}.pe-md-1{padding-right:.25rem!important}.pe-md-2{padding-right:.5rem!important}.pe-md-3{padding-right:1rem!important}.pe-md-4{padding-right:1.5rem!important}.pe-md-5{padding-right:3rem!important}.pb-md-0{padding-bottom:0!important}.pb-md-1{padding-bottom:.25rem!important}.pb-md-2{padding-bottom:.5rem!important}.pb-md-3{padding-bottom:1rem!important}.pb-md-4{padding-bottom:1.5rem!important}.pb-md-5{padding-bottom:3rem!important}.ps-md-0{padding-left:0!important}.ps-md-1{padding-left:.25rem!important}.ps-md-2{padding-left:.5rem!important}.ps-md-3{padding-left:1rem!important}.ps-md-4{padding-left:1.5rem!important}.ps-md-5{padding-left:3rem!important}.text-md-start{text-align:left!important}.text-md-end{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.float-lg-start{float:left!important}.float-lg-end{float:right!important}.float-lg-none{float:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-grid{display:grid!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:flex!important}.d-lg-inline-flex{display:inline-flex!important}.d-lg-none{display:none!important}.flex-lg-fill{flex:1 1 auto!important}.flex-lg-row{flex-direction:row!important}.flex-lg-column{flex-direction:column!important}.flex-lg-row-reverse{flex-direction:row-reverse!important}.flex-lg-column-reverse{flex-direction:column-reverse!important}.flex-lg-grow-0{flex-grow:0!important}.flex-lg-grow-1{flex-grow:1!important}.flex-lg-shrink-0{flex-shrink:0!important}.flex-lg-shrink-1{flex-shrink:1!important}.flex-lg-wrap{flex-wrap:wrap!important}.flex-lg-nowrap{flex-wrap:nowrap!important}.flex-lg-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-lg-0{gap:0!important}.gap-lg-1{gap:.25rem!important}.gap-lg-2{gap:.5rem!important}.gap-lg-3{gap:1rem!important}.gap-lg-4{gap:1.5rem!important}.gap-lg-5{gap:3rem!important}.justify-content-lg-start{justify-content:flex-start!important}.justify-content-lg-end{justify-content:flex-end!important}.justify-content-lg-center{justify-content:center!important}.justify-content-lg-between{justify-content:space-between!important}.justify-content-lg-around{justify-content:space-around!important}.justify-content-lg-evenly{justify-content:space-evenly!important}.align-items-lg-start{align-items:flex-start!important}.align-items-lg-end{align-items:flex-end!important}.align-items-lg-center{align-items:center!important}.align-items-lg-baseline{align-items:baseline!important}.align-items-lg-stretch{align-items:stretch!important}.align-content-lg-start{align-content:flex-start!important}.align-content-lg-end{align-content:flex-end!important}.align-content-lg-center{align-content:center!important}.align-content-lg-between{align-content:space-between!important}.align-content-lg-around{align-content:space-around!important}.align-content-lg-stretch{align-content:stretch!important}.align-self-lg-auto{align-self:auto!important}.align-self-lg-start{align-self:flex-start!important}.align-self-lg-end{align-self:flex-end!important}.align-self-lg-center{align-self:center!important}.align-self-lg-baseline{align-self:baseline!important}.align-self-lg-stretch{align-self:stretch!important}.order-lg-first{order:-1!important}.order-lg-0{order:0!important}.order-lg-1{order:1!important}.order-lg-2{order:2!important}.order-lg-3{order:3!important}.order-lg-4{order:4!important}.order-lg-5{order:5!important}.order-lg-last{order:6!important}.m-lg-0{margin:0!important}.m-lg-1{margin:.25rem!important}.m-lg-2{margin:.5rem!important}.m-lg-3{margin:1rem!important}.m-lg-4{margin:1.5rem!important}.m-lg-5{margin:3rem!important}.m-lg-auto{margin:auto!important}.mx-lg-0{margin-right:0!important;margin-left:0!important}.mx-lg-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-lg-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-lg-3{margin-right:1rem!important;margin-left:1rem!important}.mx-lg-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-lg-5{margin-right:3rem!important;margin-left:3rem!important}.mx-lg-auto{margin-right:auto!important;margin-left:auto!important}.my-lg-0{margin-top:0!important;margin-bottom:0!important}.my-lg-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-lg-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-lg-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-lg-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-lg-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-lg-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-lg-0{margin-top:0!important}.mt-lg-1{margin-top:.25rem!important}.mt-lg-2{margin-top:.5rem!important}.mt-lg-3{margin-top:1rem!important}.mt-lg-4{margin-top:1.5rem!important}.mt-lg-5{margin-top:3rem!important}.mt-lg-auto{margin-top:auto!important}.me-lg-0{margin-right:0!important}.me-lg-1{margin-right:.25rem!important}.me-lg-2{margin-right:.5rem!important}.me-lg-3{margin-right:1rem!important}.me-lg-4{margin-right:1.5rem!important}.me-lg-5{margin-right:3rem!important}.me-lg-auto{margin-right:auto!important}.mb-lg-0{margin-bottom:0!important}.mb-lg-1{margin-bottom:.25rem!important}.mb-lg-2{margin-bottom:.5rem!important}.mb-lg-3{margin-bottom:1rem!important}.mb-lg-4{margin-bottom:1.5rem!important}.mb-lg-5{margin-bottom:3rem!important}.mb-lg-auto{margin-bottom:auto!important}.ms-lg-0{margin-left:0!important}.ms-lg-1{margin-left:.25rem!important}.ms-lg-2{margin-left:.5rem!important}.ms-lg-3{margin-left:1rem!important}.ms-lg-4{margin-left:1.5rem!important}.ms-lg-5{margin-left:3rem!important}.ms-lg-auto{margin-left:auto!important}.p-lg-0{padding:0!important}.p-lg-1{padding:.25rem!important}.p-lg-2{padding:.5rem!important}.p-lg-3{padding:1rem!important}.p-lg-4{padding:1.5rem!important}.p-lg-5{padding:3rem!important}.px-lg-0{padding-right:0!important;padding-left:0!important}.px-lg-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-lg-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-lg-3{padding-right:1rem!important;padding-left:1rem!important}.px-lg-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-lg-5{padding-right:3rem!important;padding-left:3rem!important}.py-lg-0{padding-top:0!important;padding-bottom:0!important}.py-lg-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-lg-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-lg-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-lg-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-lg-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-lg-0{padding-top:0!important}.pt-lg-1{padding-top:.25rem!important}.pt-lg-2{padding-top:.5rem!important}.pt-lg-3{padding-top:1rem!important}.pt-lg-4{padding-top:1.5rem!important}.pt-lg-5{padding-top:3rem!important}.pe-lg-0{padding-right:0!important}.pe-lg-1{padding-right:.25rem!important}.pe-lg-2{padding-right:.5rem!important}.pe-lg-3{padding-right:1rem!important}.pe-lg-4{padding-right:1.5rem!important}.pe-lg-5{padding-right:3rem!important}.pb-lg-0{padding-bottom:0!important}.pb-lg-1{padding-bottom:.25rem!important}.pb-lg-2{padding-bottom:.5rem!important}.pb-lg-3{padding-bottom:1rem!important}.pb-lg-4{padding-bottom:1.5rem!important}.pb-lg-5{padding-bottom:3rem!important}.ps-lg-0{padding-left:0!important}.ps-lg-1{padding-left:.25rem!important}.ps-lg-2{padding-left:.5rem!important}.ps-lg-3{padding-left:1rem!important}.ps-lg-4{padding-left:1.5rem!important}.ps-lg-5{padding-left:3rem!important}.text-lg-start{text-align:left!important}.text-lg-end{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.float-xl-start{float:left!important}.float-xl-end{float:right!important}.float-xl-none{float:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-grid{display:grid!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:flex!important}.d-xl-inline-flex{display:inline-flex!important}.d-xl-none{display:none!important}.flex-xl-fill{flex:1 1 auto!important}.flex-xl-row{flex-direction:row!important}.flex-xl-column{flex-direction:column!important}.flex-xl-row-reverse{flex-direction:row-reverse!important}.flex-xl-column-reverse{flex-direction:column-reverse!important}.flex-xl-grow-0{flex-grow:0!important}.flex-xl-grow-1{flex-grow:1!important}.flex-xl-shrink-0{flex-shrink:0!important}.flex-xl-shrink-1{flex-shrink:1!important}.flex-xl-wrap{flex-wrap:wrap!important}.flex-xl-nowrap{flex-wrap:nowrap!important}.flex-xl-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-xl-0{gap:0!important}.gap-xl-1{gap:.25rem!important}.gap-xl-2{gap:.5rem!important}.gap-xl-3{gap:1rem!important}.gap-xl-4{gap:1.5rem!important}.gap-xl-5{gap:3rem!important}.justify-content-xl-start{justify-content:flex-start!important}.justify-content-xl-end{justify-content:flex-end!important}.justify-content-xl-center{justify-content:center!important}.justify-content-xl-between{justify-content:space-between!important}.justify-content-xl-around{justify-content:space-around!important}.justify-content-xl-evenly{justify-content:space-evenly!important}.align-items-xl-start{align-items:flex-start!important}.align-items-xl-end{align-items:flex-end!important}.align-items-xl-center{align-items:center!important}.align-items-xl-baseline{align-items:baseline!important}.align-items-xl-stretch{align-items:stretch!important}.align-content-xl-start{align-content:flex-start!important}.align-content-xl-end{align-content:flex-end!important}.align-content-xl-center{align-content:center!important}.align-content-xl-between{align-content:space-between!important}.align-content-xl-around{align-content:space-around!important}.align-content-xl-stretch{align-content:stretch!important}.align-self-xl-auto{align-self:auto!important}.align-self-xl-start{align-self:flex-start!important}.align-self-xl-end{align-self:flex-end!important}.align-self-xl-center{align-self:center!important}.align-self-xl-baseline{align-self:baseline!important}.align-self-xl-stretch{align-self:stretch!important}.order-xl-first{order:-1!important}.order-xl-0{order:0!important}.order-xl-1{order:1!important}.order-xl-2{order:2!important}.order-xl-3{order:3!important}.order-xl-4{order:4!important}.order-xl-5{order:5!important}.order-xl-last{order:6!important}.m-xl-0{margin:0!important}.m-xl-1{margin:.25rem!important}.m-xl-2{margin:.5rem!important}.m-xl-3{margin:1rem!important}.m-xl-4{margin:1.5rem!important}.m-xl-5{margin:3rem!important}.m-xl-auto{margin:auto!important}.mx-xl-0{margin-right:0!important;margin-left:0!important}.mx-xl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xl-auto{margin-right:auto!important;margin-left:auto!important}.my-xl-0{margin-top:0!important;margin-bottom:0!important}.my-xl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xl-0{margin-top:0!important}.mt-xl-1{margin-top:.25rem!important}.mt-xl-2{margin-top:.5rem!important}.mt-xl-3{margin-top:1rem!important}.mt-xl-4{margin-top:1.5rem!important}.mt-xl-5{margin-top:3rem!important}.mt-xl-auto{margin-top:auto!important}.me-xl-0{margin-right:0!important}.me-xl-1{margin-right:.25rem!important}.me-xl-2{margin-right:.5rem!important}.me-xl-3{margin-right:1rem!important}.me-xl-4{margin-right:1.5rem!important}.me-xl-5{margin-right:3rem!important}.me-xl-auto{margin-right:auto!important}.mb-xl-0{margin-bottom:0!important}.mb-xl-1{margin-bottom:.25rem!important}.mb-xl-2{margin-bottom:.5rem!important}.mb-xl-3{margin-bottom:1rem!important}.mb-xl-4{margin-bottom:1.5rem!important}.mb-xl-5{margin-bottom:3rem!important}.mb-xl-auto{margin-bottom:auto!important}.ms-xl-0{margin-left:0!important}.ms-xl-1{margin-left:.25rem!important}.ms-xl-2{margin-left:.5rem!important}.ms-xl-3{margin-left:1rem!important}.ms-xl-4{margin-left:1.5rem!important}.ms-xl-5{margin-left:3rem!important}.ms-xl-auto{margin-left:auto!important}.p-xl-0{padding:0!important}.p-xl-1{padding:.25rem!important}.p-xl-2{padding:.5rem!important}.p-xl-3{padding:1rem!important}.p-xl-4{padding:1.5rem!important}.p-xl-5{padding:3rem!important}.px-xl-0{padding-right:0!important;padding-left:0!important}.px-xl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xl-0{padding-top:0!important;padding-bottom:0!important}.py-xl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xl-0{padding-top:0!important}.pt-xl-1{padding-top:.25rem!important}.pt-xl-2{padding-top:.5rem!important}.pt-xl-3{padding-top:1rem!important}.pt-xl-4{padding-top:1.5rem!important}.pt-xl-5{padding-top:3rem!important}.pe-xl-0{padding-right:0!important}.pe-xl-1{padding-right:.25rem!important}.pe-xl-2{padding-right:.5rem!important}.pe-xl-3{padding-right:1rem!important}.pe-xl-4{padding-right:1.5rem!important}.pe-xl-5{padding-right:3rem!important}.pb-xl-0{padding-bottom:0!important}.pb-xl-1{padding-bottom:.25rem!important}.pb-xl-2{padding-bottom:.5rem!important}.pb-xl-3{padding-bottom:1rem!important}.pb-xl-4{padding-bottom:1.5rem!important}.pb-xl-5{padding-bottom:3rem!important}.ps-xl-0{padding-left:0!important}.ps-xl-1{padding-left:.25rem!important}.ps-xl-2{padding-left:.5rem!important}.ps-xl-3{padding-left:1rem!important}.ps-xl-4{padding-left:1.5rem!important}.ps-xl-5{padding-left:3rem!important}.text-xl-start{text-align:left!important}.text-xl-end{text-align:right!important}.text-xl-center{text-align:center!important}}@media (min-width:1400px){.float-xxl-start{float:left!important}.float-xxl-end{float:right!important}.float-xxl-none{float:none!important}.d-xxl-inline{display:inline!important}.d-xxl-inline-block{display:inline-block!important}.d-xxl-block{display:block!important}.d-xxl-grid{display:grid!important}.d-xxl-table{display:table!important}.d-xxl-table-row{display:table-row!important}.d-xxl-table-cell{display:table-cell!important}.d-xxl-flex{display:flex!important}.d-xxl-inline-flex{display:inline-flex!important}.d-xxl-none{display:none!important}.flex-xxl-fill{flex:1 1 auto!important}.flex-xxl-row{flex-direction:row!important}.flex-xxl-column{flex-direction:column!important}.flex-xxl-row-reverse{flex-direction:row-reverse!important}.flex-xxl-column-reverse{flex-direction:column-reverse!important}.flex-xxl-grow-0{flex-grow:0!important}.flex-xxl-grow-1{flex-grow:1!important}.flex-xxl-shrink-0{flex-shrink:0!important}.flex-xxl-shrink-1{flex-shrink:1!important}.flex-xxl-wrap{flex-wrap:wrap!important}.flex-xxl-nowrap{flex-wrap:nowrap!important}.flex-xxl-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-xxl-0{gap:0!important}.gap-xxl-1{gap:.25rem!important}.gap-xxl-2{gap:.5rem!important}.gap-xxl-3{gap:1rem!important}.gap-xxl-4{gap:1.5rem!important}.gap-xxl-5{gap:3rem!important}.justify-content-xxl-start{justify-content:flex-start!important}.justify-content-xxl-end{justify-content:flex-end!important}.justify-content-xxl-center{justify-content:center!important}.justify-content-xxl-between{justify-content:space-between!important}.justify-content-xxl-around{justify-content:space-around!important}.justify-content-xxl-evenly{justify-content:space-evenly!important}.align-items-xxl-start{align-items:flex-start!important}.align-items-xxl-end{align-items:flex-end!important}.align-items-xxl-center{align-items:center!important}.align-items-xxl-baseline{align-items:baseline!important}.align-items-xxl-stretch{align-items:stretch!important}.align-content-xxl-start{align-content:flex-start!important}.align-content-xxl-end{align-content:flex-end!important}.align-content-xxl-center{align-content:center!important}.align-content-xxl-between{align-content:space-between!important}.align-content-xxl-around{align-content:space-around!important}.align-content-xxl-stretch{align-content:stretch!important}.align-self-xxl-auto{align-self:auto!important}.align-self-xxl-start{align-self:flex-start!important}.align-self-xxl-end{align-self:flex-end!important}.align-self-xxl-center{align-self:center!important}.align-self-xxl-baseline{align-self:baseline!important}.align-self-xxl-stretch{align-self:stretch!important}.order-xxl-first{order:-1!important}.order-xxl-0{order:0!important}.order-xxl-1{order:1!important}.order-xxl-2{order:2!important}.order-xxl-3{order:3!important}.order-xxl-4{order:4!important}.order-xxl-5{order:5!important}.order-xxl-last{order:6!important}.m-xxl-0{margin:0!important}.m-xxl-1{margin:.25rem!important}.m-xxl-2{margin:.5rem!important}.m-xxl-3{margin:1rem!important}.m-xxl-4{margin:1.5rem!important}.m-xxl-5{margin:3rem!important}.m-xxl-auto{margin:auto!important}.mx-xxl-0{margin-right:0!important;margin-left:0!important}.mx-xxl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xxl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xxl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xxl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xxl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xxl-auto{margin-right:auto!important;margin-left:auto!important}.my-xxl-0{margin-top:0!important;margin-bottom:0!important}.my-xxl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xxl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xxl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xxl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xxl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xxl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xxl-0{margin-top:0!important}.mt-xxl-1{margin-top:.25rem!important}.mt-xxl-2{margin-top:.5rem!important}.mt-xxl-3{margin-top:1rem!important}.mt-xxl-4{margin-top:1.5rem!important}.mt-xxl-5{margin-top:3rem!important}.mt-xxl-auto{margin-top:auto!important}.me-xxl-0{margin-right:0!important}.me-xxl-1{margin-right:.25rem!important}.me-xxl-2{margin-right:.5rem!important}.me-xxl-3{margin-right:1rem!important}.me-xxl-4{margin-right:1.5rem!important}.me-xxl-5{margin-right:3rem!important}.me-xxl-auto{margin-right:auto!important}.mb-xxl-0{margin-bottom:0!important}.mb-xxl-1{margin-bottom:.25rem!important}.mb-xxl-2{margin-bottom:.5rem!important}.mb-xxl-3{margin-bottom:1rem!important}.mb-xxl-4{margin-bottom:1.5rem!important}.mb-xxl-5{margin-bottom:3rem!important}.mb-xxl-auto{margin-bottom:auto!important}.ms-xxl-0{margin-left:0!important}.ms-xxl-1{margin-left:.25rem!important}.ms-xxl-2{margin-left:.5rem!important}.ms-xxl-3{margin-left:1rem!important}.ms-xxl-4{margin-left:1.5rem!important}.ms-xxl-5{margin-left:3rem!important}.ms-xxl-auto{margin-left:auto!important}.p-xxl-0{padding:0!important}.p-xxl-1{padding:.25rem!important}.p-xxl-2{padding:.5rem!important}.p-xxl-3{padding:1rem!important}.p-xxl-4{padding:1.5rem!important}.p-xxl-5{padding:3rem!important}.px-xxl-0{padding-right:0!important;padding-left:0!important}.px-xxl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xxl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xxl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xxl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xxl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xxl-0{padding-top:0!important;padding-bottom:0!important}.py-xxl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xxl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xxl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xxl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xxl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xxl-0{padding-top:0!important}.pt-xxl-1{padding-top:.25rem!important}.pt-xxl-2{padding-top:.5rem!important}.pt-xxl-3{padding-top:1rem!important}.pt-xxl-4{padding-top:1.5rem!important}.pt-xxl-5{padding-top:3rem!important}.pe-xxl-0{padding-right:0!important}.pe-xxl-1{padding-right:.25rem!important}.pe-xxl-2{padding-right:.5rem!important}.pe-xxl-3{padding-right:1rem!important}.pe-xxl-4{padding-right:1.5rem!important}.pe-xxl-5{padding-right:3rem!important}.pb-xxl-0{padding-bottom:0!important}.pb-xxl-1{padding-bottom:.25rem!important}.pb-xxl-2{padding-bottom:.5rem!important}.pb-xxl-3{padding-bottom:1rem!important}.pb-xxl-4{padding-bottom:1.5rem!important}.pb-xxl-5{padding-bottom:3rem!important}.ps-xxl-0{padding-left:0!important}.ps-xxl-1{padding-left:.25rem!important}.ps-xxl-2{padding-left:.5rem!important}.ps-xxl-3{padding-left:1rem!important}.ps-xxl-4{padding-left:1.5rem!important}.ps-xxl-5{padding-left:3rem!important}.text-xxl-start{text-align:left!important}.text-xxl-end{text-align:right!important}.text-xxl-center{text-align:center!important}}@media (min-width:1200px){.fs-1{font-size:2.5rem!important}.fs-2{font-size:2rem!important}.fs-3{font-size:1.75rem!important}.fs-4{font-size:1.5rem!important}}@media print{.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-grid{display:grid!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:flex!important}.d-print-inline-flex{display:inline-flex!important}.d-print-none{display:none!important}}
|
7
|
+
/*# sourceMappingURL=bootstrap.min.css.map */
|
@@ -0,0 +1,7 @@
|
|
1
|
+
/*!
|
2
|
+
* Bootstrap v5.0.0-beta2 (https://getbootstrap.com/)
|
3
|
+
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
|
+
*/
|
6
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e(t.Popper)}(this,(function(t){"use strict";function e(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var n=e(t);function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function s(){return(s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function r(t,e){var n,i;t.prototype=Object.create(e.prototype),t.prototype.constructor=t,n=t,i=e,(Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(n,i)}var a,l,c=function(t){do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t},u=function(t){var e=t.getAttribute("data-bs-target");if(!e||"#"===e){var n=t.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n="#"+n.split("#")[1]),e=n&&"#"!==n?n.trim():null}return e},h=function(t){var e=u(t);return e&&document.querySelector(e)?e:null},d=function(t){var e=u(t);return e?document.querySelector(e):null},f=function(t){if(!t)return 0;var e=window.getComputedStyle(t),n=e.transitionDuration,i=e.transitionDelay,o=Number.parseFloat(n),s=Number.parseFloat(i);return o||s?(n=n.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(n)+Number.parseFloat(i))):0},p=function(t){t.dispatchEvent(new Event("transitionend"))},g=function(t){return(t[0]||t).nodeType},m=function(t,e){var n=!1,i=e+5;t.addEventListener("transitionend",(function e(){n=!0,t.removeEventListener("transitionend",e)})),setTimeout((function(){n||p(t)}),i)},_=function(t,e,n){Object.keys(n).forEach((function(i){var o,s=n[i],r=e[i],a=r&&g(r)?"element":null==(o=r)?""+o:{}.toString.call(o).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(s).test(a))throw new TypeError(t.toUpperCase()+': Option "'+i+'" provided type "'+a+'" but expected type "'+s+'".')}))},v=function(t){if(!t)return!1;if(t.style&&t.parentNode&&t.parentNode.style){var e=getComputedStyle(t),n=getComputedStyle(t.parentNode);return"none"!==e.display&&"none"!==n.display&&"hidden"!==e.visibility}return!1},b=function(){return function(){}},y=function(t){return t.offsetHeight},w=function(){var t=window.jQuery;return t&&!document.body.hasAttribute("data-bs-no-jquery")?t:null},E="rtl"===document.documentElement.dir,T=function(t,e){var n;n=function(){var n=w();if(n){var i=n.fn[t];n.fn[t]=e.jQueryInterface,n.fn[t].Constructor=e,n.fn[t].noConflict=function(){return n.fn[t]=i,e.jQueryInterface}}},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",n):n()},A=(a={},l=1,{set:function(t,e,n){void 0===t.bsKey&&(t.bsKey={key:e,id:l},l++),a[t.bsKey.id]=n},get:function(t,e){if(!t||void 0===t.bsKey)return null;var n=t.bsKey;return n.key===e?a[n.id]:null},delete:function(t,e){if(void 0!==t.bsKey){var n=t.bsKey;n.key===e&&(delete a[n.id],delete t.bsKey)}}}),k=function(t,e,n){A.set(t,e,n)},L=function(t,e){return A.get(t,e)},C=/[^.]*(?=\..*)\.|.*/,D=/\..*/,S=/::\d+$/,N={},O=1,I={mouseenter:"mouseover",mouseleave:"mouseout"},j=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function P(t,e){return e&&e+"::"+O++||t.uidEvent||O++}function x(t){var e=P(t);return t.uidEvent=e,N[e]=N[e]||{},N[e]}function H(t,e,n){void 0===n&&(n=null);for(var i=Object.keys(t),o=0,s=i.length;o<s;o++){var r=t[i[o]];if(r.originalHandler===e&&r.delegationSelector===n)return r}return null}function B(t,e,n){var i="string"==typeof e,o=i?n:e,s=t.replace(D,""),r=I[s];return r&&(s=r),j.has(s)||(s=t),[i,o,s]}function M(t,e,n,i,o){if("string"==typeof e&&t){n||(n=i,i=null);var s=B(e,n,i),r=s[0],a=s[1],l=s[2],c=x(t),u=c[l]||(c[l]={}),h=H(u,a,r?n:null);if(h)h.oneOff=h.oneOff&&o;else{var d=P(a,e.replace(C,"")),f=r?function(t,e,n){return function i(o){for(var s=t.querySelectorAll(e),r=o.target;r&&r!==this;r=r.parentNode)for(var a=s.length;a--;)if(s[a]===r)return o.delegateTarget=r,i.oneOff&&K.off(t,o.type,n),n.apply(r,[o]);return null}}(t,n,i):function(t,e){return function n(i){return i.delegateTarget=t,n.oneOff&&K.off(t,i.type,e),e.apply(t,[i])}}(t,n);f.delegationSelector=r?n:null,f.originalHandler=a,f.oneOff=o,f.uidEvent=d,u[d]=f,t.addEventListener(l,f,r)}}}function R(t,e,n,i,o){var s=H(e[n],i,o);s&&(t.removeEventListener(n,s,Boolean(o)),delete e[n][s.uidEvent])}var K={on:function(t,e,n,i){M(t,e,n,i,!1)},one:function(t,e,n,i){M(t,e,n,i,!0)},off:function(t,e,n,i){if("string"==typeof e&&t){var o=B(e,n,i),s=o[0],r=o[1],a=o[2],l=a!==e,c=x(t),u=e.startsWith(".");if(void 0===r){u&&Object.keys(c).forEach((function(n){!function(t,e,n,i){var o=e[n]||{};Object.keys(o).forEach((function(s){if(s.includes(i)){var r=o[s];R(t,e,n,r.originalHandler,r.delegationSelector)}}))}(t,c,n,e.slice(1))}));var h=c[a]||{};Object.keys(h).forEach((function(n){var i=n.replace(S,"");if(!l||e.includes(i)){var o=h[n];R(t,c,a,o.originalHandler,o.delegationSelector)}}))}else{if(!c||!c[a])return;R(t,c,a,r,s?n:null)}}},trigger:function(t,e,n){if("string"!=typeof e||!t)return null;var i,o=w(),s=e.replace(D,""),r=e!==s,a=j.has(s),l=!0,c=!0,u=!1,h=null;return r&&o&&(i=o.Event(e,n),o(t).trigger(i),l=!i.isPropagationStopped(),c=!i.isImmediatePropagationStopped(),u=i.isDefaultPrevented()),a?(h=document.createEvent("HTMLEvents")).initEvent(s,l,!0):h=new CustomEvent(e,{bubbles:l,cancelable:!0}),void 0!==n&&Object.keys(n).forEach((function(t){Object.defineProperty(h,t,{get:function(){return n[t]}})})),u&&h.preventDefault(),c&&t.dispatchEvent(h),h.defaultPrevented&&void 0!==i&&i.preventDefault(),h}},W=function(){function t(t){t&&(this._element=t,k(t,this.constructor.DATA_KEY,this))}return t.prototype.dispose=function(){var t,e;t=this._element,e=this.constructor.DATA_KEY,A.delete(t,e),this._element=null},t.getInstance=function(t){return L(t,this.DATA_KEY)},o(t,null,[{key:"VERSION",get:function(){return"5.0.0-beta2"}}]),t}(),U=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var n=e.prototype;return n.close=function(t){var e=t?this._getRootElement(t):this._element,n=this._triggerCloseEvent(e);null===n||n.defaultPrevented||this._removeElement(e)},n._getRootElement=function(t){return d(t)||t.closest(".alert")},n._triggerCloseEvent=function(t){return K.trigger(t,"close.bs.alert")},n._removeElement=function(t){var e=this;if(t.classList.remove("show"),t.classList.contains("fade")){var n=f(t);K.one(t,"transitionend",(function(){return e._destroyElement(t)})),m(t,n)}else this._destroyElement(t)},n._destroyElement=function(t){t.parentNode&&t.parentNode.removeChild(t),K.trigger(t,"closed.bs.alert")},e.jQueryInterface=function(t){return this.each((function(){var n=L(this,"bs.alert");n||(n=new e(this)),"close"===t&&n[t](this)}))},e.handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},o(e,null,[{key:"DATA_KEY",get:function(){return"bs.alert"}}]),e}(W);K.on(document,"click.bs.alert.data-api",'[data-bs-dismiss="alert"]',U.handleDismiss(new U)),T("alert",U);var F=function(t){function e(){return t.apply(this,arguments)||this}return r(e,t),e.prototype.toggle=function(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))},e.jQueryInterface=function(t){return this.each((function(){var n=L(this,"bs.button");n||(n=new e(this)),"toggle"===t&&n[t]()}))},o(e,null,[{key:"DATA_KEY",get:function(){return"bs.button"}}]),e}(W);function z(t){return"true"===t||"false"!==t&&(t===Number(t).toString()?Number(t):""===t||"null"===t?null:t)}function Y(t){return t.replace(/[A-Z]/g,(function(t){return"-"+t.toLowerCase()}))}K.on(document,"click.bs.button.data-api",'[data-bs-toggle="button"]',(function(t){t.preventDefault();var e=t.target.closest('[data-bs-toggle="button"]'),n=L(e,"bs.button");n||(n=new F(e)),n.toggle()})),T("button",F);var X={setDataAttribute:function(t,e,n){t.setAttribute("data-bs-"+Y(e),n)},removeDataAttribute:function(t,e){t.removeAttribute("data-bs-"+Y(e))},getDataAttributes:function(t){if(!t)return{};var e={};return Object.keys(t.dataset).filter((function(t){return t.startsWith("bs")})).forEach((function(n){var i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=z(t.dataset[n])})),e},getDataAttribute:function(t,e){return z(t.getAttribute("data-bs-"+Y(e)))},offset:function(t){var e=t.getBoundingClientRect();return{top:e.top+document.body.scrollTop,left:e.left+document.body.scrollLeft}},position:function(t){return{top:t.offsetTop,left:t.offsetLeft}}},q=function(t,e){var n;return void 0===e&&(e=document.documentElement),(n=[]).concat.apply(n,Element.prototype.querySelectorAll.call(e,t))},Q=function(t,e){return void 0===e&&(e=document.documentElement),Element.prototype.querySelector.call(e,t)},V=function(t,e){var n;return(n=[]).concat.apply(n,t.children).filter((function(t){return t.matches(e)}))},$=function(t,e){for(var n=t.previousElementSibling;n;){if(n.matches(e))return[n];n=n.previousElementSibling}return[]},G={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},Z={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},J=function(t){function e(e,n){var i;return(i=t.call(this,e)||this)._items=null,i._interval=null,i._activeElement=null,i._isPaused=!1,i._isSliding=!1,i.touchTimeout=null,i.touchStartX=0,i.touchDeltaX=0,i._config=i._getConfig(n),i._indicatorsElement=Q(".carousel-indicators",i._element),i._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,i._pointerEvent=Boolean(window.PointerEvent),i._addEventListeners(),i}r(e,t);var n=e.prototype;return n.next=function(){this._isSliding||this._slide("next")},n.nextWhenVisible=function(){!document.hidden&&v(this._element)&&this.next()},n.prev=function(){this._isSliding||this._slide("prev")},n.pause=function(t){t||(this._isPaused=!0),Q(".carousel-item-next, .carousel-item-prev",this._element)&&(p(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},n.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},n.to=function(t){var e=this;this._activeElement=Q(".active.carousel-item",this._element);var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)K.one(this._element,"slid.bs.carousel",(function(){return e.to(t)}));else{if(n===t)return this.pause(),void this.cycle();var i=t>n?"next":"prev";this._slide(i,this._items[t])}},n.dispose=function(){t.prototype.dispose.call(this),K.off(this._element,".bs.carousel"),this._items=null,this._config=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},n._getConfig=function(t){return t=s({},G,t),_("carousel",t,Z),t},n._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&(E?this.next():this.prev()),e<0&&(E?this.prev():this.next())}},n._addEventListeners=function(){var t=this;this._config.keyboard&&K.on(this._element,"keydown.bs.carousel",(function(e){return t._keydown(e)})),"hover"===this._config.pause&&(K.on(this._element,"mouseenter.bs.carousel",(function(e){return t.pause(e)})),K.on(this._element,"mouseleave.bs.carousel",(function(e){return t.cycle(e)}))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()},n._addTouchEventListeners=function(){var t=this,e=function(e){!t._pointerEvent||"pen"!==e.pointerType&&"touch"!==e.pointerType?t._pointerEvent||(t.touchStartX=e.touches[0].clientX):t.touchStartX=e.clientX},n=function(e){!t._pointerEvent||"pen"!==e.pointerType&&"touch"!==e.pointerType||(t.touchDeltaX=e.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(e){return t.cycle(e)}),500+t._config.interval))};q(".carousel-item img",this._element).forEach((function(t){K.on(t,"dragstart.bs.carousel",(function(t){return t.preventDefault()}))})),this._pointerEvent?(K.on(this._element,"pointerdown.bs.carousel",(function(t){return e(t)})),K.on(this._element,"pointerup.bs.carousel",(function(t){return n(t)})),this._element.classList.add("pointer-event")):(K.on(this._element,"touchstart.bs.carousel",(function(t){return e(t)})),K.on(this._element,"touchmove.bs.carousel",(function(e){return function(e){e.touches&&e.touches.length>1?t.touchDeltaX=0:t.touchDeltaX=e.touches[0].clientX-t.touchStartX}(e)})),K.on(this._element,"touchend.bs.carousel",(function(t){return n(t)})))},n._keydown=function(t){/input|textarea/i.test(t.target.tagName)||("ArrowLeft"===t.key?(t.preventDefault(),E?this.next():this.prev()):"ArrowRight"===t.key&&(t.preventDefault(),E?this.prev():this.next()))},n._getItemIndex=function(t){return this._items=t&&t.parentNode?q(".carousel-item",t.parentNode):[],this._items.indexOf(t)},n._getItemByDirection=function(t,e){var n="next"===t,i="prev"===t,o=this._getItemIndex(e),s=this._items.length-1;if((i&&0===o||n&&o===s)&&!this._config.wrap)return e;var r=(o+("prev"===t?-1:1))%this._items.length;return-1===r?this._items[this._items.length-1]:this._items[r]},n._triggerSlideEvent=function(t,e){var n=this._getItemIndex(t),i=this._getItemIndex(Q(".active.carousel-item",this._element));return K.trigger(this._element,"slide.bs.carousel",{relatedTarget:t,direction:e,from:i,to:n})},n._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var e=Q(".active",this._indicatorsElement);e.classList.remove("active"),e.removeAttribute("aria-current");for(var n=q("[data-bs-target]",this._indicatorsElement),i=0;i<n.length;i++)if(Number.parseInt(n[i].getAttribute("data-bs-slide-to"),10)===this._getItemIndex(t)){n[i].classList.add("active"),n[i].setAttribute("aria-current","true");break}}},n._updateInterval=function(){var t=this._activeElement||Q(".active.carousel-item",this._element);if(t){var e=Number.parseInt(t.getAttribute("data-bs-interval"),10);e?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=e):this._config.interval=this._config.defaultInterval||this._config.interval}},n._slide=function(t,e){var n=this,i=Q(".active.carousel-item",this._element),o=this._getItemIndex(i),s=e||i&&this._getItemByDirection(t,i),r=this._getItemIndex(s),a=Boolean(this._interval),l="next"===t?"carousel-item-start":"carousel-item-end",c="next"===t?"carousel-item-next":"carousel-item-prev",u="next"===t?"left":"right";if(s&&s.classList.contains("active"))this._isSliding=!1;else if(!this._triggerSlideEvent(s,u).defaultPrevented&&i&&s){if(this._isSliding=!0,a&&this.pause(),this._setActiveIndicatorElement(s),this._activeElement=s,this._element.classList.contains("slide")){s.classList.add(c),y(s),i.classList.add(l),s.classList.add(l);var h=f(i);K.one(i,"transitionend",(function(){s.classList.remove(l,c),s.classList.add("active"),i.classList.remove("active",c,l),n._isSliding=!1,setTimeout((function(){K.trigger(n._element,"slid.bs.carousel",{relatedTarget:s,direction:u,from:o,to:r})}),0)})),m(i,h)}else i.classList.remove("active"),s.classList.add("active"),this._isSliding=!1,K.trigger(this._element,"slid.bs.carousel",{relatedTarget:s,direction:u,from:o,to:r});a&&this.cycle()}},e.carouselInterface=function(t,n){var i=L(t,"bs.carousel"),o=s({},G,X.getDataAttributes(t));"object"==typeof n&&(o=s({},o,n));var r="string"==typeof n?n:o.slide;if(i||(i=new e(t,o)),"number"==typeof n)i.to(n);else if("string"==typeof r){if(void 0===i[r])throw new TypeError('No method named "'+r+'"');i[r]()}else o.interval&&o.ride&&(i.pause(),i.cycle())},e.jQueryInterface=function(t){return this.each((function(){e.carouselInterface(this,t)}))},e.dataApiClickHandler=function(t){var n=d(this);if(n&&n.classList.contains("carousel")){var i=s({},X.getDataAttributes(n),X.getDataAttributes(this)),o=this.getAttribute("data-bs-slide-to");o&&(i.interval=!1),e.carouselInterface(n,i),o&&L(n,"bs.carousel").to(o),t.preventDefault()}},o(e,null,[{key:"Default",get:function(){return G}},{key:"DATA_KEY",get:function(){return"bs.carousel"}}]),e}(W);K.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",J.dataApiClickHandler),K.on(window,"load.bs.carousel.data-api",(function(){for(var t=q('[data-bs-ride="carousel"]'),e=0,n=t.length;e<n;e++)J.carouselInterface(t[e],L(t[e],"bs.carousel"))})),T("carousel",J);var tt={toggle:!0,parent:""},et={toggle:"boolean",parent:"(string|element)"},nt=function(t){function e(e,n){var i;(i=t.call(this,e)||this)._isTransitioning=!1,i._config=i._getConfig(n),i._triggerArray=q('[data-bs-toggle="collapse"][href="#'+e.id+'"],[data-bs-toggle="collapse"][data-bs-target="#'+e.id+'"]');for(var o=q('[data-bs-toggle="collapse"]'),s=0,r=o.length;s<r;s++){var a=o[s],l=h(a),c=q(l).filter((function(t){return t===e}));null!==l&&c.length&&(i._selector=l,i._triggerArray.push(a))}return i._parent=i._config.parent?i._getParent():null,i._config.parent||i._addAriaAndCollapsedClass(i._element,i._triggerArray),i._config.toggle&&i.toggle(),i}r(e,t);var n=e.prototype;return n.toggle=function(){this._element.classList.contains("show")?this.hide():this.show()},n.show=function(){var t=this;if(!this._isTransitioning&&!this._element.classList.contains("show")){var n,i;this._parent&&0===(n=q(".show, .collapsing",this._parent).filter((function(e){return"string"==typeof t._config.parent?e.getAttribute("data-bs-parent")===t._config.parent:e.classList.contains("collapse")}))).length&&(n=null);var o=Q(this._selector);if(n){var s=n.find((function(t){return o!==t}));if((i=s?L(s,"bs.collapse"):null)&&i._isTransitioning)return}if(!K.trigger(this._element,"show.bs.collapse").defaultPrevented){n&&n.forEach((function(t){o!==t&&e.collapseInterface(t,"hide"),i||k(t,"bs.collapse",null)}));var r=this._getDimension();this._element.classList.remove("collapse"),this._element.classList.add("collapsing"),this._element.style[r]=0,this._triggerArray.length&&this._triggerArray.forEach((function(t){t.classList.remove("collapsed"),t.setAttribute("aria-expanded",!0)})),this.setTransitioning(!0);var a="scroll"+(r[0].toUpperCase()+r.slice(1)),l=f(this._element);K.one(this._element,"transitionend",(function(){t._element.classList.remove("collapsing"),t._element.classList.add("collapse","show"),t._element.style[r]="",t.setTransitioning(!1),K.trigger(t._element,"shown.bs.collapse")})),m(this._element,l),this._element.style[r]=this._element[a]+"px"}}},n.hide=function(){var t=this;if(!this._isTransitioning&&this._element.classList.contains("show")&&!K.trigger(this._element,"hide.bs.collapse").defaultPrevented){var e=this._getDimension();this._element.style[e]=this._element.getBoundingClientRect()[e]+"px",y(this._element),this._element.classList.add("collapsing"),this._element.classList.remove("collapse","show");var n=this._triggerArray.length;if(n>0)for(var i=0;i<n;i++){var o=this._triggerArray[i],s=d(o);s&&!s.classList.contains("show")&&(o.classList.add("collapsed"),o.setAttribute("aria-expanded",!1))}this.setTransitioning(!0),this._element.style[e]="";var r=f(this._element);K.one(this._element,"transitionend",(function(){t.setTransitioning(!1),t._element.classList.remove("collapsing"),t._element.classList.add("collapse"),K.trigger(t._element,"hidden.bs.collapse")})),m(this._element,r)}},n.setTransitioning=function(t){this._isTransitioning=t},n.dispose=function(){t.prototype.dispose.call(this),this._config=null,this._parent=null,this._triggerArray=null,this._isTransitioning=null},n._getConfig=function(t){return(t=s({},tt,t)).toggle=Boolean(t.toggle),_("collapse",t,et),t},n._getDimension=function(){return this._element.classList.contains("width")?"width":"height"},n._getParent=function(){var t=this,e=this._config.parent;return g(e)?void 0===e.jquery&&void 0===e[0]||(e=e[0]):e=Q(e),q('[data-bs-toggle="collapse"][data-bs-parent="'+e+'"]',e).forEach((function(e){var n=d(e);t._addAriaAndCollapsedClass(n,[e])})),e},n._addAriaAndCollapsedClass=function(t,e){if(t&&e.length){var n=t.classList.contains("show");e.forEach((function(t){n?t.classList.remove("collapsed"):t.classList.add("collapsed"),t.setAttribute("aria-expanded",n)}))}},e.collapseInterface=function(t,n){var i=L(t,"bs.collapse"),o=s({},tt,X.getDataAttributes(t),"object"==typeof n&&n?n:{});if(!i&&o.toggle&&"string"==typeof n&&/show|hide/.test(n)&&(o.toggle=!1),i||(i=new e(t,o)),"string"==typeof n){if(void 0===i[n])throw new TypeError('No method named "'+n+'"');i[n]()}},e.jQueryInterface=function(t){return this.each((function(){e.collapseInterface(this,t)}))},o(e,null,[{key:"Default",get:function(){return tt}},{key:"DATA_KEY",get:function(){return"bs.collapse"}}]),e}(W);K.on(document,"click.bs.collapse.data-api",'[data-bs-toggle="collapse"]',(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();var e=X.getDataAttributes(this),n=h(this);q(n).forEach((function(t){var n,i=L(t,"bs.collapse");i?(null===i._parent&&"string"==typeof e.parent&&(i._config.parent=e.parent,i._parent=i._getParent()),n="toggle"):n=e,nt.collapseInterface(t,n)}))})),T("collapse",nt);var it=new RegExp("ArrowUp|ArrowDown|Escape"),ot=E?"top-end":"top-start",st=E?"top-start":"top-end",rt=E?"bottom-end":"bottom-start",at=E?"bottom-start":"bottom-end",lt=E?"left-start":"right-start",ct=E?"right-start":"left-start",ut={offset:[0,2],flip:!0,boundary:"clippingParents",reference:"toggle",display:"dynamic",popperConfig:null},ht={offset:"(array|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element|object)",display:"string",popperConfig:"(null|object|function)"},dt=function(e){function i(t,n){var i;return(i=e.call(this,t)||this)._popper=null,i._config=i._getConfig(n),i._menu=i._getMenuElement(),i._inNavbar=i._detectNavbar(),i._addEventListeners(),i}r(i,e);var a=i.prototype;return a.toggle=function(){if(!this._element.disabled&&!this._element.classList.contains("disabled")){var t=this._element.classList.contains("show");i.clearMenus(),t||this.show()}},a.show=function(){if(!(this._element.disabled||this._element.classList.contains("disabled")||this._menu.classList.contains("show"))){var e=i.getParentFromElement(this._element),o={relatedTarget:this._element};if(!K.trigger(this._element,"show.bs.dropdown",o).defaultPrevented){if(this._inNavbar)X.setDataAttribute(this._menu,"popper","none");else{if(void 0===n)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");var s=this._element;"parent"===this._config.reference?s=e:g(this._config.reference)?(s=this._config.reference,void 0!==this._config.reference.jquery&&(s=this._config.reference[0])):"object"==typeof this._config.reference&&(s=this._config.reference);var r=this._getPopperConfig(),a=r.modifiers.find((function(t){return"applyStyles"===t.name&&!1===t.enabled}));this._popper=t.createPopper(s,this._menu,r),a&&X.setDataAttribute(this._menu,"popper","static")}var l;"ontouchstart"in document.documentElement&&!e.closest(".navbar-nav")&&(l=[]).concat.apply(l,document.body.children).forEach((function(t){return K.on(t,"mouseover",null,(function(){}))})),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.toggle("show"),this._element.classList.toggle("show"),K.trigger(this._element,"shown.bs.dropdown",o)}}},a.hide=function(){if(!this._element.disabled&&!this._element.classList.contains("disabled")&&this._menu.classList.contains("show")){var t={relatedTarget:this._element};K.trigger(this._element,"hide.bs.dropdown",t).defaultPrevented||(this._popper&&this._popper.destroy(),this._menu.classList.toggle("show"),this._element.classList.toggle("show"),X.removeDataAttribute(this._menu,"popper"),K.trigger(this._element,"hidden.bs.dropdown",t))}},a.dispose=function(){e.prototype.dispose.call(this),K.off(this._element,".bs.dropdown"),this._menu=null,this._popper&&(this._popper.destroy(),this._popper=null)},a.update=function(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()},a._addEventListeners=function(){var t=this;K.on(this._element,"click.bs.dropdown",(function(e){e.preventDefault(),e.stopPropagation(),t.toggle()}))},a._getConfig=function(t){if(t=s({},this.constructor.Default,X.getDataAttributes(this._element),t),_("dropdown",t,this.constructor.DefaultType),"object"==typeof t.reference&&!g(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError("dropdown".toUpperCase()+': Option "reference" provided type "object" without a required "getBoundingClientRect" method.');return t},a._getMenuElement=function(){return function(t,e){for(var n=t.nextElementSibling;n;){if(n.matches(e))return[n];n=n.nextElementSibling}return[]}(this._element,".dropdown-menu")[0]},a._getPlacement=function(){var t=this._element.parentNode;if(t.classList.contains("dropend"))return lt;if(t.classList.contains("dropstart"))return ct;var e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?st:ot:e?at:rt},a._detectNavbar=function(){return null!==this._element.closest(".navbar")},a._getOffset=function(){var t=this,e=this._config.offset;return"string"==typeof e?e.split(",").map((function(t){return Number.parseInt(t,10)})):"function"==typeof e?function(n){return e(n,t._element)}:e},a._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{altBoundary:this._config.flip,boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return"static"===this._config.display&&(t.modifiers=[{name:"applyStyles",enabled:!1}]),s({},t,"function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig)},i.dropdownInterface=function(t,e){var n=L(t,"bs.dropdown");if(n||(n=new i(t,"object"==typeof e?e:null)),"string"==typeof e){if(void 0===n[e])throw new TypeError('No method named "'+e+'"');n[e]()}},i.jQueryInterface=function(t){return this.each((function(){i.dropdownInterface(this,t)}))},i.clearMenus=function(t){if(!t||2!==t.button&&("keyup"!==t.type||"Tab"===t.key))for(var e=q('[data-bs-toggle="dropdown"]'),n=0,i=e.length;n<i;n++){var o=L(e[n],"bs.dropdown"),s={relatedTarget:e[n]};if(t&&"click"===t.type&&(s.clickEvent=t),o){var r,a=o._menu;if(e[n].classList.contains("show")&&!(t&&("click"===t.type&&/input|textarea/i.test(t.target.tagName)||"keyup"===t.type&&"Tab"===t.key)&&a.contains(t.target)||K.trigger(e[n],"hide.bs.dropdown",s).defaultPrevented))"ontouchstart"in document.documentElement&&(r=[]).concat.apply(r,document.body.children).forEach((function(t){return K.off(t,"mouseover",null,(function(){}))})),e[n].setAttribute("aria-expanded","false"),o._popper&&o._popper.destroy(),a.classList.remove("show"),e[n].classList.remove("show"),X.removeDataAttribute(a,"popper"),K.trigger(e[n],"hidden.bs.dropdown",s)}}},i.getParentFromElement=function(t){return d(t)||t.parentNode},i.dataApiKeydownHandler=function(t){if(!(/input|textarea/i.test(t.target.tagName)?"Space"===t.key||"Escape"!==t.key&&("ArrowDown"!==t.key&&"ArrowUp"!==t.key||t.target.closest(".dropdown-menu")):!it.test(t.key))&&(t.preventDefault(),t.stopPropagation(),!this.disabled&&!this.classList.contains("disabled"))){var e=i.getParentFromElement(this),n=this.classList.contains("show");if("Escape"===t.key)return(this.matches('[data-bs-toggle="dropdown"]')?this:$(this,'[data-bs-toggle="dropdown"]')[0]).focus(),void i.clearMenus();if(n||"ArrowUp"!==t.key&&"ArrowDown"!==t.key)if(n&&"Space"!==t.key){var o=q(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",e).filter(v);if(o.length){var s=o.indexOf(t.target);"ArrowUp"===t.key&&s>0&&s--,"ArrowDown"===t.key&&s<o.length-1&&s++,o[s=-1===s?0:s].focus()}}else i.clearMenus();else(this.matches('[data-bs-toggle="dropdown"]')?this:$(this,'[data-bs-toggle="dropdown"]')[0]).click()}},o(i,null,[{key:"Default",get:function(){return ut}},{key:"DefaultType",get:function(){return ht}},{key:"DATA_KEY",get:function(){return"bs.dropdown"}}]),i}(W);K.on(document,"keydown.bs.dropdown.data-api",'[data-bs-toggle="dropdown"]',dt.dataApiKeydownHandler),K.on(document,"keydown.bs.dropdown.data-api",".dropdown-menu",dt.dataApiKeydownHandler),K.on(document,"click.bs.dropdown.data-api",dt.clearMenus),K.on(document,"keyup.bs.dropdown.data-api",dt.clearMenus),K.on(document,"click.bs.dropdown.data-api",'[data-bs-toggle="dropdown"]',(function(t){t.preventDefault(),t.stopPropagation(),dt.dropdownInterface(this,"toggle")})),K.on(document,"click.bs.dropdown.data-api",".dropdown form",(function(t){return t.stopPropagation()})),T("dropdown",dt);var ft={backdrop:!0,keyboard:!0,focus:!0},pt={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"},gt=function(t){function e(e,n){var i;return(i=t.call(this,e)||this)._config=i._getConfig(n),i._dialog=Q(".modal-dialog",e),i._backdrop=null,i._isShown=!1,i._isBodyOverflowing=!1,i._ignoreBackdropClick=!1,i._isTransitioning=!1,i._scrollbarWidth=0,i}r(e,t);var n=e.prototype;return n.toggle=function(t){return this._isShown?this.hide():this.show(t)},n.show=function(t){var e=this;if(!this._isShown&&!this._isTransitioning){this._element.classList.contains("fade")&&(this._isTransitioning=!0);var n=K.trigger(this._element,"show.bs.modal",{relatedTarget:t});this._isShown||n.defaultPrevented||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),K.on(this._element,"click.dismiss.bs.modal",'[data-bs-dismiss="modal"]',(function(t){return e.hide(t)})),K.on(this._dialog,"mousedown.dismiss.bs.modal",(function(){K.one(e._element,"mouseup.dismiss.bs.modal",(function(t){t.target===e._element&&(e._ignoreBackdropClick=!0)}))})),this._showBackdrop((function(){return e._showElement(t)})))}},n.hide=function(t){var e=this;if(t&&t.preventDefault(),this._isShown&&!this._isTransitioning&&!K.trigger(this._element,"hide.bs.modal").defaultPrevented){this._isShown=!1;var n=this._element.classList.contains("fade");if(n&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),K.off(document,"focusin.bs.modal"),this._element.classList.remove("show"),K.off(this._element,"click.dismiss.bs.modal"),K.off(this._dialog,"mousedown.dismiss.bs.modal"),n){var i=f(this._element);K.one(this._element,"transitionend",(function(t){return e._hideModal(t)})),m(this._element,i)}else this._hideModal()}},n.dispose=function(){[window,this._element,this._dialog].forEach((function(t){return K.off(t,".bs.modal")})),t.prototype.dispose.call(this),K.off(document,"focusin.bs.modal"),this._config=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},n.handleUpdate=function(){this._adjustDialog()},n._getConfig=function(t){return t=s({},ft,t),_("modal",t,pt),t},n._showElement=function(t){var e=this,n=this._element.classList.contains("fade"),i=Q(".modal-body",this._dialog);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,i&&(i.scrollTop=0),n&&y(this._element),this._element.classList.add("show"),this._config.focus&&this._enforceFocus();var o=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,K.trigger(e._element,"shown.bs.modal",{relatedTarget:t})};if(n){var s=f(this._dialog);K.one(this._dialog,"transitionend",o),m(this._dialog,s)}else o()},n._enforceFocus=function(){var t=this;K.off(document,"focusin.bs.modal"),K.on(document,"focusin.bs.modal",(function(e){document===e.target||t._element===e.target||t._element.contains(e.target)||t._element.focus()}))},n._setEscapeEvent=function(){var t=this;this._isShown?K.on(this._element,"keydown.dismiss.bs.modal",(function(e){t._config.keyboard&&"Escape"===e.key?(e.preventDefault(),t.hide()):t._config.keyboard||"Escape"!==e.key||t._triggerBackdropTransition()})):K.off(this._element,"keydown.dismiss.bs.modal")},n._setResizeEvent=function(){var t=this;this._isShown?K.on(window,"resize.bs.modal",(function(){return t._adjustDialog()})):K.off(window,"resize.bs.modal")},n._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop((function(){document.body.classList.remove("modal-open"),t._resetAdjustments(),t._resetScrollbar(),K.trigger(t._element,"hidden.bs.modal")}))},n._removeBackdrop=function(){this._backdrop.parentNode.removeChild(this._backdrop),this._backdrop=null},n._showBackdrop=function(t){var e=this,n=this._element.classList.contains("fade")?"fade":"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",n&&this._backdrop.classList.add(n),document.body.appendChild(this._backdrop),K.on(this._element,"click.dismiss.bs.modal",(function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===e._config.backdrop?e._triggerBackdropTransition():e.hide())})),n&&y(this._backdrop),this._backdrop.classList.add("show"),!n)return void t();var i=f(this._backdrop);K.one(this._backdrop,"transitionend",t),m(this._backdrop,i)}else if(!this._isShown&&this._backdrop){this._backdrop.classList.remove("show");var o=function(){e._removeBackdrop(),t()};if(this._element.classList.contains("fade")){var s=f(this._backdrop);K.one(this._backdrop,"transitionend",o),m(this._backdrop,s)}else o()}else t()},n._triggerBackdropTransition=function(){var t=this;if(!K.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented){var e=this._element.scrollHeight>document.documentElement.clientHeight;e||(this._element.style.overflowY="hidden"),this._element.classList.add("modal-static");var n=f(this._dialog);K.off(this._element,"transitionend"),K.one(this._element,"transitionend",(function(){t._element.classList.remove("modal-static"),e||(K.one(t._element,"transitionend",(function(){t._element.style.overflowY=""})),m(t._element,n))})),m(this._element,n),this._element.focus()}},n._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;(!this._isBodyOverflowing&&t&&!E||this._isBodyOverflowing&&!t&&E)&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),(this._isBodyOverflowing&&!t&&!E||!this._isBodyOverflowing&&t&&E)&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},n._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},n._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},n._setScrollbar=function(){var t=this;this._isBodyOverflowing&&(this._setElementAttributes(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top","paddingRight",(function(e){return e+t._scrollbarWidth})),this._setElementAttributes(".sticky-top","marginRight",(function(e){return e-t._scrollbarWidth})),this._setElementAttributes("body","paddingRight",(function(e){return e+t._scrollbarWidth}))),document.body.classList.add("modal-open")},n._setElementAttributes=function(t,e,n){q(t).forEach((function(t){var i=t.style[e],o=window.getComputedStyle(t)[e];X.setDataAttribute(t,e,i),t.style[e]=n(Number.parseFloat(o))+"px"}))},n._resetScrollbar=function(){this._resetElementAttributes(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top","paddingRight"),this._resetElementAttributes(".sticky-top","marginRight"),this._resetElementAttributes("body","paddingRight")},n._resetElementAttributes=function(t,e){q(t).forEach((function(t){var n=X.getDataAttribute(t,e);void 0===n&&t===document.body?t.style[e]="":(X.removeDataAttribute(t,e),t.style[e]=n)}))},n._getScrollbarWidth=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},e.jQueryInterface=function(t,n){return this.each((function(){var i=L(this,"bs.modal"),o=s({},ft,X.getDataAttributes(this),"object"==typeof t&&t?t:{});if(i||(i=new e(this,o)),"string"==typeof t){if(void 0===i[t])throw new TypeError('No method named "'+t+'"');i[t](n)}}))},o(e,null,[{key:"Default",get:function(){return ft}},{key:"DATA_KEY",get:function(){return"bs.modal"}}]),e}(W);K.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(t){var e=this,n=d(this);"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault(),K.one(n,"show.bs.modal",(function(t){t.defaultPrevented||K.one(n,"hidden.bs.modal",(function(){v(e)&&e.focus()}))}));var i=L(n,"bs.modal");if(!i){var o=s({},X.getDataAttributes(n),X.getDataAttributes(this));i=new gt(n,o)}i.toggle(this)})),T("modal",gt);var mt=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),_t=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi,vt=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;function bt(t,e,n){var i;if(!t.length)return t;if(n&&"function"==typeof n)return n(t);for(var o=(new window.DOMParser).parseFromString(t,"text/html"),s=Object.keys(e),r=(i=[]).concat.apply(i,o.body.querySelectorAll("*")),a=function(t,n){var i,o=r[t],a=o.nodeName.toLowerCase();if(!s.includes(a))return o.parentNode.removeChild(o),"continue";var l=(i=[]).concat.apply(i,o.attributes),c=[].concat(e["*"]||[],e[a]||[]);l.forEach((function(t){(function(t,e){var n=t.nodeName.toLowerCase();if(e.includes(n))return!mt.has(n)||Boolean(_t.test(t.nodeValue)||vt.test(t.nodeValue));for(var i=e.filter((function(t){return t instanceof RegExp})),o=0,s=i.length;o<s;o++)if(i[o].test(n))return!0;return!1})(t,c)||o.removeAttribute(t.nodeName)}))},l=0,c=r.length;l<c;l++)a(l);return o.body.innerHTML}var yt=new RegExp("(^|\\s)bs-tooltip\\S+","g"),wt=new Set(["sanitize","allowList","sanitizeFn"]),Et={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},Tt={AUTO:"auto",TOP:"top",RIGHT:E?"left":"right",BOTTOM:"bottom",LEFT:E?"right":"left"},At={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},popperConfig:null},kt={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},Lt=function(e){function i(t,i){var o;if(void 0===n)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");return(o=e.call(this,t)||this)._isEnabled=!0,o._timeout=0,o._hoverState="",o._activeTrigger={},o._popper=null,o.config=o._getConfig(i),o.tip=null,o._setListeners(),o}r(i,e);var a=i.prototype;return a.enable=function(){this._isEnabled=!0},a.disable=function(){this._isEnabled=!1},a.toggleEnabled=function(){this._isEnabled=!this._isEnabled},a.toggle=function(t){if(this._isEnabled)if(t){var e=this._initializeOnDelegatedTarget(t);e._activeTrigger.click=!e._activeTrigger.click,e._isWithActiveTrigger()?e._enter(null,e):e._leave(null,e)}else{if(this.getTipElement().classList.contains("show"))return void this._leave(null,this);this._enter(null,this)}},a.dispose=function(){clearTimeout(this._timeout),K.off(this._element,this.constructor.EVENT_KEY),K.off(this._element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this.tip&&this.tip.parentNode&&this.tip.parentNode.removeChild(this.tip),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.config=null,this.tip=null,e.prototype.dispose.call(this)},a.show=function(){var e=this;if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(this.isWithContent()&&this._isEnabled){var n=K.trigger(this._element,this.constructor.Event.SHOW),i=function t(e){if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){var n=e.getRootNode();return n instanceof ShadowRoot?n:null}return e instanceof ShadowRoot?e:e.parentNode?t(e.parentNode):null}(this._element),o=null===i?this._element.ownerDocument.documentElement.contains(this._element):i.contains(this._element);if(!n.defaultPrevented&&o){var s=this.getTipElement(),r=c(this.constructor.NAME);s.setAttribute("id",r),this._element.setAttribute("aria-describedby",r),this.setContent(),this.config.animation&&s.classList.add("fade");var a="function"==typeof this.config.placement?this.config.placement.call(this,s,this._element):this.config.placement,l=this._getAttachment(a);this._addAttachmentClass(l);var u=this._getContainer();k(s,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||u.appendChild(s),K.trigger(this._element,this.constructor.Event.INSERTED),this._popper=t.createPopper(this._element,s,this._getPopperConfig(l)),s.classList.add("show");var h,d,p="function"==typeof this.config.customClass?this.config.customClass():this.config.customClass;p&&(h=s.classList).add.apply(h,p.split(" ")),"ontouchstart"in document.documentElement&&(d=[]).concat.apply(d,document.body.children).forEach((function(t){K.on(t,"mouseover",(function(){}))}));var g=function(){var t=e._hoverState;e._hoverState=null,K.trigger(e._element,e.constructor.Event.SHOWN),"out"===t&&e._leave(null,e)};if(this.tip.classList.contains("fade")){var _=f(this.tip);K.one(this.tip,"transitionend",g),m(this.tip,_)}else g()}}},a.hide=function(){var t=this;if(this._popper){var e=this.getTipElement(),n=function(){"show"!==t._hoverState&&e.parentNode&&e.parentNode.removeChild(e),t._cleanTipClass(),t._element.removeAttribute("aria-describedby"),K.trigger(t._element,t.constructor.Event.HIDDEN),t._popper&&(t._popper.destroy(),t._popper=null)};if(!K.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented){var i;if(e.classList.remove("show"),"ontouchstart"in document.documentElement&&(i=[]).concat.apply(i,document.body.children).forEach((function(t){return K.off(t,"mouseover",b)})),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,this.tip.classList.contains("fade")){var o=f(e);K.one(e,"transitionend",n),m(e,o)}else n();this._hoverState=""}}},a.update=function(){null!==this._popper&&this._popper.update()},a.isWithContent=function(){return Boolean(this.getTitle())},a.getTipElement=function(){if(this.tip)return this.tip;var t=document.createElement("div");return t.innerHTML=this.config.template,this.tip=t.children[0],this.tip},a.setContent=function(){var t=this.getTipElement();this.setElementContent(Q(".tooltip-inner",t),this.getTitle()),t.classList.remove("fade","show")},a.setElementContent=function(t,e){if(null!==t)return"object"==typeof e&&g(e)?(e.jquery&&(e=e[0]),void(this.config.html?e.parentNode!==t&&(t.innerHTML="",t.appendChild(e)):t.textContent=e.textContent)):void(this.config.html?(this.config.sanitize&&(e=bt(e,this.config.allowList,this.config.sanitizeFn)),t.innerHTML=e):t.textContent=e)},a.getTitle=function(){var t=this._element.getAttribute("data-bs-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this._element):this.config.title),t},a.updateAttachment=function(t){return"right"===t?"end":"left"===t?"start":t},a._initializeOnDelegatedTarget=function(t,e){var n=this.constructor.DATA_KEY;return(e=e||L(t.delegateTarget,n))||(e=new this.constructor(t.delegateTarget,this._getDelegateConfig()),k(t.delegateTarget,n,e)),e},a._getOffset=function(){var t=this,e=this.config.offset;return"string"==typeof e?e.split(",").map((function(t){return Number.parseInt(t,10)})):"function"==typeof e?function(n){return e(n,t._element)}:e},a._getPopperConfig=function(t){var e=this,n={placement:t,modifiers:[{name:"flip",options:{altBoundary:!0,fallbackPlacements:this.config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this.config.boundary}},{name:"arrow",options:{element:"."+this.constructor.NAME+"-arrow"}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:function(t){return e._handlePopperPlacementChange(t)}}],onFirstUpdate:function(t){t.options.placement!==t.placement&&e._handlePopperPlacementChange(t)}};return s({},n,"function"==typeof this.config.popperConfig?this.config.popperConfig(n):this.config.popperConfig)},a._addAttachmentClass=function(t){this.getTipElement().classList.add("bs-tooltip-"+this.updateAttachment(t))},a._getContainer=function(){return!1===this.config.container?document.body:g(this.config.container)?this.config.container:Q(this.config.container)},a._getAttachment=function(t){return Tt[t.toUpperCase()]},a._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(e){if("click"===e)K.on(t._element,t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==e){var n="hover"===e?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,i="hover"===e?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;K.on(t._element,n,t.config.selector,(function(e){return t._enter(e)})),K.on(t._element,i,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t._element&&t.hide()},K.on(this._element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=s({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},a._fixTitle=function(){var t=this._element.getAttribute("title"),e=typeof this._element.getAttribute("data-bs-original-title");(t||"string"!==e)&&(this._element.setAttribute("data-bs-original-title",t||""),!t||this._element.getAttribute("aria-label")||this._element.textContent||this._element.setAttribute("aria-label",t),this._element.setAttribute("title",""))},a._enter=function(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusin"===t.type?"focus":"hover"]=!0),e.getTipElement().classList.contains("show")||"show"===e._hoverState?e._hoverState="show":(clearTimeout(e._timeout),e._hoverState="show",e.config.delay&&e.config.delay.show?e._timeout=setTimeout((function(){"show"===e._hoverState&&e.show()}),e.config.delay.show):e.show())},a._leave=function(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusout"===t.type?"focus":"hover"]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState="out",e.config.delay&&e.config.delay.hide?e._timeout=setTimeout((function(){"out"===e._hoverState&&e.hide()}),e.config.delay.hide):e.hide())},a._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},a._getConfig=function(t){var e=X.getDataAttributes(this._element);return Object.keys(e).forEach((function(t){wt.has(t)&&delete e[t]})),t&&"object"==typeof t.container&&t.container.jquery&&(t.container=t.container[0]),"number"==typeof(t=s({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),_("tooltip",t,this.constructor.DefaultType),t.sanitize&&(t.template=bt(t.template,t.allowList,t.sanitizeFn)),t},a._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},a._cleanTipClass=function(){var t=this.getTipElement(),e=t.getAttribute("class").match(yt);null!==e&&e.length>0&&e.map((function(t){return t.trim()})).forEach((function(e){return t.classList.remove(e)}))},a._handlePopperPlacementChange=function(t){var e=t.state;e&&(this.tip=e.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(e.placement)))},i.jQueryInterface=function(t){return this.each((function(){var e=L(this,"bs.tooltip"),n="object"==typeof t&&t;if((e||!/dispose|hide/.test(t))&&(e||(e=new i(this,n)),"string"==typeof t)){if(void 0===e[t])throw new TypeError('No method named "'+t+'"');e[t]()}}))},o(i,null,[{key:"Default",get:function(){return At}},{key:"NAME",get:function(){return"tooltip"}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return kt}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return Et}}]),i}(W);T("tooltip",Lt);var Ct=new RegExp("(^|\\s)bs-popover\\S+","g"),Dt=s({},Lt.Default,{placement:"right",offset:[0,8],trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),St=s({},Lt.DefaultType,{content:"(string|element|function)"}),Nt={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},Ot=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var n=e.prototype;return n.isWithContent=function(){return this.getTitle()||this._getContent()},n.setContent=function(){var t=this.getTipElement();this.setElementContent(Q(".popover-header",t),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this._element)),this.setElementContent(Q(".popover-body",t),e),t.classList.remove("fade","show")},n._addAttachmentClass=function(t){this.getTipElement().classList.add("bs-popover-"+this.updateAttachment(t))},n._getContent=function(){return this._element.getAttribute("data-bs-content")||this.config.content},n._cleanTipClass=function(){var t=this.getTipElement(),e=t.getAttribute("class").match(Ct);null!==e&&e.length>0&&e.map((function(t){return t.trim()})).forEach((function(e){return t.classList.remove(e)}))},e.jQueryInterface=function(t){return this.each((function(){var n=L(this,"bs.popover"),i="object"==typeof t?t:null;if((n||!/dispose|hide/.test(t))&&(n||(n=new e(this,i),k(this,"bs.popover",n)),"string"==typeof t)){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t]()}}))},o(e,null,[{key:"Default",get:function(){return Dt}},{key:"NAME",get:function(){return"popover"}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return Nt}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return St}}]),e}(Lt);T("popover",Ot);var It={offset:10,method:"auto",target:""},jt={offset:"number",method:"string",target:"(string|element)"},Pt=function(t){function e(e,n){var i;return(i=t.call(this,e)||this)._scrollElement="BODY"===e.tagName?window:e,i._config=i._getConfig(n),i._selector=i._config.target+" .nav-link, "+i._config.target+" .list-group-item, "+i._config.target+" .dropdown-item",i._offsets=[],i._targets=[],i._activeTarget=null,i._scrollHeight=0,K.on(i._scrollElement,"scroll.bs.scrollspy",(function(){return i._process()})),i.refresh(),i._process(),i}r(e,t);var n=e.prototype;return n.refresh=function(){var t=this,e=this._scrollElement===this._scrollElement.window?"offset":"position",n="auto"===this._config.method?e:this._config.method,i="position"===n?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),q(this._selector).map((function(t){var e=h(t),o=e?Q(e):null;if(o){var s=o.getBoundingClientRect();if(s.width||s.height)return[X[n](o).top+i,e]}return null})).filter((function(t){return t})).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))},n.dispose=function(){t.prototype.dispose.call(this),K.off(this._scrollElement,".bs.scrollspy"),this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},n._getConfig=function(t){if("string"!=typeof(t=s({},It,"object"==typeof t&&t?t:{})).target&&g(t.target)){var e=t.target.id;e||(e=c("scrollspy"),t.target.id=e),t.target="#"+e}return _("scrollspy",t,jt),t},n._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},n._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},n._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},n._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;)this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&(void 0===this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}},n._activate=function(t){this._activeTarget=t,this._clear();var e=this._selector.split(",").map((function(e){return e+'[data-bs-target="'+t+'"],'+e+'[href="'+t+'"]'})),n=Q(e.join(","));n.classList.contains("dropdown-item")?(Q(".dropdown-toggle",n.closest(".dropdown")).classList.add("active"),n.classList.add("active")):(n.classList.add("active"),function(t,e){for(var n=[],i=t.parentNode;i&&i.nodeType===Node.ELEMENT_NODE&&3!==i.nodeType;)i.matches(e)&&n.push(i),i=i.parentNode;return n}(n,".nav, .list-group").forEach((function(t){$(t,".nav-link, .list-group-item").forEach((function(t){return t.classList.add("active")})),$(t,".nav-item").forEach((function(t){V(t,".nav-link").forEach((function(t){return t.classList.add("active")}))}))}))),K.trigger(this._scrollElement,"activate.bs.scrollspy",{relatedTarget:t})},n._clear=function(){q(this._selector).filter((function(t){return t.classList.contains("active")})).forEach((function(t){return t.classList.remove("active")}))},e.jQueryInterface=function(t){return this.each((function(){var n=L(this,"bs.scrollspy");if(n||(n=new e(this,"object"==typeof t&&t)),"string"==typeof t){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t]()}}))},o(e,null,[{key:"Default",get:function(){return It}},{key:"DATA_KEY",get:function(){return"bs.scrollspy"}}]),e}(W);K.on(window,"load.bs.scrollspy.data-api",(function(){q('[data-bs-spy="scroll"]').forEach((function(t){return new Pt(t,X.getDataAttributes(t))}))})),T("scrollspy",Pt);var xt=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var n=e.prototype;return n.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains("active")||this._element.classList.contains("disabled"))){var e,n=d(this._element),i=this._element.closest(".nav, .list-group");if(i){var o="UL"===i.nodeName||"OL"===i.nodeName?":scope > li > .active":".active";e=(e=q(o,i))[e.length-1]}var s=e?K.trigger(e,"hide.bs.tab",{relatedTarget:this._element}):null;if(!(K.trigger(this._element,"show.bs.tab",{relatedTarget:e}).defaultPrevented||null!==s&&s.defaultPrevented)){this._activate(this._element,i);var r=function(){K.trigger(e,"hidden.bs.tab",{relatedTarget:t._element}),K.trigger(t._element,"shown.bs.tab",{relatedTarget:e})};n?this._activate(n,n.parentNode,r):r()}}},n._activate=function(t,e,n){var i=this,o=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?V(e,".active"):q(":scope > li > .active",e))[0],s=n&&o&&o.classList.contains("fade"),r=function(){return i._transitionComplete(t,o,n)};if(o&&s){var a=f(o);o.classList.remove("show"),K.one(o,"transitionend",r),m(o,a)}else r()},n._transitionComplete=function(t,e,n){if(e){e.classList.remove("active");var i=Q(":scope > .dropdown-menu .active",e.parentNode);i&&i.classList.remove("active"),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}t.classList.add("active"),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),y(t),t.classList.contains("fade")&&t.classList.add("show"),t.parentNode&&t.parentNode.classList.contains("dropdown-menu")&&(t.closest(".dropdown")&&q(".dropdown-toggle").forEach((function(t){return t.classList.add("active")})),t.setAttribute("aria-expanded",!0)),n&&n()},e.jQueryInterface=function(t){return this.each((function(){var n=L(this,"bs.tab")||new e(this);if("string"==typeof t){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t]()}}))},o(e,null,[{key:"DATA_KEY",get:function(){return"bs.tab"}}]),e}(W);K.on(document,"click.bs.tab.data-api",'[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',(function(t){t.preventDefault(),(L(this,"bs.tab")||new xt(this)).show()})),T("tab",xt);var Ht={animation:"boolean",autohide:"boolean",delay:"number"},Bt={animation:!0,autohide:!0,delay:5e3},Mt=function(t){function e(e,n){var i;return(i=t.call(this,e)||this)._config=i._getConfig(n),i._timeout=null,i._setListeners(),i}r(e,t);var n=e.prototype;return n.show=function(){var t=this;if(!K.trigger(this._element,"show.bs.toast").defaultPrevented){this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");var e=function(){t._element.classList.remove("showing"),t._element.classList.add("show"),K.trigger(t._element,"shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout((function(){t.hide()}),t._config.delay))};if(this._element.classList.remove("hide"),y(this._element),this._element.classList.add("showing"),this._config.animation){var n=f(this._element);K.one(this._element,"transitionend",e),m(this._element,n)}else e()}},n.hide=function(){var t=this;if(this._element.classList.contains("show")&&!K.trigger(this._element,"hide.bs.toast").defaultPrevented){var e=function(){t._element.classList.add("hide"),K.trigger(t._element,"hidden.bs.toast")};if(this._element.classList.remove("show"),this._config.animation){var n=f(this._element);K.one(this._element,"transitionend",e),m(this._element,n)}else e()}},n.dispose=function(){this._clearTimeout(),this._element.classList.contains("show")&&this._element.classList.remove("show"),K.off(this._element,"click.dismiss.bs.toast"),t.prototype.dispose.call(this),this._config=null},n._getConfig=function(t){return t=s({},Bt,X.getDataAttributes(this._element),"object"==typeof t&&t?t:{}),_("toast",t,this.constructor.DefaultType),t},n._setListeners=function(){var t=this;K.on(this._element,"click.dismiss.bs.toast",'[data-bs-dismiss="toast"]',(function(){return t.hide()}))},n._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},e.jQueryInterface=function(t){return this.each((function(){var n=L(this,"bs.toast");if(n||(n=new e(this,"object"==typeof t&&t)),"string"==typeof t){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t](this)}}))},o(e,null,[{key:"DefaultType",get:function(){return Ht}},{key:"Default",get:function(){return Bt}},{key:"DATA_KEY",get:function(){return"bs.toast"}}]),e}(W);return T("toast",Mt),{Alert:U,Button:F,Carousel:J,Collapse:nt,Dropdown:dt,Modal:gt,Popover:Ot,ScrollSpy:Pt,Tab:xt,Toast:Mt,Tooltip:Lt}}));
|
7
|
+
//# sourceMappingURL=bootstrap.min.js.map
|
@@ -0,0 +1,176 @@
|
|
1
|
+
.CodeMirror {
|
2
|
+
line-height: 1em;
|
3
|
+
font-family: monospace;
|
4
|
+
|
5
|
+
/* Necessary so the scrollbar can be absolutely positioned within the wrapper on Lion. */
|
6
|
+
position: relative;
|
7
|
+
/* This prevents unwanted scrollbars from showing up on the body and wrapper in IE. */
|
8
|
+
overflow: hidden;
|
9
|
+
}
|
10
|
+
|
11
|
+
.CodeMirror-scroll {
|
12
|
+
overflow: auto;
|
13
|
+
height: 300px;
|
14
|
+
/* This is needed to prevent an IE[67] bug where the scrolled content
|
15
|
+
is visible outside of the scrolling box. */
|
16
|
+
position: relative;
|
17
|
+
outline: none;
|
18
|
+
}
|
19
|
+
|
20
|
+
/* Vertical scrollbar */
|
21
|
+
.CodeMirror-scrollbar {
|
22
|
+
position: absolute;
|
23
|
+
right: 0; top: 0;
|
24
|
+
overflow-x: hidden;
|
25
|
+
overflow-y: scroll;
|
26
|
+
z-index: 5;
|
27
|
+
}
|
28
|
+
.CodeMirror-scrollbar-inner {
|
29
|
+
/* This needs to have a nonzero width in order for the scrollbar to appear
|
30
|
+
in Firefox and IE9. */
|
31
|
+
width: 1px;
|
32
|
+
}
|
33
|
+
.CodeMirror-scrollbar.cm-sb-overlap {
|
34
|
+
/* Ensure that the scrollbar appears in Lion, and that it overlaps the content
|
35
|
+
rather than sitting to the right of it. */
|
36
|
+
position: absolute;
|
37
|
+
z-index: 1;
|
38
|
+
float: none;
|
39
|
+
right: 0;
|
40
|
+
min-width: 12px;
|
41
|
+
}
|
42
|
+
.CodeMirror-scrollbar.cm-sb-nonoverlap {
|
43
|
+
min-width: 12px;
|
44
|
+
}
|
45
|
+
.CodeMirror-scrollbar.cm-sb-ie7 {
|
46
|
+
min-width: 18px;
|
47
|
+
}
|
48
|
+
|
49
|
+
.CodeMirror-gutter {
|
50
|
+
position: absolute; left: 0; top: 0;
|
51
|
+
z-index: 10;
|
52
|
+
background-color: #f7f7f7;
|
53
|
+
border-right: 1px solid #eee;
|
54
|
+
min-width: 2em;
|
55
|
+
height: 100%;
|
56
|
+
}
|
57
|
+
.CodeMirror-gutter-text {
|
58
|
+
color: #aaa;
|
59
|
+
text-align: right;
|
60
|
+
padding: .4em .2em .4em .4em;
|
61
|
+
white-space: pre !important;
|
62
|
+
cursor: default;
|
63
|
+
}
|
64
|
+
.CodeMirror-lines {
|
65
|
+
padding: .4em;
|
66
|
+
white-space: pre;
|
67
|
+
cursor: text;
|
68
|
+
}
|
69
|
+
|
70
|
+
.CodeMirror pre {
|
71
|
+
-moz-border-radius: 0;
|
72
|
+
-webkit-border-radius: 0;
|
73
|
+
-o-border-radius: 0;
|
74
|
+
border-radius: 0;
|
75
|
+
border-width: 0; margin: 0; padding: 0; background: transparent;
|
76
|
+
font-family: inherit;
|
77
|
+
font-size: inherit;
|
78
|
+
padding: 0; margin: 0;
|
79
|
+
white-space: pre;
|
80
|
+
word-wrap: normal;
|
81
|
+
line-height: inherit;
|
82
|
+
color: inherit;
|
83
|
+
overflow: visible;
|
84
|
+
}
|
85
|
+
|
86
|
+
.CodeMirror-wrap pre {
|
87
|
+
word-wrap: break-word;
|
88
|
+
white-space: pre-wrap;
|
89
|
+
word-break: normal;
|
90
|
+
}
|
91
|
+
.CodeMirror-wrap .CodeMirror-scroll {
|
92
|
+
overflow-x: hidden;
|
93
|
+
}
|
94
|
+
|
95
|
+
.CodeMirror textarea {
|
96
|
+
outline: none !important;
|
97
|
+
}
|
98
|
+
|
99
|
+
.CodeMirror pre.CodeMirror-cursor {
|
100
|
+
z-index: 10;
|
101
|
+
position: absolute;
|
102
|
+
visibility: hidden;
|
103
|
+
border-left: 1px solid black;
|
104
|
+
border-right: none;
|
105
|
+
width: 0;
|
106
|
+
}
|
107
|
+
.cm-keymap-fat-cursor pre.CodeMirror-cursor {
|
108
|
+
width: auto;
|
109
|
+
border: 0;
|
110
|
+
background: transparent;
|
111
|
+
background: rgba(0, 200, 0, .4);
|
112
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#6600c800, endColorstr=#4c00c800);
|
113
|
+
}
|
114
|
+
/* Kludge to turn off filter in ie9+, which also accepts rgba */
|
115
|
+
.cm-keymap-fat-cursor pre.CodeMirror-cursor:not(#nonsense_id) {
|
116
|
+
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
117
|
+
}
|
118
|
+
.CodeMirror pre.CodeMirror-cursor.CodeMirror-overwrite {}
|
119
|
+
.CodeMirror-focused pre.CodeMirror-cursor {
|
120
|
+
visibility: visible;
|
121
|
+
}
|
122
|
+
|
123
|
+
div.CodeMirror-selected { background: #d9d9d9; }
|
124
|
+
.CodeMirror-focused div.CodeMirror-selected { background: #d7d4f0; }
|
125
|
+
|
126
|
+
.CodeMirror-searching {
|
127
|
+
background: #ffa;
|
128
|
+
background: rgba(255, 255, 0, .4);
|
129
|
+
}
|
130
|
+
|
131
|
+
/* Default theme */
|
132
|
+
|
133
|
+
.cm-s-default span.cm-keyword {color: #708;}
|
134
|
+
.cm-s-default span.cm-atom {color: #219;}
|
135
|
+
.cm-s-default span.cm-number {color: #164;}
|
136
|
+
.cm-s-default span.cm-def {color: #00f;}
|
137
|
+
.cm-s-default span.cm-variable {color: black;}
|
138
|
+
.cm-s-default span.cm-variable-2 {color: #05a;}
|
139
|
+
.cm-s-default span.cm-variable-3 {color: #085;}
|
140
|
+
.cm-s-default span.cm-property {color: black;}
|
141
|
+
.cm-s-default span.cm-operator {color: black;}
|
142
|
+
.cm-s-default span.cm-comment {color: #a50;}
|
143
|
+
.cm-s-default span.cm-string {color: #a11;}
|
144
|
+
.cm-s-default span.cm-string-2 {color: #f50;}
|
145
|
+
.cm-s-default span.cm-meta {color: #555;}
|
146
|
+
.cm-s-default span.cm-error {color: #f00;}
|
147
|
+
.cm-s-default span.cm-qualifier {color: #555;}
|
148
|
+
.cm-s-default span.cm-builtin {color: #30a;}
|
149
|
+
.cm-s-default span.cm-bracket {color: #997;}
|
150
|
+
.cm-s-default span.cm-tag {color: #170;}
|
151
|
+
.cm-s-default span.cm-attribute {color: #00c;}
|
152
|
+
.cm-s-default span.cm-header {color: blue;}
|
153
|
+
.cm-s-default span.cm-quote {color: #090;}
|
154
|
+
.cm-s-default span.cm-hr {color: #999;}
|
155
|
+
.cm-s-default span.cm-link {color: #00c;}
|
156
|
+
span.cm-negative {color: #d44;}
|
157
|
+
span.cm-positive {color: #292;}
|
158
|
+
|
159
|
+
span.cm-header, span.cm-strong {font-weight: bold;}
|
160
|
+
span.cm-em {font-style: italic;}
|
161
|
+
span.cm-emstrong {font-style: italic; font-weight: bold;}
|
162
|
+
span.cm-link {text-decoration: underline;}
|
163
|
+
|
164
|
+
span.cm-invalidchar {color: #f00;}
|
165
|
+
|
166
|
+
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
|
167
|
+
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
168
|
+
|
169
|
+
@media print {
|
170
|
+
|
171
|
+
/* Hide the cursor when printing */
|
172
|
+
.CodeMirror pre.CodeMirror-cursor {
|
173
|
+
visibility: hidden;
|
174
|
+
}
|
175
|
+
|
176
|
+
}
|
@@ -0,0 +1,3190 @@
|
|
1
|
+
// All functions that need access to the editor's state live inside
|
2
|
+
// the CodeMirror function. Below that, at the bottom of the file,
|
3
|
+
// some utilities are defined.
|
4
|
+
|
5
|
+
// CodeMirror is the only global var we claim
|
6
|
+
window.CodeMirror = (function() {
|
7
|
+
"use strict";
|
8
|
+
// This is the function that produces an editor instance. Its
|
9
|
+
// closure is used to store the editor state.
|
10
|
+
function CodeMirror(place, givenOptions) {
|
11
|
+
// Determine effective options based on given values and defaults.
|
12
|
+
var options = {}, defaults = CodeMirror.defaults;
|
13
|
+
for (var opt in defaults)
|
14
|
+
if (defaults.hasOwnProperty(opt))
|
15
|
+
options[opt] = (givenOptions && givenOptions.hasOwnProperty(opt) ? givenOptions : defaults)[opt];
|
16
|
+
|
17
|
+
var input = elt("textarea", null, null, "position: absolute; padding: 0; width: 1px; height: 1em");
|
18
|
+
input.setAttribute("wrap", "off"); input.setAttribute("autocorrect", "off"); input.setAttribute("autocapitalize", "off");
|
19
|
+
// Wraps and hides input textarea
|
20
|
+
var inputDiv = elt("div", [input], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
|
21
|
+
// The empty scrollbar content, used solely for managing the scrollbar thumb.
|
22
|
+
var scrollbarInner = elt("div", null, "CodeMirror-scrollbar-inner");
|
23
|
+
// The vertical scrollbar. Horizontal scrolling is handled by the scroller itself.
|
24
|
+
var scrollbar = elt("div", [scrollbarInner], "CodeMirror-scrollbar");
|
25
|
+
// DIVs containing the selection and the actual code
|
26
|
+
var lineDiv = elt("div"), selectionDiv = elt("div", null, null, "position: relative; z-index: -1");
|
27
|
+
// Blinky cursor, and element used to ensure cursor fits at the end of a line
|
28
|
+
var cursor = elt("pre", "\u00a0", "CodeMirror-cursor"), widthForcer = elt("pre", "\u00a0", "CodeMirror-cursor", "visibility: hidden");
|
29
|
+
// Used to measure text size
|
30
|
+
var measure = elt("div", null, null, "position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden;");
|
31
|
+
var lineSpace = elt("div", [measure, cursor, widthForcer, selectionDiv, lineDiv], null, "position: relative; z-index: 0");
|
32
|
+
var gutterText = elt("div", null, "CodeMirror-gutter-text"), gutter = elt("div", [gutterText], "CodeMirror-gutter");
|
33
|
+
// Moved around its parent to cover visible view
|
34
|
+
var mover = elt("div", [gutter, elt("div", [lineSpace], "CodeMirror-lines")], null, "position: relative");
|
35
|
+
// Set to the height of the text, causes scrolling
|
36
|
+
var sizer = elt("div", [mover], null, "position: relative");
|
37
|
+
// Provides scrolling
|
38
|
+
var scroller = elt("div", [sizer], "CodeMirror-scroll");
|
39
|
+
scroller.setAttribute("tabIndex", "-1");
|
40
|
+
// The element in which the editor lives.
|
41
|
+
var wrapper = elt("div", [inputDiv, scrollbar, scroller], "CodeMirror" + (options.lineWrapping ? " CodeMirror-wrap" : ""));
|
42
|
+
if (place.appendChild) place.appendChild(wrapper); else place(wrapper);
|
43
|
+
|
44
|
+
themeChanged(); keyMapChanged();
|
45
|
+
// Needed to hide big blue blinking cursor on Mobile Safari
|
46
|
+
if (ios) input.style.width = "0px";
|
47
|
+
if (!webkit) scroller.draggable = true;
|
48
|
+
lineSpace.style.outline = "none";
|
49
|
+
if (options.tabindex != null) input.tabIndex = options.tabindex;
|
50
|
+
if (options.autofocus) focusInput();
|
51
|
+
if (!options.gutter && !options.lineNumbers) gutter.style.display = "none";
|
52
|
+
// Needed to handle Tab key in KHTML
|
53
|
+
if (khtml) inputDiv.style.height = "1px", inputDiv.style.position = "absolute";
|
54
|
+
|
55
|
+
// Check for OS X >= 10.7. This has transparent scrollbars, so the
|
56
|
+
// overlaying of one scrollbar with another won't work. This is a
|
57
|
+
// temporary hack to simply turn off the overlay scrollbar. See
|
58
|
+
// issue #727.
|
59
|
+
if (mac_geLion) { scrollbar.style.zIndex = -2; scrollbar.style.visibility = "hidden"; }
|
60
|
+
// Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).
|
61
|
+
else if (ie_lt8) scrollbar.style.minWidth = "18px";
|
62
|
+
|
63
|
+
// Delayed object wrap timeouts, making sure only one is active. blinker holds an interval.
|
64
|
+
var poll = new Delayed(), highlight = new Delayed(), blinker;
|
65
|
+
|
66
|
+
// mode holds a mode API object. doc is the tree of Line objects,
|
67
|
+
// frontier is the point up to which the content has been parsed,
|
68
|
+
// and history the undo history (instance of History constructor).
|
69
|
+
var mode, doc = new BranchChunk([new LeafChunk([new Line("")])]), frontier = 0, focused;
|
70
|
+
loadMode();
|
71
|
+
// The selection. These are always maintained to point at valid
|
72
|
+
// positions. Inverted is used to remember that the user is
|
73
|
+
// selecting bottom-to-top.
|
74
|
+
var sel = {from: {line: 0, ch: 0}, to: {line: 0, ch: 0}, inverted: false};
|
75
|
+
// Selection-related flags. shiftSelecting obviously tracks
|
76
|
+
// whether the user is holding shift.
|
77
|
+
var shiftSelecting, lastClick, lastDoubleClick, lastScrollTop = 0, draggingText,
|
78
|
+
overwrite = false, suppressEdits = false, pasteIncoming = false;
|
79
|
+
// Variables used by startOperation/endOperation to track what
|
80
|
+
// happened during the operation.
|
81
|
+
var updateInput, userSelChange, changes, textChanged, selectionChanged,
|
82
|
+
gutterDirty, callbacks;
|
83
|
+
// Current visible range (may be bigger than the view window).
|
84
|
+
var displayOffset = 0, showingFrom = 0, showingTo = 0, lastSizeC = 0;
|
85
|
+
// bracketHighlighted is used to remember that a bracket has been
|
86
|
+
// marked.
|
87
|
+
var bracketHighlighted;
|
88
|
+
// Tracks the maximum line length so that the horizontal scrollbar
|
89
|
+
// can be kept static when scrolling.
|
90
|
+
var maxLine = getLine(0), updateMaxLine = false, maxLineChanged = true;
|
91
|
+
var pollingFast = false; // Ensures slowPoll doesn't cancel fastPoll
|
92
|
+
var goalColumn = null;
|
93
|
+
|
94
|
+
// Initialize the content.
|
95
|
+
operation(function(){setValue(options.value || ""); updateInput = false;})();
|
96
|
+
var history = new History();
|
97
|
+
|
98
|
+
// Register our event handlers.
|
99
|
+
connect(scroller, "mousedown", operation(onMouseDown));
|
100
|
+
connect(scroller, "dblclick", operation(onDoubleClick));
|
101
|
+
connect(lineSpace, "selectstart", e_preventDefault);
|
102
|
+
// Gecko browsers fire contextmenu *after* opening the menu, at
|
103
|
+
// which point we can't mess with it anymore. Context menu is
|
104
|
+
// handled in onMouseDown for Gecko.
|
105
|
+
if (!gecko) connect(scroller, "contextmenu", onContextMenu);
|
106
|
+
connect(scroller, "scroll", onScrollMain);
|
107
|
+
connect(scrollbar, "scroll", onScrollBar);
|
108
|
+
connect(scrollbar, "mousedown", function() {if (focused) setTimeout(focusInput, 0);});
|
109
|
+
var resizeHandler = connect(window, "resize", function() {
|
110
|
+
if (wrapper.parentNode) updateDisplay(true);
|
111
|
+
else resizeHandler();
|
112
|
+
}, true);
|
113
|
+
connect(input, "keyup", operation(onKeyUp));
|
114
|
+
connect(input, "input", fastPoll);
|
115
|
+
connect(input, "keydown", operation(onKeyDown));
|
116
|
+
connect(input, "keypress", operation(onKeyPress));
|
117
|
+
connect(input, "focus", onFocus);
|
118
|
+
connect(input, "blur", onBlur);
|
119
|
+
|
120
|
+
function drag_(e) {
|
121
|
+
if (options.onDragEvent && options.onDragEvent(instance, addStop(e))) return;
|
122
|
+
e_stop(e);
|
123
|
+
}
|
124
|
+
if (options.dragDrop) {
|
125
|
+
connect(scroller, "dragstart", onDragStart);
|
126
|
+
connect(scroller, "dragenter", drag_);
|
127
|
+
connect(scroller, "dragover", drag_);
|
128
|
+
connect(scroller, "drop", operation(onDrop));
|
129
|
+
}
|
130
|
+
connect(scroller, "paste", function(){focusInput(); fastPoll();});
|
131
|
+
connect(input, "paste", function(){pasteIncoming = true; fastPoll();});
|
132
|
+
connect(input, "cut", operation(function(){
|
133
|
+
if (!options.readOnly) replaceSelection("");
|
134
|
+
}));
|
135
|
+
|
136
|
+
// Needed to handle Tab key in KHTML
|
137
|
+
if (khtml) connect(sizer, "mouseup", function() {
|
138
|
+
if (document.activeElement == input) input.blur();
|
139
|
+
focusInput();
|
140
|
+
});
|
141
|
+
|
142
|
+
// IE throws unspecified error in certain cases, when
|
143
|
+
// trying to access activeElement before onload
|
144
|
+
var hasFocus; try { hasFocus = (document.activeElement == input); } catch(e) { }
|
145
|
+
if (hasFocus || options.autofocus) setTimeout(onFocus, 20);
|
146
|
+
else onBlur();
|
147
|
+
|
148
|
+
function isLine(l) {return l >= 0 && l < doc.size;}
|
149
|
+
// The instance object that we'll return. Mostly calls out to
|
150
|
+
// local functions in the CodeMirror function. Some do some extra
|
151
|
+
// range checking and/or clipping. operation is used to wrap the
|
152
|
+
// call so that changes it makes are tracked, and the display is
|
153
|
+
// updated afterwards.
|
154
|
+
var instance = wrapper.CodeMirror = {
|
155
|
+
getValue: getValue,
|
156
|
+
setValue: operation(setValue),
|
157
|
+
getSelection: getSelection,
|
158
|
+
replaceSelection: operation(replaceSelection),
|
159
|
+
focus: function(){window.focus(); focusInput(); onFocus(); fastPoll();},
|
160
|
+
setOption: function(option, value) {
|
161
|
+
var oldVal = options[option];
|
162
|
+
options[option] = value;
|
163
|
+
if (option == "mode" || option == "indentUnit") loadMode();
|
164
|
+
else if (option == "readOnly" && value == "nocursor") {onBlur(); input.blur();}
|
165
|
+
else if (option == "readOnly" && !value) {resetInput(true);}
|
166
|
+
else if (option == "theme") themeChanged();
|
167
|
+
else if (option == "lineWrapping" && oldVal != value) operation(wrappingChanged)();
|
168
|
+
else if (option == "tabSize") updateDisplay(true);
|
169
|
+
else if (option == "keyMap") keyMapChanged();
|
170
|
+
else if (option == "tabindex") input.tabIndex = value;
|
171
|
+
else if (option == "showCursorWhenSelecting") updateSelection();
|
172
|
+
if (option == "lineNumbers" || option == "gutter" || option == "firstLineNumber" ||
|
173
|
+
option == "theme" || option == "lineNumberFormatter") {
|
174
|
+
gutterChanged();
|
175
|
+
updateDisplay(true);
|
176
|
+
}
|
177
|
+
},
|
178
|
+
getOption: function(option) {return options[option];},
|
179
|
+
getMode: function() {return mode;},
|
180
|
+
undo: operation(undo),
|
181
|
+
redo: operation(redo),
|
182
|
+
indentLine: operation(function(n, dir) {
|
183
|
+
if (typeof dir != "string") {
|
184
|
+
if (dir == null) dir = options.smartIndent ? "smart" : "prev";
|
185
|
+
else dir = dir ? "add" : "subtract";
|
186
|
+
}
|
187
|
+
if (isLine(n)) indentLine(n, dir);
|
188
|
+
}),
|
189
|
+
indentSelection: operation(indentSelected),
|
190
|
+
historySize: function() {return {undo: history.done.length, redo: history.undone.length};},
|
191
|
+
clearHistory: function() {history = new History();},
|
192
|
+
setHistory: function(histData) {
|
193
|
+
history = new History();
|
194
|
+
history.done = histData.done;
|
195
|
+
history.undone = histData.undone;
|
196
|
+
},
|
197
|
+
getHistory: function() {
|
198
|
+
function cp(arr) {
|
199
|
+
for (var i = 0, nw = [], nwelt; i < arr.length; ++i) {
|
200
|
+
nw.push(nwelt = []);
|
201
|
+
for (var j = 0, elt = arr[i]; j < elt.length; ++j) {
|
202
|
+
var old = [], cur = elt[j];
|
203
|
+
nwelt.push({start: cur.start, added: cur.added, old: old});
|
204
|
+
for (var k = 0; k < cur.old.length; ++k) old.push(hlText(cur.old[k]));
|
205
|
+
}
|
206
|
+
}
|
207
|
+
return nw;
|
208
|
+
}
|
209
|
+
return {done: cp(history.done), undone: cp(history.undone)};
|
210
|
+
},
|
211
|
+
matchBrackets: operation(function(){matchBrackets(true);}),
|
212
|
+
getTokenAt: operation(function(pos) {
|
213
|
+
pos = clipPos(pos);
|
214
|
+
return getLine(pos.line).getTokenAt(mode, getStateBefore(pos.line), options.tabSize, pos.ch);
|
215
|
+
}),
|
216
|
+
getStateAfter: function(line) {
|
217
|
+
line = clipLine(line == null ? doc.size - 1: line);
|
218
|
+
return getStateBefore(line + 1);
|
219
|
+
},
|
220
|
+
cursorCoords: function(start, mode) {
|
221
|
+
if (start == null) start = sel.inverted;
|
222
|
+
return this.charCoords(start ? sel.from : sel.to, mode);
|
223
|
+
},
|
224
|
+
charCoords: function(pos, mode) {
|
225
|
+
pos = clipPos(pos);
|
226
|
+
if (mode == "local") return localCoords(pos, false);
|
227
|
+
if (mode == "div") return localCoords(pos, true);
|
228
|
+
return pageCoords(pos);
|
229
|
+
},
|
230
|
+
coordsChar: function(coords) {
|
231
|
+
var off = eltOffset(lineSpace);
|
232
|
+
return coordsChar(coords.x - off.left, coords.y - off.top);
|
233
|
+
},
|
234
|
+
defaultTextHeight: function() { return textHeight(); },
|
235
|
+
markText: operation(markText),
|
236
|
+
setBookmark: setBookmark,
|
237
|
+
findMarksAt: findMarksAt,
|
238
|
+
setMarker: operation(addGutterMarker),
|
239
|
+
clearMarker: operation(removeGutterMarker),
|
240
|
+
setLineClass: operation(setLineClass),
|
241
|
+
hideLine: operation(function(h) {return setLineHidden(h, true);}),
|
242
|
+
showLine: operation(function(h) {return setLineHidden(h, false);}),
|
243
|
+
onDeleteLine: function(line, f) {
|
244
|
+
if (typeof line == "number") {
|
245
|
+
if (!isLine(line)) return null;
|
246
|
+
line = getLine(line);
|
247
|
+
}
|
248
|
+
(line.handlers || (line.handlers = [])).push(f);
|
249
|
+
return line;
|
250
|
+
},
|
251
|
+
lineInfo: lineInfo,
|
252
|
+
getViewport: function() { return {from: showingFrom, to: showingTo};},
|
253
|
+
addWidget: function(pos, node, scroll, vert, horiz) {
|
254
|
+
pos = localCoords(clipPos(pos));
|
255
|
+
var top = pos.yBot, left = pos.x;
|
256
|
+
node.style.position = "absolute";
|
257
|
+
sizer.appendChild(node);
|
258
|
+
if (vert == "over") top = pos.y;
|
259
|
+
else if (vert == "near") {
|
260
|
+
var vspace = Math.max(scroller.offsetHeight, doc.height * textHeight()),
|
261
|
+
hspace = Math.max(sizer.clientWidth, lineSpace.clientWidth) - paddingLeft();
|
262
|
+
if (pos.yBot + node.offsetHeight > vspace && pos.y > node.offsetHeight)
|
263
|
+
top = pos.y - node.offsetHeight;
|
264
|
+
if (left + node.offsetWidth > hspace)
|
265
|
+
left = hspace - node.offsetWidth;
|
266
|
+
}
|
267
|
+
node.style.top = (top + paddingTop()) + "px";
|
268
|
+
node.style.left = node.style.right = "";
|
269
|
+
if (horiz == "right") {
|
270
|
+
left = sizer.clientWidth - node.offsetWidth;
|
271
|
+
node.style.right = "0px";
|
272
|
+
} else {
|
273
|
+
if (horiz == "left") left = 0;
|
274
|
+
else if (horiz == "middle") left = (sizer.clientWidth - node.offsetWidth) / 2;
|
275
|
+
node.style.left = (left + paddingLeft()) + "px";
|
276
|
+
}
|
277
|
+
if (scroll)
|
278
|
+
scrollIntoView(left, top, left + node.offsetWidth, top + node.offsetHeight);
|
279
|
+
},
|
280
|
+
|
281
|
+
lineCount: function() {return doc.size;},
|
282
|
+
clipPos: clipPos,
|
283
|
+
getCursor: function(start) {
|
284
|
+
if (start == null || start == "head") start = sel.inverted;
|
285
|
+
if (start == "anchor") start = !sel.inverted;
|
286
|
+
if (start == "end") start = false;
|
287
|
+
return copyPos(start ? sel.from : sel.to);
|
288
|
+
},
|
289
|
+
somethingSelected: function() {return !posEq(sel.from, sel.to);},
|
290
|
+
setCursor: operation(function(line, ch, user) {
|
291
|
+
if (ch == null && typeof line.line == "number") setCursor(line.line, line.ch, user);
|
292
|
+
else setCursor(line, ch, user);
|
293
|
+
}),
|
294
|
+
setSelection: operation(function(from, to, user) {
|
295
|
+
(user ? setSelectionUser : setSelection)(clipPos(from), clipPos(to || from));
|
296
|
+
}),
|
297
|
+
getLine: function(line) {if (isLine(line)) return getLine(line).text;},
|
298
|
+
getLineHandle: function(line) {if (isLine(line)) return getLine(line);},
|
299
|
+
setLine: operation(function(line, text) {
|
300
|
+
if (isLine(line)) replaceRange(text, {line: line, ch: 0}, {line: line, ch: getLine(line).text.length});
|
301
|
+
}),
|
302
|
+
removeLine: operation(function(line) {
|
303
|
+
if (isLine(line)) replaceRange("", {line: line, ch: 0}, clipPos({line: line+1, ch: 0}));
|
304
|
+
}),
|
305
|
+
replaceRange: operation(replaceRange),
|
306
|
+
getRange: function(from, to, lineSep) {return getRange(clipPos(from), clipPos(to), lineSep);},
|
307
|
+
|
308
|
+
triggerOnKeyDown: operation(onKeyDown),
|
309
|
+
execCommand: function(cmd) {return commands[cmd](instance);},
|
310
|
+
// Stuff used by commands, probably not much use to outside code.
|
311
|
+
moveH: operation(moveH),
|
312
|
+
deleteH: operation(deleteH),
|
313
|
+
moveV: operation(moveV),
|
314
|
+
toggleOverwrite: function() {
|
315
|
+
if(overwrite){
|
316
|
+
overwrite = false;
|
317
|
+
cursor.className = cursor.className.replace(" CodeMirror-overwrite", "");
|
318
|
+
} else {
|
319
|
+
overwrite = true;
|
320
|
+
cursor.className += " CodeMirror-overwrite";
|
321
|
+
}
|
322
|
+
},
|
323
|
+
|
324
|
+
posFromIndex: function(off) {
|
325
|
+
var lineNo = 0, ch;
|
326
|
+
doc.iter(0, doc.size, function(line) {
|
327
|
+
var sz = line.text.length + 1;
|
328
|
+
if (sz > off) { ch = off; return true; }
|
329
|
+
off -= sz;
|
330
|
+
++lineNo;
|
331
|
+
});
|
332
|
+
return clipPos({line: lineNo, ch: ch});
|
333
|
+
},
|
334
|
+
indexFromPos: function (coords) {
|
335
|
+
if (coords.line < 0 || coords.ch < 0) return 0;
|
336
|
+
var index = coords.ch;
|
337
|
+
doc.iter(0, coords.line, function (line) {
|
338
|
+
index += line.text.length + 1;
|
339
|
+
});
|
340
|
+
return index;
|
341
|
+
},
|
342
|
+
scrollTo: function(x, y) {
|
343
|
+
if (x != null) scroller.scrollLeft = x;
|
344
|
+
if (y != null) scrollbar.scrollTop = scroller.scrollTop = y;
|
345
|
+
updateDisplay([]);
|
346
|
+
},
|
347
|
+
getScrollInfo: function() {
|
348
|
+
return {x: scroller.scrollLeft, y: scrollbar.scrollTop,
|
349
|
+
height: scrollbar.scrollHeight, width: scroller.scrollWidth};
|
350
|
+
},
|
351
|
+
scrollIntoView: function(pos) {
|
352
|
+
var coords = localCoords(pos ? clipPos(pos) : sel.inverted ? sel.from : sel.to);
|
353
|
+
scrollIntoView(coords.x, coords.y, coords.x, coords.yBot);
|
354
|
+
},
|
355
|
+
|
356
|
+
setSize: function(width, height) {
|
357
|
+
function interpret(val) {
|
358
|
+
val = String(val);
|
359
|
+
return /^\d+$/.test(val) ? val + "px" : val;
|
360
|
+
}
|
361
|
+
if (width != null) wrapper.style.width = interpret(width);
|
362
|
+
if (height != null) scroller.style.height = interpret(height);
|
363
|
+
instance.refresh();
|
364
|
+
},
|
365
|
+
|
366
|
+
operation: function(f){return operation(f)();},
|
367
|
+
compoundChange: function(f){return compoundChange(f);},
|
368
|
+
refresh: function(){
|
369
|
+
updateDisplay(true, null, lastScrollTop);
|
370
|
+
if (scrollbar.scrollHeight > lastScrollTop)
|
371
|
+
scrollbar.scrollTop = lastScrollTop;
|
372
|
+
},
|
373
|
+
getInputField: function(){return input;},
|
374
|
+
getWrapperElement: function(){return wrapper;},
|
375
|
+
getScrollerElement: function(){return scroller;},
|
376
|
+
getGutterElement: function(){return gutter;}
|
377
|
+
};
|
378
|
+
|
379
|
+
function getLine(n) { return getLineAt(doc, n); }
|
380
|
+
function updateLineHeight(line, height) {
|
381
|
+
gutterDirty = true;
|
382
|
+
var diff = height - line.height;
|
383
|
+
for (var n = line; n; n = n.parent) n.height += diff;
|
384
|
+
}
|
385
|
+
|
386
|
+
function lineContent(line, wrapAt) {
|
387
|
+
if (!line.styles)
|
388
|
+
line.highlight(mode, line.stateAfter = getStateBefore(lineNo(line)), options.tabSize);
|
389
|
+
return line.getContent(options.tabSize, wrapAt, options.lineWrapping);
|
390
|
+
}
|
391
|
+
|
392
|
+
function setValue(code) {
|
393
|
+
var top = {line: 0, ch: 0};
|
394
|
+
updateLines(top, {line: doc.size - 1, ch: getLine(doc.size-1).text.length},
|
395
|
+
splitLines(code), top, top);
|
396
|
+
updateInput = true;
|
397
|
+
}
|
398
|
+
function getValue(lineSep) {
|
399
|
+
var text = [];
|
400
|
+
doc.iter(0, doc.size, function(line) { text.push(line.text); });
|
401
|
+
return text.join(lineSep || "\n");
|
402
|
+
}
|
403
|
+
|
404
|
+
function onScrollBar(e) {
|
405
|
+
if (Math.abs(scrollbar.scrollTop - lastScrollTop) > 1) {
|
406
|
+
lastScrollTop = scroller.scrollTop = scrollbar.scrollTop;
|
407
|
+
updateDisplay([]);
|
408
|
+
}
|
409
|
+
}
|
410
|
+
|
411
|
+
function onScrollMain(e) {
|
412
|
+
if (options.fixedGutter && gutter.style.left != scroller.scrollLeft + "px")
|
413
|
+
gutter.style.left = scroller.scrollLeft + "px";
|
414
|
+
if (Math.abs(scroller.scrollTop - lastScrollTop) > 1) {
|
415
|
+
lastScrollTop = scroller.scrollTop;
|
416
|
+
if (scrollbar.scrollTop != lastScrollTop)
|
417
|
+
scrollbar.scrollTop = lastScrollTop;
|
418
|
+
updateDisplay([]);
|
419
|
+
}
|
420
|
+
if (options.onScroll) options.onScroll(instance);
|
421
|
+
}
|
422
|
+
|
423
|
+
function onMouseDown(e) {
|
424
|
+
setShift(e_prop(e, "shiftKey"));
|
425
|
+
// Check whether this is a click in a widget
|
426
|
+
for (var n = e_target(e); n != wrapper; n = n.parentNode)
|
427
|
+
if (n.parentNode == sizer && n != mover) return;
|
428
|
+
|
429
|
+
// See if this is a click in the gutter
|
430
|
+
for (var n = e_target(e); n != wrapper; n = n.parentNode)
|
431
|
+
if (n.parentNode == gutterText) {
|
432
|
+
if (options.onGutterClick)
|
433
|
+
options.onGutterClick(instance, indexOf(gutterText.childNodes, n) + showingFrom, e);
|
434
|
+
return e_preventDefault(e);
|
435
|
+
}
|
436
|
+
|
437
|
+
var start = posFromMouse(e);
|
438
|
+
|
439
|
+
switch (e_button(e)) {
|
440
|
+
case 3:
|
441
|
+
if (gecko) onContextMenu(e);
|
442
|
+
return;
|
443
|
+
case 2:
|
444
|
+
if (start) setCursor(start.line, start.ch, true);
|
445
|
+
setTimeout(focusInput, 20);
|
446
|
+
e_preventDefault(e);
|
447
|
+
return;
|
448
|
+
}
|
449
|
+
// For button 1, if it was clicked inside the editor
|
450
|
+
// (posFromMouse returning non-null), we have to adjust the
|
451
|
+
// selection.
|
452
|
+
if (!start) {if (e_target(e) == scroller) e_preventDefault(e); return;}
|
453
|
+
|
454
|
+
if (!focused) onFocus();
|
455
|
+
|
456
|
+
var now = +new Date, type = "single";
|
457
|
+
if (lastDoubleClick && lastDoubleClick.time > now - 400 && posEq(lastDoubleClick.pos, start)) {
|
458
|
+
type = "triple";
|
459
|
+
e_preventDefault(e);
|
460
|
+
setTimeout(focusInput, 20);
|
461
|
+
selectLine(start.line);
|
462
|
+
} else if (lastClick && lastClick.time > now - 400 && posEq(lastClick.pos, start)) {
|
463
|
+
type = "double";
|
464
|
+
lastDoubleClick = {time: now, pos: start};
|
465
|
+
e_preventDefault(e);
|
466
|
+
var word = findWordAt(start);
|
467
|
+
setSelectionUser(word.from, word.to);
|
468
|
+
} else { lastClick = {time: now, pos: start}; }
|
469
|
+
|
470
|
+
function dragEnd(e2) {
|
471
|
+
if (webkit) scroller.draggable = false;
|
472
|
+
draggingText = false;
|
473
|
+
up(); drop();
|
474
|
+
if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) < 10) {
|
475
|
+
e_preventDefault(e2);
|
476
|
+
setCursor(start.line, start.ch, true);
|
477
|
+
focusInput();
|
478
|
+
}
|
479
|
+
}
|
480
|
+
var last = start, going;
|
481
|
+
if (options.dragDrop && dragAndDrop && !options.readOnly && !posEq(sel.from, sel.to) &&
|
482
|
+
!posLess(start, sel.from) && !posLess(sel.to, start) && type == "single") {
|
483
|
+
// Let the drag handler handle this.
|
484
|
+
if (webkit) scroller.draggable = true;
|
485
|
+
var up = connect(document, "mouseup", operation(dragEnd), true);
|
486
|
+
var drop = connect(scroller, "drop", operation(dragEnd), true);
|
487
|
+
draggingText = true;
|
488
|
+
// IE's approach to draggable
|
489
|
+
if (scroller.dragDrop) scroller.dragDrop();
|
490
|
+
return;
|
491
|
+
}
|
492
|
+
e_preventDefault(e);
|
493
|
+
if (type == "single") setCursor(start.line, start.ch, true);
|
494
|
+
|
495
|
+
var startstart = sel.from, startend = sel.to;
|
496
|
+
|
497
|
+
function doSelect(cur) {
|
498
|
+
if (type == "single") {
|
499
|
+
setSelectionUser(clipPos(start), cur);
|
500
|
+
return;
|
501
|
+
}
|
502
|
+
startstart = clipPos(startstart);
|
503
|
+
startend = clipPos(startend);
|
504
|
+
if (type == "double") {
|
505
|
+
var word = findWordAt(cur);
|
506
|
+
if (posLess(cur, startstart)) setSelectionUser(word.from, startend);
|
507
|
+
else setSelectionUser(startstart, word.to);
|
508
|
+
} else if (type == "triple") {
|
509
|
+
if (posLess(cur, startstart)) setSelectionUser(startend, clipPos({line: cur.line, ch: 0}));
|
510
|
+
else setSelectionUser(startstart, clipPos({line: cur.line + 1, ch: 0}));
|
511
|
+
}
|
512
|
+
}
|
513
|
+
|
514
|
+
function extend(e) {
|
515
|
+
var cur = posFromMouse(e, true);
|
516
|
+
if (cur && !posEq(cur, last)) {
|
517
|
+
if (!focused) onFocus();
|
518
|
+
last = cur;
|
519
|
+
doSelect(cur);
|
520
|
+
updateInput = false;
|
521
|
+
var visible = visibleLines();
|
522
|
+
if (cur.line >= visible.to || cur.line < visible.from)
|
523
|
+
going = setTimeout(operation(function(){extend(e);}), 150);
|
524
|
+
}
|
525
|
+
}
|
526
|
+
|
527
|
+
function done(e) {
|
528
|
+
clearTimeout(going);
|
529
|
+
var cur = posFromMouse(e);
|
530
|
+
if (cur) doSelect(cur);
|
531
|
+
e_preventDefault(e);
|
532
|
+
focusInput();
|
533
|
+
updateInput = true;
|
534
|
+
move(); up();
|
535
|
+
}
|
536
|
+
var move = connect(document, "mousemove", operation(function(e) {
|
537
|
+
clearTimeout(going);
|
538
|
+
e_preventDefault(e);
|
539
|
+
if (!ie && !e_button(e)) done(e);
|
540
|
+
else extend(e);
|
541
|
+
}), true);
|
542
|
+
var up = connect(document, "mouseup", operation(done), true);
|
543
|
+
}
|
544
|
+
function onDoubleClick(e) {
|
545
|
+
for (var n = e_target(e); n != wrapper; n = n.parentNode)
|
546
|
+
if (n.parentNode == gutterText) return e_preventDefault(e);
|
547
|
+
e_preventDefault(e);
|
548
|
+
}
|
549
|
+
function onDrop(e) {
|
550
|
+
if (options.onDragEvent && options.onDragEvent(instance, addStop(e))) return;
|
551
|
+
e_preventDefault(e);
|
552
|
+
var pos = posFromMouse(e, true), files = e.dataTransfer.files;
|
553
|
+
if (!pos || options.readOnly) return;
|
554
|
+
if (files && files.length && window.FileReader && window.File) {
|
555
|
+
var n = files.length, text = Array(n), read = 0;
|
556
|
+
var loadFile = function(file, i) {
|
557
|
+
var reader = new FileReader;
|
558
|
+
reader.onload = function() {
|
559
|
+
text[i] = reader.result;
|
560
|
+
if (++read == n) {
|
561
|
+
pos = clipPos(pos);
|
562
|
+
operation(function() {
|
563
|
+
var end = replaceRange(text.join(""), pos, pos);
|
564
|
+
setSelectionUser(pos, end);
|
565
|
+
})();
|
566
|
+
}
|
567
|
+
};
|
568
|
+
reader.readAsText(file);
|
569
|
+
};
|
570
|
+
for (var i = 0; i < n; ++i) loadFile(files[i], i);
|
571
|
+
} else {
|
572
|
+
// Don't do a replace if the drop happened inside of the selected text.
|
573
|
+
if (draggingText && !(posLess(pos, sel.from) || posLess(sel.to, pos))) return;
|
574
|
+
try {
|
575
|
+
var text = e.dataTransfer.getData("Text");
|
576
|
+
if (text) {
|
577
|
+
compoundChange(function() {
|
578
|
+
var curFrom = sel.from, curTo = sel.to;
|
579
|
+
setSelectionUser(pos, pos);
|
580
|
+
if (draggingText) replaceRange("", curFrom, curTo);
|
581
|
+
replaceSelection(text);
|
582
|
+
focusInput();
|
583
|
+
});
|
584
|
+
}
|
585
|
+
}
|
586
|
+
catch(e){}
|
587
|
+
}
|
588
|
+
}
|
589
|
+
function onDragStart(e) {
|
590
|
+
var txt = getSelection();
|
591
|
+
e.dataTransfer.setData("Text", txt);
|
592
|
+
|
593
|
+
// Use dummy image instead of default browsers image.
|
594
|
+
if (e.dataTransfer.setDragImage)
|
595
|
+
e.dataTransfer.setDragImage(elt('img'), 0, 0);
|
596
|
+
}
|
597
|
+
|
598
|
+
function doHandleBinding(bound, dropShift) {
|
599
|
+
if (typeof bound == "string") {
|
600
|
+
bound = commands[bound];
|
601
|
+
if (!bound) return false;
|
602
|
+
}
|
603
|
+
var prevShift = shiftSelecting;
|
604
|
+
try {
|
605
|
+
if (options.readOnly) suppressEdits = true;
|
606
|
+
if (dropShift) shiftSelecting = null;
|
607
|
+
bound(instance);
|
608
|
+
} catch(e) {
|
609
|
+
if (e != Pass) throw e;
|
610
|
+
return false;
|
611
|
+
} finally {
|
612
|
+
shiftSelecting = prevShift;
|
613
|
+
suppressEdits = false;
|
614
|
+
}
|
615
|
+
return true;
|
616
|
+
}
|
617
|
+
var maybeTransition;
|
618
|
+
function handleKeyBinding(e) {
|
619
|
+
// Handle auto keymap transitions
|
620
|
+
var startMap = getKeyMap(options.keyMap), next = startMap.auto;
|
621
|
+
clearTimeout(maybeTransition);
|
622
|
+
if (next && !isModifierKey(e)) maybeTransition = setTimeout(function() {
|
623
|
+
if (getKeyMap(options.keyMap) == startMap) {
|
624
|
+
options.keyMap = (next.call ? next.call(null, instance) : next);
|
625
|
+
}
|
626
|
+
}, 50);
|
627
|
+
|
628
|
+
var name = keyNames[e_prop(e, "keyCode")], handled = false;
|
629
|
+
if (name == null || e.altGraphKey) return false;
|
630
|
+
if (e_prop(e, "altKey")) name = "Alt-" + name;
|
631
|
+
if (e_prop(e, flipCtrlCmd ? "metaKey" : "ctrlKey")) name = "Ctrl-" + name;
|
632
|
+
if (e_prop(e, flipCtrlCmd ? "ctrlKey" : "metaKey")) name = "Cmd-" + name;
|
633
|
+
|
634
|
+
var stopped = false;
|
635
|
+
function stop() { stopped = true; }
|
636
|
+
|
637
|
+
if (e_prop(e, "shiftKey")) {
|
638
|
+
handled = lookupKey("Shift-" + name, options.extraKeys, options.keyMap,
|
639
|
+
function(b) {return doHandleBinding(b, true);}, stop)
|
640
|
+
|| lookupKey(name, options.extraKeys, options.keyMap, function(b) {
|
641
|
+
if (typeof b == "string" && /^go[A-Z]/.test(b)) return doHandleBinding(b);
|
642
|
+
}, stop);
|
643
|
+
} else {
|
644
|
+
handled = lookupKey(name, options.extraKeys, options.keyMap, doHandleBinding, stop);
|
645
|
+
}
|
646
|
+
if (stopped) handled = false;
|
647
|
+
if (handled) {
|
648
|
+
e_preventDefault(e);
|
649
|
+
restartBlink();
|
650
|
+
if (ie_lt9) { e.oldKeyCode = e.keyCode; e.keyCode = 0; }
|
651
|
+
}
|
652
|
+
return handled;
|
653
|
+
}
|
654
|
+
function handleCharBinding(e, ch) {
|
655
|
+
var handled = lookupKey("'" + ch + "'", options.extraKeys,
|
656
|
+
options.keyMap, function(b) { return doHandleBinding(b, true); });
|
657
|
+
if (handled) {
|
658
|
+
e_preventDefault(e);
|
659
|
+
restartBlink();
|
660
|
+
}
|
661
|
+
return handled;
|
662
|
+
}
|
663
|
+
|
664
|
+
var lastStoppedKey = null;
|
665
|
+
function onKeyDown(e) {
|
666
|
+
if (!focused) onFocus();
|
667
|
+
if (ie && e.keyCode == 27) { e.returnValue = false; }
|
668
|
+
if (pollingFast) { if (readInput()) pollingFast = false; }
|
669
|
+
if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return;
|
670
|
+
var code = e_prop(e, "keyCode");
|
671
|
+
// IE does strange things with escape.
|
672
|
+
setShift(code == 16 || e_prop(e, "shiftKey"));
|
673
|
+
// First give onKeyEvent option a chance to handle this.
|
674
|
+
var handled = handleKeyBinding(e);
|
675
|
+
if (opera) {
|
676
|
+
lastStoppedKey = handled ? code : null;
|
677
|
+
// Opera has no cut event... we try to at least catch the key combo
|
678
|
+
if (!handled && code == 88 && e_prop(e, mac ? "metaKey" : "ctrlKey"))
|
679
|
+
replaceSelection("");
|
680
|
+
}
|
681
|
+
}
|
682
|
+
function onKeyPress(e) {
|
683
|
+
if (pollingFast) readInput();
|
684
|
+
if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return;
|
685
|
+
var keyCode = e_prop(e, "keyCode"), charCode = e_prop(e, "charCode");
|
686
|
+
if (opera && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;}
|
687
|
+
if (((opera && (!e.which || e.which < 10)) || khtml) && handleKeyBinding(e)) return;
|
688
|
+
var ch = String.fromCharCode(charCode == null ? keyCode : charCode);
|
689
|
+
if (options.electricChars && mode.electricChars && options.smartIndent && !options.readOnly) {
|
690
|
+
if (mode.electricChars.indexOf(ch) > -1)
|
691
|
+
setTimeout(operation(function() {indentLine(sel.to.line, "smart");}), 75);
|
692
|
+
}
|
693
|
+
if (handleCharBinding(e, ch)) return;
|
694
|
+
fastPoll();
|
695
|
+
}
|
696
|
+
function onKeyUp(e) {
|
697
|
+
if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return;
|
698
|
+
if (e_prop(e, "keyCode") == 16) shiftSelecting = null;
|
699
|
+
}
|
700
|
+
|
701
|
+
function onFocus() {
|
702
|
+
if (options.readOnly == "nocursor") return;
|
703
|
+
if (!focused) {
|
704
|
+
if (options.onFocus) options.onFocus(instance);
|
705
|
+
focused = true;
|
706
|
+
if (scroller.className.search(/\bCodeMirror-focused\b/) == -1)
|
707
|
+
scroller.className += " CodeMirror-focused";
|
708
|
+
}
|
709
|
+
slowPoll();
|
710
|
+
restartBlink();
|
711
|
+
}
|
712
|
+
function onBlur() {
|
713
|
+
if (focused) {
|
714
|
+
if (options.onBlur) options.onBlur(instance);
|
715
|
+
focused = false;
|
716
|
+
if (bracketHighlighted)
|
717
|
+
operation(function(){
|
718
|
+
if (bracketHighlighted) { bracketHighlighted(); bracketHighlighted = null; }
|
719
|
+
})();
|
720
|
+
scroller.className = scroller.className.replace(" CodeMirror-focused", "");
|
721
|
+
}
|
722
|
+
clearInterval(blinker);
|
723
|
+
setTimeout(function() {if (!focused) shiftSelecting = null;}, 150);
|
724
|
+
}
|
725
|
+
|
726
|
+
// Replace the range from from to to by the strings in newText.
|
727
|
+
// Afterwards, set the selection to selFrom, selTo.
|
728
|
+
function updateLines(from, to, newText, selFrom, selTo) {
|
729
|
+
if (suppressEdits) return;
|
730
|
+
var old = [];
|
731
|
+
doc.iter(from.line, to.line + 1, function(line) {
|
732
|
+
old.push(newHL(line.text, line.markedSpans));
|
733
|
+
});
|
734
|
+
if (history) {
|
735
|
+
history.addChange(from.line, newText.length, old);
|
736
|
+
while (history.done.length > options.undoDepth) history.done.shift();
|
737
|
+
}
|
738
|
+
var lines = updateMarkedSpans(hlSpans(old[0]), hlSpans(lst(old)), from.ch, to.ch, newText);
|
739
|
+
updateLinesNoUndo(from, to, lines, selFrom, selTo);
|
740
|
+
}
|
741
|
+
function unredoHelper(from, to) {
|
742
|
+
if (!from.length) return;
|
743
|
+
var set = from.pop(), out = [];
|
744
|
+
for (var i = set.length - 1; i >= 0; i -= 1) {
|
745
|
+
var change = set[i];
|
746
|
+
var replaced = [], end = change.start + change.added;
|
747
|
+
doc.iter(change.start, end, function(line) { replaced.push(newHL(line.text, line.markedSpans)); });
|
748
|
+
out.push({start: change.start, added: change.old.length, old: replaced});
|
749
|
+
var pos = {line: change.start + change.old.length - 1,
|
750
|
+
ch: editEnd(hlText(lst(replaced)), hlText(lst(change.old)))};
|
751
|
+
updateLinesNoUndo({line: change.start, ch: 0}, {line: end - 1, ch: getLine(end-1).text.length},
|
752
|
+
change.old, pos, pos);
|
753
|
+
}
|
754
|
+
updateInput = true;
|
755
|
+
to.push(out);
|
756
|
+
}
|
757
|
+
function undo() {unredoHelper(history.done, history.undone);}
|
758
|
+
function redo() {unredoHelper(history.undone, history.done);}
|
759
|
+
|
760
|
+
function updateLinesNoUndo(from, to, lines, selFrom, selTo) {
|
761
|
+
if (suppressEdits) return;
|
762
|
+
var recomputeMaxLength = false, maxLineLength = maxLine.text.length;
|
763
|
+
if (!options.lineWrapping)
|
764
|
+
doc.iter(from.line, to.line + 1, function(line) {
|
765
|
+
if (!line.hidden && line.text.length == maxLineLength) {recomputeMaxLength = true; return true;}
|
766
|
+
});
|
767
|
+
if (from.line != to.line || lines.length > 1) gutterDirty = true;
|
768
|
+
|
769
|
+
var nlines = to.line - from.line, firstLine = getLine(from.line), lastLine = getLine(to.line);
|
770
|
+
var lastHL = lst(lines);
|
771
|
+
|
772
|
+
// First adjust the line structure
|
773
|
+
if (from.ch == 0 && to.ch == 0 && hlText(lastHL) == "") {
|
774
|
+
// This is a whole-line replace. Treated specially to make
|
775
|
+
// sure line objects move the way they are supposed to.
|
776
|
+
var added = [], prevLine = null;
|
777
|
+
for (var i = 0, e = lines.length - 1; i < e; ++i)
|
778
|
+
added.push(new Line(hlText(lines[i]), hlSpans(lines[i])));
|
779
|
+
lastLine.update(lastLine.text, hlSpans(lastHL));
|
780
|
+
if (nlines) doc.remove(from.line, nlines, callbacks);
|
781
|
+
if (added.length) doc.insert(from.line, added);
|
782
|
+
} else if (firstLine == lastLine) {
|
783
|
+
if (lines.length == 1) {
|
784
|
+
firstLine.update(firstLine.text.slice(0, from.ch) + hlText(lines[0]) + firstLine.text.slice(to.ch), hlSpans(lines[0]));
|
785
|
+
} else {
|
786
|
+
for (var added = [], i = 1, e = lines.length - 1; i < e; ++i)
|
787
|
+
added.push(new Line(hlText(lines[i]), hlSpans(lines[i])));
|
788
|
+
added.push(new Line(hlText(lastHL) + firstLine.text.slice(to.ch), hlSpans(lastHL)));
|
789
|
+
firstLine.update(firstLine.text.slice(0, from.ch) + hlText(lines[0]), hlSpans(lines[0]));
|
790
|
+
doc.insert(from.line + 1, added);
|
791
|
+
}
|
792
|
+
} else if (lines.length == 1) {
|
793
|
+
firstLine.update(firstLine.text.slice(0, from.ch) + hlText(lines[0]) + lastLine.text.slice(to.ch), hlSpans(lines[0]));
|
794
|
+
doc.remove(from.line + 1, nlines, callbacks);
|
795
|
+
} else {
|
796
|
+
var added = [];
|
797
|
+
firstLine.update(firstLine.text.slice(0, from.ch) + hlText(lines[0]), hlSpans(lines[0]));
|
798
|
+
lastLine.update(hlText(lastHL) + lastLine.text.slice(to.ch), hlSpans(lastHL));
|
799
|
+
for (var i = 1, e = lines.length - 1; i < e; ++i)
|
800
|
+
added.push(new Line(hlText(lines[i]), hlSpans(lines[i])));
|
801
|
+
if (nlines > 1) doc.remove(from.line + 1, nlines - 1, callbacks);
|
802
|
+
doc.insert(from.line + 1, added);
|
803
|
+
}
|
804
|
+
if (options.lineWrapping) {
|
805
|
+
var perLine = Math.max(5, scroller.clientWidth / charWidth() - 3);
|
806
|
+
doc.iter(from.line, from.line + lines.length, function(line) {
|
807
|
+
if (line.hidden) return;
|
808
|
+
var guess = Math.ceil(line.text.length / perLine) || 1;
|
809
|
+
if (guess != line.height) updateLineHeight(line, guess);
|
810
|
+
});
|
811
|
+
} else {
|
812
|
+
doc.iter(from.line, from.line + lines.length, function(line) {
|
813
|
+
var l = line.text;
|
814
|
+
if (!line.hidden && l.length > maxLineLength) {
|
815
|
+
maxLine = line; maxLineLength = l.length; maxLineChanged = true;
|
816
|
+
recomputeMaxLength = false;
|
817
|
+
}
|
818
|
+
});
|
819
|
+
if (recomputeMaxLength) updateMaxLine = true;
|
820
|
+
}
|
821
|
+
|
822
|
+
// Adjust frontier, schedule worker
|
823
|
+
frontier = Math.min(frontier, from.line);
|
824
|
+
startWorker(400);
|
825
|
+
|
826
|
+
var lendiff = lines.length - nlines - 1;
|
827
|
+
// Remember that these lines changed, for updating the display
|
828
|
+
changes.push({from: from.line, to: to.line + 1, diff: lendiff});
|
829
|
+
if (options.onChange) {
|
830
|
+
// Normalize lines to contain only strings, since that's what
|
831
|
+
// the change event handler expects
|
832
|
+
for (var i = 0; i < lines.length; ++i)
|
833
|
+
if (typeof lines[i] != "string") lines[i] = lines[i].text;
|
834
|
+
var changeObj = {from: from, to: to, text: lines};
|
835
|
+
if (textChanged) {
|
836
|
+
for (var cur = textChanged; cur.next; cur = cur.next) {}
|
837
|
+
cur.next = changeObj;
|
838
|
+
} else textChanged = changeObj;
|
839
|
+
}
|
840
|
+
|
841
|
+
// Update the selection
|
842
|
+
function updateLine(n) {return n <= Math.min(to.line, to.line + lendiff) ? n : n + lendiff;}
|
843
|
+
setSelection(clipPos(selFrom), clipPos(selTo),
|
844
|
+
updateLine(sel.from.line), updateLine(sel.to.line));
|
845
|
+
}
|
846
|
+
|
847
|
+
function needsScrollbar() {
|
848
|
+
var realHeight = doc.height * textHeight() + 2 * paddingTop();
|
849
|
+
return realHeight * .99 > scroller.offsetHeight ? realHeight : false;
|
850
|
+
}
|
851
|
+
|
852
|
+
function updateVerticalScroll(scrollTop) {
|
853
|
+
var scrollHeight = needsScrollbar();
|
854
|
+
scrollbar.style.display = scrollHeight ? "block" : "none";
|
855
|
+
if (scrollHeight) {
|
856
|
+
scrollbarInner.style.height = sizer.style.minHeight = scrollHeight + "px";
|
857
|
+
scrollbar.style.height = scroller.clientHeight + "px";
|
858
|
+
if (scrollTop != null) {
|
859
|
+
scrollbar.scrollTop = scroller.scrollTop = scrollTop;
|
860
|
+
// 'Nudge' the scrollbar to work around a Webkit bug where,
|
861
|
+
// in some situations, we'd end up with a scrollbar that
|
862
|
+
// reported its scrollTop (and looked) as expected, but
|
863
|
+
// *behaved* as if it was still in a previous state (i.e.
|
864
|
+
// couldn't scroll up, even though it appeared to be at the
|
865
|
+
// bottom).
|
866
|
+
if (webkit) setTimeout(function() {
|
867
|
+
if (scrollbar.scrollTop != scrollTop) return;
|
868
|
+
scrollbar.scrollTop = scrollTop + (scrollTop ? -1 : 1);
|
869
|
+
scrollbar.scrollTop = scrollTop;
|
870
|
+
}, 0);
|
871
|
+
}
|
872
|
+
} else {
|
873
|
+
sizer.style.minHeight = "";
|
874
|
+
}
|
875
|
+
// Position the mover div to align with the current virtual scroll position
|
876
|
+
mover.style.top = displayOffset * textHeight() + "px";
|
877
|
+
}
|
878
|
+
|
879
|
+
function computeMaxLength() {
|
880
|
+
maxLine = getLine(0); maxLineChanged = true;
|
881
|
+
var maxLineLength = maxLine.text.length;
|
882
|
+
doc.iter(1, doc.size, function(line) {
|
883
|
+
var l = line.text;
|
884
|
+
if (!line.hidden && l.length > maxLineLength) {
|
885
|
+
maxLineLength = l.length; maxLine = line;
|
886
|
+
}
|
887
|
+
});
|
888
|
+
updateMaxLine = false;
|
889
|
+
}
|
890
|
+
|
891
|
+
function replaceRange(code, from, to) {
|
892
|
+
from = clipPos(from);
|
893
|
+
if (!to) to = from; else to = clipPos(to);
|
894
|
+
code = splitLines(code);
|
895
|
+
function adjustPos(pos) {
|
896
|
+
if (posLess(pos, from)) return pos;
|
897
|
+
if (!posLess(to, pos)) return end;
|
898
|
+
var line = pos.line + code.length - (to.line - from.line) - 1;
|
899
|
+
var ch = pos.ch;
|
900
|
+
if (pos.line == to.line)
|
901
|
+
ch += lst(code).length - (to.ch - (to.line == from.line ? from.ch : 0));
|
902
|
+
return {line: line, ch: ch};
|
903
|
+
}
|
904
|
+
var end;
|
905
|
+
replaceRange1(code, from, to, function(end1) {
|
906
|
+
end = end1;
|
907
|
+
return {from: adjustPos(sel.from), to: adjustPos(sel.to)};
|
908
|
+
});
|
909
|
+
return end;
|
910
|
+
}
|
911
|
+
function replaceSelection(code, collapse) {
|
912
|
+
replaceRange1(splitLines(code), sel.from, sel.to, function(end) {
|
913
|
+
if (collapse == "end") return {from: end, to: end};
|
914
|
+
else if (collapse == "start") return {from: sel.from, to: sel.from};
|
915
|
+
else return {from: sel.from, to: end};
|
916
|
+
});
|
917
|
+
}
|
918
|
+
function replaceRange1(code, from, to, computeSel) {
|
919
|
+
var endch = code.length == 1 ? code[0].length + from.ch : lst(code).length;
|
920
|
+
var newSel = computeSel({line: from.line + code.length - 1, ch: endch});
|
921
|
+
updateLines(from, to, code, newSel.from, newSel.to);
|
922
|
+
}
|
923
|
+
|
924
|
+
function getRange(from, to, lineSep) {
|
925
|
+
var l1 = from.line, l2 = to.line;
|
926
|
+
if (l1 == l2) return getLine(l1).text.slice(from.ch, to.ch);
|
927
|
+
var code = [getLine(l1).text.slice(from.ch)];
|
928
|
+
doc.iter(l1 + 1, l2, function(line) { code.push(line.text); });
|
929
|
+
code.push(getLine(l2).text.slice(0, to.ch));
|
930
|
+
return code.join(lineSep || "\n");
|
931
|
+
}
|
932
|
+
function getSelection(lineSep) {
|
933
|
+
return getRange(sel.from, sel.to, lineSep);
|
934
|
+
}
|
935
|
+
|
936
|
+
function slowPoll() {
|
937
|
+
if (pollingFast) return;
|
938
|
+
poll.set(options.pollInterval, function() {
|
939
|
+
readInput();
|
940
|
+
if (focused) slowPoll();
|
941
|
+
});
|
942
|
+
}
|
943
|
+
function fastPoll() {
|
944
|
+
var missed = false;
|
945
|
+
pollingFast = true;
|
946
|
+
function p() {
|
947
|
+
var changed = readInput();
|
948
|
+
if (!changed && !missed) {missed = true; poll.set(60, p);}
|
949
|
+
else {pollingFast = false; slowPoll();}
|
950
|
+
}
|
951
|
+
poll.set(20, p);
|
952
|
+
}
|
953
|
+
|
954
|
+
// Previnput is a hack to work with IME. If we reset the textarea
|
955
|
+
// on every change, that breaks IME. So we look for changes
|
956
|
+
// compared to the previous content instead. (Modern browsers have
|
957
|
+
// events that indicate IME taking place, but these are not widely
|
958
|
+
// supported or compatible enough yet to rely on.)
|
959
|
+
var prevInput = "";
|
960
|
+
function readInput() {
|
961
|
+
if (!focused || hasSelection(input) || options.readOnly) return false;
|
962
|
+
var text = input.value;
|
963
|
+
if (text == prevInput) return false;
|
964
|
+
if (!nestedOperation) startOperation();
|
965
|
+
shiftSelecting = null;
|
966
|
+
var same = 0, l = Math.min(prevInput.length, text.length);
|
967
|
+
while (same < l && prevInput[same] == text[same]) ++same;
|
968
|
+
if (same < prevInput.length)
|
969
|
+
sel.from = {line: sel.from.line, ch: sel.from.ch - (prevInput.length - same)};
|
970
|
+
else if (overwrite && posEq(sel.from, sel.to) && !pasteIncoming)
|
971
|
+
sel.to = {line: sel.to.line, ch: Math.min(getLine(sel.to.line).text.length, sel.to.ch + (text.length - same))};
|
972
|
+
replaceSelection(text.slice(same), "end");
|
973
|
+
if (text.length > 1000) { input.value = prevInput = ""; }
|
974
|
+
else prevInput = text;
|
975
|
+
if (!nestedOperation) endOperation();
|
976
|
+
pasteIncoming = false;
|
977
|
+
return true;
|
978
|
+
}
|
979
|
+
function resetInput(user) {
|
980
|
+
if (!posEq(sel.from, sel.to)) {
|
981
|
+
prevInput = "";
|
982
|
+
input.value = getSelection();
|
983
|
+
if (focused) selectInput(input);
|
984
|
+
} else if (user) prevInput = input.value = "";
|
985
|
+
}
|
986
|
+
|
987
|
+
function focusInput() {
|
988
|
+
if (options.readOnly != "nocursor" && (ie_lt9 || document.activeElement != input))
|
989
|
+
input.focus();
|
990
|
+
}
|
991
|
+
|
992
|
+
function scrollCursorIntoView() {
|
993
|
+
var coords = calculateCursorCoords();
|
994
|
+
scrollIntoView(coords.x, coords.y, coords.x, coords.yBot);
|
995
|
+
if (!focused) return;
|
996
|
+
var box = sizer.getBoundingClientRect(), doScroll = null;
|
997
|
+
if (coords.y + box.top < 0) doScroll = true;
|
998
|
+
else if (coords.y + box.top + textHeight() > (window.innerHeight || document.documentElement.clientHeight)) doScroll = false;
|
999
|
+
if (doScroll != null) {
|
1000
|
+
var hidden = cursor.style.display == "none";
|
1001
|
+
if (hidden) {
|
1002
|
+
cursor.style.display = "";
|
1003
|
+
cursor.style.left = coords.x + "px";
|
1004
|
+
cursor.style.top = (coords.y - displayOffset) + "px";
|
1005
|
+
}
|
1006
|
+
cursor.scrollIntoView(doScroll);
|
1007
|
+
if (hidden) cursor.style.display = "none";
|
1008
|
+
}
|
1009
|
+
}
|
1010
|
+
function calculateCursorCoords() {
|
1011
|
+
var cursor = localCoords(sel.inverted ? sel.from : sel.to);
|
1012
|
+
var x = options.lineWrapping ? Math.min(cursor.x, lineSpace.offsetWidth) : cursor.x;
|
1013
|
+
return {x: x, y: cursor.y, yBot: cursor.yBot};
|
1014
|
+
}
|
1015
|
+
function scrollIntoView(x1, y1, x2, y2) {
|
1016
|
+
var scrollPos = calculateScrollPos(x1, y1, x2, y2);
|
1017
|
+
if (scrollPos.scrollLeft != null) {scroller.scrollLeft = scrollPos.scrollLeft;}
|
1018
|
+
if (scrollPos.scrollTop != null) {scrollbar.scrollTop = scroller.scrollTop = scrollPos.scrollTop;}
|
1019
|
+
}
|
1020
|
+
function calculateScrollPos(x1, y1, x2, y2) {
|
1021
|
+
var pl = paddingLeft(), pt = paddingTop();
|
1022
|
+
y1 += pt; y2 += pt; x1 += pl; x2 += pl;
|
1023
|
+
var screen = scroller.clientHeight, screentop = scrollbar.scrollTop, result = {};
|
1024
|
+
var docBottom = needsScrollbar() || Infinity;
|
1025
|
+
var atTop = y1 < pt + 10, atBottom = y2 + pt > docBottom - 10;
|
1026
|
+
if (y1 < screentop) result.scrollTop = atTop ? 0 : Math.max(0, y1);
|
1027
|
+
else if (y2 > screentop + screen) result.scrollTop = (atBottom ? docBottom : y2) - screen;
|
1028
|
+
|
1029
|
+
var screenw = scroller.clientWidth, screenleft = scroller.scrollLeft;
|
1030
|
+
var gutterw = options.fixedGutter ? gutter.clientWidth : 0;
|
1031
|
+
var atLeft = x1 < gutterw + pl + 10;
|
1032
|
+
if (x1 < screenleft + gutterw || atLeft) {
|
1033
|
+
if (atLeft) x1 = 0;
|
1034
|
+
result.scrollLeft = Math.max(0, x1 - 10 - gutterw);
|
1035
|
+
} else if (x2 > screenw + screenleft - 3) {
|
1036
|
+
result.scrollLeft = x2 + 10 - screenw;
|
1037
|
+
}
|
1038
|
+
return result;
|
1039
|
+
}
|
1040
|
+
|
1041
|
+
function visibleLines(scrollTop) {
|
1042
|
+
var lh = textHeight(), top = (scrollTop != null ? scrollTop : scrollbar.scrollTop) - paddingTop();
|
1043
|
+
var fromHeight = Math.max(0, Math.floor(top / lh));
|
1044
|
+
var toHeight = Math.ceil((top + scroller.clientHeight) / lh);
|
1045
|
+
return {from: lineAtHeight(doc, fromHeight),
|
1046
|
+
to: lineAtHeight(doc, toHeight)};
|
1047
|
+
}
|
1048
|
+
// Uses a set of changes plus the current scroll position to
|
1049
|
+
// determine which DOM updates have to be made, and makes the
|
1050
|
+
// updates.
|
1051
|
+
function updateDisplay(changes, suppressCallback, scrollTop) {
|
1052
|
+
if (!scroller.clientWidth) {
|
1053
|
+
showingFrom = showingTo = displayOffset = 0;
|
1054
|
+
return;
|
1055
|
+
}
|
1056
|
+
// Compute the new visible window
|
1057
|
+
// If scrollTop is specified, use that to determine which lines
|
1058
|
+
// to render instead of the current scrollbar position.
|
1059
|
+
var visible = visibleLines(scrollTop);
|
1060
|
+
// Bail out if the visible area is already rendered and nothing changed.
|
1061
|
+
if (changes !== true && changes.length == 0 && visible.from > showingFrom && visible.to < showingTo) {
|
1062
|
+
updateVerticalScroll(scrollTop);
|
1063
|
+
return;
|
1064
|
+
}
|
1065
|
+
var from = Math.max(visible.from - 100, 0), to = Math.min(doc.size, visible.to + 100);
|
1066
|
+
if (showingFrom < from && from - showingFrom < 20) from = showingFrom;
|
1067
|
+
if (showingTo > to && showingTo - to < 20) to = Math.min(doc.size, showingTo);
|
1068
|
+
|
1069
|
+
// Create a range of theoretically intact lines, and punch holes
|
1070
|
+
// in that using the change info.
|
1071
|
+
var intact = changes === true ? [] :
|
1072
|
+
computeIntact([{from: showingFrom, to: showingTo, domStart: 0}], changes);
|
1073
|
+
// Clip off the parts that won't be visible
|
1074
|
+
var intactLines = 0;
|
1075
|
+
for (var i = 0; i < intact.length; ++i) {
|
1076
|
+
var range = intact[i];
|
1077
|
+
if (range.from < from) {range.domStart += (from - range.from); range.from = from;}
|
1078
|
+
if (range.to > to) range.to = to;
|
1079
|
+
if (range.from >= range.to) intact.splice(i--, 1);
|
1080
|
+
else intactLines += range.to - range.from;
|
1081
|
+
}
|
1082
|
+
if (intactLines == to - from && from == showingFrom && to == showingTo) {
|
1083
|
+
updateVerticalScroll(scrollTop);
|
1084
|
+
return;
|
1085
|
+
}
|
1086
|
+
intact.sort(function(a, b) {return a.domStart - b.domStart;});
|
1087
|
+
|
1088
|
+
var th = textHeight(), gutterDisplay = gutter.style.display;
|
1089
|
+
lineDiv.style.display = "none";
|
1090
|
+
patchDisplay(from, to, intact);
|
1091
|
+
lineDiv.style.display = gutter.style.display = "";
|
1092
|
+
|
1093
|
+
var different = from != showingFrom || to != showingTo || lastSizeC != scroller.clientHeight + th;
|
1094
|
+
// This is just a bogus formula that detects when the editor is
|
1095
|
+
// resized or the font size changes.
|
1096
|
+
if (different) lastSizeC = scroller.clientHeight + th;
|
1097
|
+
if (from != showingFrom || to != showingTo && options.onViewportChange)
|
1098
|
+
setTimeout(function(){
|
1099
|
+
if (options.onViewportChange) options.onViewportChange(instance, from, to);
|
1100
|
+
});
|
1101
|
+
showingFrom = from; showingTo = to;
|
1102
|
+
displayOffset = heightAtLine(doc, from);
|
1103
|
+
startWorker(100);
|
1104
|
+
|
1105
|
+
// Since this is all rather error prone, it is honoured with the
|
1106
|
+
// only assertion in the whole file.
|
1107
|
+
if (lineDiv.childNodes.length != showingTo - showingFrom)
|
1108
|
+
throw new Error("BAD PATCH! " + JSON.stringify(intact) + " size=" + (showingTo - showingFrom) +
|
1109
|
+
" nodes=" + lineDiv.childNodes.length);
|
1110
|
+
|
1111
|
+
function checkHeights() {
|
1112
|
+
var curNode = lineDiv.firstChild, heightChanged = false;
|
1113
|
+
doc.iter(showingFrom, showingTo, function(line) {
|
1114
|
+
// Work around bizarro IE7 bug where, sometimes, our curNode
|
1115
|
+
// is magically replaced with a new node in the DOM, leaving
|
1116
|
+
// us with a reference to an orphan (nextSibling-less) node.
|
1117
|
+
if (!curNode) return;
|
1118
|
+
if (!line.hidden) {
|
1119
|
+
var height = Math.round(curNode.offsetHeight / th) || 1;
|
1120
|
+
if (line.height != height) {
|
1121
|
+
updateLineHeight(line, height);
|
1122
|
+
gutterDirty = heightChanged = true;
|
1123
|
+
}
|
1124
|
+
}
|
1125
|
+
curNode = curNode.nextSibling;
|
1126
|
+
});
|
1127
|
+
return heightChanged;
|
1128
|
+
}
|
1129
|
+
|
1130
|
+
if (options.lineWrapping) checkHeights();
|
1131
|
+
|
1132
|
+
gutter.style.display = gutterDisplay;
|
1133
|
+
if (different || gutterDirty) {
|
1134
|
+
// If the gutter grew in size, re-check heights. If those changed, re-draw gutter.
|
1135
|
+
updateGutter() && options.lineWrapping && checkHeights() && updateGutter();
|
1136
|
+
}
|
1137
|
+
updateVerticalScroll(scrollTop);
|
1138
|
+
updateSelection();
|
1139
|
+
if (!suppressCallback && options.onUpdate) options.onUpdate(instance);
|
1140
|
+
return true;
|
1141
|
+
}
|
1142
|
+
|
1143
|
+
function computeIntact(intact, changes) {
|
1144
|
+
for (var i = 0, l = changes.length || 0; i < l; ++i) {
|
1145
|
+
var change = changes[i], intact2 = [], diff = change.diff || 0;
|
1146
|
+
for (var j = 0, l2 = intact.length; j < l2; ++j) {
|
1147
|
+
var range = intact[j];
|
1148
|
+
if (change.to <= range.from && change.diff)
|
1149
|
+
intact2.push({from: range.from + diff, to: range.to + diff,
|
1150
|
+
domStart: range.domStart});
|
1151
|
+
else if (change.to <= range.from || change.from >= range.to)
|
1152
|
+
intact2.push(range);
|
1153
|
+
else {
|
1154
|
+
if (change.from > range.from)
|
1155
|
+
intact2.push({from: range.from, to: change.from, domStart: range.domStart});
|
1156
|
+
if (change.to < range.to)
|
1157
|
+
intact2.push({from: change.to + diff, to: range.to + diff,
|
1158
|
+
domStart: range.domStart + (change.to - range.from)});
|
1159
|
+
}
|
1160
|
+
}
|
1161
|
+
intact = intact2;
|
1162
|
+
}
|
1163
|
+
return intact;
|
1164
|
+
}
|
1165
|
+
|
1166
|
+
function patchDisplay(from, to, intact) {
|
1167
|
+
function killNode(node) {
|
1168
|
+
var tmp = node.nextSibling;
|
1169
|
+
node.parentNode.removeChild(node);
|
1170
|
+
return tmp;
|
1171
|
+
}
|
1172
|
+
// The first pass removes the DOM nodes that aren't intact.
|
1173
|
+
if (!intact.length) removeChildren(lineDiv);
|
1174
|
+
else {
|
1175
|
+
var domPos = 0, curNode = lineDiv.firstChild, n;
|
1176
|
+
for (var i = 0; i < intact.length; ++i) {
|
1177
|
+
var cur = intact[i];
|
1178
|
+
while (cur.domStart > domPos) {curNode = killNode(curNode); domPos++;}
|
1179
|
+
for (var j = 0, e = cur.to - cur.from; j < e; ++j) {curNode = curNode.nextSibling; domPos++;}
|
1180
|
+
}
|
1181
|
+
while (curNode) curNode = killNode(curNode);
|
1182
|
+
}
|
1183
|
+
// This pass fills in the lines that actually changed.
|
1184
|
+
var nextIntact = intact.shift(), curNode = lineDiv.firstChild, j = from;
|
1185
|
+
doc.iter(from, to, function(line) {
|
1186
|
+
if (nextIntact && nextIntact.to == j) nextIntact = intact.shift();
|
1187
|
+
if (!nextIntact || nextIntact.from > j) {
|
1188
|
+
if (line.hidden) var lineElement = elt("pre");
|
1189
|
+
else {
|
1190
|
+
var lineElement = lineContent(line);
|
1191
|
+
if (line.className) lineElement.className = line.className;
|
1192
|
+
// Kludge to make sure the styled element lies behind the selection (by z-index)
|
1193
|
+
if (line.bgClassName) {
|
1194
|
+
var pre = elt("pre", "\u00a0", line.bgClassName, "position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: -2");
|
1195
|
+
lineElement = elt("div", [pre, lineElement], null, "position: relative");
|
1196
|
+
}
|
1197
|
+
}
|
1198
|
+
lineDiv.insertBefore(lineElement, curNode);
|
1199
|
+
} else {
|
1200
|
+
curNode = curNode.nextSibling;
|
1201
|
+
}
|
1202
|
+
++j;
|
1203
|
+
});
|
1204
|
+
}
|
1205
|
+
|
1206
|
+
function updateGutter() {
|
1207
|
+
if (!options.gutter && !options.lineNumbers) return;
|
1208
|
+
var hText = mover.offsetHeight, hEditor = scroller.clientHeight;
|
1209
|
+
gutter.style.height = (hText - hEditor < 2 ? hEditor : hText) + "px";
|
1210
|
+
var fragment = document.createDocumentFragment(), i = showingFrom, normalNode;
|
1211
|
+
doc.iter(showingFrom, Math.max(showingTo, showingFrom + 1), function(line) {
|
1212
|
+
if (line.hidden) {
|
1213
|
+
fragment.appendChild(elt("pre"));
|
1214
|
+
} else {
|
1215
|
+
var marker = line.gutterMarker;
|
1216
|
+
var text = options.lineNumbers ? options.lineNumberFormatter(i + options.firstLineNumber) : null;
|
1217
|
+
if (marker && marker.text)
|
1218
|
+
text = marker.text.replace("%N%", text != null ? text : "");
|
1219
|
+
else if (text == null)
|
1220
|
+
text = "\u00a0";
|
1221
|
+
var markerElement = fragment.appendChild(elt("pre", null, marker && marker.style));
|
1222
|
+
markerElement.innerHTML = text;
|
1223
|
+
for (var j = 1; j < line.height; ++j) {
|
1224
|
+
markerElement.appendChild(elt("br"));
|
1225
|
+
markerElement.appendChild(document.createTextNode("\u00a0"));
|
1226
|
+
}
|
1227
|
+
if (!marker) normalNode = i;
|
1228
|
+
}
|
1229
|
+
++i;
|
1230
|
+
});
|
1231
|
+
gutter.style.display = "none";
|
1232
|
+
removeChildrenAndAdd(gutterText, fragment);
|
1233
|
+
// Make sure scrolling doesn't cause number gutter size to pop
|
1234
|
+
if (normalNode != null && options.lineNumbers) {
|
1235
|
+
var node = gutterText.childNodes[normalNode - showingFrom];
|
1236
|
+
var minwidth = String(doc.size).length, val = eltText(node.firstChild), pad = "";
|
1237
|
+
while (val.length + pad.length < minwidth) pad += "\u00a0";
|
1238
|
+
if (pad) node.insertBefore(document.createTextNode(pad), node.firstChild);
|
1239
|
+
}
|
1240
|
+
gutter.style.display = "";
|
1241
|
+
var resized = Math.abs((parseInt(lineSpace.style.marginLeft) || 0) - gutter.offsetWidth) > 2;
|
1242
|
+
lineSpace.style.marginLeft = gutter.offsetWidth + "px";
|
1243
|
+
gutterDirty = false;
|
1244
|
+
return resized;
|
1245
|
+
}
|
1246
|
+
function updateSelection() {
|
1247
|
+
var collapsed = posEq(sel.from, sel.to);
|
1248
|
+
var fromPos = localCoords(sel.from, true);
|
1249
|
+
var toPos = collapsed ? fromPos : localCoords(sel.to, true);
|
1250
|
+
var headPos = sel.inverted ? fromPos : toPos, th = textHeight();
|
1251
|
+
var wrapOff = eltOffset(wrapper), lineOff = eltOffset(lineDiv);
|
1252
|
+
inputDiv.style.top = Math.max(0, Math.min(scroller.offsetHeight, headPos.y + lineOff.top - wrapOff.top)) + "px";
|
1253
|
+
inputDiv.style.left = Math.max(0, Math.min(scroller.offsetWidth, headPos.x + lineOff.left - wrapOff.left)) + "px";
|
1254
|
+
if (collapsed || options.showCursorWhenSelecting) {
|
1255
|
+
cursor.style.top = headPos.y + "px";
|
1256
|
+
cursor.style.left = (options.lineWrapping ? Math.min(headPos.x, lineSpace.offsetWidth) : headPos.x) + "px";
|
1257
|
+
cursor.style.display = "";
|
1258
|
+
} else {
|
1259
|
+
cursor.style.display = "none";
|
1260
|
+
}
|
1261
|
+
if (!collapsed) {
|
1262
|
+
var sameLine = fromPos.y == toPos.y, fragment = document.createDocumentFragment();
|
1263
|
+
var clientWidth = lineSpace.clientWidth || lineSpace.offsetWidth;
|
1264
|
+
var clientHeight = lineSpace.clientHeight || lineSpace.offsetHeight;
|
1265
|
+
var add = function(left, top, right, height) {
|
1266
|
+
var rstyle = quirksMode ? "width: " + (!right ? clientWidth : clientWidth - right - left) + "px"
|
1267
|
+
: "right: " + (right - 1) + "px";
|
1268
|
+
fragment.appendChild(elt("div", null, "CodeMirror-selected", "position: absolute; left: " + left +
|
1269
|
+
"px; top: " + top + "px; " + rstyle + "; height: " + height + "px"));
|
1270
|
+
};
|
1271
|
+
if (sel.from.ch && fromPos.y >= 0) {
|
1272
|
+
var right = sameLine ? clientWidth - toPos.x : 0;
|
1273
|
+
add(fromPos.x, fromPos.y, right, th);
|
1274
|
+
}
|
1275
|
+
var middleStart = Math.max(0, fromPos.y + (sel.from.ch ? th : 0));
|
1276
|
+
var middleHeight = Math.min(toPos.y, clientHeight) - middleStart;
|
1277
|
+
if (middleHeight > 0.2 * th)
|
1278
|
+
add(0, middleStart, 0, middleHeight);
|
1279
|
+
if ((!sameLine || !sel.from.ch) && toPos.y < clientHeight - .5 * th)
|
1280
|
+
add(0, toPos.y, clientWidth - toPos.x, th);
|
1281
|
+
removeChildrenAndAdd(selectionDiv, fragment);
|
1282
|
+
selectionDiv.style.display = "";
|
1283
|
+
} else {
|
1284
|
+
selectionDiv.style.display = "none";
|
1285
|
+
}
|
1286
|
+
}
|
1287
|
+
|
1288
|
+
function setShift(val) {
|
1289
|
+
if (val) shiftSelecting = shiftSelecting || (sel.inverted ? sel.to : sel.from);
|
1290
|
+
else shiftSelecting = null;
|
1291
|
+
}
|
1292
|
+
function setSelectionUser(from, to) {
|
1293
|
+
var sh = shiftSelecting && clipPos(shiftSelecting);
|
1294
|
+
if (sh) {
|
1295
|
+
if (posLess(sh, from)) from = sh;
|
1296
|
+
else if (posLess(to, sh)) to = sh;
|
1297
|
+
}
|
1298
|
+
setSelection(from, to);
|
1299
|
+
userSelChange = true;
|
1300
|
+
}
|
1301
|
+
// Update the selection. Last two args are only used by
|
1302
|
+
// updateLines, since they have to be expressed in the line
|
1303
|
+
// numbers before the update.
|
1304
|
+
function setSelection(from, to, oldFrom, oldTo) {
|
1305
|
+
goalColumn = null;
|
1306
|
+
if (oldFrom == null) {oldFrom = sel.from.line; oldTo = sel.to.line;}
|
1307
|
+
if (posEq(sel.from, from) && posEq(sel.to, to)) return;
|
1308
|
+
if (posLess(to, from)) {var tmp = to; to = from; from = tmp;}
|
1309
|
+
|
1310
|
+
// Skip over hidden lines.
|
1311
|
+
if (from.line != oldFrom) {
|
1312
|
+
var from1 = skipHidden(from, oldFrom, sel.from.ch);
|
1313
|
+
// If there is no non-hidden line left, force visibility on current line
|
1314
|
+
if (!from1) setLineHidden(from.line, false);
|
1315
|
+
else from = from1;
|
1316
|
+
}
|
1317
|
+
if (to.line != oldTo) to = skipHidden(to, oldTo, sel.to.ch);
|
1318
|
+
|
1319
|
+
if (posEq(from, to)) sel.inverted = false;
|
1320
|
+
else if (posEq(from, sel.to)) sel.inverted = false;
|
1321
|
+
else if (posEq(to, sel.from)) sel.inverted = true;
|
1322
|
+
|
1323
|
+
if (options.autoClearEmptyLines && posEq(sel.from, sel.to)) {
|
1324
|
+
var head = sel.inverted ? from : to;
|
1325
|
+
if (head.line != sel.from.line && sel.from.line < doc.size) {
|
1326
|
+
var oldLine = getLine(sel.from.line);
|
1327
|
+
if (/^\s+$/.test(oldLine.text))
|
1328
|
+
setTimeout(operation(function() {
|
1329
|
+
if (oldLine.parent && /^\s+$/.test(oldLine.text)) {
|
1330
|
+
var no = lineNo(oldLine);
|
1331
|
+
replaceRange("", {line: no, ch: 0}, {line: no, ch: oldLine.text.length});
|
1332
|
+
}
|
1333
|
+
}, 10));
|
1334
|
+
}
|
1335
|
+
}
|
1336
|
+
|
1337
|
+
sel.from = from; sel.to = to;
|
1338
|
+
selectionChanged = true;
|
1339
|
+
}
|
1340
|
+
function skipHidden(pos, oldLine, oldCh) {
|
1341
|
+
function getNonHidden(dir) {
|
1342
|
+
var lNo = pos.line + dir, end = dir == 1 ? doc.size : -1;
|
1343
|
+
while (lNo != end) {
|
1344
|
+
var line = getLine(lNo);
|
1345
|
+
if (!line.hidden) {
|
1346
|
+
var ch = pos.ch;
|
1347
|
+
if (toEnd || ch > oldCh || ch > line.text.length) ch = line.text.length;
|
1348
|
+
return {line: lNo, ch: ch};
|
1349
|
+
}
|
1350
|
+
lNo += dir;
|
1351
|
+
}
|
1352
|
+
}
|
1353
|
+
var line = getLine(pos.line);
|
1354
|
+
var toEnd = pos.ch == line.text.length && pos.ch != oldCh;
|
1355
|
+
if (!line.hidden) return pos;
|
1356
|
+
if (pos.line >= oldLine) return getNonHidden(1) || getNonHidden(-1);
|
1357
|
+
else return getNonHidden(-1) || getNonHidden(1);
|
1358
|
+
}
|
1359
|
+
function setCursor(line, ch, user) {
|
1360
|
+
var pos = clipPos({line: line, ch: ch || 0});
|
1361
|
+
(user ? setSelectionUser : setSelection)(pos, pos);
|
1362
|
+
}
|
1363
|
+
|
1364
|
+
function clipLine(n) {return Math.max(0, Math.min(n, doc.size-1));}
|
1365
|
+
function clipPos(pos) {
|
1366
|
+
if (pos.line < 0) return {line: 0, ch: 0};
|
1367
|
+
if (pos.line >= doc.size) return {line: doc.size-1, ch: getLine(doc.size-1).text.length};
|
1368
|
+
var ch = pos.ch, linelen = getLine(pos.line).text.length;
|
1369
|
+
if (ch == null || ch > linelen) return {line: pos.line, ch: linelen};
|
1370
|
+
else if (ch < 0) return {line: pos.line, ch: 0};
|
1371
|
+
else return pos;
|
1372
|
+
}
|
1373
|
+
|
1374
|
+
function findPosH(dir, unit) {
|
1375
|
+
var end = sel.inverted ? sel.from : sel.to, line = end.line, ch = end.ch;
|
1376
|
+
var lineObj = getLine(line);
|
1377
|
+
function findNextLine() {
|
1378
|
+
for (var l = line + dir, e = dir < 0 ? -1 : doc.size; l != e; l += dir) {
|
1379
|
+
var lo = getLine(l);
|
1380
|
+
if (!lo.hidden) { line = l; lineObj = lo; return true; }
|
1381
|
+
}
|
1382
|
+
}
|
1383
|
+
function moveOnce(boundToLine) {
|
1384
|
+
if (ch == (dir < 0 ? 0 : lineObj.text.length)) {
|
1385
|
+
if (!boundToLine && findNextLine()) ch = dir < 0 ? lineObj.text.length : 0;
|
1386
|
+
else return false;
|
1387
|
+
} else ch += dir;
|
1388
|
+
return true;
|
1389
|
+
}
|
1390
|
+
if (unit == "char") moveOnce();
|
1391
|
+
else if (unit == "column") moveOnce(true);
|
1392
|
+
else if (unit == "word") {
|
1393
|
+
var sawWord = false;
|
1394
|
+
for (;;) {
|
1395
|
+
if (dir < 0) if (!moveOnce()) break;
|
1396
|
+
if (isWordChar(lineObj.text.charAt(ch))) sawWord = true;
|
1397
|
+
else if (sawWord) {if (dir < 0) {dir = 1; moveOnce();} break;}
|
1398
|
+
if (dir > 0) if (!moveOnce()) break;
|
1399
|
+
}
|
1400
|
+
}
|
1401
|
+
return {line: line, ch: ch};
|
1402
|
+
}
|
1403
|
+
function moveH(dir, unit) {
|
1404
|
+
var pos = dir < 0 ? sel.from : sel.to;
|
1405
|
+
if (shiftSelecting || posEq(sel.from, sel.to)) pos = findPosH(dir, unit);
|
1406
|
+
setCursor(pos.line, pos.ch, true);
|
1407
|
+
}
|
1408
|
+
function deleteH(dir, unit) {
|
1409
|
+
if (!posEq(sel.from, sel.to)) replaceRange("", sel.from, sel.to);
|
1410
|
+
else if (dir < 0) replaceRange("", findPosH(dir, unit), sel.to);
|
1411
|
+
else replaceRange("", sel.from, findPosH(dir, unit));
|
1412
|
+
userSelChange = true;
|
1413
|
+
}
|
1414
|
+
function moveV(dir, unit) {
|
1415
|
+
var dist = 0, pos = localCoords(sel.inverted ? sel.from : sel.to, true);
|
1416
|
+
if (goalColumn != null) pos.x = goalColumn;
|
1417
|
+
if (unit == "page") {
|
1418
|
+
var screen = Math.min(scroller.clientHeight, window.innerHeight || document.documentElement.clientHeight);
|
1419
|
+
var target = coordsChar(pos.x, pos.y + screen * dir);
|
1420
|
+
} else if (unit == "line") {
|
1421
|
+
var th = textHeight();
|
1422
|
+
var target = coordsChar(pos.x, pos.y + .5 * th + dir * th);
|
1423
|
+
}
|
1424
|
+
if (unit == "page") scrollbar.scrollTop += localCoords(target, true).y - pos.y;
|
1425
|
+
setCursor(target.line, target.ch, true);
|
1426
|
+
goalColumn = pos.x;
|
1427
|
+
}
|
1428
|
+
|
1429
|
+
function findWordAt(pos) {
|
1430
|
+
var line = getLine(pos.line).text;
|
1431
|
+
var start = pos.ch, end = pos.ch;
|
1432
|
+
if (line) {
|
1433
|
+
if (pos.after === false || end == line.length) --start; else ++end;
|
1434
|
+
var startChar = line.charAt(start);
|
1435
|
+
var check = isWordChar(startChar) ? isWordChar :
|
1436
|
+
/\s/.test(startChar) ? function(ch) {return /\s/.test(ch);} :
|
1437
|
+
function(ch) {return !/\s/.test(ch) && isWordChar(ch);};
|
1438
|
+
while (start > 0 && check(line.charAt(start - 1))) --start;
|
1439
|
+
while (end < line.length && check(line.charAt(end))) ++end;
|
1440
|
+
}
|
1441
|
+
return {from: {line: pos.line, ch: start}, to: {line: pos.line, ch: end}};
|
1442
|
+
}
|
1443
|
+
function selectLine(line) {
|
1444
|
+
setSelectionUser({line: line, ch: 0}, clipPos({line: line + 1, ch: 0}));
|
1445
|
+
}
|
1446
|
+
function indentSelected(mode) {
|
1447
|
+
if (posEq(sel.from, sel.to)) return indentLine(sel.from.line, mode);
|
1448
|
+
var e = sel.to.line - (sel.to.ch ? 0 : 1);
|
1449
|
+
for (var i = sel.from.line; i <= e; ++i) indentLine(i, mode);
|
1450
|
+
}
|
1451
|
+
|
1452
|
+
function indentLine(n, how) {
|
1453
|
+
if (!how) how = "add";
|
1454
|
+
if (how == "smart") {
|
1455
|
+
if (!mode.indent) how = "prev";
|
1456
|
+
else var state = getStateBefore(n);
|
1457
|
+
}
|
1458
|
+
|
1459
|
+
var line = getLine(n), curSpace = line.indentation(options.tabSize),
|
1460
|
+
curSpaceString = line.text.match(/^\s*/)[0], indentation;
|
1461
|
+
if (how == "smart") {
|
1462
|
+
indentation = mode.indent(state, line.text.slice(curSpaceString.length), line.text);
|
1463
|
+
if (indentation == Pass) how = "prev";
|
1464
|
+
}
|
1465
|
+
if (how == "prev") {
|
1466
|
+
if (n) indentation = getLine(n-1).indentation(options.tabSize);
|
1467
|
+
else indentation = 0;
|
1468
|
+
}
|
1469
|
+
else if (how == "add") indentation = curSpace + options.indentUnit;
|
1470
|
+
else if (how == "subtract") indentation = curSpace - options.indentUnit;
|
1471
|
+
indentation = Math.max(0, indentation);
|
1472
|
+
var diff = indentation - curSpace;
|
1473
|
+
|
1474
|
+
var indentString = "", pos = 0;
|
1475
|
+
if (options.indentWithTabs)
|
1476
|
+
for (var i = Math.floor(indentation / options.tabSize); i; --i) {pos += options.tabSize; indentString += "\t";}
|
1477
|
+
if (pos < indentation) indentString += spaceStr(indentation - pos);
|
1478
|
+
|
1479
|
+
if (indentString != curSpaceString)
|
1480
|
+
replaceRange(indentString, {line: n, ch: 0}, {line: n, ch: curSpaceString.length});
|
1481
|
+
line.stateAfter = null;
|
1482
|
+
}
|
1483
|
+
|
1484
|
+
function loadMode() {
|
1485
|
+
mode = CodeMirror.getMode(options, options.mode);
|
1486
|
+
doc.iter(0, doc.size, function(line) { line.stateAfter = null; });
|
1487
|
+
frontier = 0;
|
1488
|
+
startWorker(100);
|
1489
|
+
}
|
1490
|
+
function gutterChanged() {
|
1491
|
+
var visible = options.gutter || options.lineNumbers;
|
1492
|
+
gutter.style.display = visible ? "" : "none";
|
1493
|
+
if (visible) gutterDirty = true;
|
1494
|
+
else lineDiv.parentNode.style.marginLeft = 0;
|
1495
|
+
}
|
1496
|
+
function wrappingChanged(from, to) {
|
1497
|
+
if (options.lineWrapping) {
|
1498
|
+
wrapper.className += " CodeMirror-wrap";
|
1499
|
+
var perLine = scroller.clientWidth / charWidth() - 3;
|
1500
|
+
doc.iter(0, doc.size, function(line) {
|
1501
|
+
if (line.hidden) return;
|
1502
|
+
var guess = Math.ceil(line.text.length / perLine) || 1;
|
1503
|
+
if (guess != 1) updateLineHeight(line, guess);
|
1504
|
+
});
|
1505
|
+
lineSpace.style.minWidth = widthForcer.style.left = "";
|
1506
|
+
} else {
|
1507
|
+
wrapper.className = wrapper.className.replace(" CodeMirror-wrap", "");
|
1508
|
+
computeMaxLength();
|
1509
|
+
doc.iter(0, doc.size, function(line) {
|
1510
|
+
if (line.height != 1 && !line.hidden) updateLineHeight(line, 1);
|
1511
|
+
});
|
1512
|
+
}
|
1513
|
+
changes.push({from: 0, to: doc.size});
|
1514
|
+
}
|
1515
|
+
function themeChanged() {
|
1516
|
+
scroller.className = scroller.className.replace(/\s*cm-s-\S+/g, "") +
|
1517
|
+
options.theme.replace(/(^|\s)\s*/g, " cm-s-");
|
1518
|
+
}
|
1519
|
+
function keyMapChanged() {
|
1520
|
+
var style = keyMap[options.keyMap].style;
|
1521
|
+
wrapper.className = wrapper.className.replace(/\s*cm-keymap-\S+/g, "") +
|
1522
|
+
(style ? " cm-keymap-" + style : "");
|
1523
|
+
}
|
1524
|
+
|
1525
|
+
function TextMarker(type, style) { this.lines = []; this.type = type; if (style) this.style = style; }
|
1526
|
+
TextMarker.prototype.clear = operation(function() {
|
1527
|
+
var min, max;
|
1528
|
+
for (var i = 0; i < this.lines.length; ++i) {
|
1529
|
+
var line = this.lines[i];
|
1530
|
+
var span = getMarkedSpanFor(line.markedSpans, this);
|
1531
|
+
if (span.from != null) min = lineNo(line);
|
1532
|
+
if (span.to != null) max = lineNo(line);
|
1533
|
+
line.markedSpans = removeMarkedSpan(line.markedSpans, span);
|
1534
|
+
}
|
1535
|
+
if (min != null) changes.push({from: min, to: max + 1});
|
1536
|
+
this.lines.length = 0;
|
1537
|
+
this.explicitlyCleared = true;
|
1538
|
+
});
|
1539
|
+
TextMarker.prototype.find = function() {
|
1540
|
+
var from, to;
|
1541
|
+
for (var i = 0; i < this.lines.length; ++i) {
|
1542
|
+
var line = this.lines[i];
|
1543
|
+
var span = getMarkedSpanFor(line.markedSpans, this);
|
1544
|
+
if (span.from != null || span.to != null) {
|
1545
|
+
var found = lineNo(line);
|
1546
|
+
if (span.from != null) from = {line: found, ch: span.from};
|
1547
|
+
if (span.to != null) to = {line: found, ch: span.to};
|
1548
|
+
}
|
1549
|
+
}
|
1550
|
+
if (this.type == "bookmark") return from;
|
1551
|
+
return from && {from: from, to: to};
|
1552
|
+
};
|
1553
|
+
|
1554
|
+
function markText(from, to, className, options) {
|
1555
|
+
from = clipPos(from); to = clipPos(to);
|
1556
|
+
var marker = new TextMarker("range", className);
|
1557
|
+
if (options) for (var opt in options) if (options.hasOwnProperty(opt))
|
1558
|
+
marker[opt] = options[opt];
|
1559
|
+
var curLine = from.line;
|
1560
|
+
doc.iter(curLine, to.line + 1, function(line) {
|
1561
|
+
var span = {from: curLine == from.line ? from.ch : null,
|
1562
|
+
to: curLine == to.line ? to.ch : null,
|
1563
|
+
marker: marker};
|
1564
|
+
line.markedSpans = (line.markedSpans || []).concat([span]);
|
1565
|
+
marker.lines.push(line);
|
1566
|
+
++curLine;
|
1567
|
+
});
|
1568
|
+
changes.push({from: from.line, to: to.line + 1});
|
1569
|
+
return marker;
|
1570
|
+
}
|
1571
|
+
|
1572
|
+
function setBookmark(pos) {
|
1573
|
+
pos = clipPos(pos);
|
1574
|
+
var marker = new TextMarker("bookmark"), line = getLine(pos.line);
|
1575
|
+
history.addChange(pos.line, 1, [newHL(line.text, line.markedSpans)], true);
|
1576
|
+
var span = {from: pos.ch, to: pos.ch, marker: marker};
|
1577
|
+
line.markedSpans = (line.markedSpans || []).concat([span]);
|
1578
|
+
marker.lines.push(line);
|
1579
|
+
return marker;
|
1580
|
+
}
|
1581
|
+
|
1582
|
+
function findMarksAt(pos) {
|
1583
|
+
pos = clipPos(pos);
|
1584
|
+
var markers = [], spans = getLine(pos.line).markedSpans;
|
1585
|
+
if (spans) for (var i = 0; i < spans.length; ++i) {
|
1586
|
+
var span = spans[i];
|
1587
|
+
if ((span.from == null || span.from <= pos.ch) &&
|
1588
|
+
(span.to == null || span.to >= pos.ch))
|
1589
|
+
markers.push(span.marker);
|
1590
|
+
}
|
1591
|
+
return markers;
|
1592
|
+
}
|
1593
|
+
|
1594
|
+
function addGutterMarker(line, text, className) {
|
1595
|
+
if (typeof line == "number") line = getLine(clipLine(line));
|
1596
|
+
line.gutterMarker = {text: text, style: className};
|
1597
|
+
gutterDirty = true;
|
1598
|
+
return line;
|
1599
|
+
}
|
1600
|
+
function removeGutterMarker(line) {
|
1601
|
+
if (typeof line == "number") line = getLine(clipLine(line));
|
1602
|
+
line.gutterMarker = null;
|
1603
|
+
gutterDirty = true;
|
1604
|
+
}
|
1605
|
+
|
1606
|
+
function changeLine(handle, op) {
|
1607
|
+
var no = handle, line = handle;
|
1608
|
+
if (typeof handle == "number") line = getLine(clipLine(handle));
|
1609
|
+
else no = lineNo(handle);
|
1610
|
+
if (no == null) return null;
|
1611
|
+
if (op(line, no)) changes.push({from: no, to: no + 1});
|
1612
|
+
else return null;
|
1613
|
+
return line;
|
1614
|
+
}
|
1615
|
+
function setLineClass(handle, className, bgClassName) {
|
1616
|
+
return changeLine(handle, function(line) {
|
1617
|
+
if (line.className != className || line.bgClassName != bgClassName) {
|
1618
|
+
line.className = className;
|
1619
|
+
line.bgClassName = bgClassName;
|
1620
|
+
return true;
|
1621
|
+
}
|
1622
|
+
});
|
1623
|
+
}
|
1624
|
+
function setLineHidden(handle, hidden) {
|
1625
|
+
return changeLine(handle, function(line, no) {
|
1626
|
+
if (line.hidden != hidden) {
|
1627
|
+
line.hidden = hidden;
|
1628
|
+
if (!options.lineWrapping) {
|
1629
|
+
if (hidden && line.text.length == maxLine.text.length) {
|
1630
|
+
updateMaxLine = true;
|
1631
|
+
} else if (!hidden && line.text.length > maxLine.text.length) {
|
1632
|
+
maxLine = line; updateMaxLine = false;
|
1633
|
+
}
|
1634
|
+
}
|
1635
|
+
updateLineHeight(line, hidden ? 0 : 1);
|
1636
|
+
var fline = sel.from.line, tline = sel.to.line;
|
1637
|
+
if (hidden && (fline == no || tline == no)) {
|
1638
|
+
var from = fline == no ? skipHidden({line: fline, ch: 0}, fline, 0) : sel.from;
|
1639
|
+
var to = tline == no ? skipHidden({line: tline, ch: 0}, tline, 0) : sel.to;
|
1640
|
+
// Can't hide the last visible line, we'd have no place to put the cursor
|
1641
|
+
if (!to) return;
|
1642
|
+
setSelection(from, to);
|
1643
|
+
}
|
1644
|
+
return (gutterDirty = true);
|
1645
|
+
}
|
1646
|
+
});
|
1647
|
+
}
|
1648
|
+
|
1649
|
+
function lineInfo(line) {
|
1650
|
+
if (typeof line == "number") {
|
1651
|
+
if (!isLine(line)) return null;
|
1652
|
+
var n = line;
|
1653
|
+
line = getLine(line);
|
1654
|
+
if (!line) return null;
|
1655
|
+
} else {
|
1656
|
+
var n = lineNo(line);
|
1657
|
+
if (n == null) return null;
|
1658
|
+
}
|
1659
|
+
var marker = line.gutterMarker;
|
1660
|
+
return {line: n, handle: line, text: line.text, markerText: marker && marker.text,
|
1661
|
+
markerClass: marker && marker.style, lineClass: line.className, bgClass: line.bgClassName};
|
1662
|
+
}
|
1663
|
+
|
1664
|
+
function measureLine(line, ch) {
|
1665
|
+
if (ch == 0) return {top: 0, left: 0};
|
1666
|
+
var pre = lineContent(line, ch);
|
1667
|
+
removeChildrenAndAdd(measure, pre);
|
1668
|
+
var anchor = pre.anchor;
|
1669
|
+
var top = anchor.offsetTop, left = anchor.offsetLeft;
|
1670
|
+
// Older IEs report zero offsets for spans directly after a wrap
|
1671
|
+
if (ie && top == 0 && left == 0) {
|
1672
|
+
var backup = elt("span", "x");
|
1673
|
+
anchor.parentNode.insertBefore(backup, anchor.nextSibling);
|
1674
|
+
top = backup.offsetTop;
|
1675
|
+
}
|
1676
|
+
return {top: top, left: left};
|
1677
|
+
}
|
1678
|
+
function localCoords(pos, inLineWrap) {
|
1679
|
+
var x, lh = textHeight(), y = lh * (heightAtLine(doc, pos.line) - (inLineWrap ? displayOffset : 0));
|
1680
|
+
if (pos.ch == 0) x = 0;
|
1681
|
+
else {
|
1682
|
+
var sp = measureLine(getLine(pos.line), pos.ch);
|
1683
|
+
x = sp.left;
|
1684
|
+
if (options.lineWrapping) y += Math.max(0, sp.top);
|
1685
|
+
}
|
1686
|
+
return {x: x, y: y, yBot: y + lh};
|
1687
|
+
}
|
1688
|
+
// Coords must be lineSpace-local
|
1689
|
+
function coordsChar(x, y) {
|
1690
|
+
var th = textHeight(), cw = charWidth(), heightPos = displayOffset + Math.floor(y / th);
|
1691
|
+
if (heightPos < 0) return {line: 0, ch: 0};
|
1692
|
+
var lineNo = lineAtHeight(doc, heightPos);
|
1693
|
+
if (lineNo >= doc.size) return {line: doc.size - 1, ch: getLine(doc.size - 1).text.length};
|
1694
|
+
var lineObj = getLine(lineNo), text = lineObj.text;
|
1695
|
+
var tw = options.lineWrapping, innerOff = tw ? heightPos - heightAtLine(doc, lineNo) : 0;
|
1696
|
+
if (x <= 0 && innerOff == 0) return {line: lineNo, ch: 0};
|
1697
|
+
var wrongLine = false;
|
1698
|
+
function getX(len) {
|
1699
|
+
var sp = measureLine(lineObj, len);
|
1700
|
+
if (tw) {
|
1701
|
+
var off = Math.round(sp.top / th);
|
1702
|
+
wrongLine = off != innerOff;
|
1703
|
+
return Math.max(0, sp.left + (off - innerOff) * scroller.clientWidth);
|
1704
|
+
}
|
1705
|
+
return sp.left;
|
1706
|
+
}
|
1707
|
+
var from = 0, fromX = 0, to = text.length, toX;
|
1708
|
+
// Guess a suitable upper bound for our search.
|
1709
|
+
var estimated = Math.min(to, Math.ceil((x + innerOff * scroller.clientWidth * .9) / cw));
|
1710
|
+
for (;;) {
|
1711
|
+
var estX = getX(estimated);
|
1712
|
+
if (estX <= x && estimated < to) estimated = Math.min(to, Math.ceil(estimated * 1.2));
|
1713
|
+
else {toX = estX; to = estimated; break;}
|
1714
|
+
}
|
1715
|
+
if (x > toX) return {line: lineNo, ch: to};
|
1716
|
+
// Try to guess a suitable lower bound as well.
|
1717
|
+
estimated = Math.floor(to * 0.8); estX = getX(estimated);
|
1718
|
+
if (estX < x) {from = estimated; fromX = estX;}
|
1719
|
+
// Do a binary search between these bounds.
|
1720
|
+
for (;;) {
|
1721
|
+
if (to - from <= 1) {
|
1722
|
+
var after = x - fromX < toX - x;
|
1723
|
+
return {line: lineNo, ch: after ? from : to, after: after};
|
1724
|
+
}
|
1725
|
+
var middle = Math.ceil((from + to) / 2), middleX = getX(middle);
|
1726
|
+
if (middleX > x) {to = middle; toX = middleX; if (wrongLine) toX += 1000; }
|
1727
|
+
else {from = middle; fromX = middleX;}
|
1728
|
+
}
|
1729
|
+
}
|
1730
|
+
function pageCoords(pos) {
|
1731
|
+
var local = localCoords(pos, true), off = eltOffset(lineSpace);
|
1732
|
+
return {x: off.left + local.x, y: off.top + local.y, yBot: off.top + local.yBot};
|
1733
|
+
}
|
1734
|
+
|
1735
|
+
var cachedHeight, cachedHeightFor, measurePre;
|
1736
|
+
function textHeight() {
|
1737
|
+
if (measurePre == null) {
|
1738
|
+
measurePre = elt("pre");
|
1739
|
+
for (var i = 0; i < 49; ++i) {
|
1740
|
+
measurePre.appendChild(document.createTextNode("x"));
|
1741
|
+
measurePre.appendChild(elt("br"));
|
1742
|
+
}
|
1743
|
+
measurePre.appendChild(document.createTextNode("x"));
|
1744
|
+
}
|
1745
|
+
var offsetHeight = lineDiv.clientHeight;
|
1746
|
+
if (offsetHeight == cachedHeightFor) return cachedHeight;
|
1747
|
+
cachedHeightFor = offsetHeight;
|
1748
|
+
removeChildrenAndAdd(measure, measurePre.cloneNode(true));
|
1749
|
+
cachedHeight = measure.firstChild.offsetHeight / 50 || 1;
|
1750
|
+
removeChildren(measure);
|
1751
|
+
return cachedHeight;
|
1752
|
+
}
|
1753
|
+
var cachedWidth, cachedWidthFor = 0;
|
1754
|
+
function charWidth() {
|
1755
|
+
if (scroller.clientWidth == cachedWidthFor) return cachedWidth;
|
1756
|
+
cachedWidthFor = scroller.clientWidth;
|
1757
|
+
var anchor = elt("span", "x");
|
1758
|
+
var pre = elt("pre", [anchor]);
|
1759
|
+
removeChildrenAndAdd(measure, pre);
|
1760
|
+
return (cachedWidth = anchor.offsetWidth || 10);
|
1761
|
+
}
|
1762
|
+
function paddingTop() {return lineSpace.offsetTop;}
|
1763
|
+
function paddingLeft() {return lineSpace.offsetLeft;}
|
1764
|
+
|
1765
|
+
function posFromMouse(e, liberal) {
|
1766
|
+
var offW = eltOffset(scroller, true), x, y;
|
1767
|
+
// Fails unpredictably on IE[67] when mouse is dragged around quickly.
|
1768
|
+
try { x = e.clientX; y = e.clientY; } catch (e) { return null; }
|
1769
|
+
// This is a mess of a heuristic to try and determine whether a
|
1770
|
+
// scroll-bar was clicked or not, and to return null if one was
|
1771
|
+
// (and !liberal).
|
1772
|
+
if (!liberal && (x - offW.left > scroller.clientWidth || y - offW.top > scroller.clientHeight))
|
1773
|
+
return null;
|
1774
|
+
var offL = eltOffset(lineSpace, true);
|
1775
|
+
return coordsChar(x - offL.left, y - offL.top);
|
1776
|
+
}
|
1777
|
+
var detectingSelectAll;
|
1778
|
+
function onContextMenu(e) {
|
1779
|
+
var pos = posFromMouse(e), scrollPos = scrollbar.scrollTop;
|
1780
|
+
if (!pos || opera) return; // Opera is difficult.
|
1781
|
+
if (posEq(sel.from, sel.to) || posLess(pos, sel.from) || !posLess(pos, sel.to))
|
1782
|
+
operation(setCursor)(pos.line, pos.ch);
|
1783
|
+
|
1784
|
+
var oldCSS = input.style.cssText;
|
1785
|
+
inputDiv.style.position = "absolute";
|
1786
|
+
input.style.cssText = "position: fixed; width: 30px; height: 30px; top: " + (e.clientY - 5) +
|
1787
|
+
"px; left: " + (e.clientX - 5) + "px; z-index: 1000; background: white; " +
|
1788
|
+
"border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";
|
1789
|
+
focusInput();
|
1790
|
+
resetInput(true);
|
1791
|
+
// Adds "Select all" to context menu in FF
|
1792
|
+
if (posEq(sel.from, sel.to)) input.value = prevInput = " ";
|
1793
|
+
|
1794
|
+
function rehide() {
|
1795
|
+
inputDiv.style.position = "relative";
|
1796
|
+
input.style.cssText = oldCSS;
|
1797
|
+
if (ie_lt9) scrollbar.scrollTop = scrollPos;
|
1798
|
+
slowPoll();
|
1799
|
+
|
1800
|
+
// Try to detect the user choosing select-all
|
1801
|
+
if (input.selectionStart != null) {
|
1802
|
+
clearTimeout(detectingSelectAll);
|
1803
|
+
var extval = input.value = " " + (posEq(sel.from, sel.to) ? "" : input.value), i = 0;
|
1804
|
+
prevInput = " ";
|
1805
|
+
input.selectionStart = 1; input.selectionEnd = extval.length;
|
1806
|
+
detectingSelectAll = setTimeout(function poll(){
|
1807
|
+
if (prevInput == " " && input.selectionStart == 0)
|
1808
|
+
operation(commands.selectAll)(instance);
|
1809
|
+
else if (i++ < 10) detectingSelectAll = setTimeout(poll, 500);
|
1810
|
+
else resetInput();
|
1811
|
+
}, 200);
|
1812
|
+
}
|
1813
|
+
}
|
1814
|
+
|
1815
|
+
if (gecko) {
|
1816
|
+
e_stop(e);
|
1817
|
+
var mouseup = connect(window, "mouseup", function() {
|
1818
|
+
mouseup();
|
1819
|
+
setTimeout(rehide, 20);
|
1820
|
+
}, true);
|
1821
|
+
} else {
|
1822
|
+
setTimeout(rehide, 50);
|
1823
|
+
}
|
1824
|
+
}
|
1825
|
+
|
1826
|
+
// Cursor-blinking
|
1827
|
+
function restartBlink() {
|
1828
|
+
clearInterval(blinker);
|
1829
|
+
var on = true;
|
1830
|
+
cursor.style.visibility = "";
|
1831
|
+
blinker = setInterval(function() {
|
1832
|
+
cursor.style.visibility = (on = !on) ? "" : "hidden";
|
1833
|
+
}, options.cursorBlinkRate);
|
1834
|
+
}
|
1835
|
+
|
1836
|
+
var matching = {"(": ")>", ")": "(<", "[": "]>", "]": "[<", "{": "}>", "}": "{<"};
|
1837
|
+
function matchBrackets(autoclear) {
|
1838
|
+
var head = sel.inverted ? sel.from : sel.to, line = getLine(head.line), pos = head.ch - 1;
|
1839
|
+
var match = (pos >= 0 && matching[line.text.charAt(pos)]) || matching[line.text.charAt(++pos)];
|
1840
|
+
if (!match) return;
|
1841
|
+
var ch = match.charAt(0), forward = match.charAt(1) == ">", d = forward ? 1 : -1, st = line.styles;
|
1842
|
+
for (var off = pos + 1, i = 0, e = st.length; i < e; i+=2)
|
1843
|
+
if ((off -= st[i].length) <= 0) {var style = st[i+1]; break;}
|
1844
|
+
|
1845
|
+
var stack = [line.text.charAt(pos)], re = /[(){}[\]]/;
|
1846
|
+
function scan(line, from, to) {
|
1847
|
+
if (!line.text) return;
|
1848
|
+
var st = line.styles, pos = forward ? 0 : line.text.length - 1, cur;
|
1849
|
+
for (var i = forward ? 0 : st.length - 2, e = forward ? st.length : -2; i != e; i += 2*d) {
|
1850
|
+
var text = st[i];
|
1851
|
+
if (st[i+1] != style) {pos += d * text.length; continue;}
|
1852
|
+
for (var j = forward ? 0 : text.length - 1, te = forward ? text.length : -1; j != te; j += d, pos+=d) {
|
1853
|
+
if (pos >= from && pos < to && re.test(cur = text.charAt(j))) {
|
1854
|
+
var match = matching[cur];
|
1855
|
+
if (match.charAt(1) == ">" == forward) stack.push(cur);
|
1856
|
+
else if (stack.pop() != match.charAt(0)) return {pos: pos, match: false};
|
1857
|
+
else if (!stack.length) return {pos: pos, match: true};
|
1858
|
+
}
|
1859
|
+
}
|
1860
|
+
}
|
1861
|
+
}
|
1862
|
+
for (var i = head.line, e = forward ? Math.min(i + 100, doc.size) : Math.max(-1, i - 100); i != e; i+=d) {
|
1863
|
+
var line = getLine(i), first = i == head.line;
|
1864
|
+
var found = scan(line, first && forward ? pos + 1 : 0, first && !forward ? pos : line.text.length);
|
1865
|
+
if (found) break;
|
1866
|
+
}
|
1867
|
+
if (!found) found = {pos: null, match: false};
|
1868
|
+
var style = found.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket";
|
1869
|
+
var one = markText({line: head.line, ch: pos}, {line: head.line, ch: pos+1}, style),
|
1870
|
+
two = found.pos != null && markText({line: i, ch: found.pos}, {line: i, ch: found.pos + 1}, style);
|
1871
|
+
var clear = operation(function(){one.clear(); two && two.clear();});
|
1872
|
+
if (autoclear) setTimeout(clear, 800);
|
1873
|
+
else bracketHighlighted = clear;
|
1874
|
+
}
|
1875
|
+
|
1876
|
+
// Finds the line to start with when starting a parse. Tries to
|
1877
|
+
// find a line with a stateAfter, so that it can start with a
|
1878
|
+
// valid state. If that fails, it returns the line with the
|
1879
|
+
// smallest indentation, which tends to need the least context to
|
1880
|
+
// parse correctly.
|
1881
|
+
function findStartLine(n) {
|
1882
|
+
var minindent, minline;
|
1883
|
+
for (var search = n, lim = n - 40; search > lim; --search) {
|
1884
|
+
if (search == 0) return 0;
|
1885
|
+
var line = getLine(search-1);
|
1886
|
+
if (line.stateAfter) return search;
|
1887
|
+
var indented = line.indentation(options.tabSize);
|
1888
|
+
if (minline == null || minindent > indented) {
|
1889
|
+
minline = search - 1;
|
1890
|
+
minindent = indented;
|
1891
|
+
}
|
1892
|
+
}
|
1893
|
+
return minline;
|
1894
|
+
}
|
1895
|
+
function getStateBefore(n) {
|
1896
|
+
var pos = findStartLine(n), state = pos && getLine(pos-1).stateAfter;
|
1897
|
+
if (!state) state = startState(mode);
|
1898
|
+
else state = copyState(mode, state);
|
1899
|
+
doc.iter(pos, n, function(line) {
|
1900
|
+
line.process(mode, state, options.tabSize);
|
1901
|
+
line.stateAfter = (pos == n - 1 || pos % 5 == 0) ? copyState(mode, state) : null;
|
1902
|
+
});
|
1903
|
+
return state;
|
1904
|
+
}
|
1905
|
+
function highlightWorker() {
|
1906
|
+
if (frontier >= showingTo) return;
|
1907
|
+
var end = +new Date + options.workTime, state = copyState(mode, getStateBefore(frontier));
|
1908
|
+
var startFrontier = frontier;
|
1909
|
+
doc.iter(frontier, showingTo, function(line) {
|
1910
|
+
if (frontier >= showingFrom) { // Visible
|
1911
|
+
line.highlight(mode, state, options.tabSize);
|
1912
|
+
line.stateAfter = copyState(mode, state);
|
1913
|
+
} else {
|
1914
|
+
line.process(mode, state, options.tabSize);
|
1915
|
+
line.stateAfter = frontier % 5 == 0 ? copyState(mode, state) : null;
|
1916
|
+
}
|
1917
|
+
++frontier;
|
1918
|
+
if (+new Date > end) {
|
1919
|
+
startWorker(options.workDelay);
|
1920
|
+
return true;
|
1921
|
+
}
|
1922
|
+
});
|
1923
|
+
if (showingTo > startFrontier && frontier >= showingFrom)
|
1924
|
+
operation(function() {changes.push({from: startFrontier, to: frontier});})();
|
1925
|
+
}
|
1926
|
+
function startWorker(time) {
|
1927
|
+
if (frontier < showingTo)
|
1928
|
+
highlight.set(time, highlightWorker);
|
1929
|
+
}
|
1930
|
+
|
1931
|
+
// Operations are used to wrap changes in such a way that each
|
1932
|
+
// change won't have to update the cursor and display (which would
|
1933
|
+
// be awkward, slow, and error-prone), but instead updates are
|
1934
|
+
// batched and then all combined and executed at once.
|
1935
|
+
function startOperation() {
|
1936
|
+
updateInput = userSelChange = textChanged = null;
|
1937
|
+
changes = []; selectionChanged = false; callbacks = [];
|
1938
|
+
}
|
1939
|
+
function endOperation() {
|
1940
|
+
if (updateMaxLine) computeMaxLength();
|
1941
|
+
if (maxLineChanged && !options.lineWrapping) {
|
1942
|
+
var cursorWidth = widthForcer.offsetWidth, left = measureLine(maxLine, maxLine.text.length).left;
|
1943
|
+
if (!ie_lt8) {
|
1944
|
+
widthForcer.style.left = left + "px";
|
1945
|
+
lineSpace.style.minWidth = (left + cursorWidth) + "px";
|
1946
|
+
}
|
1947
|
+
maxLineChanged = false;
|
1948
|
+
}
|
1949
|
+
var newScrollPos, updated;
|
1950
|
+
if (selectionChanged) {
|
1951
|
+
var coords = calculateCursorCoords();
|
1952
|
+
newScrollPos = calculateScrollPos(coords.x, coords.y, coords.x, coords.yBot);
|
1953
|
+
}
|
1954
|
+
if (changes.length || newScrollPos && newScrollPos.scrollTop != null)
|
1955
|
+
updated = updateDisplay(changes, true, newScrollPos && newScrollPos.scrollTop);
|
1956
|
+
if (!updated) {
|
1957
|
+
if (selectionChanged) updateSelection();
|
1958
|
+
if (gutterDirty) updateGutter();
|
1959
|
+
}
|
1960
|
+
if (newScrollPos) scrollCursorIntoView();
|
1961
|
+
if (selectionChanged) restartBlink();
|
1962
|
+
|
1963
|
+
if (focused && (updateInput === true || (updateInput !== false && selectionChanged)))
|
1964
|
+
resetInput(userSelChange);
|
1965
|
+
|
1966
|
+
if (selectionChanged && options.matchBrackets)
|
1967
|
+
setTimeout(operation(function() {
|
1968
|
+
if (bracketHighlighted) {bracketHighlighted(); bracketHighlighted = null;}
|
1969
|
+
if (posEq(sel.from, sel.to)) matchBrackets(false);
|
1970
|
+
}), 20);
|
1971
|
+
var sc = selectionChanged, cbs = callbacks; // these can be reset by callbacks
|
1972
|
+
if (textChanged && options.onChange && instance)
|
1973
|
+
options.onChange(instance, textChanged);
|
1974
|
+
if (sc && options.onCursorActivity)
|
1975
|
+
options.onCursorActivity(instance);
|
1976
|
+
for (var i = 0; i < cbs.length; ++i) cbs[i](instance);
|
1977
|
+
if (updated && options.onUpdate) options.onUpdate(instance);
|
1978
|
+
}
|
1979
|
+
var nestedOperation = 0;
|
1980
|
+
function operation(f) {
|
1981
|
+
return function() {
|
1982
|
+
if (!nestedOperation++) startOperation();
|
1983
|
+
try {var result = f.apply(this, arguments);}
|
1984
|
+
finally {if (!--nestedOperation) endOperation();}
|
1985
|
+
return result;
|
1986
|
+
};
|
1987
|
+
}
|
1988
|
+
|
1989
|
+
function compoundChange(f) {
|
1990
|
+
history.startCompound();
|
1991
|
+
try { return f(); } finally { history.endCompound(); }
|
1992
|
+
}
|
1993
|
+
|
1994
|
+
for (var ext in extensions)
|
1995
|
+
if (extensions.propertyIsEnumerable(ext) &&
|
1996
|
+
!instance.propertyIsEnumerable(ext))
|
1997
|
+
instance[ext] = extensions[ext];
|
1998
|
+
for (var i = 0; i < initHooks.length; ++i) initHooks[i](instance);
|
1999
|
+
return instance;
|
2000
|
+
} // (end of function CodeMirror)
|
2001
|
+
|
2002
|
+
// The default configuration options.
|
2003
|
+
CodeMirror.defaults = {
|
2004
|
+
value: "",
|
2005
|
+
mode: null,
|
2006
|
+
theme: "default",
|
2007
|
+
indentUnit: 2,
|
2008
|
+
indentWithTabs: false,
|
2009
|
+
smartIndent: true,
|
2010
|
+
tabSize: 4,
|
2011
|
+
keyMap: "default",
|
2012
|
+
extraKeys: null,
|
2013
|
+
electricChars: true,
|
2014
|
+
autoClearEmptyLines: false,
|
2015
|
+
onKeyEvent: null,
|
2016
|
+
onDragEvent: null,
|
2017
|
+
lineWrapping: false,
|
2018
|
+
lineNumbers: false,
|
2019
|
+
gutter: false,
|
2020
|
+
fixedGutter: false,
|
2021
|
+
firstLineNumber: 1,
|
2022
|
+
showCursorWhenSelecting: false,
|
2023
|
+
readOnly: false,
|
2024
|
+
dragDrop: true,
|
2025
|
+
onChange: null,
|
2026
|
+
onCursorActivity: null,
|
2027
|
+
onViewportChange: null,
|
2028
|
+
onGutterClick: null,
|
2029
|
+
onUpdate: null,
|
2030
|
+
onFocus: null, onBlur: null, onScroll: null,
|
2031
|
+
matchBrackets: false,
|
2032
|
+
cursorBlinkRate: 530,
|
2033
|
+
workTime: 100,
|
2034
|
+
workDelay: 200,
|
2035
|
+
pollInterval: 100,
|
2036
|
+
undoDepth: 40,
|
2037
|
+
tabindex: null,
|
2038
|
+
autofocus: null,
|
2039
|
+
lineNumberFormatter: function(integer) { return integer; }
|
2040
|
+
};
|
2041
|
+
|
2042
|
+
var ios = /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent);
|
2043
|
+
var mac = ios || /Mac/.test(navigator.platform);
|
2044
|
+
var win = /Win/.test(navigator.platform);
|
2045
|
+
|
2046
|
+
// Known modes, by name and by MIME
|
2047
|
+
var modes = CodeMirror.modes = {}, mimeModes = CodeMirror.mimeModes = {};
|
2048
|
+
CodeMirror.defineMode = function(name, mode) {
|
2049
|
+
if (!CodeMirror.defaults.mode && name != "null") CodeMirror.defaults.mode = name;
|
2050
|
+
if (arguments.length > 2) {
|
2051
|
+
mode.dependencies = [];
|
2052
|
+
for (var i = 2; i < arguments.length; ++i) mode.dependencies.push(arguments[i]);
|
2053
|
+
}
|
2054
|
+
modes[name] = mode;
|
2055
|
+
};
|
2056
|
+
CodeMirror.defineMIME = function(mime, spec) {
|
2057
|
+
mimeModes[mime] = spec;
|
2058
|
+
};
|
2059
|
+
CodeMirror.resolveMode = function(spec) {
|
2060
|
+
if (typeof spec == "string" && mimeModes.hasOwnProperty(spec))
|
2061
|
+
spec = mimeModes[spec];
|
2062
|
+
else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec))
|
2063
|
+
return CodeMirror.resolveMode("application/xml");
|
2064
|
+
if (typeof spec == "string") return {name: spec};
|
2065
|
+
else return spec || {name: "null"};
|
2066
|
+
};
|
2067
|
+
CodeMirror.getMode = function(options, spec) {
|
2068
|
+
var spec = CodeMirror.resolveMode(spec);
|
2069
|
+
var mfactory = modes[spec.name];
|
2070
|
+
if (!mfactory) return CodeMirror.getMode(options, "text/plain");
|
2071
|
+
var modeObj = mfactory(options, spec);
|
2072
|
+
if (modeExtensions.hasOwnProperty(spec.name)) {
|
2073
|
+
var exts = modeExtensions[spec.name];
|
2074
|
+
for (var prop in exts) {
|
2075
|
+
if (!exts.hasOwnProperty(prop)) continue;
|
2076
|
+
if (modeObj.hasOwnProperty(prop)) modeObj["_" + prop] = modeObj[prop];
|
2077
|
+
modeObj[prop] = exts[prop];
|
2078
|
+
}
|
2079
|
+
}
|
2080
|
+
modeObj.name = spec.name;
|
2081
|
+
return modeObj;
|
2082
|
+
};
|
2083
|
+
CodeMirror.listModes = function() {
|
2084
|
+
var list = [];
|
2085
|
+
for (var m in modes)
|
2086
|
+
if (modes.propertyIsEnumerable(m)) list.push(m);
|
2087
|
+
return list;
|
2088
|
+
};
|
2089
|
+
CodeMirror.listMIMEs = function() {
|
2090
|
+
var list = [];
|
2091
|
+
for (var m in mimeModes)
|
2092
|
+
if (mimeModes.propertyIsEnumerable(m)) list.push({mime: m, mode: mimeModes[m]});
|
2093
|
+
return list;
|
2094
|
+
};
|
2095
|
+
|
2096
|
+
var extensions = CodeMirror.extensions = {};
|
2097
|
+
CodeMirror.defineExtension = function(name, func) {
|
2098
|
+
extensions[name] = func;
|
2099
|
+
};
|
2100
|
+
|
2101
|
+
var initHooks = [];
|
2102
|
+
CodeMirror.defineInitHook = function(f) {initHooks.push(f);};
|
2103
|
+
|
2104
|
+
var modeExtensions = CodeMirror.modeExtensions = {};
|
2105
|
+
CodeMirror.extendMode = function(mode, properties) {
|
2106
|
+
var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});
|
2107
|
+
for (var prop in properties) if (properties.hasOwnProperty(prop))
|
2108
|
+
exts[prop] = properties[prop];
|
2109
|
+
};
|
2110
|
+
|
2111
|
+
var commands = CodeMirror.commands = {
|
2112
|
+
selectAll: function(cm) {cm.setSelection({line: 0, ch: 0}, {line: cm.lineCount() - 1});},
|
2113
|
+
killLine: function(cm) {
|
2114
|
+
var from = cm.getCursor(true), to = cm.getCursor(false), sel = !posEq(from, to);
|
2115
|
+
if (!sel && cm.getLine(from.line).length == from.ch) cm.replaceRange("", from, {line: from.line + 1, ch: 0});
|
2116
|
+
else cm.replaceRange("", from, sel ? to : {line: from.line});
|
2117
|
+
},
|
2118
|
+
deleteLine: function(cm) {var l = cm.getCursor().line; cm.replaceRange("", {line: l, ch: 0}, {line: l});},
|
2119
|
+
undo: function(cm) {cm.undo();},
|
2120
|
+
redo: function(cm) {cm.redo();},
|
2121
|
+
goDocStart: function(cm) {cm.setCursor(0, 0, true);},
|
2122
|
+
goDocEnd: function(cm) {cm.setSelection({line: cm.lineCount() - 1}, null, true);},
|
2123
|
+
goLineStart: function(cm) {cm.setCursor(cm.getCursor().line, 0, true);},
|
2124
|
+
goLineStartSmart: function(cm) {
|
2125
|
+
var cur = cm.getCursor();
|
2126
|
+
var text = cm.getLine(cur.line), firstNonWS = Math.max(0, text.search(/\S/));
|
2127
|
+
cm.setCursor(cur.line, cur.ch <= firstNonWS && cur.ch ? 0 : firstNonWS, true);
|
2128
|
+
},
|
2129
|
+
goLineEnd: function(cm) {cm.setSelection({line: cm.getCursor().line}, null, true);},
|
2130
|
+
goLineUp: function(cm) {cm.moveV(-1, "line");},
|
2131
|
+
goLineDown: function(cm) {cm.moveV(1, "line");},
|
2132
|
+
goPageUp: function(cm) {cm.moveV(-1, "page");},
|
2133
|
+
goPageDown: function(cm) {cm.moveV(1, "page");},
|
2134
|
+
goCharLeft: function(cm) {cm.moveH(-1, "char");},
|
2135
|
+
goCharRight: function(cm) {cm.moveH(1, "char");},
|
2136
|
+
goColumnLeft: function(cm) {cm.moveH(-1, "column");},
|
2137
|
+
goColumnRight: function(cm) {cm.moveH(1, "column");},
|
2138
|
+
goWordLeft: function(cm) {cm.moveH(-1, "word");},
|
2139
|
+
goWordRight: function(cm) {cm.moveH(1, "word");},
|
2140
|
+
delCharLeft: function(cm) {cm.deleteH(-1, "char");},
|
2141
|
+
delCharRight: function(cm) {cm.deleteH(1, "char");},
|
2142
|
+
delWordLeft: function(cm) {cm.deleteH(-1, "word");},
|
2143
|
+
delWordRight: function(cm) {cm.deleteH(1, "word");},
|
2144
|
+
indentAuto: function(cm) {cm.indentSelection("smart");},
|
2145
|
+
indentMore: function(cm) {cm.indentSelection("add");},
|
2146
|
+
indentLess: function(cm) {cm.indentSelection("subtract");},
|
2147
|
+
insertTab: function(cm) {cm.replaceSelection("\t", "end");},
|
2148
|
+
defaultTab: function(cm) {
|
2149
|
+
if (cm.somethingSelected()) cm.indentSelection("add");
|
2150
|
+
else cm.replaceSelection("\t", "end");
|
2151
|
+
},
|
2152
|
+
transposeChars: function(cm) {
|
2153
|
+
var cur = cm.getCursor(), line = cm.getLine(cur.line);
|
2154
|
+
if (cur.ch > 0 && cur.ch < line.length - 1)
|
2155
|
+
cm.replaceRange(line.charAt(cur.ch) + line.charAt(cur.ch - 1),
|
2156
|
+
{line: cur.line, ch: cur.ch - 1}, {line: cur.line, ch: cur.ch + 1});
|
2157
|
+
},
|
2158
|
+
newlineAndIndent: function(cm) {
|
2159
|
+
cm.replaceSelection("\n", "end");
|
2160
|
+
cm.indentLine(cm.getCursor().line);
|
2161
|
+
},
|
2162
|
+
toggleOverwrite: function(cm) {cm.toggleOverwrite();}
|
2163
|
+
};
|
2164
|
+
|
2165
|
+
var keyMap = CodeMirror.keyMap = {};
|
2166
|
+
keyMap.basic = {
|
2167
|
+
"Left": "goCharLeft", "Right": "goCharRight", "Up": "goLineUp", "Down": "goLineDown",
|
2168
|
+
"End": "goLineEnd", "Home": "goLineStartSmart", "PageUp": "goPageUp", "PageDown": "goPageDown",
|
2169
|
+
"Delete": "delCharRight", "Backspace": "delCharLeft", "Tab": "defaultTab", "Shift-Tab": "indentAuto",
|
2170
|
+
"Enter": "newlineAndIndent", "Insert": "toggleOverwrite"
|
2171
|
+
};
|
2172
|
+
// Note that the save and find-related commands aren't defined by
|
2173
|
+
// default. Unknown commands are simply ignored.
|
2174
|
+
keyMap.pcDefault = {
|
2175
|
+
"Ctrl-A": "selectAll", "Ctrl-D": "deleteLine", "Ctrl-Z": "undo", "Shift-Ctrl-Z": "redo", "Ctrl-Y": "redo",
|
2176
|
+
"Ctrl-Home": "goDocStart", "Alt-Up": "goDocStart", "Ctrl-End": "goDocEnd", "Ctrl-Down": "goDocEnd",
|
2177
|
+
"Ctrl-Left": "goWordLeft", "Ctrl-Right": "goWordRight", "Alt-Left": "goLineStart", "Alt-Right": "goLineEnd",
|
2178
|
+
"Ctrl-Backspace": "delWordLeft", "Ctrl-Delete": "delWordRight", "Ctrl-S": "save", "Ctrl-F": "find",
|
2179
|
+
"Ctrl-G": "findNext", "Shift-Ctrl-G": "findPrev", "Shift-Ctrl-F": "replace", "Shift-Ctrl-R": "replaceAll",
|
2180
|
+
"Ctrl-[": "indentLess", "Ctrl-]": "indentMore",
|
2181
|
+
fallthrough: "basic"
|
2182
|
+
};
|
2183
|
+
keyMap.macDefault = {
|
2184
|
+
"Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo",
|
2185
|
+
"Cmd-Up": "goDocStart", "Cmd-End": "goDocEnd", "Cmd-Down": "goDocEnd", "Alt-Left": "goWordLeft",
|
2186
|
+
"Alt-Right": "goWordRight", "Cmd-Left": "goLineStart", "Cmd-Right": "goLineEnd", "Alt-Backspace": "delWordLeft",
|
2187
|
+
"Ctrl-Alt-Backspace": "delWordRight", "Alt-Delete": "delWordRight", "Cmd-S": "save", "Cmd-F": "find",
|
2188
|
+
"Cmd-G": "findNext", "Shift-Cmd-G": "findPrev", "Cmd-Alt-F": "replace", "Shift-Cmd-Alt-F": "replaceAll",
|
2189
|
+
"Cmd-[": "indentLess", "Cmd-]": "indentMore",
|
2190
|
+
fallthrough: ["basic", "emacsy"]
|
2191
|
+
};
|
2192
|
+
keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault;
|
2193
|
+
keyMap.emacsy = {
|
2194
|
+
"Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown",
|
2195
|
+
"Alt-F": "goWordRight", "Alt-B": "goWordLeft", "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd",
|
2196
|
+
"Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp", "Ctrl-D": "delCharRight", "Ctrl-H": "delCharLeft",
|
2197
|
+
"Alt-D": "delWordRight", "Alt-Backspace": "delWordLeft", "Ctrl-K": "killLine", "Ctrl-T": "transposeChars"
|
2198
|
+
};
|
2199
|
+
|
2200
|
+
function getKeyMap(val) {
|
2201
|
+
if (typeof val == "string") return keyMap[val];
|
2202
|
+
else return val;
|
2203
|
+
}
|
2204
|
+
function lookupKey(name, extraMap, map, handle, stop) {
|
2205
|
+
function lookup(map) {
|
2206
|
+
map = getKeyMap(map);
|
2207
|
+
var found = map[name];
|
2208
|
+
if (found === false) {
|
2209
|
+
if (stop) stop();
|
2210
|
+
return true;
|
2211
|
+
}
|
2212
|
+
if (found != null && handle(found)) return true;
|
2213
|
+
if (map.nofallthrough) {
|
2214
|
+
if (stop) stop();
|
2215
|
+
return true;
|
2216
|
+
}
|
2217
|
+
var fallthrough = map.fallthrough;
|
2218
|
+
if (fallthrough == null) return false;
|
2219
|
+
if (Object.prototype.toString.call(fallthrough) != "[object Array]")
|
2220
|
+
return lookup(fallthrough);
|
2221
|
+
for (var i = 0, e = fallthrough.length; i < e; ++i) {
|
2222
|
+
if (lookup(fallthrough[i])) return true;
|
2223
|
+
}
|
2224
|
+
return false;
|
2225
|
+
}
|
2226
|
+
if (extraMap && lookup(extraMap)) return true;
|
2227
|
+
return lookup(map);
|
2228
|
+
}
|
2229
|
+
function isModifierKey(event) {
|
2230
|
+
var name = keyNames[e_prop(event, "keyCode")];
|
2231
|
+
return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod";
|
2232
|
+
}
|
2233
|
+
CodeMirror.isModifierKey = isModifierKey;
|
2234
|
+
|
2235
|
+
CodeMirror.fromTextArea = function(textarea, options) {
|
2236
|
+
if (!options) options = {};
|
2237
|
+
options.value = textarea.value;
|
2238
|
+
if (!options.tabindex && textarea.tabindex)
|
2239
|
+
options.tabindex = textarea.tabindex;
|
2240
|
+
// Set autofocus to true if this textarea is focused, or if it has
|
2241
|
+
// autofocus and no other element is focused.
|
2242
|
+
if (options.autofocus == null) {
|
2243
|
+
var hasFocus = document.body;
|
2244
|
+
// doc.activeElement occasionally throws on IE
|
2245
|
+
try { hasFocus = document.activeElement; } catch(e) {}
|
2246
|
+
options.autofocus = hasFocus == textarea ||
|
2247
|
+
textarea.getAttribute("autofocus") != null && hasFocus == document.body;
|
2248
|
+
}
|
2249
|
+
|
2250
|
+
function save() {textarea.value = instance.getValue();}
|
2251
|
+
if (textarea.form) {
|
2252
|
+
// Deplorable hack to make the submit method do the right thing.
|
2253
|
+
var rmSubmit = connect(textarea.form, "submit", save, true);
|
2254
|
+
var form = textarea.form, realSubmit = form.submit;
|
2255
|
+
textarea.form.submit = function wrappedSubmit() {
|
2256
|
+
save();
|
2257
|
+
form.submit = realSubmit;
|
2258
|
+
form.submit();
|
2259
|
+
form.submit = wrappedSubmit;
|
2260
|
+
};
|
2261
|
+
}
|
2262
|
+
|
2263
|
+
textarea.style.display = "none";
|
2264
|
+
var instance = CodeMirror(function(node) {
|
2265
|
+
textarea.parentNode.insertBefore(node, textarea.nextSibling);
|
2266
|
+
}, options);
|
2267
|
+
instance.save = save;
|
2268
|
+
instance.getTextArea = function() { return textarea; };
|
2269
|
+
instance.toTextArea = function() {
|
2270
|
+
save();
|
2271
|
+
textarea.parentNode.removeChild(instance.getWrapperElement());
|
2272
|
+
textarea.style.display = "";
|
2273
|
+
if (textarea.form) {
|
2274
|
+
rmSubmit();
|
2275
|
+
if (typeof textarea.form.submit == "function")
|
2276
|
+
textarea.form.submit = realSubmit;
|
2277
|
+
}
|
2278
|
+
};
|
2279
|
+
return instance;
|
2280
|
+
};
|
2281
|
+
|
2282
|
+
var gecko = /gecko\/\d/i.test(navigator.userAgent);
|
2283
|
+
var ie = /MSIE \d/.test(navigator.userAgent);
|
2284
|
+
var ie_lt8 = /MSIE [1-7]\b/.test(navigator.userAgent);
|
2285
|
+
var ie_lt9 = /MSIE [1-8]\b/.test(navigator.userAgent);
|
2286
|
+
var quirksMode = ie && document.documentMode == 5;
|
2287
|
+
var webkit = /WebKit\//.test(navigator.userAgent);
|
2288
|
+
var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(navigator.userAgent);
|
2289
|
+
var chrome = /Chrome\//.test(navigator.userAgent);
|
2290
|
+
var opera = /Opera\//.test(navigator.userAgent);
|
2291
|
+
var safari = /Apple Computer/.test(navigator.vendor);
|
2292
|
+
var khtml = /KHTML\//.test(navigator.userAgent);
|
2293
|
+
var mac_geLion = /Mac OS X 10\D([7-9]|\d\d)\D/.test(navigator.userAgent);
|
2294
|
+
|
2295
|
+
var opera_version = opera && navigator.userAgent.match(/Version\/(\d*\.\d*)/);
|
2296
|
+
if (opera_version) opera_version = Number(opera_version[1]);
|
2297
|
+
// Some browsers use the wrong event properties to signal cmd/ctrl on OS X
|
2298
|
+
var flipCtrlCmd = mac && (qtwebkit || opera && (opera_version == null || opera_version < 12.11));
|
2299
|
+
|
2300
|
+
// Utility functions for working with state. Exported because modes
|
2301
|
+
// sometimes need to do this.
|
2302
|
+
function copyState(mode, state) {
|
2303
|
+
if (state === true) return state;
|
2304
|
+
if (mode.copyState) return mode.copyState(state);
|
2305
|
+
var nstate = {};
|
2306
|
+
for (var n in state) {
|
2307
|
+
var val = state[n];
|
2308
|
+
if (val instanceof Array) val = val.concat([]);
|
2309
|
+
nstate[n] = val;
|
2310
|
+
}
|
2311
|
+
return nstate;
|
2312
|
+
}
|
2313
|
+
CodeMirror.copyState = copyState;
|
2314
|
+
function startState(mode, a1, a2) {
|
2315
|
+
return mode.startState ? mode.startState(a1, a2) : true;
|
2316
|
+
}
|
2317
|
+
CodeMirror.startState = startState;
|
2318
|
+
CodeMirror.innerMode = function(mode, state) {
|
2319
|
+
while (mode.innerMode) {
|
2320
|
+
var info = mode.innerMode(state);
|
2321
|
+
state = info.state;
|
2322
|
+
mode = info.mode;
|
2323
|
+
}
|
2324
|
+
return info || {mode: mode, state: state};
|
2325
|
+
};
|
2326
|
+
|
2327
|
+
// The character stream used by a mode's parser.
|
2328
|
+
function StringStream(string, tabSize) {
|
2329
|
+
this.pos = this.start = 0;
|
2330
|
+
this.string = string;
|
2331
|
+
this.tabSize = tabSize || 8;
|
2332
|
+
}
|
2333
|
+
StringStream.prototype = {
|
2334
|
+
eol: function() {return this.pos >= this.string.length;},
|
2335
|
+
sol: function() {return this.pos == 0;},
|
2336
|
+
peek: function() {return this.string.charAt(this.pos) || undefined;},
|
2337
|
+
next: function() {
|
2338
|
+
if (this.pos < this.string.length)
|
2339
|
+
return this.string.charAt(this.pos++);
|
2340
|
+
},
|
2341
|
+
eat: function(match) {
|
2342
|
+
var ch = this.string.charAt(this.pos);
|
2343
|
+
if (typeof match == "string") var ok = ch == match;
|
2344
|
+
else var ok = ch && (match.test ? match.test(ch) : match(ch));
|
2345
|
+
if (ok) {++this.pos; return ch;}
|
2346
|
+
},
|
2347
|
+
eatWhile: function(match) {
|
2348
|
+
var start = this.pos;
|
2349
|
+
while (this.eat(match)){}
|
2350
|
+
return this.pos > start;
|
2351
|
+
},
|
2352
|
+
eatSpace: function() {
|
2353
|
+
var start = this.pos;
|
2354
|
+
while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos;
|
2355
|
+
return this.pos > start;
|
2356
|
+
},
|
2357
|
+
skipToEnd: function() {this.pos = this.string.length;},
|
2358
|
+
skipTo: function(ch) {
|
2359
|
+
var found = this.string.indexOf(ch, this.pos);
|
2360
|
+
if (found > -1) {this.pos = found; return true;}
|
2361
|
+
},
|
2362
|
+
backUp: function(n) {this.pos -= n;},
|
2363
|
+
column: function() {return countColumn(this.string, this.start, this.tabSize);},
|
2364
|
+
indentation: function() {return countColumn(this.string, null, this.tabSize);},
|
2365
|
+
match: function(pattern, consume, caseInsensitive) {
|
2366
|
+
if (typeof pattern == "string") {
|
2367
|
+
var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;};
|
2368
|
+
if (cased(this.string).indexOf(cased(pattern), this.pos) == this.pos) {
|
2369
|
+
if (consume !== false) this.pos += pattern.length;
|
2370
|
+
return true;
|
2371
|
+
}
|
2372
|
+
} else {
|
2373
|
+
var match = this.string.slice(this.pos).match(pattern);
|
2374
|
+
if (match && match.index > 0) return null;
|
2375
|
+
if (match && consume !== false) this.pos += match[0].length;
|
2376
|
+
return match;
|
2377
|
+
}
|
2378
|
+
},
|
2379
|
+
current: function(){return this.string.slice(this.start, this.pos);}
|
2380
|
+
};
|
2381
|
+
CodeMirror.StringStream = StringStream;
|
2382
|
+
|
2383
|
+
function MarkedSpan(from, to, marker) {
|
2384
|
+
this.from = from; this.to = to; this.marker = marker;
|
2385
|
+
}
|
2386
|
+
|
2387
|
+
function getMarkedSpanFor(spans, marker) {
|
2388
|
+
if (spans) for (var i = 0; i < spans.length; ++i) {
|
2389
|
+
var span = spans[i];
|
2390
|
+
if (span.marker == marker) return span;
|
2391
|
+
}
|
2392
|
+
}
|
2393
|
+
|
2394
|
+
function removeMarkedSpan(spans, span) {
|
2395
|
+
var r;
|
2396
|
+
for (var i = 0; i < spans.length; ++i)
|
2397
|
+
if (spans[i] != span) (r || (r = [])).push(spans[i]);
|
2398
|
+
return r;
|
2399
|
+
}
|
2400
|
+
|
2401
|
+
function markedSpansBefore(old, startCh, endCh) {
|
2402
|
+
if (old) for (var i = 0, nw; i < old.length; ++i) {
|
2403
|
+
var span = old[i], marker = span.marker;
|
2404
|
+
var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);
|
2405
|
+
if (startsBefore || marker.type == "bookmark" && span.from == startCh && span.from != endCh) {
|
2406
|
+
var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh);
|
2407
|
+
(nw || (nw = [])).push({from: span.from,
|
2408
|
+
to: endsAfter ? null : span.to,
|
2409
|
+
marker: marker});
|
2410
|
+
}
|
2411
|
+
}
|
2412
|
+
return nw;
|
2413
|
+
}
|
2414
|
+
|
2415
|
+
function markedSpansAfter(old, endCh) {
|
2416
|
+
if (old) for (var i = 0, nw; i < old.length; ++i) {
|
2417
|
+
var span = old[i], marker = span.marker;
|
2418
|
+
var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);
|
2419
|
+
if (endsAfter || marker.type == "bookmark" && span.from == endCh) {
|
2420
|
+
var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh);
|
2421
|
+
(nw || (nw = [])).push({from: startsBefore ? null : span.from - endCh,
|
2422
|
+
to: span.to == null ? null : span.to - endCh,
|
2423
|
+
marker: marker});
|
2424
|
+
}
|
2425
|
+
}
|
2426
|
+
return nw;
|
2427
|
+
}
|
2428
|
+
|
2429
|
+
function updateMarkedSpans(oldFirst, oldLast, startCh, endCh, newText) {
|
2430
|
+
if (!oldFirst && !oldLast) return newText;
|
2431
|
+
// Get the spans that 'stick out' on both sides
|
2432
|
+
var first = markedSpansBefore(oldFirst, startCh);
|
2433
|
+
var last = markedSpansAfter(oldLast, endCh);
|
2434
|
+
|
2435
|
+
// Next, merge those two ends
|
2436
|
+
var sameLine = newText.length == 1, offset = lst(newText).length + (sameLine ? startCh : 0);
|
2437
|
+
if (first) {
|
2438
|
+
// Fix up .to properties of first
|
2439
|
+
for (var i = 0; i < first.length; ++i) {
|
2440
|
+
var span = first[i];
|
2441
|
+
if (span.to == null) {
|
2442
|
+
var found = getMarkedSpanFor(last, span.marker);
|
2443
|
+
if (!found) span.to = startCh;
|
2444
|
+
else if (sameLine) span.to = found.to == null ? null : found.to + offset;
|
2445
|
+
}
|
2446
|
+
}
|
2447
|
+
}
|
2448
|
+
if (last) {
|
2449
|
+
// Fix up .from in last (or move them into first in case of sameLine)
|
2450
|
+
for (var i = 0; i < last.length; ++i) {
|
2451
|
+
var span = last[i];
|
2452
|
+
if (span.to != null) span.to += offset;
|
2453
|
+
if (span.from == null) {
|
2454
|
+
var found = getMarkedSpanFor(first, span.marker);
|
2455
|
+
if (!found) {
|
2456
|
+
span.from = offset;
|
2457
|
+
if (sameLine) (first || (first = [])).push(span);
|
2458
|
+
}
|
2459
|
+
} else {
|
2460
|
+
span.from += offset;
|
2461
|
+
if (sameLine) (first || (first = [])).push(span);
|
2462
|
+
}
|
2463
|
+
}
|
2464
|
+
}
|
2465
|
+
|
2466
|
+
var newMarkers = [newHL(newText[0], first)];
|
2467
|
+
if (!sameLine) {
|
2468
|
+
// Fill gap with whole-line-spans
|
2469
|
+
var gap = newText.length - 2, gapMarkers;
|
2470
|
+
if (gap > 0 && first)
|
2471
|
+
for (var i = 0; i < first.length; ++i)
|
2472
|
+
if (first[i].to == null)
|
2473
|
+
(gapMarkers || (gapMarkers = [])).push({from: null, to: null, marker: first[i].marker});
|
2474
|
+
for (var i = 0; i < gap; ++i)
|
2475
|
+
newMarkers.push(newHL(newText[i+1], gapMarkers));
|
2476
|
+
newMarkers.push(newHL(lst(newText), last));
|
2477
|
+
}
|
2478
|
+
return newMarkers;
|
2479
|
+
}
|
2480
|
+
|
2481
|
+
// hl stands for history-line, a data structure that can be either a
|
2482
|
+
// string (line without markers) or a {text, markedSpans} object.
|
2483
|
+
function hlText(val) { return typeof val == "string" ? val : val.text; }
|
2484
|
+
function hlSpans(val) {
|
2485
|
+
if (typeof val == "string") return null;
|
2486
|
+
var spans = val.markedSpans, out = null;
|
2487
|
+
for (var i = 0; i < spans.length; ++i) {
|
2488
|
+
if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }
|
2489
|
+
else if (out) out.push(spans[i]);
|
2490
|
+
}
|
2491
|
+
return !out ? spans : out.length ? out : null;
|
2492
|
+
}
|
2493
|
+
function newHL(text, spans) { return spans ? {text: text, markedSpans: spans} : text; }
|
2494
|
+
|
2495
|
+
function detachMarkedSpans(line) {
|
2496
|
+
var spans = line.markedSpans;
|
2497
|
+
if (!spans) return;
|
2498
|
+
for (var i = 0; i < spans.length; ++i) {
|
2499
|
+
var lines = spans[i].marker.lines;
|
2500
|
+
var ix = indexOf(lines, line);
|
2501
|
+
lines.splice(ix, 1);
|
2502
|
+
}
|
2503
|
+
line.markedSpans = null;
|
2504
|
+
}
|
2505
|
+
|
2506
|
+
function attachMarkedSpans(line, spans) {
|
2507
|
+
if (!spans) return;
|
2508
|
+
for (var i = 0; i < spans.length; ++i)
|
2509
|
+
var marker = spans[i].marker.lines.push(line);
|
2510
|
+
line.markedSpans = spans;
|
2511
|
+
}
|
2512
|
+
|
2513
|
+
// When measuring the position of the end of a line, different
|
2514
|
+
// browsers require different approaches. If an empty span is added,
|
2515
|
+
// many browsers report bogus offsets. Of those, some (Webkit,
|
2516
|
+
// recent IE) will accept a space without moving the whole span to
|
2517
|
+
// the next line when wrapping it, others work with a zero-width
|
2518
|
+
// space.
|
2519
|
+
var eolSpanContent = " ";
|
2520
|
+
if (gecko || (ie && !ie_lt8)) eolSpanContent = "\u200b";
|
2521
|
+
else if (opera) eolSpanContent = "";
|
2522
|
+
|
2523
|
+
// Line objects. These hold state related to a line, including
|
2524
|
+
// highlighting info (the styles array).
|
2525
|
+
function Line(text, markedSpans) {
|
2526
|
+
this.text = text;
|
2527
|
+
this.height = 1;
|
2528
|
+
attachMarkedSpans(this, markedSpans);
|
2529
|
+
}
|
2530
|
+
Line.prototype = {
|
2531
|
+
update: function(text, markedSpans) {
|
2532
|
+
this.text = text;
|
2533
|
+
this.stateAfter = this.styles = null;
|
2534
|
+
detachMarkedSpans(this);
|
2535
|
+
attachMarkedSpans(this, markedSpans);
|
2536
|
+
},
|
2537
|
+
// Run the given mode's parser over a line, update the styles
|
2538
|
+
// array, which contains alternating fragments of text and CSS
|
2539
|
+
// classes.
|
2540
|
+
highlight: function(mode, state, tabSize) {
|
2541
|
+
var stream = new StringStream(this.text, tabSize), st = this.styles || (this.styles = []);
|
2542
|
+
var pos = st.length = 0;
|
2543
|
+
if (this.text == "" && mode.blankLine) mode.blankLine(state);
|
2544
|
+
while (!stream.eol()) {
|
2545
|
+
var style = mode.token(stream, state), substr = stream.current();
|
2546
|
+
stream.start = stream.pos;
|
2547
|
+
if (pos && st[pos-1] == style) {
|
2548
|
+
st[pos-2] += substr;
|
2549
|
+
} else if (substr) {
|
2550
|
+
st[pos++] = substr; st[pos++] = style;
|
2551
|
+
}
|
2552
|
+
// Give up when line is ridiculously long
|
2553
|
+
if (stream.pos > 5000) {
|
2554
|
+
st[pos++] = this.text.slice(stream.pos); st[pos++] = null;
|
2555
|
+
break;
|
2556
|
+
}
|
2557
|
+
}
|
2558
|
+
},
|
2559
|
+
process: function(mode, state, tabSize) {
|
2560
|
+
var stream = new StringStream(this.text, tabSize);
|
2561
|
+
if (this.text == "" && mode.blankLine) mode.blankLine(state);
|
2562
|
+
while (!stream.eol() && stream.pos <= 5000) {
|
2563
|
+
mode.token(stream, state);
|
2564
|
+
stream.start = stream.pos;
|
2565
|
+
}
|
2566
|
+
},
|
2567
|
+
// Fetch the parser token for a given character. Useful for hacks
|
2568
|
+
// that want to inspect the mode state (say, for completion).
|
2569
|
+
getTokenAt: function(mode, state, tabSize, ch) {
|
2570
|
+
var txt = this.text, stream = new StringStream(txt, tabSize);
|
2571
|
+
while (stream.pos < ch && !stream.eol()) {
|
2572
|
+
stream.start = stream.pos;
|
2573
|
+
var style = mode.token(stream, state);
|
2574
|
+
}
|
2575
|
+
return {start: stream.start,
|
2576
|
+
end: stream.pos,
|
2577
|
+
string: stream.current(),
|
2578
|
+
className: style || null,
|
2579
|
+
state: state};
|
2580
|
+
},
|
2581
|
+
indentation: function(tabSize) {return countColumn(this.text, null, tabSize);},
|
2582
|
+
// Produces an HTML fragment for the line, taking selection,
|
2583
|
+
// marking, and highlighting into account.
|
2584
|
+
getContent: function(tabSize, wrapAt, compensateForWrapping) {
|
2585
|
+
var first = true, col = 0, specials = /[\t\u0000-\u0019\u200b\u2028\u2029\uFEFF]/g;
|
2586
|
+
var pre = elt("pre");
|
2587
|
+
function span_(html, text, style) {
|
2588
|
+
if (!text) return;
|
2589
|
+
// Work around a bug where, in some compat modes, IE ignores leading spaces
|
2590
|
+
if (first && ie && text.charAt(0) == " ") text = "\u00a0" + text.slice(1);
|
2591
|
+
first = false;
|
2592
|
+
if (!specials.test(text)) {
|
2593
|
+
col += text.length;
|
2594
|
+
var content = document.createTextNode(text);
|
2595
|
+
} else {
|
2596
|
+
var content = document.createDocumentFragment(), pos = 0;
|
2597
|
+
while (true) {
|
2598
|
+
specials.lastIndex = pos;
|
2599
|
+
var m = specials.exec(text);
|
2600
|
+
var skipped = m ? m.index - pos : text.length - pos;
|
2601
|
+
if (skipped) {
|
2602
|
+
content.appendChild(document.createTextNode(text.slice(pos, pos + skipped)));
|
2603
|
+
col += skipped;
|
2604
|
+
}
|
2605
|
+
if (!m) break;
|
2606
|
+
pos += skipped + 1;
|
2607
|
+
if (m[0] == "\t") {
|
2608
|
+
var tabWidth = tabSize - col % tabSize;
|
2609
|
+
content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab"));
|
2610
|
+
col += tabWidth;
|
2611
|
+
} else {
|
2612
|
+
var token = elt("span", "\u2022", "cm-invalidchar");
|
2613
|
+
token.title = "\\u" + m[0].charCodeAt(0).toString(16);
|
2614
|
+
content.appendChild(token);
|
2615
|
+
col += 1;
|
2616
|
+
}
|
2617
|
+
}
|
2618
|
+
}
|
2619
|
+
if (style) html.appendChild(elt("span", [content], style));
|
2620
|
+
else html.appendChild(content);
|
2621
|
+
}
|
2622
|
+
var span = span_;
|
2623
|
+
if (wrapAt != null) {
|
2624
|
+
var outPos = 0, anchor = pre.anchor = elt("span");
|
2625
|
+
span = function(html, text, style) {
|
2626
|
+
var l = text.length;
|
2627
|
+
if (wrapAt >= outPos && wrapAt < outPos + l) {
|
2628
|
+
var cut = wrapAt - outPos;
|
2629
|
+
if (cut) {
|
2630
|
+
span_(html, text.slice(0, cut), style);
|
2631
|
+
// See comment at the definition of spanAffectsWrapping
|
2632
|
+
if (compensateForWrapping) {
|
2633
|
+
var view = text.slice(cut - 1, cut + 1);
|
2634
|
+
if (spanAffectsWrapping.test(view)) html.appendChild(elt("wbr"));
|
2635
|
+
else if (!ie_lt8 && /\w\w/.test(view)) html.appendChild(document.createTextNode("\u200d"));
|
2636
|
+
}
|
2637
|
+
}
|
2638
|
+
html.appendChild(anchor);
|
2639
|
+
span_(anchor, opera ? text.slice(cut, cut + 1) : text.slice(cut), style);
|
2640
|
+
if (opera) span_(html, text.slice(cut + 1), style);
|
2641
|
+
wrapAt--;
|
2642
|
+
outPos += l;
|
2643
|
+
} else {
|
2644
|
+
outPos += l;
|
2645
|
+
span_(html, text, style);
|
2646
|
+
if (outPos == wrapAt && outPos == len) {
|
2647
|
+
setTextContent(anchor, eolSpanContent);
|
2648
|
+
html.appendChild(anchor);
|
2649
|
+
}
|
2650
|
+
// Stop outputting HTML when gone sufficiently far beyond measure
|
2651
|
+
else if (outPos > wrapAt + 10 && /\s/.test(text)) span = function(){};
|
2652
|
+
}
|
2653
|
+
};
|
2654
|
+
}
|
2655
|
+
|
2656
|
+
var st = this.styles, allText = this.text, marked = this.markedSpans;
|
2657
|
+
var len = allText.length;
|
2658
|
+
function styleToClass(style) {
|
2659
|
+
if (!style) return null;
|
2660
|
+
return "cm-" + style.replace(/ +/g, " cm-");
|
2661
|
+
}
|
2662
|
+
if (!allText && wrapAt == null) {
|
2663
|
+
span(pre, " ");
|
2664
|
+
} else if (!marked || !marked.length) {
|
2665
|
+
for (var i = 0, ch = 0; ch < len; i+=2) {
|
2666
|
+
var str = st[i], style = st[i+1], l = str.length;
|
2667
|
+
if (ch + l > len) str = str.slice(0, len - ch);
|
2668
|
+
ch += l;
|
2669
|
+
span(pre, str, styleToClass(style));
|
2670
|
+
}
|
2671
|
+
} else {
|
2672
|
+
marked.sort(function(a, b) { return a.from - b.from; });
|
2673
|
+
var pos = 0, i = 0, text = "", style, sg = 0;
|
2674
|
+
var nextChange = marked[0].from || 0, marks = [], markpos = 0;
|
2675
|
+
var advanceMarks = function() {
|
2676
|
+
var m;
|
2677
|
+
while (markpos < marked.length &&
|
2678
|
+
((m = marked[markpos]).from == pos || m.from == null)) {
|
2679
|
+
if (m.marker.type == "range") marks.push(m);
|
2680
|
+
++markpos;
|
2681
|
+
}
|
2682
|
+
nextChange = markpos < marked.length ? marked[markpos].from : Infinity;
|
2683
|
+
for (var i = 0; i < marks.length; ++i) {
|
2684
|
+
var to = marks[i].to;
|
2685
|
+
if (to == null) to = Infinity;
|
2686
|
+
if (to == pos) marks.splice(i--, 1);
|
2687
|
+
else nextChange = Math.min(to, nextChange);
|
2688
|
+
}
|
2689
|
+
};
|
2690
|
+
var m = 0;
|
2691
|
+
while (pos < len) {
|
2692
|
+
if (nextChange == pos) advanceMarks();
|
2693
|
+
var upto = Math.min(len, nextChange);
|
2694
|
+
while (true) {
|
2695
|
+
if (text) {
|
2696
|
+
var end = pos + text.length;
|
2697
|
+
var appliedStyle = style;
|
2698
|
+
for (var j = 0; j < marks.length; ++j) {
|
2699
|
+
var mark = marks[j];
|
2700
|
+
appliedStyle = (appliedStyle ? appliedStyle + " " : "") + mark.marker.style;
|
2701
|
+
if (mark.marker.endStyle && mark.to === Math.min(end, upto)) appliedStyle += " " + mark.marker.endStyle;
|
2702
|
+
if (mark.marker.startStyle && mark.from === pos) appliedStyle += " " + mark.marker.startStyle;
|
2703
|
+
}
|
2704
|
+
span(pre, end > upto ? text.slice(0, upto - pos) : text, appliedStyle);
|
2705
|
+
if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;}
|
2706
|
+
pos = end;
|
2707
|
+
}
|
2708
|
+
text = st[i++]; style = styleToClass(st[i++]);
|
2709
|
+
}
|
2710
|
+
}
|
2711
|
+
}
|
2712
|
+
return pre;
|
2713
|
+
},
|
2714
|
+
cleanUp: function() {
|
2715
|
+
this.parent = null;
|
2716
|
+
detachMarkedSpans(this);
|
2717
|
+
}
|
2718
|
+
};
|
2719
|
+
|
2720
|
+
// Data structure that holds the sequence of lines.
|
2721
|
+
function LeafChunk(lines) {
|
2722
|
+
this.lines = lines;
|
2723
|
+
this.parent = null;
|
2724
|
+
for (var i = 0, e = lines.length, height = 0; i < e; ++i) {
|
2725
|
+
lines[i].parent = this;
|
2726
|
+
height += lines[i].height;
|
2727
|
+
}
|
2728
|
+
this.height = height;
|
2729
|
+
}
|
2730
|
+
LeafChunk.prototype = {
|
2731
|
+
chunkSize: function() { return this.lines.length; },
|
2732
|
+
remove: function(at, n, callbacks) {
|
2733
|
+
for (var i = at, e = at + n; i < e; ++i) {
|
2734
|
+
var line = this.lines[i];
|
2735
|
+
this.height -= line.height;
|
2736
|
+
line.cleanUp();
|
2737
|
+
if (line.handlers)
|
2738
|
+
for (var j = 0; j < line.handlers.length; ++j) callbacks.push(line.handlers[j]);
|
2739
|
+
}
|
2740
|
+
this.lines.splice(at, n);
|
2741
|
+
},
|
2742
|
+
collapse: function(lines) {
|
2743
|
+
lines.splice.apply(lines, [lines.length, 0].concat(this.lines));
|
2744
|
+
},
|
2745
|
+
insertHeight: function(at, lines, height) {
|
2746
|
+
this.height += height;
|
2747
|
+
this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));
|
2748
|
+
for (var i = 0, e = lines.length; i < e; ++i) lines[i].parent = this;
|
2749
|
+
},
|
2750
|
+
iterN: function(at, n, op) {
|
2751
|
+
for (var e = at + n; at < e; ++at)
|
2752
|
+
if (op(this.lines[at])) return true;
|
2753
|
+
}
|
2754
|
+
};
|
2755
|
+
function BranchChunk(children) {
|
2756
|
+
this.children = children;
|
2757
|
+
var size = 0, height = 0;
|
2758
|
+
for (var i = 0, e = children.length; i < e; ++i) {
|
2759
|
+
var ch = children[i];
|
2760
|
+
size += ch.chunkSize(); height += ch.height;
|
2761
|
+
ch.parent = this;
|
2762
|
+
}
|
2763
|
+
this.size = size;
|
2764
|
+
this.height = height;
|
2765
|
+
this.parent = null;
|
2766
|
+
}
|
2767
|
+
BranchChunk.prototype = {
|
2768
|
+
chunkSize: function() { return this.size; },
|
2769
|
+
remove: function(at, n, callbacks) {
|
2770
|
+
this.size -= n;
|
2771
|
+
for (var i = 0; i < this.children.length; ++i) {
|
2772
|
+
var child = this.children[i], sz = child.chunkSize();
|
2773
|
+
if (at < sz) {
|
2774
|
+
var rm = Math.min(n, sz - at), oldHeight = child.height;
|
2775
|
+
child.remove(at, rm, callbacks);
|
2776
|
+
this.height -= oldHeight - child.height;
|
2777
|
+
if (sz == rm) { this.children.splice(i--, 1); child.parent = null; }
|
2778
|
+
if ((n -= rm) == 0) break;
|
2779
|
+
at = 0;
|
2780
|
+
} else at -= sz;
|
2781
|
+
}
|
2782
|
+
if (this.size - n < 25) {
|
2783
|
+
var lines = [];
|
2784
|
+
this.collapse(lines);
|
2785
|
+
this.children = [new LeafChunk(lines)];
|
2786
|
+
this.children[0].parent = this;
|
2787
|
+
}
|
2788
|
+
},
|
2789
|
+
collapse: function(lines) {
|
2790
|
+
for (var i = 0, e = this.children.length; i < e; ++i) this.children[i].collapse(lines);
|
2791
|
+
},
|
2792
|
+
insert: function(at, lines) {
|
2793
|
+
var height = 0;
|
2794
|
+
for (var i = 0, e = lines.length; i < e; ++i) height += lines[i].height;
|
2795
|
+
this.insertHeight(at, lines, height);
|
2796
|
+
},
|
2797
|
+
insertHeight: function(at, lines, height) {
|
2798
|
+
this.size += lines.length;
|
2799
|
+
this.height += height;
|
2800
|
+
for (var i = 0, e = this.children.length; i < e; ++i) {
|
2801
|
+
var child = this.children[i], sz = child.chunkSize();
|
2802
|
+
if (at <= sz) {
|
2803
|
+
child.insertHeight(at, lines, height);
|
2804
|
+
if (child.lines && child.lines.length > 50) {
|
2805
|
+
while (child.lines.length > 50) {
|
2806
|
+
var spilled = child.lines.splice(child.lines.length - 25, 25);
|
2807
|
+
var newleaf = new LeafChunk(spilled);
|
2808
|
+
child.height -= newleaf.height;
|
2809
|
+
this.children.splice(i + 1, 0, newleaf);
|
2810
|
+
newleaf.parent = this;
|
2811
|
+
}
|
2812
|
+
this.maybeSpill();
|
2813
|
+
}
|
2814
|
+
break;
|
2815
|
+
}
|
2816
|
+
at -= sz;
|
2817
|
+
}
|
2818
|
+
},
|
2819
|
+
maybeSpill: function() {
|
2820
|
+
if (this.children.length <= 10) return;
|
2821
|
+
var me = this;
|
2822
|
+
do {
|
2823
|
+
var spilled = me.children.splice(me.children.length - 5, 5);
|
2824
|
+
var sibling = new BranchChunk(spilled);
|
2825
|
+
if (!me.parent) { // Become the parent node
|
2826
|
+
var copy = new BranchChunk(me.children);
|
2827
|
+
copy.parent = me;
|
2828
|
+
me.children = [copy, sibling];
|
2829
|
+
me = copy;
|
2830
|
+
} else {
|
2831
|
+
me.size -= sibling.size;
|
2832
|
+
me.height -= sibling.height;
|
2833
|
+
var myIndex = indexOf(me.parent.children, me);
|
2834
|
+
me.parent.children.splice(myIndex + 1, 0, sibling);
|
2835
|
+
}
|
2836
|
+
sibling.parent = me.parent;
|
2837
|
+
} while (me.children.length > 10);
|
2838
|
+
me.parent.maybeSpill();
|
2839
|
+
},
|
2840
|
+
iter: function(from, to, op) { this.iterN(from, to - from, op); },
|
2841
|
+
iterN: function(at, n, op) {
|
2842
|
+
for (var i = 0, e = this.children.length; i < e; ++i) {
|
2843
|
+
var child = this.children[i], sz = child.chunkSize();
|
2844
|
+
if (at < sz) {
|
2845
|
+
var used = Math.min(n, sz - at);
|
2846
|
+
if (child.iterN(at, used, op)) return true;
|
2847
|
+
if ((n -= used) == 0) break;
|
2848
|
+
at = 0;
|
2849
|
+
} else at -= sz;
|
2850
|
+
}
|
2851
|
+
}
|
2852
|
+
};
|
2853
|
+
|
2854
|
+
function getLineAt(chunk, n) {
|
2855
|
+
while (!chunk.lines) {
|
2856
|
+
for (var i = 0;; ++i) {
|
2857
|
+
var child = chunk.children[i], sz = child.chunkSize();
|
2858
|
+
if (n < sz) { chunk = child; break; }
|
2859
|
+
n -= sz;
|
2860
|
+
}
|
2861
|
+
}
|
2862
|
+
return chunk.lines[n];
|
2863
|
+
}
|
2864
|
+
function lineNo(line) {
|
2865
|
+
if (line.parent == null) return null;
|
2866
|
+
var cur = line.parent, no = indexOf(cur.lines, line);
|
2867
|
+
for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {
|
2868
|
+
for (var i = 0; ; ++i) {
|
2869
|
+
if (chunk.children[i] == cur) break;
|
2870
|
+
no += chunk.children[i].chunkSize();
|
2871
|
+
}
|
2872
|
+
}
|
2873
|
+
return no;
|
2874
|
+
}
|
2875
|
+
function lineAtHeight(chunk, h) {
|
2876
|
+
var n = 0;
|
2877
|
+
outer: do {
|
2878
|
+
for (var i = 0, e = chunk.children.length; i < e; ++i) {
|
2879
|
+
var child = chunk.children[i], ch = child.height;
|
2880
|
+
if (h < ch) { chunk = child; continue outer; }
|
2881
|
+
h -= ch;
|
2882
|
+
n += child.chunkSize();
|
2883
|
+
}
|
2884
|
+
return n;
|
2885
|
+
} while (!chunk.lines);
|
2886
|
+
for (var i = 0, e = chunk.lines.length; i < e; ++i) {
|
2887
|
+
var line = chunk.lines[i], lh = line.height;
|
2888
|
+
if (h < lh) break;
|
2889
|
+
h -= lh;
|
2890
|
+
}
|
2891
|
+
return n + i;
|
2892
|
+
}
|
2893
|
+
function heightAtLine(chunk, n) {
|
2894
|
+
var h = 0;
|
2895
|
+
outer: do {
|
2896
|
+
for (var i = 0, e = chunk.children.length; i < e; ++i) {
|
2897
|
+
var child = chunk.children[i], sz = child.chunkSize();
|
2898
|
+
if (n < sz) { chunk = child; continue outer; }
|
2899
|
+
n -= sz;
|
2900
|
+
h += child.height;
|
2901
|
+
}
|
2902
|
+
return h;
|
2903
|
+
} while (!chunk.lines);
|
2904
|
+
for (var i = 0; i < n; ++i) h += chunk.lines[i].height;
|
2905
|
+
return h;
|
2906
|
+
}
|
2907
|
+
|
2908
|
+
// The history object 'chunks' changes that are made close together
|
2909
|
+
// and at almost the same time into bigger undoable units.
|
2910
|
+
function History() {
|
2911
|
+
this.time = 0;
|
2912
|
+
this.done = []; this.undone = [];
|
2913
|
+
this.compound = 0;
|
2914
|
+
this.closed = false;
|
2915
|
+
}
|
2916
|
+
History.prototype = {
|
2917
|
+
addChange: function(start, added, old) {
|
2918
|
+
this.undone.length = 0;
|
2919
|
+
var time = +new Date, cur = lst(this.done), last = cur && lst(cur);
|
2920
|
+
var dtime = time - this.time;
|
2921
|
+
|
2922
|
+
if (cur && !this.closed && this.compound) {
|
2923
|
+
cur.push({start: start, added: added, old: old});
|
2924
|
+
} else if (dtime > 400 || !last || this.closed ||
|
2925
|
+
last.start > start + old.length || last.start + last.added < start) {
|
2926
|
+
this.done.push([{start: start, added: added, old: old}]);
|
2927
|
+
this.closed = false;
|
2928
|
+
} else {
|
2929
|
+
var startBefore = Math.max(0, last.start - start),
|
2930
|
+
endAfter = Math.max(0, (start + old.length) - (last.start + last.added));
|
2931
|
+
for (var i = startBefore; i > 0; --i) last.old.unshift(old[i - 1]);
|
2932
|
+
for (var i = endAfter; i > 0; --i) last.old.push(old[old.length - i]);
|
2933
|
+
if (startBefore) last.start = start;
|
2934
|
+
last.added += added - (old.length - startBefore - endAfter);
|
2935
|
+
}
|
2936
|
+
this.time = time;
|
2937
|
+
},
|
2938
|
+
startCompound: function() {
|
2939
|
+
if (!this.compound++) this.closed = true;
|
2940
|
+
},
|
2941
|
+
endCompound: function() {
|
2942
|
+
if (!--this.compound) this.closed = true;
|
2943
|
+
}
|
2944
|
+
};
|
2945
|
+
|
2946
|
+
function stopMethod() {e_stop(this);}
|
2947
|
+
// Ensure an event has a stop method.
|
2948
|
+
function addStop(event) {
|
2949
|
+
if (!event.stop) event.stop = stopMethod;
|
2950
|
+
return event;
|
2951
|
+
}
|
2952
|
+
|
2953
|
+
function e_preventDefault(e) {
|
2954
|
+
if (e.preventDefault) e.preventDefault();
|
2955
|
+
else e.returnValue = false;
|
2956
|
+
}
|
2957
|
+
function e_stopPropagation(e) {
|
2958
|
+
if (e.stopPropagation) e.stopPropagation();
|
2959
|
+
else e.cancelBubble = true;
|
2960
|
+
}
|
2961
|
+
function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);}
|
2962
|
+
CodeMirror.e_stop = e_stop;
|
2963
|
+
CodeMirror.e_preventDefault = e_preventDefault;
|
2964
|
+
CodeMirror.e_stopPropagation = e_stopPropagation;
|
2965
|
+
|
2966
|
+
function e_target(e) {return e.target || e.srcElement;}
|
2967
|
+
function e_button(e) {
|
2968
|
+
var b = e.which;
|
2969
|
+
if (b == null) {
|
2970
|
+
if (e.button & 1) b = 1;
|
2971
|
+
else if (e.button & 2) b = 3;
|
2972
|
+
else if (e.button & 4) b = 2;
|
2973
|
+
}
|
2974
|
+
if (mac && e.ctrlKey && b == 1) b = 3;
|
2975
|
+
return b;
|
2976
|
+
}
|
2977
|
+
|
2978
|
+
// Allow 3rd-party code to override event properties by adding an override
|
2979
|
+
// object to an event object.
|
2980
|
+
function e_prop(e, prop) {
|
2981
|
+
var overridden = e.override && e.override.hasOwnProperty(prop);
|
2982
|
+
return overridden ? e.override[prop] : e[prop];
|
2983
|
+
}
|
2984
|
+
|
2985
|
+
// Event handler registration. If disconnect is true, it'll return a
|
2986
|
+
// function that unregisters the handler.
|
2987
|
+
function connect(node, type, handler, disconnect) {
|
2988
|
+
if (typeof node.addEventListener == "function") {
|
2989
|
+
node.addEventListener(type, handler, false);
|
2990
|
+
if (disconnect) return function() {node.removeEventListener(type, handler, false);};
|
2991
|
+
} else {
|
2992
|
+
var wrapHandler = function(event) {handler(event || window.event);};
|
2993
|
+
node.attachEvent("on" + type, wrapHandler);
|
2994
|
+
if (disconnect) return function() {node.detachEvent("on" + type, wrapHandler);};
|
2995
|
+
}
|
2996
|
+
}
|
2997
|
+
CodeMirror.connect = connect;
|
2998
|
+
|
2999
|
+
function Delayed() {this.id = null;}
|
3000
|
+
Delayed.prototype = {set: function(ms, f) {clearTimeout(this.id); this.id = setTimeout(f, ms);}};
|
3001
|
+
|
3002
|
+
var Pass = CodeMirror.Pass = {toString: function(){return "CodeMirror.Pass";}};
|
3003
|
+
|
3004
|
+
// Detect drag-and-drop
|
3005
|
+
var dragAndDrop = function() {
|
3006
|
+
// There is *some* kind of drag-and-drop support in IE6-8, but I
|
3007
|
+
// couldn't get it to work yet.
|
3008
|
+
if (ie_lt9) return false;
|
3009
|
+
var div = elt('div');
|
3010
|
+
return "draggable" in div || "dragDrop" in div;
|
3011
|
+
}();
|
3012
|
+
|
3013
|
+
// Feature-detect whether newlines in textareas are converted to \r\n
|
3014
|
+
var lineSep = function () {
|
3015
|
+
var te = elt("textarea");
|
3016
|
+
te.value = "foo\nbar";
|
3017
|
+
if (te.value.indexOf("\r") > -1) return "\r\n";
|
3018
|
+
return "\n";
|
3019
|
+
}();
|
3020
|
+
|
3021
|
+
// For a reason I have yet to figure out, some browsers disallow
|
3022
|
+
// word wrapping between certain characters *only* if a new inline
|
3023
|
+
// element is started between them. This makes it hard to reliably
|
3024
|
+
// measure the position of things, since that requires inserting an
|
3025
|
+
// extra span. This terribly fragile set of regexps matches the
|
3026
|
+
// character combinations that suffer from this phenomenon on the
|
3027
|
+
// various browsers.
|
3028
|
+
var spanAffectsWrapping = /^$/; // Won't match any two-character string
|
3029
|
+
if (gecko) spanAffectsWrapping = /$'/;
|
3030
|
+
else if (safari) spanAffectsWrapping = /\-[^ \-?]|\?[^ !'\"\),.\-\/:;\?\]\}]/;
|
3031
|
+
else if (chrome) spanAffectsWrapping = /\-[^ \-\.?]|\?[^ \-\.?\]\}:;!'\"\),\/]|[\.!\"#&%\)*+,:;=>\]|\}~][\(\{\[<]|\$'/;
|
3032
|
+
|
3033
|
+
// Counts the column offset in a string, taking tabs into account.
|
3034
|
+
// Used mostly to find indentation.
|
3035
|
+
function countColumn(string, end, tabSize) {
|
3036
|
+
if (end == null) {
|
3037
|
+
end = string.search(/[^\s\u00a0]/);
|
3038
|
+
if (end == -1) end = string.length;
|
3039
|
+
}
|
3040
|
+
for (var i = 0, n = 0; i < end; ++i) {
|
3041
|
+
if (string.charAt(i) == "\t") n += tabSize - (n % tabSize);
|
3042
|
+
else ++n;
|
3043
|
+
}
|
3044
|
+
return n;
|
3045
|
+
}
|
3046
|
+
|
3047
|
+
function eltOffset(node, screen) {
|
3048
|
+
// Take the parts of bounding client rect that we are interested in so we are able to edit if need be,
|
3049
|
+
// since the returned value cannot be changed externally (they are kept in sync as the element moves within the page)
|
3050
|
+
try { var box = node.getBoundingClientRect(); box = { top: box.top, left: box.left }; }
|
3051
|
+
catch(e) { box = {top: 0, left: 0}; }
|
3052
|
+
if (!screen) {
|
3053
|
+
// Get the toplevel scroll, working around browser differences.
|
3054
|
+
if (window.pageYOffset == null) {
|
3055
|
+
var t = document.documentElement || document.body.parentNode;
|
3056
|
+
if (t.scrollTop == null) t = document.body;
|
3057
|
+
box.top += t.scrollTop; box.left += t.scrollLeft;
|
3058
|
+
} else {
|
3059
|
+
box.top += window.pageYOffset; box.left += window.pageXOffset;
|
3060
|
+
}
|
3061
|
+
}
|
3062
|
+
return box;
|
3063
|
+
}
|
3064
|
+
|
3065
|
+
function eltText(node) {
|
3066
|
+
return node.textContent || node.innerText || node.nodeValue || "";
|
3067
|
+
}
|
3068
|
+
|
3069
|
+
var spaceStrs = [""];
|
3070
|
+
function spaceStr(n) {
|
3071
|
+
while (spaceStrs.length <= n)
|
3072
|
+
spaceStrs.push(lst(spaceStrs) + " ");
|
3073
|
+
return spaceStrs[n];
|
3074
|
+
}
|
3075
|
+
|
3076
|
+
function lst(arr) { return arr[arr.length-1]; }
|
3077
|
+
|
3078
|
+
function selectInput(node) {
|
3079
|
+
if (ios) { // Mobile Safari apparently has a bug where select() is broken.
|
3080
|
+
node.selectionStart = 0;
|
3081
|
+
node.selectionEnd = node.value.length;
|
3082
|
+
} else node.select();
|
3083
|
+
}
|
3084
|
+
|
3085
|
+
// Operations on {line, ch} objects.
|
3086
|
+
function posEq(a, b) {return a.line == b.line && a.ch == b.ch;}
|
3087
|
+
function posLess(a, b) {return a.line < b.line || (a.line == b.line && a.ch < b.ch);}
|
3088
|
+
function copyPos(x) {return {line: x.line, ch: x.ch};}
|
3089
|
+
|
3090
|
+
function elt(tag, content, className, style) {
|
3091
|
+
var e = document.createElement(tag);
|
3092
|
+
if (className) e.className = className;
|
3093
|
+
if (style) e.style.cssText = style;
|
3094
|
+
if (typeof content == "string") setTextContent(e, content);
|
3095
|
+
else if (content) for (var i = 0; i < content.length; ++i) e.appendChild(content[i]);
|
3096
|
+
return e;
|
3097
|
+
}
|
3098
|
+
function removeChildren(e) {
|
3099
|
+
e.innerHTML = "";
|
3100
|
+
return e;
|
3101
|
+
}
|
3102
|
+
function removeChildrenAndAdd(parent, e) {
|
3103
|
+
removeChildren(parent).appendChild(e);
|
3104
|
+
}
|
3105
|
+
function setTextContent(e, str) {
|
3106
|
+
if (ie_lt9) {
|
3107
|
+
e.innerHTML = "";
|
3108
|
+
e.appendChild(document.createTextNode(str));
|
3109
|
+
} else e.textContent = str;
|
3110
|
+
}
|
3111
|
+
|
3112
|
+
// Used to position the cursor after an undo/redo by finding the
|
3113
|
+
// last edited character.
|
3114
|
+
function editEnd(from, to) {
|
3115
|
+
if (!to) return 0;
|
3116
|
+
if (!from) return to.length;
|
3117
|
+
for (var i = from.length, j = to.length; i >= 0 && j >= 0; --i, --j)
|
3118
|
+
if (from.charAt(i) != to.charAt(j)) break;
|
3119
|
+
return j + 1;
|
3120
|
+
}
|
3121
|
+
|
3122
|
+
function indexOf(collection, elt) {
|
3123
|
+
if (collection.indexOf) return collection.indexOf(elt);
|
3124
|
+
for (var i = 0, e = collection.length; i < e; ++i)
|
3125
|
+
if (collection[i] == elt) return i;
|
3126
|
+
return -1;
|
3127
|
+
}
|
3128
|
+
var nonASCIISingleCaseWordChar = /[\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc]/;
|
3129
|
+
function isWordChar(ch) {
|
3130
|
+
return /\w/.test(ch) || ch > "\x80" &&
|
3131
|
+
(ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch));
|
3132
|
+
}
|
3133
|
+
|
3134
|
+
// See if "".split is the broken IE version, if so, provide an
|
3135
|
+
// alternative way to split lines.
|
3136
|
+
var splitLines = "\n\nb".split(/\n/).length != 3 ? function(string) {
|
3137
|
+
var pos = 0, result = [], l = string.length;
|
3138
|
+
while (pos <= l) {
|
3139
|
+
var nl = string.indexOf("\n", pos);
|
3140
|
+
if (nl == -1) nl = string.length;
|
3141
|
+
var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl);
|
3142
|
+
var rt = line.indexOf("\r");
|
3143
|
+
if (rt != -1) {
|
3144
|
+
result.push(line.slice(0, rt));
|
3145
|
+
pos += rt + 1;
|
3146
|
+
} else {
|
3147
|
+
result.push(line);
|
3148
|
+
pos = nl + 1;
|
3149
|
+
}
|
3150
|
+
}
|
3151
|
+
return result;
|
3152
|
+
} : function(string){return string.split(/\r\n?|\n/);};
|
3153
|
+
CodeMirror.splitLines = splitLines;
|
3154
|
+
|
3155
|
+
var hasSelection = window.getSelection ? function(te) {
|
3156
|
+
try { return te.selectionStart != te.selectionEnd; }
|
3157
|
+
catch(e) { return false; }
|
3158
|
+
} : function(te) {
|
3159
|
+
try {var range = te.ownerDocument.selection.createRange();}
|
3160
|
+
catch(e) {}
|
3161
|
+
if (!range || range.parentElement() != te) return false;
|
3162
|
+
return range.compareEndPoints("StartToEnd", range) != 0;
|
3163
|
+
};
|
3164
|
+
|
3165
|
+
CodeMirror.defineMode("null", function() {
|
3166
|
+
return {token: function(stream) {stream.skipToEnd();}};
|
3167
|
+
});
|
3168
|
+
CodeMirror.defineMIME("text/plain", "null");
|
3169
|
+
|
3170
|
+
var keyNames = {3: "Enter", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt",
|
3171
|
+
19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End",
|
3172
|
+
36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert",
|
3173
|
+
46: "Delete", 59: ";", 91: "Mod", 92: "Mod", 93: "Mod", 109: "-", 107: "=", 127: "Delete",
|
3174
|
+
186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\",
|
3175
|
+
221: "]", 222: "'", 63276: "PageUp", 63277: "PageDown", 63275: "End", 63273: "Home",
|
3176
|
+
63234: "Left", 63232: "Up", 63235: "Right", 63233: "Down", 63302: "Insert", 63272: "Delete"};
|
3177
|
+
CodeMirror.keyNames = keyNames;
|
3178
|
+
(function() {
|
3179
|
+
// Number keys
|
3180
|
+
for (var i = 0; i < 10; i++) keyNames[i + 48] = String(i);
|
3181
|
+
// Alphabetic keys
|
3182
|
+
for (var i = 65; i <= 90; i++) keyNames[i] = String.fromCharCode(i);
|
3183
|
+
// Function keys
|
3184
|
+
for (var i = 1; i <= 12; i++) keyNames[i + 111] = keyNames[i + 63235] = "F" + i;
|
3185
|
+
})();
|
3186
|
+
|
3187
|
+
CodeMirror.version = "2.38";
|
3188
|
+
|
3189
|
+
return CodeMirror;
|
3190
|
+
})();
|