diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 04ceb6e86..daec31893 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,4 +3,4 @@ updates: - package-ecosystem: "maven" directory: "/" schedule: - interval: "weekly" + interval: "daily" diff --git a/.github/workflows/dependabot_automation.yml b/.github/workflows/dependabot_automation.yml new file mode 100644 index 000000000..c7e532c4e --- /dev/null +++ b/.github/workflows/dependabot_automation.yml @@ -0,0 +1,28 @@ +name: Dependabot auto-merge +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'ArpNetworking/metrics-portal' + steps: + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v2 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + - name: Enable auto-merge for Dependabot PRs + run: gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Enable auto-approve for patch version update PRs + if: steps.metadata.outputs.update-type == 'version-update:semver-patch' + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.gitignore b/.gitignore index 298ff2b74..6b4a78735 100644 --- a/.gitignore +++ b/.gitignore @@ -28,7 +28,7 @@ eclipse-bin/ # Mac .DS_Store -# Akka test persistence data +# Pekko test persistence data test-snapshots/ # VSCode @@ -36,3 +36,4 @@ test-snapshots/ .project node_modules/ +node/ diff --git a/.jdkw b/.jdkw index 513c25d45..5f3bf6a34 100644 --- a/.jdkw +++ b/.jdkw @@ -1,4 +1,4 @@ JDKW_RELEASE=latest JDKW_DIST=zulu -JDKW_BUILD=8.38.0.13 -JDKW_VERSION=8.0.212 +JDKW_BUILD=21.32.17-ca +JDKW_VERSION=21.0.2 diff --git a/Jenkinsfile b/Jenkinsfile index 35a177b6c..e37a16d34 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,6 +5,9 @@ pipeline { activeDeadlineSeconds 3600 } } + options { + ansiColor('xterm') + } stages { stage('Init') { steps { @@ -41,7 +44,7 @@ pipeline { usernamePassword(credentialsId: 'jenkins-ossrh', usernameVariable: 'OSSRH_USER', passwordVariable: 'OSSRH_PASS'), string(credentialsId: 'jenkins-gpg', variable: 'GPG_PASS')]) { withMaven { - sh "./jdk-wrapper.sh ./mvnw $target -P rpm -U -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Ddocker.verbose=true" + sh "./jdk-wrapper.sh ./mvnw $target -P rpm -U -B -Dstyle.color=always -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Ddocker.verbose=true" } } } @@ -57,6 +60,16 @@ pipeline { } } } + stage('Save cache') { + when { + branch 'master' + } + steps { + withMaven { + sh "./jdk-wrapper.sh ./mvnw -Ddocker.image.tag=cache-base -Ddocker.push.registry=docker.arpnetworking.com docker:push" + } + } + } } post('Analysis') { always { diff --git a/app/actors/ClusterShutdownActor.java b/app/actors/ClusterShutdownActor.java deleted file mode 100644 index 692c6dd48..000000000 --- a/app/actors/ClusterShutdownActor.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2016 Smartsheet.com - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package actors; - -import akka.actor.AbstractActor; -import akka.actor.Address; -import akka.actor.Props; -import akka.cluster.Cluster; -import akka.cluster.ClusterEvent; -import akka.cluster.Member; - -import java.util.concurrent.CompletableFuture; - -/** - * Actor that subscribes to cluster events and triggers a CompletableFuture when it sees itself removed - * from the cluster. - * - * @author Brandon Arp (brandon dot arp at inscopemetrics dot io) - */ -public class ClusterShutdownActor extends AbstractActor { - /** - * Creates a {@link Props} for this actor. - * - * @param shutdownFuture A future to be completed at cluster shutdown. - * @return A new Props. - */ - public static Props props(final CompletableFuture shutdownFuture) { - return Props.create(ClusterShutdownActor.class, shutdownFuture); - } - - /** - * Public constructor. - * - * @param shutdownFuture A future to be completed at cluster shutdown. - */ - public ClusterShutdownActor(final CompletableFuture shutdownFuture) { - _shutdownFuture = shutdownFuture; - - final Cluster cluster = Cluster.get(context().system()); - _selfAddress = cluster.selfAddress(); - cluster.subscribe(self(), ClusterEvent.initialStateAsEvents(), ClusterEvent.MemberRemoved.class); - } - - @Override - public Receive createReceive() { - return receiveBuilder() - .match(ClusterEvent.MemberRemoved.class, removed -> { - final Member member = removed.member(); - if (_selfAddress.equals(member.address())) { - _shutdownFuture.complete(Boolean.TRUE); - } - }) - .build(); - } - - private final CompletableFuture _shutdownFuture; - private final Address _selfAddress; -} diff --git a/app/actors/JvmMetricsCollector.java b/app/actors/JvmMetricsCollector.java index 3c4998b47..41bb8223c 100644 --- a/app/actors/JvmMetricsCollector.java +++ b/app/actors/JvmMetricsCollector.java @@ -15,24 +15,22 @@ */ package actors; -import akka.actor.AbstractActor; -import akka.actor.ActorSystem; -import akka.actor.Cancellable; -import akka.dispatch.Dispatcher; import com.arpnetworking.logback.annotations.LogValue; import com.arpnetworking.metrics.MetricsFactory; import com.arpnetworking.metrics.jvm.ExecutorServiceMetricsRunnable; import com.arpnetworking.metrics.jvm.JvmMetricsRunnable; -import com.arpnetworking.metrics.util.AkkaForkJoinPoolAdapter; -import com.arpnetworking.metrics.util.ScalaForkJoinPoolAdapter; import com.arpnetworking.play.configuration.ConfigurationHelper; import com.arpnetworking.steno.LogValueMapFactory; import com.arpnetworking.steno.Logger; import com.arpnetworking.steno.LoggerFactory; import com.google.common.base.MoreObjects; import com.google.common.collect.Maps; -import com.google.inject.Inject; import com.typesafe.config.Config; +import jakarta.inject.Inject; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Cancellable; +import org.apache.pekko.dispatch.Dispatcher; import scala.concurrent.ExecutionContextExecutor; import scala.concurrent.duration.FiniteDuration; @@ -60,11 +58,11 @@ public JvmMetricsCollector( _interval = ConfigurationHelper.getFiniteDuration(configuration, "metrics.jvm.interval"); _jvmMetricsRunnable = new JvmMetricsRunnable.Builder() .setMetricsFactory(metricsFactory) - .setSwallowException(false) // Relying on the default akka supervisor strategy here. + .setSwallowException(false) // Relying on the default pekko supervisor strategy here. .build(); _executorServiceMetricsRunnable = new ExecutorServiceMetricsRunnable.Builder() .setMetricsFactory(metricsFactory) - .setSwallowException(false) // Relying on the default akka supervisor strategy here. + .setSwallowException(false) // Relying on the default pekko supervisor strategy here. .setExecutorServices(createExecutorServiceMap(context().system(), configuration)) .build(); } @@ -75,7 +73,7 @@ public void preStart() { .setMessage("Starting JVM metrics collector actor.") .addData("actor", self()) .log(); - _cancellable = getContext().system().scheduler().schedule( + _cancellable = getContext().system().scheduler().scheduleAtFixedRate( INITIAL_DELAY, _interval, self(), @@ -128,7 +126,7 @@ private Map createExecutorServiceMap( if (configuration.getBoolean("metrics.jvm.dispatchers.includeDefaultDispatcher")) { addExecutorServiceFromExecutionContextExecutor( executorServices, - "akka/default_dispatcher", + "pekko/default_dispatcher", actorSystem.dispatcher()); } @@ -138,7 +136,7 @@ private Map createExecutorServiceMap( final String dispatcherNameAsString = (String) dispatcherName; addExecutorServiceFromExecutionContextExecutor( executorServices, - "akka/" + dispatcherNameAsString.replaceAll("-", "_"), + "pekko/" + dispatcherNameAsString.replaceAll("-", "_"), actorSystem.dispatchers().lookup(dispatcherNameAsString) ); } else { @@ -170,17 +168,7 @@ private void addExecutorService( final Map executorServices, final String name, final ExecutorService executorService) { - if (executorService instanceof scala.concurrent.forkjoin.ForkJoinPool) { - // NOTE: This is deprecated in Scala 2.12 which will be adopted by Play 2.6 (maybe) - // ^ Scala and hopefully Play will use Java's ForkJoinPool natively instead - final scala.concurrent.forkjoin.ForkJoinPool scalaForkJoinPool = - (scala.concurrent.forkjoin.ForkJoinPool) executorService; - executorServices.put(name, new ScalaForkJoinPoolAdapter(scalaForkJoinPool)); - } else if (executorService instanceof akka.dispatch.forkjoin.ForkJoinPool) { - final akka.dispatch.forkjoin.ForkJoinPool akkaForkJoinPool = - (akka.dispatch.forkjoin.ForkJoinPool) executorService; - executorServices.put(name, new AkkaForkJoinPoolAdapter(akkaForkJoinPool)); - } else if (executorService instanceof java.util.concurrent.ForkJoinPool + if (executorService instanceof java.util.concurrent.ForkJoinPool || executorService instanceof java.util.concurrent.ThreadPoolExecutor) { executorServices.put(name, executorService); } else { diff --git a/app/actors/NoopActor.java b/app/actors/NoopActor.java index 604bb9e28..d41460dc2 100644 --- a/app/actors/NoopActor.java +++ b/app/actors/NoopActor.java @@ -15,7 +15,7 @@ */ package actors; -import akka.actor.AbstractActor; +import org.apache.pekko.actor.AbstractActor; /** * Simple actor that does nothing, used for passing actorRefs to controllers that are disabled. diff --git a/app/assets/javascripts/start_app.ts b/app/assets/javascripts/start_app.ts index 2608c7cc0..82a6847a3 100644 --- a/app/assets/javascripts/start_app.ts +++ b/app/assets/javascripts/start_app.ts @@ -43,17 +43,23 @@ requirejs.config({ 'flotr2' : '../lib/flotr2/flotr2.amd', 'jquery' : '../lib/jquery/jquery.min', - 'jquery.ui' : '../lib/jquery-ui/jquery-ui.min', - 'jqrangeslider' : '../lib/jQRangeSlider/jQAllRangeSliders-withRuler-min', + 'jquery.ui' : '../lib/jquery-ui-dist/jquery-ui.min', + 'jqrangeslider' : '../lib/jqrangeslider/jQAllRangeSliders-withRuler-min', 'jwt_decode' : '../lib/github-com-auth0-jwt-decode/jwt-decode', - 'knockout' : '../lib/knockout/knockout', + // 'knockout' : '../lib/knockout/output/knockout-latest', + 'knockout' : '../lib/knockout/build/output/knockout-latest', + 'knockout-fast-foreach' : 'knockout-fast-foreach.min', 'text' : '../lib/requirejs-text/text', //Required by durandal - 'typeahead' : '../lib/typeaheadjs/typeahead.bundle', - 'underscore' : '../lib/underscorejs/underscore-min', //Required by flotr2 + 'typeahead' : '../lib/typeahead.js/typeahead.bundle.min', + // 'underscore' : '../lib/underscore/amd/underscore', //Required by flotr2 + 'underscore' : '../lib/underscore/underscore', //Required by flotr2 + '_setup': '../lib/underscore/amd/_setup', 'moment' : '../lib/moment/moment', - 'moment-timezone' : '../lib/moment-timezone/builds/moment-timezone-with-data', - 'datetimepicker' : '../lib/Eonasdan-bootstrap-datetimepicker/js/bootstrap-datetimepicker.min', + // 'moment-timezone' : '../lib/moment-timezones/moment-timezone-with-data.min', + 'moment-timezone' : '../lib/moment-timezone/builds/moment-timezone-with-data.min', + 'datetimepicker' : '../lib/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min', + // '@popperjs/core': '../lib/@popperjs/core/core' //Required by bootstrap }, map : { '*': { @@ -77,6 +83,9 @@ requirejs.config({ }, 'typeahead' : { deps : [ 'jquery'] + }, + 'datetimepicker' : { + deps: ['moment'] } } }); diff --git a/app/assets/vendored/lib/jqrangeslider/GPL-License.txt b/app/assets/vendored/lib/jqrangeslider/GPL-License.txt new file mode 100644 index 000000000..94a9ed024 --- /dev/null +++ b/app/assets/vendored/lib/jqrangeslider/GPL-License.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/app/assets/vendored/lib/jqrangeslider/History.md b/app/assets/vendored/lib/jqrangeslider/History.md new file mode 100644 index 000000000..cd0dfcc08 --- /dev/null +++ b/app/assets/vendored/lib/jqrangeslider/History.md @@ -0,0 +1,124 @@ +## jQRangeSlider +- 5.8.2: 2023-10-19 + - Fixed an issue with edit labels introduced by v5.8.0: reverting label merge +- 5.8.1: 2023-10-19 + - Fixed #238: Loosing labels/handles with JQuery 1.13.0 +- 5.8.0: 2019-08-14 + - Fixed #233: Differentiate left and right labels and merge if identical (author: @BistroStu) +- 5.7.2: 2016-01-18 + - Fixed #194: IE8: 'this.cache.click.left' is null or not an object + - Fixed #206: Negative wheelSpeed not accepted + - Fixed #202: Prevent destroyed slider from running its resize handler + - Fixed #199: Use svg instead of png to get better image quality +- 5.7.1: 2015-01-23 + - Fixed #174: Touch and jquery-ui 1.11.0 (not working) +- 5.7.0: 2014-03-18 + _ Enhancement #154: + _ Introduced a new option "symmetricPositionning" for a different way of positionning handles + _ Allowed minimum ranges to be 0 + _ Fixed #152: Calling resize on an hidden slider resets values + _ Fixed #146: Inverted labels in small ranges + _ Fixed #153 Edit range slider does not parse float number correctly +- 5.6.0: 2014-02-01 + _ Fixed #144: Inverted label order with small range + _ Fixed #146: Setting values via the `min`, `max`, or `values` methods produces an invalid slider +- 5.5.0: 2013-11-01 + _ Fixed #124: Scales and slider position don't line up + _ Fixed #141: userValuesChanged event not fired when user edits input value + _ Fixed #142: Labels don't show up the first time after a programmatically value change + _ Fixed #143: Changing formatter causes labels to disappear +- 5.4.0: 2013-09-16 + _ Fixed #128: Using the mouse wheel changes the values, even if slider is disabled + _ Fixed #130: Labels don't disappear when values changed in code + _ Fixed #133: Step in weeks breaks the slider + _ Fixed #123: Incorrect values after switching handles +- 5.3.0: 2013-07-12 \* Fixed #54: Add enabled option, enable/disable function to allow read-only sliders +- 5.2.0: 2013-06-28 + _ Fixed #108: Memory leaks when calling destroy + _ Styling improvement: setting correct height to the slider element. +- 5.1.1: 2013-03-17 + _ Fixed #100: Inconsistent parameter type passed to the next method of scales. + _ Fixed #102: valuesChanged event triggered even if values are identical + _ Fixed #103: CSS bug related to IE7 and scale ticks + _ Fixed #104: Resizing the window breaks label position \* Fixed #105: Tick appear outside of its container +- 5.1.0: 2013-03-23 \* Ticks formatting, with a new callback function: format +- 5.0.2: 2013-03-17 \* Fixed #93 (theming with scales): ticks and handle values desynchronized on the right +- 5.0.1: 2013-03-07 \* Fixed #90 dateRangeSlider displayed outside of the innerbar when setting the range +- 5.0: 2013-02-09 + _ Scales + _ New element in handles, can be used for styling. ui-range-slider-handle-inner +- 4.2.10: 2013-02-08 \* Fixed #79: Bar not correctly updated after window resizing, with auto margin on container +- 4.2.9: 2013-01-17 \* Technical release: modified manifest to appear in plugins.jquery.com +- 4.2.8: 2013-01-16 \* Fixed #73: Can't always set the slider values programatically +- 4.2.7: 2013-01-03 \* Fixed #71: Labels not hidden when scrolling with arrows +- 4.2.6: 2012-11-30 \* Fixed #59: NaN value in date slider +- 4.2.5: 2012-11-28 + _ Fixed #58: Date labels are shifted after parent resize, even after calling resize method + _ Fixed #35: Event drag (used internally) conflicts with other libraries. Renamed to sliderDrag. +- 4.2.4: 2012-11-19 + _ Fixed a bug in resize method, when displaying a slider in a previously hidden parent. + _ Bug in label positionning +- 4.2.3: 2012-11-16 + _ Fixed #52 and #53: Labels shown when valueLabels option set to "change" + _ Fixed #51: right label display bug in Chrome +- 4.2.2: 2012-11-08 + _ Fixed #46: Labels swap when they are very close + _ Fixed #45: Access to a property of a null object \* Fixed #49: UserValuesChanged event fired when changing values programmatically +- 4.2.1: 2012-10-04 + _ Fixed wheelmode setter in constructor + _ Documentation update +- 4.2: 2012-06-18 \* Draggable labels (Issue #28) +- 4.1.2: 2012-06-11 \* Fixed #29: range option in constructor is not working +- 4.1.1: 2012-06-07 \* Step option is not working in constructor +- 4.1: 2012-05-31 + _ New theme: iThing + _ Bug fixes on IE +- 4.0: 2012-05-26 + _ Massive rewrite of jQRangeSlider + _ Steps ! + _ Native support of touch devices (tested on iOS and Android) + _ Removed min/max values Changing/Changed events. Use valuesChanged or valuesChanging instead. \* Event log in demo +- 3.2: 2012-05-22 \* Bug #27, generate better input names for editSlider. Names are based on the element id. +- 3.1.1: 2012-05-07 eonlepapillon \* Fixed bug #22: Event 'userValuesChanged' is not triggered after zooming with wheelmouse +- 3.1: 2012-04-16 nouvak@gmail.com \* Added the new "userValuesChanged" event that is triggered only on the value changes that were initiated by the user ( e.g. by modifying the range with the mouse). +- 3.0.2: 2012-03-03 + _ EditSlider: set values on focus lost + _ editSlider unit tests +- 3.0.1: 2012-03-02 + - Errors in package construction +- 3.0: 2012-03-01 + - **New type of slider**: edit range slider! + - Packaging minified version of individual files +- 2.4: 2012-02-23 + _ Dual license GPL and MIT + _ Small refactoring, allowing to create a modifiable range slider +- 2.3: 2011-11-27 + _ Issue #14: limit the range with a minimum or maximum range length. + _ Added the range option + _ New public method for getting / setting bounds + _ use strict +- 2.2.1: 2011-11-15 \* Issue #12: impossible to drag the left handle to the max value +- 2.2: 2011-09-27 \* Issue #11: resize public method added +- 2.1.4: 2011-09-19 + - Issue #10: remove z-ordering +- 2.1.3: 2011-09-07 + - Issue #8 fix: Problem with minified version + - Script for creating minified package +- 2.1.2: 2011-06-02 \* Issue #6: CSS fix +- 2.1.1: 2011-05-20 + - Integrated Google Closure compiler and script for generating minified version of jQRangeSlider +- 2.1: 2011-03-28 + - Changed helpers name to labels (API change) + - Labels replaced inside the top level parent element +- 2.0.2: 2011-03-23 bugfix +- 2.0.1: 2011-03-17 bugfix +- 2.0: 2011-03-14 + _ Value helpers + _ New events: min/maxValueChanging and min/maxValueChanged + _ Bugfixes + _ Unit tests +- 1.1.1: 2011-03-04 bugfixes on public methods +- 1.1 : 2011-03-03 Added methods for setting and getting only one value +- 1.0.2: 2011-03-03 Set values fix +- 1.0.1: 2011-03-02 Fix for IE8 +- 1.0 : 2010-12-28 Initial release diff --git a/app/assets/vendored/lib/jqrangeslider/MIT-License.txt b/app/assets/vendored/lib/jqrangeslider/MIT-License.txt new file mode 100644 index 000000000..2223a68f0 --- /dev/null +++ b/app/assets/vendored/lib/jqrangeslider/MIT-License.txt @@ -0,0 +1,20 @@ +Copyright (c) 2012 Guillaume Gautreau + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/app/assets/vendored/lib/jqrangeslider/Readme.md b/app/assets/vendored/lib/jqrangeslider/Readme.md new file mode 100644 index 000000000..625c0521c --- /dev/null +++ b/app/assets/vendored/lib/jqrangeslider/Readme.md @@ -0,0 +1,38 @@ +jQRangeSlider, jQDateRangeSlider & jQEditRangeSlider [![Build Status](https://travis-ci.org/ghusse/jQRangeSlider.svg?branch=master)](https://travis-ci.org/ghusse/jQRangeSlider) +==================================================== +A javascript slider selector that supports dates and touch devices + +* [Home page](http://ghusse.github.io/jQRangeSlider/) +* [Documentation](http://ghusse.github.io/jQRangeSlider/documentation.html) +* [Github](https://github.io/ghusse/jQRangeSlider/) + +License +------- +Copyright : Guillaume Gautreau 2010 +License : Dual license GPL v3 and MIT + +Dependencies +------------ ++ jQuery ++ jQuery UI core ++ jQuery UI widget ++ jQuery UI mouse ++ jQuery Mousewheel plugin by Brandon Aaron (optional, needed for scrolling or zooming) + + +Generating minified jQRangeSlider files +--------------------------------------- + +You need nodejs and npm. Open a command line interface and run: + + npm install + npm install -g grunt-cli + +Now you can minify jQRangeSlider and build a zip package by running + + grunt + +You can launch jshint and unit tests too: + + grunt ci + diff --git a/app/assets/vendored/lib/jqrangeslider/css/classic-min.css b/app/assets/vendored/lib/jqrangeslider/css/classic-min.css new file mode 100644 index 000000000..2dd6e1856 --- /dev/null +++ b/app/assets/vendored/lib/jqrangeslider/css/classic-min.css @@ -0,0 +1 @@ +.ui-rangeSlider{height:22px}.ui-rangeSlider .ui-rangeSlider-innerBar{height:16px;margin:3px 6px;background:#DDD}.ui-rangeSlider .ui-rangeSlider-handle{width:6px;height:22px;background:#AAA;background:rgba(100,100,100,.3);cursor:col-resize}.ui-rangeSlider .ui-rangeSlider-bar{margin:1px 0;background:#CCC;background:rgba(100,100,150,.2);height:20px;cursor:move;cursor:grab;cursor:-moz-grab}.ui-rangeSlider .ui-rangeSlider-bar.ui-draggable-dragging{cursor:-moz-grabbing;cursor:grabbing}.ui-rangeSlider-arrow{height:16px;margin:2px 0;width:16px;background-repeat:no-repeat}.ui-rangeSlider-arrow.ui-rangeSlider-leftArrow{background-image:url(icons-classic/resultset_previous.png);background-position:center left}.ui-rangeSlider-arrow.ui-rangeSlider-rightArrow{background-image:url(icons-classic/resultset_next.png);background-position:center right}.ui-rangeSlider-arrow-inner{display:none}.ui-rangeSlider-container{height:22px}.ui-rangeSlider-withArrows .ui-rangeSlider-container{margin:0 11px}.ui-rangeSlider-noArrow .ui-rangeSlider-container{margin:0}.ui-rangeSlider-label{margin:0 2px 2px;background-image:url(icons-classic/label.png);background-position:bottom center;background-repeat:no-repeat;white-space:nowrap;bottom:20px;padding:3px 6px 7px;cursor:col-resize}.ui-rangeSlider-label-inner{display:none}input.ui-editRangeSlider-inputValue{width:3em;vertical-align:middle;text-align:center} \ No newline at end of file diff --git a/app/assets/vendored/lib/jqrangeslider/css/classic.css b/app/assets/vendored/lib/jqrangeslider/css/classic.css new file mode 100644 index 000000000..91f4e6878 --- /dev/null +++ b/app/assets/vendored/lib/jqrangeslider/css/classic.css @@ -0,0 +1,95 @@ +/** + * default development theme for jQRangeSlider + * Using fam fam icon set from Mark James, http://www.famfamfam.com/lab/icons/silk/ (Creative Commons Attribution 2.5 License) + */ + +.ui-rangeSlider{ + height:22px; +} + +.ui-rangeSlider .ui-rangeSlider-innerBar{ + height:16px; + margin:3px 6px; + background:#DDD; +} + +.ui-rangeSlider .ui-rangeSlider-handle{ + width:6px; + height:22px; + background:#AAA; + background:rgba(100,100,100, 0.3); + cursor:col-resize; +} + +.ui-rangeSlider .ui-rangeSlider-bar{ + margin: 1px 0; + background:#CCC; + background:rgba(100,100,150, 0.2); + height:20px; + cursor:move; + cursor:grab; + cursor: -moz-grab; +} + +.ui-rangeSlider .ui-rangeSlider-bar.ui-draggable-dragging{ + cursor: -moz-grabbing; + cursor:grabbing; +} + +.ui-rangeSlider-arrow{ + height:16px; + margin:2px 0; + width:16px; + background-repeat:no-repeat; +} + +.ui-rangeSlider-arrow.ui-rangeSlider-leftArrow{ + background-image: url('icons-classic/resultset_previous.png'); + background-position:center left; +} + +.ui-rangeSlider-arrow.ui-rangeSlider-rightArrow{ + background-image: url('icons-classic/resultset_next.png'); + background-position:center right; +} + +.ui-rangeSlider-arrow-inner{ + display: none; +} + +.ui-rangeSlider-container{ + height:22px; +} + +.ui-rangeSlider-withArrows .ui-rangeSlider-container{ + margin:0 11px; +} + +.ui-rangeSlider-noArrow .ui-rangeSlider-container{ + margin:0; +} + +.ui-rangeSlider-label{ + margin:0 2px 2px; + background-image:url('icons-classic/label.png'); + background-position:bottom center; + background-repeat:no-repeat; + white-space: nowrap; + bottom:20px; + padding:3px 6px 7px; + cursor:col-resize; +} + +.ui-rangeSlider-label-inner{ + display:none; +} + +/* + * Edit slider + */ + +input.ui-editRangeSlider-inputValue{ + width:3em; + vertical-align: middle; + text-align:center; +} diff --git a/app/assets/vendored/lib/jqrangeslider/css/iThing-min.css b/app/assets/vendored/lib/jqrangeslider/css/iThing-min.css new file mode 100644 index 000000000..a0d80b78d --- /dev/null +++ b/app/assets/vendored/lib/jqrangeslider/css/iThing-min.css @@ -0,0 +1 @@ +.ui-rangeSlider{height:30px;padding-top:40px}.ui-rangeSlider,.ui-rangeSlider-arrow,.ui-rangeSlider-container{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.ui-rangeSlider-withArrows .ui-rangeSlider-container{margin:0 15px}.ui-rangeSlider-arrow,.ui-rangeSlider-noArrow .ui-rangeSlider-container,.ui-rangeSlider-withArrows .ui-rangeSlider-container{-webkit-box-shadow:inset 0 4px 6px -2px RGBA(0,0,0,.5);-moz-box-shadow:inset 0 4px 6px -2px RGBA(0,0,0,.5);box-shadow:inset 0 4px 6px -2px RGBA(0,0,0,.5)}.ui-rangeSlider-disabled .ui-rangeSlider-arrow,.ui-rangeSlider-disabled.ui-rangeSlider-noArrow .ui-rangeSlider-container,.ui-rangeSlider-disabled.ui-rangeSlider-withArrows .ui-rangeSlider-container{-webkit-box-shadow:inset 0 4px 6px -2px RGBA(0,0,0,.3);-moz-box-shadow:inset 0 4px 6px -2px RGBA(0,0,0,.3);box-shadow:inset 0 4px 6px -2px RGBA(0,0,0,.3)}.ui-rangeSlider-noArrow .ui-rangeSlider-container{-moz-border-radius:4px;border-radius:4px;border-left:solid 1px #515862;border-right:solid 1px #515862}.ui-rangeSlider-disabled.ui-rangeSlider-noArrow .ui-rangeSlider-container{border-color:#8490a3}.ui-rangeSlider-arrow,.ui-rangeSlider-container{height:30px;border-top:solid 1px #232a32;border-bottom:solid 1px #6a7179}.ui-rangeSlider-disabled .ui-rangeSlider-arrow,.ui-rangeSlider-disabled .ui-rangeSlider-container{border-top-color:#49576b;border-bottom-color:#9ca7b3}.ui-rangeSlider-arrow,.ui-rangeSlider-container,.ui-rangeSlider-label{background:#67707F;background:-moz-linear-gradient(top,#67707F 0,#888DA0 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#67707F),color-stop(100%,#888DA0))}.ui-rangeSlider-disabled .ui-rangeSlider-arrow,.ui-rangeSlider-disabled .ui-rangeSlider-container,.ui-rangeSlider-disabled .ui-rangeSlider-label{background:#95a4bd;background:-moz-linear-gradient(top,#95a4bd 0,#b2bbd8 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#95a4bd),color-stop(100%,#b2bbd8))}.ui-rangeSlider-arrow{width:14px;cursor:pointer}.ui-rangeSlider-leftArrow{border-radius:4px 0 0 4px;border-left:solid 1px #515862}.ui-rangeSlider-disabled .ui-rangeSlider-leftArrow{border-left-color:#8792a2}.ui-rangeSlider-rightArrow{border-radius:0 4px 4px 0;border-right:solid 1px #515862}.ui-rangeSlider-disabled .ui-rangeSlider-rightArrow{border-right-color:#8792a2}.ui-rangeSlider-arrow-inner{position:absolute;top:50%;border:10px solid transparent;width:0;height:0;margin-top:-10px}.ui-rangeSlider-leftArrow .ui-rangeSlider-arrow-inner{border-right:10px solid #a4a8b7;left:0;margin-left:-8px}.ui-rangeSlider-leftArrow:hover .ui-rangeSlider-arrow-inner{border-right:10px solid #b3b6c2}.ui-rangeSlider-disabled .ui-rangeSlider-leftArrow .ui-rangeSlider-arrow-inner,.ui-rangeSlider-disabled .ui-rangeSlider-leftArrow:hover .ui-rangeSlider-arrow-inner{border-right-color:#bbc0cf}.ui-rangeSlider-rightArrow .ui-rangeSlider-arrow-inner{border-left:10px solid #a4a8b7;right:0;margin-right:-8px}.ui-rangeSlider-rightArrow:hover .ui-rangeSlider-arrow-inner{border-left:10px solid #b3b6c2}.ui-rangeSlider-disabled .ui-rangeSlider-rightArrow .ui-rangeSlider-arrow-inner,.ui-rangeSlider-disabled .ui-rangeSlider-rightArrow:hover .ui-rangeSlider-arrow-inner{border-left-color:#bbc0cf}.ui-rangeSlider-innerBar{width:110%;height:100%;left:-10px;overflow:hidden}.ui-rangeSlider-bar{background:#68a1d6;height:29px;margin:1px 0;-moz-border-radius:4px;border-radius:4px;cursor:move;cursor:grab;cursor:-moz-grab;-webkit-box-shadow:inset 0 2px 6px RGBA(0,0,0,.5);-moz-box-shadow:inset 0 2px 6px RGBA(0,0,0,.5);box-shadow:inset 0 2px 6px RGBA(0,0,0,.5)}.ui-rangeSlider-disabled .ui-rangeSlider-bar{background:#93aeca;-webkit-box-shadow:inset 0 2px 6px RGBA(0,0,0,.3);-moz-box-shadow:inset 0 2px 6px RGBA(0,0,0,.3);box-shadow:inset 0 2px 6px RGBA(0,0,0,.3)}.ui-rangeSlider-handle{width:10px;height:30px;background:0 0;cursor:col-resize}.ui-rangeSlider-label{padding:5px 10px;bottom:40px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 0 #c2c5d6;-moz-box-shadow:0 1px 0 #c2c5d6;box-shadow:0 1px 0 #c2c5d6;color:#fff;font-size:15px;cursor:col-resize}.ui-rangeSlider-label-inner{position:absolute;top:100%;left:50%;display:block;z-index:99;border-left:10px solid transparent;border-right:10px solid transparent;margin-left:-10px;border-top:10px solid #888DA0}.ui-rangeSlider-disabled .ui-rangeSlider-label-inner{border-top-color:#b2bbd8}.ui-editRangeSlider-inputValue{width:2em;text-align:center;font-size:15px}.ui-rangeSlider .ui-ruler-scale{position:absolute;top:0;left:0;bottom:0;right:0}.ui-rangeSlider .ui-ruler-tick{float:left}.ui-rangeSlider .ui-ruler-scale0 .ui-ruler-tick-inner{color:#fff;margin-top:1px;border-left:1px solid #fff;height:29px;padding-left:2px;position:relative}.ui-rangeSlider .ui-ruler-scale0 .ui-ruler-tick-label{position:absolute;bottom:6px}.ui-rangeSlider .ui-ruler-scale1 .ui-ruler-tick-inner{border-left:1px solid #fff;margin-top:25px;height:5px} \ No newline at end of file diff --git a/app/assets/vendored/lib/jqrangeslider/css/iThing.css b/app/assets/vendored/lib/jqrangeslider/css/iThing.css new file mode 100644 index 000000000..dc823cc2c --- /dev/null +++ b/app/assets/vendored/lib/jqrangeslider/css/iThing.css @@ -0,0 +1,251 @@ +/** + * Theme for jQRangeSlider + * Inspired by http://cssdeck.com/item/381/itunes-10-storage-bar + * and http://cssdeck.com/item/276/pure-css-arrow-with-border-tooltip + */ + +.ui-rangeSlider{ + height: 30px; + padding-top: 40px; +} + +.ui-rangeSlider, +.ui-rangeSlider-container, +.ui-rangeSlider-arrow{ + -webkit-box-sizing:content-box; + -moz-box-sizing:content-box; + box-sizing:content-box; +} + +.ui-rangeSlider-withArrows .ui-rangeSlider-container{ + margin: 0 15px; +} + +.ui-rangeSlider-withArrows .ui-rangeSlider-container, +.ui-rangeSlider-noArrow .ui-rangeSlider-container, +.ui-rangeSlider-arrow{ + -webkit-box-shadow: inset 0px 4px 6px -2px RGBA(0,0,0,0.5); + -moz-box-shadow: inset 0px 4px 6px -2px RGBA(0,0,0,0.5); + box-shadow: inset 0px 4px 6px -2px RGBA(0,0,0,0.5); +} + +.ui-rangeSlider-disabled.ui-rangeSlider-withArrows .ui-rangeSlider-container, +.ui-rangeSlider-disabled.ui-rangeSlider-noArrow .ui-rangeSlider-container, +.ui-rangeSlider-disabled .ui-rangeSlider-arrow{ + -webkit-box-shadow: inset 0px 4px 6px -2px RGBA(0,0,0,0.3); + -moz-box-shadow: inset 0px 4px 6px -2px RGBA(0,0,0,0.3); + box-shadow: inset 0px 4px 6px -2px RGBA(0,0,0,0.3); +} + +.ui-rangeSlider-noArrow .ui-rangeSlider-container{ + -moz-border-radius: 4px; + border-radius: 4px; + border-left: solid 1px #515862; + border-right: solid 1px #515862; +} + +.ui-rangeSlider-disabled.ui-rangeSlider-noArrow .ui-rangeSlider-container{ + border-color: #8490a3; +} + +.ui-rangeSlider-container, +.ui-rangeSlider-arrow{ + height: 30px; + + border-top: solid 1px #232a32; + border-bottom: solid 1px #6a7179; +} + +.ui-rangeSlider-disabled .ui-rangeSlider-container, +.ui-rangeSlider-disabled .ui-rangeSlider-arrow{ + border-top-color: #49576b; + border-bottom-color: #9ca7b3; +} + +.ui-rangeSlider-container, +.ui-rangeSlider-arrow, +.ui-rangeSlider-label{ + background: #67707F; + background: -moz-linear-gradient(top, #67707F 0%, #888DA0 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#67707F), color-stop(100%,#888DA0)); +} + +.ui-rangeSlider-disabled .ui-rangeSlider-container, +.ui-rangeSlider-disabled .ui-rangeSlider-arrow, +.ui-rangeSlider-disabled .ui-rangeSlider-label{ + background: #95a4bd; + background: -moz-linear-gradient(top, #95a4bd 0%, #b2bbd8 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#95a4bd), color-stop(100%,#b2bbd8)); +} + +.ui-rangeSlider-arrow{ + width:14px; + cursor:pointer; +} + +.ui-rangeSlider-leftArrow{ + border-radius:4px 0 0 4px; + border-left: solid 1px #515862; +} + +.ui-rangeSlider-disabled .ui-rangeSlider-leftArrow{ + border-left-color: #8792a2; +} + +.ui-rangeSlider-rightArrow{ + border-radius:0 4px 4px 0; + border-right: solid 1px #515862; +} + +.ui-rangeSlider-disabled .ui-rangeSlider-rightArrow{ + border-right-color: #8792a2; +} + +.ui-rangeSlider-arrow-inner{ + position: absolute; + top: 50%; + border: 10px solid transparent; + width:0; + height:0; + + margin-top: -10px; +} + +.ui-rangeSlider-leftArrow .ui-rangeSlider-arrow-inner{ + border-right:10px solid #a4a8b7; + left: 0; + margin-left: -8px; +} + +.ui-rangeSlider-leftArrow:hover .ui-rangeSlider-arrow-inner{ + border-right:10px solid #b3b6c2; +} + +.ui-rangeSlider-disabled .ui-rangeSlider-leftArrow .ui-rangeSlider-arrow-inner, +.ui-rangeSlider-disabled .ui-rangeSlider-leftArrow:hover .ui-rangeSlider-arrow-inner{ + border-right-color: #bbc0cf; +} + +.ui-rangeSlider-rightArrow .ui-rangeSlider-arrow-inner{ + border-left:10px solid #a4a8b7; + right: 0; + margin-right: -8px; +} + +.ui-rangeSlider-rightArrow:hover .ui-rangeSlider-arrow-inner{ + border-left:10px solid #b3b6c2; +} + +.ui-rangeSlider-disabled .ui-rangeSlider-rightArrow .ui-rangeSlider-arrow-inner, +.ui-rangeSlider-disabled .ui-rangeSlider-rightArrow:hover .ui-rangeSlider-arrow-inner{ + border-left-color: #bbc0cf; +} + +.ui-rangeSlider-innerBar{ + width: 110%; + height: 100%; + left: -10px; + overflow: hidden; +} + +.ui-rangeSlider-bar{ + background: #68a1d6; + height: 29px; + margin:1px 0; + -moz-border-radius: 4px; + border-radius: 4px; + cursor:move; + cursor:grab; + cursor: -moz-grab; + + -webkit-box-shadow: inset 0 2px 6px RGBA(0,0,0,0.5); + -moz-box-shadow: inset 0 2px 6px RGBA(0,0,0,0.5); + box-shadow: inset 0 2px 6px RGBA(0,0,0,0.5); +} + +.ui-rangeSlider-disabled .ui-rangeSlider-bar{ + background: #93aeca; + + -webkit-box-shadow: inset 0 2px 6px RGBA(0,0,0,0.3); + -moz-box-shadow: inset 0 2px 6px RGBA(0,0,0,0.3); + box-shadow: inset 0 2px 6px RGBA(0,0,0,0.3); +} + +.ui-rangeSlider-handle{ + width:10px; + height:30px; + background: transparent; + cursor:col-resize; +} + +.ui-rangeSlider-label{ + padding: 5px 10px; + bottom:40px; + + -moz-border-radius: 4px; + border-radius: 4px; + + -webkit-box-shadow: 0px 1px 0px #c2c5d6; + -moz-box-shadow: 0px 1px 0px #c2c5d6; + box-shadow: 0px 1px 0px #c2c5d6; + + color:white; + font-size:15px; + + cursor:col-resize; +} + +.ui-rangeSlider-label-inner{ + position: absolute; + top: 100%; + left: 50%; + display: block; + z-index:99; + border-left: 10px solid transparent; + border-right: 10px solid transparent; + + margin-left: -10px; + border-top: 10px solid #888DA0; +} + +.ui-rangeSlider-disabled .ui-rangeSlider-label-inner{ + border-top-color: #b2bbd8; +} + +.ui-editRangeSlider-inputValue{ + width:2em; + text-align:center; + font-size:15px; +} + +.ui-rangeSlider .ui-ruler-scale{ + position:absolute; + top:0; + left:0; + bottom:0; + right:0; +} + +.ui-rangeSlider .ui-ruler-tick { + float: left; +} + +.ui-rangeSlider .ui-ruler-scale0 .ui-ruler-tick-inner{ + color:white; + margin-top:1px; + border-left: 1px solid white; + height:29px; + padding-left:2px; + position:relative; +} + +.ui-rangeSlider .ui-ruler-scale0 .ui-ruler-tick-label{ + position:absolute; + bottom: 6px; +} + +.ui-rangeSlider .ui-ruler-scale1 .ui-ruler-tick-inner{ + border-left:1px solid white; + margin-top: 25px; + height: 5px; +} \ No newline at end of file diff --git a/app/assets/vendored/lib/jqrangeslider/css/icons-classic/label.png b/app/assets/vendored/lib/jqrangeslider/css/icons-classic/label.png new file mode 100644 index 000000000..faa370def Binary files /dev/null and b/app/assets/vendored/lib/jqrangeslider/css/icons-classic/label.png differ diff --git a/app/assets/vendored/lib/jqrangeslider/css/icons-classic/resultset_next.png b/app/assets/vendored/lib/jqrangeslider/css/icons-classic/resultset_next.png new file mode 100644 index 000000000..ce9e413e5 Binary files /dev/null and b/app/assets/vendored/lib/jqrangeslider/css/icons-classic/resultset_next.png differ diff --git a/app/assets/vendored/lib/jqrangeslider/css/icons-classic/resultset_previous.png b/app/assets/vendored/lib/jqrangeslider/css/icons-classic/resultset_previous.png new file mode 100644 index 000000000..7c4812ab0 Binary files /dev/null and b/app/assets/vendored/lib/jqrangeslider/css/icons-classic/resultset_previous.png differ diff --git a/app/assets/vendored/lib/jqrangeslider/jQAllRangeSliders-min.js b/app/assets/vendored/lib/jqrangeslider/jQAllRangeSliders-min.js new file mode 100644 index 000000000..edcaeef88 --- /dev/null +++ b/app/assets/vendored/lib/jqrangeslider/jQAllRangeSliders-min.js @@ -0,0 +1,2 @@ +/*! jQRangeSlider 5.8.2 - 2023-10-19 - Copyright (C) Guillaume Gautreau 2012 - MIT and GPLv3 licenses.*/!function(a,b){"use strict";a.widget("ui.rangeSliderMouseTouch",a.ui.mouse,{enabled:!0,_mouseInit:function(){var a=this;this._super(),this._mouseDownEvent=!1,this.element.bind("touchstart."+this.widgetName,function(b){return a._touchStart(b)})},_mouseDestroy:function(){a(document).unbind("touchmove."+this.widgetName,this._touchMoveDelegate).unbind("touchend."+this.widgetName,this._touchEndDelegate),this._super()},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},destroy:function(){this._mouseDestroy(),this._super(),this._mouseInit=null},_touchStart:function(b){if(!this.enabled)return!1;b.which=1,b.preventDefault(),this._fillTouchEvent(b);var c=this,d=this._mouseDownEvent;this._mouseDown(b),d!==this._mouseDownEvent&&(this._touchEndDelegate=function(a){c._touchEnd(a)},this._touchMoveDelegate=function(a){c._touchMove(a)},a(document).bind("touchmove."+this.widgetName,this._touchMoveDelegate).bind("touchend."+this.widgetName,this._touchEndDelegate))},_mouseDown:function(a){return this.enabled?this._super(a):!1},_touchEnd:function(b){this._fillTouchEvent(b),this._mouseUp(b),a(document).unbind("touchmove."+this.widgetName,this._touchMoveDelegate).unbind("touchend."+this.widgetName,this._touchEndDelegate),this._mouseDownEvent=!1,a(document).trigger("mouseup")},_touchMove:function(a){return a.preventDefault(),this._fillTouchEvent(a),this._mouseMove(a)},_fillTouchEvent:function(a){var b;b="undefined"==typeof a.targetTouches&&"undefined"==typeof a.changedTouches?a.originalEvent.targetTouches[0]||a.originalEvent.changedTouches[0]:a.targetTouches[0]||a.changedTouches[0],a.pageX=b.pageX,a.pageY=b.pageY,a.which=1}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSliderDraggable",a.ui.rangeSliderMouseTouch,{cache:null,options:{containment:null},_create:function(){this._super(),setTimeout(a.proxy(this._initElementIfNotDestroyed,this),10)},destroy:function(){this.cache=null,this._super()},_initElementIfNotDestroyed:function(){this._mouseInit&&this._initElement()},_initElement:function(){this._mouseInit(),this._cache()},_setOption:function(b,c){"containment"===b&&(null===c||0===a(c).length?this.options.containment=null:this.options.containment=a(c))},_mouseStart:function(a){return this._cache(),this.cache.click={left:a.pageX,top:a.pageY},this.cache.initialOffset=this.element.offset(),this._triggerMouseEvent("mousestart"),!0},_mouseDrag:function(a){var b=a.pageX-this.cache.click.left;return b=this._constraintPosition(b+this.cache.initialOffset.left),this._applyPosition(b),this._triggerMouseEvent("sliderDrag"),!1},_mouseStop:function(){this._triggerMouseEvent("stop")},_constraintPosition:function(a){return 0!==this.element.parent().length&&null!==this.cache.parent.offset&&(a=Math.min(a,this.cache.parent.offset.left+this.cache.parent.width-this.cache.width.outer),a=Math.max(a,this.cache.parent.offset.left)),a},_applyPosition:function(a){this._cacheIfNecessary();var b={top:this.cache.offset.top,left:a};this.element.offset({left:a}),this.cache.offset=b},_cacheIfNecessary:function(){null===this.cache&&this._cache()},_cache:function(){this.cache={},this._cacheMargins(),this._cacheParent(),this._cacheDimensions(),this.cache.offset=this.element.offset()},_cacheMargins:function(){this.cache.margin={left:this._parsePixels(this.element,"marginLeft"),right:this._parsePixels(this.element,"marginRight"),top:this._parsePixels(this.element,"marginTop"),bottom:this._parsePixels(this.element,"marginBottom")}},_cacheParent:function(){if(null!==this.options.parent){var a=this.element.parent();this.cache.parent={offset:a.offset(),width:a.width()}}else this.cache.parent=null},_cacheDimensions:function(){this.cache.width={outer:this.element.outerWidth(),inner:this.element.width()}},_parsePixels:function(a,b){return parseInt(a.css(b),10)||0},_triggerMouseEvent:function(a){var b=this._prepareEventData();this.element.trigger(a,b)},_prepareEventData:function(){return{element:this.element,offset:this.cache.offset||null}}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSlider",{options:{bounds:{min:0,max:100},defaultValues:{min:20,max:50},wheelMode:null,wheelSpeed:4,arrows:!0,valueLabels:"show",formatter:null,durationIn:0,durationOut:400,delayOut:200,range:{min:!1,max:!1},step:!1,scales:!1,enabled:!0,symmetricPositionning:!1},_values:null,_valuesChanged:!1,_initialized:!1,bar:null,leftHandle:null,rightHandle:null,innerBar:null,container:null,arrows:null,labels:null,changing:{min:!1,max:!1},changed:{min:!1,max:!1},ruler:null,_create:function(){this._super(),this._setDefaultValues(),this.labels={left:null,right:null,leftDisplayed:!0,rightDisplayed:!0},this.arrows={left:null,right:null},this.changing={min:!1,max:!1},this.changed={min:!1,max:!1},this._createElements(),this._bindResize(),setTimeout(a.proxy(this.resize,this),1),setTimeout(a.proxy(this._initValues,this),1)},_setDefaultValues:function(){this._values={min:this.options.defaultValues.min,max:this.options.defaultValues.max}},_bindResize:function(){var b=this;this._resizeProxy=function(a){b.resize(a)},a(window).resize(this._resizeProxy)},_initWidth:function(){this.container.css("width",this.element.width()-this.container.outerWidth(!0)+this.container.width()),this.innerBar.css("width",this.container.width()-this.innerBar.outerWidth(!0)+this.innerBar.width())},_initValues:function(){this._initialized=!0,this.values(this._values.min,this._values.max)},_setOption:function(a,b){this._setWheelOption(a,b),this._setArrowsOption(a,b),this._setLabelsOption(a,b),this._setLabelsDurations(a,b),this._setFormatterOption(a,b),this._setBoundsOption(a,b),this._setRangeOption(a,b),this._setStepOption(a,b),this._setScalesOption(a,b),this._setEnabledOption(a,b),this._setPositionningOption(a,b)},_validProperty:function(a,b,c){return null===a||"undefined"==typeof a[b]?c:a[b]},_setStepOption:function(a,b){"step"===a&&(this.options.step=b,this._leftHandle("option","step",b),this._rightHandle("option","step",b),this._changed(!0))},_setScalesOption:function(a,b){"scales"===a&&(b===!1||null===b?(this.options.scales=!1,this._destroyRuler()):b instanceof Array&&(this.options.scales=b,this._updateRuler()))},_setRangeOption:function(a,b){"range"===a&&(this._bar("option","range",b),this.options.range=this._bar("option","range"),this._changed(!0))},_setBoundsOption:function(a,b){"bounds"===a&&"undefined"!=typeof b.min&&"undefined"!=typeof b.max&&this.bounds(b.min,b.max)},_setWheelOption:function(a,b){("wheelMode"===a||"wheelSpeed"===a)&&(this._bar("option",a,b),this.options[a]=this._bar("option",a))},_setLabelsOption:function(a,b){if("valueLabels"===a){if("hide"!==b&&"show"!==b&&"change"!==b)return;this.options.valueLabels=b,"hide"!==b?(this._createLabels(),this._leftLabel("update"),this._rightLabel("update")):this._destroyLabels()}},_setFormatterOption:function(a,b){"formatter"===a&&null!==b&&"function"==typeof b&&"hide"!==this.options.valueLabels&&(this._leftLabel("option","formatter",b),this.options.formatter=this._rightLabel("option","formatter",b))},_setArrowsOption:function(a,b){"arrows"!==a||b!==!0&&b!==!1||b===this.options.arrows||(b===!0?(this.element.removeClass("ui-rangeSlider-noArrow").addClass("ui-rangeSlider-withArrows"),this.arrows.left.css("display","block"),this.arrows.right.css("display","block"),this.options.arrows=!0):b===!1&&(this.element.addClass("ui-rangeSlider-noArrow").removeClass("ui-rangeSlider-withArrows"),this.arrows.left.css("display","none"),this.arrows.right.css("display","none"),this.options.arrows=!1),this._initWidth())},_setLabelsDurations:function(a,b){if("durationIn"===a||"durationOut"===a||"delayOut"===a){if(parseInt(b,10)!==b)return;null!==this.labels.left&&this._leftLabel("option",a,b),null!==this.labels.right&&this._rightLabel("option",a,b),this.options[a]=b}},_setEnabledOption:function(a,b){"enabled"===a&&this.toggle(b)},_setPositionningOption:function(a,b){"symmetricPositionning"===a&&(this._rightHandle("option",a,b),this.options[a]=this._leftHandle("option",a,b))},_createElements:function(){"absolute"!==this.element.css("position")&&this.element.css("position","relative"),this.element.addClass("ui-rangeSlider"),this.container=a("
").css("position","absolute").appendTo(this.element),this.innerBar=a("
").css("position","absolute").css("top",0).css("left",0),this._createHandles(),this._createBar(),this.container.prepend(this.innerBar),this._createArrows(),"hide"!==this.options.valueLabels?this._createLabels():this._destroyLabels(),this._updateRuler(),this.options.enabled||this._toggle(this.options.enabled)},_createHandle:function(b){return a("
")[this._handleType()](b).bind("sliderDrag",a.proxy(this._changing,this)).bind("stop",a.proxy(this._changed,this))},_createHandles:function(){this.leftHandle=this._createHandle({isLeft:!0,bounds:this.options.bounds,value:this._values.min,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container),this.rightHandle=this._createHandle({isLeft:!1,bounds:this.options.bounds,value:this._values.max,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container)},_createBar:function(){this.bar=a("
").prependTo(this.container).bind("sliderDrag scroll zoom",a.proxy(this._changing,this)).bind("stop",a.proxy(this._changed,this)),this._bar({leftHandle:this.leftHandle,rightHandle:this.rightHandle,values:{min:this._values.min,max:this._values.max},type:this._handleType(),range:this.options.range,wheelMode:this.options.wheelMode,wheelSpeed:this.options.wheelSpeed}),this.options.range=this._bar("option","range"),this.options.wheelMode=this._bar("option","wheelMode"),this.options.wheelSpeed=this._bar("option","wheelSpeed")},_createArrows:function(){this.arrows.left=this._createArrow("left"),this.arrows.right=this._createArrow("right"),this.options.arrows?this.element.addClass("ui-rangeSlider-withArrows"):(this.arrows.left.css("display","none"),this.arrows.right.css("display","none"),this.element.addClass("ui-rangeSlider-noArrow"))},_createArrow:function(b){var c,d=a("
").append("
").addClass("ui-rangeSlider-"+b+"Arrow").css("position","absolute").css(b,0).appendTo(this.element);return c="right"===b?a.proxy(this._scrollRightClick,this):a.proxy(this._scrollLeftClick,this),d.bind("mousedown touchstart",c),d},_proxy:function(a,b,c){var d=Array.prototype.slice.call(c);return a&&a[b]?a[b].apply(a,d):null},_handleType:function(){return"rangeSliderHandle"},_barType:function(){return"rangeSliderBar"},_bar:function(){return this._proxy(this.bar,this._barType(),arguments)},_labelType:function(){return"rangeSliderLabel"},_leftLabel:function(){return this._proxy(this.labels.left,this._labelType(),arguments)},_rightLabel:function(){return this._proxy(this.labels.right,this._labelType(),arguments)},_leftHandle:function(){return this._proxy(this.leftHandle,this._handleType(),arguments)},_rightHandle:function(){return this._proxy(this.rightHandle,this._handleType(),arguments)},_getValue:function(a,b){return b===this.rightHandle&&(a-=b.outerWidth()),a*(this.options.bounds.max-this.options.bounds.min)/(this.container.innerWidth()-b.outerWidth(!0))+this.options.bounds.min},_trigger:function(a){var b=this;setTimeout(function(){b.element.trigger(a,{label:b.element,values:b.values()})},1)},_changing:function(){this._updateValues()&&(this._trigger("valuesChanging"),this._valuesChanged=!0)},_deactivateLabels:function(){"change"===this.options.valueLabels&&(this._leftLabel("option","show","hide"),this._rightLabel("option","show","hide"))},_reactivateLabels:function(){"change"===this.options.valueLabels&&(this._leftLabel("option","show","change"),this._rightLabel("option","show","change"))},_changed:function(a){a===!0&&this._deactivateLabels(),(this._updateValues()||this._valuesChanged)&&(this._trigger("valuesChanged"),a!==!0&&this._trigger("userValuesChanged"),this._valuesChanged=!1),a===!0&&this._reactivateLabels()},_updateValues:function(){var a=this._leftHandle("value"),b=this._rightHandle("value"),c=this._min(a,b),d=this._max(a,b),e=c!==this._values.min||d!==this._values.max;return this._values.min=this._min(a,b),this._values.max=this._max(a,b),e},_min:function(a,b){return Math.min(a,b)},_max:function(a,b){return Math.max(a,b)},_createLabel:function(b,c){var d;return null===b?(d=this._getLabelConstructorParameters(b,c),b=a("
").appendTo(this.element)[this._labelType()](d)):(d=this._getLabelRefreshParameters(b,c),b[this._labelType()](d)),b},_getLabelConstructorParameters:function(a,b){return{handle:b,handleType:this._handleType(),formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getLabelRefreshParameters:function(){return{formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getFormatter:function(){return this.options.formatter===!1||null===this.options.formatter?this._defaultFormatter.bind(this):this.options.formatter},_defaultFormatter:function(a){return Math.round(a)},_destroyLabel:function(a){return null!==a&&(a[this._labelType()]("destroy"),a.remove(),a=null),a},_createLabels:function(){this.labels.left=this._createLabel(this.labels.left,this.leftHandle),this.labels.right=this._createLabel(this.labels.right,this.rightHandle),this._leftLabel("pair",this.labels.right)},_destroyLabels:function(){this.labels.left=this._destroyLabel(this.labels.left),this.labels.right=this._destroyLabel(this.labels.right)},_stepRatio:function(){return this._leftHandle("stepRatio")},_scrollRightClick:function(a){return this.options.enabled?(a.preventDefault(),this._bar("startScroll"),this._bindStopScroll(),void this._continueScrolling("scrollRight",4*this._stepRatio(),1)):!1},_continueScrolling:function(a,b,c,d){if(!this.options.enabled)return!1;this._bar(a,c),d=d||5,d--;var e=this,f=16,g=Math.max(1,4/this._stepRatio());this._scrollTimeout=setTimeout(function(){0===d&&(b>f?b=Math.max(f,b/1.5):c=Math.min(g,2*c),d=5),e._continueScrolling(a,b,c,d)},b)},_scrollLeftClick:function(a){return this.options.enabled?(a.preventDefault(),this._bar("startScroll"),this._bindStopScroll(),void this._continueScrolling("scrollLeft",4*this._stepRatio(),1)):!1},_bindStopScroll:function(){var b=this;this._stopScrollHandle=function(a){a.preventDefault(),b._stopScroll()},a(document).bind("mouseup touchend",this._stopScrollHandle)},_stopScroll:function(){a(document).unbind("mouseup touchend",this._stopScrollHandle),this._stopScrollHandle=null,this._bar("stopScroll"),clearTimeout(this._scrollTimeout)},_createRuler:function(){this.ruler=a("
").appendTo(this.innerBar)},_setRulerParameters:function(){this.ruler.ruler({min:this.options.bounds.min,max:this.options.bounds.max,scales:this.options.scales})},_destroyRuler:function(){null!==this.ruler&&a.fn.ruler&&(this.ruler.ruler("destroy"),this.ruler.remove(),this.ruler=null)},_updateRuler:function(){this._destroyRuler(),this.options.scales!==!1&&a.fn.ruler&&(this._createRuler(),this._setRulerParameters())},values:function(a,b){var c;if("undefined"!=typeof a&&"undefined"!=typeof b){if(!this._initialized)return this._values.min=a,this._values.max=b,this._values;this._deactivateLabels(),c=this._bar("values",a,b),this._changed(!0),this._reactivateLabels()}else c=this._bar("values",a,b);return c},min:function(a){return this._values.min=this.values(a,this._values.max).min,this._values.min},max:function(a){return this._values.max=this.values(this._values.min,a).max,this._values.max},bounds:function(a,b){return this._isValidValue(a)&&this._isValidValue(b)&&b>a&&(this._setBounds(a,b),this._updateRuler(),this._changed(!0)),this.options.bounds},_isValidValue:function(a){return"undefined"!=typeof a&&parseFloat(a)===a},_setBounds:function(a,b){this.options.bounds={min:a,max:b},this._leftHandle("option","bounds",this.options.bounds),this._rightHandle("option","bounds",this.options.bounds),this._bar("option","bounds",this.options.bounds)},zoomIn:function(a){this._bar("zoomIn",a)},zoomOut:function(a){this._bar("zoomOut",a)},scrollLeft:function(a){this._bar("startScroll"),this._bar("scrollLeft",a),this._bar("stopScroll")},scrollRight:function(a){this._bar("startScroll"),this._bar("scrollRight",a),this._bar("stopScroll")},resize:function(){this.container&&(this._initWidth(),this._leftHandle("update"),this._rightHandle("update"),this._bar("update"))},enable:function(){this.toggle(!0)},disable:function(){this.toggle(!1)},toggle:function(a){a===b&&(a=!this.options.enabled),this.options.enabled!==a&&this._toggle(a)},_toggle:function(a){this.options.enabled=a,this.element.toggleClass("ui-rangeSlider-disabled",!a);var b=a?"enable":"disable";this._bar(b),this._leftHandle(b),this._rightHandle(b),this._leftLabel(b),this._rightLabel(b)},destroy:function(){this.element.removeClass("ui-rangeSlider-withArrows ui-rangeSlider-noArrow ui-rangeSlider-disabled"),this._destroyWidgets(),this._destroyElements(),this.element.removeClass("ui-rangeSlider"),this.options=null,a(window).unbind("resize",this._resizeProxy),this._resizeProxy=null,this._bindResize=null,this._super()},_destroyWidget:function(a){this["_"+a]("destroy"),this[a].remove(),this[a]=null},_destroyWidgets:function(){this._destroyWidget("bar"),this._destroyWidget("leftHandle"),this._destroyWidget("rightHandle"),this._destroyRuler(),this._destroyLabels()},_destroyElements:function(){this.container.remove(),this.container=null,this.innerBar.remove(),this.innerBar=null,this.arrows.left.remove(),this.arrows.right.remove(),this.arrows=null}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSliderHandle",a.ui.rangeSliderDraggable,{currentMove:null,margin:0,parentElement:null,options:{isLeft:!0,bounds:{min:0,max:100},range:!1,value:0,step:!1},_value:0,_left:0,_create:function(){this._super(),this.element.css("position","absolute").css("top",0).addClass("ui-rangeSlider-handle").toggleClass("ui-rangeSlider-leftHandle",this.options.isLeft).toggleClass("ui-rangeSlider-rightHandle",!this.options.isLeft),this.element.append("
"),this._value=this._constraintValue(this.options.value)},destroy:function(){this.element.empty(),this._super()},_setOption:function(a,b){"isLeft"!==a||b!==!0&&b!==!1||b===this.options.isLeft?"step"===a&&this._checkStep(b)?(this.options.step=b,this.update()):"bounds"===a?(this.options.bounds=b,this.update()):"range"===a&&this._checkRange(b)?(this.options.range=b,this.update()):"symmetricPositionning"===a&&(this.options.symmetricPositionning=b===!0,this.update()):(this.options.isLeft=b,this.element.toggleClass("ui-rangeSlider-leftHandle",this.options.isLeft).toggleClass("ui-rangeSlider-rightHandle",!this.options.isLeft),this._position(this._value),this.element.trigger("switch",this.options.isLeft)),this._super(a,b)},_checkRange:function(a){return a===!1||!this._isValidValue(a.min)&&!this._isValidValue(a.max)},_isValidValue:function(a){return"undefined"!=typeof a&&a!==!1&&parseFloat(a)!==a},_checkStep:function(a){return a===!1||parseFloat(a)===a},_initElement:function(){this._super(),0===this.cache.parent.width||null===this.cache.parent.width?setTimeout(a.proxy(this._initElementIfNotDestroyed,this),500):(this._position(this._value),this._triggerMouseEvent("initialize"))},_bounds:function(){return this.options.bounds},_cache:function(){this._super(),this._cacheParent()},_cacheParent:function(){var a=this.element.parent();this.cache.parent={element:a,offset:a.offset(),padding:{left:this._parsePixels(a,"paddingLeft")},width:a.width()}},_position:function(a){var b=this._getPositionForValue(a);this._applyPosition(b)},_constraintPosition:function(a){var b=this._getValueForPosition(a);return this._getPositionForValue(b)},_applyPosition:function(a){this._super(a),this._left=a,this._setValue(this._getValueForPosition(a)),this._triggerMouseEvent("moving")},_prepareEventData:function(){var a=this._super();return a.value=this._value,a},_setValue:function(a){a!==this._value&&(this._value=a)},_constraintValue:function(a){if(a=Math.min(a,this._bounds().max),a=Math.max(a,this._bounds().min),a=this._round(a),this.options.range!==!1){var b=this.options.range.min||!1,c=this.options.range.max||!1;b!==!1&&(a=Math.max(a,this._round(b))),c!==!1&&(a=Math.min(a,this._round(c))),a=Math.min(a,this._bounds().max),a=Math.max(a,this._bounds().min)}return a},_round:function(a){return this.options.step!==!1&&this.options.step>0?Math.round(a/this.options.step)*this.options.step:a},_getPositionForValue:function(a){if(!this.cache||!this.cache.parent||null===this.cache.parent.offset)return 0;a=this._constraintValue(a);var b=(a-this.options.bounds.min)/(this.options.bounds.max-this.options.bounds.min),c=this.cache.parent.width,d=this.cache.parent.offset.left,e=this.options.isLeft?0:this.cache.width.outer;return this.options.symmetricPositionning?b*(c-2*this.cache.width.outer)+d+e:b*c+d-e},_getValueForPosition:function(a){var b=this._getRawValueForPositionAndBounds(a,this.options.bounds.min,this.options.bounds.max);return this._constraintValue(b)},_getRawValueForPositionAndBounds:function(a,b,c){var d,e,f=null===this.cache.parent.offset?0:this.cache.parent.offset.left;return this.options.symmetricPositionning?(a-=this.options.isLeft?0:this.cache.width.outer,d=this.cache.parent.width-2*this.cache.width.outer):(a+=this.options.isLeft?0:this.cache.width.outer,d=this.cache.parent.width),0===d?this._value:(e=(a-f)/d,e*(c-b)+b)},value:function(a){return"undefined"!=typeof a&&(this._cache(),a=this._constraintValue(a),this._position(a)),this._value},update:function(){this._cache();var a=this._constraintValue(this._value),b=this._getPositionForValue(a);a!==this._value?(this._triggerMouseEvent("updating"),this._position(a),this._triggerMouseEvent("update")):b!==this.cache.offset.left&&(this._triggerMouseEvent("updating"),this._position(a),this._triggerMouseEvent("update"))},position:function(a){return"undefined"!=typeof a&&(this._cache(),a=this._constraintPosition(a),this._applyPosition(a)),this._left},add:function(a,b){return a+b},substract:function(a,b){return a-b},stepsBetween:function(a,b){return this.options.step===!1?b-a:(b-a)/this.options.step},multiplyStep:function(a,b){return a*b},moveRight:function(a){var b;return this.options.step===!1?(b=this._left,this.position(this._left+a),this._left-b):(b=this._value,this.value(this.add(b,this.multiplyStep(this.options.step,a))),this.stepsBetween(b,this._value))},moveLeft:function(a){return-this.moveRight(-a)},stepRatio:function(){if(this.options.step===!1)return 1;var a=(this.options.bounds.max-this.options.bounds.min)/this.options.step;return this.cache.parent.width/a}})}(jQuery),function(a,b){"use strict";function c(a,b){return"undefined"==typeof a?b||!1:a}a.widget("ui.rangeSliderBar",a.ui.rangeSliderDraggable,{options:{leftHandle:null,rightHandle:null,bounds:{min:0,max:100},type:"rangeSliderHandle",range:!1,drag:function(){},stop:function(){},values:{min:0,max:20},wheelSpeed:4,wheelMode:null},_values:{min:0,max:20},_waitingToInit:2,_wheelTimeout:!1,_create:function(){this._super(),this.element.css("position","absolute").css("top",0).addClass("ui-rangeSlider-bar"),this.options.leftHandle.bind("initialize",a.proxy(this._onInitialized,this)).bind("mousestart",a.proxy(this._cache,this)).bind("stop",a.proxy(this._onHandleStop,this)),this.options.rightHandle.bind("initialize",a.proxy(this._onInitialized,this)).bind("mousestart",a.proxy(this._cache,this)).bind("stop",a.proxy(this._onHandleStop,this)),this._bindHandles(),this._values=this.options.values,this._setWheelModeOption(this.options.wheelMode)},destroy:function(){this.options.leftHandle.unbind(".bar"),this.options.rightHandle.unbind(".bar"),this.options=null,this._super()},_setOption:function(a,b){"range"===a?this._setRangeOption(b):"wheelSpeed"===a?this._setWheelSpeedOption(b):"wheelMode"===a&&this._setWheelModeOption(b)},_setRangeOption:function(a){if(("object"!=typeof a||null===a)&&(a=!1),a!==!1||this.options.range!==!1){if(a!==!1){var b=c(a.min,this.options.range.min),d=c(a.max,this.options.range.max);this.options.range={min:b,max:d}}else this.options.range=!1;this._setLeftRange(),this._setRightRange()}},_setWheelSpeedOption:function(a){"number"==typeof a&&0!==a&&(this.options.wheelSpeed=a)},_setWheelModeOption:function(a){(null===a||a===!1||"zoom"===a||"scroll"===a)&&(this.options.wheelMode!==a&&this.element.parent().unbind("mousewheel.bar"),this._bindMouseWheel(a),this.options.wheelMode=a)},_bindMouseWheel:function(b){"zoom"===b?this.element.parent().bind("mousewheel.bar",a.proxy(this._mouseWheelZoom,this)):"scroll"===b&&this.element.parent().bind("mousewheel.bar",a.proxy(this._mouseWheelScroll,this))},_setLeftRange:function(){if(this.options.range===!1)return!1;var a=this._values.max,b={min:!1,max:!1};"undefined"!=typeof this.options.range.min&&this.options.range.min!==!1?b.max=this._leftHandle("substract",a,this.options.range.min):b.max=!1,"undefined"!=typeof this.options.range.max&&this.options.range.max!==!1?b.min=this._leftHandle("substract",a,this.options.range.max):b.min=!1,this._leftHandle("option","range",b)},_setRightRange:function(){var a=this._values.min,b={min:!1,max:!1};"undefined"!=typeof this.options.range.min&&this.options.range.min!==!1?b.min=this._rightHandle("add",a,this.options.range.min):b.min=!1,"undefined"!=typeof this.options.range.max&&this.options.range.max!==!1?b.max=this._rightHandle("add",a,this.options.range.max):b.max=!1,this._rightHandle("option","range",b)},_deactivateRange:function(){this._leftHandle("option","range",!1),this._rightHandle("option","range",!1)},_reactivateRange:function(){this._setRangeOption(this.options.range)},_onInitialized:function(){this._waitingToInit--,0===this._waitingToInit&&this._initMe()},_initMe:function(){this._cache(),this.min(this._values.min),this.max(this._values.max);var a=this._leftHandle("position"),b=this._rightHandle("position")+this.options.rightHandle.width();this.element.offset({left:a}),this.element.css("width",b-a)},_leftHandle:function(){return this._handleProxy(this.options.leftHandle,arguments)},_rightHandle:function(){return this._handleProxy(this.options.rightHandle,arguments)},_handleProxy:function(a,b){var c=Array.prototype.slice.call(b);return a[this.options.type].apply(a,c)},_cache:function(){this._super(),this._cacheHandles()},_cacheHandles:function(){this.cache.rightHandle={},this.cache.rightHandle.width=this.options.rightHandle.width(),this.cache.rightHandle.offset=this.options.rightHandle.offset(),this.cache.leftHandle={},this.cache.leftHandle.offset=this.options.leftHandle.offset()},_mouseStart:function(a){this._super(a),this._deactivateRange()},_mouseStop:function(a){this._super(a),this._cacheHandles(),this._values.min=this._leftHandle("value"),this._values.max=this._rightHandle("value"),this._reactivateRange(),this._leftHandle().trigger("stop"),this._rightHandle().trigger("stop")},_onDragLeftHandle:function(a,b){if(this._cacheIfNecessary(),b.element[0]===this.options.leftHandle[0]){if(this._switchedValues())return this._switchHandles(),void this._onDragRightHandle(a,b);this._values.min=b.value,this.cache.offset.left=b.offset.left,this.cache.leftHandle.offset=b.offset,this._positionBar()}},_onDragRightHandle:function(a,b){if(this._cacheIfNecessary(),b.element[0]===this.options.rightHandle[0]){if(this._switchedValues())return this._switchHandles(),void this._onDragLeftHandle(a,b);this._values.max=b.value,this.cache.rightHandle.offset=b.offset,this._positionBar()}},_positionBar:function(){var a=this.cache.rightHandle.offset.left+this.cache.rightHandle.width-this.cache.leftHandle.offset.left;this.cache.width.inner=a,this.element.css("width",a).offset({left:this.cache.leftHandle.offset.left})},_onHandleStop:function(){this._setLeftRange(),this._setRightRange()},_switchedValues:function(){if(this.min()>this.max()){var a=this._values.min;return this._values.min=this._values.max,this._values.max=a,!0}return!1},_switchHandles:function(){var a=this.options.leftHandle;this.options.leftHandle=this.options.rightHandle,this.options.rightHandle=a,this._leftHandle("option","isLeft",!0),this._rightHandle("option","isLeft",!1),this._bindHandles(),this._cacheHandles()},_bindHandles:function(){this.options.leftHandle.unbind(".bar").bind("sliderDrag.bar update.bar moving.bar",a.proxy(this._onDragLeftHandle,this)),this.options.rightHandle.unbind(".bar").bind("sliderDrag.bar update.bar moving.bar",a.proxy(this._onDragRightHandle,this))},_constraintPosition:function(a){var b,c={};return c.left=this._super(a),c.left=this._leftHandle("position",c.left),b=this._rightHandle("position",c.left+this.cache.width.outer-this.cache.rightHandle.width),c.width=b-c.left+this.cache.rightHandle.width,c},_applyPosition:function(a){this._super(a.left),this.element.width(a.width)},_mouseWheelZoom:function(b,c,d,e){if(!this.enabled)return!1;var f=this._values.min+(this._values.max-this._values.min)/2,g={},h={};return this.options.range===!1||this.options.range.min===!1?(g.max=f,h.min=f):(g.max=f-this.options.range.min/2,h.min=f+this.options.range.min/2),this.options.range!==!1&&this.options.range.max!==!1&&(g.min=f-this.options.range.max/2,h.max=f+this.options.range.max/2),this._leftHandle("option","range",g),this._rightHandle("option","range",h),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(a.proxy(this._wheelStop,this),200),this.zoomIn(e*this.options.wheelSpeed),!1},_mouseWheelScroll:function(b,c,d,e){return this.enabled?(this._wheelTimeout===!1?this.startScroll():clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(a.proxy(this._wheelStop,this),200),this.scrollLeft(e*this.options.wheelSpeed),!1):!1},_wheelStop:function(){this.stopScroll(),this._wheelTimeout=!1},min:function(a){return this._leftHandle("value",a)},max:function(a){return this._rightHandle("value",a)},startScroll:function(){this._deactivateRange()},stopScroll:function(){this._reactivateRange(),this._triggerMouseEvent("stop"),this._leftHandle().trigger("stop"),this._rightHandle().trigger("stop")},scrollLeft:function(a){return a=a||1,0>a?this.scrollRight(-a):(a=this._leftHandle("moveLeft",a),this._rightHandle("moveLeft",a),this.update(),void this._triggerMouseEvent("scroll"))},scrollRight:function(a){return a=a||1,0>a?this.scrollLeft(-a):(a=this._rightHandle("moveRight",a),this._leftHandle("moveRight",a),this.update(),void this._triggerMouseEvent("scroll"))},zoomIn:function(a){if(a=a||1,0>a)return this.zoomOut(-a);var b=this._rightHandle("moveLeft",a);a>b&&(b/=2,this._rightHandle("moveRight",b)),this._leftHandle("moveRight",b),this.update(),this._triggerMouseEvent("zoom")},zoomOut:function(a){if(a=a||1,0>a)return this.zoomIn(-a);var b=this._rightHandle("moveRight",a);a>b&&(b/=2,this._rightHandle("moveLeft",b)),this._leftHandle("moveLeft",b),this.update(),this._triggerMouseEvent("zoom")},values:function(a,b){if("undefined"!=typeof a&&"undefined"!=typeof b){var c=Math.min(a,b),d=Math.max(a,b);this._deactivateRange(),this.options.leftHandle.unbind(".bar"),this.options.rightHandle.unbind(".bar"),this._values.min=this._leftHandle("value",c),this._values.max=this._rightHandle("value",d),this._bindHandles(),this._reactivateRange(),this.update()}return{min:this._values.min,max:this._values.max}},update:function(){this._values.min=this.min(),this._values.max=this.max(),this._cache(),this._positionBar()}})}(jQuery),function(a,b){"use strict";function c(b,c,d,e){this.label1=b,this.label2=c,this.type=d,this.options=e,this.handle1=this.label1[this.type]("option","handle"),this.handle2=this.label2[this.type]("option","handle"),this.cache=null,this.left=b,this.right=c,this.moving=!1,this.initialized=!1,this.updating=!1,this.Init=function(){this.BindHandle(this.handle1),this.BindHandle(this.handle2),"show"===this.options.show?(setTimeout(a.proxy(this.PositionLabels,this),1), +this.initialized=!0):setTimeout(a.proxy(this.AfterInit,this),1e3),this._resizeProxy=a.proxy(this.onWindowResize,this),a(window).resize(this._resizeProxy)},this.Destroy=function(){this._resizeProxy&&(a(window).unbind("resize",this._resizeProxy),this._resizeProxy=null,this.handle1.unbind(".positionner"),this.handle1=null,this.handle2.unbind(".positionner"),this.handle2=null,this.label1=null,this.label2=null,this.left=null,this.right=null),this.cache=null},this.AfterInit=function(){this.initialized=!0},this.Cache=function(){"none"!==this.label1.css("display")&&(this.cache={},this.cache.label1={},this.cache.label2={},this.cache.handle1={},this.cache.handle2={},this.cache.offsetParent={},this.CacheElement(this.label1,this.cache.label1),this.CacheElement(this.label2,this.cache.label2),this.CacheElement(this.handle1,this.cache.handle1),this.CacheElement(this.handle2,this.cache.handle2),this.CacheElement(this.label1.offsetParent(),this.cache.offsetParent))},this.CacheIfNecessary=function(){null===this.cache?this.Cache():(this.CacheWidth(this.label1,this.cache.label1),this.CacheWidth(this.label2,this.cache.label2),this.CacheHeight(this.label1,this.cache.label1),this.CacheHeight(this.label2,this.cache.label2),this.CacheWidth(this.label1.offsetParent(),this.cache.offsetParent))},this.CacheElement=function(a,b){this.CacheWidth(a,b),this.CacheHeight(a,b),b.offset=a.offset(),b.margin={left:this.ParsePixels("marginLeft",a),right:this.ParsePixels("marginRight",a)},b.border={left:this.ParsePixels("borderLeftWidth",a),right:this.ParsePixels("borderRightWidth",a)}},this.CacheWidth=function(a,b){b.width=a.width(),b.outerWidth=a.outerWidth()},this.CacheHeight=function(a,b){b.outerHeightMargin=a.outerHeight(!0)},this.ParsePixels=function(a,b){return parseInt(b.css(a),10)||0},this.BindHandle=function(b){b.bind("updating.positionner",a.proxy(this.onHandleUpdating,this)),b.bind("update.positionner",a.proxy(this.onHandleUpdated,this)),b.bind("moving.positionner",a.proxy(this.onHandleMoving,this)),b.bind("stop.positionner",a.proxy(this.onHandleStop,this))},this.PositionLabels=function(){if(this.CacheIfNecessary(),null!==this.cache){var a=this.GetRawPosition(this.cache.label1,this.cache.handle1),b=this.GetRawPosition(this.cache.label2,this.cache.handle2);this.label1[d]("option","isLeft")?this.ConstraintPositions(a,b):this.ConstraintPositions(b,a),this.PositionLabel(this.label1,a.left,this.cache.label1),this.PositionLabel(this.label2,b.left,this.cache.label2)}},this.PositionLabel=function(a,b,c){var d,e,f,g=this.cache.offsetParent.offset.left+this.cache.offsetParent.border.left;g-b>=0?(a.css("right",""),a.offset({left:b})):(d=g+this.cache.offsetParent.width,e=b+c.margin.left+c.outerWidth+c.margin.right,f=d-e,a.css("left",""),a.css("right",f))},this.ConstraintPositions=function(a,b){(a.centerb.outerLeft||a.center>b.center&&b.outerRight>a.outerLeft)&&(a=this.getLeftPosition(a,b),b=this.getRightPosition(a,b))},this.getLeftPosition=function(a,b){var c=(b.center+a.center)/2,d=c-a.cache.outerWidth-a.cache.margin.right+a.cache.border.left;return a.left=d,a},this.getRightPosition=function(a,b){var c=(b.center+a.center)/2;return b.left=c+b.cache.margin.left+b.cache.border.left,b},this.ShowIfNecessary=function(){"show"===this.options.show||this.moving||!this.initialized||this.updating||(this.label1.stop(!0,!0).fadeIn(this.options.durationIn||0),this.label2.stop(!0,!0).fadeIn(this.options.durationIn||0),this.moving=!0)},this.HideIfNeeded=function(){this.moving===!0&&(this.label1.stop(!0,!0).delay(this.options.delayOut||0).fadeOut(this.options.durationOut||0),this.label2.stop(!0,!0).delay(this.options.delayOut||0).fadeOut(this.options.durationOut||0),this.moving=!1)},this.onHandleMoving=function(a,b){this.ShowIfNecessary(),this.CacheIfNecessary(),this.UpdateHandlePosition(b),this.PositionLabels()},this.onHandleUpdating=function(){this.updating=!0},this.onHandleUpdated=function(){this.updating=!1,this.cache=null},this.onHandleStop=function(){this.HideIfNeeded()},this.onWindowResize=function(){this.cache=null},this.UpdateHandlePosition=function(a){null!==this.cache&&(a.element[0]===this.handle1[0]?this.UpdatePosition(a,this.cache.handle1):this.UpdatePosition(a,this.cache.handle2))},this.UpdatePosition=function(a,b){b.offset=a.offset,b.value=a.value},this.GetRawPosition=function(a,b){var c=b.offset.left+b.outerWidth/2,d=c-a.outerWidth/2,e=d+a.outerWidth-a.border.left-a.border.right,f=d-a.margin.left-a.border.left,g=b.offset.top-a.outerHeightMargin;return{left:d,outerLeft:f,top:g,right:e,outerRight:f+a.outerWidth+a.margin.left+a.margin.right,cache:a,center:c}},this.Init()}a.widget("ui.rangeSliderLabel",a.ui.rangeSliderMouseTouch,{options:{handle:null,formatter:!1,handleType:"rangeSliderHandle",show:"show",durationIn:0,durationOut:500,delayOut:500,isLeft:!1},cache:null,_positionner:null,_valueContainer:null,_innerElement:null,_value:null,_create:function(){this.options.isLeft=this._handle("option","isLeft"),this.element.addClass("ui-rangeSlider-label").css("position","absolute").css("display","block"),this._createElements(),this._toggleClass(),this.options.handle.bind("moving.label",a.proxy(this._onMoving,this)).bind("update.label",a.proxy(this._onUpdate,this)).bind("switch.label",a.proxy(this._onSwitch,this)),"show"!==this.options.show&&this.element.hide(),this._mouseInit()},destroy:function(){this.options.handle.unbind(".label"),this.options.handle=null,this._valueContainer=null,this._innerElement=null,this.element.empty(),this._positionner&&(this._positionner.Destroy(),this._positionner=null),this._super()},_createElements:function(){this._valueContainer=a("
").appendTo(this.element),this._innerElement=a("
").appendTo(this.element)},_handle:function(){var a=Array.prototype.slice.apply(arguments);return this.options.handle[this.options.handleType].apply(this.options.handle,a)},_setOption:function(a,b){"show"===a?this._updateShowOption(b):("durationIn"===a||"durationOut"===a||"delayOut"===a)&&this._updateDurations(a,b),this._setFormatterOption(a,b)},_setFormatterOption:function(a,b){"formatter"===a&&("function"==typeof b||b===!1)&&(this.options.formatter=b,this._display(this._value))},_updateShowOption:function(a){this.options.show=a,"show"!==this.options.show?(this.element.hide(),this._positionner.moving=!1):(this.element.show(),this._display(this.options.handle[this.options.handleType]("value")),this._positionner.PositionLabels()),this._positionner.options.show=this.options.show},_updateDurations:function(a,b){parseInt(b,10)===b&&(this._positionner.options[a]=b,this.options[a]=b)},_display:function(a){this.options.formatter===!1?this._displayText(Math.round(a)):this._displayText(this.options.formatter(a,this.options.isLeft)),this._value=a},_displayText:function(a){this._valueContainer.text(a)},_toggleClass:function(){this.element.toggleClass("ui-rangeSlider-leftLabel",this.options.isLeft).toggleClass("ui-rangeSlider-rightLabel",!this.options.isLeft)},_positionLabels:function(){this._positionner.PositionLabels()},_mouseDown:function(a){this.options.handle.trigger(a)},_mouseUp:function(a){this.options.handle.trigger(a)},_mouseMove:function(a){this.options.handle.trigger(a)},_onMoving:function(a,b){this._display(b.value)},_onUpdate:function(){"show"===this.options.show&&this.update()},_onSwitch:function(a,b){this.options.isLeft=b,this._toggleClass(),this._positionLabels()},pair:function(a){null===this._positionner&&(this._positionner=new c(this.element,a,this.widgetName,{show:this.options.show,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}),a[this.widgetName]("positionner",this._positionner))},positionner:function(a){return"undefined"!=typeof a&&(this._positionner=a),this._positionner},update:function(){this._positionner.cache=null,this._display(this._handle("value")),"show"===this.options.show&&this._positionLabels()}})}(jQuery),function(a,b){"use strict";a.widget("ui.dateRangeSlider",a.ui.rangeSlider,{options:{bounds:{min:new Date(2010,0,1).valueOf(),max:new Date(2012,0,1).valueOf()},defaultValues:{min:new Date(2010,1,11).valueOf(),max:new Date(2011,1,11).valueOf()}},_create:function(){this._super(),this.element.addClass("ui-dateRangeSlider")},destroy:function(){this.element.removeClass("ui-dateRangeSlider"),this._super()},_setDefaultValues:function(){this._values={min:this.options.defaultValues.min.valueOf(),max:this.options.defaultValues.max.valueOf()}},_setRulerParameters:function(){this.ruler.ruler({min:new Date(this.options.bounds.min.valueOf()),max:new Date(this.options.bounds.max.valueOf()),scales:this.options.scales})},_setOption:function(a,b){("defaultValues"===a||"bounds"===a)&&"undefined"!=typeof b&&null!==b&&this._isValidDate(b.min)&&this._isValidDate(b.max)?this._super(a,{min:b.min.valueOf(),max:b.max.valueOf()}):this._super.apply(this,this._toArray(arguments))},_handleType:function(){return"dateRangeSliderHandle"},option:function(a){if("bounds"===a||"defaultValues"===a){var b=this._super.apply(this,this._toArray(arguments));return{min:new Date(b.min),max:new Date(b.max)}}return this._super.apply(this,this._toArray(arguments))},_defaultFormatter:function(a){var b=a.getMonth()+1,c=a.getDate();return""+a.getFullYear()+"-"+(10>b?"0"+b:b)+"-"+(10>c?"0"+c:c)},_getFormatter:function(){var a=this.options.formatter;return(this.options.formatter===!1||null===this.options.formatter)&&(a=this._defaultFormatter.bind(this)),function(a){return function(b,c){return a(new Date(b),c)}}(a)},values:function(a,b){var c=null;return c=this._isValidDate(a)&&this._isValidDate(b)?this._super(a.valueOf(),b.valueOf()):this._super.apply(this,this._toArray(arguments)),{min:new Date(c.min),max:new Date(c.max)}},min:function(a){return this._isValidDate(a)?new Date(this._super(a.valueOf())):new Date(this._super())},max:function(a){return this._isValidDate(a)?new Date(this._super(a.valueOf())):new Date(this._super())},bounds:function(a,b){var c;return c=this._isValidDate(a)&&this._isValidDate(b)?this._super(a.valueOf(),b.valueOf()):this._super.apply(this,this._toArray(arguments)),{min:new Date(c.min),max:new Date(c.max)}},_isValidDate:function(a){return"undefined"!=typeof a&&a instanceof Date},_toArray:function(a){return Array.prototype.slice.call(a)}})}(jQuery),function(a,b){"use strict";a.widget("ui.dateRangeSliderHandle",a.ui.rangeSliderHandle,{_steps:!1,_boundsValues:{},_create:function(){this._createBoundsValues(),this._super()},_getValueForPosition:function(a){var b=this._getRawValueForPositionAndBounds(a,this.options.bounds.min.valueOf(),this.options.bounds.max.valueOf());return this._constraintValue(new Date(b))},_setOption:function(a,b){return"step"===a?(this.options.step=b,this._createSteps(),void this.update()):(this._super(a,b),void("bounds"===a&&this._createBoundsValues()))},_createBoundsValues:function(){this._boundsValues={min:this.options.bounds.min.valueOf(),max:this.options.bounds.max.valueOf()}},_bounds:function(){return this._boundsValues},_createSteps:function(){if(this.options.step===!1||!this._isValidStep())return void(this._steps=!1);var a=new Date(this.options.bounds.min.valueOf()),b=new Date(this.options.bounds.max.valueOf()),c=a,d=0,e=new Date;for(this._steps=[];b>=c&&(1===d||e.valueOf()!==c.valueOf());)e=c,this._steps.push(c.valueOf()),c=this._addStep(a,d,this.options.step),d++;e.valueOf()===c.valueOf()&&(this._steps=!1)},_isValidStep:function(){return"object"==typeof this.options.step},_addStep:function(a,b,c){var d=new Date(a.valueOf());return d=this._addThing(d,"FullYear",b,c.years),d=this._addThing(d,"Month",b,c.months),d=this._addThing(d,"Date",b,7*c.weeks),d=this._addThing(d,"Date",b,c.days),d=this._addThing(d,"Hours",b,c.hours),d=this._addThing(d,"Minutes",b,c.minutes),d=this._addThing(d,"Seconds",b,c.seconds)},_addThing:function(a,b,c,d){return 0===c||0===(d||0)?a:(a["set"+b](a["get"+b]()+c*(d||0)),a)},_round:function(a){if(this._steps===!1)return a;for(var b,c,d=this.options.bounds.max.valueOf(),e=this.options.bounds.min.valueOf(),f=Math.max(0,(a-e)/(d-e)),g=Math.floor(this._steps.length*f);this._steps[g]>a;)g--;for(;g+1=this._steps.length-1?this._steps[this._steps.length-1]:0===g?this._steps[0]:(b=this._steps[g],c=this._steps[g+1],c-a>a-b?b:c)},update:function(){this._createBoundsValues(),this._createSteps(),this._super()},add:function(a,b){return this._addStep(new Date(a),1,b).valueOf()},substract:function(a,b){return this._addStep(new Date(a),-1,b).valueOf()},stepsBetween:function(a,b){if(this.options.step===!1)return b-a;var c=Math.min(a,b),d=Math.max(a,b),e=0,f=!1,g=a>b;for(this.add(c,this.options.step)-c<0&&(f=!0);d>c;)f?d=this.add(d,this.options.step):c=this.add(c,this.options.step),e++;return g?-e:e},multiplyStep:function(a,b){var c={};for(var d in a)a.hasOwnProperty(d)&&(c[d]=a[d]*b);return c},stepRatio:function(){if(this.options.step===!1)return 1;var a=this._steps.length;return this.cache.parent.width/a}})}(jQuery),function(a,b){"use strict";a.widget("ui.editRangeSlider",a.ui.rangeSlider,{options:{type:"text",round:1},_create:function(){this._super(),this.element.addClass("ui-editRangeSlider")},destroy:function(){this.element.removeClass("ui-editRangeSlider"),this._super()},_setOption:function(a,b){("type"===a||"step"===a)&&this._setLabelOption(a,b),"type"===a&&(this.options[a]=null===this.labels.left?b:this._leftLabel("option",a)),this._super(label,handle)},_setLabelOption:function(a,b){null!==this.labels.left&&(this._leftLabel("option",a,b),this._rightLabel("option",a,b))},_labelType:function(){return"editRangeSliderLabel"},_createLabel:function(b,c){var d=this._super(b,c);return null===b&&d.bind("valueChange",a.proxy(this._onValueChange,this)),d},_addPropertiesToParameter:function(a){return a.type=this.options.type,a.step=this.options.step,a.id=this.element.attr("id"),a},_getLabelConstructorParameters:function(a,b){var c=this._super(a,b);return this._addPropertiesToParameter(c)},_getLabelRefreshParameters:function(a,b){var c=this._super(a,b);return this._addPropertiesToParameter(c)},_onValueChange:function(a,b){var c=!1;c=b.isLeft?this._values.min!==this.min(b.value):this._values.max!==this.max(b.value),c&&this._trigger("userValuesChanged")}})}(jQuery),function(a){"use strict";a.widget("ui.editRangeSliderLabel",a.ui.rangeSliderLabel,{options:{type:"text",step:!1,id:""},_input:null,_text:"",_create:function(){this._super(),this._createInput()},_setOption:function(a,b){"type"===a?this._setTypeOption(b):"step"===a&&this._setStepOption(b),this._super(a,b)},_createInput:function(){this._input=a("").addClass("ui-editRangeSlider-inputValue").appendTo(this._valueContainer),this._setInputName(),this._input.bind("keyup",a.proxy(this._onKeyUp,this)),this._input.blur(a.proxy(this._onChange,this)),"number"===this.options.type&&(this.options.step!==!1&&this._input.attr("step",this.options.step),this._input.click(a.proxy(this._onChange,this))),this._input.val(this._text)},_setInputName:function(){var a=this.options.isLeft?"left":"right";this._input.attr("name",this.options.id+a)},_onSwitch:function(a,b){this._super(a,b),this._setInputName()},_destroyInput:function(){this._input.remove(),this._input=null},_onKeyUp:function(a){return 13===a.which?(this._onChange(a),!1):void 0},_onChange:function(){var a=this._returnCheckedValue(this._input.val());a!==!1&&this._triggerValue(a)},_triggerValue:function(a){var b=this.options.handle[this.options.handleType]("option","isLeft");this.element.trigger("valueChange",[{isLeft:b,value:a}])},_returnCheckedValue:function(a){var b=parseFloat(a);return isNaN(b)||isNaN(Number(a))?!1:b},_setTypeOption:function(a){"text"!==a&&"number"!==a||this.options.type===a||(this._destroyInput(),this.options.type=a,this._createInput())},_setStepOption:function(a){this.options.step=a,"number"===this.options.type&&this._input.attr("step",a!==!1?a:"any")},_displayText:function(a){this._input.val(a),this._text=a},enable:function(){this._super(),this._input.attr("disabled",null)},disable:function(){this._super(),this._input.attr("disabled","disabled")}})}(jQuery); \ No newline at end of file diff --git a/app/assets/vendored/lib/jqrangeslider/jQAllRangeSliders-withRuler-min.js b/app/assets/vendored/lib/jqrangeslider/jQAllRangeSliders-withRuler-min.js new file mode 100644 index 000000000..e40da0d88 --- /dev/null +++ b/app/assets/vendored/lib/jqrangeslider/jQAllRangeSliders-withRuler-min.js @@ -0,0 +1,2 @@ +/*! jQRangeSlider 5.8.2 - 2023-10-19 - Copyright (C) Guillaume Gautreau 2012 - MIT and GPLv3 licenses.*/!function(a,b){"use strict";a.widget("ui.rangeSliderMouseTouch",a.ui.mouse,{enabled:!0,_mouseInit:function(){var a=this;this._super(),this._mouseDownEvent=!1,this.element.bind("touchstart."+this.widgetName,function(b){return a._touchStart(b)})},_mouseDestroy:function(){a(document).unbind("touchmove."+this.widgetName,this._touchMoveDelegate).unbind("touchend."+this.widgetName,this._touchEndDelegate),this._super()},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},destroy:function(){this._mouseDestroy(),this._super(),this._mouseInit=null},_touchStart:function(b){if(!this.enabled)return!1;b.which=1,b.preventDefault(),this._fillTouchEvent(b);var c=this,d=this._mouseDownEvent;this._mouseDown(b),d!==this._mouseDownEvent&&(this._touchEndDelegate=function(a){c._touchEnd(a)},this._touchMoveDelegate=function(a){c._touchMove(a)},a(document).bind("touchmove."+this.widgetName,this._touchMoveDelegate).bind("touchend."+this.widgetName,this._touchEndDelegate))},_mouseDown:function(a){return this.enabled?this._super(a):!1},_touchEnd:function(b){this._fillTouchEvent(b),this._mouseUp(b),a(document).unbind("touchmove."+this.widgetName,this._touchMoveDelegate).unbind("touchend."+this.widgetName,this._touchEndDelegate),this._mouseDownEvent=!1,a(document).trigger("mouseup")},_touchMove:function(a){return a.preventDefault(),this._fillTouchEvent(a),this._mouseMove(a)},_fillTouchEvent:function(a){var b;b="undefined"==typeof a.targetTouches&&"undefined"==typeof a.changedTouches?a.originalEvent.targetTouches[0]||a.originalEvent.changedTouches[0]:a.targetTouches[0]||a.changedTouches[0],a.pageX=b.pageX,a.pageY=b.pageY,a.which=1}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSliderDraggable",a.ui.rangeSliderMouseTouch,{cache:null,options:{containment:null},_create:function(){this._super(),setTimeout(a.proxy(this._initElementIfNotDestroyed,this),10)},destroy:function(){this.cache=null,this._super()},_initElementIfNotDestroyed:function(){this._mouseInit&&this._initElement()},_initElement:function(){this._mouseInit(),this._cache()},_setOption:function(b,c){"containment"===b&&(null===c||0===a(c).length?this.options.containment=null:this.options.containment=a(c))},_mouseStart:function(a){return this._cache(),this.cache.click={left:a.pageX,top:a.pageY},this.cache.initialOffset=this.element.offset(),this._triggerMouseEvent("mousestart"),!0},_mouseDrag:function(a){var b=a.pageX-this.cache.click.left;return b=this._constraintPosition(b+this.cache.initialOffset.left),this._applyPosition(b),this._triggerMouseEvent("sliderDrag"),!1},_mouseStop:function(){this._triggerMouseEvent("stop")},_constraintPosition:function(a){return 0!==this.element.parent().length&&null!==this.cache.parent.offset&&(a=Math.min(a,this.cache.parent.offset.left+this.cache.parent.width-this.cache.width.outer),a=Math.max(a,this.cache.parent.offset.left)),a},_applyPosition:function(a){this._cacheIfNecessary();var b={top:this.cache.offset.top,left:a};this.element.offset({left:a}),this.cache.offset=b},_cacheIfNecessary:function(){null===this.cache&&this._cache()},_cache:function(){this.cache={},this._cacheMargins(),this._cacheParent(),this._cacheDimensions(),this.cache.offset=this.element.offset()},_cacheMargins:function(){this.cache.margin={left:this._parsePixels(this.element,"marginLeft"),right:this._parsePixels(this.element,"marginRight"),top:this._parsePixels(this.element,"marginTop"),bottom:this._parsePixels(this.element,"marginBottom")}},_cacheParent:function(){if(null!==this.options.parent){var a=this.element.parent();this.cache.parent={offset:a.offset(),width:a.width()}}else this.cache.parent=null},_cacheDimensions:function(){this.cache.width={outer:this.element.outerWidth(),inner:this.element.width()}},_parsePixels:function(a,b){return parseInt(a.css(b),10)||0},_triggerMouseEvent:function(a){var b=this._prepareEventData();this.element.trigger(a,b)},_prepareEventData:function(){return{element:this.element,offset:this.cache.offset||null}}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSlider",{options:{bounds:{min:0,max:100},defaultValues:{min:20,max:50},wheelMode:null,wheelSpeed:4,arrows:!0,valueLabels:"show",formatter:null,durationIn:0,durationOut:400,delayOut:200,range:{min:!1,max:!1},step:!1,scales:!1,enabled:!0,symmetricPositionning:!1},_values:null,_valuesChanged:!1,_initialized:!1,bar:null,leftHandle:null,rightHandle:null,innerBar:null,container:null,arrows:null,labels:null,changing:{min:!1,max:!1},changed:{min:!1,max:!1},ruler:null,_create:function(){this._super(),this._setDefaultValues(),this.labels={left:null,right:null,leftDisplayed:!0,rightDisplayed:!0},this.arrows={left:null,right:null},this.changing={min:!1,max:!1},this.changed={min:!1,max:!1},this._createElements(),this._bindResize(),setTimeout(a.proxy(this.resize,this),1),setTimeout(a.proxy(this._initValues,this),1)},_setDefaultValues:function(){this._values={min:this.options.defaultValues.min,max:this.options.defaultValues.max}},_bindResize:function(){var b=this;this._resizeProxy=function(a){b.resize(a)},a(window).resize(this._resizeProxy)},_initWidth:function(){this.container.css("width",this.element.width()-this.container.outerWidth(!0)+this.container.width()),this.innerBar.css("width",this.container.width()-this.innerBar.outerWidth(!0)+this.innerBar.width())},_initValues:function(){this._initialized=!0,this.values(this._values.min,this._values.max)},_setOption:function(a,b){this._setWheelOption(a,b),this._setArrowsOption(a,b),this._setLabelsOption(a,b),this._setLabelsDurations(a,b),this._setFormatterOption(a,b),this._setBoundsOption(a,b),this._setRangeOption(a,b),this._setStepOption(a,b),this._setScalesOption(a,b),this._setEnabledOption(a,b),this._setPositionningOption(a,b)},_validProperty:function(a,b,c){return null===a||"undefined"==typeof a[b]?c:a[b]},_setStepOption:function(a,b){"step"===a&&(this.options.step=b,this._leftHandle("option","step",b),this._rightHandle("option","step",b),this._changed(!0))},_setScalesOption:function(a,b){"scales"===a&&(b===!1||null===b?(this.options.scales=!1,this._destroyRuler()):b instanceof Array&&(this.options.scales=b,this._updateRuler()))},_setRangeOption:function(a,b){"range"===a&&(this._bar("option","range",b),this.options.range=this._bar("option","range"),this._changed(!0))},_setBoundsOption:function(a,b){"bounds"===a&&"undefined"!=typeof b.min&&"undefined"!=typeof b.max&&this.bounds(b.min,b.max)},_setWheelOption:function(a,b){("wheelMode"===a||"wheelSpeed"===a)&&(this._bar("option",a,b),this.options[a]=this._bar("option",a))},_setLabelsOption:function(a,b){if("valueLabels"===a){if("hide"!==b&&"show"!==b&&"change"!==b)return;this.options.valueLabels=b,"hide"!==b?(this._createLabels(),this._leftLabel("update"),this._rightLabel("update")):this._destroyLabels()}},_setFormatterOption:function(a,b){"formatter"===a&&null!==b&&"function"==typeof b&&"hide"!==this.options.valueLabels&&(this._leftLabel("option","formatter",b),this.options.formatter=this._rightLabel("option","formatter",b))},_setArrowsOption:function(a,b){"arrows"!==a||b!==!0&&b!==!1||b===this.options.arrows||(b===!0?(this.element.removeClass("ui-rangeSlider-noArrow").addClass("ui-rangeSlider-withArrows"),this.arrows.left.css("display","block"),this.arrows.right.css("display","block"),this.options.arrows=!0):b===!1&&(this.element.addClass("ui-rangeSlider-noArrow").removeClass("ui-rangeSlider-withArrows"),this.arrows.left.css("display","none"),this.arrows.right.css("display","none"),this.options.arrows=!1),this._initWidth())},_setLabelsDurations:function(a,b){if("durationIn"===a||"durationOut"===a||"delayOut"===a){if(parseInt(b,10)!==b)return;null!==this.labels.left&&this._leftLabel("option",a,b),null!==this.labels.right&&this._rightLabel("option",a,b),this.options[a]=b}},_setEnabledOption:function(a,b){"enabled"===a&&this.toggle(b)},_setPositionningOption:function(a,b){"symmetricPositionning"===a&&(this._rightHandle("option",a,b),this.options[a]=this._leftHandle("option",a,b))},_createElements:function(){"absolute"!==this.element.css("position")&&this.element.css("position","relative"),this.element.addClass("ui-rangeSlider"),this.container=a("
").css("position","absolute").appendTo(this.element),this.innerBar=a("
").css("position","absolute").css("top",0).css("left",0),this._createHandles(),this._createBar(),this.container.prepend(this.innerBar),this._createArrows(),"hide"!==this.options.valueLabels?this._createLabels():this._destroyLabels(),this._updateRuler(),this.options.enabled||this._toggle(this.options.enabled)},_createHandle:function(b){return a("
")[this._handleType()](b).bind("sliderDrag",a.proxy(this._changing,this)).bind("stop",a.proxy(this._changed,this))},_createHandles:function(){this.leftHandle=this._createHandle({isLeft:!0,bounds:this.options.bounds,value:this._values.min,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container),this.rightHandle=this._createHandle({isLeft:!1,bounds:this.options.bounds,value:this._values.max,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container)},_createBar:function(){this.bar=a("
").prependTo(this.container).bind("sliderDrag scroll zoom",a.proxy(this._changing,this)).bind("stop",a.proxy(this._changed,this)),this._bar({leftHandle:this.leftHandle,rightHandle:this.rightHandle,values:{min:this._values.min,max:this._values.max},type:this._handleType(),range:this.options.range,wheelMode:this.options.wheelMode,wheelSpeed:this.options.wheelSpeed}),this.options.range=this._bar("option","range"),this.options.wheelMode=this._bar("option","wheelMode"),this.options.wheelSpeed=this._bar("option","wheelSpeed")},_createArrows:function(){this.arrows.left=this._createArrow("left"),this.arrows.right=this._createArrow("right"),this.options.arrows?this.element.addClass("ui-rangeSlider-withArrows"):(this.arrows.left.css("display","none"),this.arrows.right.css("display","none"),this.element.addClass("ui-rangeSlider-noArrow"))},_createArrow:function(b){var c,d=a("
").append("
").addClass("ui-rangeSlider-"+b+"Arrow").css("position","absolute").css(b,0).appendTo(this.element);return c="right"===b?a.proxy(this._scrollRightClick,this):a.proxy(this._scrollLeftClick,this),d.bind("mousedown touchstart",c),d},_proxy:function(a,b,c){var d=Array.prototype.slice.call(c);return a&&a[b]?a[b].apply(a,d):null},_handleType:function(){return"rangeSliderHandle"},_barType:function(){return"rangeSliderBar"},_bar:function(){return this._proxy(this.bar,this._barType(),arguments)},_labelType:function(){return"rangeSliderLabel"},_leftLabel:function(){return this._proxy(this.labels.left,this._labelType(),arguments)},_rightLabel:function(){return this._proxy(this.labels.right,this._labelType(),arguments)},_leftHandle:function(){return this._proxy(this.leftHandle,this._handleType(),arguments)},_rightHandle:function(){return this._proxy(this.rightHandle,this._handleType(),arguments)},_getValue:function(a,b){return b===this.rightHandle&&(a-=b.outerWidth()),a*(this.options.bounds.max-this.options.bounds.min)/(this.container.innerWidth()-b.outerWidth(!0))+this.options.bounds.min},_trigger:function(a){var b=this;setTimeout(function(){b.element.trigger(a,{label:b.element,values:b.values()})},1)},_changing:function(){this._updateValues()&&(this._trigger("valuesChanging"),this._valuesChanged=!0)},_deactivateLabels:function(){"change"===this.options.valueLabels&&(this._leftLabel("option","show","hide"),this._rightLabel("option","show","hide"))},_reactivateLabels:function(){"change"===this.options.valueLabels&&(this._leftLabel("option","show","change"),this._rightLabel("option","show","change"))},_changed:function(a){a===!0&&this._deactivateLabels(),(this._updateValues()||this._valuesChanged)&&(this._trigger("valuesChanged"),a!==!0&&this._trigger("userValuesChanged"),this._valuesChanged=!1),a===!0&&this._reactivateLabels()},_updateValues:function(){var a=this._leftHandle("value"),b=this._rightHandle("value"),c=this._min(a,b),d=this._max(a,b),e=c!==this._values.min||d!==this._values.max;return this._values.min=this._min(a,b),this._values.max=this._max(a,b),e},_min:function(a,b){return Math.min(a,b)},_max:function(a,b){return Math.max(a,b)},_createLabel:function(b,c){var d;return null===b?(d=this._getLabelConstructorParameters(b,c),b=a("
").appendTo(this.element)[this._labelType()](d)):(d=this._getLabelRefreshParameters(b,c),b[this._labelType()](d)),b},_getLabelConstructorParameters:function(a,b){return{handle:b,handleType:this._handleType(),formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getLabelRefreshParameters:function(){return{formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getFormatter:function(){return this.options.formatter===!1||null===this.options.formatter?this._defaultFormatter.bind(this):this.options.formatter},_defaultFormatter:function(a){return Math.round(a)},_destroyLabel:function(a){return null!==a&&(a[this._labelType()]("destroy"),a.remove(),a=null),a},_createLabels:function(){this.labels.left=this._createLabel(this.labels.left,this.leftHandle),this.labels.right=this._createLabel(this.labels.right,this.rightHandle),this._leftLabel("pair",this.labels.right)},_destroyLabels:function(){this.labels.left=this._destroyLabel(this.labels.left),this.labels.right=this._destroyLabel(this.labels.right)},_stepRatio:function(){return this._leftHandle("stepRatio")},_scrollRightClick:function(a){return this.options.enabled?(a.preventDefault(),this._bar("startScroll"),this._bindStopScroll(),void this._continueScrolling("scrollRight",4*this._stepRatio(),1)):!1},_continueScrolling:function(a,b,c,d){if(!this.options.enabled)return!1;this._bar(a,c),d=d||5,d--;var e=this,f=16,g=Math.max(1,4/this._stepRatio());this._scrollTimeout=setTimeout(function(){0===d&&(b>f?b=Math.max(f,b/1.5):c=Math.min(g,2*c),d=5),e._continueScrolling(a,b,c,d)},b)},_scrollLeftClick:function(a){return this.options.enabled?(a.preventDefault(),this._bar("startScroll"),this._bindStopScroll(),void this._continueScrolling("scrollLeft",4*this._stepRatio(),1)):!1},_bindStopScroll:function(){var b=this;this._stopScrollHandle=function(a){a.preventDefault(),b._stopScroll()},a(document).bind("mouseup touchend",this._stopScrollHandle)},_stopScroll:function(){a(document).unbind("mouseup touchend",this._stopScrollHandle),this._stopScrollHandle=null,this._bar("stopScroll"),clearTimeout(this._scrollTimeout)},_createRuler:function(){this.ruler=a("
").appendTo(this.innerBar)},_setRulerParameters:function(){this.ruler.ruler({min:this.options.bounds.min,max:this.options.bounds.max,scales:this.options.scales})},_destroyRuler:function(){null!==this.ruler&&a.fn.ruler&&(this.ruler.ruler("destroy"),this.ruler.remove(),this.ruler=null)},_updateRuler:function(){this._destroyRuler(),this.options.scales!==!1&&a.fn.ruler&&(this._createRuler(),this._setRulerParameters())},values:function(a,b){var c;if("undefined"!=typeof a&&"undefined"!=typeof b){if(!this._initialized)return this._values.min=a,this._values.max=b,this._values;this._deactivateLabels(),c=this._bar("values",a,b),this._changed(!0),this._reactivateLabels()}else c=this._bar("values",a,b);return c},min:function(a){return this._values.min=this.values(a,this._values.max).min,this._values.min},max:function(a){return this._values.max=this.values(this._values.min,a).max,this._values.max},bounds:function(a,b){return this._isValidValue(a)&&this._isValidValue(b)&&b>a&&(this._setBounds(a,b),this._updateRuler(),this._changed(!0)),this.options.bounds},_isValidValue:function(a){return"undefined"!=typeof a&&parseFloat(a)===a},_setBounds:function(a,b){this.options.bounds={min:a,max:b},this._leftHandle("option","bounds",this.options.bounds),this._rightHandle("option","bounds",this.options.bounds),this._bar("option","bounds",this.options.bounds)},zoomIn:function(a){this._bar("zoomIn",a)},zoomOut:function(a){this._bar("zoomOut",a)},scrollLeft:function(a){this._bar("startScroll"),this._bar("scrollLeft",a),this._bar("stopScroll")},scrollRight:function(a){this._bar("startScroll"),this._bar("scrollRight",a),this._bar("stopScroll")},resize:function(){this.container&&(this._initWidth(),this._leftHandle("update"),this._rightHandle("update"),this._bar("update"))},enable:function(){this.toggle(!0)},disable:function(){this.toggle(!1)},toggle:function(a){a===b&&(a=!this.options.enabled),this.options.enabled!==a&&this._toggle(a)},_toggle:function(a){this.options.enabled=a,this.element.toggleClass("ui-rangeSlider-disabled",!a);var b=a?"enable":"disable";this._bar(b),this._leftHandle(b),this._rightHandle(b),this._leftLabel(b),this._rightLabel(b)},destroy:function(){this.element.removeClass("ui-rangeSlider-withArrows ui-rangeSlider-noArrow ui-rangeSlider-disabled"),this._destroyWidgets(),this._destroyElements(),this.element.removeClass("ui-rangeSlider"),this.options=null,a(window).unbind("resize",this._resizeProxy),this._resizeProxy=null,this._bindResize=null,this._super()},_destroyWidget:function(a){this["_"+a]("destroy"),this[a].remove(),this[a]=null},_destroyWidgets:function(){this._destroyWidget("bar"),this._destroyWidget("leftHandle"),this._destroyWidget("rightHandle"),this._destroyRuler(),this._destroyLabels()},_destroyElements:function(){this.container.remove(),this.container=null,this.innerBar.remove(),this.innerBar=null,this.arrows.left.remove(),this.arrows.right.remove(),this.arrows=null}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSliderHandle",a.ui.rangeSliderDraggable,{currentMove:null,margin:0,parentElement:null,options:{isLeft:!0,bounds:{min:0,max:100},range:!1,value:0,step:!1},_value:0,_left:0,_create:function(){this._super(),this.element.css("position","absolute").css("top",0).addClass("ui-rangeSlider-handle").toggleClass("ui-rangeSlider-leftHandle",this.options.isLeft).toggleClass("ui-rangeSlider-rightHandle",!this.options.isLeft),this.element.append("
"),this._value=this._constraintValue(this.options.value)},destroy:function(){this.element.empty(),this._super()},_setOption:function(a,b){"isLeft"!==a||b!==!0&&b!==!1||b===this.options.isLeft?"step"===a&&this._checkStep(b)?(this.options.step=b,this.update()):"bounds"===a?(this.options.bounds=b,this.update()):"range"===a&&this._checkRange(b)?(this.options.range=b,this.update()):"symmetricPositionning"===a&&(this.options.symmetricPositionning=b===!0,this.update()):(this.options.isLeft=b,this.element.toggleClass("ui-rangeSlider-leftHandle",this.options.isLeft).toggleClass("ui-rangeSlider-rightHandle",!this.options.isLeft),this._position(this._value),this.element.trigger("switch",this.options.isLeft)),this._super(a,b)},_checkRange:function(a){return a===!1||!this._isValidValue(a.min)&&!this._isValidValue(a.max)},_isValidValue:function(a){return"undefined"!=typeof a&&a!==!1&&parseFloat(a)!==a},_checkStep:function(a){return a===!1||parseFloat(a)===a},_initElement:function(){this._super(),0===this.cache.parent.width||null===this.cache.parent.width?setTimeout(a.proxy(this._initElementIfNotDestroyed,this),500):(this._position(this._value),this._triggerMouseEvent("initialize"))},_bounds:function(){return this.options.bounds},_cache:function(){this._super(),this._cacheParent()},_cacheParent:function(){var a=this.element.parent();this.cache.parent={element:a,offset:a.offset(),padding:{left:this._parsePixels(a,"paddingLeft")},width:a.width()}},_position:function(a){var b=this._getPositionForValue(a);this._applyPosition(b)},_constraintPosition:function(a){var b=this._getValueForPosition(a);return this._getPositionForValue(b)},_applyPosition:function(a){this._super(a),this._left=a,this._setValue(this._getValueForPosition(a)),this._triggerMouseEvent("moving")},_prepareEventData:function(){var a=this._super();return a.value=this._value,a},_setValue:function(a){a!==this._value&&(this._value=a)},_constraintValue:function(a){if(a=Math.min(a,this._bounds().max),a=Math.max(a,this._bounds().min),a=this._round(a),this.options.range!==!1){var b=this.options.range.min||!1,c=this.options.range.max||!1;b!==!1&&(a=Math.max(a,this._round(b))),c!==!1&&(a=Math.min(a,this._round(c))),a=Math.min(a,this._bounds().max),a=Math.max(a,this._bounds().min)}return a},_round:function(a){return this.options.step!==!1&&this.options.step>0?Math.round(a/this.options.step)*this.options.step:a},_getPositionForValue:function(a){if(!this.cache||!this.cache.parent||null===this.cache.parent.offset)return 0;a=this._constraintValue(a);var b=(a-this.options.bounds.min)/(this.options.bounds.max-this.options.bounds.min),c=this.cache.parent.width,d=this.cache.parent.offset.left,e=this.options.isLeft?0:this.cache.width.outer;return this.options.symmetricPositionning?b*(c-2*this.cache.width.outer)+d+e:b*c+d-e},_getValueForPosition:function(a){var b=this._getRawValueForPositionAndBounds(a,this.options.bounds.min,this.options.bounds.max);return this._constraintValue(b)},_getRawValueForPositionAndBounds:function(a,b,c){var d,e,f=null===this.cache.parent.offset?0:this.cache.parent.offset.left;return this.options.symmetricPositionning?(a-=this.options.isLeft?0:this.cache.width.outer,d=this.cache.parent.width-2*this.cache.width.outer):(a+=this.options.isLeft?0:this.cache.width.outer,d=this.cache.parent.width),0===d?this._value:(e=(a-f)/d,e*(c-b)+b)},value:function(a){return"undefined"!=typeof a&&(this._cache(),a=this._constraintValue(a),this._position(a)),this._value},update:function(){this._cache();var a=this._constraintValue(this._value),b=this._getPositionForValue(a);a!==this._value?(this._triggerMouseEvent("updating"),this._position(a),this._triggerMouseEvent("update")):b!==this.cache.offset.left&&(this._triggerMouseEvent("updating"),this._position(a),this._triggerMouseEvent("update"))},position:function(a){return"undefined"!=typeof a&&(this._cache(),a=this._constraintPosition(a),this._applyPosition(a)),this._left},add:function(a,b){return a+b},substract:function(a,b){return a-b},stepsBetween:function(a,b){return this.options.step===!1?b-a:(b-a)/this.options.step},multiplyStep:function(a,b){return a*b},moveRight:function(a){var b;return this.options.step===!1?(b=this._left,this.position(this._left+a),this._left-b):(b=this._value,this.value(this.add(b,this.multiplyStep(this.options.step,a))),this.stepsBetween(b,this._value))},moveLeft:function(a){return-this.moveRight(-a)},stepRatio:function(){if(this.options.step===!1)return 1;var a=(this.options.bounds.max-this.options.bounds.min)/this.options.step;return this.cache.parent.width/a}})}(jQuery),function(a,b){"use strict";function c(a,b){return"undefined"==typeof a?b||!1:a}a.widget("ui.rangeSliderBar",a.ui.rangeSliderDraggable,{options:{leftHandle:null,rightHandle:null,bounds:{min:0,max:100},type:"rangeSliderHandle",range:!1,drag:function(){},stop:function(){},values:{min:0,max:20},wheelSpeed:4,wheelMode:null},_values:{min:0,max:20},_waitingToInit:2,_wheelTimeout:!1,_create:function(){this._super(),this.element.css("position","absolute").css("top",0).addClass("ui-rangeSlider-bar"),this.options.leftHandle.bind("initialize",a.proxy(this._onInitialized,this)).bind("mousestart",a.proxy(this._cache,this)).bind("stop",a.proxy(this._onHandleStop,this)),this.options.rightHandle.bind("initialize",a.proxy(this._onInitialized,this)).bind("mousestart",a.proxy(this._cache,this)).bind("stop",a.proxy(this._onHandleStop,this)),this._bindHandles(),this._values=this.options.values,this._setWheelModeOption(this.options.wheelMode)},destroy:function(){this.options.leftHandle.unbind(".bar"),this.options.rightHandle.unbind(".bar"),this.options=null,this._super()},_setOption:function(a,b){"range"===a?this._setRangeOption(b):"wheelSpeed"===a?this._setWheelSpeedOption(b):"wheelMode"===a&&this._setWheelModeOption(b)},_setRangeOption:function(a){if(("object"!=typeof a||null===a)&&(a=!1),a!==!1||this.options.range!==!1){if(a!==!1){var b=c(a.min,this.options.range.min),d=c(a.max,this.options.range.max);this.options.range={min:b,max:d}}else this.options.range=!1;this._setLeftRange(),this._setRightRange()}},_setWheelSpeedOption:function(a){"number"==typeof a&&0!==a&&(this.options.wheelSpeed=a)},_setWheelModeOption:function(a){(null===a||a===!1||"zoom"===a||"scroll"===a)&&(this.options.wheelMode!==a&&this.element.parent().unbind("mousewheel.bar"),this._bindMouseWheel(a),this.options.wheelMode=a)},_bindMouseWheel:function(b){"zoom"===b?this.element.parent().bind("mousewheel.bar",a.proxy(this._mouseWheelZoom,this)):"scroll"===b&&this.element.parent().bind("mousewheel.bar",a.proxy(this._mouseWheelScroll,this))},_setLeftRange:function(){if(this.options.range===!1)return!1;var a=this._values.max,b={min:!1,max:!1};"undefined"!=typeof this.options.range.min&&this.options.range.min!==!1?b.max=this._leftHandle("substract",a,this.options.range.min):b.max=!1,"undefined"!=typeof this.options.range.max&&this.options.range.max!==!1?b.min=this._leftHandle("substract",a,this.options.range.max):b.min=!1,this._leftHandle("option","range",b)},_setRightRange:function(){var a=this._values.min,b={min:!1,max:!1};"undefined"!=typeof this.options.range.min&&this.options.range.min!==!1?b.min=this._rightHandle("add",a,this.options.range.min):b.min=!1,"undefined"!=typeof this.options.range.max&&this.options.range.max!==!1?b.max=this._rightHandle("add",a,this.options.range.max):b.max=!1,this._rightHandle("option","range",b)},_deactivateRange:function(){this._leftHandle("option","range",!1),this._rightHandle("option","range",!1)},_reactivateRange:function(){this._setRangeOption(this.options.range)},_onInitialized:function(){this._waitingToInit--,0===this._waitingToInit&&this._initMe()},_initMe:function(){this._cache(),this.min(this._values.min),this.max(this._values.max);var a=this._leftHandle("position"),b=this._rightHandle("position")+this.options.rightHandle.width();this.element.offset({left:a}),this.element.css("width",b-a)},_leftHandle:function(){return this._handleProxy(this.options.leftHandle,arguments)},_rightHandle:function(){return this._handleProxy(this.options.rightHandle,arguments)},_handleProxy:function(a,b){var c=Array.prototype.slice.call(b);return a[this.options.type].apply(a,c)},_cache:function(){this._super(),this._cacheHandles()},_cacheHandles:function(){this.cache.rightHandle={},this.cache.rightHandle.width=this.options.rightHandle.width(),this.cache.rightHandle.offset=this.options.rightHandle.offset(),this.cache.leftHandle={},this.cache.leftHandle.offset=this.options.leftHandle.offset()},_mouseStart:function(a){this._super(a),this._deactivateRange()},_mouseStop:function(a){this._super(a),this._cacheHandles(),this._values.min=this._leftHandle("value"),this._values.max=this._rightHandle("value"),this._reactivateRange(),this._leftHandle().trigger("stop"),this._rightHandle().trigger("stop")},_onDragLeftHandle:function(a,b){if(this._cacheIfNecessary(),b.element[0]===this.options.leftHandle[0]){if(this._switchedValues())return this._switchHandles(),void this._onDragRightHandle(a,b);this._values.min=b.value,this.cache.offset.left=b.offset.left,this.cache.leftHandle.offset=b.offset,this._positionBar()}},_onDragRightHandle:function(a,b){if(this._cacheIfNecessary(),b.element[0]===this.options.rightHandle[0]){if(this._switchedValues())return this._switchHandles(),void this._onDragLeftHandle(a,b);this._values.max=b.value,this.cache.rightHandle.offset=b.offset,this._positionBar()}},_positionBar:function(){var a=this.cache.rightHandle.offset.left+this.cache.rightHandle.width-this.cache.leftHandle.offset.left;this.cache.width.inner=a,this.element.css("width",a).offset({left:this.cache.leftHandle.offset.left})},_onHandleStop:function(){this._setLeftRange(),this._setRightRange()},_switchedValues:function(){if(this.min()>this.max()){var a=this._values.min;return this._values.min=this._values.max,this._values.max=a,!0}return!1},_switchHandles:function(){var a=this.options.leftHandle;this.options.leftHandle=this.options.rightHandle,this.options.rightHandle=a,this._leftHandle("option","isLeft",!0),this._rightHandle("option","isLeft",!1),this._bindHandles(),this._cacheHandles()},_bindHandles:function(){this.options.leftHandle.unbind(".bar").bind("sliderDrag.bar update.bar moving.bar",a.proxy(this._onDragLeftHandle,this)),this.options.rightHandle.unbind(".bar").bind("sliderDrag.bar update.bar moving.bar",a.proxy(this._onDragRightHandle,this))},_constraintPosition:function(a){var b,c={};return c.left=this._super(a),c.left=this._leftHandle("position",c.left),b=this._rightHandle("position",c.left+this.cache.width.outer-this.cache.rightHandle.width),c.width=b-c.left+this.cache.rightHandle.width,c},_applyPosition:function(a){this._super(a.left),this.element.width(a.width)},_mouseWheelZoom:function(b,c,d,e){if(!this.enabled)return!1;var f=this._values.min+(this._values.max-this._values.min)/2,g={},h={};return this.options.range===!1||this.options.range.min===!1?(g.max=f,h.min=f):(g.max=f-this.options.range.min/2,h.min=f+this.options.range.min/2),this.options.range!==!1&&this.options.range.max!==!1&&(g.min=f-this.options.range.max/2,h.max=f+this.options.range.max/2),this._leftHandle("option","range",g),this._rightHandle("option","range",h),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(a.proxy(this._wheelStop,this),200),this.zoomIn(e*this.options.wheelSpeed),!1},_mouseWheelScroll:function(b,c,d,e){return this.enabled?(this._wheelTimeout===!1?this.startScroll():clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(a.proxy(this._wheelStop,this),200),this.scrollLeft(e*this.options.wheelSpeed),!1):!1},_wheelStop:function(){this.stopScroll(),this._wheelTimeout=!1},min:function(a){return this._leftHandle("value",a)},max:function(a){return this._rightHandle("value",a)},startScroll:function(){this._deactivateRange()},stopScroll:function(){this._reactivateRange(),this._triggerMouseEvent("stop"),this._leftHandle().trigger("stop"),this._rightHandle().trigger("stop")},scrollLeft:function(a){return a=a||1,0>a?this.scrollRight(-a):(a=this._leftHandle("moveLeft",a),this._rightHandle("moveLeft",a),this.update(),void this._triggerMouseEvent("scroll"))},scrollRight:function(a){return a=a||1,0>a?this.scrollLeft(-a):(a=this._rightHandle("moveRight",a),this._leftHandle("moveRight",a),this.update(),void this._triggerMouseEvent("scroll"))},zoomIn:function(a){if(a=a||1,0>a)return this.zoomOut(-a);var b=this._rightHandle("moveLeft",a);a>b&&(b/=2,this._rightHandle("moveRight",b)),this._leftHandle("moveRight",b),this.update(),this._triggerMouseEvent("zoom")},zoomOut:function(a){if(a=a||1,0>a)return this.zoomIn(-a);var b=this._rightHandle("moveRight",a);a>b&&(b/=2,this._rightHandle("moveLeft",b)),this._leftHandle("moveLeft",b),this.update(),this._triggerMouseEvent("zoom")},values:function(a,b){if("undefined"!=typeof a&&"undefined"!=typeof b){var c=Math.min(a,b),d=Math.max(a,b);this._deactivateRange(),this.options.leftHandle.unbind(".bar"),this.options.rightHandle.unbind(".bar"),this._values.min=this._leftHandle("value",c),this._values.max=this._rightHandle("value",d),this._bindHandles(),this._reactivateRange(),this.update()}return{min:this._values.min,max:this._values.max}},update:function(){this._values.min=this.min(),this._values.max=this.max(),this._cache(),this._positionBar()}})}(jQuery),function(a,b){"use strict";function c(b,c,d,e){this.label1=b,this.label2=c,this.type=d,this.options=e,this.handle1=this.label1[this.type]("option","handle"),this.handle2=this.label2[this.type]("option","handle"),this.cache=null,this.left=b,this.right=c,this.moving=!1,this.initialized=!1,this.updating=!1,this.Init=function(){this.BindHandle(this.handle1),this.BindHandle(this.handle2),"show"===this.options.show?(setTimeout(a.proxy(this.PositionLabels,this),1), +this.initialized=!0):setTimeout(a.proxy(this.AfterInit,this),1e3),this._resizeProxy=a.proxy(this.onWindowResize,this),a(window).resize(this._resizeProxy)},this.Destroy=function(){this._resizeProxy&&(a(window).unbind("resize",this._resizeProxy),this._resizeProxy=null,this.handle1.unbind(".positionner"),this.handle1=null,this.handle2.unbind(".positionner"),this.handle2=null,this.label1=null,this.label2=null,this.left=null,this.right=null),this.cache=null},this.AfterInit=function(){this.initialized=!0},this.Cache=function(){"none"!==this.label1.css("display")&&(this.cache={},this.cache.label1={},this.cache.label2={},this.cache.handle1={},this.cache.handle2={},this.cache.offsetParent={},this.CacheElement(this.label1,this.cache.label1),this.CacheElement(this.label2,this.cache.label2),this.CacheElement(this.handle1,this.cache.handle1),this.CacheElement(this.handle2,this.cache.handle2),this.CacheElement(this.label1.offsetParent(),this.cache.offsetParent))},this.CacheIfNecessary=function(){null===this.cache?this.Cache():(this.CacheWidth(this.label1,this.cache.label1),this.CacheWidth(this.label2,this.cache.label2),this.CacheHeight(this.label1,this.cache.label1),this.CacheHeight(this.label2,this.cache.label2),this.CacheWidth(this.label1.offsetParent(),this.cache.offsetParent))},this.CacheElement=function(a,b){this.CacheWidth(a,b),this.CacheHeight(a,b),b.offset=a.offset(),b.margin={left:this.ParsePixels("marginLeft",a),right:this.ParsePixels("marginRight",a)},b.border={left:this.ParsePixels("borderLeftWidth",a),right:this.ParsePixels("borderRightWidth",a)}},this.CacheWidth=function(a,b){b.width=a.width(),b.outerWidth=a.outerWidth()},this.CacheHeight=function(a,b){b.outerHeightMargin=a.outerHeight(!0)},this.ParsePixels=function(a,b){return parseInt(b.css(a),10)||0},this.BindHandle=function(b){b.bind("updating.positionner",a.proxy(this.onHandleUpdating,this)),b.bind("update.positionner",a.proxy(this.onHandleUpdated,this)),b.bind("moving.positionner",a.proxy(this.onHandleMoving,this)),b.bind("stop.positionner",a.proxy(this.onHandleStop,this))},this.PositionLabels=function(){if(this.CacheIfNecessary(),null!==this.cache){var a=this.GetRawPosition(this.cache.label1,this.cache.handle1),b=this.GetRawPosition(this.cache.label2,this.cache.handle2);this.label1[d]("option","isLeft")?this.ConstraintPositions(a,b):this.ConstraintPositions(b,a),this.PositionLabel(this.label1,a.left,this.cache.label1),this.PositionLabel(this.label2,b.left,this.cache.label2)}},this.PositionLabel=function(a,b,c){var d,e,f,g=this.cache.offsetParent.offset.left+this.cache.offsetParent.border.left;g-b>=0?(a.css("right",""),a.offset({left:b})):(d=g+this.cache.offsetParent.width,e=b+c.margin.left+c.outerWidth+c.margin.right,f=d-e,a.css("left",""),a.css("right",f))},this.ConstraintPositions=function(a,b){(a.centerb.outerLeft||a.center>b.center&&b.outerRight>a.outerLeft)&&(a=this.getLeftPosition(a,b),b=this.getRightPosition(a,b))},this.getLeftPosition=function(a,b){var c=(b.center+a.center)/2,d=c-a.cache.outerWidth-a.cache.margin.right+a.cache.border.left;return a.left=d,a},this.getRightPosition=function(a,b){var c=(b.center+a.center)/2;return b.left=c+b.cache.margin.left+b.cache.border.left,b},this.ShowIfNecessary=function(){"show"===this.options.show||this.moving||!this.initialized||this.updating||(this.label1.stop(!0,!0).fadeIn(this.options.durationIn||0),this.label2.stop(!0,!0).fadeIn(this.options.durationIn||0),this.moving=!0)},this.HideIfNeeded=function(){this.moving===!0&&(this.label1.stop(!0,!0).delay(this.options.delayOut||0).fadeOut(this.options.durationOut||0),this.label2.stop(!0,!0).delay(this.options.delayOut||0).fadeOut(this.options.durationOut||0),this.moving=!1)},this.onHandleMoving=function(a,b){this.ShowIfNecessary(),this.CacheIfNecessary(),this.UpdateHandlePosition(b),this.PositionLabels()},this.onHandleUpdating=function(){this.updating=!0},this.onHandleUpdated=function(){this.updating=!1,this.cache=null},this.onHandleStop=function(){this.HideIfNeeded()},this.onWindowResize=function(){this.cache=null},this.UpdateHandlePosition=function(a){null!==this.cache&&(a.element[0]===this.handle1[0]?this.UpdatePosition(a,this.cache.handle1):this.UpdatePosition(a,this.cache.handle2))},this.UpdatePosition=function(a,b){b.offset=a.offset,b.value=a.value},this.GetRawPosition=function(a,b){var c=b.offset.left+b.outerWidth/2,d=c-a.outerWidth/2,e=d+a.outerWidth-a.border.left-a.border.right,f=d-a.margin.left-a.border.left,g=b.offset.top-a.outerHeightMargin;return{left:d,outerLeft:f,top:g,right:e,outerRight:f+a.outerWidth+a.margin.left+a.margin.right,cache:a,center:c}},this.Init()}a.widget("ui.rangeSliderLabel",a.ui.rangeSliderMouseTouch,{options:{handle:null,formatter:!1,handleType:"rangeSliderHandle",show:"show",durationIn:0,durationOut:500,delayOut:500,isLeft:!1},cache:null,_positionner:null,_valueContainer:null,_innerElement:null,_value:null,_create:function(){this.options.isLeft=this._handle("option","isLeft"),this.element.addClass("ui-rangeSlider-label").css("position","absolute").css("display","block"),this._createElements(),this._toggleClass(),this.options.handle.bind("moving.label",a.proxy(this._onMoving,this)).bind("update.label",a.proxy(this._onUpdate,this)).bind("switch.label",a.proxy(this._onSwitch,this)),"show"!==this.options.show&&this.element.hide(),this._mouseInit()},destroy:function(){this.options.handle.unbind(".label"),this.options.handle=null,this._valueContainer=null,this._innerElement=null,this.element.empty(),this._positionner&&(this._positionner.Destroy(),this._positionner=null),this._super()},_createElements:function(){this._valueContainer=a("
").appendTo(this.element),this._innerElement=a("
").appendTo(this.element)},_handle:function(){var a=Array.prototype.slice.apply(arguments);return this.options.handle[this.options.handleType].apply(this.options.handle,a)},_setOption:function(a,b){"show"===a?this._updateShowOption(b):("durationIn"===a||"durationOut"===a||"delayOut"===a)&&this._updateDurations(a,b),this._setFormatterOption(a,b)},_setFormatterOption:function(a,b){"formatter"===a&&("function"==typeof b||b===!1)&&(this.options.formatter=b,this._display(this._value))},_updateShowOption:function(a){this.options.show=a,"show"!==this.options.show?(this.element.hide(),this._positionner.moving=!1):(this.element.show(),this._display(this.options.handle[this.options.handleType]("value")),this._positionner.PositionLabels()),this._positionner.options.show=this.options.show},_updateDurations:function(a,b){parseInt(b,10)===b&&(this._positionner.options[a]=b,this.options[a]=b)},_display:function(a){this.options.formatter===!1?this._displayText(Math.round(a)):this._displayText(this.options.formatter(a,this.options.isLeft)),this._value=a},_displayText:function(a){this._valueContainer.text(a)},_toggleClass:function(){this.element.toggleClass("ui-rangeSlider-leftLabel",this.options.isLeft).toggleClass("ui-rangeSlider-rightLabel",!this.options.isLeft)},_positionLabels:function(){this._positionner.PositionLabels()},_mouseDown:function(a){this.options.handle.trigger(a)},_mouseUp:function(a){this.options.handle.trigger(a)},_mouseMove:function(a){this.options.handle.trigger(a)},_onMoving:function(a,b){this._display(b.value)},_onUpdate:function(){"show"===this.options.show&&this.update()},_onSwitch:function(a,b){this.options.isLeft=b,this._toggleClass(),this._positionLabels()},pair:function(a){null===this._positionner&&(this._positionner=new c(this.element,a,this.widgetName,{show:this.options.show,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}),a[this.widgetName]("positionner",this._positionner))},positionner:function(a){return"undefined"!=typeof a&&(this._positionner=a),this._positionner},update:function(){this._positionner.cache=null,this._display(this._handle("value")),"show"===this.options.show&&this._positionLabels()}})}(jQuery),function(a,b){"use strict";a.widget("ui.dateRangeSlider",a.ui.rangeSlider,{options:{bounds:{min:new Date(2010,0,1).valueOf(),max:new Date(2012,0,1).valueOf()},defaultValues:{min:new Date(2010,1,11).valueOf(),max:new Date(2011,1,11).valueOf()}},_create:function(){this._super(),this.element.addClass("ui-dateRangeSlider")},destroy:function(){this.element.removeClass("ui-dateRangeSlider"),this._super()},_setDefaultValues:function(){this._values={min:this.options.defaultValues.min.valueOf(),max:this.options.defaultValues.max.valueOf()}},_setRulerParameters:function(){this.ruler.ruler({min:new Date(this.options.bounds.min.valueOf()),max:new Date(this.options.bounds.max.valueOf()),scales:this.options.scales})},_setOption:function(a,b){("defaultValues"===a||"bounds"===a)&&"undefined"!=typeof b&&null!==b&&this._isValidDate(b.min)&&this._isValidDate(b.max)?this._super(a,{min:b.min.valueOf(),max:b.max.valueOf()}):this._super.apply(this,this._toArray(arguments))},_handleType:function(){return"dateRangeSliderHandle"},option:function(a){if("bounds"===a||"defaultValues"===a){var b=this._super.apply(this,this._toArray(arguments));return{min:new Date(b.min),max:new Date(b.max)}}return this._super.apply(this,this._toArray(arguments))},_defaultFormatter:function(a){var b=a.getMonth()+1,c=a.getDate();return""+a.getFullYear()+"-"+(10>b?"0"+b:b)+"-"+(10>c?"0"+c:c)},_getFormatter:function(){var a=this.options.formatter;return(this.options.formatter===!1||null===this.options.formatter)&&(a=this._defaultFormatter.bind(this)),function(a){return function(b,c){return a(new Date(b),c)}}(a)},values:function(a,b){var c=null;return c=this._isValidDate(a)&&this._isValidDate(b)?this._super(a.valueOf(),b.valueOf()):this._super.apply(this,this._toArray(arguments)),{min:new Date(c.min),max:new Date(c.max)}},min:function(a){return this._isValidDate(a)?new Date(this._super(a.valueOf())):new Date(this._super())},max:function(a){return this._isValidDate(a)?new Date(this._super(a.valueOf())):new Date(this._super())},bounds:function(a,b){var c;return c=this._isValidDate(a)&&this._isValidDate(b)?this._super(a.valueOf(),b.valueOf()):this._super.apply(this,this._toArray(arguments)),{min:new Date(c.min),max:new Date(c.max)}},_isValidDate:function(a){return"undefined"!=typeof a&&a instanceof Date},_toArray:function(a){return Array.prototype.slice.call(a)}})}(jQuery),function(a,b){"use strict";a.widget("ui.dateRangeSliderHandle",a.ui.rangeSliderHandle,{_steps:!1,_boundsValues:{},_create:function(){this._createBoundsValues(),this._super()},_getValueForPosition:function(a){var b=this._getRawValueForPositionAndBounds(a,this.options.bounds.min.valueOf(),this.options.bounds.max.valueOf());return this._constraintValue(new Date(b))},_setOption:function(a,b){return"step"===a?(this.options.step=b,this._createSteps(),void this.update()):(this._super(a,b),void("bounds"===a&&this._createBoundsValues()))},_createBoundsValues:function(){this._boundsValues={min:this.options.bounds.min.valueOf(),max:this.options.bounds.max.valueOf()}},_bounds:function(){return this._boundsValues},_createSteps:function(){if(this.options.step===!1||!this._isValidStep())return void(this._steps=!1);var a=new Date(this.options.bounds.min.valueOf()),b=new Date(this.options.bounds.max.valueOf()),c=a,d=0,e=new Date;for(this._steps=[];b>=c&&(1===d||e.valueOf()!==c.valueOf());)e=c,this._steps.push(c.valueOf()),c=this._addStep(a,d,this.options.step),d++;e.valueOf()===c.valueOf()&&(this._steps=!1)},_isValidStep:function(){return"object"==typeof this.options.step},_addStep:function(a,b,c){var d=new Date(a.valueOf());return d=this._addThing(d,"FullYear",b,c.years),d=this._addThing(d,"Month",b,c.months),d=this._addThing(d,"Date",b,7*c.weeks),d=this._addThing(d,"Date",b,c.days),d=this._addThing(d,"Hours",b,c.hours),d=this._addThing(d,"Minutes",b,c.minutes),d=this._addThing(d,"Seconds",b,c.seconds)},_addThing:function(a,b,c,d){return 0===c||0===(d||0)?a:(a["set"+b](a["get"+b]()+c*(d||0)),a)},_round:function(a){if(this._steps===!1)return a;for(var b,c,d=this.options.bounds.max.valueOf(),e=this.options.bounds.min.valueOf(),f=Math.max(0,(a-e)/(d-e)),g=Math.floor(this._steps.length*f);this._steps[g]>a;)g--;for(;g+1=this._steps.length-1?this._steps[this._steps.length-1]:0===g?this._steps[0]:(b=this._steps[g],c=this._steps[g+1],c-a>a-b?b:c)},update:function(){this._createBoundsValues(),this._createSteps(),this._super()},add:function(a,b){return this._addStep(new Date(a),1,b).valueOf()},substract:function(a,b){return this._addStep(new Date(a),-1,b).valueOf()},stepsBetween:function(a,b){if(this.options.step===!1)return b-a;var c=Math.min(a,b),d=Math.max(a,b),e=0,f=!1,g=a>b;for(this.add(c,this.options.step)-c<0&&(f=!0);d>c;)f?d=this.add(d,this.options.step):c=this.add(c,this.options.step),e++;return g?-e:e},multiplyStep:function(a,b){var c={};for(var d in a)a.hasOwnProperty(d)&&(c[d]=a[d]*b);return c},stepRatio:function(){if(this.options.step===!1)return 1;var a=this._steps.length;return this.cache.parent.width/a}})}(jQuery),function(a,b){"use strict";a.widget("ui.editRangeSlider",a.ui.rangeSlider,{options:{type:"text",round:1},_create:function(){this._super(),this.element.addClass("ui-editRangeSlider")},destroy:function(){this.element.removeClass("ui-editRangeSlider"),this._super()},_setOption:function(a,b){("type"===a||"step"===a)&&this._setLabelOption(a,b),"type"===a&&(this.options[a]=null===this.labels.left?b:this._leftLabel("option",a)),this._super(label,handle)},_setLabelOption:function(a,b){null!==this.labels.left&&(this._leftLabel("option",a,b),this._rightLabel("option",a,b))},_labelType:function(){return"editRangeSliderLabel"},_createLabel:function(b,c){var d=this._super(b,c);return null===b&&d.bind("valueChange",a.proxy(this._onValueChange,this)),d},_addPropertiesToParameter:function(a){return a.type=this.options.type,a.step=this.options.step,a.id=this.element.attr("id"),a},_getLabelConstructorParameters:function(a,b){var c=this._super(a,b);return this._addPropertiesToParameter(c)},_getLabelRefreshParameters:function(a,b){var c=this._super(a,b);return this._addPropertiesToParameter(c)},_onValueChange:function(a,b){var c=!1;c=b.isLeft?this._values.min!==this.min(b.value):this._values.max!==this.max(b.value),c&&this._trigger("userValuesChanged")}})}(jQuery),function(a){"use strict";a.widget("ui.editRangeSliderLabel",a.ui.rangeSliderLabel,{options:{type:"text",step:!1,id:""},_input:null,_text:"",_create:function(){this._super(),this._createInput()},_setOption:function(a,b){"type"===a?this._setTypeOption(b):"step"===a&&this._setStepOption(b),this._super(a,b)},_createInput:function(){this._input=a("").addClass("ui-editRangeSlider-inputValue").appendTo(this._valueContainer),this._setInputName(),this._input.bind("keyup",a.proxy(this._onKeyUp,this)),this._input.blur(a.proxy(this._onChange,this)),"number"===this.options.type&&(this.options.step!==!1&&this._input.attr("step",this.options.step),this._input.click(a.proxy(this._onChange,this))),this._input.val(this._text)},_setInputName:function(){var a=this.options.isLeft?"left":"right";this._input.attr("name",this.options.id+a)},_onSwitch:function(a,b){this._super(a,b),this._setInputName()},_destroyInput:function(){this._input.remove(),this._input=null},_onKeyUp:function(a){return 13===a.which?(this._onChange(a),!1):void 0},_onChange:function(){var a=this._returnCheckedValue(this._input.val());a!==!1&&this._triggerValue(a)},_triggerValue:function(a){var b=this.options.handle[this.options.handleType]("option","isLeft");this.element.trigger("valueChange",[{isLeft:b,value:a}])},_returnCheckedValue:function(a){var b=parseFloat(a);return isNaN(b)||isNaN(Number(a))?!1:b},_setTypeOption:function(a){"text"!==a&&"number"!==a||this.options.type===a||(this._destroyInput(),this.options.type=a,this._createInput())},_setStepOption:function(a){this.options.step=a,"number"===this.options.type&&this._input.attr("step",a!==!1?a:"any")},_displayText:function(a){this._input.val(a),this._text=a},enable:function(){this._super(),this._input.attr("disabled",null)},disable:function(){this._super(),this._input.attr("disabled","disabled")}})}(jQuery),function(a){"use strict";var b={first:function(a){return a},next:function(a){return a+1},format:function(){},label:function(a){return Math.round(a)},stop:function(){return!1}};a.widget("ui.ruler",{options:{min:0,max:100,scales:[]},_create:function(){this.element.addClass("ui-ruler"),this._createScales()},destroy:function(){this.element.removeClass("ui-ruler"),this.element.empty(),this._super()},_regenerate:function(){this.element.empty(),this._createScales()},_setOption:function(a,b){return"min"===a||"max"===a&&b!==this.options[a]?(this.options[a]=b,void this._regenerate()):"scales"===a&&b instanceof Array?(this.options.scales=b,void this._regenerate()):void 0},_createScales:function(){if(this.options.max!==this.options.min)for(var a=0;a").appendTo(this.element);f.addClass("ui-ruler-scale"+d),this._createTicks(f,e)},_createTicks:function(a,b){var c,d,e,f=b.first(this.options.min,this.options.max),g=this.options.max-this.options.min,h=!0;do c=f,f=b.next(c),d=(Math.min(f,this.options.max)-Math.max(c,this.options.min))/g,e=this._createTick(c,f,b),a.append(e),e.css("width",100*d+"%"),h&&c>this.options.min&&e.css("margin-left",100*(c-this.options.min)/g+"%"),h=!1;while(!this._stop(b,f))},_stop:function(a,b){return a.stop(b)||b>=this.options.max},_createTick:function(b,c,d){var e=a("
"),f=a("
").appendTo(e),g=a("").appendTo(f);return g.text(d.label(b,c)),d.format(e,b,c),e}})}(jQuery); \ No newline at end of file diff --git a/app/assets/vendored/lib/jqrangeslider/jQDateRangeSlider-min.js b/app/assets/vendored/lib/jqrangeslider/jQDateRangeSlider-min.js new file mode 100644 index 000000000..816e68643 --- /dev/null +++ b/app/assets/vendored/lib/jqrangeslider/jQDateRangeSlider-min.js @@ -0,0 +1,2 @@ +/*! jQRangeSlider 5.8.2 - 2023-10-19 - Copyright (C) Guillaume Gautreau 2012 - MIT and GPLv3 licenses.*/!function(a,b){"use strict";a.widget("ui.rangeSliderMouseTouch",a.ui.mouse,{enabled:!0,_mouseInit:function(){var a=this;this._super(),this._mouseDownEvent=!1,this.element.bind("touchstart."+this.widgetName,function(b){return a._touchStart(b)})},_mouseDestroy:function(){a(document).unbind("touchmove."+this.widgetName,this._touchMoveDelegate).unbind("touchend."+this.widgetName,this._touchEndDelegate),this._super()},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},destroy:function(){this._mouseDestroy(),this._super(),this._mouseInit=null},_touchStart:function(b){if(!this.enabled)return!1;b.which=1,b.preventDefault(),this._fillTouchEvent(b);var c=this,d=this._mouseDownEvent;this._mouseDown(b),d!==this._mouseDownEvent&&(this._touchEndDelegate=function(a){c._touchEnd(a)},this._touchMoveDelegate=function(a){c._touchMove(a)},a(document).bind("touchmove."+this.widgetName,this._touchMoveDelegate).bind("touchend."+this.widgetName,this._touchEndDelegate))},_mouseDown:function(a){return this.enabled?this._super(a):!1},_touchEnd:function(b){this._fillTouchEvent(b),this._mouseUp(b),a(document).unbind("touchmove."+this.widgetName,this._touchMoveDelegate).unbind("touchend."+this.widgetName,this._touchEndDelegate),this._mouseDownEvent=!1,a(document).trigger("mouseup")},_touchMove:function(a){return a.preventDefault(),this._fillTouchEvent(a),this._mouseMove(a)},_fillTouchEvent:function(a){var b;b="undefined"==typeof a.targetTouches&&"undefined"==typeof a.changedTouches?a.originalEvent.targetTouches[0]||a.originalEvent.changedTouches[0]:a.targetTouches[0]||a.changedTouches[0],a.pageX=b.pageX,a.pageY=b.pageY,a.which=1}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSliderDraggable",a.ui.rangeSliderMouseTouch,{cache:null,options:{containment:null},_create:function(){this._super(),setTimeout(a.proxy(this._initElementIfNotDestroyed,this),10)},destroy:function(){this.cache=null,this._super()},_initElementIfNotDestroyed:function(){this._mouseInit&&this._initElement()},_initElement:function(){this._mouseInit(),this._cache()},_setOption:function(b,c){"containment"===b&&(null===c||0===a(c).length?this.options.containment=null:this.options.containment=a(c))},_mouseStart:function(a){return this._cache(),this.cache.click={left:a.pageX,top:a.pageY},this.cache.initialOffset=this.element.offset(),this._triggerMouseEvent("mousestart"),!0},_mouseDrag:function(a){var b=a.pageX-this.cache.click.left;return b=this._constraintPosition(b+this.cache.initialOffset.left),this._applyPosition(b),this._triggerMouseEvent("sliderDrag"),!1},_mouseStop:function(){this._triggerMouseEvent("stop")},_constraintPosition:function(a){return 0!==this.element.parent().length&&null!==this.cache.parent.offset&&(a=Math.min(a,this.cache.parent.offset.left+this.cache.parent.width-this.cache.width.outer),a=Math.max(a,this.cache.parent.offset.left)),a},_applyPosition:function(a){this._cacheIfNecessary();var b={top:this.cache.offset.top,left:a};this.element.offset({left:a}),this.cache.offset=b},_cacheIfNecessary:function(){null===this.cache&&this._cache()},_cache:function(){this.cache={},this._cacheMargins(),this._cacheParent(),this._cacheDimensions(),this.cache.offset=this.element.offset()},_cacheMargins:function(){this.cache.margin={left:this._parsePixels(this.element,"marginLeft"),right:this._parsePixels(this.element,"marginRight"),top:this._parsePixels(this.element,"marginTop"),bottom:this._parsePixels(this.element,"marginBottom")}},_cacheParent:function(){if(null!==this.options.parent){var a=this.element.parent();this.cache.parent={offset:a.offset(),width:a.width()}}else this.cache.parent=null},_cacheDimensions:function(){this.cache.width={outer:this.element.outerWidth(),inner:this.element.width()}},_parsePixels:function(a,b){return parseInt(a.css(b),10)||0},_triggerMouseEvent:function(a){var b=this._prepareEventData();this.element.trigger(a,b)},_prepareEventData:function(){return{element:this.element,offset:this.cache.offset||null}}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSlider",{options:{bounds:{min:0,max:100},defaultValues:{min:20,max:50},wheelMode:null,wheelSpeed:4,arrows:!0,valueLabels:"show",formatter:null,durationIn:0,durationOut:400,delayOut:200,range:{min:!1,max:!1},step:!1,scales:!1,enabled:!0,symmetricPositionning:!1},_values:null,_valuesChanged:!1,_initialized:!1,bar:null,leftHandle:null,rightHandle:null,innerBar:null,container:null,arrows:null,labels:null,changing:{min:!1,max:!1},changed:{min:!1,max:!1},ruler:null,_create:function(){this._super(),this._setDefaultValues(),this.labels={left:null,right:null,leftDisplayed:!0,rightDisplayed:!0},this.arrows={left:null,right:null},this.changing={min:!1,max:!1},this.changed={min:!1,max:!1},this._createElements(),this._bindResize(),setTimeout(a.proxy(this.resize,this),1),setTimeout(a.proxy(this._initValues,this),1)},_setDefaultValues:function(){this._values={min:this.options.defaultValues.min,max:this.options.defaultValues.max}},_bindResize:function(){var b=this;this._resizeProxy=function(a){b.resize(a)},a(window).resize(this._resizeProxy)},_initWidth:function(){this.container.css("width",this.element.width()-this.container.outerWidth(!0)+this.container.width()),this.innerBar.css("width",this.container.width()-this.innerBar.outerWidth(!0)+this.innerBar.width())},_initValues:function(){this._initialized=!0,this.values(this._values.min,this._values.max)},_setOption:function(a,b){this._setWheelOption(a,b),this._setArrowsOption(a,b),this._setLabelsOption(a,b),this._setLabelsDurations(a,b),this._setFormatterOption(a,b),this._setBoundsOption(a,b),this._setRangeOption(a,b),this._setStepOption(a,b),this._setScalesOption(a,b),this._setEnabledOption(a,b),this._setPositionningOption(a,b)},_validProperty:function(a,b,c){return null===a||"undefined"==typeof a[b]?c:a[b]},_setStepOption:function(a,b){"step"===a&&(this.options.step=b,this._leftHandle("option","step",b),this._rightHandle("option","step",b),this._changed(!0))},_setScalesOption:function(a,b){"scales"===a&&(b===!1||null===b?(this.options.scales=!1,this._destroyRuler()):b instanceof Array&&(this.options.scales=b,this._updateRuler()))},_setRangeOption:function(a,b){"range"===a&&(this._bar("option","range",b),this.options.range=this._bar("option","range"),this._changed(!0))},_setBoundsOption:function(a,b){"bounds"===a&&"undefined"!=typeof b.min&&"undefined"!=typeof b.max&&this.bounds(b.min,b.max)},_setWheelOption:function(a,b){("wheelMode"===a||"wheelSpeed"===a)&&(this._bar("option",a,b),this.options[a]=this._bar("option",a))},_setLabelsOption:function(a,b){if("valueLabels"===a){if("hide"!==b&&"show"!==b&&"change"!==b)return;this.options.valueLabels=b,"hide"!==b?(this._createLabels(),this._leftLabel("update"),this._rightLabel("update")):this._destroyLabels()}},_setFormatterOption:function(a,b){"formatter"===a&&null!==b&&"function"==typeof b&&"hide"!==this.options.valueLabels&&(this._leftLabel("option","formatter",b),this.options.formatter=this._rightLabel("option","formatter",b))},_setArrowsOption:function(a,b){"arrows"!==a||b!==!0&&b!==!1||b===this.options.arrows||(b===!0?(this.element.removeClass("ui-rangeSlider-noArrow").addClass("ui-rangeSlider-withArrows"),this.arrows.left.css("display","block"),this.arrows.right.css("display","block"),this.options.arrows=!0):b===!1&&(this.element.addClass("ui-rangeSlider-noArrow").removeClass("ui-rangeSlider-withArrows"),this.arrows.left.css("display","none"),this.arrows.right.css("display","none"),this.options.arrows=!1),this._initWidth())},_setLabelsDurations:function(a,b){if("durationIn"===a||"durationOut"===a||"delayOut"===a){if(parseInt(b,10)!==b)return;null!==this.labels.left&&this._leftLabel("option",a,b),null!==this.labels.right&&this._rightLabel("option",a,b),this.options[a]=b}},_setEnabledOption:function(a,b){"enabled"===a&&this.toggle(b)},_setPositionningOption:function(a,b){"symmetricPositionning"===a&&(this._rightHandle("option",a,b),this.options[a]=this._leftHandle("option",a,b))},_createElements:function(){"absolute"!==this.element.css("position")&&this.element.css("position","relative"),this.element.addClass("ui-rangeSlider"),this.container=a("
").css("position","absolute").appendTo(this.element),this.innerBar=a("
").css("position","absolute").css("top",0).css("left",0),this._createHandles(),this._createBar(),this.container.prepend(this.innerBar),this._createArrows(),"hide"!==this.options.valueLabels?this._createLabels():this._destroyLabels(),this._updateRuler(),this.options.enabled||this._toggle(this.options.enabled)},_createHandle:function(b){return a("
")[this._handleType()](b).bind("sliderDrag",a.proxy(this._changing,this)).bind("stop",a.proxy(this._changed,this))},_createHandles:function(){this.leftHandle=this._createHandle({isLeft:!0,bounds:this.options.bounds,value:this._values.min,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container),this.rightHandle=this._createHandle({isLeft:!1,bounds:this.options.bounds,value:this._values.max,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container)},_createBar:function(){this.bar=a("
").prependTo(this.container).bind("sliderDrag scroll zoom",a.proxy(this._changing,this)).bind("stop",a.proxy(this._changed,this)),this._bar({leftHandle:this.leftHandle,rightHandle:this.rightHandle,values:{min:this._values.min,max:this._values.max},type:this._handleType(),range:this.options.range,wheelMode:this.options.wheelMode,wheelSpeed:this.options.wheelSpeed}),this.options.range=this._bar("option","range"),this.options.wheelMode=this._bar("option","wheelMode"),this.options.wheelSpeed=this._bar("option","wheelSpeed")},_createArrows:function(){this.arrows.left=this._createArrow("left"),this.arrows.right=this._createArrow("right"),this.options.arrows?this.element.addClass("ui-rangeSlider-withArrows"):(this.arrows.left.css("display","none"),this.arrows.right.css("display","none"),this.element.addClass("ui-rangeSlider-noArrow"))},_createArrow:function(b){var c,d=a("
").append("
").addClass("ui-rangeSlider-"+b+"Arrow").css("position","absolute").css(b,0).appendTo(this.element);return c="right"===b?a.proxy(this._scrollRightClick,this):a.proxy(this._scrollLeftClick,this),d.bind("mousedown touchstart",c),d},_proxy:function(a,b,c){var d=Array.prototype.slice.call(c);return a&&a[b]?a[b].apply(a,d):null},_handleType:function(){return"rangeSliderHandle"},_barType:function(){return"rangeSliderBar"},_bar:function(){return this._proxy(this.bar,this._barType(),arguments)},_labelType:function(){return"rangeSliderLabel"},_leftLabel:function(){return this._proxy(this.labels.left,this._labelType(),arguments)},_rightLabel:function(){return this._proxy(this.labels.right,this._labelType(),arguments)},_leftHandle:function(){return this._proxy(this.leftHandle,this._handleType(),arguments)},_rightHandle:function(){return this._proxy(this.rightHandle,this._handleType(),arguments)},_getValue:function(a,b){return b===this.rightHandle&&(a-=b.outerWidth()),a*(this.options.bounds.max-this.options.bounds.min)/(this.container.innerWidth()-b.outerWidth(!0))+this.options.bounds.min},_trigger:function(a){var b=this;setTimeout(function(){b.element.trigger(a,{label:b.element,values:b.values()})},1)},_changing:function(){this._updateValues()&&(this._trigger("valuesChanging"),this._valuesChanged=!0)},_deactivateLabels:function(){"change"===this.options.valueLabels&&(this._leftLabel("option","show","hide"),this._rightLabel("option","show","hide"))},_reactivateLabels:function(){"change"===this.options.valueLabels&&(this._leftLabel("option","show","change"),this._rightLabel("option","show","change"))},_changed:function(a){a===!0&&this._deactivateLabels(),(this._updateValues()||this._valuesChanged)&&(this._trigger("valuesChanged"),a!==!0&&this._trigger("userValuesChanged"),this._valuesChanged=!1),a===!0&&this._reactivateLabels()},_updateValues:function(){var a=this._leftHandle("value"),b=this._rightHandle("value"),c=this._min(a,b),d=this._max(a,b),e=c!==this._values.min||d!==this._values.max;return this._values.min=this._min(a,b),this._values.max=this._max(a,b),e},_min:function(a,b){return Math.min(a,b)},_max:function(a,b){return Math.max(a,b)},_createLabel:function(b,c){var d;return null===b?(d=this._getLabelConstructorParameters(b,c),b=a("
").appendTo(this.element)[this._labelType()](d)):(d=this._getLabelRefreshParameters(b,c),b[this._labelType()](d)),b},_getLabelConstructorParameters:function(a,b){return{handle:b,handleType:this._handleType(),formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getLabelRefreshParameters:function(){return{formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getFormatter:function(){return this.options.formatter===!1||null===this.options.formatter?this._defaultFormatter.bind(this):this.options.formatter},_defaultFormatter:function(a){return Math.round(a)},_destroyLabel:function(a){return null!==a&&(a[this._labelType()]("destroy"),a.remove(),a=null),a},_createLabels:function(){this.labels.left=this._createLabel(this.labels.left,this.leftHandle),this.labels.right=this._createLabel(this.labels.right,this.rightHandle),this._leftLabel("pair",this.labels.right)},_destroyLabels:function(){this.labels.left=this._destroyLabel(this.labels.left),this.labels.right=this._destroyLabel(this.labels.right)},_stepRatio:function(){return this._leftHandle("stepRatio")},_scrollRightClick:function(a){return this.options.enabled?(a.preventDefault(),this._bar("startScroll"),this._bindStopScroll(),void this._continueScrolling("scrollRight",4*this._stepRatio(),1)):!1},_continueScrolling:function(a,b,c,d){if(!this.options.enabled)return!1;this._bar(a,c),d=d||5,d--;var e=this,f=16,g=Math.max(1,4/this._stepRatio());this._scrollTimeout=setTimeout(function(){0===d&&(b>f?b=Math.max(f,b/1.5):c=Math.min(g,2*c),d=5),e._continueScrolling(a,b,c,d)},b)},_scrollLeftClick:function(a){return this.options.enabled?(a.preventDefault(),this._bar("startScroll"),this._bindStopScroll(),void this._continueScrolling("scrollLeft",4*this._stepRatio(),1)):!1},_bindStopScroll:function(){var b=this;this._stopScrollHandle=function(a){a.preventDefault(),b._stopScroll()},a(document).bind("mouseup touchend",this._stopScrollHandle)},_stopScroll:function(){a(document).unbind("mouseup touchend",this._stopScrollHandle),this._stopScrollHandle=null,this._bar("stopScroll"),clearTimeout(this._scrollTimeout)},_createRuler:function(){this.ruler=a("
").appendTo(this.innerBar)},_setRulerParameters:function(){this.ruler.ruler({min:this.options.bounds.min,max:this.options.bounds.max,scales:this.options.scales})},_destroyRuler:function(){null!==this.ruler&&a.fn.ruler&&(this.ruler.ruler("destroy"),this.ruler.remove(),this.ruler=null)},_updateRuler:function(){this._destroyRuler(),this.options.scales!==!1&&a.fn.ruler&&(this._createRuler(),this._setRulerParameters())},values:function(a,b){var c;if("undefined"!=typeof a&&"undefined"!=typeof b){if(!this._initialized)return this._values.min=a,this._values.max=b,this._values;this._deactivateLabels(),c=this._bar("values",a,b),this._changed(!0),this._reactivateLabels()}else c=this._bar("values",a,b);return c},min:function(a){return this._values.min=this.values(a,this._values.max).min,this._values.min},max:function(a){return this._values.max=this.values(this._values.min,a).max,this._values.max},bounds:function(a,b){return this._isValidValue(a)&&this._isValidValue(b)&&b>a&&(this._setBounds(a,b),this._updateRuler(),this._changed(!0)),this.options.bounds},_isValidValue:function(a){return"undefined"!=typeof a&&parseFloat(a)===a},_setBounds:function(a,b){this.options.bounds={min:a,max:b},this._leftHandle("option","bounds",this.options.bounds),this._rightHandle("option","bounds",this.options.bounds),this._bar("option","bounds",this.options.bounds)},zoomIn:function(a){this._bar("zoomIn",a)},zoomOut:function(a){this._bar("zoomOut",a)},scrollLeft:function(a){this._bar("startScroll"),this._bar("scrollLeft",a),this._bar("stopScroll")},scrollRight:function(a){this._bar("startScroll"),this._bar("scrollRight",a),this._bar("stopScroll")},resize:function(){this.container&&(this._initWidth(),this._leftHandle("update"),this._rightHandle("update"),this._bar("update"))},enable:function(){this.toggle(!0)},disable:function(){this.toggle(!1)},toggle:function(a){a===b&&(a=!this.options.enabled),this.options.enabled!==a&&this._toggle(a)},_toggle:function(a){this.options.enabled=a,this.element.toggleClass("ui-rangeSlider-disabled",!a);var b=a?"enable":"disable";this._bar(b),this._leftHandle(b),this._rightHandle(b),this._leftLabel(b),this._rightLabel(b)},destroy:function(){this.element.removeClass("ui-rangeSlider-withArrows ui-rangeSlider-noArrow ui-rangeSlider-disabled"),this._destroyWidgets(),this._destroyElements(),this.element.removeClass("ui-rangeSlider"),this.options=null,a(window).unbind("resize",this._resizeProxy),this._resizeProxy=null,this._bindResize=null,this._super()},_destroyWidget:function(a){this["_"+a]("destroy"),this[a].remove(),this[a]=null},_destroyWidgets:function(){this._destroyWidget("bar"),this._destroyWidget("leftHandle"),this._destroyWidget("rightHandle"),this._destroyRuler(),this._destroyLabels()},_destroyElements:function(){this.container.remove(),this.container=null,this.innerBar.remove(),this.innerBar=null,this.arrows.left.remove(),this.arrows.right.remove(),this.arrows=null}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSliderHandle",a.ui.rangeSliderDraggable,{currentMove:null,margin:0,parentElement:null,options:{isLeft:!0,bounds:{min:0,max:100},range:!1,value:0,step:!1},_value:0,_left:0,_create:function(){this._super(),this.element.css("position","absolute").css("top",0).addClass("ui-rangeSlider-handle").toggleClass("ui-rangeSlider-leftHandle",this.options.isLeft).toggleClass("ui-rangeSlider-rightHandle",!this.options.isLeft),this.element.append("
"),this._value=this._constraintValue(this.options.value)},destroy:function(){this.element.empty(),this._super()},_setOption:function(a,b){"isLeft"!==a||b!==!0&&b!==!1||b===this.options.isLeft?"step"===a&&this._checkStep(b)?(this.options.step=b,this.update()):"bounds"===a?(this.options.bounds=b,this.update()):"range"===a&&this._checkRange(b)?(this.options.range=b,this.update()):"symmetricPositionning"===a&&(this.options.symmetricPositionning=b===!0,this.update()):(this.options.isLeft=b,this.element.toggleClass("ui-rangeSlider-leftHandle",this.options.isLeft).toggleClass("ui-rangeSlider-rightHandle",!this.options.isLeft),this._position(this._value),this.element.trigger("switch",this.options.isLeft)),this._super(a,b)},_checkRange:function(a){return a===!1||!this._isValidValue(a.min)&&!this._isValidValue(a.max)},_isValidValue:function(a){return"undefined"!=typeof a&&a!==!1&&parseFloat(a)!==a},_checkStep:function(a){return a===!1||parseFloat(a)===a},_initElement:function(){this._super(),0===this.cache.parent.width||null===this.cache.parent.width?setTimeout(a.proxy(this._initElementIfNotDestroyed,this),500):(this._position(this._value),this._triggerMouseEvent("initialize"))},_bounds:function(){return this.options.bounds},_cache:function(){this._super(),this._cacheParent()},_cacheParent:function(){var a=this.element.parent();this.cache.parent={element:a,offset:a.offset(),padding:{left:this._parsePixels(a,"paddingLeft")},width:a.width()}},_position:function(a){var b=this._getPositionForValue(a);this._applyPosition(b)},_constraintPosition:function(a){var b=this._getValueForPosition(a);return this._getPositionForValue(b)},_applyPosition:function(a){this._super(a),this._left=a,this._setValue(this._getValueForPosition(a)),this._triggerMouseEvent("moving")},_prepareEventData:function(){var a=this._super();return a.value=this._value,a},_setValue:function(a){a!==this._value&&(this._value=a)},_constraintValue:function(a){if(a=Math.min(a,this._bounds().max),a=Math.max(a,this._bounds().min),a=this._round(a),this.options.range!==!1){var b=this.options.range.min||!1,c=this.options.range.max||!1;b!==!1&&(a=Math.max(a,this._round(b))),c!==!1&&(a=Math.min(a,this._round(c))),a=Math.min(a,this._bounds().max),a=Math.max(a,this._bounds().min)}return a},_round:function(a){return this.options.step!==!1&&this.options.step>0?Math.round(a/this.options.step)*this.options.step:a},_getPositionForValue:function(a){if(!this.cache||!this.cache.parent||null===this.cache.parent.offset)return 0;a=this._constraintValue(a);var b=(a-this.options.bounds.min)/(this.options.bounds.max-this.options.bounds.min),c=this.cache.parent.width,d=this.cache.parent.offset.left,e=this.options.isLeft?0:this.cache.width.outer;return this.options.symmetricPositionning?b*(c-2*this.cache.width.outer)+d+e:b*c+d-e},_getValueForPosition:function(a){var b=this._getRawValueForPositionAndBounds(a,this.options.bounds.min,this.options.bounds.max);return this._constraintValue(b)},_getRawValueForPositionAndBounds:function(a,b,c){var d,e,f=null===this.cache.parent.offset?0:this.cache.parent.offset.left;return this.options.symmetricPositionning?(a-=this.options.isLeft?0:this.cache.width.outer,d=this.cache.parent.width-2*this.cache.width.outer):(a+=this.options.isLeft?0:this.cache.width.outer,d=this.cache.parent.width),0===d?this._value:(e=(a-f)/d,e*(c-b)+b)},value:function(a){return"undefined"!=typeof a&&(this._cache(),a=this._constraintValue(a),this._position(a)),this._value},update:function(){this._cache();var a=this._constraintValue(this._value),b=this._getPositionForValue(a);a!==this._value?(this._triggerMouseEvent("updating"),this._position(a),this._triggerMouseEvent("update")):b!==this.cache.offset.left&&(this._triggerMouseEvent("updating"),this._position(a),this._triggerMouseEvent("update"))},position:function(a){return"undefined"!=typeof a&&(this._cache(),a=this._constraintPosition(a),this._applyPosition(a)),this._left},add:function(a,b){return a+b},substract:function(a,b){return a-b},stepsBetween:function(a,b){return this.options.step===!1?b-a:(b-a)/this.options.step},multiplyStep:function(a,b){return a*b},moveRight:function(a){var b;return this.options.step===!1?(b=this._left,this.position(this._left+a),this._left-b):(b=this._value,this.value(this.add(b,this.multiplyStep(this.options.step,a))),this.stepsBetween(b,this._value))},moveLeft:function(a){return-this.moveRight(-a)},stepRatio:function(){if(this.options.step===!1)return 1;var a=(this.options.bounds.max-this.options.bounds.min)/this.options.step;return this.cache.parent.width/a}})}(jQuery),function(a,b){"use strict";function c(a,b){return"undefined"==typeof a?b||!1:a}a.widget("ui.rangeSliderBar",a.ui.rangeSliderDraggable,{options:{leftHandle:null,rightHandle:null,bounds:{min:0,max:100},type:"rangeSliderHandle",range:!1,drag:function(){},stop:function(){},values:{min:0,max:20},wheelSpeed:4,wheelMode:null},_values:{min:0,max:20},_waitingToInit:2,_wheelTimeout:!1,_create:function(){this._super(),this.element.css("position","absolute").css("top",0).addClass("ui-rangeSlider-bar"),this.options.leftHandle.bind("initialize",a.proxy(this._onInitialized,this)).bind("mousestart",a.proxy(this._cache,this)).bind("stop",a.proxy(this._onHandleStop,this)),this.options.rightHandle.bind("initialize",a.proxy(this._onInitialized,this)).bind("mousestart",a.proxy(this._cache,this)).bind("stop",a.proxy(this._onHandleStop,this)),this._bindHandles(),this._values=this.options.values,this._setWheelModeOption(this.options.wheelMode)},destroy:function(){this.options.leftHandle.unbind(".bar"),this.options.rightHandle.unbind(".bar"),this.options=null,this._super()},_setOption:function(a,b){"range"===a?this._setRangeOption(b):"wheelSpeed"===a?this._setWheelSpeedOption(b):"wheelMode"===a&&this._setWheelModeOption(b)},_setRangeOption:function(a){if(("object"!=typeof a||null===a)&&(a=!1),a!==!1||this.options.range!==!1){if(a!==!1){var b=c(a.min,this.options.range.min),d=c(a.max,this.options.range.max);this.options.range={min:b,max:d}}else this.options.range=!1;this._setLeftRange(),this._setRightRange()}},_setWheelSpeedOption:function(a){"number"==typeof a&&0!==a&&(this.options.wheelSpeed=a)},_setWheelModeOption:function(a){(null===a||a===!1||"zoom"===a||"scroll"===a)&&(this.options.wheelMode!==a&&this.element.parent().unbind("mousewheel.bar"),this._bindMouseWheel(a),this.options.wheelMode=a)},_bindMouseWheel:function(b){"zoom"===b?this.element.parent().bind("mousewheel.bar",a.proxy(this._mouseWheelZoom,this)):"scroll"===b&&this.element.parent().bind("mousewheel.bar",a.proxy(this._mouseWheelScroll,this))},_setLeftRange:function(){if(this.options.range===!1)return!1;var a=this._values.max,b={min:!1,max:!1};"undefined"!=typeof this.options.range.min&&this.options.range.min!==!1?b.max=this._leftHandle("substract",a,this.options.range.min):b.max=!1,"undefined"!=typeof this.options.range.max&&this.options.range.max!==!1?b.min=this._leftHandle("substract",a,this.options.range.max):b.min=!1,this._leftHandle("option","range",b)},_setRightRange:function(){var a=this._values.min,b={min:!1,max:!1};"undefined"!=typeof this.options.range.min&&this.options.range.min!==!1?b.min=this._rightHandle("add",a,this.options.range.min):b.min=!1,"undefined"!=typeof this.options.range.max&&this.options.range.max!==!1?b.max=this._rightHandle("add",a,this.options.range.max):b.max=!1,this._rightHandle("option","range",b)},_deactivateRange:function(){this._leftHandle("option","range",!1),this._rightHandle("option","range",!1)},_reactivateRange:function(){this._setRangeOption(this.options.range)},_onInitialized:function(){this._waitingToInit--,0===this._waitingToInit&&this._initMe()},_initMe:function(){this._cache(),this.min(this._values.min),this.max(this._values.max);var a=this._leftHandle("position"),b=this._rightHandle("position")+this.options.rightHandle.width();this.element.offset({left:a}),this.element.css("width",b-a)},_leftHandle:function(){return this._handleProxy(this.options.leftHandle,arguments)},_rightHandle:function(){return this._handleProxy(this.options.rightHandle,arguments)},_handleProxy:function(a,b){var c=Array.prototype.slice.call(b);return a[this.options.type].apply(a,c)},_cache:function(){this._super(),this._cacheHandles()},_cacheHandles:function(){this.cache.rightHandle={},this.cache.rightHandle.width=this.options.rightHandle.width(),this.cache.rightHandle.offset=this.options.rightHandle.offset(),this.cache.leftHandle={},this.cache.leftHandle.offset=this.options.leftHandle.offset()},_mouseStart:function(a){this._super(a),this._deactivateRange()},_mouseStop:function(a){this._super(a),this._cacheHandles(),this._values.min=this._leftHandle("value"),this._values.max=this._rightHandle("value"),this._reactivateRange(),this._leftHandle().trigger("stop"),this._rightHandle().trigger("stop")},_onDragLeftHandle:function(a,b){if(this._cacheIfNecessary(),b.element[0]===this.options.leftHandle[0]){if(this._switchedValues())return this._switchHandles(),void this._onDragRightHandle(a,b);this._values.min=b.value,this.cache.offset.left=b.offset.left,this.cache.leftHandle.offset=b.offset,this._positionBar()}},_onDragRightHandle:function(a,b){if(this._cacheIfNecessary(),b.element[0]===this.options.rightHandle[0]){if(this._switchedValues())return this._switchHandles(),void this._onDragLeftHandle(a,b);this._values.max=b.value,this.cache.rightHandle.offset=b.offset,this._positionBar()}},_positionBar:function(){var a=this.cache.rightHandle.offset.left+this.cache.rightHandle.width-this.cache.leftHandle.offset.left;this.cache.width.inner=a,this.element.css("width",a).offset({left:this.cache.leftHandle.offset.left})},_onHandleStop:function(){this._setLeftRange(),this._setRightRange()},_switchedValues:function(){if(this.min()>this.max()){var a=this._values.min;return this._values.min=this._values.max,this._values.max=a,!0}return!1},_switchHandles:function(){var a=this.options.leftHandle;this.options.leftHandle=this.options.rightHandle,this.options.rightHandle=a,this._leftHandle("option","isLeft",!0),this._rightHandle("option","isLeft",!1),this._bindHandles(),this._cacheHandles()},_bindHandles:function(){this.options.leftHandle.unbind(".bar").bind("sliderDrag.bar update.bar moving.bar",a.proxy(this._onDragLeftHandle,this)),this.options.rightHandle.unbind(".bar").bind("sliderDrag.bar update.bar moving.bar",a.proxy(this._onDragRightHandle,this))},_constraintPosition:function(a){var b,c={};return c.left=this._super(a),c.left=this._leftHandle("position",c.left),b=this._rightHandle("position",c.left+this.cache.width.outer-this.cache.rightHandle.width),c.width=b-c.left+this.cache.rightHandle.width,c},_applyPosition:function(a){this._super(a.left),this.element.width(a.width)},_mouseWheelZoom:function(b,c,d,e){if(!this.enabled)return!1;var f=this._values.min+(this._values.max-this._values.min)/2,g={},h={};return this.options.range===!1||this.options.range.min===!1?(g.max=f,h.min=f):(g.max=f-this.options.range.min/2,h.min=f+this.options.range.min/2),this.options.range!==!1&&this.options.range.max!==!1&&(g.min=f-this.options.range.max/2,h.max=f+this.options.range.max/2),this._leftHandle("option","range",g),this._rightHandle("option","range",h),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(a.proxy(this._wheelStop,this),200),this.zoomIn(e*this.options.wheelSpeed),!1},_mouseWheelScroll:function(b,c,d,e){return this.enabled?(this._wheelTimeout===!1?this.startScroll():clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(a.proxy(this._wheelStop,this),200),this.scrollLeft(e*this.options.wheelSpeed),!1):!1},_wheelStop:function(){this.stopScroll(),this._wheelTimeout=!1},min:function(a){return this._leftHandle("value",a)},max:function(a){return this._rightHandle("value",a)},startScroll:function(){this._deactivateRange()},stopScroll:function(){this._reactivateRange(),this._triggerMouseEvent("stop"),this._leftHandle().trigger("stop"),this._rightHandle().trigger("stop")},scrollLeft:function(a){return a=a||1,0>a?this.scrollRight(-a):(a=this._leftHandle("moveLeft",a),this._rightHandle("moveLeft",a),this.update(),void this._triggerMouseEvent("scroll"))},scrollRight:function(a){return a=a||1,0>a?this.scrollLeft(-a):(a=this._rightHandle("moveRight",a),this._leftHandle("moveRight",a),this.update(),void this._triggerMouseEvent("scroll"))},zoomIn:function(a){if(a=a||1,0>a)return this.zoomOut(-a);var b=this._rightHandle("moveLeft",a);a>b&&(b/=2,this._rightHandle("moveRight",b)),this._leftHandle("moveRight",b),this.update(),this._triggerMouseEvent("zoom")},zoomOut:function(a){if(a=a||1,0>a)return this.zoomIn(-a);var b=this._rightHandle("moveRight",a);a>b&&(b/=2,this._rightHandle("moveLeft",b)),this._leftHandle("moveLeft",b),this.update(),this._triggerMouseEvent("zoom")},values:function(a,b){if("undefined"!=typeof a&&"undefined"!=typeof b){var c=Math.min(a,b),d=Math.max(a,b);this._deactivateRange(),this.options.leftHandle.unbind(".bar"),this.options.rightHandle.unbind(".bar"),this._values.min=this._leftHandle("value",c),this._values.max=this._rightHandle("value",d),this._bindHandles(),this._reactivateRange(),this.update()}return{min:this._values.min,max:this._values.max}},update:function(){this._values.min=this.min(),this._values.max=this.max(),this._cache(),this._positionBar()}})}(jQuery),function(a,b){"use strict";function c(b,c,d,e){this.label1=b,this.label2=c,this.type=d,this.options=e,this.handle1=this.label1[this.type]("option","handle"),this.handle2=this.label2[this.type]("option","handle"),this.cache=null,this.left=b,this.right=c,this.moving=!1,this.initialized=!1,this.updating=!1,this.Init=function(){this.BindHandle(this.handle1),this.BindHandle(this.handle2),"show"===this.options.show?(setTimeout(a.proxy(this.PositionLabels,this),1), +this.initialized=!0):setTimeout(a.proxy(this.AfterInit,this),1e3),this._resizeProxy=a.proxy(this.onWindowResize,this),a(window).resize(this._resizeProxy)},this.Destroy=function(){this._resizeProxy&&(a(window).unbind("resize",this._resizeProxy),this._resizeProxy=null,this.handle1.unbind(".positionner"),this.handle1=null,this.handle2.unbind(".positionner"),this.handle2=null,this.label1=null,this.label2=null,this.left=null,this.right=null),this.cache=null},this.AfterInit=function(){this.initialized=!0},this.Cache=function(){"none"!==this.label1.css("display")&&(this.cache={},this.cache.label1={},this.cache.label2={},this.cache.handle1={},this.cache.handle2={},this.cache.offsetParent={},this.CacheElement(this.label1,this.cache.label1),this.CacheElement(this.label2,this.cache.label2),this.CacheElement(this.handle1,this.cache.handle1),this.CacheElement(this.handle2,this.cache.handle2),this.CacheElement(this.label1.offsetParent(),this.cache.offsetParent))},this.CacheIfNecessary=function(){null===this.cache?this.Cache():(this.CacheWidth(this.label1,this.cache.label1),this.CacheWidth(this.label2,this.cache.label2),this.CacheHeight(this.label1,this.cache.label1),this.CacheHeight(this.label2,this.cache.label2),this.CacheWidth(this.label1.offsetParent(),this.cache.offsetParent))},this.CacheElement=function(a,b){this.CacheWidth(a,b),this.CacheHeight(a,b),b.offset=a.offset(),b.margin={left:this.ParsePixels("marginLeft",a),right:this.ParsePixels("marginRight",a)},b.border={left:this.ParsePixels("borderLeftWidth",a),right:this.ParsePixels("borderRightWidth",a)}},this.CacheWidth=function(a,b){b.width=a.width(),b.outerWidth=a.outerWidth()},this.CacheHeight=function(a,b){b.outerHeightMargin=a.outerHeight(!0)},this.ParsePixels=function(a,b){return parseInt(b.css(a),10)||0},this.BindHandle=function(b){b.bind("updating.positionner",a.proxy(this.onHandleUpdating,this)),b.bind("update.positionner",a.proxy(this.onHandleUpdated,this)),b.bind("moving.positionner",a.proxy(this.onHandleMoving,this)),b.bind("stop.positionner",a.proxy(this.onHandleStop,this))},this.PositionLabels=function(){if(this.CacheIfNecessary(),null!==this.cache){var a=this.GetRawPosition(this.cache.label1,this.cache.handle1),b=this.GetRawPosition(this.cache.label2,this.cache.handle2);this.label1[d]("option","isLeft")?this.ConstraintPositions(a,b):this.ConstraintPositions(b,a),this.PositionLabel(this.label1,a.left,this.cache.label1),this.PositionLabel(this.label2,b.left,this.cache.label2)}},this.PositionLabel=function(a,b,c){var d,e,f,g=this.cache.offsetParent.offset.left+this.cache.offsetParent.border.left;g-b>=0?(a.css("right",""),a.offset({left:b})):(d=g+this.cache.offsetParent.width,e=b+c.margin.left+c.outerWidth+c.margin.right,f=d-e,a.css("left",""),a.css("right",f))},this.ConstraintPositions=function(a,b){(a.centerb.outerLeft||a.center>b.center&&b.outerRight>a.outerLeft)&&(a=this.getLeftPosition(a,b),b=this.getRightPosition(a,b))},this.getLeftPosition=function(a,b){var c=(b.center+a.center)/2,d=c-a.cache.outerWidth-a.cache.margin.right+a.cache.border.left;return a.left=d,a},this.getRightPosition=function(a,b){var c=(b.center+a.center)/2;return b.left=c+b.cache.margin.left+b.cache.border.left,b},this.ShowIfNecessary=function(){"show"===this.options.show||this.moving||!this.initialized||this.updating||(this.label1.stop(!0,!0).fadeIn(this.options.durationIn||0),this.label2.stop(!0,!0).fadeIn(this.options.durationIn||0),this.moving=!0)},this.HideIfNeeded=function(){this.moving===!0&&(this.label1.stop(!0,!0).delay(this.options.delayOut||0).fadeOut(this.options.durationOut||0),this.label2.stop(!0,!0).delay(this.options.delayOut||0).fadeOut(this.options.durationOut||0),this.moving=!1)},this.onHandleMoving=function(a,b){this.ShowIfNecessary(),this.CacheIfNecessary(),this.UpdateHandlePosition(b),this.PositionLabels()},this.onHandleUpdating=function(){this.updating=!0},this.onHandleUpdated=function(){this.updating=!1,this.cache=null},this.onHandleStop=function(){this.HideIfNeeded()},this.onWindowResize=function(){this.cache=null},this.UpdateHandlePosition=function(a){null!==this.cache&&(a.element[0]===this.handle1[0]?this.UpdatePosition(a,this.cache.handle1):this.UpdatePosition(a,this.cache.handle2))},this.UpdatePosition=function(a,b){b.offset=a.offset,b.value=a.value},this.GetRawPosition=function(a,b){var c=b.offset.left+b.outerWidth/2,d=c-a.outerWidth/2,e=d+a.outerWidth-a.border.left-a.border.right,f=d-a.margin.left-a.border.left,g=b.offset.top-a.outerHeightMargin;return{left:d,outerLeft:f,top:g,right:e,outerRight:f+a.outerWidth+a.margin.left+a.margin.right,cache:a,center:c}},this.Init()}a.widget("ui.rangeSliderLabel",a.ui.rangeSliderMouseTouch,{options:{handle:null,formatter:!1,handleType:"rangeSliderHandle",show:"show",durationIn:0,durationOut:500,delayOut:500,isLeft:!1},cache:null,_positionner:null,_valueContainer:null,_innerElement:null,_value:null,_create:function(){this.options.isLeft=this._handle("option","isLeft"),this.element.addClass("ui-rangeSlider-label").css("position","absolute").css("display","block"),this._createElements(),this._toggleClass(),this.options.handle.bind("moving.label",a.proxy(this._onMoving,this)).bind("update.label",a.proxy(this._onUpdate,this)).bind("switch.label",a.proxy(this._onSwitch,this)),"show"!==this.options.show&&this.element.hide(),this._mouseInit()},destroy:function(){this.options.handle.unbind(".label"),this.options.handle=null,this._valueContainer=null,this._innerElement=null,this.element.empty(),this._positionner&&(this._positionner.Destroy(),this._positionner=null),this._super()},_createElements:function(){this._valueContainer=a("
").appendTo(this.element),this._innerElement=a("
").appendTo(this.element)},_handle:function(){var a=Array.prototype.slice.apply(arguments);return this.options.handle[this.options.handleType].apply(this.options.handle,a)},_setOption:function(a,b){"show"===a?this._updateShowOption(b):("durationIn"===a||"durationOut"===a||"delayOut"===a)&&this._updateDurations(a,b),this._setFormatterOption(a,b)},_setFormatterOption:function(a,b){"formatter"===a&&("function"==typeof b||b===!1)&&(this.options.formatter=b,this._display(this._value))},_updateShowOption:function(a){this.options.show=a,"show"!==this.options.show?(this.element.hide(),this._positionner.moving=!1):(this.element.show(),this._display(this.options.handle[this.options.handleType]("value")),this._positionner.PositionLabels()),this._positionner.options.show=this.options.show},_updateDurations:function(a,b){parseInt(b,10)===b&&(this._positionner.options[a]=b,this.options[a]=b)},_display:function(a){this.options.formatter===!1?this._displayText(Math.round(a)):this._displayText(this.options.formatter(a,this.options.isLeft)),this._value=a},_displayText:function(a){this._valueContainer.text(a)},_toggleClass:function(){this.element.toggleClass("ui-rangeSlider-leftLabel",this.options.isLeft).toggleClass("ui-rangeSlider-rightLabel",!this.options.isLeft)},_positionLabels:function(){this._positionner.PositionLabels()},_mouseDown:function(a){this.options.handle.trigger(a)},_mouseUp:function(a){this.options.handle.trigger(a)},_mouseMove:function(a){this.options.handle.trigger(a)},_onMoving:function(a,b){this._display(b.value)},_onUpdate:function(){"show"===this.options.show&&this.update()},_onSwitch:function(a,b){this.options.isLeft=b,this._toggleClass(),this._positionLabels()},pair:function(a){null===this._positionner&&(this._positionner=new c(this.element,a,this.widgetName,{show:this.options.show,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}),a[this.widgetName]("positionner",this._positionner))},positionner:function(a){return"undefined"!=typeof a&&(this._positionner=a),this._positionner},update:function(){this._positionner.cache=null,this._display(this._handle("value")),"show"===this.options.show&&this._positionLabels()}})}(jQuery),function(a,b){"use strict";a.widget("ui.dateRangeSlider",a.ui.rangeSlider,{options:{bounds:{min:new Date(2010,0,1).valueOf(),max:new Date(2012,0,1).valueOf()},defaultValues:{min:new Date(2010,1,11).valueOf(),max:new Date(2011,1,11).valueOf()}},_create:function(){this._super(),this.element.addClass("ui-dateRangeSlider")},destroy:function(){this.element.removeClass("ui-dateRangeSlider"),this._super()},_setDefaultValues:function(){this._values={min:this.options.defaultValues.min.valueOf(),max:this.options.defaultValues.max.valueOf()}},_setRulerParameters:function(){this.ruler.ruler({min:new Date(this.options.bounds.min.valueOf()),max:new Date(this.options.bounds.max.valueOf()),scales:this.options.scales})},_setOption:function(a,b){("defaultValues"===a||"bounds"===a)&&"undefined"!=typeof b&&null!==b&&this._isValidDate(b.min)&&this._isValidDate(b.max)?this._super(a,{min:b.min.valueOf(),max:b.max.valueOf()}):this._super.apply(this,this._toArray(arguments))},_handleType:function(){return"dateRangeSliderHandle"},option:function(a){if("bounds"===a||"defaultValues"===a){var b=this._super.apply(this,this._toArray(arguments));return{min:new Date(b.min),max:new Date(b.max)}}return this._super.apply(this,this._toArray(arguments))},_defaultFormatter:function(a){var b=a.getMonth()+1,c=a.getDate();return""+a.getFullYear()+"-"+(10>b?"0"+b:b)+"-"+(10>c?"0"+c:c)},_getFormatter:function(){var a=this.options.formatter;return(this.options.formatter===!1||null===this.options.formatter)&&(a=this._defaultFormatter.bind(this)),function(a){return function(b,c){return a(new Date(b),c)}}(a)},values:function(a,b){var c=null;return c=this._isValidDate(a)&&this._isValidDate(b)?this._super(a.valueOf(),b.valueOf()):this._super.apply(this,this._toArray(arguments)),{min:new Date(c.min),max:new Date(c.max)}},min:function(a){return this._isValidDate(a)?new Date(this._super(a.valueOf())):new Date(this._super())},max:function(a){return this._isValidDate(a)?new Date(this._super(a.valueOf())):new Date(this._super())},bounds:function(a,b){var c;return c=this._isValidDate(a)&&this._isValidDate(b)?this._super(a.valueOf(),b.valueOf()):this._super.apply(this,this._toArray(arguments)),{min:new Date(c.min),max:new Date(c.max)}},_isValidDate:function(a){return"undefined"!=typeof a&&a instanceof Date},_toArray:function(a){return Array.prototype.slice.call(a)}})}(jQuery),function(a,b){"use strict";a.widget("ui.dateRangeSliderHandle",a.ui.rangeSliderHandle,{_steps:!1,_boundsValues:{},_create:function(){this._createBoundsValues(),this._super()},_getValueForPosition:function(a){var b=this._getRawValueForPositionAndBounds(a,this.options.bounds.min.valueOf(),this.options.bounds.max.valueOf());return this._constraintValue(new Date(b))},_setOption:function(a,b){return"step"===a?(this.options.step=b,this._createSteps(),void this.update()):(this._super(a,b),void("bounds"===a&&this._createBoundsValues()))},_createBoundsValues:function(){this._boundsValues={min:this.options.bounds.min.valueOf(),max:this.options.bounds.max.valueOf()}},_bounds:function(){return this._boundsValues},_createSteps:function(){if(this.options.step===!1||!this._isValidStep())return void(this._steps=!1);var a=new Date(this.options.bounds.min.valueOf()),b=new Date(this.options.bounds.max.valueOf()),c=a,d=0,e=new Date;for(this._steps=[];b>=c&&(1===d||e.valueOf()!==c.valueOf());)e=c,this._steps.push(c.valueOf()),c=this._addStep(a,d,this.options.step),d++;e.valueOf()===c.valueOf()&&(this._steps=!1)},_isValidStep:function(){return"object"==typeof this.options.step},_addStep:function(a,b,c){var d=new Date(a.valueOf());return d=this._addThing(d,"FullYear",b,c.years),d=this._addThing(d,"Month",b,c.months),d=this._addThing(d,"Date",b,7*c.weeks),d=this._addThing(d,"Date",b,c.days),d=this._addThing(d,"Hours",b,c.hours),d=this._addThing(d,"Minutes",b,c.minutes),d=this._addThing(d,"Seconds",b,c.seconds)},_addThing:function(a,b,c,d){return 0===c||0===(d||0)?a:(a["set"+b](a["get"+b]()+c*(d||0)),a)},_round:function(a){if(this._steps===!1)return a;for(var b,c,d=this.options.bounds.max.valueOf(),e=this.options.bounds.min.valueOf(),f=Math.max(0,(a-e)/(d-e)),g=Math.floor(this._steps.length*f);this._steps[g]>a;)g--;for(;g+1=this._steps.length-1?this._steps[this._steps.length-1]:0===g?this._steps[0]:(b=this._steps[g],c=this._steps[g+1],c-a>a-b?b:c)},update:function(){this._createBoundsValues(),this._createSteps(),this._super()},add:function(a,b){return this._addStep(new Date(a),1,b).valueOf()},substract:function(a,b){return this._addStep(new Date(a),-1,b).valueOf()},stepsBetween:function(a,b){if(this.options.step===!1)return b-a;var c=Math.min(a,b),d=Math.max(a,b),e=0,f=!1,g=a>b;for(this.add(c,this.options.step)-c<0&&(f=!0);d>c;)f?d=this.add(d,this.options.step):c=this.add(c,this.options.step),e++;return g?-e:e},multiplyStep:function(a,b){var c={};for(var d in a)a.hasOwnProperty(d)&&(c[d]=a[d]*b);return c},stepRatio:function(){if(this.options.step===!1)return 1;var a=this._steps.length;return this.cache.parent.width/a}})}(jQuery); \ No newline at end of file diff --git a/app/assets/vendored/lib/jqrangeslider/jQDateRangeSlider-withRuler-min.js b/app/assets/vendored/lib/jqrangeslider/jQDateRangeSlider-withRuler-min.js new file mode 100644 index 000000000..97c009627 --- /dev/null +++ b/app/assets/vendored/lib/jqrangeslider/jQDateRangeSlider-withRuler-min.js @@ -0,0 +1,2 @@ +/*! jQRangeSlider 5.8.2 - 2023-10-19 - Copyright (C) Guillaume Gautreau 2012 - MIT and GPLv3 licenses.*/!function(a,b){"use strict";a.widget("ui.rangeSliderMouseTouch",a.ui.mouse,{enabled:!0,_mouseInit:function(){var a=this;this._super(),this._mouseDownEvent=!1,this.element.bind("touchstart."+this.widgetName,function(b){return a._touchStart(b)})},_mouseDestroy:function(){a(document).unbind("touchmove."+this.widgetName,this._touchMoveDelegate).unbind("touchend."+this.widgetName,this._touchEndDelegate),this._super()},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},destroy:function(){this._mouseDestroy(),this._super(),this._mouseInit=null},_touchStart:function(b){if(!this.enabled)return!1;b.which=1,b.preventDefault(),this._fillTouchEvent(b);var c=this,d=this._mouseDownEvent;this._mouseDown(b),d!==this._mouseDownEvent&&(this._touchEndDelegate=function(a){c._touchEnd(a)},this._touchMoveDelegate=function(a){c._touchMove(a)},a(document).bind("touchmove."+this.widgetName,this._touchMoveDelegate).bind("touchend."+this.widgetName,this._touchEndDelegate))},_mouseDown:function(a){return this.enabled?this._super(a):!1},_touchEnd:function(b){this._fillTouchEvent(b),this._mouseUp(b),a(document).unbind("touchmove."+this.widgetName,this._touchMoveDelegate).unbind("touchend."+this.widgetName,this._touchEndDelegate),this._mouseDownEvent=!1,a(document).trigger("mouseup")},_touchMove:function(a){return a.preventDefault(),this._fillTouchEvent(a),this._mouseMove(a)},_fillTouchEvent:function(a){var b;b="undefined"==typeof a.targetTouches&&"undefined"==typeof a.changedTouches?a.originalEvent.targetTouches[0]||a.originalEvent.changedTouches[0]:a.targetTouches[0]||a.changedTouches[0],a.pageX=b.pageX,a.pageY=b.pageY,a.which=1}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSliderDraggable",a.ui.rangeSliderMouseTouch,{cache:null,options:{containment:null},_create:function(){this._super(),setTimeout(a.proxy(this._initElementIfNotDestroyed,this),10)},destroy:function(){this.cache=null,this._super()},_initElementIfNotDestroyed:function(){this._mouseInit&&this._initElement()},_initElement:function(){this._mouseInit(),this._cache()},_setOption:function(b,c){"containment"===b&&(null===c||0===a(c).length?this.options.containment=null:this.options.containment=a(c))},_mouseStart:function(a){return this._cache(),this.cache.click={left:a.pageX,top:a.pageY},this.cache.initialOffset=this.element.offset(),this._triggerMouseEvent("mousestart"),!0},_mouseDrag:function(a){var b=a.pageX-this.cache.click.left;return b=this._constraintPosition(b+this.cache.initialOffset.left),this._applyPosition(b),this._triggerMouseEvent("sliderDrag"),!1},_mouseStop:function(){this._triggerMouseEvent("stop")},_constraintPosition:function(a){return 0!==this.element.parent().length&&null!==this.cache.parent.offset&&(a=Math.min(a,this.cache.parent.offset.left+this.cache.parent.width-this.cache.width.outer),a=Math.max(a,this.cache.parent.offset.left)),a},_applyPosition:function(a){this._cacheIfNecessary();var b={top:this.cache.offset.top,left:a};this.element.offset({left:a}),this.cache.offset=b},_cacheIfNecessary:function(){null===this.cache&&this._cache()},_cache:function(){this.cache={},this._cacheMargins(),this._cacheParent(),this._cacheDimensions(),this.cache.offset=this.element.offset()},_cacheMargins:function(){this.cache.margin={left:this._parsePixels(this.element,"marginLeft"),right:this._parsePixels(this.element,"marginRight"),top:this._parsePixels(this.element,"marginTop"),bottom:this._parsePixels(this.element,"marginBottom")}},_cacheParent:function(){if(null!==this.options.parent){var a=this.element.parent();this.cache.parent={offset:a.offset(),width:a.width()}}else this.cache.parent=null},_cacheDimensions:function(){this.cache.width={outer:this.element.outerWidth(),inner:this.element.width()}},_parsePixels:function(a,b){return parseInt(a.css(b),10)||0},_triggerMouseEvent:function(a){var b=this._prepareEventData();this.element.trigger(a,b)},_prepareEventData:function(){return{element:this.element,offset:this.cache.offset||null}}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSlider",{options:{bounds:{min:0,max:100},defaultValues:{min:20,max:50},wheelMode:null,wheelSpeed:4,arrows:!0,valueLabels:"show",formatter:null,durationIn:0,durationOut:400,delayOut:200,range:{min:!1,max:!1},step:!1,scales:!1,enabled:!0,symmetricPositionning:!1},_values:null,_valuesChanged:!1,_initialized:!1,bar:null,leftHandle:null,rightHandle:null,innerBar:null,container:null,arrows:null,labels:null,changing:{min:!1,max:!1},changed:{min:!1,max:!1},ruler:null,_create:function(){this._super(),this._setDefaultValues(),this.labels={left:null,right:null,leftDisplayed:!0,rightDisplayed:!0},this.arrows={left:null,right:null},this.changing={min:!1,max:!1},this.changed={min:!1,max:!1},this._createElements(),this._bindResize(),setTimeout(a.proxy(this.resize,this),1),setTimeout(a.proxy(this._initValues,this),1)},_setDefaultValues:function(){this._values={min:this.options.defaultValues.min,max:this.options.defaultValues.max}},_bindResize:function(){var b=this;this._resizeProxy=function(a){b.resize(a)},a(window).resize(this._resizeProxy)},_initWidth:function(){this.container.css("width",this.element.width()-this.container.outerWidth(!0)+this.container.width()),this.innerBar.css("width",this.container.width()-this.innerBar.outerWidth(!0)+this.innerBar.width())},_initValues:function(){this._initialized=!0,this.values(this._values.min,this._values.max)},_setOption:function(a,b){this._setWheelOption(a,b),this._setArrowsOption(a,b),this._setLabelsOption(a,b),this._setLabelsDurations(a,b),this._setFormatterOption(a,b),this._setBoundsOption(a,b),this._setRangeOption(a,b),this._setStepOption(a,b),this._setScalesOption(a,b),this._setEnabledOption(a,b),this._setPositionningOption(a,b)},_validProperty:function(a,b,c){return null===a||"undefined"==typeof a[b]?c:a[b]},_setStepOption:function(a,b){"step"===a&&(this.options.step=b,this._leftHandle("option","step",b),this._rightHandle("option","step",b),this._changed(!0))},_setScalesOption:function(a,b){"scales"===a&&(b===!1||null===b?(this.options.scales=!1,this._destroyRuler()):b instanceof Array&&(this.options.scales=b,this._updateRuler()))},_setRangeOption:function(a,b){"range"===a&&(this._bar("option","range",b),this.options.range=this._bar("option","range"),this._changed(!0))},_setBoundsOption:function(a,b){"bounds"===a&&"undefined"!=typeof b.min&&"undefined"!=typeof b.max&&this.bounds(b.min,b.max)},_setWheelOption:function(a,b){("wheelMode"===a||"wheelSpeed"===a)&&(this._bar("option",a,b),this.options[a]=this._bar("option",a))},_setLabelsOption:function(a,b){if("valueLabels"===a){if("hide"!==b&&"show"!==b&&"change"!==b)return;this.options.valueLabels=b,"hide"!==b?(this._createLabels(),this._leftLabel("update"),this._rightLabel("update")):this._destroyLabels()}},_setFormatterOption:function(a,b){"formatter"===a&&null!==b&&"function"==typeof b&&"hide"!==this.options.valueLabels&&(this._leftLabel("option","formatter",b),this.options.formatter=this._rightLabel("option","formatter",b))},_setArrowsOption:function(a,b){"arrows"!==a||b!==!0&&b!==!1||b===this.options.arrows||(b===!0?(this.element.removeClass("ui-rangeSlider-noArrow").addClass("ui-rangeSlider-withArrows"),this.arrows.left.css("display","block"),this.arrows.right.css("display","block"),this.options.arrows=!0):b===!1&&(this.element.addClass("ui-rangeSlider-noArrow").removeClass("ui-rangeSlider-withArrows"),this.arrows.left.css("display","none"),this.arrows.right.css("display","none"),this.options.arrows=!1),this._initWidth())},_setLabelsDurations:function(a,b){if("durationIn"===a||"durationOut"===a||"delayOut"===a){if(parseInt(b,10)!==b)return;null!==this.labels.left&&this._leftLabel("option",a,b),null!==this.labels.right&&this._rightLabel("option",a,b),this.options[a]=b}},_setEnabledOption:function(a,b){"enabled"===a&&this.toggle(b)},_setPositionningOption:function(a,b){"symmetricPositionning"===a&&(this._rightHandle("option",a,b),this.options[a]=this._leftHandle("option",a,b))},_createElements:function(){"absolute"!==this.element.css("position")&&this.element.css("position","relative"),this.element.addClass("ui-rangeSlider"),this.container=a("
").css("position","absolute").appendTo(this.element),this.innerBar=a("
").css("position","absolute").css("top",0).css("left",0),this._createHandles(),this._createBar(),this.container.prepend(this.innerBar),this._createArrows(),"hide"!==this.options.valueLabels?this._createLabels():this._destroyLabels(),this._updateRuler(),this.options.enabled||this._toggle(this.options.enabled)},_createHandle:function(b){return a("
")[this._handleType()](b).bind("sliderDrag",a.proxy(this._changing,this)).bind("stop",a.proxy(this._changed,this))},_createHandles:function(){this.leftHandle=this._createHandle({isLeft:!0,bounds:this.options.bounds,value:this._values.min,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container),this.rightHandle=this._createHandle({isLeft:!1,bounds:this.options.bounds,value:this._values.max,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container)},_createBar:function(){this.bar=a("
").prependTo(this.container).bind("sliderDrag scroll zoom",a.proxy(this._changing,this)).bind("stop",a.proxy(this._changed,this)),this._bar({leftHandle:this.leftHandle,rightHandle:this.rightHandle,values:{min:this._values.min,max:this._values.max},type:this._handleType(),range:this.options.range,wheelMode:this.options.wheelMode,wheelSpeed:this.options.wheelSpeed}),this.options.range=this._bar("option","range"),this.options.wheelMode=this._bar("option","wheelMode"),this.options.wheelSpeed=this._bar("option","wheelSpeed")},_createArrows:function(){this.arrows.left=this._createArrow("left"),this.arrows.right=this._createArrow("right"),this.options.arrows?this.element.addClass("ui-rangeSlider-withArrows"):(this.arrows.left.css("display","none"),this.arrows.right.css("display","none"),this.element.addClass("ui-rangeSlider-noArrow"))},_createArrow:function(b){var c,d=a("
").append("
").addClass("ui-rangeSlider-"+b+"Arrow").css("position","absolute").css(b,0).appendTo(this.element);return c="right"===b?a.proxy(this._scrollRightClick,this):a.proxy(this._scrollLeftClick,this),d.bind("mousedown touchstart",c),d},_proxy:function(a,b,c){var d=Array.prototype.slice.call(c);return a&&a[b]?a[b].apply(a,d):null},_handleType:function(){return"rangeSliderHandle"},_barType:function(){return"rangeSliderBar"},_bar:function(){return this._proxy(this.bar,this._barType(),arguments)},_labelType:function(){return"rangeSliderLabel"},_leftLabel:function(){return this._proxy(this.labels.left,this._labelType(),arguments)},_rightLabel:function(){return this._proxy(this.labels.right,this._labelType(),arguments)},_leftHandle:function(){return this._proxy(this.leftHandle,this._handleType(),arguments)},_rightHandle:function(){return this._proxy(this.rightHandle,this._handleType(),arguments)},_getValue:function(a,b){return b===this.rightHandle&&(a-=b.outerWidth()),a*(this.options.bounds.max-this.options.bounds.min)/(this.container.innerWidth()-b.outerWidth(!0))+this.options.bounds.min},_trigger:function(a){var b=this;setTimeout(function(){b.element.trigger(a,{label:b.element,values:b.values()})},1)},_changing:function(){this._updateValues()&&(this._trigger("valuesChanging"),this._valuesChanged=!0)},_deactivateLabels:function(){"change"===this.options.valueLabels&&(this._leftLabel("option","show","hide"),this._rightLabel("option","show","hide"))},_reactivateLabels:function(){"change"===this.options.valueLabels&&(this._leftLabel("option","show","change"),this._rightLabel("option","show","change"))},_changed:function(a){a===!0&&this._deactivateLabels(),(this._updateValues()||this._valuesChanged)&&(this._trigger("valuesChanged"),a!==!0&&this._trigger("userValuesChanged"),this._valuesChanged=!1),a===!0&&this._reactivateLabels()},_updateValues:function(){var a=this._leftHandle("value"),b=this._rightHandle("value"),c=this._min(a,b),d=this._max(a,b),e=c!==this._values.min||d!==this._values.max;return this._values.min=this._min(a,b),this._values.max=this._max(a,b),e},_min:function(a,b){return Math.min(a,b)},_max:function(a,b){return Math.max(a,b)},_createLabel:function(b,c){var d;return null===b?(d=this._getLabelConstructorParameters(b,c),b=a("
").appendTo(this.element)[this._labelType()](d)):(d=this._getLabelRefreshParameters(b,c),b[this._labelType()](d)),b},_getLabelConstructorParameters:function(a,b){return{handle:b,handleType:this._handleType(),formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getLabelRefreshParameters:function(){return{formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getFormatter:function(){return this.options.formatter===!1||null===this.options.formatter?this._defaultFormatter.bind(this):this.options.formatter},_defaultFormatter:function(a){return Math.round(a)},_destroyLabel:function(a){return null!==a&&(a[this._labelType()]("destroy"),a.remove(),a=null),a},_createLabels:function(){this.labels.left=this._createLabel(this.labels.left,this.leftHandle),this.labels.right=this._createLabel(this.labels.right,this.rightHandle),this._leftLabel("pair",this.labels.right)},_destroyLabels:function(){this.labels.left=this._destroyLabel(this.labels.left),this.labels.right=this._destroyLabel(this.labels.right)},_stepRatio:function(){return this._leftHandle("stepRatio")},_scrollRightClick:function(a){return this.options.enabled?(a.preventDefault(),this._bar("startScroll"),this._bindStopScroll(),void this._continueScrolling("scrollRight",4*this._stepRatio(),1)):!1},_continueScrolling:function(a,b,c,d){if(!this.options.enabled)return!1;this._bar(a,c),d=d||5,d--;var e=this,f=16,g=Math.max(1,4/this._stepRatio());this._scrollTimeout=setTimeout(function(){0===d&&(b>f?b=Math.max(f,b/1.5):c=Math.min(g,2*c),d=5),e._continueScrolling(a,b,c,d)},b)},_scrollLeftClick:function(a){return this.options.enabled?(a.preventDefault(),this._bar("startScroll"),this._bindStopScroll(),void this._continueScrolling("scrollLeft",4*this._stepRatio(),1)):!1},_bindStopScroll:function(){var b=this;this._stopScrollHandle=function(a){a.preventDefault(),b._stopScroll()},a(document).bind("mouseup touchend",this._stopScrollHandle)},_stopScroll:function(){a(document).unbind("mouseup touchend",this._stopScrollHandle),this._stopScrollHandle=null,this._bar("stopScroll"),clearTimeout(this._scrollTimeout)},_createRuler:function(){this.ruler=a("
").appendTo(this.innerBar)},_setRulerParameters:function(){this.ruler.ruler({min:this.options.bounds.min,max:this.options.bounds.max,scales:this.options.scales})},_destroyRuler:function(){null!==this.ruler&&a.fn.ruler&&(this.ruler.ruler("destroy"),this.ruler.remove(),this.ruler=null)},_updateRuler:function(){this._destroyRuler(),this.options.scales!==!1&&a.fn.ruler&&(this._createRuler(),this._setRulerParameters())},values:function(a,b){var c;if("undefined"!=typeof a&&"undefined"!=typeof b){if(!this._initialized)return this._values.min=a,this._values.max=b,this._values;this._deactivateLabels(),c=this._bar("values",a,b),this._changed(!0),this._reactivateLabels()}else c=this._bar("values",a,b);return c},min:function(a){return this._values.min=this.values(a,this._values.max).min,this._values.min},max:function(a){return this._values.max=this.values(this._values.min,a).max,this._values.max},bounds:function(a,b){return this._isValidValue(a)&&this._isValidValue(b)&&b>a&&(this._setBounds(a,b),this._updateRuler(),this._changed(!0)),this.options.bounds},_isValidValue:function(a){return"undefined"!=typeof a&&parseFloat(a)===a},_setBounds:function(a,b){this.options.bounds={min:a,max:b},this._leftHandle("option","bounds",this.options.bounds),this._rightHandle("option","bounds",this.options.bounds),this._bar("option","bounds",this.options.bounds)},zoomIn:function(a){this._bar("zoomIn",a)},zoomOut:function(a){this._bar("zoomOut",a)},scrollLeft:function(a){this._bar("startScroll"),this._bar("scrollLeft",a),this._bar("stopScroll")},scrollRight:function(a){this._bar("startScroll"),this._bar("scrollRight",a),this._bar("stopScroll")},resize:function(){this.container&&(this._initWidth(),this._leftHandle("update"),this._rightHandle("update"),this._bar("update"))},enable:function(){this.toggle(!0)},disable:function(){this.toggle(!1)},toggle:function(a){a===b&&(a=!this.options.enabled),this.options.enabled!==a&&this._toggle(a)},_toggle:function(a){this.options.enabled=a,this.element.toggleClass("ui-rangeSlider-disabled",!a);var b=a?"enable":"disable";this._bar(b),this._leftHandle(b),this._rightHandle(b),this._leftLabel(b),this._rightLabel(b)},destroy:function(){this.element.removeClass("ui-rangeSlider-withArrows ui-rangeSlider-noArrow ui-rangeSlider-disabled"),this._destroyWidgets(),this._destroyElements(),this.element.removeClass("ui-rangeSlider"),this.options=null,a(window).unbind("resize",this._resizeProxy),this._resizeProxy=null,this._bindResize=null,this._super()},_destroyWidget:function(a){this["_"+a]("destroy"),this[a].remove(),this[a]=null},_destroyWidgets:function(){this._destroyWidget("bar"),this._destroyWidget("leftHandle"),this._destroyWidget("rightHandle"),this._destroyRuler(),this._destroyLabels()},_destroyElements:function(){this.container.remove(),this.container=null,this.innerBar.remove(),this.innerBar=null,this.arrows.left.remove(),this.arrows.right.remove(),this.arrows=null}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSliderHandle",a.ui.rangeSliderDraggable,{currentMove:null,margin:0,parentElement:null,options:{isLeft:!0,bounds:{min:0,max:100},range:!1,value:0,step:!1},_value:0,_left:0,_create:function(){this._super(),this.element.css("position","absolute").css("top",0).addClass("ui-rangeSlider-handle").toggleClass("ui-rangeSlider-leftHandle",this.options.isLeft).toggleClass("ui-rangeSlider-rightHandle",!this.options.isLeft),this.element.append("
"),this._value=this._constraintValue(this.options.value)},destroy:function(){this.element.empty(),this._super()},_setOption:function(a,b){"isLeft"!==a||b!==!0&&b!==!1||b===this.options.isLeft?"step"===a&&this._checkStep(b)?(this.options.step=b,this.update()):"bounds"===a?(this.options.bounds=b,this.update()):"range"===a&&this._checkRange(b)?(this.options.range=b,this.update()):"symmetricPositionning"===a&&(this.options.symmetricPositionning=b===!0,this.update()):(this.options.isLeft=b,this.element.toggleClass("ui-rangeSlider-leftHandle",this.options.isLeft).toggleClass("ui-rangeSlider-rightHandle",!this.options.isLeft),this._position(this._value),this.element.trigger("switch",this.options.isLeft)),this._super(a,b)},_checkRange:function(a){return a===!1||!this._isValidValue(a.min)&&!this._isValidValue(a.max)},_isValidValue:function(a){return"undefined"!=typeof a&&a!==!1&&parseFloat(a)!==a},_checkStep:function(a){return a===!1||parseFloat(a)===a},_initElement:function(){this._super(),0===this.cache.parent.width||null===this.cache.parent.width?setTimeout(a.proxy(this._initElementIfNotDestroyed,this),500):(this._position(this._value),this._triggerMouseEvent("initialize"))},_bounds:function(){return this.options.bounds},_cache:function(){this._super(),this._cacheParent()},_cacheParent:function(){var a=this.element.parent();this.cache.parent={element:a,offset:a.offset(),padding:{left:this._parsePixels(a,"paddingLeft")},width:a.width()}},_position:function(a){var b=this._getPositionForValue(a);this._applyPosition(b)},_constraintPosition:function(a){var b=this._getValueForPosition(a);return this._getPositionForValue(b)},_applyPosition:function(a){this._super(a),this._left=a,this._setValue(this._getValueForPosition(a)),this._triggerMouseEvent("moving")},_prepareEventData:function(){var a=this._super();return a.value=this._value,a},_setValue:function(a){a!==this._value&&(this._value=a)},_constraintValue:function(a){if(a=Math.min(a,this._bounds().max),a=Math.max(a,this._bounds().min),a=this._round(a),this.options.range!==!1){var b=this.options.range.min||!1,c=this.options.range.max||!1;b!==!1&&(a=Math.max(a,this._round(b))),c!==!1&&(a=Math.min(a,this._round(c))),a=Math.min(a,this._bounds().max),a=Math.max(a,this._bounds().min)}return a},_round:function(a){return this.options.step!==!1&&this.options.step>0?Math.round(a/this.options.step)*this.options.step:a},_getPositionForValue:function(a){if(!this.cache||!this.cache.parent||null===this.cache.parent.offset)return 0;a=this._constraintValue(a);var b=(a-this.options.bounds.min)/(this.options.bounds.max-this.options.bounds.min),c=this.cache.parent.width,d=this.cache.parent.offset.left,e=this.options.isLeft?0:this.cache.width.outer;return this.options.symmetricPositionning?b*(c-2*this.cache.width.outer)+d+e:b*c+d-e},_getValueForPosition:function(a){var b=this._getRawValueForPositionAndBounds(a,this.options.bounds.min,this.options.bounds.max);return this._constraintValue(b)},_getRawValueForPositionAndBounds:function(a,b,c){var d,e,f=null===this.cache.parent.offset?0:this.cache.parent.offset.left;return this.options.symmetricPositionning?(a-=this.options.isLeft?0:this.cache.width.outer,d=this.cache.parent.width-2*this.cache.width.outer):(a+=this.options.isLeft?0:this.cache.width.outer,d=this.cache.parent.width),0===d?this._value:(e=(a-f)/d,e*(c-b)+b)},value:function(a){return"undefined"!=typeof a&&(this._cache(),a=this._constraintValue(a),this._position(a)),this._value},update:function(){this._cache();var a=this._constraintValue(this._value),b=this._getPositionForValue(a);a!==this._value?(this._triggerMouseEvent("updating"),this._position(a),this._triggerMouseEvent("update")):b!==this.cache.offset.left&&(this._triggerMouseEvent("updating"),this._position(a),this._triggerMouseEvent("update"))},position:function(a){return"undefined"!=typeof a&&(this._cache(),a=this._constraintPosition(a),this._applyPosition(a)),this._left},add:function(a,b){return a+b},substract:function(a,b){return a-b},stepsBetween:function(a,b){return this.options.step===!1?b-a:(b-a)/this.options.step},multiplyStep:function(a,b){return a*b},moveRight:function(a){var b;return this.options.step===!1?(b=this._left,this.position(this._left+a),this._left-b):(b=this._value,this.value(this.add(b,this.multiplyStep(this.options.step,a))),this.stepsBetween(b,this._value))},moveLeft:function(a){return-this.moveRight(-a)},stepRatio:function(){if(this.options.step===!1)return 1;var a=(this.options.bounds.max-this.options.bounds.min)/this.options.step;return this.cache.parent.width/a}})}(jQuery),function(a,b){"use strict";function c(a,b){return"undefined"==typeof a?b||!1:a}a.widget("ui.rangeSliderBar",a.ui.rangeSliderDraggable,{options:{leftHandle:null,rightHandle:null,bounds:{min:0,max:100},type:"rangeSliderHandle",range:!1,drag:function(){},stop:function(){},values:{min:0,max:20},wheelSpeed:4,wheelMode:null},_values:{min:0,max:20},_waitingToInit:2,_wheelTimeout:!1,_create:function(){this._super(),this.element.css("position","absolute").css("top",0).addClass("ui-rangeSlider-bar"),this.options.leftHandle.bind("initialize",a.proxy(this._onInitialized,this)).bind("mousestart",a.proxy(this._cache,this)).bind("stop",a.proxy(this._onHandleStop,this)),this.options.rightHandle.bind("initialize",a.proxy(this._onInitialized,this)).bind("mousestart",a.proxy(this._cache,this)).bind("stop",a.proxy(this._onHandleStop,this)),this._bindHandles(),this._values=this.options.values,this._setWheelModeOption(this.options.wheelMode)},destroy:function(){this.options.leftHandle.unbind(".bar"),this.options.rightHandle.unbind(".bar"),this.options=null,this._super()},_setOption:function(a,b){"range"===a?this._setRangeOption(b):"wheelSpeed"===a?this._setWheelSpeedOption(b):"wheelMode"===a&&this._setWheelModeOption(b)},_setRangeOption:function(a){if(("object"!=typeof a||null===a)&&(a=!1),a!==!1||this.options.range!==!1){if(a!==!1){var b=c(a.min,this.options.range.min),d=c(a.max,this.options.range.max);this.options.range={min:b,max:d}}else this.options.range=!1;this._setLeftRange(),this._setRightRange()}},_setWheelSpeedOption:function(a){"number"==typeof a&&0!==a&&(this.options.wheelSpeed=a)},_setWheelModeOption:function(a){(null===a||a===!1||"zoom"===a||"scroll"===a)&&(this.options.wheelMode!==a&&this.element.parent().unbind("mousewheel.bar"),this._bindMouseWheel(a),this.options.wheelMode=a)},_bindMouseWheel:function(b){"zoom"===b?this.element.parent().bind("mousewheel.bar",a.proxy(this._mouseWheelZoom,this)):"scroll"===b&&this.element.parent().bind("mousewheel.bar",a.proxy(this._mouseWheelScroll,this))},_setLeftRange:function(){if(this.options.range===!1)return!1;var a=this._values.max,b={min:!1,max:!1};"undefined"!=typeof this.options.range.min&&this.options.range.min!==!1?b.max=this._leftHandle("substract",a,this.options.range.min):b.max=!1,"undefined"!=typeof this.options.range.max&&this.options.range.max!==!1?b.min=this._leftHandle("substract",a,this.options.range.max):b.min=!1,this._leftHandle("option","range",b)},_setRightRange:function(){var a=this._values.min,b={min:!1,max:!1};"undefined"!=typeof this.options.range.min&&this.options.range.min!==!1?b.min=this._rightHandle("add",a,this.options.range.min):b.min=!1,"undefined"!=typeof this.options.range.max&&this.options.range.max!==!1?b.max=this._rightHandle("add",a,this.options.range.max):b.max=!1,this._rightHandle("option","range",b)},_deactivateRange:function(){this._leftHandle("option","range",!1),this._rightHandle("option","range",!1)},_reactivateRange:function(){this._setRangeOption(this.options.range)},_onInitialized:function(){this._waitingToInit--,0===this._waitingToInit&&this._initMe()},_initMe:function(){this._cache(),this.min(this._values.min),this.max(this._values.max);var a=this._leftHandle("position"),b=this._rightHandle("position")+this.options.rightHandle.width();this.element.offset({left:a}),this.element.css("width",b-a)},_leftHandle:function(){return this._handleProxy(this.options.leftHandle,arguments)},_rightHandle:function(){return this._handleProxy(this.options.rightHandle,arguments)},_handleProxy:function(a,b){var c=Array.prototype.slice.call(b);return a[this.options.type].apply(a,c)},_cache:function(){this._super(),this._cacheHandles()},_cacheHandles:function(){this.cache.rightHandle={},this.cache.rightHandle.width=this.options.rightHandle.width(),this.cache.rightHandle.offset=this.options.rightHandle.offset(),this.cache.leftHandle={},this.cache.leftHandle.offset=this.options.leftHandle.offset()},_mouseStart:function(a){this._super(a),this._deactivateRange()},_mouseStop:function(a){this._super(a),this._cacheHandles(),this._values.min=this._leftHandle("value"),this._values.max=this._rightHandle("value"),this._reactivateRange(),this._leftHandle().trigger("stop"),this._rightHandle().trigger("stop")},_onDragLeftHandle:function(a,b){if(this._cacheIfNecessary(),b.element[0]===this.options.leftHandle[0]){if(this._switchedValues())return this._switchHandles(),void this._onDragRightHandle(a,b);this._values.min=b.value,this.cache.offset.left=b.offset.left,this.cache.leftHandle.offset=b.offset,this._positionBar()}},_onDragRightHandle:function(a,b){if(this._cacheIfNecessary(),b.element[0]===this.options.rightHandle[0]){if(this._switchedValues())return this._switchHandles(),void this._onDragLeftHandle(a,b);this._values.max=b.value,this.cache.rightHandle.offset=b.offset,this._positionBar()}},_positionBar:function(){var a=this.cache.rightHandle.offset.left+this.cache.rightHandle.width-this.cache.leftHandle.offset.left;this.cache.width.inner=a,this.element.css("width",a).offset({left:this.cache.leftHandle.offset.left})},_onHandleStop:function(){this._setLeftRange(),this._setRightRange()},_switchedValues:function(){if(this.min()>this.max()){var a=this._values.min;return this._values.min=this._values.max,this._values.max=a,!0}return!1},_switchHandles:function(){var a=this.options.leftHandle;this.options.leftHandle=this.options.rightHandle,this.options.rightHandle=a,this._leftHandle("option","isLeft",!0),this._rightHandle("option","isLeft",!1),this._bindHandles(),this._cacheHandles()},_bindHandles:function(){this.options.leftHandle.unbind(".bar").bind("sliderDrag.bar update.bar moving.bar",a.proxy(this._onDragLeftHandle,this)),this.options.rightHandle.unbind(".bar").bind("sliderDrag.bar update.bar moving.bar",a.proxy(this._onDragRightHandle,this))},_constraintPosition:function(a){var b,c={};return c.left=this._super(a),c.left=this._leftHandle("position",c.left),b=this._rightHandle("position",c.left+this.cache.width.outer-this.cache.rightHandle.width),c.width=b-c.left+this.cache.rightHandle.width,c},_applyPosition:function(a){this._super(a.left),this.element.width(a.width)},_mouseWheelZoom:function(b,c,d,e){if(!this.enabled)return!1;var f=this._values.min+(this._values.max-this._values.min)/2,g={},h={};return this.options.range===!1||this.options.range.min===!1?(g.max=f,h.min=f):(g.max=f-this.options.range.min/2,h.min=f+this.options.range.min/2),this.options.range!==!1&&this.options.range.max!==!1&&(g.min=f-this.options.range.max/2,h.max=f+this.options.range.max/2),this._leftHandle("option","range",g),this._rightHandle("option","range",h),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(a.proxy(this._wheelStop,this),200),this.zoomIn(e*this.options.wheelSpeed),!1},_mouseWheelScroll:function(b,c,d,e){return this.enabled?(this._wheelTimeout===!1?this.startScroll():clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(a.proxy(this._wheelStop,this),200),this.scrollLeft(e*this.options.wheelSpeed),!1):!1},_wheelStop:function(){this.stopScroll(),this._wheelTimeout=!1},min:function(a){return this._leftHandle("value",a)},max:function(a){return this._rightHandle("value",a)},startScroll:function(){this._deactivateRange()},stopScroll:function(){this._reactivateRange(),this._triggerMouseEvent("stop"),this._leftHandle().trigger("stop"),this._rightHandle().trigger("stop")},scrollLeft:function(a){return a=a||1,0>a?this.scrollRight(-a):(a=this._leftHandle("moveLeft",a),this._rightHandle("moveLeft",a),this.update(),void this._triggerMouseEvent("scroll"))},scrollRight:function(a){return a=a||1,0>a?this.scrollLeft(-a):(a=this._rightHandle("moveRight",a),this._leftHandle("moveRight",a),this.update(),void this._triggerMouseEvent("scroll"))},zoomIn:function(a){if(a=a||1,0>a)return this.zoomOut(-a);var b=this._rightHandle("moveLeft",a);a>b&&(b/=2,this._rightHandle("moveRight",b)),this._leftHandle("moveRight",b),this.update(),this._triggerMouseEvent("zoom")},zoomOut:function(a){if(a=a||1,0>a)return this.zoomIn(-a);var b=this._rightHandle("moveRight",a);a>b&&(b/=2,this._rightHandle("moveLeft",b)),this._leftHandle("moveLeft",b),this.update(),this._triggerMouseEvent("zoom")},values:function(a,b){if("undefined"!=typeof a&&"undefined"!=typeof b){var c=Math.min(a,b),d=Math.max(a,b);this._deactivateRange(),this.options.leftHandle.unbind(".bar"),this.options.rightHandle.unbind(".bar"),this._values.min=this._leftHandle("value",c),this._values.max=this._rightHandle("value",d),this._bindHandles(),this._reactivateRange(),this.update()}return{min:this._values.min,max:this._values.max}},update:function(){this._values.min=this.min(),this._values.max=this.max(),this._cache(),this._positionBar()}})}(jQuery),function(a,b){"use strict";function c(b,c,d,e){this.label1=b,this.label2=c,this.type=d,this.options=e,this.handle1=this.label1[this.type]("option","handle"),this.handle2=this.label2[this.type]("option","handle"),this.cache=null,this.left=b,this.right=c,this.moving=!1,this.initialized=!1,this.updating=!1,this.Init=function(){this.BindHandle(this.handle1),this.BindHandle(this.handle2),"show"===this.options.show?(setTimeout(a.proxy(this.PositionLabels,this),1), +this.initialized=!0):setTimeout(a.proxy(this.AfterInit,this),1e3),this._resizeProxy=a.proxy(this.onWindowResize,this),a(window).resize(this._resizeProxy)},this.Destroy=function(){this._resizeProxy&&(a(window).unbind("resize",this._resizeProxy),this._resizeProxy=null,this.handle1.unbind(".positionner"),this.handle1=null,this.handle2.unbind(".positionner"),this.handle2=null,this.label1=null,this.label2=null,this.left=null,this.right=null),this.cache=null},this.AfterInit=function(){this.initialized=!0},this.Cache=function(){"none"!==this.label1.css("display")&&(this.cache={},this.cache.label1={},this.cache.label2={},this.cache.handle1={},this.cache.handle2={},this.cache.offsetParent={},this.CacheElement(this.label1,this.cache.label1),this.CacheElement(this.label2,this.cache.label2),this.CacheElement(this.handle1,this.cache.handle1),this.CacheElement(this.handle2,this.cache.handle2),this.CacheElement(this.label1.offsetParent(),this.cache.offsetParent))},this.CacheIfNecessary=function(){null===this.cache?this.Cache():(this.CacheWidth(this.label1,this.cache.label1),this.CacheWidth(this.label2,this.cache.label2),this.CacheHeight(this.label1,this.cache.label1),this.CacheHeight(this.label2,this.cache.label2),this.CacheWidth(this.label1.offsetParent(),this.cache.offsetParent))},this.CacheElement=function(a,b){this.CacheWidth(a,b),this.CacheHeight(a,b),b.offset=a.offset(),b.margin={left:this.ParsePixels("marginLeft",a),right:this.ParsePixels("marginRight",a)},b.border={left:this.ParsePixels("borderLeftWidth",a),right:this.ParsePixels("borderRightWidth",a)}},this.CacheWidth=function(a,b){b.width=a.width(),b.outerWidth=a.outerWidth()},this.CacheHeight=function(a,b){b.outerHeightMargin=a.outerHeight(!0)},this.ParsePixels=function(a,b){return parseInt(b.css(a),10)||0},this.BindHandle=function(b){b.bind("updating.positionner",a.proxy(this.onHandleUpdating,this)),b.bind("update.positionner",a.proxy(this.onHandleUpdated,this)),b.bind("moving.positionner",a.proxy(this.onHandleMoving,this)),b.bind("stop.positionner",a.proxy(this.onHandleStop,this))},this.PositionLabels=function(){if(this.CacheIfNecessary(),null!==this.cache){var a=this.GetRawPosition(this.cache.label1,this.cache.handle1),b=this.GetRawPosition(this.cache.label2,this.cache.handle2);this.label1[d]("option","isLeft")?this.ConstraintPositions(a,b):this.ConstraintPositions(b,a),this.PositionLabel(this.label1,a.left,this.cache.label1),this.PositionLabel(this.label2,b.left,this.cache.label2)}},this.PositionLabel=function(a,b,c){var d,e,f,g=this.cache.offsetParent.offset.left+this.cache.offsetParent.border.left;g-b>=0?(a.css("right",""),a.offset({left:b})):(d=g+this.cache.offsetParent.width,e=b+c.margin.left+c.outerWidth+c.margin.right,f=d-e,a.css("left",""),a.css("right",f))},this.ConstraintPositions=function(a,b){(a.centerb.outerLeft||a.center>b.center&&b.outerRight>a.outerLeft)&&(a=this.getLeftPosition(a,b),b=this.getRightPosition(a,b))},this.getLeftPosition=function(a,b){var c=(b.center+a.center)/2,d=c-a.cache.outerWidth-a.cache.margin.right+a.cache.border.left;return a.left=d,a},this.getRightPosition=function(a,b){var c=(b.center+a.center)/2;return b.left=c+b.cache.margin.left+b.cache.border.left,b},this.ShowIfNecessary=function(){"show"===this.options.show||this.moving||!this.initialized||this.updating||(this.label1.stop(!0,!0).fadeIn(this.options.durationIn||0),this.label2.stop(!0,!0).fadeIn(this.options.durationIn||0),this.moving=!0)},this.HideIfNeeded=function(){this.moving===!0&&(this.label1.stop(!0,!0).delay(this.options.delayOut||0).fadeOut(this.options.durationOut||0),this.label2.stop(!0,!0).delay(this.options.delayOut||0).fadeOut(this.options.durationOut||0),this.moving=!1)},this.onHandleMoving=function(a,b){this.ShowIfNecessary(),this.CacheIfNecessary(),this.UpdateHandlePosition(b),this.PositionLabels()},this.onHandleUpdating=function(){this.updating=!0},this.onHandleUpdated=function(){this.updating=!1,this.cache=null},this.onHandleStop=function(){this.HideIfNeeded()},this.onWindowResize=function(){this.cache=null},this.UpdateHandlePosition=function(a){null!==this.cache&&(a.element[0]===this.handle1[0]?this.UpdatePosition(a,this.cache.handle1):this.UpdatePosition(a,this.cache.handle2))},this.UpdatePosition=function(a,b){b.offset=a.offset,b.value=a.value},this.GetRawPosition=function(a,b){var c=b.offset.left+b.outerWidth/2,d=c-a.outerWidth/2,e=d+a.outerWidth-a.border.left-a.border.right,f=d-a.margin.left-a.border.left,g=b.offset.top-a.outerHeightMargin;return{left:d,outerLeft:f,top:g,right:e,outerRight:f+a.outerWidth+a.margin.left+a.margin.right,cache:a,center:c}},this.Init()}a.widget("ui.rangeSliderLabel",a.ui.rangeSliderMouseTouch,{options:{handle:null,formatter:!1,handleType:"rangeSliderHandle",show:"show",durationIn:0,durationOut:500,delayOut:500,isLeft:!1},cache:null,_positionner:null,_valueContainer:null,_innerElement:null,_value:null,_create:function(){this.options.isLeft=this._handle("option","isLeft"),this.element.addClass("ui-rangeSlider-label").css("position","absolute").css("display","block"),this._createElements(),this._toggleClass(),this.options.handle.bind("moving.label",a.proxy(this._onMoving,this)).bind("update.label",a.proxy(this._onUpdate,this)).bind("switch.label",a.proxy(this._onSwitch,this)),"show"!==this.options.show&&this.element.hide(),this._mouseInit()},destroy:function(){this.options.handle.unbind(".label"),this.options.handle=null,this._valueContainer=null,this._innerElement=null,this.element.empty(),this._positionner&&(this._positionner.Destroy(),this._positionner=null),this._super()},_createElements:function(){this._valueContainer=a("
").appendTo(this.element),this._innerElement=a("
").appendTo(this.element)},_handle:function(){var a=Array.prototype.slice.apply(arguments);return this.options.handle[this.options.handleType].apply(this.options.handle,a)},_setOption:function(a,b){"show"===a?this._updateShowOption(b):("durationIn"===a||"durationOut"===a||"delayOut"===a)&&this._updateDurations(a,b),this._setFormatterOption(a,b)},_setFormatterOption:function(a,b){"formatter"===a&&("function"==typeof b||b===!1)&&(this.options.formatter=b,this._display(this._value))},_updateShowOption:function(a){this.options.show=a,"show"!==this.options.show?(this.element.hide(),this._positionner.moving=!1):(this.element.show(),this._display(this.options.handle[this.options.handleType]("value")),this._positionner.PositionLabels()),this._positionner.options.show=this.options.show},_updateDurations:function(a,b){parseInt(b,10)===b&&(this._positionner.options[a]=b,this.options[a]=b)},_display:function(a){this.options.formatter===!1?this._displayText(Math.round(a)):this._displayText(this.options.formatter(a,this.options.isLeft)),this._value=a},_displayText:function(a){this._valueContainer.text(a)},_toggleClass:function(){this.element.toggleClass("ui-rangeSlider-leftLabel",this.options.isLeft).toggleClass("ui-rangeSlider-rightLabel",!this.options.isLeft)},_positionLabels:function(){this._positionner.PositionLabels()},_mouseDown:function(a){this.options.handle.trigger(a)},_mouseUp:function(a){this.options.handle.trigger(a)},_mouseMove:function(a){this.options.handle.trigger(a)},_onMoving:function(a,b){this._display(b.value)},_onUpdate:function(){"show"===this.options.show&&this.update()},_onSwitch:function(a,b){this.options.isLeft=b,this._toggleClass(),this._positionLabels()},pair:function(a){null===this._positionner&&(this._positionner=new c(this.element,a,this.widgetName,{show:this.options.show,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}),a[this.widgetName]("positionner",this._positionner))},positionner:function(a){return"undefined"!=typeof a&&(this._positionner=a),this._positionner},update:function(){this._positionner.cache=null,this._display(this._handle("value")),"show"===this.options.show&&this._positionLabels()}})}(jQuery),function(a,b){"use strict";a.widget("ui.dateRangeSlider",a.ui.rangeSlider,{options:{bounds:{min:new Date(2010,0,1).valueOf(),max:new Date(2012,0,1).valueOf()},defaultValues:{min:new Date(2010,1,11).valueOf(),max:new Date(2011,1,11).valueOf()}},_create:function(){this._super(),this.element.addClass("ui-dateRangeSlider")},destroy:function(){this.element.removeClass("ui-dateRangeSlider"),this._super()},_setDefaultValues:function(){this._values={min:this.options.defaultValues.min.valueOf(),max:this.options.defaultValues.max.valueOf()}},_setRulerParameters:function(){this.ruler.ruler({min:new Date(this.options.bounds.min.valueOf()),max:new Date(this.options.bounds.max.valueOf()),scales:this.options.scales})},_setOption:function(a,b){("defaultValues"===a||"bounds"===a)&&"undefined"!=typeof b&&null!==b&&this._isValidDate(b.min)&&this._isValidDate(b.max)?this._super(a,{min:b.min.valueOf(),max:b.max.valueOf()}):this._super.apply(this,this._toArray(arguments))},_handleType:function(){return"dateRangeSliderHandle"},option:function(a){if("bounds"===a||"defaultValues"===a){var b=this._super.apply(this,this._toArray(arguments));return{min:new Date(b.min),max:new Date(b.max)}}return this._super.apply(this,this._toArray(arguments))},_defaultFormatter:function(a){var b=a.getMonth()+1,c=a.getDate();return""+a.getFullYear()+"-"+(10>b?"0"+b:b)+"-"+(10>c?"0"+c:c)},_getFormatter:function(){var a=this.options.formatter;return(this.options.formatter===!1||null===this.options.formatter)&&(a=this._defaultFormatter.bind(this)),function(a){return function(b,c){return a(new Date(b),c)}}(a)},values:function(a,b){var c=null;return c=this._isValidDate(a)&&this._isValidDate(b)?this._super(a.valueOf(),b.valueOf()):this._super.apply(this,this._toArray(arguments)),{min:new Date(c.min),max:new Date(c.max)}},min:function(a){return this._isValidDate(a)?new Date(this._super(a.valueOf())):new Date(this._super())},max:function(a){return this._isValidDate(a)?new Date(this._super(a.valueOf())):new Date(this._super())},bounds:function(a,b){var c;return c=this._isValidDate(a)&&this._isValidDate(b)?this._super(a.valueOf(),b.valueOf()):this._super.apply(this,this._toArray(arguments)),{min:new Date(c.min),max:new Date(c.max)}},_isValidDate:function(a){return"undefined"!=typeof a&&a instanceof Date},_toArray:function(a){return Array.prototype.slice.call(a)}})}(jQuery),function(a,b){"use strict";a.widget("ui.dateRangeSliderHandle",a.ui.rangeSliderHandle,{_steps:!1,_boundsValues:{},_create:function(){this._createBoundsValues(),this._super()},_getValueForPosition:function(a){var b=this._getRawValueForPositionAndBounds(a,this.options.bounds.min.valueOf(),this.options.bounds.max.valueOf());return this._constraintValue(new Date(b))},_setOption:function(a,b){return"step"===a?(this.options.step=b,this._createSteps(),void this.update()):(this._super(a,b),void("bounds"===a&&this._createBoundsValues()))},_createBoundsValues:function(){this._boundsValues={min:this.options.bounds.min.valueOf(),max:this.options.bounds.max.valueOf()}},_bounds:function(){return this._boundsValues},_createSteps:function(){if(this.options.step===!1||!this._isValidStep())return void(this._steps=!1);var a=new Date(this.options.bounds.min.valueOf()),b=new Date(this.options.bounds.max.valueOf()),c=a,d=0,e=new Date;for(this._steps=[];b>=c&&(1===d||e.valueOf()!==c.valueOf());)e=c,this._steps.push(c.valueOf()),c=this._addStep(a,d,this.options.step),d++;e.valueOf()===c.valueOf()&&(this._steps=!1)},_isValidStep:function(){return"object"==typeof this.options.step},_addStep:function(a,b,c){var d=new Date(a.valueOf());return d=this._addThing(d,"FullYear",b,c.years),d=this._addThing(d,"Month",b,c.months),d=this._addThing(d,"Date",b,7*c.weeks),d=this._addThing(d,"Date",b,c.days),d=this._addThing(d,"Hours",b,c.hours),d=this._addThing(d,"Minutes",b,c.minutes),d=this._addThing(d,"Seconds",b,c.seconds)},_addThing:function(a,b,c,d){return 0===c||0===(d||0)?a:(a["set"+b](a["get"+b]()+c*(d||0)),a)},_round:function(a){if(this._steps===!1)return a;for(var b,c,d=this.options.bounds.max.valueOf(),e=this.options.bounds.min.valueOf(),f=Math.max(0,(a-e)/(d-e)),g=Math.floor(this._steps.length*f);this._steps[g]>a;)g--;for(;g+1=this._steps.length-1?this._steps[this._steps.length-1]:0===g?this._steps[0]:(b=this._steps[g],c=this._steps[g+1],c-a>a-b?b:c)},update:function(){this._createBoundsValues(),this._createSteps(),this._super()},add:function(a,b){return this._addStep(new Date(a),1,b).valueOf()},substract:function(a,b){return this._addStep(new Date(a),-1,b).valueOf()},stepsBetween:function(a,b){if(this.options.step===!1)return b-a;var c=Math.min(a,b),d=Math.max(a,b),e=0,f=!1,g=a>b;for(this.add(c,this.options.step)-c<0&&(f=!0);d>c;)f?d=this.add(d,this.options.step):c=this.add(c,this.options.step),e++;return g?-e:e},multiplyStep:function(a,b){var c={};for(var d in a)a.hasOwnProperty(d)&&(c[d]=a[d]*b);return c},stepRatio:function(){if(this.options.step===!1)return 1;var a=this._steps.length;return this.cache.parent.width/a}})}(jQuery),function(a){"use strict";var b={first:function(a){return a},next:function(a){return a+1},format:function(){},label:function(a){return Math.round(a)},stop:function(){return!1}};a.widget("ui.ruler",{options:{min:0,max:100,scales:[]},_create:function(){this.element.addClass("ui-ruler"),this._createScales()},destroy:function(){this.element.removeClass("ui-ruler"),this.element.empty(),this._super()},_regenerate:function(){this.element.empty(),this._createScales()},_setOption:function(a,b){return"min"===a||"max"===a&&b!==this.options[a]?(this.options[a]=b,void this._regenerate()):"scales"===a&&b instanceof Array?(this.options.scales=b,void this._regenerate()):void 0},_createScales:function(){if(this.options.max!==this.options.min)for(var a=0;a").appendTo(this.element);f.addClass("ui-ruler-scale"+d),this._createTicks(f,e)},_createTicks:function(a,b){var c,d,e,f=b.first(this.options.min,this.options.max),g=this.options.max-this.options.min,h=!0;do c=f,f=b.next(c),d=(Math.min(f,this.options.max)-Math.max(c,this.options.min))/g,e=this._createTick(c,f,b),a.append(e),e.css("width",100*d+"%"),h&&c>this.options.min&&e.css("margin-left",100*(c-this.options.min)/g+"%"),h=!1;while(!this._stop(b,f))},_stop:function(a,b){return a.stop(b)||b>=this.options.max},_createTick:function(b,c,d){var e=a("
"),f=a("
").appendTo(e),g=a("").appendTo(f);return g.text(d.label(b,c)),d.format(e,b,c),e}})}(jQuery); \ No newline at end of file diff --git a/app/assets/vendored/lib/jqrangeslider/jQEditRangeSlider-min.js b/app/assets/vendored/lib/jqrangeslider/jQEditRangeSlider-min.js new file mode 100644 index 000000000..743d90a6f --- /dev/null +++ b/app/assets/vendored/lib/jqrangeslider/jQEditRangeSlider-min.js @@ -0,0 +1,2 @@ +/*! jQRangeSlider 5.8.2 - 2023-10-19 - Copyright (C) Guillaume Gautreau 2012 - MIT and GPLv3 licenses.*/!function(a,b){"use strict";a.widget("ui.rangeSliderMouseTouch",a.ui.mouse,{enabled:!0,_mouseInit:function(){var a=this;this._super(),this._mouseDownEvent=!1,this.element.bind("touchstart."+this.widgetName,function(b){return a._touchStart(b)})},_mouseDestroy:function(){a(document).unbind("touchmove."+this.widgetName,this._touchMoveDelegate).unbind("touchend."+this.widgetName,this._touchEndDelegate),this._super()},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},destroy:function(){this._mouseDestroy(),this._super(),this._mouseInit=null},_touchStart:function(b){if(!this.enabled)return!1;b.which=1,b.preventDefault(),this._fillTouchEvent(b);var c=this,d=this._mouseDownEvent;this._mouseDown(b),d!==this._mouseDownEvent&&(this._touchEndDelegate=function(a){c._touchEnd(a)},this._touchMoveDelegate=function(a){c._touchMove(a)},a(document).bind("touchmove."+this.widgetName,this._touchMoveDelegate).bind("touchend."+this.widgetName,this._touchEndDelegate))},_mouseDown:function(a){return this.enabled?this._super(a):!1},_touchEnd:function(b){this._fillTouchEvent(b),this._mouseUp(b),a(document).unbind("touchmove."+this.widgetName,this._touchMoveDelegate).unbind("touchend."+this.widgetName,this._touchEndDelegate),this._mouseDownEvent=!1,a(document).trigger("mouseup")},_touchMove:function(a){return a.preventDefault(),this._fillTouchEvent(a),this._mouseMove(a)},_fillTouchEvent:function(a){var b;b="undefined"==typeof a.targetTouches&&"undefined"==typeof a.changedTouches?a.originalEvent.targetTouches[0]||a.originalEvent.changedTouches[0]:a.targetTouches[0]||a.changedTouches[0],a.pageX=b.pageX,a.pageY=b.pageY,a.which=1}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSliderDraggable",a.ui.rangeSliderMouseTouch,{cache:null,options:{containment:null},_create:function(){this._super(),setTimeout(a.proxy(this._initElementIfNotDestroyed,this),10)},destroy:function(){this.cache=null,this._super()},_initElementIfNotDestroyed:function(){this._mouseInit&&this._initElement()},_initElement:function(){this._mouseInit(),this._cache()},_setOption:function(b,c){"containment"===b&&(null===c||0===a(c).length?this.options.containment=null:this.options.containment=a(c))},_mouseStart:function(a){return this._cache(),this.cache.click={left:a.pageX,top:a.pageY},this.cache.initialOffset=this.element.offset(),this._triggerMouseEvent("mousestart"),!0},_mouseDrag:function(a){var b=a.pageX-this.cache.click.left;return b=this._constraintPosition(b+this.cache.initialOffset.left),this._applyPosition(b),this._triggerMouseEvent("sliderDrag"),!1},_mouseStop:function(){this._triggerMouseEvent("stop")},_constraintPosition:function(a){return 0!==this.element.parent().length&&null!==this.cache.parent.offset&&(a=Math.min(a,this.cache.parent.offset.left+this.cache.parent.width-this.cache.width.outer),a=Math.max(a,this.cache.parent.offset.left)),a},_applyPosition:function(a){this._cacheIfNecessary();var b={top:this.cache.offset.top,left:a};this.element.offset({left:a}),this.cache.offset=b},_cacheIfNecessary:function(){null===this.cache&&this._cache()},_cache:function(){this.cache={},this._cacheMargins(),this._cacheParent(),this._cacheDimensions(),this.cache.offset=this.element.offset()},_cacheMargins:function(){this.cache.margin={left:this._parsePixels(this.element,"marginLeft"),right:this._parsePixels(this.element,"marginRight"),top:this._parsePixels(this.element,"marginTop"),bottom:this._parsePixels(this.element,"marginBottom")}},_cacheParent:function(){if(null!==this.options.parent){var a=this.element.parent();this.cache.parent={offset:a.offset(),width:a.width()}}else this.cache.parent=null},_cacheDimensions:function(){this.cache.width={outer:this.element.outerWidth(),inner:this.element.width()}},_parsePixels:function(a,b){return parseInt(a.css(b),10)||0},_triggerMouseEvent:function(a){var b=this._prepareEventData();this.element.trigger(a,b)},_prepareEventData:function(){return{element:this.element,offset:this.cache.offset||null}}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSlider",{options:{bounds:{min:0,max:100},defaultValues:{min:20,max:50},wheelMode:null,wheelSpeed:4,arrows:!0,valueLabels:"show",formatter:null,durationIn:0,durationOut:400,delayOut:200,range:{min:!1,max:!1},step:!1,scales:!1,enabled:!0,symmetricPositionning:!1},_values:null,_valuesChanged:!1,_initialized:!1,bar:null,leftHandle:null,rightHandle:null,innerBar:null,container:null,arrows:null,labels:null,changing:{min:!1,max:!1},changed:{min:!1,max:!1},ruler:null,_create:function(){this._super(),this._setDefaultValues(),this.labels={left:null,right:null,leftDisplayed:!0,rightDisplayed:!0},this.arrows={left:null,right:null},this.changing={min:!1,max:!1},this.changed={min:!1,max:!1},this._createElements(),this._bindResize(),setTimeout(a.proxy(this.resize,this),1),setTimeout(a.proxy(this._initValues,this),1)},_setDefaultValues:function(){this._values={min:this.options.defaultValues.min,max:this.options.defaultValues.max}},_bindResize:function(){var b=this;this._resizeProxy=function(a){b.resize(a)},a(window).resize(this._resizeProxy)},_initWidth:function(){this.container.css("width",this.element.width()-this.container.outerWidth(!0)+this.container.width()),this.innerBar.css("width",this.container.width()-this.innerBar.outerWidth(!0)+this.innerBar.width())},_initValues:function(){this._initialized=!0,this.values(this._values.min,this._values.max)},_setOption:function(a,b){this._setWheelOption(a,b),this._setArrowsOption(a,b),this._setLabelsOption(a,b),this._setLabelsDurations(a,b),this._setFormatterOption(a,b),this._setBoundsOption(a,b),this._setRangeOption(a,b),this._setStepOption(a,b),this._setScalesOption(a,b),this._setEnabledOption(a,b),this._setPositionningOption(a,b)},_validProperty:function(a,b,c){return null===a||"undefined"==typeof a[b]?c:a[b]},_setStepOption:function(a,b){"step"===a&&(this.options.step=b,this._leftHandle("option","step",b),this._rightHandle("option","step",b),this._changed(!0))},_setScalesOption:function(a,b){"scales"===a&&(b===!1||null===b?(this.options.scales=!1,this._destroyRuler()):b instanceof Array&&(this.options.scales=b,this._updateRuler()))},_setRangeOption:function(a,b){"range"===a&&(this._bar("option","range",b),this.options.range=this._bar("option","range"),this._changed(!0))},_setBoundsOption:function(a,b){"bounds"===a&&"undefined"!=typeof b.min&&"undefined"!=typeof b.max&&this.bounds(b.min,b.max)},_setWheelOption:function(a,b){("wheelMode"===a||"wheelSpeed"===a)&&(this._bar("option",a,b),this.options[a]=this._bar("option",a))},_setLabelsOption:function(a,b){if("valueLabels"===a){if("hide"!==b&&"show"!==b&&"change"!==b)return;this.options.valueLabels=b,"hide"!==b?(this._createLabels(),this._leftLabel("update"),this._rightLabel("update")):this._destroyLabels()}},_setFormatterOption:function(a,b){"formatter"===a&&null!==b&&"function"==typeof b&&"hide"!==this.options.valueLabels&&(this._leftLabel("option","formatter",b),this.options.formatter=this._rightLabel("option","formatter",b))},_setArrowsOption:function(a,b){"arrows"!==a||b!==!0&&b!==!1||b===this.options.arrows||(b===!0?(this.element.removeClass("ui-rangeSlider-noArrow").addClass("ui-rangeSlider-withArrows"),this.arrows.left.css("display","block"),this.arrows.right.css("display","block"),this.options.arrows=!0):b===!1&&(this.element.addClass("ui-rangeSlider-noArrow").removeClass("ui-rangeSlider-withArrows"),this.arrows.left.css("display","none"),this.arrows.right.css("display","none"),this.options.arrows=!1),this._initWidth())},_setLabelsDurations:function(a,b){if("durationIn"===a||"durationOut"===a||"delayOut"===a){if(parseInt(b,10)!==b)return;null!==this.labels.left&&this._leftLabel("option",a,b),null!==this.labels.right&&this._rightLabel("option",a,b),this.options[a]=b}},_setEnabledOption:function(a,b){"enabled"===a&&this.toggle(b)},_setPositionningOption:function(a,b){"symmetricPositionning"===a&&(this._rightHandle("option",a,b),this.options[a]=this._leftHandle("option",a,b))},_createElements:function(){"absolute"!==this.element.css("position")&&this.element.css("position","relative"),this.element.addClass("ui-rangeSlider"),this.container=a("
").css("position","absolute").appendTo(this.element),this.innerBar=a("
").css("position","absolute").css("top",0).css("left",0),this._createHandles(),this._createBar(),this.container.prepend(this.innerBar),this._createArrows(),"hide"!==this.options.valueLabels?this._createLabels():this._destroyLabels(),this._updateRuler(),this.options.enabled||this._toggle(this.options.enabled)},_createHandle:function(b){return a("
")[this._handleType()](b).bind("sliderDrag",a.proxy(this._changing,this)).bind("stop",a.proxy(this._changed,this))},_createHandles:function(){this.leftHandle=this._createHandle({isLeft:!0,bounds:this.options.bounds,value:this._values.min,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container),this.rightHandle=this._createHandle({isLeft:!1,bounds:this.options.bounds,value:this._values.max,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container)},_createBar:function(){this.bar=a("
").prependTo(this.container).bind("sliderDrag scroll zoom",a.proxy(this._changing,this)).bind("stop",a.proxy(this._changed,this)),this._bar({leftHandle:this.leftHandle,rightHandle:this.rightHandle,values:{min:this._values.min,max:this._values.max},type:this._handleType(),range:this.options.range,wheelMode:this.options.wheelMode,wheelSpeed:this.options.wheelSpeed}),this.options.range=this._bar("option","range"),this.options.wheelMode=this._bar("option","wheelMode"),this.options.wheelSpeed=this._bar("option","wheelSpeed")},_createArrows:function(){this.arrows.left=this._createArrow("left"),this.arrows.right=this._createArrow("right"),this.options.arrows?this.element.addClass("ui-rangeSlider-withArrows"):(this.arrows.left.css("display","none"),this.arrows.right.css("display","none"),this.element.addClass("ui-rangeSlider-noArrow"))},_createArrow:function(b){var c,d=a("
").append("
").addClass("ui-rangeSlider-"+b+"Arrow").css("position","absolute").css(b,0).appendTo(this.element);return c="right"===b?a.proxy(this._scrollRightClick,this):a.proxy(this._scrollLeftClick,this),d.bind("mousedown touchstart",c),d},_proxy:function(a,b,c){var d=Array.prototype.slice.call(c);return a&&a[b]?a[b].apply(a,d):null},_handleType:function(){return"rangeSliderHandle"},_barType:function(){return"rangeSliderBar"},_bar:function(){return this._proxy(this.bar,this._barType(),arguments)},_labelType:function(){return"rangeSliderLabel"},_leftLabel:function(){return this._proxy(this.labels.left,this._labelType(),arguments)},_rightLabel:function(){return this._proxy(this.labels.right,this._labelType(),arguments)},_leftHandle:function(){return this._proxy(this.leftHandle,this._handleType(),arguments)},_rightHandle:function(){return this._proxy(this.rightHandle,this._handleType(),arguments)},_getValue:function(a,b){return b===this.rightHandle&&(a-=b.outerWidth()),a*(this.options.bounds.max-this.options.bounds.min)/(this.container.innerWidth()-b.outerWidth(!0))+this.options.bounds.min},_trigger:function(a){var b=this;setTimeout(function(){b.element.trigger(a,{label:b.element,values:b.values()})},1)},_changing:function(){this._updateValues()&&(this._trigger("valuesChanging"),this._valuesChanged=!0)},_deactivateLabels:function(){"change"===this.options.valueLabels&&(this._leftLabel("option","show","hide"),this._rightLabel("option","show","hide"))},_reactivateLabels:function(){"change"===this.options.valueLabels&&(this._leftLabel("option","show","change"),this._rightLabel("option","show","change"))},_changed:function(a){a===!0&&this._deactivateLabels(),(this._updateValues()||this._valuesChanged)&&(this._trigger("valuesChanged"),a!==!0&&this._trigger("userValuesChanged"),this._valuesChanged=!1),a===!0&&this._reactivateLabels()},_updateValues:function(){var a=this._leftHandle("value"),b=this._rightHandle("value"),c=this._min(a,b),d=this._max(a,b),e=c!==this._values.min||d!==this._values.max;return this._values.min=this._min(a,b),this._values.max=this._max(a,b),e},_min:function(a,b){return Math.min(a,b)},_max:function(a,b){return Math.max(a,b)},_createLabel:function(b,c){var d;return null===b?(d=this._getLabelConstructorParameters(b,c),b=a("
").appendTo(this.element)[this._labelType()](d)):(d=this._getLabelRefreshParameters(b,c),b[this._labelType()](d)),b},_getLabelConstructorParameters:function(a,b){return{handle:b,handleType:this._handleType(),formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getLabelRefreshParameters:function(){return{formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getFormatter:function(){return this.options.formatter===!1||null===this.options.formatter?this._defaultFormatter.bind(this):this.options.formatter},_defaultFormatter:function(a){return Math.round(a)},_destroyLabel:function(a){return null!==a&&(a[this._labelType()]("destroy"),a.remove(),a=null),a},_createLabels:function(){this.labels.left=this._createLabel(this.labels.left,this.leftHandle),this.labels.right=this._createLabel(this.labels.right,this.rightHandle),this._leftLabel("pair",this.labels.right)},_destroyLabels:function(){this.labels.left=this._destroyLabel(this.labels.left),this.labels.right=this._destroyLabel(this.labels.right)},_stepRatio:function(){return this._leftHandle("stepRatio")},_scrollRightClick:function(a){return this.options.enabled?(a.preventDefault(),this._bar("startScroll"),this._bindStopScroll(),void this._continueScrolling("scrollRight",4*this._stepRatio(),1)):!1},_continueScrolling:function(a,b,c,d){if(!this.options.enabled)return!1;this._bar(a,c),d=d||5,d--;var e=this,f=16,g=Math.max(1,4/this._stepRatio());this._scrollTimeout=setTimeout(function(){0===d&&(b>f?b=Math.max(f,b/1.5):c=Math.min(g,2*c),d=5),e._continueScrolling(a,b,c,d)},b)},_scrollLeftClick:function(a){return this.options.enabled?(a.preventDefault(),this._bar("startScroll"),this._bindStopScroll(),void this._continueScrolling("scrollLeft",4*this._stepRatio(),1)):!1},_bindStopScroll:function(){var b=this;this._stopScrollHandle=function(a){a.preventDefault(),b._stopScroll()},a(document).bind("mouseup touchend",this._stopScrollHandle)},_stopScroll:function(){a(document).unbind("mouseup touchend",this._stopScrollHandle),this._stopScrollHandle=null,this._bar("stopScroll"),clearTimeout(this._scrollTimeout)},_createRuler:function(){this.ruler=a("
").appendTo(this.innerBar)},_setRulerParameters:function(){this.ruler.ruler({min:this.options.bounds.min,max:this.options.bounds.max,scales:this.options.scales})},_destroyRuler:function(){null!==this.ruler&&a.fn.ruler&&(this.ruler.ruler("destroy"),this.ruler.remove(),this.ruler=null)},_updateRuler:function(){this._destroyRuler(),this.options.scales!==!1&&a.fn.ruler&&(this._createRuler(),this._setRulerParameters())},values:function(a,b){var c;if("undefined"!=typeof a&&"undefined"!=typeof b){if(!this._initialized)return this._values.min=a,this._values.max=b,this._values;this._deactivateLabels(),c=this._bar("values",a,b),this._changed(!0),this._reactivateLabels()}else c=this._bar("values",a,b);return c},min:function(a){return this._values.min=this.values(a,this._values.max).min,this._values.min},max:function(a){return this._values.max=this.values(this._values.min,a).max,this._values.max},bounds:function(a,b){return this._isValidValue(a)&&this._isValidValue(b)&&b>a&&(this._setBounds(a,b),this._updateRuler(),this._changed(!0)),this.options.bounds},_isValidValue:function(a){return"undefined"!=typeof a&&parseFloat(a)===a},_setBounds:function(a,b){this.options.bounds={min:a,max:b},this._leftHandle("option","bounds",this.options.bounds),this._rightHandle("option","bounds",this.options.bounds),this._bar("option","bounds",this.options.bounds)},zoomIn:function(a){this._bar("zoomIn",a)},zoomOut:function(a){this._bar("zoomOut",a)},scrollLeft:function(a){this._bar("startScroll"),this._bar("scrollLeft",a),this._bar("stopScroll")},scrollRight:function(a){this._bar("startScroll"),this._bar("scrollRight",a),this._bar("stopScroll")},resize:function(){this.container&&(this._initWidth(),this._leftHandle("update"),this._rightHandle("update"),this._bar("update"))},enable:function(){this.toggle(!0)},disable:function(){this.toggle(!1)},toggle:function(a){a===b&&(a=!this.options.enabled),this.options.enabled!==a&&this._toggle(a)},_toggle:function(a){this.options.enabled=a,this.element.toggleClass("ui-rangeSlider-disabled",!a);var b=a?"enable":"disable";this._bar(b),this._leftHandle(b),this._rightHandle(b),this._leftLabel(b),this._rightLabel(b)},destroy:function(){this.element.removeClass("ui-rangeSlider-withArrows ui-rangeSlider-noArrow ui-rangeSlider-disabled"),this._destroyWidgets(),this._destroyElements(),this.element.removeClass("ui-rangeSlider"),this.options=null,a(window).unbind("resize",this._resizeProxy),this._resizeProxy=null,this._bindResize=null,this._super()},_destroyWidget:function(a){this["_"+a]("destroy"),this[a].remove(),this[a]=null},_destroyWidgets:function(){this._destroyWidget("bar"),this._destroyWidget("leftHandle"),this._destroyWidget("rightHandle"),this._destroyRuler(),this._destroyLabels()},_destroyElements:function(){this.container.remove(),this.container=null,this.innerBar.remove(),this.innerBar=null,this.arrows.left.remove(),this.arrows.right.remove(),this.arrows=null}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSliderHandle",a.ui.rangeSliderDraggable,{currentMove:null,margin:0,parentElement:null,options:{isLeft:!0,bounds:{min:0,max:100},range:!1,value:0,step:!1},_value:0,_left:0,_create:function(){this._super(),this.element.css("position","absolute").css("top",0).addClass("ui-rangeSlider-handle").toggleClass("ui-rangeSlider-leftHandle",this.options.isLeft).toggleClass("ui-rangeSlider-rightHandle",!this.options.isLeft),this.element.append("
"),this._value=this._constraintValue(this.options.value)},destroy:function(){this.element.empty(),this._super()},_setOption:function(a,b){"isLeft"!==a||b!==!0&&b!==!1||b===this.options.isLeft?"step"===a&&this._checkStep(b)?(this.options.step=b,this.update()):"bounds"===a?(this.options.bounds=b,this.update()):"range"===a&&this._checkRange(b)?(this.options.range=b,this.update()):"symmetricPositionning"===a&&(this.options.symmetricPositionning=b===!0,this.update()):(this.options.isLeft=b,this.element.toggleClass("ui-rangeSlider-leftHandle",this.options.isLeft).toggleClass("ui-rangeSlider-rightHandle",!this.options.isLeft),this._position(this._value),this.element.trigger("switch",this.options.isLeft)),this._super(a,b)},_checkRange:function(a){return a===!1||!this._isValidValue(a.min)&&!this._isValidValue(a.max)},_isValidValue:function(a){return"undefined"!=typeof a&&a!==!1&&parseFloat(a)!==a},_checkStep:function(a){return a===!1||parseFloat(a)===a},_initElement:function(){this._super(),0===this.cache.parent.width||null===this.cache.parent.width?setTimeout(a.proxy(this._initElementIfNotDestroyed,this),500):(this._position(this._value),this._triggerMouseEvent("initialize"))},_bounds:function(){return this.options.bounds},_cache:function(){this._super(),this._cacheParent()},_cacheParent:function(){var a=this.element.parent();this.cache.parent={element:a,offset:a.offset(),padding:{left:this._parsePixels(a,"paddingLeft")},width:a.width()}},_position:function(a){var b=this._getPositionForValue(a);this._applyPosition(b)},_constraintPosition:function(a){var b=this._getValueForPosition(a);return this._getPositionForValue(b)},_applyPosition:function(a){this._super(a),this._left=a,this._setValue(this._getValueForPosition(a)),this._triggerMouseEvent("moving")},_prepareEventData:function(){var a=this._super();return a.value=this._value,a},_setValue:function(a){a!==this._value&&(this._value=a)},_constraintValue:function(a){if(a=Math.min(a,this._bounds().max),a=Math.max(a,this._bounds().min),a=this._round(a),this.options.range!==!1){var b=this.options.range.min||!1,c=this.options.range.max||!1;b!==!1&&(a=Math.max(a,this._round(b))),c!==!1&&(a=Math.min(a,this._round(c))),a=Math.min(a,this._bounds().max),a=Math.max(a,this._bounds().min)}return a},_round:function(a){return this.options.step!==!1&&this.options.step>0?Math.round(a/this.options.step)*this.options.step:a},_getPositionForValue:function(a){if(!this.cache||!this.cache.parent||null===this.cache.parent.offset)return 0;a=this._constraintValue(a);var b=(a-this.options.bounds.min)/(this.options.bounds.max-this.options.bounds.min),c=this.cache.parent.width,d=this.cache.parent.offset.left,e=this.options.isLeft?0:this.cache.width.outer;return this.options.symmetricPositionning?b*(c-2*this.cache.width.outer)+d+e:b*c+d-e},_getValueForPosition:function(a){var b=this._getRawValueForPositionAndBounds(a,this.options.bounds.min,this.options.bounds.max);return this._constraintValue(b)},_getRawValueForPositionAndBounds:function(a,b,c){var d,e,f=null===this.cache.parent.offset?0:this.cache.parent.offset.left;return this.options.symmetricPositionning?(a-=this.options.isLeft?0:this.cache.width.outer,d=this.cache.parent.width-2*this.cache.width.outer):(a+=this.options.isLeft?0:this.cache.width.outer,d=this.cache.parent.width),0===d?this._value:(e=(a-f)/d,e*(c-b)+b)},value:function(a){return"undefined"!=typeof a&&(this._cache(),a=this._constraintValue(a),this._position(a)),this._value},update:function(){this._cache();var a=this._constraintValue(this._value),b=this._getPositionForValue(a);a!==this._value?(this._triggerMouseEvent("updating"),this._position(a),this._triggerMouseEvent("update")):b!==this.cache.offset.left&&(this._triggerMouseEvent("updating"),this._position(a),this._triggerMouseEvent("update"))},position:function(a){return"undefined"!=typeof a&&(this._cache(),a=this._constraintPosition(a),this._applyPosition(a)),this._left},add:function(a,b){return a+b},substract:function(a,b){return a-b},stepsBetween:function(a,b){return this.options.step===!1?b-a:(b-a)/this.options.step},multiplyStep:function(a,b){return a*b},moveRight:function(a){var b;return this.options.step===!1?(b=this._left,this.position(this._left+a),this._left-b):(b=this._value,this.value(this.add(b,this.multiplyStep(this.options.step,a))),this.stepsBetween(b,this._value))},moveLeft:function(a){return-this.moveRight(-a)},stepRatio:function(){if(this.options.step===!1)return 1;var a=(this.options.bounds.max-this.options.bounds.min)/this.options.step;return this.cache.parent.width/a}})}(jQuery),function(a,b){"use strict";function c(a,b){return"undefined"==typeof a?b||!1:a}a.widget("ui.rangeSliderBar",a.ui.rangeSliderDraggable,{options:{leftHandle:null,rightHandle:null,bounds:{min:0,max:100},type:"rangeSliderHandle",range:!1,drag:function(){},stop:function(){},values:{min:0,max:20},wheelSpeed:4,wheelMode:null},_values:{min:0,max:20},_waitingToInit:2,_wheelTimeout:!1,_create:function(){this._super(),this.element.css("position","absolute").css("top",0).addClass("ui-rangeSlider-bar"),this.options.leftHandle.bind("initialize",a.proxy(this._onInitialized,this)).bind("mousestart",a.proxy(this._cache,this)).bind("stop",a.proxy(this._onHandleStop,this)),this.options.rightHandle.bind("initialize",a.proxy(this._onInitialized,this)).bind("mousestart",a.proxy(this._cache,this)).bind("stop",a.proxy(this._onHandleStop,this)),this._bindHandles(),this._values=this.options.values,this._setWheelModeOption(this.options.wheelMode)},destroy:function(){this.options.leftHandle.unbind(".bar"),this.options.rightHandle.unbind(".bar"),this.options=null,this._super()},_setOption:function(a,b){"range"===a?this._setRangeOption(b):"wheelSpeed"===a?this._setWheelSpeedOption(b):"wheelMode"===a&&this._setWheelModeOption(b)},_setRangeOption:function(a){if(("object"!=typeof a||null===a)&&(a=!1),a!==!1||this.options.range!==!1){if(a!==!1){var b=c(a.min,this.options.range.min),d=c(a.max,this.options.range.max);this.options.range={min:b,max:d}}else this.options.range=!1;this._setLeftRange(),this._setRightRange()}},_setWheelSpeedOption:function(a){"number"==typeof a&&0!==a&&(this.options.wheelSpeed=a)},_setWheelModeOption:function(a){(null===a||a===!1||"zoom"===a||"scroll"===a)&&(this.options.wheelMode!==a&&this.element.parent().unbind("mousewheel.bar"),this._bindMouseWheel(a),this.options.wheelMode=a)},_bindMouseWheel:function(b){"zoom"===b?this.element.parent().bind("mousewheel.bar",a.proxy(this._mouseWheelZoom,this)):"scroll"===b&&this.element.parent().bind("mousewheel.bar",a.proxy(this._mouseWheelScroll,this))},_setLeftRange:function(){if(this.options.range===!1)return!1;var a=this._values.max,b={min:!1,max:!1};"undefined"!=typeof this.options.range.min&&this.options.range.min!==!1?b.max=this._leftHandle("substract",a,this.options.range.min):b.max=!1,"undefined"!=typeof this.options.range.max&&this.options.range.max!==!1?b.min=this._leftHandle("substract",a,this.options.range.max):b.min=!1,this._leftHandle("option","range",b)},_setRightRange:function(){var a=this._values.min,b={min:!1,max:!1};"undefined"!=typeof this.options.range.min&&this.options.range.min!==!1?b.min=this._rightHandle("add",a,this.options.range.min):b.min=!1,"undefined"!=typeof this.options.range.max&&this.options.range.max!==!1?b.max=this._rightHandle("add",a,this.options.range.max):b.max=!1,this._rightHandle("option","range",b)},_deactivateRange:function(){this._leftHandle("option","range",!1),this._rightHandle("option","range",!1)},_reactivateRange:function(){this._setRangeOption(this.options.range)},_onInitialized:function(){this._waitingToInit--,0===this._waitingToInit&&this._initMe()},_initMe:function(){this._cache(),this.min(this._values.min),this.max(this._values.max);var a=this._leftHandle("position"),b=this._rightHandle("position")+this.options.rightHandle.width();this.element.offset({left:a}),this.element.css("width",b-a)},_leftHandle:function(){return this._handleProxy(this.options.leftHandle,arguments)},_rightHandle:function(){return this._handleProxy(this.options.rightHandle,arguments)},_handleProxy:function(a,b){var c=Array.prototype.slice.call(b);return a[this.options.type].apply(a,c)},_cache:function(){this._super(),this._cacheHandles()},_cacheHandles:function(){this.cache.rightHandle={},this.cache.rightHandle.width=this.options.rightHandle.width(),this.cache.rightHandle.offset=this.options.rightHandle.offset(),this.cache.leftHandle={},this.cache.leftHandle.offset=this.options.leftHandle.offset()},_mouseStart:function(a){this._super(a),this._deactivateRange()},_mouseStop:function(a){this._super(a),this._cacheHandles(),this._values.min=this._leftHandle("value"),this._values.max=this._rightHandle("value"),this._reactivateRange(),this._leftHandle().trigger("stop"),this._rightHandle().trigger("stop")},_onDragLeftHandle:function(a,b){if(this._cacheIfNecessary(),b.element[0]===this.options.leftHandle[0]){if(this._switchedValues())return this._switchHandles(),void this._onDragRightHandle(a,b);this._values.min=b.value,this.cache.offset.left=b.offset.left,this.cache.leftHandle.offset=b.offset,this._positionBar()}},_onDragRightHandle:function(a,b){if(this._cacheIfNecessary(),b.element[0]===this.options.rightHandle[0]){if(this._switchedValues())return this._switchHandles(),void this._onDragLeftHandle(a,b);this._values.max=b.value,this.cache.rightHandle.offset=b.offset,this._positionBar()}},_positionBar:function(){var a=this.cache.rightHandle.offset.left+this.cache.rightHandle.width-this.cache.leftHandle.offset.left;this.cache.width.inner=a,this.element.css("width",a).offset({left:this.cache.leftHandle.offset.left})},_onHandleStop:function(){this._setLeftRange(),this._setRightRange()},_switchedValues:function(){if(this.min()>this.max()){var a=this._values.min;return this._values.min=this._values.max,this._values.max=a,!0}return!1},_switchHandles:function(){var a=this.options.leftHandle;this.options.leftHandle=this.options.rightHandle,this.options.rightHandle=a,this._leftHandle("option","isLeft",!0),this._rightHandle("option","isLeft",!1),this._bindHandles(),this._cacheHandles()},_bindHandles:function(){this.options.leftHandle.unbind(".bar").bind("sliderDrag.bar update.bar moving.bar",a.proxy(this._onDragLeftHandle,this)),this.options.rightHandle.unbind(".bar").bind("sliderDrag.bar update.bar moving.bar",a.proxy(this._onDragRightHandle,this))},_constraintPosition:function(a){var b,c={};return c.left=this._super(a),c.left=this._leftHandle("position",c.left),b=this._rightHandle("position",c.left+this.cache.width.outer-this.cache.rightHandle.width),c.width=b-c.left+this.cache.rightHandle.width,c},_applyPosition:function(a){this._super(a.left),this.element.width(a.width)},_mouseWheelZoom:function(b,c,d,e){if(!this.enabled)return!1;var f=this._values.min+(this._values.max-this._values.min)/2,g={},h={};return this.options.range===!1||this.options.range.min===!1?(g.max=f,h.min=f):(g.max=f-this.options.range.min/2,h.min=f+this.options.range.min/2),this.options.range!==!1&&this.options.range.max!==!1&&(g.min=f-this.options.range.max/2,h.max=f+this.options.range.max/2),this._leftHandle("option","range",g),this._rightHandle("option","range",h),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(a.proxy(this._wheelStop,this),200),this.zoomIn(e*this.options.wheelSpeed),!1},_mouseWheelScroll:function(b,c,d,e){return this.enabled?(this._wheelTimeout===!1?this.startScroll():clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(a.proxy(this._wheelStop,this),200),this.scrollLeft(e*this.options.wheelSpeed),!1):!1},_wheelStop:function(){this.stopScroll(),this._wheelTimeout=!1},min:function(a){return this._leftHandle("value",a)},max:function(a){return this._rightHandle("value",a)},startScroll:function(){this._deactivateRange()},stopScroll:function(){this._reactivateRange(),this._triggerMouseEvent("stop"),this._leftHandle().trigger("stop"),this._rightHandle().trigger("stop")},scrollLeft:function(a){return a=a||1,0>a?this.scrollRight(-a):(a=this._leftHandle("moveLeft",a),this._rightHandle("moveLeft",a),this.update(),void this._triggerMouseEvent("scroll"))},scrollRight:function(a){return a=a||1,0>a?this.scrollLeft(-a):(a=this._rightHandle("moveRight",a),this._leftHandle("moveRight",a),this.update(),void this._triggerMouseEvent("scroll"))},zoomIn:function(a){if(a=a||1,0>a)return this.zoomOut(-a);var b=this._rightHandle("moveLeft",a);a>b&&(b/=2,this._rightHandle("moveRight",b)),this._leftHandle("moveRight",b),this.update(),this._triggerMouseEvent("zoom")},zoomOut:function(a){if(a=a||1,0>a)return this.zoomIn(-a);var b=this._rightHandle("moveRight",a);a>b&&(b/=2,this._rightHandle("moveLeft",b)),this._leftHandle("moveLeft",b),this.update(),this._triggerMouseEvent("zoom")},values:function(a,b){if("undefined"!=typeof a&&"undefined"!=typeof b){var c=Math.min(a,b),d=Math.max(a,b);this._deactivateRange(),this.options.leftHandle.unbind(".bar"),this.options.rightHandle.unbind(".bar"),this._values.min=this._leftHandle("value",c),this._values.max=this._rightHandle("value",d),this._bindHandles(),this._reactivateRange(),this.update()}return{min:this._values.min,max:this._values.max}},update:function(){this._values.min=this.min(),this._values.max=this.max(),this._cache(),this._positionBar()}})}(jQuery),function(a,b){"use strict";function c(b,c,d,e){this.label1=b,this.label2=c,this.type=d,this.options=e,this.handle1=this.label1[this.type]("option","handle"),this.handle2=this.label2[this.type]("option","handle"),this.cache=null,this.left=b,this.right=c,this.moving=!1,this.initialized=!1,this.updating=!1,this.Init=function(){this.BindHandle(this.handle1),this.BindHandle(this.handle2),"show"===this.options.show?(setTimeout(a.proxy(this.PositionLabels,this),1), +this.initialized=!0):setTimeout(a.proxy(this.AfterInit,this),1e3),this._resizeProxy=a.proxy(this.onWindowResize,this),a(window).resize(this._resizeProxy)},this.Destroy=function(){this._resizeProxy&&(a(window).unbind("resize",this._resizeProxy),this._resizeProxy=null,this.handle1.unbind(".positionner"),this.handle1=null,this.handle2.unbind(".positionner"),this.handle2=null,this.label1=null,this.label2=null,this.left=null,this.right=null),this.cache=null},this.AfterInit=function(){this.initialized=!0},this.Cache=function(){"none"!==this.label1.css("display")&&(this.cache={},this.cache.label1={},this.cache.label2={},this.cache.handle1={},this.cache.handle2={},this.cache.offsetParent={},this.CacheElement(this.label1,this.cache.label1),this.CacheElement(this.label2,this.cache.label2),this.CacheElement(this.handle1,this.cache.handle1),this.CacheElement(this.handle2,this.cache.handle2),this.CacheElement(this.label1.offsetParent(),this.cache.offsetParent))},this.CacheIfNecessary=function(){null===this.cache?this.Cache():(this.CacheWidth(this.label1,this.cache.label1),this.CacheWidth(this.label2,this.cache.label2),this.CacheHeight(this.label1,this.cache.label1),this.CacheHeight(this.label2,this.cache.label2),this.CacheWidth(this.label1.offsetParent(),this.cache.offsetParent))},this.CacheElement=function(a,b){this.CacheWidth(a,b),this.CacheHeight(a,b),b.offset=a.offset(),b.margin={left:this.ParsePixels("marginLeft",a),right:this.ParsePixels("marginRight",a)},b.border={left:this.ParsePixels("borderLeftWidth",a),right:this.ParsePixels("borderRightWidth",a)}},this.CacheWidth=function(a,b){b.width=a.width(),b.outerWidth=a.outerWidth()},this.CacheHeight=function(a,b){b.outerHeightMargin=a.outerHeight(!0)},this.ParsePixels=function(a,b){return parseInt(b.css(a),10)||0},this.BindHandle=function(b){b.bind("updating.positionner",a.proxy(this.onHandleUpdating,this)),b.bind("update.positionner",a.proxy(this.onHandleUpdated,this)),b.bind("moving.positionner",a.proxy(this.onHandleMoving,this)),b.bind("stop.positionner",a.proxy(this.onHandleStop,this))},this.PositionLabels=function(){if(this.CacheIfNecessary(),null!==this.cache){var a=this.GetRawPosition(this.cache.label1,this.cache.handle1),b=this.GetRawPosition(this.cache.label2,this.cache.handle2);this.label1[d]("option","isLeft")?this.ConstraintPositions(a,b):this.ConstraintPositions(b,a),this.PositionLabel(this.label1,a.left,this.cache.label1),this.PositionLabel(this.label2,b.left,this.cache.label2)}},this.PositionLabel=function(a,b,c){var d,e,f,g=this.cache.offsetParent.offset.left+this.cache.offsetParent.border.left;g-b>=0?(a.css("right",""),a.offset({left:b})):(d=g+this.cache.offsetParent.width,e=b+c.margin.left+c.outerWidth+c.margin.right,f=d-e,a.css("left",""),a.css("right",f))},this.ConstraintPositions=function(a,b){(a.centerb.outerLeft||a.center>b.center&&b.outerRight>a.outerLeft)&&(a=this.getLeftPosition(a,b),b=this.getRightPosition(a,b))},this.getLeftPosition=function(a,b){var c=(b.center+a.center)/2,d=c-a.cache.outerWidth-a.cache.margin.right+a.cache.border.left;return a.left=d,a},this.getRightPosition=function(a,b){var c=(b.center+a.center)/2;return b.left=c+b.cache.margin.left+b.cache.border.left,b},this.ShowIfNecessary=function(){"show"===this.options.show||this.moving||!this.initialized||this.updating||(this.label1.stop(!0,!0).fadeIn(this.options.durationIn||0),this.label2.stop(!0,!0).fadeIn(this.options.durationIn||0),this.moving=!0)},this.HideIfNeeded=function(){this.moving===!0&&(this.label1.stop(!0,!0).delay(this.options.delayOut||0).fadeOut(this.options.durationOut||0),this.label2.stop(!0,!0).delay(this.options.delayOut||0).fadeOut(this.options.durationOut||0),this.moving=!1)},this.onHandleMoving=function(a,b){this.ShowIfNecessary(),this.CacheIfNecessary(),this.UpdateHandlePosition(b),this.PositionLabels()},this.onHandleUpdating=function(){this.updating=!0},this.onHandleUpdated=function(){this.updating=!1,this.cache=null},this.onHandleStop=function(){this.HideIfNeeded()},this.onWindowResize=function(){this.cache=null},this.UpdateHandlePosition=function(a){null!==this.cache&&(a.element[0]===this.handle1[0]?this.UpdatePosition(a,this.cache.handle1):this.UpdatePosition(a,this.cache.handle2))},this.UpdatePosition=function(a,b){b.offset=a.offset,b.value=a.value},this.GetRawPosition=function(a,b){var c=b.offset.left+b.outerWidth/2,d=c-a.outerWidth/2,e=d+a.outerWidth-a.border.left-a.border.right,f=d-a.margin.left-a.border.left,g=b.offset.top-a.outerHeightMargin;return{left:d,outerLeft:f,top:g,right:e,outerRight:f+a.outerWidth+a.margin.left+a.margin.right,cache:a,center:c}},this.Init()}a.widget("ui.rangeSliderLabel",a.ui.rangeSliderMouseTouch,{options:{handle:null,formatter:!1,handleType:"rangeSliderHandle",show:"show",durationIn:0,durationOut:500,delayOut:500,isLeft:!1},cache:null,_positionner:null,_valueContainer:null,_innerElement:null,_value:null,_create:function(){this.options.isLeft=this._handle("option","isLeft"),this.element.addClass("ui-rangeSlider-label").css("position","absolute").css("display","block"),this._createElements(),this._toggleClass(),this.options.handle.bind("moving.label",a.proxy(this._onMoving,this)).bind("update.label",a.proxy(this._onUpdate,this)).bind("switch.label",a.proxy(this._onSwitch,this)),"show"!==this.options.show&&this.element.hide(),this._mouseInit()},destroy:function(){this.options.handle.unbind(".label"),this.options.handle=null,this._valueContainer=null,this._innerElement=null,this.element.empty(),this._positionner&&(this._positionner.Destroy(),this._positionner=null),this._super()},_createElements:function(){this._valueContainer=a("
").appendTo(this.element),this._innerElement=a("
").appendTo(this.element)},_handle:function(){var a=Array.prototype.slice.apply(arguments);return this.options.handle[this.options.handleType].apply(this.options.handle,a)},_setOption:function(a,b){"show"===a?this._updateShowOption(b):("durationIn"===a||"durationOut"===a||"delayOut"===a)&&this._updateDurations(a,b),this._setFormatterOption(a,b)},_setFormatterOption:function(a,b){"formatter"===a&&("function"==typeof b||b===!1)&&(this.options.formatter=b,this._display(this._value))},_updateShowOption:function(a){this.options.show=a,"show"!==this.options.show?(this.element.hide(),this._positionner.moving=!1):(this.element.show(),this._display(this.options.handle[this.options.handleType]("value")),this._positionner.PositionLabels()),this._positionner.options.show=this.options.show},_updateDurations:function(a,b){parseInt(b,10)===b&&(this._positionner.options[a]=b,this.options[a]=b)},_display:function(a){this.options.formatter===!1?this._displayText(Math.round(a)):this._displayText(this.options.formatter(a,this.options.isLeft)),this._value=a},_displayText:function(a){this._valueContainer.text(a)},_toggleClass:function(){this.element.toggleClass("ui-rangeSlider-leftLabel",this.options.isLeft).toggleClass("ui-rangeSlider-rightLabel",!this.options.isLeft)},_positionLabels:function(){this._positionner.PositionLabels()},_mouseDown:function(a){this.options.handle.trigger(a)},_mouseUp:function(a){this.options.handle.trigger(a)},_mouseMove:function(a){this.options.handle.trigger(a)},_onMoving:function(a,b){this._display(b.value)},_onUpdate:function(){"show"===this.options.show&&this.update()},_onSwitch:function(a,b){this.options.isLeft=b,this._toggleClass(),this._positionLabels()},pair:function(a){null===this._positionner&&(this._positionner=new c(this.element,a,this.widgetName,{show:this.options.show,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}),a[this.widgetName]("positionner",this._positionner))},positionner:function(a){return"undefined"!=typeof a&&(this._positionner=a),this._positionner},update:function(){this._positionner.cache=null,this._display(this._handle("value")),"show"===this.options.show&&this._positionLabels()}})}(jQuery),function(a,b){"use strict";a.widget("ui.editRangeSlider",a.ui.rangeSlider,{options:{type:"text",round:1},_create:function(){this._super(),this.element.addClass("ui-editRangeSlider")},destroy:function(){this.element.removeClass("ui-editRangeSlider"),this._super()},_setOption:function(a,b){("type"===a||"step"===a)&&this._setLabelOption(a,b),"type"===a&&(this.options[a]=null===this.labels.left?b:this._leftLabel("option",a)),this._super(label,handle)},_setLabelOption:function(a,b){null!==this.labels.left&&(this._leftLabel("option",a,b),this._rightLabel("option",a,b))},_labelType:function(){return"editRangeSliderLabel"},_createLabel:function(b,c){var d=this._super(b,c);return null===b&&d.bind("valueChange",a.proxy(this._onValueChange,this)),d},_addPropertiesToParameter:function(a){return a.type=this.options.type,a.step=this.options.step,a.id=this.element.attr("id"),a},_getLabelConstructorParameters:function(a,b){var c=this._super(a,b);return this._addPropertiesToParameter(c)},_getLabelRefreshParameters:function(a,b){var c=this._super(a,b);return this._addPropertiesToParameter(c)},_onValueChange:function(a,b){var c=!1;c=b.isLeft?this._values.min!==this.min(b.value):this._values.max!==this.max(b.value),c&&this._trigger("userValuesChanged")}})}(jQuery),function(a){"use strict";a.widget("ui.editRangeSliderLabel",a.ui.rangeSliderLabel,{options:{type:"text",step:!1,id:""},_input:null,_text:"",_create:function(){this._super(),this._createInput()},_setOption:function(a,b){"type"===a?this._setTypeOption(b):"step"===a&&this._setStepOption(b),this._super(a,b)},_createInput:function(){this._input=a("").addClass("ui-editRangeSlider-inputValue").appendTo(this._valueContainer),this._setInputName(),this._input.bind("keyup",a.proxy(this._onKeyUp,this)),this._input.blur(a.proxy(this._onChange,this)),"number"===this.options.type&&(this.options.step!==!1&&this._input.attr("step",this.options.step),this._input.click(a.proxy(this._onChange,this))),this._input.val(this._text)},_setInputName:function(){var a=this.options.isLeft?"left":"right";this._input.attr("name",this.options.id+a)},_onSwitch:function(a,b){this._super(a,b),this._setInputName()},_destroyInput:function(){this._input.remove(),this._input=null},_onKeyUp:function(a){return 13===a.which?(this._onChange(a),!1):void 0},_onChange:function(){var a=this._returnCheckedValue(this._input.val());a!==!1&&this._triggerValue(a)},_triggerValue:function(a){var b=this.options.handle[this.options.handleType]("option","isLeft");this.element.trigger("valueChange",[{isLeft:b,value:a}])},_returnCheckedValue:function(a){var b=parseFloat(a);return isNaN(b)||isNaN(Number(a))?!1:b},_setTypeOption:function(a){"text"!==a&&"number"!==a||this.options.type===a||(this._destroyInput(),this.options.type=a,this._createInput())},_setStepOption:function(a){this.options.step=a,"number"===this.options.type&&this._input.attr("step",a!==!1?a:"any")},_displayText:function(a){this._input.val(a),this._text=a},enable:function(){this._super(),this._input.attr("disabled",null)},disable:function(){this._super(),this._input.attr("disabled","disabled")}})}(jQuery); \ No newline at end of file diff --git a/app/assets/vendored/lib/jqrangeslider/jQEditRangeSlider-withRuler-min.js b/app/assets/vendored/lib/jqrangeslider/jQEditRangeSlider-withRuler-min.js new file mode 100644 index 000000000..62aa16986 --- /dev/null +++ b/app/assets/vendored/lib/jqrangeslider/jQEditRangeSlider-withRuler-min.js @@ -0,0 +1,2 @@ +/*! jQRangeSlider 5.8.2 - 2023-10-19 - Copyright (C) Guillaume Gautreau 2012 - MIT and GPLv3 licenses.*/!function(a,b){"use strict";a.widget("ui.rangeSliderMouseTouch",a.ui.mouse,{enabled:!0,_mouseInit:function(){var a=this;this._super(),this._mouseDownEvent=!1,this.element.bind("touchstart."+this.widgetName,function(b){return a._touchStart(b)})},_mouseDestroy:function(){a(document).unbind("touchmove."+this.widgetName,this._touchMoveDelegate).unbind("touchend."+this.widgetName,this._touchEndDelegate),this._super()},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},destroy:function(){this._mouseDestroy(),this._super(),this._mouseInit=null},_touchStart:function(b){if(!this.enabled)return!1;b.which=1,b.preventDefault(),this._fillTouchEvent(b);var c=this,d=this._mouseDownEvent;this._mouseDown(b),d!==this._mouseDownEvent&&(this._touchEndDelegate=function(a){c._touchEnd(a)},this._touchMoveDelegate=function(a){c._touchMove(a)},a(document).bind("touchmove."+this.widgetName,this._touchMoveDelegate).bind("touchend."+this.widgetName,this._touchEndDelegate))},_mouseDown:function(a){return this.enabled?this._super(a):!1},_touchEnd:function(b){this._fillTouchEvent(b),this._mouseUp(b),a(document).unbind("touchmove."+this.widgetName,this._touchMoveDelegate).unbind("touchend."+this.widgetName,this._touchEndDelegate),this._mouseDownEvent=!1,a(document).trigger("mouseup")},_touchMove:function(a){return a.preventDefault(),this._fillTouchEvent(a),this._mouseMove(a)},_fillTouchEvent:function(a){var b;b="undefined"==typeof a.targetTouches&&"undefined"==typeof a.changedTouches?a.originalEvent.targetTouches[0]||a.originalEvent.changedTouches[0]:a.targetTouches[0]||a.changedTouches[0],a.pageX=b.pageX,a.pageY=b.pageY,a.which=1}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSliderDraggable",a.ui.rangeSliderMouseTouch,{cache:null,options:{containment:null},_create:function(){this._super(),setTimeout(a.proxy(this._initElementIfNotDestroyed,this),10)},destroy:function(){this.cache=null,this._super()},_initElementIfNotDestroyed:function(){this._mouseInit&&this._initElement()},_initElement:function(){this._mouseInit(),this._cache()},_setOption:function(b,c){"containment"===b&&(null===c||0===a(c).length?this.options.containment=null:this.options.containment=a(c))},_mouseStart:function(a){return this._cache(),this.cache.click={left:a.pageX,top:a.pageY},this.cache.initialOffset=this.element.offset(),this._triggerMouseEvent("mousestart"),!0},_mouseDrag:function(a){var b=a.pageX-this.cache.click.left;return b=this._constraintPosition(b+this.cache.initialOffset.left),this._applyPosition(b),this._triggerMouseEvent("sliderDrag"),!1},_mouseStop:function(){this._triggerMouseEvent("stop")},_constraintPosition:function(a){return 0!==this.element.parent().length&&null!==this.cache.parent.offset&&(a=Math.min(a,this.cache.parent.offset.left+this.cache.parent.width-this.cache.width.outer),a=Math.max(a,this.cache.parent.offset.left)),a},_applyPosition:function(a){this._cacheIfNecessary();var b={top:this.cache.offset.top,left:a};this.element.offset({left:a}),this.cache.offset=b},_cacheIfNecessary:function(){null===this.cache&&this._cache()},_cache:function(){this.cache={},this._cacheMargins(),this._cacheParent(),this._cacheDimensions(),this.cache.offset=this.element.offset()},_cacheMargins:function(){this.cache.margin={left:this._parsePixels(this.element,"marginLeft"),right:this._parsePixels(this.element,"marginRight"),top:this._parsePixels(this.element,"marginTop"),bottom:this._parsePixels(this.element,"marginBottom")}},_cacheParent:function(){if(null!==this.options.parent){var a=this.element.parent();this.cache.parent={offset:a.offset(),width:a.width()}}else this.cache.parent=null},_cacheDimensions:function(){this.cache.width={outer:this.element.outerWidth(),inner:this.element.width()}},_parsePixels:function(a,b){return parseInt(a.css(b),10)||0},_triggerMouseEvent:function(a){var b=this._prepareEventData();this.element.trigger(a,b)},_prepareEventData:function(){return{element:this.element,offset:this.cache.offset||null}}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSlider",{options:{bounds:{min:0,max:100},defaultValues:{min:20,max:50},wheelMode:null,wheelSpeed:4,arrows:!0,valueLabels:"show",formatter:null,durationIn:0,durationOut:400,delayOut:200,range:{min:!1,max:!1},step:!1,scales:!1,enabled:!0,symmetricPositionning:!1},_values:null,_valuesChanged:!1,_initialized:!1,bar:null,leftHandle:null,rightHandle:null,innerBar:null,container:null,arrows:null,labels:null,changing:{min:!1,max:!1},changed:{min:!1,max:!1},ruler:null,_create:function(){this._super(),this._setDefaultValues(),this.labels={left:null,right:null,leftDisplayed:!0,rightDisplayed:!0},this.arrows={left:null,right:null},this.changing={min:!1,max:!1},this.changed={min:!1,max:!1},this._createElements(),this._bindResize(),setTimeout(a.proxy(this.resize,this),1),setTimeout(a.proxy(this._initValues,this),1)},_setDefaultValues:function(){this._values={min:this.options.defaultValues.min,max:this.options.defaultValues.max}},_bindResize:function(){var b=this;this._resizeProxy=function(a){b.resize(a)},a(window).resize(this._resizeProxy)},_initWidth:function(){this.container.css("width",this.element.width()-this.container.outerWidth(!0)+this.container.width()),this.innerBar.css("width",this.container.width()-this.innerBar.outerWidth(!0)+this.innerBar.width())},_initValues:function(){this._initialized=!0,this.values(this._values.min,this._values.max)},_setOption:function(a,b){this._setWheelOption(a,b),this._setArrowsOption(a,b),this._setLabelsOption(a,b),this._setLabelsDurations(a,b),this._setFormatterOption(a,b),this._setBoundsOption(a,b),this._setRangeOption(a,b),this._setStepOption(a,b),this._setScalesOption(a,b),this._setEnabledOption(a,b),this._setPositionningOption(a,b)},_validProperty:function(a,b,c){return null===a||"undefined"==typeof a[b]?c:a[b]},_setStepOption:function(a,b){"step"===a&&(this.options.step=b,this._leftHandle("option","step",b),this._rightHandle("option","step",b),this._changed(!0))},_setScalesOption:function(a,b){"scales"===a&&(b===!1||null===b?(this.options.scales=!1,this._destroyRuler()):b instanceof Array&&(this.options.scales=b,this._updateRuler()))},_setRangeOption:function(a,b){"range"===a&&(this._bar("option","range",b),this.options.range=this._bar("option","range"),this._changed(!0))},_setBoundsOption:function(a,b){"bounds"===a&&"undefined"!=typeof b.min&&"undefined"!=typeof b.max&&this.bounds(b.min,b.max)},_setWheelOption:function(a,b){("wheelMode"===a||"wheelSpeed"===a)&&(this._bar("option",a,b),this.options[a]=this._bar("option",a))},_setLabelsOption:function(a,b){if("valueLabels"===a){if("hide"!==b&&"show"!==b&&"change"!==b)return;this.options.valueLabels=b,"hide"!==b?(this._createLabels(),this._leftLabel("update"),this._rightLabel("update")):this._destroyLabels()}},_setFormatterOption:function(a,b){"formatter"===a&&null!==b&&"function"==typeof b&&"hide"!==this.options.valueLabels&&(this._leftLabel("option","formatter",b),this.options.formatter=this._rightLabel("option","formatter",b))},_setArrowsOption:function(a,b){"arrows"!==a||b!==!0&&b!==!1||b===this.options.arrows||(b===!0?(this.element.removeClass("ui-rangeSlider-noArrow").addClass("ui-rangeSlider-withArrows"),this.arrows.left.css("display","block"),this.arrows.right.css("display","block"),this.options.arrows=!0):b===!1&&(this.element.addClass("ui-rangeSlider-noArrow").removeClass("ui-rangeSlider-withArrows"),this.arrows.left.css("display","none"),this.arrows.right.css("display","none"),this.options.arrows=!1),this._initWidth())},_setLabelsDurations:function(a,b){if("durationIn"===a||"durationOut"===a||"delayOut"===a){if(parseInt(b,10)!==b)return;null!==this.labels.left&&this._leftLabel("option",a,b),null!==this.labels.right&&this._rightLabel("option",a,b),this.options[a]=b}},_setEnabledOption:function(a,b){"enabled"===a&&this.toggle(b)},_setPositionningOption:function(a,b){"symmetricPositionning"===a&&(this._rightHandle("option",a,b),this.options[a]=this._leftHandle("option",a,b))},_createElements:function(){"absolute"!==this.element.css("position")&&this.element.css("position","relative"),this.element.addClass("ui-rangeSlider"),this.container=a("
").css("position","absolute").appendTo(this.element),this.innerBar=a("
").css("position","absolute").css("top",0).css("left",0),this._createHandles(),this._createBar(),this.container.prepend(this.innerBar),this._createArrows(),"hide"!==this.options.valueLabels?this._createLabels():this._destroyLabels(),this._updateRuler(),this.options.enabled||this._toggle(this.options.enabled)},_createHandle:function(b){return a("
")[this._handleType()](b).bind("sliderDrag",a.proxy(this._changing,this)).bind("stop",a.proxy(this._changed,this))},_createHandles:function(){this.leftHandle=this._createHandle({isLeft:!0,bounds:this.options.bounds,value:this._values.min,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container),this.rightHandle=this._createHandle({isLeft:!1,bounds:this.options.bounds,value:this._values.max,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container)},_createBar:function(){this.bar=a("
").prependTo(this.container).bind("sliderDrag scroll zoom",a.proxy(this._changing,this)).bind("stop",a.proxy(this._changed,this)),this._bar({leftHandle:this.leftHandle,rightHandle:this.rightHandle,values:{min:this._values.min,max:this._values.max},type:this._handleType(),range:this.options.range,wheelMode:this.options.wheelMode,wheelSpeed:this.options.wheelSpeed}),this.options.range=this._bar("option","range"),this.options.wheelMode=this._bar("option","wheelMode"),this.options.wheelSpeed=this._bar("option","wheelSpeed")},_createArrows:function(){this.arrows.left=this._createArrow("left"),this.arrows.right=this._createArrow("right"),this.options.arrows?this.element.addClass("ui-rangeSlider-withArrows"):(this.arrows.left.css("display","none"),this.arrows.right.css("display","none"),this.element.addClass("ui-rangeSlider-noArrow"))},_createArrow:function(b){var c,d=a("
").append("
").addClass("ui-rangeSlider-"+b+"Arrow").css("position","absolute").css(b,0).appendTo(this.element);return c="right"===b?a.proxy(this._scrollRightClick,this):a.proxy(this._scrollLeftClick,this),d.bind("mousedown touchstart",c),d},_proxy:function(a,b,c){var d=Array.prototype.slice.call(c);return a&&a[b]?a[b].apply(a,d):null},_handleType:function(){return"rangeSliderHandle"},_barType:function(){return"rangeSliderBar"},_bar:function(){return this._proxy(this.bar,this._barType(),arguments)},_labelType:function(){return"rangeSliderLabel"},_leftLabel:function(){return this._proxy(this.labels.left,this._labelType(),arguments)},_rightLabel:function(){return this._proxy(this.labels.right,this._labelType(),arguments)},_leftHandle:function(){return this._proxy(this.leftHandle,this._handleType(),arguments)},_rightHandle:function(){return this._proxy(this.rightHandle,this._handleType(),arguments)},_getValue:function(a,b){return b===this.rightHandle&&(a-=b.outerWidth()),a*(this.options.bounds.max-this.options.bounds.min)/(this.container.innerWidth()-b.outerWidth(!0))+this.options.bounds.min},_trigger:function(a){var b=this;setTimeout(function(){b.element.trigger(a,{label:b.element,values:b.values()})},1)},_changing:function(){this._updateValues()&&(this._trigger("valuesChanging"),this._valuesChanged=!0)},_deactivateLabels:function(){"change"===this.options.valueLabels&&(this._leftLabel("option","show","hide"),this._rightLabel("option","show","hide"))},_reactivateLabels:function(){"change"===this.options.valueLabels&&(this._leftLabel("option","show","change"),this._rightLabel("option","show","change"))},_changed:function(a){a===!0&&this._deactivateLabels(),(this._updateValues()||this._valuesChanged)&&(this._trigger("valuesChanged"),a!==!0&&this._trigger("userValuesChanged"),this._valuesChanged=!1),a===!0&&this._reactivateLabels()},_updateValues:function(){var a=this._leftHandle("value"),b=this._rightHandle("value"),c=this._min(a,b),d=this._max(a,b),e=c!==this._values.min||d!==this._values.max;return this._values.min=this._min(a,b),this._values.max=this._max(a,b),e},_min:function(a,b){return Math.min(a,b)},_max:function(a,b){return Math.max(a,b)},_createLabel:function(b,c){var d;return null===b?(d=this._getLabelConstructorParameters(b,c),b=a("
").appendTo(this.element)[this._labelType()](d)):(d=this._getLabelRefreshParameters(b,c),b[this._labelType()](d)),b},_getLabelConstructorParameters:function(a,b){return{handle:b,handleType:this._handleType(),formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getLabelRefreshParameters:function(){return{formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getFormatter:function(){return this.options.formatter===!1||null===this.options.formatter?this._defaultFormatter.bind(this):this.options.formatter},_defaultFormatter:function(a){return Math.round(a)},_destroyLabel:function(a){return null!==a&&(a[this._labelType()]("destroy"),a.remove(),a=null),a},_createLabels:function(){this.labels.left=this._createLabel(this.labels.left,this.leftHandle),this.labels.right=this._createLabel(this.labels.right,this.rightHandle),this._leftLabel("pair",this.labels.right)},_destroyLabels:function(){this.labels.left=this._destroyLabel(this.labels.left),this.labels.right=this._destroyLabel(this.labels.right)},_stepRatio:function(){return this._leftHandle("stepRatio")},_scrollRightClick:function(a){return this.options.enabled?(a.preventDefault(),this._bar("startScroll"),this._bindStopScroll(),void this._continueScrolling("scrollRight",4*this._stepRatio(),1)):!1},_continueScrolling:function(a,b,c,d){if(!this.options.enabled)return!1;this._bar(a,c),d=d||5,d--;var e=this,f=16,g=Math.max(1,4/this._stepRatio());this._scrollTimeout=setTimeout(function(){0===d&&(b>f?b=Math.max(f,b/1.5):c=Math.min(g,2*c),d=5),e._continueScrolling(a,b,c,d)},b)},_scrollLeftClick:function(a){return this.options.enabled?(a.preventDefault(),this._bar("startScroll"),this._bindStopScroll(),void this._continueScrolling("scrollLeft",4*this._stepRatio(),1)):!1},_bindStopScroll:function(){var b=this;this._stopScrollHandle=function(a){a.preventDefault(),b._stopScroll()},a(document).bind("mouseup touchend",this._stopScrollHandle)},_stopScroll:function(){a(document).unbind("mouseup touchend",this._stopScrollHandle),this._stopScrollHandle=null,this._bar("stopScroll"),clearTimeout(this._scrollTimeout)},_createRuler:function(){this.ruler=a("
").appendTo(this.innerBar)},_setRulerParameters:function(){this.ruler.ruler({min:this.options.bounds.min,max:this.options.bounds.max,scales:this.options.scales})},_destroyRuler:function(){null!==this.ruler&&a.fn.ruler&&(this.ruler.ruler("destroy"),this.ruler.remove(),this.ruler=null)},_updateRuler:function(){this._destroyRuler(),this.options.scales!==!1&&a.fn.ruler&&(this._createRuler(),this._setRulerParameters())},values:function(a,b){var c;if("undefined"!=typeof a&&"undefined"!=typeof b){if(!this._initialized)return this._values.min=a,this._values.max=b,this._values;this._deactivateLabels(),c=this._bar("values",a,b),this._changed(!0),this._reactivateLabels()}else c=this._bar("values",a,b);return c},min:function(a){return this._values.min=this.values(a,this._values.max).min,this._values.min},max:function(a){return this._values.max=this.values(this._values.min,a).max,this._values.max},bounds:function(a,b){return this._isValidValue(a)&&this._isValidValue(b)&&b>a&&(this._setBounds(a,b),this._updateRuler(),this._changed(!0)),this.options.bounds},_isValidValue:function(a){return"undefined"!=typeof a&&parseFloat(a)===a},_setBounds:function(a,b){this.options.bounds={min:a,max:b},this._leftHandle("option","bounds",this.options.bounds),this._rightHandle("option","bounds",this.options.bounds),this._bar("option","bounds",this.options.bounds)},zoomIn:function(a){this._bar("zoomIn",a)},zoomOut:function(a){this._bar("zoomOut",a)},scrollLeft:function(a){this._bar("startScroll"),this._bar("scrollLeft",a),this._bar("stopScroll")},scrollRight:function(a){this._bar("startScroll"),this._bar("scrollRight",a),this._bar("stopScroll")},resize:function(){this.container&&(this._initWidth(),this._leftHandle("update"),this._rightHandle("update"),this._bar("update"))},enable:function(){this.toggle(!0)},disable:function(){this.toggle(!1)},toggle:function(a){a===b&&(a=!this.options.enabled),this.options.enabled!==a&&this._toggle(a)},_toggle:function(a){this.options.enabled=a,this.element.toggleClass("ui-rangeSlider-disabled",!a);var b=a?"enable":"disable";this._bar(b),this._leftHandle(b),this._rightHandle(b),this._leftLabel(b),this._rightLabel(b)},destroy:function(){this.element.removeClass("ui-rangeSlider-withArrows ui-rangeSlider-noArrow ui-rangeSlider-disabled"),this._destroyWidgets(),this._destroyElements(),this.element.removeClass("ui-rangeSlider"),this.options=null,a(window).unbind("resize",this._resizeProxy),this._resizeProxy=null,this._bindResize=null,this._super()},_destroyWidget:function(a){this["_"+a]("destroy"),this[a].remove(),this[a]=null},_destroyWidgets:function(){this._destroyWidget("bar"),this._destroyWidget("leftHandle"),this._destroyWidget("rightHandle"),this._destroyRuler(),this._destroyLabels()},_destroyElements:function(){this.container.remove(),this.container=null,this.innerBar.remove(),this.innerBar=null,this.arrows.left.remove(),this.arrows.right.remove(),this.arrows=null}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSliderHandle",a.ui.rangeSliderDraggable,{currentMove:null,margin:0,parentElement:null,options:{isLeft:!0,bounds:{min:0,max:100},range:!1,value:0,step:!1},_value:0,_left:0,_create:function(){this._super(),this.element.css("position","absolute").css("top",0).addClass("ui-rangeSlider-handle").toggleClass("ui-rangeSlider-leftHandle",this.options.isLeft).toggleClass("ui-rangeSlider-rightHandle",!this.options.isLeft),this.element.append("
"),this._value=this._constraintValue(this.options.value)},destroy:function(){this.element.empty(),this._super()},_setOption:function(a,b){"isLeft"!==a||b!==!0&&b!==!1||b===this.options.isLeft?"step"===a&&this._checkStep(b)?(this.options.step=b,this.update()):"bounds"===a?(this.options.bounds=b,this.update()):"range"===a&&this._checkRange(b)?(this.options.range=b,this.update()):"symmetricPositionning"===a&&(this.options.symmetricPositionning=b===!0,this.update()):(this.options.isLeft=b,this.element.toggleClass("ui-rangeSlider-leftHandle",this.options.isLeft).toggleClass("ui-rangeSlider-rightHandle",!this.options.isLeft),this._position(this._value),this.element.trigger("switch",this.options.isLeft)),this._super(a,b)},_checkRange:function(a){return a===!1||!this._isValidValue(a.min)&&!this._isValidValue(a.max)},_isValidValue:function(a){return"undefined"!=typeof a&&a!==!1&&parseFloat(a)!==a},_checkStep:function(a){return a===!1||parseFloat(a)===a},_initElement:function(){this._super(),0===this.cache.parent.width||null===this.cache.parent.width?setTimeout(a.proxy(this._initElementIfNotDestroyed,this),500):(this._position(this._value),this._triggerMouseEvent("initialize"))},_bounds:function(){return this.options.bounds},_cache:function(){this._super(),this._cacheParent()},_cacheParent:function(){var a=this.element.parent();this.cache.parent={element:a,offset:a.offset(),padding:{left:this._parsePixels(a,"paddingLeft")},width:a.width()}},_position:function(a){var b=this._getPositionForValue(a);this._applyPosition(b)},_constraintPosition:function(a){var b=this._getValueForPosition(a);return this._getPositionForValue(b)},_applyPosition:function(a){this._super(a),this._left=a,this._setValue(this._getValueForPosition(a)),this._triggerMouseEvent("moving")},_prepareEventData:function(){var a=this._super();return a.value=this._value,a},_setValue:function(a){a!==this._value&&(this._value=a)},_constraintValue:function(a){if(a=Math.min(a,this._bounds().max),a=Math.max(a,this._bounds().min),a=this._round(a),this.options.range!==!1){var b=this.options.range.min||!1,c=this.options.range.max||!1;b!==!1&&(a=Math.max(a,this._round(b))),c!==!1&&(a=Math.min(a,this._round(c))),a=Math.min(a,this._bounds().max),a=Math.max(a,this._bounds().min)}return a},_round:function(a){return this.options.step!==!1&&this.options.step>0?Math.round(a/this.options.step)*this.options.step:a},_getPositionForValue:function(a){if(!this.cache||!this.cache.parent||null===this.cache.parent.offset)return 0;a=this._constraintValue(a);var b=(a-this.options.bounds.min)/(this.options.bounds.max-this.options.bounds.min),c=this.cache.parent.width,d=this.cache.parent.offset.left,e=this.options.isLeft?0:this.cache.width.outer;return this.options.symmetricPositionning?b*(c-2*this.cache.width.outer)+d+e:b*c+d-e},_getValueForPosition:function(a){var b=this._getRawValueForPositionAndBounds(a,this.options.bounds.min,this.options.bounds.max);return this._constraintValue(b)},_getRawValueForPositionAndBounds:function(a,b,c){var d,e,f=null===this.cache.parent.offset?0:this.cache.parent.offset.left;return this.options.symmetricPositionning?(a-=this.options.isLeft?0:this.cache.width.outer,d=this.cache.parent.width-2*this.cache.width.outer):(a+=this.options.isLeft?0:this.cache.width.outer,d=this.cache.parent.width),0===d?this._value:(e=(a-f)/d,e*(c-b)+b)},value:function(a){return"undefined"!=typeof a&&(this._cache(),a=this._constraintValue(a),this._position(a)),this._value},update:function(){this._cache();var a=this._constraintValue(this._value),b=this._getPositionForValue(a);a!==this._value?(this._triggerMouseEvent("updating"),this._position(a),this._triggerMouseEvent("update")):b!==this.cache.offset.left&&(this._triggerMouseEvent("updating"),this._position(a),this._triggerMouseEvent("update"))},position:function(a){return"undefined"!=typeof a&&(this._cache(),a=this._constraintPosition(a),this._applyPosition(a)),this._left},add:function(a,b){return a+b},substract:function(a,b){return a-b},stepsBetween:function(a,b){return this.options.step===!1?b-a:(b-a)/this.options.step},multiplyStep:function(a,b){return a*b},moveRight:function(a){var b;return this.options.step===!1?(b=this._left,this.position(this._left+a),this._left-b):(b=this._value,this.value(this.add(b,this.multiplyStep(this.options.step,a))),this.stepsBetween(b,this._value))},moveLeft:function(a){return-this.moveRight(-a)},stepRatio:function(){if(this.options.step===!1)return 1;var a=(this.options.bounds.max-this.options.bounds.min)/this.options.step;return this.cache.parent.width/a}})}(jQuery),function(a,b){"use strict";function c(a,b){return"undefined"==typeof a?b||!1:a}a.widget("ui.rangeSliderBar",a.ui.rangeSliderDraggable,{options:{leftHandle:null,rightHandle:null,bounds:{min:0,max:100},type:"rangeSliderHandle",range:!1,drag:function(){},stop:function(){},values:{min:0,max:20},wheelSpeed:4,wheelMode:null},_values:{min:0,max:20},_waitingToInit:2,_wheelTimeout:!1,_create:function(){this._super(),this.element.css("position","absolute").css("top",0).addClass("ui-rangeSlider-bar"),this.options.leftHandle.bind("initialize",a.proxy(this._onInitialized,this)).bind("mousestart",a.proxy(this._cache,this)).bind("stop",a.proxy(this._onHandleStop,this)),this.options.rightHandle.bind("initialize",a.proxy(this._onInitialized,this)).bind("mousestart",a.proxy(this._cache,this)).bind("stop",a.proxy(this._onHandleStop,this)),this._bindHandles(),this._values=this.options.values,this._setWheelModeOption(this.options.wheelMode)},destroy:function(){this.options.leftHandle.unbind(".bar"),this.options.rightHandle.unbind(".bar"),this.options=null,this._super()},_setOption:function(a,b){"range"===a?this._setRangeOption(b):"wheelSpeed"===a?this._setWheelSpeedOption(b):"wheelMode"===a&&this._setWheelModeOption(b)},_setRangeOption:function(a){if(("object"!=typeof a||null===a)&&(a=!1),a!==!1||this.options.range!==!1){if(a!==!1){var b=c(a.min,this.options.range.min),d=c(a.max,this.options.range.max);this.options.range={min:b,max:d}}else this.options.range=!1;this._setLeftRange(),this._setRightRange()}},_setWheelSpeedOption:function(a){"number"==typeof a&&0!==a&&(this.options.wheelSpeed=a)},_setWheelModeOption:function(a){(null===a||a===!1||"zoom"===a||"scroll"===a)&&(this.options.wheelMode!==a&&this.element.parent().unbind("mousewheel.bar"),this._bindMouseWheel(a),this.options.wheelMode=a)},_bindMouseWheel:function(b){"zoom"===b?this.element.parent().bind("mousewheel.bar",a.proxy(this._mouseWheelZoom,this)):"scroll"===b&&this.element.parent().bind("mousewheel.bar",a.proxy(this._mouseWheelScroll,this))},_setLeftRange:function(){if(this.options.range===!1)return!1;var a=this._values.max,b={min:!1,max:!1};"undefined"!=typeof this.options.range.min&&this.options.range.min!==!1?b.max=this._leftHandle("substract",a,this.options.range.min):b.max=!1,"undefined"!=typeof this.options.range.max&&this.options.range.max!==!1?b.min=this._leftHandle("substract",a,this.options.range.max):b.min=!1,this._leftHandle("option","range",b)},_setRightRange:function(){var a=this._values.min,b={min:!1,max:!1};"undefined"!=typeof this.options.range.min&&this.options.range.min!==!1?b.min=this._rightHandle("add",a,this.options.range.min):b.min=!1,"undefined"!=typeof this.options.range.max&&this.options.range.max!==!1?b.max=this._rightHandle("add",a,this.options.range.max):b.max=!1,this._rightHandle("option","range",b)},_deactivateRange:function(){this._leftHandle("option","range",!1),this._rightHandle("option","range",!1)},_reactivateRange:function(){this._setRangeOption(this.options.range)},_onInitialized:function(){this._waitingToInit--,0===this._waitingToInit&&this._initMe()},_initMe:function(){this._cache(),this.min(this._values.min),this.max(this._values.max);var a=this._leftHandle("position"),b=this._rightHandle("position")+this.options.rightHandle.width();this.element.offset({left:a}),this.element.css("width",b-a)},_leftHandle:function(){return this._handleProxy(this.options.leftHandle,arguments)},_rightHandle:function(){return this._handleProxy(this.options.rightHandle,arguments)},_handleProxy:function(a,b){var c=Array.prototype.slice.call(b);return a[this.options.type].apply(a,c)},_cache:function(){this._super(),this._cacheHandles()},_cacheHandles:function(){this.cache.rightHandle={},this.cache.rightHandle.width=this.options.rightHandle.width(),this.cache.rightHandle.offset=this.options.rightHandle.offset(),this.cache.leftHandle={},this.cache.leftHandle.offset=this.options.leftHandle.offset()},_mouseStart:function(a){this._super(a),this._deactivateRange()},_mouseStop:function(a){this._super(a),this._cacheHandles(),this._values.min=this._leftHandle("value"),this._values.max=this._rightHandle("value"),this._reactivateRange(),this._leftHandle().trigger("stop"),this._rightHandle().trigger("stop")},_onDragLeftHandle:function(a,b){if(this._cacheIfNecessary(),b.element[0]===this.options.leftHandle[0]){if(this._switchedValues())return this._switchHandles(),void this._onDragRightHandle(a,b);this._values.min=b.value,this.cache.offset.left=b.offset.left,this.cache.leftHandle.offset=b.offset,this._positionBar()}},_onDragRightHandle:function(a,b){if(this._cacheIfNecessary(),b.element[0]===this.options.rightHandle[0]){if(this._switchedValues())return this._switchHandles(),void this._onDragLeftHandle(a,b);this._values.max=b.value,this.cache.rightHandle.offset=b.offset,this._positionBar()}},_positionBar:function(){var a=this.cache.rightHandle.offset.left+this.cache.rightHandle.width-this.cache.leftHandle.offset.left;this.cache.width.inner=a,this.element.css("width",a).offset({left:this.cache.leftHandle.offset.left})},_onHandleStop:function(){this._setLeftRange(),this._setRightRange()},_switchedValues:function(){if(this.min()>this.max()){var a=this._values.min;return this._values.min=this._values.max,this._values.max=a,!0}return!1},_switchHandles:function(){var a=this.options.leftHandle;this.options.leftHandle=this.options.rightHandle,this.options.rightHandle=a,this._leftHandle("option","isLeft",!0),this._rightHandle("option","isLeft",!1),this._bindHandles(),this._cacheHandles()},_bindHandles:function(){this.options.leftHandle.unbind(".bar").bind("sliderDrag.bar update.bar moving.bar",a.proxy(this._onDragLeftHandle,this)),this.options.rightHandle.unbind(".bar").bind("sliderDrag.bar update.bar moving.bar",a.proxy(this._onDragRightHandle,this))},_constraintPosition:function(a){var b,c={};return c.left=this._super(a),c.left=this._leftHandle("position",c.left),b=this._rightHandle("position",c.left+this.cache.width.outer-this.cache.rightHandle.width),c.width=b-c.left+this.cache.rightHandle.width,c},_applyPosition:function(a){this._super(a.left),this.element.width(a.width)},_mouseWheelZoom:function(b,c,d,e){if(!this.enabled)return!1;var f=this._values.min+(this._values.max-this._values.min)/2,g={},h={};return this.options.range===!1||this.options.range.min===!1?(g.max=f,h.min=f):(g.max=f-this.options.range.min/2,h.min=f+this.options.range.min/2),this.options.range!==!1&&this.options.range.max!==!1&&(g.min=f-this.options.range.max/2,h.max=f+this.options.range.max/2),this._leftHandle("option","range",g),this._rightHandle("option","range",h),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(a.proxy(this._wheelStop,this),200),this.zoomIn(e*this.options.wheelSpeed),!1},_mouseWheelScroll:function(b,c,d,e){return this.enabled?(this._wheelTimeout===!1?this.startScroll():clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(a.proxy(this._wheelStop,this),200),this.scrollLeft(e*this.options.wheelSpeed),!1):!1},_wheelStop:function(){this.stopScroll(),this._wheelTimeout=!1},min:function(a){return this._leftHandle("value",a)},max:function(a){return this._rightHandle("value",a)},startScroll:function(){this._deactivateRange()},stopScroll:function(){this._reactivateRange(),this._triggerMouseEvent("stop"),this._leftHandle().trigger("stop"),this._rightHandle().trigger("stop")},scrollLeft:function(a){return a=a||1,0>a?this.scrollRight(-a):(a=this._leftHandle("moveLeft",a),this._rightHandle("moveLeft",a),this.update(),void this._triggerMouseEvent("scroll"))},scrollRight:function(a){return a=a||1,0>a?this.scrollLeft(-a):(a=this._rightHandle("moveRight",a),this._leftHandle("moveRight",a),this.update(),void this._triggerMouseEvent("scroll"))},zoomIn:function(a){if(a=a||1,0>a)return this.zoomOut(-a);var b=this._rightHandle("moveLeft",a);a>b&&(b/=2,this._rightHandle("moveRight",b)),this._leftHandle("moveRight",b),this.update(),this._triggerMouseEvent("zoom")},zoomOut:function(a){if(a=a||1,0>a)return this.zoomIn(-a);var b=this._rightHandle("moveRight",a);a>b&&(b/=2,this._rightHandle("moveLeft",b)),this._leftHandle("moveLeft",b),this.update(),this._triggerMouseEvent("zoom")},values:function(a,b){if("undefined"!=typeof a&&"undefined"!=typeof b){var c=Math.min(a,b),d=Math.max(a,b);this._deactivateRange(),this.options.leftHandle.unbind(".bar"),this.options.rightHandle.unbind(".bar"),this._values.min=this._leftHandle("value",c),this._values.max=this._rightHandle("value",d),this._bindHandles(),this._reactivateRange(),this.update()}return{min:this._values.min,max:this._values.max}},update:function(){this._values.min=this.min(),this._values.max=this.max(),this._cache(),this._positionBar()}})}(jQuery),function(a,b){"use strict";function c(b,c,d,e){this.label1=b,this.label2=c,this.type=d,this.options=e,this.handle1=this.label1[this.type]("option","handle"),this.handle2=this.label2[this.type]("option","handle"),this.cache=null,this.left=b,this.right=c,this.moving=!1,this.initialized=!1,this.updating=!1,this.Init=function(){this.BindHandle(this.handle1),this.BindHandle(this.handle2),"show"===this.options.show?(setTimeout(a.proxy(this.PositionLabels,this),1), +this.initialized=!0):setTimeout(a.proxy(this.AfterInit,this),1e3),this._resizeProxy=a.proxy(this.onWindowResize,this),a(window).resize(this._resizeProxy)},this.Destroy=function(){this._resizeProxy&&(a(window).unbind("resize",this._resizeProxy),this._resizeProxy=null,this.handle1.unbind(".positionner"),this.handle1=null,this.handle2.unbind(".positionner"),this.handle2=null,this.label1=null,this.label2=null,this.left=null,this.right=null),this.cache=null},this.AfterInit=function(){this.initialized=!0},this.Cache=function(){"none"!==this.label1.css("display")&&(this.cache={},this.cache.label1={},this.cache.label2={},this.cache.handle1={},this.cache.handle2={},this.cache.offsetParent={},this.CacheElement(this.label1,this.cache.label1),this.CacheElement(this.label2,this.cache.label2),this.CacheElement(this.handle1,this.cache.handle1),this.CacheElement(this.handle2,this.cache.handle2),this.CacheElement(this.label1.offsetParent(),this.cache.offsetParent))},this.CacheIfNecessary=function(){null===this.cache?this.Cache():(this.CacheWidth(this.label1,this.cache.label1),this.CacheWidth(this.label2,this.cache.label2),this.CacheHeight(this.label1,this.cache.label1),this.CacheHeight(this.label2,this.cache.label2),this.CacheWidth(this.label1.offsetParent(),this.cache.offsetParent))},this.CacheElement=function(a,b){this.CacheWidth(a,b),this.CacheHeight(a,b),b.offset=a.offset(),b.margin={left:this.ParsePixels("marginLeft",a),right:this.ParsePixels("marginRight",a)},b.border={left:this.ParsePixels("borderLeftWidth",a),right:this.ParsePixels("borderRightWidth",a)}},this.CacheWidth=function(a,b){b.width=a.width(),b.outerWidth=a.outerWidth()},this.CacheHeight=function(a,b){b.outerHeightMargin=a.outerHeight(!0)},this.ParsePixels=function(a,b){return parseInt(b.css(a),10)||0},this.BindHandle=function(b){b.bind("updating.positionner",a.proxy(this.onHandleUpdating,this)),b.bind("update.positionner",a.proxy(this.onHandleUpdated,this)),b.bind("moving.positionner",a.proxy(this.onHandleMoving,this)),b.bind("stop.positionner",a.proxy(this.onHandleStop,this))},this.PositionLabels=function(){if(this.CacheIfNecessary(),null!==this.cache){var a=this.GetRawPosition(this.cache.label1,this.cache.handle1),b=this.GetRawPosition(this.cache.label2,this.cache.handle2);this.label1[d]("option","isLeft")?this.ConstraintPositions(a,b):this.ConstraintPositions(b,a),this.PositionLabel(this.label1,a.left,this.cache.label1),this.PositionLabel(this.label2,b.left,this.cache.label2)}},this.PositionLabel=function(a,b,c){var d,e,f,g=this.cache.offsetParent.offset.left+this.cache.offsetParent.border.left;g-b>=0?(a.css("right",""),a.offset({left:b})):(d=g+this.cache.offsetParent.width,e=b+c.margin.left+c.outerWidth+c.margin.right,f=d-e,a.css("left",""),a.css("right",f))},this.ConstraintPositions=function(a,b){(a.centerb.outerLeft||a.center>b.center&&b.outerRight>a.outerLeft)&&(a=this.getLeftPosition(a,b),b=this.getRightPosition(a,b))},this.getLeftPosition=function(a,b){var c=(b.center+a.center)/2,d=c-a.cache.outerWidth-a.cache.margin.right+a.cache.border.left;return a.left=d,a},this.getRightPosition=function(a,b){var c=(b.center+a.center)/2;return b.left=c+b.cache.margin.left+b.cache.border.left,b},this.ShowIfNecessary=function(){"show"===this.options.show||this.moving||!this.initialized||this.updating||(this.label1.stop(!0,!0).fadeIn(this.options.durationIn||0),this.label2.stop(!0,!0).fadeIn(this.options.durationIn||0),this.moving=!0)},this.HideIfNeeded=function(){this.moving===!0&&(this.label1.stop(!0,!0).delay(this.options.delayOut||0).fadeOut(this.options.durationOut||0),this.label2.stop(!0,!0).delay(this.options.delayOut||0).fadeOut(this.options.durationOut||0),this.moving=!1)},this.onHandleMoving=function(a,b){this.ShowIfNecessary(),this.CacheIfNecessary(),this.UpdateHandlePosition(b),this.PositionLabels()},this.onHandleUpdating=function(){this.updating=!0},this.onHandleUpdated=function(){this.updating=!1,this.cache=null},this.onHandleStop=function(){this.HideIfNeeded()},this.onWindowResize=function(){this.cache=null},this.UpdateHandlePosition=function(a){null!==this.cache&&(a.element[0]===this.handle1[0]?this.UpdatePosition(a,this.cache.handle1):this.UpdatePosition(a,this.cache.handle2))},this.UpdatePosition=function(a,b){b.offset=a.offset,b.value=a.value},this.GetRawPosition=function(a,b){var c=b.offset.left+b.outerWidth/2,d=c-a.outerWidth/2,e=d+a.outerWidth-a.border.left-a.border.right,f=d-a.margin.left-a.border.left,g=b.offset.top-a.outerHeightMargin;return{left:d,outerLeft:f,top:g,right:e,outerRight:f+a.outerWidth+a.margin.left+a.margin.right,cache:a,center:c}},this.Init()}a.widget("ui.rangeSliderLabel",a.ui.rangeSliderMouseTouch,{options:{handle:null,formatter:!1,handleType:"rangeSliderHandle",show:"show",durationIn:0,durationOut:500,delayOut:500,isLeft:!1},cache:null,_positionner:null,_valueContainer:null,_innerElement:null,_value:null,_create:function(){this.options.isLeft=this._handle("option","isLeft"),this.element.addClass("ui-rangeSlider-label").css("position","absolute").css("display","block"),this._createElements(),this._toggleClass(),this.options.handle.bind("moving.label",a.proxy(this._onMoving,this)).bind("update.label",a.proxy(this._onUpdate,this)).bind("switch.label",a.proxy(this._onSwitch,this)),"show"!==this.options.show&&this.element.hide(),this._mouseInit()},destroy:function(){this.options.handle.unbind(".label"),this.options.handle=null,this._valueContainer=null,this._innerElement=null,this.element.empty(),this._positionner&&(this._positionner.Destroy(),this._positionner=null),this._super()},_createElements:function(){this._valueContainer=a("
").appendTo(this.element),this._innerElement=a("
").appendTo(this.element)},_handle:function(){var a=Array.prototype.slice.apply(arguments);return this.options.handle[this.options.handleType].apply(this.options.handle,a)},_setOption:function(a,b){"show"===a?this._updateShowOption(b):("durationIn"===a||"durationOut"===a||"delayOut"===a)&&this._updateDurations(a,b),this._setFormatterOption(a,b)},_setFormatterOption:function(a,b){"formatter"===a&&("function"==typeof b||b===!1)&&(this.options.formatter=b,this._display(this._value))},_updateShowOption:function(a){this.options.show=a,"show"!==this.options.show?(this.element.hide(),this._positionner.moving=!1):(this.element.show(),this._display(this.options.handle[this.options.handleType]("value")),this._positionner.PositionLabels()),this._positionner.options.show=this.options.show},_updateDurations:function(a,b){parseInt(b,10)===b&&(this._positionner.options[a]=b,this.options[a]=b)},_display:function(a){this.options.formatter===!1?this._displayText(Math.round(a)):this._displayText(this.options.formatter(a,this.options.isLeft)),this._value=a},_displayText:function(a){this._valueContainer.text(a)},_toggleClass:function(){this.element.toggleClass("ui-rangeSlider-leftLabel",this.options.isLeft).toggleClass("ui-rangeSlider-rightLabel",!this.options.isLeft)},_positionLabels:function(){this._positionner.PositionLabels()},_mouseDown:function(a){this.options.handle.trigger(a)},_mouseUp:function(a){this.options.handle.trigger(a)},_mouseMove:function(a){this.options.handle.trigger(a)},_onMoving:function(a,b){this._display(b.value)},_onUpdate:function(){"show"===this.options.show&&this.update()},_onSwitch:function(a,b){this.options.isLeft=b,this._toggleClass(),this._positionLabels()},pair:function(a){null===this._positionner&&(this._positionner=new c(this.element,a,this.widgetName,{show:this.options.show,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}),a[this.widgetName]("positionner",this._positionner))},positionner:function(a){return"undefined"!=typeof a&&(this._positionner=a),this._positionner},update:function(){this._positionner.cache=null,this._display(this._handle("value")),"show"===this.options.show&&this._positionLabels()}})}(jQuery),function(a,b){"use strict";a.widget("ui.editRangeSlider",a.ui.rangeSlider,{options:{type:"text",round:1},_create:function(){this._super(),this.element.addClass("ui-editRangeSlider")},destroy:function(){this.element.removeClass("ui-editRangeSlider"),this._super()},_setOption:function(a,b){("type"===a||"step"===a)&&this._setLabelOption(a,b),"type"===a&&(this.options[a]=null===this.labels.left?b:this._leftLabel("option",a)),this._super(label,handle)},_setLabelOption:function(a,b){null!==this.labels.left&&(this._leftLabel("option",a,b),this._rightLabel("option",a,b))},_labelType:function(){return"editRangeSliderLabel"},_createLabel:function(b,c){var d=this._super(b,c);return null===b&&d.bind("valueChange",a.proxy(this._onValueChange,this)),d},_addPropertiesToParameter:function(a){return a.type=this.options.type,a.step=this.options.step,a.id=this.element.attr("id"),a},_getLabelConstructorParameters:function(a,b){var c=this._super(a,b);return this._addPropertiesToParameter(c)},_getLabelRefreshParameters:function(a,b){var c=this._super(a,b);return this._addPropertiesToParameter(c)},_onValueChange:function(a,b){var c=!1;c=b.isLeft?this._values.min!==this.min(b.value):this._values.max!==this.max(b.value),c&&this._trigger("userValuesChanged")}})}(jQuery),function(a){"use strict";a.widget("ui.editRangeSliderLabel",a.ui.rangeSliderLabel,{options:{type:"text",step:!1,id:""},_input:null,_text:"",_create:function(){this._super(),this._createInput()},_setOption:function(a,b){"type"===a?this._setTypeOption(b):"step"===a&&this._setStepOption(b),this._super(a,b)},_createInput:function(){this._input=a("").addClass("ui-editRangeSlider-inputValue").appendTo(this._valueContainer),this._setInputName(),this._input.bind("keyup",a.proxy(this._onKeyUp,this)),this._input.blur(a.proxy(this._onChange,this)),"number"===this.options.type&&(this.options.step!==!1&&this._input.attr("step",this.options.step),this._input.click(a.proxy(this._onChange,this))),this._input.val(this._text)},_setInputName:function(){var a=this.options.isLeft?"left":"right";this._input.attr("name",this.options.id+a)},_onSwitch:function(a,b){this._super(a,b),this._setInputName()},_destroyInput:function(){this._input.remove(),this._input=null},_onKeyUp:function(a){return 13===a.which?(this._onChange(a),!1):void 0},_onChange:function(){var a=this._returnCheckedValue(this._input.val());a!==!1&&this._triggerValue(a)},_triggerValue:function(a){var b=this.options.handle[this.options.handleType]("option","isLeft");this.element.trigger("valueChange",[{isLeft:b,value:a}])},_returnCheckedValue:function(a){var b=parseFloat(a);return isNaN(b)||isNaN(Number(a))?!1:b},_setTypeOption:function(a){"text"!==a&&"number"!==a||this.options.type===a||(this._destroyInput(),this.options.type=a,this._createInput())},_setStepOption:function(a){this.options.step=a,"number"===this.options.type&&this._input.attr("step",a!==!1?a:"any")},_displayText:function(a){this._input.val(a),this._text=a},enable:function(){this._super(),this._input.attr("disabled",null)},disable:function(){this._super(),this._input.attr("disabled","disabled")}})}(jQuery),function(a){"use strict";var b={first:function(a){return a},next:function(a){return a+1},format:function(){},label:function(a){return Math.round(a)},stop:function(){return!1}};a.widget("ui.ruler",{options:{min:0,max:100,scales:[]},_create:function(){this.element.addClass("ui-ruler"),this._createScales()},destroy:function(){this.element.removeClass("ui-ruler"),this.element.empty(),this._super()},_regenerate:function(){this.element.empty(),this._createScales()},_setOption:function(a,b){return"min"===a||"max"===a&&b!==this.options[a]?(this.options[a]=b,void this._regenerate()):"scales"===a&&b instanceof Array?(this.options.scales=b,void this._regenerate()):void 0},_createScales:function(){if(this.options.max!==this.options.min)for(var a=0;a").appendTo(this.element);f.addClass("ui-ruler-scale"+d),this._createTicks(f,e)},_createTicks:function(a,b){var c,d,e,f=b.first(this.options.min,this.options.max),g=this.options.max-this.options.min,h=!0;do c=f,f=b.next(c),d=(Math.min(f,this.options.max)-Math.max(c,this.options.min))/g,e=this._createTick(c,f,b),a.append(e),e.css("width",100*d+"%"),h&&c>this.options.min&&e.css("margin-left",100*(c-this.options.min)/g+"%"),h=!1;while(!this._stop(b,f))},_stop:function(a,b){return a.stop(b)||b>=this.options.max},_createTick:function(b,c,d){var e=a("
"),f=a("
").appendTo(e),g=a("").appendTo(f);return g.text(d.label(b,c)),d.format(e,b,c),e}})}(jQuery); \ No newline at end of file diff --git a/app/assets/vendored/lib/jqrangeslider/jQRangeSlider-min.js b/app/assets/vendored/lib/jqrangeslider/jQRangeSlider-min.js new file mode 100644 index 000000000..b013c182e --- /dev/null +++ b/app/assets/vendored/lib/jqrangeslider/jQRangeSlider-min.js @@ -0,0 +1,2 @@ +/*! jQRangeSlider 5.8.2 - 2023-10-19 - Copyright (C) Guillaume Gautreau 2012 - MIT and GPLv3 licenses.*/!function(a,b){"use strict";a.widget("ui.rangeSliderMouseTouch",a.ui.mouse,{enabled:!0,_mouseInit:function(){var a=this;this._super(),this._mouseDownEvent=!1,this.element.bind("touchstart."+this.widgetName,function(b){return a._touchStart(b)})},_mouseDestroy:function(){a(document).unbind("touchmove."+this.widgetName,this._touchMoveDelegate).unbind("touchend."+this.widgetName,this._touchEndDelegate),this._super()},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},destroy:function(){this._mouseDestroy(),this._super(),this._mouseInit=null},_touchStart:function(b){if(!this.enabled)return!1;b.which=1,b.preventDefault(),this._fillTouchEvent(b);var c=this,d=this._mouseDownEvent;this._mouseDown(b),d!==this._mouseDownEvent&&(this._touchEndDelegate=function(a){c._touchEnd(a)},this._touchMoveDelegate=function(a){c._touchMove(a)},a(document).bind("touchmove."+this.widgetName,this._touchMoveDelegate).bind("touchend."+this.widgetName,this._touchEndDelegate))},_mouseDown:function(a){return this.enabled?this._super(a):!1},_touchEnd:function(b){this._fillTouchEvent(b),this._mouseUp(b),a(document).unbind("touchmove."+this.widgetName,this._touchMoveDelegate).unbind("touchend."+this.widgetName,this._touchEndDelegate),this._mouseDownEvent=!1,a(document).trigger("mouseup")},_touchMove:function(a){return a.preventDefault(),this._fillTouchEvent(a),this._mouseMove(a)},_fillTouchEvent:function(a){var b;b="undefined"==typeof a.targetTouches&&"undefined"==typeof a.changedTouches?a.originalEvent.targetTouches[0]||a.originalEvent.changedTouches[0]:a.targetTouches[0]||a.changedTouches[0],a.pageX=b.pageX,a.pageY=b.pageY,a.which=1}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSliderDraggable",a.ui.rangeSliderMouseTouch,{cache:null,options:{containment:null},_create:function(){this._super(),setTimeout(a.proxy(this._initElementIfNotDestroyed,this),10)},destroy:function(){this.cache=null,this._super()},_initElementIfNotDestroyed:function(){this._mouseInit&&this._initElement()},_initElement:function(){this._mouseInit(),this._cache()},_setOption:function(b,c){"containment"===b&&(null===c||0===a(c).length?this.options.containment=null:this.options.containment=a(c))},_mouseStart:function(a){return this._cache(),this.cache.click={left:a.pageX,top:a.pageY},this.cache.initialOffset=this.element.offset(),this._triggerMouseEvent("mousestart"),!0},_mouseDrag:function(a){var b=a.pageX-this.cache.click.left;return b=this._constraintPosition(b+this.cache.initialOffset.left),this._applyPosition(b),this._triggerMouseEvent("sliderDrag"),!1},_mouseStop:function(){this._triggerMouseEvent("stop")},_constraintPosition:function(a){return 0!==this.element.parent().length&&null!==this.cache.parent.offset&&(a=Math.min(a,this.cache.parent.offset.left+this.cache.parent.width-this.cache.width.outer),a=Math.max(a,this.cache.parent.offset.left)),a},_applyPosition:function(a){this._cacheIfNecessary();var b={top:this.cache.offset.top,left:a};this.element.offset({left:a}),this.cache.offset=b},_cacheIfNecessary:function(){null===this.cache&&this._cache()},_cache:function(){this.cache={},this._cacheMargins(),this._cacheParent(),this._cacheDimensions(),this.cache.offset=this.element.offset()},_cacheMargins:function(){this.cache.margin={left:this._parsePixels(this.element,"marginLeft"),right:this._parsePixels(this.element,"marginRight"),top:this._parsePixels(this.element,"marginTop"),bottom:this._parsePixels(this.element,"marginBottom")}},_cacheParent:function(){if(null!==this.options.parent){var a=this.element.parent();this.cache.parent={offset:a.offset(),width:a.width()}}else this.cache.parent=null},_cacheDimensions:function(){this.cache.width={outer:this.element.outerWidth(),inner:this.element.width()}},_parsePixels:function(a,b){return parseInt(a.css(b),10)||0},_triggerMouseEvent:function(a){var b=this._prepareEventData();this.element.trigger(a,b)},_prepareEventData:function(){return{element:this.element,offset:this.cache.offset||null}}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSlider",{options:{bounds:{min:0,max:100},defaultValues:{min:20,max:50},wheelMode:null,wheelSpeed:4,arrows:!0,valueLabels:"show",formatter:null,durationIn:0,durationOut:400,delayOut:200,range:{min:!1,max:!1},step:!1,scales:!1,enabled:!0,symmetricPositionning:!1},_values:null,_valuesChanged:!1,_initialized:!1,bar:null,leftHandle:null,rightHandle:null,innerBar:null,container:null,arrows:null,labels:null,changing:{min:!1,max:!1},changed:{min:!1,max:!1},ruler:null,_create:function(){this._super(),this._setDefaultValues(),this.labels={left:null,right:null,leftDisplayed:!0,rightDisplayed:!0},this.arrows={left:null,right:null},this.changing={min:!1,max:!1},this.changed={min:!1,max:!1},this._createElements(),this._bindResize(),setTimeout(a.proxy(this.resize,this),1),setTimeout(a.proxy(this._initValues,this),1)},_setDefaultValues:function(){this._values={min:this.options.defaultValues.min,max:this.options.defaultValues.max}},_bindResize:function(){var b=this;this._resizeProxy=function(a){b.resize(a)},a(window).resize(this._resizeProxy)},_initWidth:function(){this.container.css("width",this.element.width()-this.container.outerWidth(!0)+this.container.width()),this.innerBar.css("width",this.container.width()-this.innerBar.outerWidth(!0)+this.innerBar.width())},_initValues:function(){this._initialized=!0,this.values(this._values.min,this._values.max)},_setOption:function(a,b){this._setWheelOption(a,b),this._setArrowsOption(a,b),this._setLabelsOption(a,b),this._setLabelsDurations(a,b),this._setFormatterOption(a,b),this._setBoundsOption(a,b),this._setRangeOption(a,b),this._setStepOption(a,b),this._setScalesOption(a,b),this._setEnabledOption(a,b),this._setPositionningOption(a,b)},_validProperty:function(a,b,c){return null===a||"undefined"==typeof a[b]?c:a[b]},_setStepOption:function(a,b){"step"===a&&(this.options.step=b,this._leftHandle("option","step",b),this._rightHandle("option","step",b),this._changed(!0))},_setScalesOption:function(a,b){"scales"===a&&(b===!1||null===b?(this.options.scales=!1,this._destroyRuler()):b instanceof Array&&(this.options.scales=b,this._updateRuler()))},_setRangeOption:function(a,b){"range"===a&&(this._bar("option","range",b),this.options.range=this._bar("option","range"),this._changed(!0))},_setBoundsOption:function(a,b){"bounds"===a&&"undefined"!=typeof b.min&&"undefined"!=typeof b.max&&this.bounds(b.min,b.max)},_setWheelOption:function(a,b){("wheelMode"===a||"wheelSpeed"===a)&&(this._bar("option",a,b),this.options[a]=this._bar("option",a))},_setLabelsOption:function(a,b){if("valueLabels"===a){if("hide"!==b&&"show"!==b&&"change"!==b)return;this.options.valueLabels=b,"hide"!==b?(this._createLabels(),this._leftLabel("update"),this._rightLabel("update")):this._destroyLabels()}},_setFormatterOption:function(a,b){"formatter"===a&&null!==b&&"function"==typeof b&&"hide"!==this.options.valueLabels&&(this._leftLabel("option","formatter",b),this.options.formatter=this._rightLabel("option","formatter",b))},_setArrowsOption:function(a,b){"arrows"!==a||b!==!0&&b!==!1||b===this.options.arrows||(b===!0?(this.element.removeClass("ui-rangeSlider-noArrow").addClass("ui-rangeSlider-withArrows"),this.arrows.left.css("display","block"),this.arrows.right.css("display","block"),this.options.arrows=!0):b===!1&&(this.element.addClass("ui-rangeSlider-noArrow").removeClass("ui-rangeSlider-withArrows"),this.arrows.left.css("display","none"),this.arrows.right.css("display","none"),this.options.arrows=!1),this._initWidth())},_setLabelsDurations:function(a,b){if("durationIn"===a||"durationOut"===a||"delayOut"===a){if(parseInt(b,10)!==b)return;null!==this.labels.left&&this._leftLabel("option",a,b),null!==this.labels.right&&this._rightLabel("option",a,b),this.options[a]=b}},_setEnabledOption:function(a,b){"enabled"===a&&this.toggle(b)},_setPositionningOption:function(a,b){"symmetricPositionning"===a&&(this._rightHandle("option",a,b),this.options[a]=this._leftHandle("option",a,b))},_createElements:function(){"absolute"!==this.element.css("position")&&this.element.css("position","relative"),this.element.addClass("ui-rangeSlider"),this.container=a("
").css("position","absolute").appendTo(this.element),this.innerBar=a("
").css("position","absolute").css("top",0).css("left",0),this._createHandles(),this._createBar(),this.container.prepend(this.innerBar),this._createArrows(),"hide"!==this.options.valueLabels?this._createLabels():this._destroyLabels(),this._updateRuler(),this.options.enabled||this._toggle(this.options.enabled)},_createHandle:function(b){return a("
")[this._handleType()](b).bind("sliderDrag",a.proxy(this._changing,this)).bind("stop",a.proxy(this._changed,this))},_createHandles:function(){this.leftHandle=this._createHandle({isLeft:!0,bounds:this.options.bounds,value:this._values.min,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container),this.rightHandle=this._createHandle({isLeft:!1,bounds:this.options.bounds,value:this._values.max,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container)},_createBar:function(){this.bar=a("
").prependTo(this.container).bind("sliderDrag scroll zoom",a.proxy(this._changing,this)).bind("stop",a.proxy(this._changed,this)),this._bar({leftHandle:this.leftHandle,rightHandle:this.rightHandle,values:{min:this._values.min,max:this._values.max},type:this._handleType(),range:this.options.range,wheelMode:this.options.wheelMode,wheelSpeed:this.options.wheelSpeed}),this.options.range=this._bar("option","range"),this.options.wheelMode=this._bar("option","wheelMode"),this.options.wheelSpeed=this._bar("option","wheelSpeed")},_createArrows:function(){this.arrows.left=this._createArrow("left"),this.arrows.right=this._createArrow("right"),this.options.arrows?this.element.addClass("ui-rangeSlider-withArrows"):(this.arrows.left.css("display","none"),this.arrows.right.css("display","none"),this.element.addClass("ui-rangeSlider-noArrow"))},_createArrow:function(b){var c,d=a("
").append("
").addClass("ui-rangeSlider-"+b+"Arrow").css("position","absolute").css(b,0).appendTo(this.element);return c="right"===b?a.proxy(this._scrollRightClick,this):a.proxy(this._scrollLeftClick,this),d.bind("mousedown touchstart",c),d},_proxy:function(a,b,c){var d=Array.prototype.slice.call(c);return a&&a[b]?a[b].apply(a,d):null},_handleType:function(){return"rangeSliderHandle"},_barType:function(){return"rangeSliderBar"},_bar:function(){return this._proxy(this.bar,this._barType(),arguments)},_labelType:function(){return"rangeSliderLabel"},_leftLabel:function(){return this._proxy(this.labels.left,this._labelType(),arguments)},_rightLabel:function(){return this._proxy(this.labels.right,this._labelType(),arguments)},_leftHandle:function(){return this._proxy(this.leftHandle,this._handleType(),arguments)},_rightHandle:function(){return this._proxy(this.rightHandle,this._handleType(),arguments)},_getValue:function(a,b){return b===this.rightHandle&&(a-=b.outerWidth()),a*(this.options.bounds.max-this.options.bounds.min)/(this.container.innerWidth()-b.outerWidth(!0))+this.options.bounds.min},_trigger:function(a){var b=this;setTimeout(function(){b.element.trigger(a,{label:b.element,values:b.values()})},1)},_changing:function(){this._updateValues()&&(this._trigger("valuesChanging"),this._valuesChanged=!0)},_deactivateLabels:function(){"change"===this.options.valueLabels&&(this._leftLabel("option","show","hide"),this._rightLabel("option","show","hide"))},_reactivateLabels:function(){"change"===this.options.valueLabels&&(this._leftLabel("option","show","change"),this._rightLabel("option","show","change"))},_changed:function(a){a===!0&&this._deactivateLabels(),(this._updateValues()||this._valuesChanged)&&(this._trigger("valuesChanged"),a!==!0&&this._trigger("userValuesChanged"),this._valuesChanged=!1),a===!0&&this._reactivateLabels()},_updateValues:function(){var a=this._leftHandle("value"),b=this._rightHandle("value"),c=this._min(a,b),d=this._max(a,b),e=c!==this._values.min||d!==this._values.max;return this._values.min=this._min(a,b),this._values.max=this._max(a,b),e},_min:function(a,b){return Math.min(a,b)},_max:function(a,b){return Math.max(a,b)},_createLabel:function(b,c){var d;return null===b?(d=this._getLabelConstructorParameters(b,c),b=a("
").appendTo(this.element)[this._labelType()](d)):(d=this._getLabelRefreshParameters(b,c),b[this._labelType()](d)),b},_getLabelConstructorParameters:function(a,b){return{handle:b,handleType:this._handleType(),formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getLabelRefreshParameters:function(){return{formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getFormatter:function(){return this.options.formatter===!1||null===this.options.formatter?this._defaultFormatter.bind(this):this.options.formatter},_defaultFormatter:function(a){return Math.round(a)},_destroyLabel:function(a){return null!==a&&(a[this._labelType()]("destroy"),a.remove(),a=null),a},_createLabels:function(){this.labels.left=this._createLabel(this.labels.left,this.leftHandle),this.labels.right=this._createLabel(this.labels.right,this.rightHandle),this._leftLabel("pair",this.labels.right)},_destroyLabels:function(){this.labels.left=this._destroyLabel(this.labels.left),this.labels.right=this._destroyLabel(this.labels.right)},_stepRatio:function(){return this._leftHandle("stepRatio")},_scrollRightClick:function(a){return this.options.enabled?(a.preventDefault(),this._bar("startScroll"),this._bindStopScroll(),void this._continueScrolling("scrollRight",4*this._stepRatio(),1)):!1},_continueScrolling:function(a,b,c,d){if(!this.options.enabled)return!1;this._bar(a,c),d=d||5,d--;var e=this,f=16,g=Math.max(1,4/this._stepRatio());this._scrollTimeout=setTimeout(function(){0===d&&(b>f?b=Math.max(f,b/1.5):c=Math.min(g,2*c),d=5),e._continueScrolling(a,b,c,d)},b)},_scrollLeftClick:function(a){return this.options.enabled?(a.preventDefault(),this._bar("startScroll"),this._bindStopScroll(),void this._continueScrolling("scrollLeft",4*this._stepRatio(),1)):!1},_bindStopScroll:function(){var b=this;this._stopScrollHandle=function(a){a.preventDefault(),b._stopScroll()},a(document).bind("mouseup touchend",this._stopScrollHandle)},_stopScroll:function(){a(document).unbind("mouseup touchend",this._stopScrollHandle),this._stopScrollHandle=null,this._bar("stopScroll"),clearTimeout(this._scrollTimeout)},_createRuler:function(){this.ruler=a("
").appendTo(this.innerBar)},_setRulerParameters:function(){this.ruler.ruler({min:this.options.bounds.min,max:this.options.bounds.max,scales:this.options.scales})},_destroyRuler:function(){null!==this.ruler&&a.fn.ruler&&(this.ruler.ruler("destroy"),this.ruler.remove(),this.ruler=null)},_updateRuler:function(){this._destroyRuler(),this.options.scales!==!1&&a.fn.ruler&&(this._createRuler(),this._setRulerParameters())},values:function(a,b){var c;if("undefined"!=typeof a&&"undefined"!=typeof b){if(!this._initialized)return this._values.min=a,this._values.max=b,this._values;this._deactivateLabels(),c=this._bar("values",a,b),this._changed(!0),this._reactivateLabels()}else c=this._bar("values",a,b);return c},min:function(a){return this._values.min=this.values(a,this._values.max).min,this._values.min},max:function(a){return this._values.max=this.values(this._values.min,a).max,this._values.max},bounds:function(a,b){return this._isValidValue(a)&&this._isValidValue(b)&&b>a&&(this._setBounds(a,b),this._updateRuler(),this._changed(!0)),this.options.bounds},_isValidValue:function(a){return"undefined"!=typeof a&&parseFloat(a)===a},_setBounds:function(a,b){this.options.bounds={min:a,max:b},this._leftHandle("option","bounds",this.options.bounds),this._rightHandle("option","bounds",this.options.bounds),this._bar("option","bounds",this.options.bounds)},zoomIn:function(a){this._bar("zoomIn",a)},zoomOut:function(a){this._bar("zoomOut",a)},scrollLeft:function(a){this._bar("startScroll"),this._bar("scrollLeft",a),this._bar("stopScroll")},scrollRight:function(a){this._bar("startScroll"),this._bar("scrollRight",a),this._bar("stopScroll")},resize:function(){this.container&&(this._initWidth(),this._leftHandle("update"),this._rightHandle("update"),this._bar("update"))},enable:function(){this.toggle(!0)},disable:function(){this.toggle(!1)},toggle:function(a){a===b&&(a=!this.options.enabled),this.options.enabled!==a&&this._toggle(a)},_toggle:function(a){this.options.enabled=a,this.element.toggleClass("ui-rangeSlider-disabled",!a);var b=a?"enable":"disable";this._bar(b),this._leftHandle(b),this._rightHandle(b),this._leftLabel(b),this._rightLabel(b)},destroy:function(){this.element.removeClass("ui-rangeSlider-withArrows ui-rangeSlider-noArrow ui-rangeSlider-disabled"),this._destroyWidgets(),this._destroyElements(),this.element.removeClass("ui-rangeSlider"),this.options=null,a(window).unbind("resize",this._resizeProxy),this._resizeProxy=null,this._bindResize=null,this._super()},_destroyWidget:function(a){this["_"+a]("destroy"),this[a].remove(),this[a]=null},_destroyWidgets:function(){this._destroyWidget("bar"),this._destroyWidget("leftHandle"),this._destroyWidget("rightHandle"),this._destroyRuler(),this._destroyLabels()},_destroyElements:function(){this.container.remove(),this.container=null,this.innerBar.remove(),this.innerBar=null,this.arrows.left.remove(),this.arrows.right.remove(),this.arrows=null}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSliderHandle",a.ui.rangeSliderDraggable,{currentMove:null,margin:0,parentElement:null,options:{isLeft:!0,bounds:{min:0,max:100},range:!1,value:0,step:!1},_value:0,_left:0,_create:function(){this._super(),this.element.css("position","absolute").css("top",0).addClass("ui-rangeSlider-handle").toggleClass("ui-rangeSlider-leftHandle",this.options.isLeft).toggleClass("ui-rangeSlider-rightHandle",!this.options.isLeft),this.element.append("
"),this._value=this._constraintValue(this.options.value)},destroy:function(){this.element.empty(),this._super()},_setOption:function(a,b){"isLeft"!==a||b!==!0&&b!==!1||b===this.options.isLeft?"step"===a&&this._checkStep(b)?(this.options.step=b,this.update()):"bounds"===a?(this.options.bounds=b,this.update()):"range"===a&&this._checkRange(b)?(this.options.range=b,this.update()):"symmetricPositionning"===a&&(this.options.symmetricPositionning=b===!0,this.update()):(this.options.isLeft=b,this.element.toggleClass("ui-rangeSlider-leftHandle",this.options.isLeft).toggleClass("ui-rangeSlider-rightHandle",!this.options.isLeft),this._position(this._value),this.element.trigger("switch",this.options.isLeft)),this._super(a,b)},_checkRange:function(a){return a===!1||!this._isValidValue(a.min)&&!this._isValidValue(a.max)},_isValidValue:function(a){return"undefined"!=typeof a&&a!==!1&&parseFloat(a)!==a},_checkStep:function(a){return a===!1||parseFloat(a)===a},_initElement:function(){this._super(),0===this.cache.parent.width||null===this.cache.parent.width?setTimeout(a.proxy(this._initElementIfNotDestroyed,this),500):(this._position(this._value),this._triggerMouseEvent("initialize"))},_bounds:function(){return this.options.bounds},_cache:function(){this._super(),this._cacheParent()},_cacheParent:function(){var a=this.element.parent();this.cache.parent={element:a,offset:a.offset(),padding:{left:this._parsePixels(a,"paddingLeft")},width:a.width()}},_position:function(a){var b=this._getPositionForValue(a);this._applyPosition(b)},_constraintPosition:function(a){var b=this._getValueForPosition(a);return this._getPositionForValue(b)},_applyPosition:function(a){this._super(a),this._left=a,this._setValue(this._getValueForPosition(a)),this._triggerMouseEvent("moving")},_prepareEventData:function(){var a=this._super();return a.value=this._value,a},_setValue:function(a){a!==this._value&&(this._value=a)},_constraintValue:function(a){if(a=Math.min(a,this._bounds().max),a=Math.max(a,this._bounds().min),a=this._round(a),this.options.range!==!1){var b=this.options.range.min||!1,c=this.options.range.max||!1;b!==!1&&(a=Math.max(a,this._round(b))),c!==!1&&(a=Math.min(a,this._round(c))),a=Math.min(a,this._bounds().max),a=Math.max(a,this._bounds().min)}return a},_round:function(a){return this.options.step!==!1&&this.options.step>0?Math.round(a/this.options.step)*this.options.step:a},_getPositionForValue:function(a){if(!this.cache||!this.cache.parent||null===this.cache.parent.offset)return 0;a=this._constraintValue(a);var b=(a-this.options.bounds.min)/(this.options.bounds.max-this.options.bounds.min),c=this.cache.parent.width,d=this.cache.parent.offset.left,e=this.options.isLeft?0:this.cache.width.outer;return this.options.symmetricPositionning?b*(c-2*this.cache.width.outer)+d+e:b*c+d-e},_getValueForPosition:function(a){var b=this._getRawValueForPositionAndBounds(a,this.options.bounds.min,this.options.bounds.max);return this._constraintValue(b)},_getRawValueForPositionAndBounds:function(a,b,c){var d,e,f=null===this.cache.parent.offset?0:this.cache.parent.offset.left;return this.options.symmetricPositionning?(a-=this.options.isLeft?0:this.cache.width.outer,d=this.cache.parent.width-2*this.cache.width.outer):(a+=this.options.isLeft?0:this.cache.width.outer,d=this.cache.parent.width),0===d?this._value:(e=(a-f)/d,e*(c-b)+b)},value:function(a){return"undefined"!=typeof a&&(this._cache(),a=this._constraintValue(a),this._position(a)),this._value},update:function(){this._cache();var a=this._constraintValue(this._value),b=this._getPositionForValue(a);a!==this._value?(this._triggerMouseEvent("updating"),this._position(a),this._triggerMouseEvent("update")):b!==this.cache.offset.left&&(this._triggerMouseEvent("updating"),this._position(a),this._triggerMouseEvent("update"))},position:function(a){return"undefined"!=typeof a&&(this._cache(),a=this._constraintPosition(a),this._applyPosition(a)),this._left},add:function(a,b){return a+b},substract:function(a,b){return a-b},stepsBetween:function(a,b){return this.options.step===!1?b-a:(b-a)/this.options.step},multiplyStep:function(a,b){return a*b},moveRight:function(a){var b;return this.options.step===!1?(b=this._left,this.position(this._left+a),this._left-b):(b=this._value,this.value(this.add(b,this.multiplyStep(this.options.step,a))),this.stepsBetween(b,this._value))},moveLeft:function(a){return-this.moveRight(-a)},stepRatio:function(){if(this.options.step===!1)return 1;var a=(this.options.bounds.max-this.options.bounds.min)/this.options.step;return this.cache.parent.width/a}})}(jQuery),function(a,b){"use strict";function c(a,b){return"undefined"==typeof a?b||!1:a}a.widget("ui.rangeSliderBar",a.ui.rangeSliderDraggable,{options:{leftHandle:null,rightHandle:null,bounds:{min:0,max:100},type:"rangeSliderHandle",range:!1,drag:function(){},stop:function(){},values:{min:0,max:20},wheelSpeed:4,wheelMode:null},_values:{min:0,max:20},_waitingToInit:2,_wheelTimeout:!1,_create:function(){this._super(),this.element.css("position","absolute").css("top",0).addClass("ui-rangeSlider-bar"),this.options.leftHandle.bind("initialize",a.proxy(this._onInitialized,this)).bind("mousestart",a.proxy(this._cache,this)).bind("stop",a.proxy(this._onHandleStop,this)),this.options.rightHandle.bind("initialize",a.proxy(this._onInitialized,this)).bind("mousestart",a.proxy(this._cache,this)).bind("stop",a.proxy(this._onHandleStop,this)),this._bindHandles(),this._values=this.options.values,this._setWheelModeOption(this.options.wheelMode)},destroy:function(){this.options.leftHandle.unbind(".bar"),this.options.rightHandle.unbind(".bar"),this.options=null,this._super()},_setOption:function(a,b){"range"===a?this._setRangeOption(b):"wheelSpeed"===a?this._setWheelSpeedOption(b):"wheelMode"===a&&this._setWheelModeOption(b)},_setRangeOption:function(a){if(("object"!=typeof a||null===a)&&(a=!1),a!==!1||this.options.range!==!1){if(a!==!1){var b=c(a.min,this.options.range.min),d=c(a.max,this.options.range.max);this.options.range={min:b,max:d}}else this.options.range=!1;this._setLeftRange(),this._setRightRange()}},_setWheelSpeedOption:function(a){"number"==typeof a&&0!==a&&(this.options.wheelSpeed=a)},_setWheelModeOption:function(a){(null===a||a===!1||"zoom"===a||"scroll"===a)&&(this.options.wheelMode!==a&&this.element.parent().unbind("mousewheel.bar"),this._bindMouseWheel(a),this.options.wheelMode=a)},_bindMouseWheel:function(b){"zoom"===b?this.element.parent().bind("mousewheel.bar",a.proxy(this._mouseWheelZoom,this)):"scroll"===b&&this.element.parent().bind("mousewheel.bar",a.proxy(this._mouseWheelScroll,this))},_setLeftRange:function(){if(this.options.range===!1)return!1;var a=this._values.max,b={min:!1,max:!1};"undefined"!=typeof this.options.range.min&&this.options.range.min!==!1?b.max=this._leftHandle("substract",a,this.options.range.min):b.max=!1,"undefined"!=typeof this.options.range.max&&this.options.range.max!==!1?b.min=this._leftHandle("substract",a,this.options.range.max):b.min=!1,this._leftHandle("option","range",b)},_setRightRange:function(){var a=this._values.min,b={min:!1,max:!1};"undefined"!=typeof this.options.range.min&&this.options.range.min!==!1?b.min=this._rightHandle("add",a,this.options.range.min):b.min=!1,"undefined"!=typeof this.options.range.max&&this.options.range.max!==!1?b.max=this._rightHandle("add",a,this.options.range.max):b.max=!1,this._rightHandle("option","range",b)},_deactivateRange:function(){this._leftHandle("option","range",!1),this._rightHandle("option","range",!1)},_reactivateRange:function(){this._setRangeOption(this.options.range)},_onInitialized:function(){this._waitingToInit--,0===this._waitingToInit&&this._initMe()},_initMe:function(){this._cache(),this.min(this._values.min),this.max(this._values.max);var a=this._leftHandle("position"),b=this._rightHandle("position")+this.options.rightHandle.width();this.element.offset({left:a}),this.element.css("width",b-a)},_leftHandle:function(){return this._handleProxy(this.options.leftHandle,arguments)},_rightHandle:function(){return this._handleProxy(this.options.rightHandle,arguments)},_handleProxy:function(a,b){var c=Array.prototype.slice.call(b);return a[this.options.type].apply(a,c)},_cache:function(){this._super(),this._cacheHandles()},_cacheHandles:function(){this.cache.rightHandle={},this.cache.rightHandle.width=this.options.rightHandle.width(),this.cache.rightHandle.offset=this.options.rightHandle.offset(),this.cache.leftHandle={},this.cache.leftHandle.offset=this.options.leftHandle.offset()},_mouseStart:function(a){this._super(a),this._deactivateRange()},_mouseStop:function(a){this._super(a),this._cacheHandles(),this._values.min=this._leftHandle("value"),this._values.max=this._rightHandle("value"),this._reactivateRange(),this._leftHandle().trigger("stop"),this._rightHandle().trigger("stop")},_onDragLeftHandle:function(a,b){if(this._cacheIfNecessary(),b.element[0]===this.options.leftHandle[0]){if(this._switchedValues())return this._switchHandles(),void this._onDragRightHandle(a,b);this._values.min=b.value,this.cache.offset.left=b.offset.left,this.cache.leftHandle.offset=b.offset,this._positionBar()}},_onDragRightHandle:function(a,b){if(this._cacheIfNecessary(),b.element[0]===this.options.rightHandle[0]){if(this._switchedValues())return this._switchHandles(),void this._onDragLeftHandle(a,b);this._values.max=b.value,this.cache.rightHandle.offset=b.offset,this._positionBar()}},_positionBar:function(){var a=this.cache.rightHandle.offset.left+this.cache.rightHandle.width-this.cache.leftHandle.offset.left;this.cache.width.inner=a,this.element.css("width",a).offset({left:this.cache.leftHandle.offset.left})},_onHandleStop:function(){this._setLeftRange(),this._setRightRange()},_switchedValues:function(){if(this.min()>this.max()){var a=this._values.min;return this._values.min=this._values.max,this._values.max=a,!0}return!1},_switchHandles:function(){var a=this.options.leftHandle;this.options.leftHandle=this.options.rightHandle,this.options.rightHandle=a,this._leftHandle("option","isLeft",!0),this._rightHandle("option","isLeft",!1),this._bindHandles(),this._cacheHandles()},_bindHandles:function(){this.options.leftHandle.unbind(".bar").bind("sliderDrag.bar update.bar moving.bar",a.proxy(this._onDragLeftHandle,this)),this.options.rightHandle.unbind(".bar").bind("sliderDrag.bar update.bar moving.bar",a.proxy(this._onDragRightHandle,this))},_constraintPosition:function(a){var b,c={};return c.left=this._super(a),c.left=this._leftHandle("position",c.left),b=this._rightHandle("position",c.left+this.cache.width.outer-this.cache.rightHandle.width),c.width=b-c.left+this.cache.rightHandle.width,c},_applyPosition:function(a){this._super(a.left),this.element.width(a.width)},_mouseWheelZoom:function(b,c,d,e){if(!this.enabled)return!1;var f=this._values.min+(this._values.max-this._values.min)/2,g={},h={};return this.options.range===!1||this.options.range.min===!1?(g.max=f,h.min=f):(g.max=f-this.options.range.min/2,h.min=f+this.options.range.min/2),this.options.range!==!1&&this.options.range.max!==!1&&(g.min=f-this.options.range.max/2,h.max=f+this.options.range.max/2),this._leftHandle("option","range",g),this._rightHandle("option","range",h),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(a.proxy(this._wheelStop,this),200),this.zoomIn(e*this.options.wheelSpeed),!1},_mouseWheelScroll:function(b,c,d,e){return this.enabled?(this._wheelTimeout===!1?this.startScroll():clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(a.proxy(this._wheelStop,this),200),this.scrollLeft(e*this.options.wheelSpeed),!1):!1},_wheelStop:function(){this.stopScroll(),this._wheelTimeout=!1},min:function(a){return this._leftHandle("value",a)},max:function(a){return this._rightHandle("value",a)},startScroll:function(){this._deactivateRange()},stopScroll:function(){this._reactivateRange(),this._triggerMouseEvent("stop"),this._leftHandle().trigger("stop"),this._rightHandle().trigger("stop")},scrollLeft:function(a){return a=a||1,0>a?this.scrollRight(-a):(a=this._leftHandle("moveLeft",a),this._rightHandle("moveLeft",a),this.update(),void this._triggerMouseEvent("scroll"))},scrollRight:function(a){return a=a||1,0>a?this.scrollLeft(-a):(a=this._rightHandle("moveRight",a),this._leftHandle("moveRight",a),this.update(),void this._triggerMouseEvent("scroll"))},zoomIn:function(a){if(a=a||1,0>a)return this.zoomOut(-a);var b=this._rightHandle("moveLeft",a);a>b&&(b/=2,this._rightHandle("moveRight",b)),this._leftHandle("moveRight",b),this.update(),this._triggerMouseEvent("zoom")},zoomOut:function(a){if(a=a||1,0>a)return this.zoomIn(-a);var b=this._rightHandle("moveRight",a);a>b&&(b/=2,this._rightHandle("moveLeft",b)),this._leftHandle("moveLeft",b),this.update(),this._triggerMouseEvent("zoom")},values:function(a,b){if("undefined"!=typeof a&&"undefined"!=typeof b){var c=Math.min(a,b),d=Math.max(a,b);this._deactivateRange(),this.options.leftHandle.unbind(".bar"),this.options.rightHandle.unbind(".bar"),this._values.min=this._leftHandle("value",c),this._values.max=this._rightHandle("value",d),this._bindHandles(),this._reactivateRange(),this.update()}return{min:this._values.min,max:this._values.max}},update:function(){this._values.min=this.min(),this._values.max=this.max(),this._cache(),this._positionBar()}})}(jQuery),function(a,b){"use strict";function c(b,c,d,e){this.label1=b,this.label2=c,this.type=d,this.options=e,this.handle1=this.label1[this.type]("option","handle"),this.handle2=this.label2[this.type]("option","handle"),this.cache=null,this.left=b,this.right=c,this.moving=!1,this.initialized=!1,this.updating=!1,this.Init=function(){this.BindHandle(this.handle1),this.BindHandle(this.handle2),"show"===this.options.show?(setTimeout(a.proxy(this.PositionLabels,this),1), +this.initialized=!0):setTimeout(a.proxy(this.AfterInit,this),1e3),this._resizeProxy=a.proxy(this.onWindowResize,this),a(window).resize(this._resizeProxy)},this.Destroy=function(){this._resizeProxy&&(a(window).unbind("resize",this._resizeProxy),this._resizeProxy=null,this.handle1.unbind(".positionner"),this.handle1=null,this.handle2.unbind(".positionner"),this.handle2=null,this.label1=null,this.label2=null,this.left=null,this.right=null),this.cache=null},this.AfterInit=function(){this.initialized=!0},this.Cache=function(){"none"!==this.label1.css("display")&&(this.cache={},this.cache.label1={},this.cache.label2={},this.cache.handle1={},this.cache.handle2={},this.cache.offsetParent={},this.CacheElement(this.label1,this.cache.label1),this.CacheElement(this.label2,this.cache.label2),this.CacheElement(this.handle1,this.cache.handle1),this.CacheElement(this.handle2,this.cache.handle2),this.CacheElement(this.label1.offsetParent(),this.cache.offsetParent))},this.CacheIfNecessary=function(){null===this.cache?this.Cache():(this.CacheWidth(this.label1,this.cache.label1),this.CacheWidth(this.label2,this.cache.label2),this.CacheHeight(this.label1,this.cache.label1),this.CacheHeight(this.label2,this.cache.label2),this.CacheWidth(this.label1.offsetParent(),this.cache.offsetParent))},this.CacheElement=function(a,b){this.CacheWidth(a,b),this.CacheHeight(a,b),b.offset=a.offset(),b.margin={left:this.ParsePixels("marginLeft",a),right:this.ParsePixels("marginRight",a)},b.border={left:this.ParsePixels("borderLeftWidth",a),right:this.ParsePixels("borderRightWidth",a)}},this.CacheWidth=function(a,b){b.width=a.width(),b.outerWidth=a.outerWidth()},this.CacheHeight=function(a,b){b.outerHeightMargin=a.outerHeight(!0)},this.ParsePixels=function(a,b){return parseInt(b.css(a),10)||0},this.BindHandle=function(b){b.bind("updating.positionner",a.proxy(this.onHandleUpdating,this)),b.bind("update.positionner",a.proxy(this.onHandleUpdated,this)),b.bind("moving.positionner",a.proxy(this.onHandleMoving,this)),b.bind("stop.positionner",a.proxy(this.onHandleStop,this))},this.PositionLabels=function(){if(this.CacheIfNecessary(),null!==this.cache){var a=this.GetRawPosition(this.cache.label1,this.cache.handle1),b=this.GetRawPosition(this.cache.label2,this.cache.handle2);this.label1[d]("option","isLeft")?this.ConstraintPositions(a,b):this.ConstraintPositions(b,a),this.PositionLabel(this.label1,a.left,this.cache.label1),this.PositionLabel(this.label2,b.left,this.cache.label2)}},this.PositionLabel=function(a,b,c){var d,e,f,g=this.cache.offsetParent.offset.left+this.cache.offsetParent.border.left;g-b>=0?(a.css("right",""),a.offset({left:b})):(d=g+this.cache.offsetParent.width,e=b+c.margin.left+c.outerWidth+c.margin.right,f=d-e,a.css("left",""),a.css("right",f))},this.ConstraintPositions=function(a,b){(a.centerb.outerLeft||a.center>b.center&&b.outerRight>a.outerLeft)&&(a=this.getLeftPosition(a,b),b=this.getRightPosition(a,b))},this.getLeftPosition=function(a,b){var c=(b.center+a.center)/2,d=c-a.cache.outerWidth-a.cache.margin.right+a.cache.border.left;return a.left=d,a},this.getRightPosition=function(a,b){var c=(b.center+a.center)/2;return b.left=c+b.cache.margin.left+b.cache.border.left,b},this.ShowIfNecessary=function(){"show"===this.options.show||this.moving||!this.initialized||this.updating||(this.label1.stop(!0,!0).fadeIn(this.options.durationIn||0),this.label2.stop(!0,!0).fadeIn(this.options.durationIn||0),this.moving=!0)},this.HideIfNeeded=function(){this.moving===!0&&(this.label1.stop(!0,!0).delay(this.options.delayOut||0).fadeOut(this.options.durationOut||0),this.label2.stop(!0,!0).delay(this.options.delayOut||0).fadeOut(this.options.durationOut||0),this.moving=!1)},this.onHandleMoving=function(a,b){this.ShowIfNecessary(),this.CacheIfNecessary(),this.UpdateHandlePosition(b),this.PositionLabels()},this.onHandleUpdating=function(){this.updating=!0},this.onHandleUpdated=function(){this.updating=!1,this.cache=null},this.onHandleStop=function(){this.HideIfNeeded()},this.onWindowResize=function(){this.cache=null},this.UpdateHandlePosition=function(a){null!==this.cache&&(a.element[0]===this.handle1[0]?this.UpdatePosition(a,this.cache.handle1):this.UpdatePosition(a,this.cache.handle2))},this.UpdatePosition=function(a,b){b.offset=a.offset,b.value=a.value},this.GetRawPosition=function(a,b){var c=b.offset.left+b.outerWidth/2,d=c-a.outerWidth/2,e=d+a.outerWidth-a.border.left-a.border.right,f=d-a.margin.left-a.border.left,g=b.offset.top-a.outerHeightMargin;return{left:d,outerLeft:f,top:g,right:e,outerRight:f+a.outerWidth+a.margin.left+a.margin.right,cache:a,center:c}},this.Init()}a.widget("ui.rangeSliderLabel",a.ui.rangeSliderMouseTouch,{options:{handle:null,formatter:!1,handleType:"rangeSliderHandle",show:"show",durationIn:0,durationOut:500,delayOut:500,isLeft:!1},cache:null,_positionner:null,_valueContainer:null,_innerElement:null,_value:null,_create:function(){this.options.isLeft=this._handle("option","isLeft"),this.element.addClass("ui-rangeSlider-label").css("position","absolute").css("display","block"),this._createElements(),this._toggleClass(),this.options.handle.bind("moving.label",a.proxy(this._onMoving,this)).bind("update.label",a.proxy(this._onUpdate,this)).bind("switch.label",a.proxy(this._onSwitch,this)),"show"!==this.options.show&&this.element.hide(),this._mouseInit()},destroy:function(){this.options.handle.unbind(".label"),this.options.handle=null,this._valueContainer=null,this._innerElement=null,this.element.empty(),this._positionner&&(this._positionner.Destroy(),this._positionner=null),this._super()},_createElements:function(){this._valueContainer=a("
").appendTo(this.element),this._innerElement=a("
").appendTo(this.element)},_handle:function(){var a=Array.prototype.slice.apply(arguments);return this.options.handle[this.options.handleType].apply(this.options.handle,a)},_setOption:function(a,b){"show"===a?this._updateShowOption(b):("durationIn"===a||"durationOut"===a||"delayOut"===a)&&this._updateDurations(a,b),this._setFormatterOption(a,b)},_setFormatterOption:function(a,b){"formatter"===a&&("function"==typeof b||b===!1)&&(this.options.formatter=b,this._display(this._value))},_updateShowOption:function(a){this.options.show=a,"show"!==this.options.show?(this.element.hide(),this._positionner.moving=!1):(this.element.show(),this._display(this.options.handle[this.options.handleType]("value")),this._positionner.PositionLabels()),this._positionner.options.show=this.options.show},_updateDurations:function(a,b){parseInt(b,10)===b&&(this._positionner.options[a]=b,this.options[a]=b)},_display:function(a){this.options.formatter===!1?this._displayText(Math.round(a)):this._displayText(this.options.formatter(a,this.options.isLeft)),this._value=a},_displayText:function(a){this._valueContainer.text(a)},_toggleClass:function(){this.element.toggleClass("ui-rangeSlider-leftLabel",this.options.isLeft).toggleClass("ui-rangeSlider-rightLabel",!this.options.isLeft)},_positionLabels:function(){this._positionner.PositionLabels()},_mouseDown:function(a){this.options.handle.trigger(a)},_mouseUp:function(a){this.options.handle.trigger(a)},_mouseMove:function(a){this.options.handle.trigger(a)},_onMoving:function(a,b){this._display(b.value)},_onUpdate:function(){"show"===this.options.show&&this.update()},_onSwitch:function(a,b){this.options.isLeft=b,this._toggleClass(),this._positionLabels()},pair:function(a){null===this._positionner&&(this._positionner=new c(this.element,a,this.widgetName,{show:this.options.show,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}),a[this.widgetName]("positionner",this._positionner))},positionner:function(a){return"undefined"!=typeof a&&(this._positionner=a),this._positionner},update:function(){this._positionner.cache=null,this._display(this._handle("value")),"show"===this.options.show&&this._positionLabels()}})}(jQuery); \ No newline at end of file diff --git a/app/assets/vendored/lib/jqrangeslider/jQRangeSlider-withRuler-min.js b/app/assets/vendored/lib/jqrangeslider/jQRangeSlider-withRuler-min.js new file mode 100644 index 000000000..06919d94f --- /dev/null +++ b/app/assets/vendored/lib/jqrangeslider/jQRangeSlider-withRuler-min.js @@ -0,0 +1,2 @@ +/*! jQRangeSlider 5.8.2 - 2023-10-19 - Copyright (C) Guillaume Gautreau 2012 - MIT and GPLv3 licenses.*/!function(a,b){"use strict";a.widget("ui.rangeSliderMouseTouch",a.ui.mouse,{enabled:!0,_mouseInit:function(){var a=this;this._super(),this._mouseDownEvent=!1,this.element.bind("touchstart."+this.widgetName,function(b){return a._touchStart(b)})},_mouseDestroy:function(){a(document).unbind("touchmove."+this.widgetName,this._touchMoveDelegate).unbind("touchend."+this.widgetName,this._touchEndDelegate),this._super()},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},destroy:function(){this._mouseDestroy(),this._super(),this._mouseInit=null},_touchStart:function(b){if(!this.enabled)return!1;b.which=1,b.preventDefault(),this._fillTouchEvent(b);var c=this,d=this._mouseDownEvent;this._mouseDown(b),d!==this._mouseDownEvent&&(this._touchEndDelegate=function(a){c._touchEnd(a)},this._touchMoveDelegate=function(a){c._touchMove(a)},a(document).bind("touchmove."+this.widgetName,this._touchMoveDelegate).bind("touchend."+this.widgetName,this._touchEndDelegate))},_mouseDown:function(a){return this.enabled?this._super(a):!1},_touchEnd:function(b){this._fillTouchEvent(b),this._mouseUp(b),a(document).unbind("touchmove."+this.widgetName,this._touchMoveDelegate).unbind("touchend."+this.widgetName,this._touchEndDelegate),this._mouseDownEvent=!1,a(document).trigger("mouseup")},_touchMove:function(a){return a.preventDefault(),this._fillTouchEvent(a),this._mouseMove(a)},_fillTouchEvent:function(a){var b;b="undefined"==typeof a.targetTouches&&"undefined"==typeof a.changedTouches?a.originalEvent.targetTouches[0]||a.originalEvent.changedTouches[0]:a.targetTouches[0]||a.changedTouches[0],a.pageX=b.pageX,a.pageY=b.pageY,a.which=1}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSliderDraggable",a.ui.rangeSliderMouseTouch,{cache:null,options:{containment:null},_create:function(){this._super(),setTimeout(a.proxy(this._initElementIfNotDestroyed,this),10)},destroy:function(){this.cache=null,this._super()},_initElementIfNotDestroyed:function(){this._mouseInit&&this._initElement()},_initElement:function(){this._mouseInit(),this._cache()},_setOption:function(b,c){"containment"===b&&(null===c||0===a(c).length?this.options.containment=null:this.options.containment=a(c))},_mouseStart:function(a){return this._cache(),this.cache.click={left:a.pageX,top:a.pageY},this.cache.initialOffset=this.element.offset(),this._triggerMouseEvent("mousestart"),!0},_mouseDrag:function(a){var b=a.pageX-this.cache.click.left;return b=this._constraintPosition(b+this.cache.initialOffset.left),this._applyPosition(b),this._triggerMouseEvent("sliderDrag"),!1},_mouseStop:function(){this._triggerMouseEvent("stop")},_constraintPosition:function(a){return 0!==this.element.parent().length&&null!==this.cache.parent.offset&&(a=Math.min(a,this.cache.parent.offset.left+this.cache.parent.width-this.cache.width.outer),a=Math.max(a,this.cache.parent.offset.left)),a},_applyPosition:function(a){this._cacheIfNecessary();var b={top:this.cache.offset.top,left:a};this.element.offset({left:a}),this.cache.offset=b},_cacheIfNecessary:function(){null===this.cache&&this._cache()},_cache:function(){this.cache={},this._cacheMargins(),this._cacheParent(),this._cacheDimensions(),this.cache.offset=this.element.offset()},_cacheMargins:function(){this.cache.margin={left:this._parsePixels(this.element,"marginLeft"),right:this._parsePixels(this.element,"marginRight"),top:this._parsePixels(this.element,"marginTop"),bottom:this._parsePixels(this.element,"marginBottom")}},_cacheParent:function(){if(null!==this.options.parent){var a=this.element.parent();this.cache.parent={offset:a.offset(),width:a.width()}}else this.cache.parent=null},_cacheDimensions:function(){this.cache.width={outer:this.element.outerWidth(),inner:this.element.width()}},_parsePixels:function(a,b){return parseInt(a.css(b),10)||0},_triggerMouseEvent:function(a){var b=this._prepareEventData();this.element.trigger(a,b)},_prepareEventData:function(){return{element:this.element,offset:this.cache.offset||null}}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSlider",{options:{bounds:{min:0,max:100},defaultValues:{min:20,max:50},wheelMode:null,wheelSpeed:4,arrows:!0,valueLabels:"show",formatter:null,durationIn:0,durationOut:400,delayOut:200,range:{min:!1,max:!1},step:!1,scales:!1,enabled:!0,symmetricPositionning:!1},_values:null,_valuesChanged:!1,_initialized:!1,bar:null,leftHandle:null,rightHandle:null,innerBar:null,container:null,arrows:null,labels:null,changing:{min:!1,max:!1},changed:{min:!1,max:!1},ruler:null,_create:function(){this._super(),this._setDefaultValues(),this.labels={left:null,right:null,leftDisplayed:!0,rightDisplayed:!0},this.arrows={left:null,right:null},this.changing={min:!1,max:!1},this.changed={min:!1,max:!1},this._createElements(),this._bindResize(),setTimeout(a.proxy(this.resize,this),1),setTimeout(a.proxy(this._initValues,this),1)},_setDefaultValues:function(){this._values={min:this.options.defaultValues.min,max:this.options.defaultValues.max}},_bindResize:function(){var b=this;this._resizeProxy=function(a){b.resize(a)},a(window).resize(this._resizeProxy)},_initWidth:function(){this.container.css("width",this.element.width()-this.container.outerWidth(!0)+this.container.width()),this.innerBar.css("width",this.container.width()-this.innerBar.outerWidth(!0)+this.innerBar.width())},_initValues:function(){this._initialized=!0,this.values(this._values.min,this._values.max)},_setOption:function(a,b){this._setWheelOption(a,b),this._setArrowsOption(a,b),this._setLabelsOption(a,b),this._setLabelsDurations(a,b),this._setFormatterOption(a,b),this._setBoundsOption(a,b),this._setRangeOption(a,b),this._setStepOption(a,b),this._setScalesOption(a,b),this._setEnabledOption(a,b),this._setPositionningOption(a,b)},_validProperty:function(a,b,c){return null===a||"undefined"==typeof a[b]?c:a[b]},_setStepOption:function(a,b){"step"===a&&(this.options.step=b,this._leftHandle("option","step",b),this._rightHandle("option","step",b),this._changed(!0))},_setScalesOption:function(a,b){"scales"===a&&(b===!1||null===b?(this.options.scales=!1,this._destroyRuler()):b instanceof Array&&(this.options.scales=b,this._updateRuler()))},_setRangeOption:function(a,b){"range"===a&&(this._bar("option","range",b),this.options.range=this._bar("option","range"),this._changed(!0))},_setBoundsOption:function(a,b){"bounds"===a&&"undefined"!=typeof b.min&&"undefined"!=typeof b.max&&this.bounds(b.min,b.max)},_setWheelOption:function(a,b){("wheelMode"===a||"wheelSpeed"===a)&&(this._bar("option",a,b),this.options[a]=this._bar("option",a))},_setLabelsOption:function(a,b){if("valueLabels"===a){if("hide"!==b&&"show"!==b&&"change"!==b)return;this.options.valueLabels=b,"hide"!==b?(this._createLabels(),this._leftLabel("update"),this._rightLabel("update")):this._destroyLabels()}},_setFormatterOption:function(a,b){"formatter"===a&&null!==b&&"function"==typeof b&&"hide"!==this.options.valueLabels&&(this._leftLabel("option","formatter",b),this.options.formatter=this._rightLabel("option","formatter",b))},_setArrowsOption:function(a,b){"arrows"!==a||b!==!0&&b!==!1||b===this.options.arrows||(b===!0?(this.element.removeClass("ui-rangeSlider-noArrow").addClass("ui-rangeSlider-withArrows"),this.arrows.left.css("display","block"),this.arrows.right.css("display","block"),this.options.arrows=!0):b===!1&&(this.element.addClass("ui-rangeSlider-noArrow").removeClass("ui-rangeSlider-withArrows"),this.arrows.left.css("display","none"),this.arrows.right.css("display","none"),this.options.arrows=!1),this._initWidth())},_setLabelsDurations:function(a,b){if("durationIn"===a||"durationOut"===a||"delayOut"===a){if(parseInt(b,10)!==b)return;null!==this.labels.left&&this._leftLabel("option",a,b),null!==this.labels.right&&this._rightLabel("option",a,b),this.options[a]=b}},_setEnabledOption:function(a,b){"enabled"===a&&this.toggle(b)},_setPositionningOption:function(a,b){"symmetricPositionning"===a&&(this._rightHandle("option",a,b),this.options[a]=this._leftHandle("option",a,b))},_createElements:function(){"absolute"!==this.element.css("position")&&this.element.css("position","relative"),this.element.addClass("ui-rangeSlider"),this.container=a("
").css("position","absolute").appendTo(this.element),this.innerBar=a("
").css("position","absolute").css("top",0).css("left",0),this._createHandles(),this._createBar(),this.container.prepend(this.innerBar),this._createArrows(),"hide"!==this.options.valueLabels?this._createLabels():this._destroyLabels(),this._updateRuler(),this.options.enabled||this._toggle(this.options.enabled)},_createHandle:function(b){return a("
")[this._handleType()](b).bind("sliderDrag",a.proxy(this._changing,this)).bind("stop",a.proxy(this._changed,this))},_createHandles:function(){this.leftHandle=this._createHandle({isLeft:!0,bounds:this.options.bounds,value:this._values.min,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container),this.rightHandle=this._createHandle({isLeft:!1,bounds:this.options.bounds,value:this._values.max,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container)},_createBar:function(){this.bar=a("
").prependTo(this.container).bind("sliderDrag scroll zoom",a.proxy(this._changing,this)).bind("stop",a.proxy(this._changed,this)),this._bar({leftHandle:this.leftHandle,rightHandle:this.rightHandle,values:{min:this._values.min,max:this._values.max},type:this._handleType(),range:this.options.range,wheelMode:this.options.wheelMode,wheelSpeed:this.options.wheelSpeed}),this.options.range=this._bar("option","range"),this.options.wheelMode=this._bar("option","wheelMode"),this.options.wheelSpeed=this._bar("option","wheelSpeed")},_createArrows:function(){this.arrows.left=this._createArrow("left"),this.arrows.right=this._createArrow("right"),this.options.arrows?this.element.addClass("ui-rangeSlider-withArrows"):(this.arrows.left.css("display","none"),this.arrows.right.css("display","none"),this.element.addClass("ui-rangeSlider-noArrow"))},_createArrow:function(b){var c,d=a("
").append("
").addClass("ui-rangeSlider-"+b+"Arrow").css("position","absolute").css(b,0).appendTo(this.element);return c="right"===b?a.proxy(this._scrollRightClick,this):a.proxy(this._scrollLeftClick,this),d.bind("mousedown touchstart",c),d},_proxy:function(a,b,c){var d=Array.prototype.slice.call(c);return a&&a[b]?a[b].apply(a,d):null},_handleType:function(){return"rangeSliderHandle"},_barType:function(){return"rangeSliderBar"},_bar:function(){return this._proxy(this.bar,this._barType(),arguments)},_labelType:function(){return"rangeSliderLabel"},_leftLabel:function(){return this._proxy(this.labels.left,this._labelType(),arguments)},_rightLabel:function(){return this._proxy(this.labels.right,this._labelType(),arguments)},_leftHandle:function(){return this._proxy(this.leftHandle,this._handleType(),arguments)},_rightHandle:function(){return this._proxy(this.rightHandle,this._handleType(),arguments)},_getValue:function(a,b){return b===this.rightHandle&&(a-=b.outerWidth()),a*(this.options.bounds.max-this.options.bounds.min)/(this.container.innerWidth()-b.outerWidth(!0))+this.options.bounds.min},_trigger:function(a){var b=this;setTimeout(function(){b.element.trigger(a,{label:b.element,values:b.values()})},1)},_changing:function(){this._updateValues()&&(this._trigger("valuesChanging"),this._valuesChanged=!0)},_deactivateLabels:function(){"change"===this.options.valueLabels&&(this._leftLabel("option","show","hide"),this._rightLabel("option","show","hide"))},_reactivateLabels:function(){"change"===this.options.valueLabels&&(this._leftLabel("option","show","change"),this._rightLabel("option","show","change"))},_changed:function(a){a===!0&&this._deactivateLabels(),(this._updateValues()||this._valuesChanged)&&(this._trigger("valuesChanged"),a!==!0&&this._trigger("userValuesChanged"),this._valuesChanged=!1),a===!0&&this._reactivateLabels()},_updateValues:function(){var a=this._leftHandle("value"),b=this._rightHandle("value"),c=this._min(a,b),d=this._max(a,b),e=c!==this._values.min||d!==this._values.max;return this._values.min=this._min(a,b),this._values.max=this._max(a,b),e},_min:function(a,b){return Math.min(a,b)},_max:function(a,b){return Math.max(a,b)},_createLabel:function(b,c){var d;return null===b?(d=this._getLabelConstructorParameters(b,c),b=a("
").appendTo(this.element)[this._labelType()](d)):(d=this._getLabelRefreshParameters(b,c),b[this._labelType()](d)),b},_getLabelConstructorParameters:function(a,b){return{handle:b,handleType:this._handleType(),formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getLabelRefreshParameters:function(){return{formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getFormatter:function(){return this.options.formatter===!1||null===this.options.formatter?this._defaultFormatter.bind(this):this.options.formatter},_defaultFormatter:function(a){return Math.round(a)},_destroyLabel:function(a){return null!==a&&(a[this._labelType()]("destroy"),a.remove(),a=null),a},_createLabels:function(){this.labels.left=this._createLabel(this.labels.left,this.leftHandle),this.labels.right=this._createLabel(this.labels.right,this.rightHandle),this._leftLabel("pair",this.labels.right)},_destroyLabels:function(){this.labels.left=this._destroyLabel(this.labels.left),this.labels.right=this._destroyLabel(this.labels.right)},_stepRatio:function(){return this._leftHandle("stepRatio")},_scrollRightClick:function(a){return this.options.enabled?(a.preventDefault(),this._bar("startScroll"),this._bindStopScroll(),void this._continueScrolling("scrollRight",4*this._stepRatio(),1)):!1},_continueScrolling:function(a,b,c,d){if(!this.options.enabled)return!1;this._bar(a,c),d=d||5,d--;var e=this,f=16,g=Math.max(1,4/this._stepRatio());this._scrollTimeout=setTimeout(function(){0===d&&(b>f?b=Math.max(f,b/1.5):c=Math.min(g,2*c),d=5),e._continueScrolling(a,b,c,d)},b)},_scrollLeftClick:function(a){return this.options.enabled?(a.preventDefault(),this._bar("startScroll"),this._bindStopScroll(),void this._continueScrolling("scrollLeft",4*this._stepRatio(),1)):!1},_bindStopScroll:function(){var b=this;this._stopScrollHandle=function(a){a.preventDefault(),b._stopScroll()},a(document).bind("mouseup touchend",this._stopScrollHandle)},_stopScroll:function(){a(document).unbind("mouseup touchend",this._stopScrollHandle),this._stopScrollHandle=null,this._bar("stopScroll"),clearTimeout(this._scrollTimeout)},_createRuler:function(){this.ruler=a("
").appendTo(this.innerBar)},_setRulerParameters:function(){this.ruler.ruler({min:this.options.bounds.min,max:this.options.bounds.max,scales:this.options.scales})},_destroyRuler:function(){null!==this.ruler&&a.fn.ruler&&(this.ruler.ruler("destroy"),this.ruler.remove(),this.ruler=null)},_updateRuler:function(){this._destroyRuler(),this.options.scales!==!1&&a.fn.ruler&&(this._createRuler(),this._setRulerParameters())},values:function(a,b){var c;if("undefined"!=typeof a&&"undefined"!=typeof b){if(!this._initialized)return this._values.min=a,this._values.max=b,this._values;this._deactivateLabels(),c=this._bar("values",a,b),this._changed(!0),this._reactivateLabels()}else c=this._bar("values",a,b);return c},min:function(a){return this._values.min=this.values(a,this._values.max).min,this._values.min},max:function(a){return this._values.max=this.values(this._values.min,a).max,this._values.max},bounds:function(a,b){return this._isValidValue(a)&&this._isValidValue(b)&&b>a&&(this._setBounds(a,b),this._updateRuler(),this._changed(!0)),this.options.bounds},_isValidValue:function(a){return"undefined"!=typeof a&&parseFloat(a)===a},_setBounds:function(a,b){this.options.bounds={min:a,max:b},this._leftHandle("option","bounds",this.options.bounds),this._rightHandle("option","bounds",this.options.bounds),this._bar("option","bounds",this.options.bounds)},zoomIn:function(a){this._bar("zoomIn",a)},zoomOut:function(a){this._bar("zoomOut",a)},scrollLeft:function(a){this._bar("startScroll"),this._bar("scrollLeft",a),this._bar("stopScroll")},scrollRight:function(a){this._bar("startScroll"),this._bar("scrollRight",a),this._bar("stopScroll")},resize:function(){this.container&&(this._initWidth(),this._leftHandle("update"),this._rightHandle("update"),this._bar("update"))},enable:function(){this.toggle(!0)},disable:function(){this.toggle(!1)},toggle:function(a){a===b&&(a=!this.options.enabled),this.options.enabled!==a&&this._toggle(a)},_toggle:function(a){this.options.enabled=a,this.element.toggleClass("ui-rangeSlider-disabled",!a);var b=a?"enable":"disable";this._bar(b),this._leftHandle(b),this._rightHandle(b),this._leftLabel(b),this._rightLabel(b)},destroy:function(){this.element.removeClass("ui-rangeSlider-withArrows ui-rangeSlider-noArrow ui-rangeSlider-disabled"),this._destroyWidgets(),this._destroyElements(),this.element.removeClass("ui-rangeSlider"),this.options=null,a(window).unbind("resize",this._resizeProxy),this._resizeProxy=null,this._bindResize=null,this._super()},_destroyWidget:function(a){this["_"+a]("destroy"),this[a].remove(),this[a]=null},_destroyWidgets:function(){this._destroyWidget("bar"),this._destroyWidget("leftHandle"),this._destroyWidget("rightHandle"),this._destroyRuler(),this._destroyLabels()},_destroyElements:function(){this.container.remove(),this.container=null,this.innerBar.remove(),this.innerBar=null,this.arrows.left.remove(),this.arrows.right.remove(),this.arrows=null}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSliderHandle",a.ui.rangeSliderDraggable,{currentMove:null,margin:0,parentElement:null,options:{isLeft:!0,bounds:{min:0,max:100},range:!1,value:0,step:!1},_value:0,_left:0,_create:function(){this._super(),this.element.css("position","absolute").css("top",0).addClass("ui-rangeSlider-handle").toggleClass("ui-rangeSlider-leftHandle",this.options.isLeft).toggleClass("ui-rangeSlider-rightHandle",!this.options.isLeft),this.element.append("
"),this._value=this._constraintValue(this.options.value)},destroy:function(){this.element.empty(),this._super()},_setOption:function(a,b){"isLeft"!==a||b!==!0&&b!==!1||b===this.options.isLeft?"step"===a&&this._checkStep(b)?(this.options.step=b,this.update()):"bounds"===a?(this.options.bounds=b,this.update()):"range"===a&&this._checkRange(b)?(this.options.range=b,this.update()):"symmetricPositionning"===a&&(this.options.symmetricPositionning=b===!0,this.update()):(this.options.isLeft=b,this.element.toggleClass("ui-rangeSlider-leftHandle",this.options.isLeft).toggleClass("ui-rangeSlider-rightHandle",!this.options.isLeft),this._position(this._value),this.element.trigger("switch",this.options.isLeft)),this._super(a,b)},_checkRange:function(a){return a===!1||!this._isValidValue(a.min)&&!this._isValidValue(a.max)},_isValidValue:function(a){return"undefined"!=typeof a&&a!==!1&&parseFloat(a)!==a},_checkStep:function(a){return a===!1||parseFloat(a)===a},_initElement:function(){this._super(),0===this.cache.parent.width||null===this.cache.parent.width?setTimeout(a.proxy(this._initElementIfNotDestroyed,this),500):(this._position(this._value),this._triggerMouseEvent("initialize"))},_bounds:function(){return this.options.bounds},_cache:function(){this._super(),this._cacheParent()},_cacheParent:function(){var a=this.element.parent();this.cache.parent={element:a,offset:a.offset(),padding:{left:this._parsePixels(a,"paddingLeft")},width:a.width()}},_position:function(a){var b=this._getPositionForValue(a);this._applyPosition(b)},_constraintPosition:function(a){var b=this._getValueForPosition(a);return this._getPositionForValue(b)},_applyPosition:function(a){this._super(a),this._left=a,this._setValue(this._getValueForPosition(a)),this._triggerMouseEvent("moving")},_prepareEventData:function(){var a=this._super();return a.value=this._value,a},_setValue:function(a){a!==this._value&&(this._value=a)},_constraintValue:function(a){if(a=Math.min(a,this._bounds().max),a=Math.max(a,this._bounds().min),a=this._round(a),this.options.range!==!1){var b=this.options.range.min||!1,c=this.options.range.max||!1;b!==!1&&(a=Math.max(a,this._round(b))),c!==!1&&(a=Math.min(a,this._round(c))),a=Math.min(a,this._bounds().max),a=Math.max(a,this._bounds().min)}return a},_round:function(a){return this.options.step!==!1&&this.options.step>0?Math.round(a/this.options.step)*this.options.step:a},_getPositionForValue:function(a){if(!this.cache||!this.cache.parent||null===this.cache.parent.offset)return 0;a=this._constraintValue(a);var b=(a-this.options.bounds.min)/(this.options.bounds.max-this.options.bounds.min),c=this.cache.parent.width,d=this.cache.parent.offset.left,e=this.options.isLeft?0:this.cache.width.outer;return this.options.symmetricPositionning?b*(c-2*this.cache.width.outer)+d+e:b*c+d-e},_getValueForPosition:function(a){var b=this._getRawValueForPositionAndBounds(a,this.options.bounds.min,this.options.bounds.max);return this._constraintValue(b)},_getRawValueForPositionAndBounds:function(a,b,c){var d,e,f=null===this.cache.parent.offset?0:this.cache.parent.offset.left;return this.options.symmetricPositionning?(a-=this.options.isLeft?0:this.cache.width.outer,d=this.cache.parent.width-2*this.cache.width.outer):(a+=this.options.isLeft?0:this.cache.width.outer,d=this.cache.parent.width),0===d?this._value:(e=(a-f)/d,e*(c-b)+b)},value:function(a){return"undefined"!=typeof a&&(this._cache(),a=this._constraintValue(a),this._position(a)),this._value},update:function(){this._cache();var a=this._constraintValue(this._value),b=this._getPositionForValue(a);a!==this._value?(this._triggerMouseEvent("updating"),this._position(a),this._triggerMouseEvent("update")):b!==this.cache.offset.left&&(this._triggerMouseEvent("updating"),this._position(a),this._triggerMouseEvent("update"))},position:function(a){return"undefined"!=typeof a&&(this._cache(),a=this._constraintPosition(a),this._applyPosition(a)),this._left},add:function(a,b){return a+b},substract:function(a,b){return a-b},stepsBetween:function(a,b){return this.options.step===!1?b-a:(b-a)/this.options.step},multiplyStep:function(a,b){return a*b},moveRight:function(a){var b;return this.options.step===!1?(b=this._left,this.position(this._left+a),this._left-b):(b=this._value,this.value(this.add(b,this.multiplyStep(this.options.step,a))),this.stepsBetween(b,this._value))},moveLeft:function(a){return-this.moveRight(-a)},stepRatio:function(){if(this.options.step===!1)return 1;var a=(this.options.bounds.max-this.options.bounds.min)/this.options.step;return this.cache.parent.width/a}})}(jQuery),function(a,b){"use strict";function c(a,b){return"undefined"==typeof a?b||!1:a}a.widget("ui.rangeSliderBar",a.ui.rangeSliderDraggable,{options:{leftHandle:null,rightHandle:null,bounds:{min:0,max:100},type:"rangeSliderHandle",range:!1,drag:function(){},stop:function(){},values:{min:0,max:20},wheelSpeed:4,wheelMode:null},_values:{min:0,max:20},_waitingToInit:2,_wheelTimeout:!1,_create:function(){this._super(),this.element.css("position","absolute").css("top",0).addClass("ui-rangeSlider-bar"),this.options.leftHandle.bind("initialize",a.proxy(this._onInitialized,this)).bind("mousestart",a.proxy(this._cache,this)).bind("stop",a.proxy(this._onHandleStop,this)),this.options.rightHandle.bind("initialize",a.proxy(this._onInitialized,this)).bind("mousestart",a.proxy(this._cache,this)).bind("stop",a.proxy(this._onHandleStop,this)),this._bindHandles(),this._values=this.options.values,this._setWheelModeOption(this.options.wheelMode)},destroy:function(){this.options.leftHandle.unbind(".bar"),this.options.rightHandle.unbind(".bar"),this.options=null,this._super()},_setOption:function(a,b){"range"===a?this._setRangeOption(b):"wheelSpeed"===a?this._setWheelSpeedOption(b):"wheelMode"===a&&this._setWheelModeOption(b)},_setRangeOption:function(a){if(("object"!=typeof a||null===a)&&(a=!1),a!==!1||this.options.range!==!1){if(a!==!1){var b=c(a.min,this.options.range.min),d=c(a.max,this.options.range.max);this.options.range={min:b,max:d}}else this.options.range=!1;this._setLeftRange(),this._setRightRange()}},_setWheelSpeedOption:function(a){"number"==typeof a&&0!==a&&(this.options.wheelSpeed=a)},_setWheelModeOption:function(a){(null===a||a===!1||"zoom"===a||"scroll"===a)&&(this.options.wheelMode!==a&&this.element.parent().unbind("mousewheel.bar"),this._bindMouseWheel(a),this.options.wheelMode=a)},_bindMouseWheel:function(b){"zoom"===b?this.element.parent().bind("mousewheel.bar",a.proxy(this._mouseWheelZoom,this)):"scroll"===b&&this.element.parent().bind("mousewheel.bar",a.proxy(this._mouseWheelScroll,this))},_setLeftRange:function(){if(this.options.range===!1)return!1;var a=this._values.max,b={min:!1,max:!1};"undefined"!=typeof this.options.range.min&&this.options.range.min!==!1?b.max=this._leftHandle("substract",a,this.options.range.min):b.max=!1,"undefined"!=typeof this.options.range.max&&this.options.range.max!==!1?b.min=this._leftHandle("substract",a,this.options.range.max):b.min=!1,this._leftHandle("option","range",b)},_setRightRange:function(){var a=this._values.min,b={min:!1,max:!1};"undefined"!=typeof this.options.range.min&&this.options.range.min!==!1?b.min=this._rightHandle("add",a,this.options.range.min):b.min=!1,"undefined"!=typeof this.options.range.max&&this.options.range.max!==!1?b.max=this._rightHandle("add",a,this.options.range.max):b.max=!1,this._rightHandle("option","range",b)},_deactivateRange:function(){this._leftHandle("option","range",!1),this._rightHandle("option","range",!1)},_reactivateRange:function(){this._setRangeOption(this.options.range)},_onInitialized:function(){this._waitingToInit--,0===this._waitingToInit&&this._initMe()},_initMe:function(){this._cache(),this.min(this._values.min),this.max(this._values.max);var a=this._leftHandle("position"),b=this._rightHandle("position")+this.options.rightHandle.width();this.element.offset({left:a}),this.element.css("width",b-a)},_leftHandle:function(){return this._handleProxy(this.options.leftHandle,arguments)},_rightHandle:function(){return this._handleProxy(this.options.rightHandle,arguments)},_handleProxy:function(a,b){var c=Array.prototype.slice.call(b);return a[this.options.type].apply(a,c)},_cache:function(){this._super(),this._cacheHandles()},_cacheHandles:function(){this.cache.rightHandle={},this.cache.rightHandle.width=this.options.rightHandle.width(),this.cache.rightHandle.offset=this.options.rightHandle.offset(),this.cache.leftHandle={},this.cache.leftHandle.offset=this.options.leftHandle.offset()},_mouseStart:function(a){this._super(a),this._deactivateRange()},_mouseStop:function(a){this._super(a),this._cacheHandles(),this._values.min=this._leftHandle("value"),this._values.max=this._rightHandle("value"),this._reactivateRange(),this._leftHandle().trigger("stop"),this._rightHandle().trigger("stop")},_onDragLeftHandle:function(a,b){if(this._cacheIfNecessary(),b.element[0]===this.options.leftHandle[0]){if(this._switchedValues())return this._switchHandles(),void this._onDragRightHandle(a,b);this._values.min=b.value,this.cache.offset.left=b.offset.left,this.cache.leftHandle.offset=b.offset,this._positionBar()}},_onDragRightHandle:function(a,b){if(this._cacheIfNecessary(),b.element[0]===this.options.rightHandle[0]){if(this._switchedValues())return this._switchHandles(),void this._onDragLeftHandle(a,b);this._values.max=b.value,this.cache.rightHandle.offset=b.offset,this._positionBar()}},_positionBar:function(){var a=this.cache.rightHandle.offset.left+this.cache.rightHandle.width-this.cache.leftHandle.offset.left;this.cache.width.inner=a,this.element.css("width",a).offset({left:this.cache.leftHandle.offset.left})},_onHandleStop:function(){this._setLeftRange(),this._setRightRange()},_switchedValues:function(){if(this.min()>this.max()){var a=this._values.min;return this._values.min=this._values.max,this._values.max=a,!0}return!1},_switchHandles:function(){var a=this.options.leftHandle;this.options.leftHandle=this.options.rightHandle,this.options.rightHandle=a,this._leftHandle("option","isLeft",!0),this._rightHandle("option","isLeft",!1),this._bindHandles(),this._cacheHandles()},_bindHandles:function(){this.options.leftHandle.unbind(".bar").bind("sliderDrag.bar update.bar moving.bar",a.proxy(this._onDragLeftHandle,this)),this.options.rightHandle.unbind(".bar").bind("sliderDrag.bar update.bar moving.bar",a.proxy(this._onDragRightHandle,this))},_constraintPosition:function(a){var b,c={};return c.left=this._super(a),c.left=this._leftHandle("position",c.left),b=this._rightHandle("position",c.left+this.cache.width.outer-this.cache.rightHandle.width),c.width=b-c.left+this.cache.rightHandle.width,c},_applyPosition:function(a){this._super(a.left),this.element.width(a.width)},_mouseWheelZoom:function(b,c,d,e){if(!this.enabled)return!1;var f=this._values.min+(this._values.max-this._values.min)/2,g={},h={};return this.options.range===!1||this.options.range.min===!1?(g.max=f,h.min=f):(g.max=f-this.options.range.min/2,h.min=f+this.options.range.min/2),this.options.range!==!1&&this.options.range.max!==!1&&(g.min=f-this.options.range.max/2,h.max=f+this.options.range.max/2),this._leftHandle("option","range",g),this._rightHandle("option","range",h),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(a.proxy(this._wheelStop,this),200),this.zoomIn(e*this.options.wheelSpeed),!1},_mouseWheelScroll:function(b,c,d,e){return this.enabled?(this._wheelTimeout===!1?this.startScroll():clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(a.proxy(this._wheelStop,this),200),this.scrollLeft(e*this.options.wheelSpeed),!1):!1},_wheelStop:function(){this.stopScroll(),this._wheelTimeout=!1},min:function(a){return this._leftHandle("value",a)},max:function(a){return this._rightHandle("value",a)},startScroll:function(){this._deactivateRange()},stopScroll:function(){this._reactivateRange(),this._triggerMouseEvent("stop"),this._leftHandle().trigger("stop"),this._rightHandle().trigger("stop")},scrollLeft:function(a){return a=a||1,0>a?this.scrollRight(-a):(a=this._leftHandle("moveLeft",a),this._rightHandle("moveLeft",a),this.update(),void this._triggerMouseEvent("scroll"))},scrollRight:function(a){return a=a||1,0>a?this.scrollLeft(-a):(a=this._rightHandle("moveRight",a),this._leftHandle("moveRight",a),this.update(),void this._triggerMouseEvent("scroll"))},zoomIn:function(a){if(a=a||1,0>a)return this.zoomOut(-a);var b=this._rightHandle("moveLeft",a);a>b&&(b/=2,this._rightHandle("moveRight",b)),this._leftHandle("moveRight",b),this.update(),this._triggerMouseEvent("zoom")},zoomOut:function(a){if(a=a||1,0>a)return this.zoomIn(-a);var b=this._rightHandle("moveRight",a);a>b&&(b/=2,this._rightHandle("moveLeft",b)),this._leftHandle("moveLeft",b),this.update(),this._triggerMouseEvent("zoom")},values:function(a,b){if("undefined"!=typeof a&&"undefined"!=typeof b){var c=Math.min(a,b),d=Math.max(a,b);this._deactivateRange(),this.options.leftHandle.unbind(".bar"),this.options.rightHandle.unbind(".bar"),this._values.min=this._leftHandle("value",c),this._values.max=this._rightHandle("value",d),this._bindHandles(),this._reactivateRange(),this.update()}return{min:this._values.min,max:this._values.max}},update:function(){this._values.min=this.min(),this._values.max=this.max(),this._cache(),this._positionBar()}})}(jQuery),function(a,b){"use strict";function c(b,c,d,e){this.label1=b,this.label2=c,this.type=d,this.options=e,this.handle1=this.label1[this.type]("option","handle"),this.handle2=this.label2[this.type]("option","handle"),this.cache=null,this.left=b,this.right=c,this.moving=!1,this.initialized=!1,this.updating=!1,this.Init=function(){this.BindHandle(this.handle1),this.BindHandle(this.handle2),"show"===this.options.show?(setTimeout(a.proxy(this.PositionLabels,this),1), +this.initialized=!0):setTimeout(a.proxy(this.AfterInit,this),1e3),this._resizeProxy=a.proxy(this.onWindowResize,this),a(window).resize(this._resizeProxy)},this.Destroy=function(){this._resizeProxy&&(a(window).unbind("resize",this._resizeProxy),this._resizeProxy=null,this.handle1.unbind(".positionner"),this.handle1=null,this.handle2.unbind(".positionner"),this.handle2=null,this.label1=null,this.label2=null,this.left=null,this.right=null),this.cache=null},this.AfterInit=function(){this.initialized=!0},this.Cache=function(){"none"!==this.label1.css("display")&&(this.cache={},this.cache.label1={},this.cache.label2={},this.cache.handle1={},this.cache.handle2={},this.cache.offsetParent={},this.CacheElement(this.label1,this.cache.label1),this.CacheElement(this.label2,this.cache.label2),this.CacheElement(this.handle1,this.cache.handle1),this.CacheElement(this.handle2,this.cache.handle2),this.CacheElement(this.label1.offsetParent(),this.cache.offsetParent))},this.CacheIfNecessary=function(){null===this.cache?this.Cache():(this.CacheWidth(this.label1,this.cache.label1),this.CacheWidth(this.label2,this.cache.label2),this.CacheHeight(this.label1,this.cache.label1),this.CacheHeight(this.label2,this.cache.label2),this.CacheWidth(this.label1.offsetParent(),this.cache.offsetParent))},this.CacheElement=function(a,b){this.CacheWidth(a,b),this.CacheHeight(a,b),b.offset=a.offset(),b.margin={left:this.ParsePixels("marginLeft",a),right:this.ParsePixels("marginRight",a)},b.border={left:this.ParsePixels("borderLeftWidth",a),right:this.ParsePixels("borderRightWidth",a)}},this.CacheWidth=function(a,b){b.width=a.width(),b.outerWidth=a.outerWidth()},this.CacheHeight=function(a,b){b.outerHeightMargin=a.outerHeight(!0)},this.ParsePixels=function(a,b){return parseInt(b.css(a),10)||0},this.BindHandle=function(b){b.bind("updating.positionner",a.proxy(this.onHandleUpdating,this)),b.bind("update.positionner",a.proxy(this.onHandleUpdated,this)),b.bind("moving.positionner",a.proxy(this.onHandleMoving,this)),b.bind("stop.positionner",a.proxy(this.onHandleStop,this))},this.PositionLabels=function(){if(this.CacheIfNecessary(),null!==this.cache){var a=this.GetRawPosition(this.cache.label1,this.cache.handle1),b=this.GetRawPosition(this.cache.label2,this.cache.handle2);this.label1[d]("option","isLeft")?this.ConstraintPositions(a,b):this.ConstraintPositions(b,a),this.PositionLabel(this.label1,a.left,this.cache.label1),this.PositionLabel(this.label2,b.left,this.cache.label2)}},this.PositionLabel=function(a,b,c){var d,e,f,g=this.cache.offsetParent.offset.left+this.cache.offsetParent.border.left;g-b>=0?(a.css("right",""),a.offset({left:b})):(d=g+this.cache.offsetParent.width,e=b+c.margin.left+c.outerWidth+c.margin.right,f=d-e,a.css("left",""),a.css("right",f))},this.ConstraintPositions=function(a,b){(a.centerb.outerLeft||a.center>b.center&&b.outerRight>a.outerLeft)&&(a=this.getLeftPosition(a,b),b=this.getRightPosition(a,b))},this.getLeftPosition=function(a,b){var c=(b.center+a.center)/2,d=c-a.cache.outerWidth-a.cache.margin.right+a.cache.border.left;return a.left=d,a},this.getRightPosition=function(a,b){var c=(b.center+a.center)/2;return b.left=c+b.cache.margin.left+b.cache.border.left,b},this.ShowIfNecessary=function(){"show"===this.options.show||this.moving||!this.initialized||this.updating||(this.label1.stop(!0,!0).fadeIn(this.options.durationIn||0),this.label2.stop(!0,!0).fadeIn(this.options.durationIn||0),this.moving=!0)},this.HideIfNeeded=function(){this.moving===!0&&(this.label1.stop(!0,!0).delay(this.options.delayOut||0).fadeOut(this.options.durationOut||0),this.label2.stop(!0,!0).delay(this.options.delayOut||0).fadeOut(this.options.durationOut||0),this.moving=!1)},this.onHandleMoving=function(a,b){this.ShowIfNecessary(),this.CacheIfNecessary(),this.UpdateHandlePosition(b),this.PositionLabels()},this.onHandleUpdating=function(){this.updating=!0},this.onHandleUpdated=function(){this.updating=!1,this.cache=null},this.onHandleStop=function(){this.HideIfNeeded()},this.onWindowResize=function(){this.cache=null},this.UpdateHandlePosition=function(a){null!==this.cache&&(a.element[0]===this.handle1[0]?this.UpdatePosition(a,this.cache.handle1):this.UpdatePosition(a,this.cache.handle2))},this.UpdatePosition=function(a,b){b.offset=a.offset,b.value=a.value},this.GetRawPosition=function(a,b){var c=b.offset.left+b.outerWidth/2,d=c-a.outerWidth/2,e=d+a.outerWidth-a.border.left-a.border.right,f=d-a.margin.left-a.border.left,g=b.offset.top-a.outerHeightMargin;return{left:d,outerLeft:f,top:g,right:e,outerRight:f+a.outerWidth+a.margin.left+a.margin.right,cache:a,center:c}},this.Init()}a.widget("ui.rangeSliderLabel",a.ui.rangeSliderMouseTouch,{options:{handle:null,formatter:!1,handleType:"rangeSliderHandle",show:"show",durationIn:0,durationOut:500,delayOut:500,isLeft:!1},cache:null,_positionner:null,_valueContainer:null,_innerElement:null,_value:null,_create:function(){this.options.isLeft=this._handle("option","isLeft"),this.element.addClass("ui-rangeSlider-label").css("position","absolute").css("display","block"),this._createElements(),this._toggleClass(),this.options.handle.bind("moving.label",a.proxy(this._onMoving,this)).bind("update.label",a.proxy(this._onUpdate,this)).bind("switch.label",a.proxy(this._onSwitch,this)),"show"!==this.options.show&&this.element.hide(),this._mouseInit()},destroy:function(){this.options.handle.unbind(".label"),this.options.handle=null,this._valueContainer=null,this._innerElement=null,this.element.empty(),this._positionner&&(this._positionner.Destroy(),this._positionner=null),this._super()},_createElements:function(){this._valueContainer=a("
").appendTo(this.element),this._innerElement=a("
").appendTo(this.element)},_handle:function(){var a=Array.prototype.slice.apply(arguments);return this.options.handle[this.options.handleType].apply(this.options.handle,a)},_setOption:function(a,b){"show"===a?this._updateShowOption(b):("durationIn"===a||"durationOut"===a||"delayOut"===a)&&this._updateDurations(a,b),this._setFormatterOption(a,b)},_setFormatterOption:function(a,b){"formatter"===a&&("function"==typeof b||b===!1)&&(this.options.formatter=b,this._display(this._value))},_updateShowOption:function(a){this.options.show=a,"show"!==this.options.show?(this.element.hide(),this._positionner.moving=!1):(this.element.show(),this._display(this.options.handle[this.options.handleType]("value")),this._positionner.PositionLabels()),this._positionner.options.show=this.options.show},_updateDurations:function(a,b){parseInt(b,10)===b&&(this._positionner.options[a]=b,this.options[a]=b)},_display:function(a){this.options.formatter===!1?this._displayText(Math.round(a)):this._displayText(this.options.formatter(a,this.options.isLeft)),this._value=a},_displayText:function(a){this._valueContainer.text(a)},_toggleClass:function(){this.element.toggleClass("ui-rangeSlider-leftLabel",this.options.isLeft).toggleClass("ui-rangeSlider-rightLabel",!this.options.isLeft)},_positionLabels:function(){this._positionner.PositionLabels()},_mouseDown:function(a){this.options.handle.trigger(a)},_mouseUp:function(a){this.options.handle.trigger(a)},_mouseMove:function(a){this.options.handle.trigger(a)},_onMoving:function(a,b){this._display(b.value)},_onUpdate:function(){"show"===this.options.show&&this.update()},_onSwitch:function(a,b){this.options.isLeft=b,this._toggleClass(),this._positionLabels()},pair:function(a){null===this._positionner&&(this._positionner=new c(this.element,a,this.widgetName,{show:this.options.show,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}),a[this.widgetName]("positionner",this._positionner))},positionner:function(a){return"undefined"!=typeof a&&(this._positionner=a),this._positionner},update:function(){this._positionner.cache=null,this._display(this._handle("value")),"show"===this.options.show&&this._positionLabels()}})}(jQuery),function(a){"use strict";var b={first:function(a){return a},next:function(a){return a+1},format:function(){},label:function(a){return Math.round(a)},stop:function(){return!1}};a.widget("ui.ruler",{options:{min:0,max:100,scales:[]},_create:function(){this.element.addClass("ui-ruler"),this._createScales()},destroy:function(){this.element.removeClass("ui-ruler"),this.element.empty(),this._super()},_regenerate:function(){this.element.empty(),this._createScales()},_setOption:function(a,b){return"min"===a||"max"===a&&b!==this.options[a]?(this.options[a]=b,void this._regenerate()):"scales"===a&&b instanceof Array?(this.options.scales=b,void this._regenerate()):void 0},_createScales:function(){if(this.options.max!==this.options.min)for(var a=0;a").appendTo(this.element);f.addClass("ui-ruler-scale"+d),this._createTicks(f,e)},_createTicks:function(a,b){var c,d,e,f=b.first(this.options.min,this.options.max),g=this.options.max-this.options.min,h=!0;do c=f,f=b.next(c),d=(Math.min(f,this.options.max)-Math.max(c,this.options.min))/g,e=this._createTick(c,f,b),a.append(e),e.css("width",100*d+"%"),h&&c>this.options.min&&e.css("margin-left",100*(c-this.options.min)/g+"%"),h=!1;while(!this._stop(b,f))},_stop:function(a,b){return a.stop(b)||b>=this.options.max},_createTick:function(b,c,d){var e=a("
"),f=a("
").appendTo(e),g=a("").appendTo(f);return g.text(d.label(b,c)),d.format(e,b,c),e}})}(jQuery); \ No newline at end of file diff --git a/app/assets/vendored/lib/jqrangeslider/lib/jquery.mousewheel.license.txt b/app/assets/vendored/lib/jqrangeslider/lib/jquery.mousewheel.license.txt new file mode 100644 index 000000000..d3d21c42b --- /dev/null +++ b/app/assets/vendored/lib/jqrangeslider/lib/jquery.mousewheel.license.txt @@ -0,0 +1,20 @@ +Copyright 2011, Brandon Aaron (http://brandonaaron.net/) + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/app/assets/vendored/lib/jqrangeslider/lib/jquery.mousewheel.min.js b/app/assets/vendored/lib/jqrangeslider/lib/jquery.mousewheel.min.js new file mode 100644 index 000000000..3390202a2 --- /dev/null +++ b/app/assets/vendored/lib/jqrangeslider/lib/jquery.mousewheel.min.js @@ -0,0 +1,12 @@ +/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net) + * Licensed under the MIT License (LICENSE.txt). + * + * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. + * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. + * Thanks to: Seamus Leahy for adding deltaX and deltaY + * + * Version: 3.0.6 + * + * Requires: 1.2.2+ + */ +(function(a){function d(b){var c=b||window.event,d=[].slice.call(arguments,1),e=0,f=!0,g=0,h=0;return b=a.event.fix(c),b.type="mousewheel",c.wheelDelta&&(e=c.wheelDelta/120),c.detail&&(e=-c.detail/3),h=e,c.axis!==undefined&&c.axis===c.HORIZONTAL_AXIS&&(h=0,g=-1*e),c.wheelDeltaY!==undefined&&(h=c.wheelDeltaY/120),c.wheelDeltaX!==undefined&&(g=-1*c.wheelDeltaX/120),d.unshift(b,e,g,h),(a.event.dispatch||a.event.handle).apply(this,d)}var b=["DOMMouseScroll","mousewheel"];if(a.event.fixHooks)for(var c=b.length;c;)a.event.fixHooks[b[--c]]=a.event.mouseHooks;a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=b.length;a;)this.addEventListener(b[--a],d,!1);else this.onmousewheel=d},teardown:function(){if(this.removeEventListener)for(var a=b.length;a;)this.removeEventListener(b[--a],d,!1);else this.onmousewheel=null}},a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery) diff --git a/app/com/arpnetworking/kairos/client/KairosDbClientImpl.java b/app/com/arpnetworking/kairos/client/KairosDbClientImpl.java index 08af5fc7a..560eb8989 100644 --- a/app/com/arpnetworking/kairos/client/KairosDbClientImpl.java +++ b/app/com/arpnetworking/kairos/client/KairosDbClientImpl.java @@ -15,18 +15,6 @@ */ package com.arpnetworking.kairos.client; -import akka.actor.ActorSystem; -import akka.http.javadsl.Http; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.headers.AcceptEncoding; -import akka.http.javadsl.model.headers.HttpEncoding; -import akka.http.javadsl.model.headers.HttpEncodings; -import akka.http.scaladsl.coding.Coder; -import akka.http.scaladsl.coding.Deflate$; -import akka.http.scaladsl.coding.Gzip$; -import akka.http.scaladsl.coding.NoCoding$; -import akka.stream.ActorMaterializer; import com.arpnetworking.commons.builder.OvalBuilder; import com.arpnetworking.kairos.client.models.MetricDataPoints; import com.arpnetworking.kairos.client.models.MetricNamesResponse; @@ -48,8 +36,18 @@ import com.fasterxml.jackson.databind.type.TypeFactory; import com.google.common.collect.ImmutableList; import net.sf.oval.constraint.NotNull; -import scala.compat.java8.FutureConverters; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.Http; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.headers.AcceptEncoding; +import org.apache.pekko.http.javadsl.model.headers.HttpEncoding; +import org.apache.pekko.http.javadsl.model.headers.HttpEncodings; +import org.apache.pekko.http.scaladsl.coding.Coder; +import org.apache.pekko.http.scaladsl.coding.Coders; +import org.apache.pekko.stream.Materializer; import scala.concurrent.duration.FiniteDuration; +import scala.jdk.javaapi.FutureConverters; import java.io.IOException; import java.net.URI; @@ -142,20 +140,20 @@ private CompletionStage fireRequest(final HttpRequest request, final Clas private CompletionStage fireRequest(final HttpRequest request, final JavaType responseType) { final Instant startTime = Instant.now(); - return _http.singleRequest(request.addHeader(AcceptEncoding.create(HttpEncodings.GZIP)), _materializer) + return _http.singleRequest(request.addHeader(AcceptEncoding.create(HttpEncodings.GZIP))) .thenCompose(httpResponse -> { final HttpEncoding encoding = httpResponse.encoding(); final Coder flow; if (HttpEncodings.GZIP.equals(encoding)) { - flow = Gzip$.MODULE$; + flow = Coders.Gzip(); } else if (HttpEncodings.DEFLATE.equals(encoding)) { - flow = Deflate$.MODULE$; + flow = Coders.Deflate(); } else { - flow = NoCoding$.MODULE$; + flow = Coders.NoCoding(); } if (!httpResponse.status().isSuccess()) { return httpResponse.entity().toStrict(_readTimeout.toMillis(), _materializer) - .thenCompose(strict -> FutureConverters.toJava(flow.decode(strict.getData(), _materializer))) + .thenCompose(strict -> FutureConverters.asJava(flow.decode(strict.getData(), _materializer))) .thenApply(materializedBody -> { final String responseBody = materializedBody.utf8String(); if (responseBody.isEmpty()) { @@ -175,7 +173,7 @@ private CompletionStage fireRequest(final HttpRequest request, final Java } return httpResponse.entity() .toStrict(_readTimeout.toMillis(), _materializer) - .thenCompose(strict -> FutureConverters.toJava(flow.decode(strict.getData(), _materializer))); + .thenCompose(strict -> FutureConverters.asJava(flow.decode(strict.getData(), _materializer))); }) .thenApply(body -> { try { @@ -200,14 +198,14 @@ private KairosDbClientImpl(final Builder builder) { _uri = builder._uri; _http = Http.get(actorSystem); - _materializer = ActorMaterializer.create(actorSystem); + _materializer = Materializer.createMaterializer(actorSystem); _readTimeout = builder._readTimeout; _metricsFactory = builder._metricsFactory; } private final ObjectMapper _mapper; private final Http _http; - private final ActorMaterializer _materializer; + private final Materializer _materializer; private final URI _uri; private final FiniteDuration _readTimeout; private final MetricsFactory _metricsFactory; diff --git a/app/com/arpnetworking/kairos/client/models/MetricsQuery.java b/app/com/arpnetworking/kairos/client/models/MetricsQuery.java index b01256eb1..d9648301c 100644 --- a/app/com/arpnetworking/kairos/client/models/MetricsQuery.java +++ b/app/com/arpnetworking/kairos/client/models/MetricsQuery.java @@ -340,6 +340,7 @@ protected void reset() { _otherArgs = Maps.newHashMap(); } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", justification = "Method is called by Oval") private boolean validateStart(@Nullable final Instant ignored) { if (_startTime == null) { return _startRelative != null; @@ -348,6 +349,7 @@ private boolean validateStart(@Nullable final Instant ignored) { } } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", justification = "Method is called by Oval") private boolean validateEnd(@Nullable final Instant ignored) { if (_endTime != null) { return _endRelative == null; diff --git a/app/com/arpnetworking/kairos/client/models/TagsQuery.java b/app/com/arpnetworking/kairos/client/models/TagsQuery.java index 6245c1f78..cb9d45d86 100644 --- a/app/com/arpnetworking/kairos/client/models/TagsQuery.java +++ b/app/com/arpnetworking/kairos/client/models/TagsQuery.java @@ -335,6 +335,7 @@ protected void reset() { _otherArgs = Maps.newHashMap(); } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", justification = "Method is called by Oval") private boolean validateStart(@Nullable final Instant ignored) { if (_startTime == null) { return _startRelative != null; @@ -343,6 +344,7 @@ private boolean validateStart(@Nullable final Instant ignored) { } } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", justification = "Method is called by Oval") private boolean validateEnd(@Nullable final Instant ignored) { if (_endTime != null) { return _endRelative == null; diff --git a/app/com/arpnetworking/kairos/config/MetricsQueryConfigImpl.java b/app/com/arpnetworking/kairos/config/MetricsQueryConfigImpl.java index 306b9f5f7..b39bf851a 100644 --- a/app/com/arpnetworking/kairos/config/MetricsQueryConfigImpl.java +++ b/app/com/arpnetworking/kairos/config/MetricsQueryConfigImpl.java @@ -19,8 +19,8 @@ import com.arpnetworking.kairos.client.models.SamplingUnit; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import com.google.inject.Inject; import com.typesafe.config.Config; +import jakarta.inject.Inject; import java.util.List; import java.util.Locale; diff --git a/app/com/arpnetworking/metrics/portal/alerts/impl/AlertExecutionCacheActor.java b/app/com/arpnetworking/metrics/portal/alerts/impl/AlertExecutionCacheActor.java index f2bb19ffb..7e5bd96b3 100644 --- a/app/com/arpnetworking/metrics/portal/alerts/impl/AlertExecutionCacheActor.java +++ b/app/com/arpnetworking/metrics/portal/alerts/impl/AlertExecutionCacheActor.java @@ -15,19 +15,9 @@ */ package com.arpnetworking.metrics.portal.alerts.impl; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.actor.Status; -import akka.pattern.Patterns; -import akka.persistence.AbstractPersistentActorWithTimers; -import akka.persistence.RecoveryCompleted; -import akka.persistence.SaveSnapshotFailure; -import akka.persistence.SaveSnapshotSuccess; -import akka.persistence.SnapshotMetadata; -import akka.persistence.SnapshotOffer; -import com.arpnetworking.commons.akka.AkkaJsonSerializable; import com.arpnetworking.commons.builder.OvalBuilder; import com.arpnetworking.metrics.incubator.PeriodicMetrics; +import com.arpnetworking.notcommons.pekko.PekkoJsonSerializable; import com.arpnetworking.steno.Logger; import com.arpnetworking.steno.LoggerFactory; import com.google.common.base.Objects; @@ -39,8 +29,18 @@ import models.internal.alerts.AlertEvaluationResult; import models.internal.scheduling.JobExecution; import net.sf.oval.constraint.NotNull; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.persistence.AbstractPersistentActorWithTimers; +import org.apache.pekko.persistence.RecoveryCompleted; +import org.apache.pekko.persistence.SaveSnapshotFailure; +import org.apache.pekko.persistence.SaveSnapshotSuccess; +import org.apache.pekko.persistence.SnapshotMetadata; +import org.apache.pekko.persistence.SnapshotOffer; import scala.Option; -import scala.compat.java8.OptionConverters; +import scala.jdk.javaapi.OptionConverters; import java.time.Duration; import java.time.Instant; @@ -214,7 +214,7 @@ public void preStart() throws Exception { LOGGER.info() .setMessage("cache actor starting") .log(); - timers().startPeriodicTimer( + timers().startTimerAtFixedRate( SNAPSHOT_TIMER_KEY, MSG_TAKE_SNAPSHOT, SNAPSHOT_INTERVAL @@ -222,7 +222,7 @@ public void preStart() throws Exception { } @Override - public void postStop() { + public void postStop() throws Exception { super.postStop(); LOGGER.info() .setMessage("cache actor was stopped") @@ -358,7 +358,7 @@ private void handlePut(final CachePut msg) { // Snapshot of the cache for persistence. // // This class exists as a wrapper for serialization purposes only. - private static final class CacheSnapshot implements AkkaJsonSerializable { + private static final class CacheSnapshot implements PekkoJsonSerializable { private final ImmutableList _entries; private CacheSnapshot(final Builder builder) { @@ -384,7 +384,7 @@ public Builder setEntries(final List entries) { } } - private static final class SnapshotEntry implements AkkaJsonSerializable { + private static final class SnapshotEntry implements PekkoJsonSerializable { private final CacheKey _key; private final SuccessfulAlertExecution _value; @@ -423,7 +423,7 @@ public Builder setValue(final SuccessfulAlertExecution value) { } } - private static final class CacheKey implements AkkaJsonSerializable { + private static final class CacheKey implements PekkoJsonSerializable { private final UUID _organizationId; private final UUID _jobId; @@ -480,7 +480,7 @@ public Builder setOrganizationId(final UUID organizationId) { } } - private static final class CacheGet implements AkkaJsonSerializable { + private static final class CacheGet implements PekkoJsonSerializable { private final UUID _jobId; private final UUID _organizationId; @@ -522,7 +522,7 @@ public Builder setOrganizationId(final UUID organizationId) { } } - private static final class CacheGetResponse implements AkkaJsonSerializable { + private static final class CacheGetResponse implements PekkoJsonSerializable { private final Optional _execution; public Optional getExecution() { @@ -549,7 +549,7 @@ public Builder setExecution(final Optional execution) } - private static final class CacheMultiGet implements AkkaJsonSerializable { + private static final class CacheMultiGet implements PekkoJsonSerializable { private final Collection _jobIds; private final UUID _organizationId; @@ -589,7 +589,7 @@ public Builder setOrganizationId(final UUID organizationId) { } } - private static final class CacheMultiGetResponse implements AkkaJsonSerializable { + private static final class CacheMultiGetResponse implements PekkoJsonSerializable { private final ImmutableMap _executions; public ImmutableMap getExecutions() { @@ -616,7 +616,7 @@ public Builder setExecutions(final ImmutableMap } - private static final class CacheMultiPut implements AkkaJsonSerializable { + private static final class CacheMultiPut implements PekkoJsonSerializable { private final UUID _organizationId; private final Collection _executions; @@ -655,7 +655,7 @@ public Builder setExecutions(final ImmutableList execu } } - private static final class CachePut implements AkkaJsonSerializable { + private static final class CachePut implements PekkoJsonSerializable { private final SuccessfulAlertExecution _execution; private final UUID _organizationId; diff --git a/app/com/arpnetworking/metrics/portal/alerts/impl/CachingAlertExecutionRepository.java b/app/com/arpnetworking/metrics/portal/alerts/impl/CachingAlertExecutionRepository.java index 14306be3a..237571361 100644 --- a/app/com/arpnetworking/metrics/portal/alerts/impl/CachingAlertExecutionRepository.java +++ b/app/com/arpnetworking/metrics/portal/alerts/impl/CachingAlertExecutionRepository.java @@ -15,18 +15,19 @@ */ package com.arpnetworking.metrics.portal.alerts.impl; -import akka.actor.ActorRef; import com.arpnetworking.commons.builder.OvalBuilder; -import com.arpnetworking.commons.java.time.TimeAdapters; import com.arpnetworking.metrics.portal.alerts.AlertExecutionRepository; +import com.arpnetworking.notcommons.java.time.TimeAdapters; import com.fasterxml.jackson.annotation.JacksonInject; import com.google.common.base.Predicates; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; +import jakarta.inject.Named; import models.internal.Organization; import models.internal.alerts.AlertEvaluationResult; import models.internal.scheduling.JobExecution; import net.sf.oval.constraint.NotNull; +import org.apache.pekko.actor.ActorRef; import java.time.Duration; import java.time.Instant; @@ -39,7 +40,6 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionStage; import java.util.stream.Stream; -import javax.inject.Named; /** * An alert repository wrapper that caches the most recent successful results. diff --git a/app/com/arpnetworking/metrics/portal/alerts/impl/DailyPartitionCreator.java b/app/com/arpnetworking/metrics/portal/alerts/impl/DailyPartitionCreator.java index 45404e396..6db5452fa 100644 --- a/app/com/arpnetworking/metrics/portal/alerts/impl/DailyPartitionCreator.java +++ b/app/com/arpnetworking/metrics/portal/alerts/impl/DailyPartitionCreator.java @@ -16,12 +16,6 @@ package com.arpnetworking.metrics.portal.alerts.impl; -import akka.actor.AbstractActorWithTimers; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.actor.Status; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.Patterns; import com.arpnetworking.commons.builder.OvalBuilder; import com.arpnetworking.metrics.incubator.PeriodicMetrics; import com.arpnetworking.metrics.portal.scheduling.Schedule; @@ -30,13 +24,22 @@ import com.arpnetworking.steno.LoggerFactory; import com.google.common.collect.Sets; import edu.umd.cs.findbugs.annotations.Nullable; -import io.ebean.EbeanServer; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; +import io.ebean.Database; import io.ebean.SqlRow; import io.ebean.Transaction; +import jakarta.persistence.PersistenceException; +import org.apache.pekko.actor.AbstractActorWithTimers; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.Patterns; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; +import java.sql.Statement; import java.time.Clock; import java.time.Duration; import java.time.Instant; @@ -49,8 +52,6 @@ import java.util.Set; import java.util.concurrent.CompletionStage; import java.util.concurrent.TimeUnit; -import java.util.stream.Collectors; -import javax.persistence.PersistenceException; /** * An actor that will periodically create table partitions. @@ -63,7 +64,7 @@ public class DailyPartitionCreator extends AbstractActorWithTimers { private static final Duration TICK_INTERVAL = Duration.ofMinutes(1); private static final String TICKER_NAME = "PERIODIC_TICK"; - private final EbeanServer _ebeanServer; + private final Database _ebeanServer; private final PeriodicMetrics _periodicMetrics; private final Set _partitionCache; @@ -76,7 +77,7 @@ public class DailyPartitionCreator extends AbstractActorWithTimers { private Optional _lastRun; private DailyPartitionCreator( - final EbeanServer ebeanServer, + final Database ebeanServer, final PeriodicMetrics periodicMetrics, final String schema, final String table, @@ -89,7 +90,7 @@ private DailyPartitionCreator( // CHECKSTYLE.OFF: ParameterNumber /* package private */ DailyPartitionCreator( - final EbeanServer ebeanServer, + final Database ebeanServer, final PeriodicMetrics periodicMetrics, final String schema, final String table, @@ -129,7 +130,7 @@ private DailyPartitionCreator( * @return A new Props. */ public static Props props( - final EbeanServer ebeanServer, + final Database ebeanServer, final PeriodicMetrics periodicMetrics, final String schema, final String table, @@ -185,7 +186,7 @@ public void preStart() { .addData("lookahead", _lookaheadDays) .log(); getSelf().tell(TICK, getSelf()); - getTimers().startPeriodicTimer(TICKER_NAME, TICK, TICK_INTERVAL); + getTimers().startTimerAtFixedRate(TICKER_NAME, TICK, TICK_INTERVAL); } @@ -314,6 +315,7 @@ private void updateCache(final LocalDate start, final LocalDate end) { * @param startDate the start date, inclusive. * @param endDate the end date, exclusive. */ + @SuppressFBWarnings(value = "SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE", justification = "This is a strictly controlled set of strings.") protected void execute( final String schema, final String table, @@ -332,7 +334,7 @@ protected void execute( // TODO(cbriones): Move DB operation off the dispatcher thread pool. final String sql = "SELECT portal.create_daily_partition(?, ?, ?, ?);"; try (Transaction tx = _ebeanServer.beginTransaction()) { - final Connection conn = tx.getConnection(); + final Connection conn = tx.connection(); try (PreparedStatement stmt = conn.prepareStatement(sql)) { stmt.setString(1, schema); stmt.setString(2, table); @@ -342,7 +344,7 @@ protected void execute( } final List partitionTables = _ebeanServer - .createSqlQuery("SELECT table_name from information_schema.tables where table_schema = ? and " + .sqlQuery("SELECT table_name from information_schema.tables where table_schema = ? and " + "table_name LIKE ? order by table_name") .setParameter(1, schema) .setParameter(2, table + "_%") @@ -352,16 +354,15 @@ protected void execute( final List toDelete = partitionTables.stream() .limit(partitionTables.size() - _retainCount) .map(row -> row.getString("table_name")) - .collect(Collectors.toList()); + .toList(); for (final String tableToDelete : toDelete) { - try (PreparedStatement deleteStmt = conn.prepareStatement("DROP TABLE IF EXISTS ?")) { - deleteStmt.setString(1, schema + "." + tableToDelete); - deleteStmt.execute(); + try (Statement deleteStmt = conn.createStatement()) { + deleteStmt.execute(String.format("DROP TABLE IF EXISTS \"%s\".\"%s\"", schema, tableToDelete)); LOGGER.debug().setMessage("Deleted old partition table") + .addData("schema", schema) .addData("tableName", tableToDelete) .log(); } - } } tx.commit(); diff --git a/app/com/arpnetworking/metrics/portal/alerts/impl/DatabaseAlertExecutionRepository.java b/app/com/arpnetworking/metrics/portal/alerts/impl/DatabaseAlertExecutionRepository.java index 68476b975..4ad9f2b56 100644 --- a/app/com/arpnetworking/metrics/portal/alerts/impl/DatabaseAlertExecutionRepository.java +++ b/app/com/arpnetworking/metrics/portal/alerts/impl/DatabaseAlertExecutionRepository.java @@ -15,31 +15,38 @@ */ package com.arpnetworking.metrics.portal.alerts.impl; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.pattern.Patterns; import com.arpnetworking.commons.builder.OvalBuilder; -import com.arpnetworking.commons.java.time.TimeAdapters; import com.arpnetworking.metrics.incubator.PeriodicMetrics; import com.arpnetworking.metrics.portal.alerts.AlertExecutionRepository; import com.arpnetworking.metrics.portal.scheduling.JobExecutionRepository; import com.arpnetworking.metrics.portal.scheduling.impl.DatabaseExecutionHelper; +import com.arpnetworking.notcommons.java.time.TimeAdapters; import com.arpnetworking.steno.Logger; import com.arpnetworking.steno.LoggerFactory; import com.fasterxml.jackson.annotation.JacksonInject; import com.google.common.collect.ImmutableMap; import edu.umd.cs.findbugs.annotations.Nullable; import global.BlockingIOExecutionContext; -import io.ebean.EbeanServer; +import io.ebean.Database; import io.ebean.RawSql; import io.ebean.RawSqlBuilder; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.persistence.EntityNotFoundException; import models.ebean.AlertExecution; import models.internal.Organization; import models.internal.alerts.Alert; import models.internal.alerts.AlertEvaluationResult; import models.internal.scheduling.JobExecution; +import net.sf.oval.constraint.CheckWith; +import net.sf.oval.constraint.CheckWithCheck; +import net.sf.oval.constraint.Min; import net.sf.oval.constraint.NotNull; +import net.sf.oval.context.OValContext; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.pattern.Patterns; import scala.concurrent.duration.FiniteDuration; import java.time.Duration; @@ -57,9 +64,6 @@ import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.Function; -import javax.inject.Inject; -import javax.inject.Named; -import javax.persistence.EntityNotFoundException; /** * Implementation of {@link JobExecutionRepository} for {@link Alert} jobs using a SQL database. @@ -72,7 +76,7 @@ public final class DatabaseAlertExecutionRepository implements AlertExecutionRep private static final Duration ACTOR_STOP_TIMEOUT = Duration.ofSeconds(5); private final AtomicBoolean _isOpen = new AtomicBoolean(false); - private final EbeanServer _ebeanServer; + private final Database _ebeanServer; private final DatabaseExecutionHelper _helper; private static final String ACTOR_NAME = "alertExecutionPartitionCreator"; @@ -85,8 +89,8 @@ public final class DatabaseAlertExecutionRepository implements AlertExecutionRep /** * Public constructor. * - * @param portalServer Play's {@code EbeanServer} for this repository. - * @param partitionServer Play's {@code EbeanServer} for partition creation. + * @param portalServer Play's {@code Database} for this repository. + * @param partitionServer Play's {@code Database} for partition creation. * @param actorSystem The actor system to use. * @param periodicMetrics A metrics instance to record against. * @param partitionManager Partition creation configuration. @@ -94,8 +98,8 @@ public final class DatabaseAlertExecutionRepository implements AlertExecutionRep */ @Inject public DatabaseAlertExecutionRepository( - final EbeanServer portalServer, - final EbeanServer partitionServer, + final Database portalServer, + final Database partitionServer, final ActorSystem actorSystem, final PeriodicMetrics periodicMetrics, final PartitionManager partitionManager, @@ -402,11 +406,11 @@ public static final class Builder extends OvalBuilder { @NotNull + @Min(0) private Integer _lookahead = 7; @NotNull + @Min(1) + @CheckWith(value = RetainMoreThanLookahead.class, message = "Retain count must be greater than or equal to lookahead") private Integer _retainCount = 30; @NotNull private scala.concurrent.duration.Duration _offset = FiniteDuration.apply(0, TimeUnit.SECONDS); @@ -513,6 +520,21 @@ public Builder setOffset(final scala.concurrent.duration.Duration offset) { _offset = offset; return this; } + + private static final class RetainMoreThanLookahead implements CheckWithCheck.SimpleCheck { + @Override + public boolean isSatisfied(final Object obj, final Object val, final OValContext context, + final net.sf.oval.Validator validator) { + if (obj instanceof Builder) { + final Builder builder = (Builder) obj; + return builder._retainCount >= builder._lookahead; + } + + return false; + } + + private static final long serialVersionUID = 1; + } } } diff --git a/app/com/arpnetworking/metrics/portal/alerts/impl/NoAlertRepository.java b/app/com/arpnetworking/metrics/portal/alerts/impl/NoAlertRepository.java index 9c5b8467e..e30152834 100644 --- a/app/com/arpnetworking/metrics/portal/alerts/impl/NoAlertRepository.java +++ b/app/com/arpnetworking/metrics/portal/alerts/impl/NoAlertRepository.java @@ -20,7 +20,7 @@ import com.arpnetworking.steno.LogValueMapFactory; import com.arpnetworking.steno.Logger; import com.arpnetworking.steno.LoggerFactory; -import com.google.inject.Inject; +import jakarta.inject.Inject; import models.internal.AlertQuery; import models.internal.Organization; import models.internal.QueryResult; diff --git a/app/com/arpnetworking/metrics/portal/alerts/impl/PluggableAlertRepository.java b/app/com/arpnetworking/metrics/portal/alerts/impl/PluggableAlertRepository.java index 3fd3d882a..3510d4dd4 100644 --- a/app/com/arpnetworking/metrics/portal/alerts/impl/PluggableAlertRepository.java +++ b/app/com/arpnetworking/metrics/portal/alerts/impl/PluggableAlertRepository.java @@ -15,7 +15,6 @@ */ package com.arpnetworking.metrics.portal.alerts.impl; -import akka.actor.ActorRef; import com.arpnetworking.commons.builder.OvalBuilder; import com.arpnetworking.metrics.incubator.PeriodicMetrics; import com.arpnetworking.metrics.portal.alerts.AlertRepository; @@ -30,11 +29,11 @@ import com.google.common.collect.ImmutableCollection; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import com.google.inject.Inject; import com.google.inject.assistedinject.Assisted; -import com.google.inject.name.Named; import com.typesafe.config.Config; import edu.umd.cs.findbugs.annotations.Nullable; +import jakarta.inject.Inject; +import jakarta.inject.Named; import models.internal.AlertQuery; import models.internal.MetricsQuery; import models.internal.MetricsQueryFormat; @@ -49,6 +48,7 @@ import net.sf.oval.constraint.NotEmpty; import net.sf.oval.constraint.NotNegative; import net.sf.oval.constraint.NotNull; +import org.apache.pekko.actor.ActorRef; import java.io.BufferedInputStream; import java.io.IOException; @@ -214,6 +214,7 @@ public QueryResult queryAlerts(final AlertQuery query) { final ImmutableList alerts = _alerts.values().stream() .filter(containsPredicate) + .filter(alert -> query.getEnabled().isEmpty() || alert.isEnabled() == query.getEnabled().get()) .skip(query.getOffset().orElse(0)) .limit(query.getLimit()) .collect(ImmutableList.toImmutableList()); diff --git a/app/com/arpnetworking/metrics/portal/alerts/scheduling/AlertExecutionContext.java b/app/com/arpnetworking/metrics/portal/alerts/scheduling/AlertExecutionContext.java index 8cce2ca65..7f5a53e8b 100644 --- a/app/com/arpnetworking/metrics/portal/alerts/scheduling/AlertExecutionContext.java +++ b/app/com/arpnetworking/metrics/portal/alerts/scheduling/AlertExecutionContext.java @@ -24,6 +24,8 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Streams; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; +import jakarta.inject.Inject; import models.internal.BoundedMetricsQuery; import models.internal.MetricsQuery; import models.internal.MetricsQueryResult; @@ -47,7 +49,6 @@ import java.util.concurrent.CompletionStage; import java.util.function.Predicate; import java.util.stream.IntStream; -import javax.inject.Inject; /** * Utility class for scheduling and evaluating alerts. @@ -116,8 +117,12 @@ public Schedule getSchedule(final Alert alert) { * @param scheduled The scheduled evaluation time. * @return A completion stage containing {@code AlertEvaluationResult}. */ + @SuppressFBWarnings(value = "REC_CATCH_EXCEPTION", justification = "Exception is propagated into the CompletionStage") public CompletionStage execute(final Alert alert, final Instant scheduled) { try { + if (!alert.isEnabled()) { + throw new IllegalStateException("Alert is not enabled"); + } // If we're unable to obtain a period hint then we will not be able to // correctly window the query, as smaller intervals could miss data. final MetricsQuery query = alert.getQuery(); diff --git a/app/com/arpnetworking/metrics/portal/alerts/scheduling/AlertJobRepository.java b/app/com/arpnetworking/metrics/portal/alerts/scheduling/AlertJobRepository.java index fb69b79b7..b4ba45bba 100644 --- a/app/com/arpnetworking/metrics/portal/alerts/scheduling/AlertJobRepository.java +++ b/app/com/arpnetworking/metrics/portal/alerts/scheduling/AlertJobRepository.java @@ -20,6 +20,7 @@ import com.arpnetworking.metrics.portal.scheduling.JobQuery; import com.arpnetworking.metrics.portal.scheduling.JobRepository; import com.google.common.collect.ImmutableList; +import jakarta.inject.Inject; import models.internal.Organization; import models.internal.QueryResult; import models.internal.alerts.Alert; @@ -31,7 +32,6 @@ import java.util.List; import java.util.Optional; import java.util.UUID; -import javax.inject.Inject; /** * A {@code JobRepository} for alert evaluation jobs. @@ -89,6 +89,7 @@ public QueryResult> queryJobs(final JobQuery queryResult = _repo.createAlertQuery(query.getOrganization()) .offset(query.getOffset().orElse(0)) .limit(query.getLimit()) + .enabled(true) .execute(); final List> values = queryResult.values() .stream() diff --git a/app/com/arpnetworking/metrics/portal/health/ClusterStatusCacheActor.java b/app/com/arpnetworking/metrics/portal/health/ClusterStatusCacheActor.java index 43f93aa41..857f42df7 100644 --- a/app/com/arpnetworking/metrics/portal/health/ClusterStatusCacheActor.java +++ b/app/com/arpnetworking/metrics/portal/health/ClusterStatusCacheActor.java @@ -16,32 +16,32 @@ package com.arpnetworking.metrics.portal.health; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.Cancellable; -import akka.actor.Props; -import akka.actor.Scheduler; -import akka.cluster.Cluster; -import akka.cluster.ClusterEvent; -import com.arpnetworking.commons.akka.ParallelLeastShardAllocationStrategy; import com.arpnetworking.metrics.Metrics; import com.arpnetworking.metrics.MetricsFactory; +import com.arpnetworking.notcommons.pekko.ParallelLeastShardAllocationStrategy; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Multimaps; import com.google.common.collect.Sets; -import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; +import com.google.common.collect.Streams; import models.internal.ShardAllocation; -import scala.compat.java8.OptionConverters; -import scala.concurrent.duration.Duration; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Cancellable; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Scheduler; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.cluster.ClusterEvent; +import scala.jdk.javaapi.OptionConverters; import java.io.Serializable; +import java.time.Duration; +import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.Set; -import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import javax.annotation.Nullable; @@ -53,11 +53,11 @@ public class ClusterStatusCacheActor extends AbstractActor { /** - * Creates a {@link akka.actor.Props} for use in Akka. + * Creates a {@link org.apache.pekko.actor.Props} for use in Pekko. * * @param cluster The cluster to reference. * @param metricsFactory A {@link MetricsFactory} to use for metrics creation. - * @return A new {@link akka.actor.Props} + * @return A new {@link org.apache.pekko.actor.Props} */ public static Props props(final Cluster cluster, final MetricsFactory metricsFactory) { return Props.create(ClusterStatusCacheActor.class, cluster, metricsFactory); @@ -66,7 +66,7 @@ public static Props props(final Cluster cluster, final MetricsFactory metricsFac /** * Public constructor. * - * @param cluster {@link akka.cluster.Cluster} whose state is cached + * @param cluster {@link org.apache.pekko.cluster.Cluster} whose state is cached * @param metricsFactory A {@link MetricsFactory} to use for metrics creation. */ public ClusterStatusCacheActor(final Cluster cluster, final MetricsFactory metricsFactory) { @@ -79,9 +79,9 @@ public void preStart() { final Scheduler scheduler = getContext() .system() .scheduler(); - _pollTimer = scheduler.schedule( - Duration.apply(0, TimeUnit.SECONDS), - Duration.apply(10, TimeUnit.SECONDS), + _pollTimer = scheduler.scheduleAtFixedRate( + Duration.ofSeconds(0), + Duration.ofSeconds(10), getSelf(), POLL, getContext().system().dispatcher(), @@ -101,11 +101,11 @@ public Receive createReceive() { .match(ClusterEvent.CurrentClusterState.class, clusterState -> { _clusterState = Optional.of(clusterState); try (Metrics metrics = _metricsFactory.create()) { - metrics.setGauge("akka/members_count", clusterState.members().size()); + metrics.setGauge("pekko/members_count", Streams.stream(clusterState.getMembers()).count()); if (_cluster.selfAddress().equals(clusterState.getLeader())) { - metrics.setGauge("akka/is_leader", 1); + metrics.setGauge("pekko/is_leader", 1); } else { - metrics.setGauge("akka/is_leader", 0); + metrics.setGauge("pekko/is_leader", 0); } } }) @@ -185,12 +185,12 @@ public StatusResponse( final Map> currentAllocations = notification.getCurrentAllocations(); - _allocations = Optional.of( + _allocations = allRefs.stream() .map(shardRegion -> computeShardAllocation(pendingRebalances, currentAllocations, shardRegion)) - .collect(Collectors.toList())); + .collect(Collectors.toCollection(ArrayList::new)); } else { - _allocations = Optional.empty(); + _allocations = null; } } @@ -228,12 +228,12 @@ public ClusterEvent.CurrentClusterState getClusterState() { } public Optional> getAllocations() { - return _allocations; + return Optional.ofNullable(_allocations); } private final ClusterEvent.CurrentClusterState _clusterState; - @SuppressFBWarnings("SE_BAD_FIELD") - private final Optional> _allocations; + @Nullable + private final ArrayList _allocations; private static final long serialVersionUID = 603308359721162702L; } } diff --git a/app/com/arpnetworking/metrics/portal/health/AkkaMembershipHealthProvider.java b/app/com/arpnetworking/metrics/portal/health/PekkoMembershipHealthProvider.java similarity index 88% rename from app/com/arpnetworking/metrics/portal/health/AkkaMembershipHealthProvider.java rename to app/com/arpnetworking/metrics/portal/health/PekkoMembershipHealthProvider.java index 33fa1c160..13619c222 100644 --- a/app/com/arpnetworking/metrics/portal/health/AkkaMembershipHealthProvider.java +++ b/app/com/arpnetworking/metrics/portal/health/PekkoMembershipHealthProvider.java @@ -15,10 +15,12 @@ */ package com.arpnetworking.metrics.portal.health; -import akka.actor.ActorRef; -import akka.pattern.Patterns; import com.arpnetworking.steno.Logger; import com.arpnetworking.steno.LoggerFactory; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.pattern.Patterns; import java.time.Duration; import java.util.concurrent.CompletionStage; @@ -26,23 +28,21 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import javax.annotation.Nullable; -import javax.inject.Inject; -import javax.inject.Named; /** - * Implementation of {@link HealthProvider} interface which looks at the Akka cluster + * Implementation of {@link HealthProvider} interface which looks at the Pekko cluster * state to determine health. If the host is a member and * * @author Brandon Arp (brandon dot arp at inscopemetrics dot io) */ -public class AkkaMembershipHealthProvider implements HealthProvider { +public class PekkoMembershipHealthProvider implements HealthProvider { /** * Public constructor. * * @param statusActor the {@link StatusActor} to retrieve the cluster status from. */ @Inject - public AkkaMembershipHealthProvider(@Named("status") final ActorRef statusActor) { + public PekkoMembershipHealthProvider(@Named("status") final ActorRef statusActor) { _statusActor = statusActor; } @@ -77,5 +77,5 @@ private CompletionStage ask(final ActorRef actor, final Object request, @ private final ActorRef _statusActor; - private static final Logger LOGGER = LoggerFactory.getLogger(AkkaMembershipHealthProvider.class); + private static final Logger LOGGER = LoggerFactory.getLogger(PekkoMembershipHealthProvider.class); } diff --git a/app/com/arpnetworking/metrics/portal/health/StatusActor.java b/app/com/arpnetworking/metrics/portal/health/StatusActor.java index a8b01a69c..94fc38673 100644 --- a/app/com/arpnetworking/metrics/portal/health/StatusActor.java +++ b/app/com/arpnetworking/metrics/portal/health/StatusActor.java @@ -16,18 +16,20 @@ package com.arpnetworking.metrics.portal.health; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.cluster.Cluster; -import akka.cluster.MemberStatus; -import akka.pattern.PatternsCS; -import akka.remote.AssociationErrorEvent; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import models.view.StatusResponse; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.cluster.MemberStatus; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.remote.artery.ThisActorSystemQuarantinedEvent; import java.time.Duration; import java.util.concurrent.CompletableFuture; import java.util.function.Function; +import javax.annotation.Nullable; /** * Periodically polls the cluster status and caches the result. @@ -36,9 +38,6 @@ * {@link StatusRequest}: Replies with a StatusResponse message containing the service status data * {@link HealthRequest}: Replies with a boolean value, true indicating healthy, false indicating unhealthy * - * Internal-only messages: - * {@link AssociationErrorEvent}: Evaluates the possibility of the node being quarantined - * * @author Brandon Arp (brandon dot arp at inscopemetrics dot io) */ public class StatusActor extends AbstractActor { @@ -48,17 +47,23 @@ public class StatusActor extends AbstractActor { * @param cluster The instance of the Clustering extension. * @param clusterStatusCache The actor holding the cached cluster status. */ + @SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR", justification = "getSelf() and getContext() are safe to call") public StatusActor( final Cluster cluster, final ActorRef clusterStatusCache) { _cluster = cluster; _clusterStatusCache = clusterStatusCache; - context().system().eventStream().subscribe(self(), AssociationErrorEvent.class); + } + + @Override + public void preStart() throws Exception { + super.preStart(); + getContext().system().eventStream().subscribe(getSelf(), ThisActorSystemQuarantinedEvent.class); } /** - * Creates a {@link Props} for use in Akka. + * Creates a {@link Props} for use in Pekko. * * @param cluster The instance of the Clustering extension. * @param clusterStatusCache The actor holding the cached cluster status. @@ -75,10 +80,8 @@ public static Props props( public Receive createReceive() { return receiveBuilder() .match(StatusRequest.class, message -> processStatusRequest()) - .match(AssociationErrorEvent.class, error -> { - if (error.cause().getMessage().contains("quarantined this system")) { - _quarantined = true; - } + .match(ThisActorSystemQuarantinedEvent.class, event -> { + _quarantined = true; }) .match(HealthRequest.class, message -> { final boolean healthy = _cluster.readView().self().status() == MemberStatus.up() && !_quarantined; @@ -90,7 +93,7 @@ public Receive createReceive() { private void processStatusRequest() { // Call the bookkeeper final CompletableFuture clusterStateFuture = - PatternsCS.ask( + Patterns.ask( _clusterStatusCache, new ClusterStatusCacheActor.GetRequest(), Duration.ofSeconds(3)) @@ -98,7 +101,7 @@ private void processStatusRequest() { .exceptionally(new AsNullRecovery<>()) .toCompletableFuture(); - PatternsCS.pipe( + Patterns.pipe( clusterStateFuture.toCompletableFuture() .thenApply(statusResponse -> new StatusResponse.Builder() .setClusterState(statusResponse) @@ -108,13 +111,13 @@ private void processStatusRequest() { .to(sender(), self()); } - private boolean _quarantined = false; - private final Cluster _cluster; private final ActorRef _clusterStatusCache; + private boolean _quarantined; - private static class AsNullRecovery implements Function { + private static final class AsNullRecovery implements Function { @Override + @Nullable public T apply(final Throwable failure) { return null; } diff --git a/app/com/arpnetworking/metrics/portal/hosts/impl/CassandraHostRepository.java b/app/com/arpnetworking/metrics/portal/hosts/impl/CassandraHostRepository.java index bcc6d018a..9d7c1f637 100644 --- a/app/com/arpnetworking/metrics/portal/hosts/impl/CassandraHostRepository.java +++ b/app/com/arpnetworking/metrics/portal/hosts/impl/CassandraHostRepository.java @@ -18,10 +18,8 @@ import com.arpnetworking.metrics.portal.hosts.HostRepository; import com.arpnetworking.steno.Logger; import com.arpnetworking.steno.LoggerFactory; -import com.datastax.driver.core.Session; -import com.datastax.driver.mapping.Mapper; -import com.datastax.driver.mapping.MappingManager; -import com.datastax.driver.mapping.Result; +import com.datastax.oss.driver.api.core.CqlSession; +import jakarta.inject.Inject; import models.internal.Host; import models.internal.HostQuery; import models.internal.Organization; @@ -34,11 +32,11 @@ import java.util.Locale; import java.util.Optional; import java.util.Spliterator; +import java.util.concurrent.ExecutionException; import java.util.concurrent.atomic.AtomicBoolean; import java.util.stream.Collectors; import java.util.stream.Stream; import java.util.stream.StreamSupport; -import javax.inject.Inject; /** * Implementation of {@link HostRepository} for Cassandra database. @@ -50,14 +48,11 @@ public class CassandraHostRepository implements HostRepository { * Public constructor. * * @param cassandraSession a Session to use to query data - * @param mappingManager a MappingManager providing ORM for the Cassandra objects */ @Inject public CassandraHostRepository( - final Session cassandraSession, - final MappingManager mappingManager) { + final CqlSession cassandraSession) { _cassandraSession = cassandraSession; - _mappingManager = mappingManager; } @Override @@ -72,7 +67,6 @@ public void close() { assertIsOpen(); LOGGER.debug().setMessage("Closing host repository").log(); _isOpen.set(false); - _cassandraSession.close(); } @Override @@ -84,14 +78,19 @@ public Optional getHost(final String hostname, final Organization organiza .addData("organization", organization) .log(); - final Mapper mapper = _mappingManager.mapper(models.cassandra.Host.class); - final models.cassandra.Host cassandraHost = mapper.get(organization, hostname); - - if (cassandraHost == null) { - return Optional.empty(); + final models.cassandra.Host.Mapper mapper = new models.cassandra.Host_MapperBuilder(_cassandraSession).build(); + final models.cassandra.Host.HostQueries dao = mapper.dao(); + try { + return dao.get(organization.getId(), hostname).thenApply(cassandraHost -> { + if (cassandraHost == null) { + return Optional.empty(); + } + return Optional.of(cassandraHost.toInternal()); + }).toCompletableFuture().get(); + } catch (final InterruptedException | ExecutionException e) { + throw new RuntimeException(e); } - return Optional.of(cassandraHost.toInternal()); } @Override @@ -109,8 +108,9 @@ public void addOrUpdateHost(final Host host, final Organization organization) { cassHost.setMetricsSoftwareState(host.getMetricsSoftwareState().name()); cassHost.setName(host.getHostname()); - final Mapper mapper = _mappingManager.mapper(models.cassandra.Host.class); - mapper.save(cassHost); + final models.cassandra.Host.Mapper mapper = new models.cassandra.Host_MapperBuilder(_cassandraSession).build(); + final models.cassandra.Host.HostQueries dao = mapper.dao(); + dao.save(cassHost); } @Override @@ -123,8 +123,9 @@ public void deleteHost(final String hostname, final Organization organization) { .log(); final Optional host = getHost(hostname, organization); if (host.isPresent()) { - final Mapper mapper = _mappingManager.mapper(models.cassandra.Host.class); - mapper.delete(organization, hostname); + final models.cassandra.Host.Mapper mapper = new models.cassandra.Host_MapperBuilder(_cassandraSession).build(); + final models.cassandra.Host.HostQueries dao = mapper.dao(); + dao.delete(organization.getId(), hostname); } } @@ -145,9 +146,9 @@ public QueryResult queryHosts(final HostQuery query) { .setMessage("Querying") .addData("query", query) .log(); - final Mapper mapper = _mappingManager.mapper(models.cassandra.Host.class); - final models.cassandra.Host.HostQueries accessor = mapper.getManager().createAccessor(models.cassandra.Host.HostQueries.class); - final Result result = accessor.getHostsForOrganization(query.getOrganization().getId()); + final models.cassandra.Host.Mapper mapper = new models.cassandra.Host_MapperBuilder(_cassandraSession).build(); + final models.cassandra.Host.HostQueries dao = mapper.dao(); + final Stream result = dao.getHostsForOrganization(query.getOrganization().getId()); final Spliterator allAlerts = result.spliterator(); final int start = query.getOffset().orElse(0); @@ -201,10 +202,12 @@ public QueryResult queryHosts(final HostQuery query) { @Override public long getHostCount(final Organization organization) { - final Mapper mapper = _mappingManager.mapper(models.cassandra.Host.class); - final models.cassandra.Host.HostQueries accessor = mapper.getManager().createAccessor(models.cassandra.Host.HostQueries.class); - final Result result = accessor.getHostsForOrganization(organization.getId()); - return StreamSupport.stream(result.spliterator(), false).count(); + final models.cassandra.Host.Mapper mapper = new models.cassandra.Host_MapperBuilder(_cassandraSession) + .withDefaultKeyspace("portal") + .build(); + final models.cassandra.Host.HostQueries dao = mapper.dao(); + final Stream result = dao.getHostsForOrganization(organization.getId()); + return result.count(); } private void assertIsOpen() { @@ -217,8 +220,7 @@ private void assertIsOpen(final boolean expectedState) { } } - private final Session _cassandraSession; - private final MappingManager _mappingManager; + private final CqlSession _cassandraSession; private final AtomicBoolean _isOpen = new AtomicBoolean(false); private static final Logger LOGGER = LoggerFactory.getLogger(CassandraHostRepository.class); diff --git a/app/com/arpnetworking/metrics/portal/hosts/impl/ConfiguredHostProvider.java b/app/com/arpnetworking/metrics/portal/hosts/impl/ConfiguredHostProvider.java index c534fc98a..7c3439bb2 100644 --- a/app/com/arpnetworking/metrics/portal/hosts/impl/ConfiguredHostProvider.java +++ b/app/com/arpnetworking/metrics/portal/hosts/impl/ConfiguredHostProvider.java @@ -15,7 +15,6 @@ */ package com.arpnetworking.metrics.portal.hosts.impl; -import akka.actor.AbstractActor; import com.arpnetworking.logback.annotations.LogValue; import com.arpnetworking.metrics.portal.hosts.HostRepository; import com.arpnetworking.metrics.portal.organizations.OrganizationRepository; @@ -23,15 +22,16 @@ import com.arpnetworking.steno.LogValueMapFactory; import com.arpnetworking.steno.Logger; import com.arpnetworking.steno.LoggerFactory; -import com.google.inject.Inject; import com.google.inject.assistedinject.Assisted; import com.typesafe.config.Config; import com.typesafe.config.ConfigList; import com.typesafe.config.ConfigObject; import com.typesafe.config.ConfigValue; +import jakarta.inject.Inject; import models.internal.MetricsSoftwareState; import models.internal.Organization; import models.internal.impl.DefaultHost; +import org.apache.pekko.actor.AbstractActor; import java.util.UUID; diff --git a/app/com/arpnetworking/metrics/portal/hosts/impl/ConsulHostProvider.java b/app/com/arpnetworking/metrics/portal/hosts/impl/ConsulHostProvider.java index f2ecc5080..9671b1dbf 100644 --- a/app/com/arpnetworking/metrics/portal/hosts/impl/ConsulHostProvider.java +++ b/app/com/arpnetworking/metrics/portal/hosts/impl/ConsulHostProvider.java @@ -16,19 +16,19 @@ package com.arpnetworking.metrics.portal.hosts.impl; -import akka.actor.AbstractActor; -import akka.actor.Status; -import akka.pattern.PatternsCS; import com.arpnetworking.metrics.portal.hosts.HostRepository; import com.arpnetworking.metrics.portal.organizations.OrganizationRepository; import com.arpnetworking.play.configuration.ConfigurationHelper; import com.arpnetworking.steno.Logger; import com.arpnetworking.steno.LoggerFactory; -import com.google.inject.Inject; import com.google.inject.assistedinject.Assisted; import com.typesafe.config.Config; +import jakarta.inject.Inject; import models.internal.MetricsSoftwareState; import models.internal.impl.DefaultHost; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.Status; +import org.apache.pekko.pattern.Patterns; import play.libs.ws.WSClient; import java.net.URI; @@ -59,7 +59,7 @@ public ConsulHostProvider( _hostRepository = hostRepository; _organizationRepository = organizationRepository; _targetOrganizationId = UUID.fromString(configuration.getString("targetOrganizationId")); - getContext().system().scheduler().schedule( + getContext().system().scheduler().scheduleAtFixedRate( ConfigurationHelper.getFiniteDuration(configuration, "initialDelay"), ConfigurationHelper.getFiniteDuration(configuration, "interval"), getSelf(), @@ -84,7 +84,7 @@ public Receive createReceive() { .setMessage("Searching for added/updated hosts") .addData("actor", self()) .log(); - PatternsCS.pipe(_client.getHostList(), context().dispatcher()).to(self(), self()); + Patterns.pipe(_client.getHostList(), context().dispatcher()).to(self(), self()); }) .matchUnchecked(List.class, (List hostList) -> { for (final ConsulClient.Host host : hostList) { diff --git a/app/com/arpnetworking/metrics/portal/hosts/impl/DatabaseHostRepository.java b/app/com/arpnetworking/metrics/portal/hosts/impl/DatabaseHostRepository.java index 364530af9..d7fabefc8 100644 --- a/app/com/arpnetworking/metrics/portal/hosts/impl/DatabaseHostRepository.java +++ b/app/com/arpnetworking/metrics/portal/hosts/impl/DatabaseHostRepository.java @@ -20,9 +20,8 @@ import com.arpnetworking.steno.Logger; import com.arpnetworking.steno.LoggerFactory; import com.google.common.collect.Maps; -import com.google.inject.Inject; import com.typesafe.config.Config; -import io.ebean.EbeanServer; +import io.ebean.Database; import io.ebean.ExpressionList; import io.ebean.PagedList; import io.ebean.Query; @@ -30,6 +29,8 @@ import io.ebean.RawSqlBuilder; import io.ebean.Transaction; import io.ebeaninternal.server.rawsql.DRawSql; +import jakarta.inject.Inject; +import jakarta.inject.Named; import models.internal.Host; import models.internal.HostQuery; import models.internal.Organization; @@ -47,7 +48,6 @@ import java.util.Optional; import java.util.concurrent.atomic.AtomicBoolean; import java.util.stream.Collectors; -import javax.inject.Named; /** * Implementation of {@link HostRepository} using Postgresql database. @@ -61,22 +61,22 @@ public class DatabaseHostRepository implements HostRepository { * * @param environment Play's {@code Environment} instance. * @param config Play's {@code Configuration} instance. - * @param ebeanServer Play's {@code EbeanServer} for this repository. + * @param ebeanServer Play's {@code Database} for this repository. */ @Inject public DatabaseHostRepository( final Environment environment, final Config config, - @Named("metrics_portal") final EbeanServer ebeanServer) { + @Named("metrics_portal") final Database ebeanServer) { this(ebeanServer); } /** * Public constructor for manual configuration. This is intended for testing. * - * @param ebeanServer Play's {@code EbeanServer} for this repository. + * @param ebeanServer Play's {@code Database} for this repository. */ - public DatabaseHostRepository(final EbeanServer ebeanServer) { + public DatabaseHostRepository(final Database ebeanServer) { _ebeanServer = ebeanServer; } @@ -148,7 +148,7 @@ public void addOrUpdateHost(final Host host, final Organization organization) { .orElse(""); _ebeanServer.save(ebeanHost); - _ebeanServer.createSqlUpdate( + _ebeanServer.sqlUpdate( "UPDATE portal.hosts SET name_idx_col = " + "setweight(to_tsvector('simple', coalesce(:hostname,'')), 'A')" + "|| setweight(to_tsvector('simple', coalesce(:labels,'')), 'B')" @@ -253,7 +253,7 @@ public long getHostCount(final Organization organization) { } private static PagedList createHostQuery( - final EbeanServer server, + final Database server, final HostQuery query, final Organization organization) { final StringBuilder selectBuilder = new StringBuilder( @@ -356,7 +356,7 @@ static List tokenize(final String word) { } private static Query createParameterizedHostQueryFromRawSql( - final EbeanServer server, + final Database server, final String sql, final Map parameters) { final RawSql rawSql = RawSqlBuilder.parse(sql) @@ -404,7 +404,7 @@ private void assertIsOpen(final boolean expectedState) { } private final AtomicBoolean _isOpen = new AtomicBoolean(false); - private final EbeanServer _ebeanServer; + private final Database _ebeanServer; private static final Logger LOGGER = LoggerFactory.getLogger(DatabaseHostRepository.class); } diff --git a/app/com/arpnetworking/metrics/portal/hosts/impl/ForemanHostProvider.java b/app/com/arpnetworking/metrics/portal/hosts/impl/ForemanHostProvider.java index 447421c25..3a4f00763 100644 --- a/app/com/arpnetworking/metrics/portal/hosts/impl/ForemanHostProvider.java +++ b/app/com/arpnetworking/metrics/portal/hosts/impl/ForemanHostProvider.java @@ -15,20 +15,20 @@ */ package com.arpnetworking.metrics.portal.hosts.impl; -import akka.actor.AbstractActor; -import akka.actor.Status; -import akka.pattern.PatternsCS; import com.arpnetworking.metrics.portal.hosts.HostRepository; import com.arpnetworking.metrics.portal.organizations.OrganizationRepository; import com.arpnetworking.play.configuration.ConfigurationHelper; import com.arpnetworking.steno.Logger; import com.arpnetworking.steno.LoggerFactory; -import com.google.inject.Inject; import com.google.inject.assistedinject.Assisted; import com.typesafe.config.Config; +import jakarta.inject.Inject; import models.internal.Host; import models.internal.MetricsSoftwareState; import models.internal.impl.DefaultHost; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.Status; +import org.apache.pekko.pattern.Patterns; import play.libs.ws.WSClient; import java.net.URI; @@ -59,7 +59,7 @@ public ForemanHostProvider( _hostRepository = hostRepository; _organizationRepository = organizationRepository; _targetOrganizationId = UUID.fromString(configuration.getString("targetOrganizationId")); - getContext().system().scheduler().schedule( + getContext().system().scheduler().scheduleAtFixedRate( ConfigurationHelper.getFiniteDuration(configuration, "initialDelay"), ConfigurationHelper.getFiniteDuration(configuration, "interval"), getSelf(), @@ -83,7 +83,7 @@ public Receive createReceive() { .setMessage("Searching for added/updated hosts") .addData("actor", self()) .log(); - PatternsCS.pipe(_client.getHostPage(1), context().dispatcher()).to(self(), self()); + Patterns.pipe(_client.getHostPage(1), context().dispatcher()).to(self(), self()); }) .match(ForemanClient.HostPageResponse.class, response -> { final List results = response.getResults(); @@ -96,7 +96,7 @@ public Receive createReceive() { } if (response.getTotal() > response.getPage() * response.getPerPage()) { - PatternsCS + Patterns .pipe( _client.getHostPage( response.getPage() + 1, diff --git a/app/com/arpnetworking/metrics/portal/hosts/impl/HostProviderFactory.java b/app/com/arpnetworking/metrics/portal/hosts/impl/HostProviderFactory.java index 678c6a41e..6f6a266de 100644 --- a/app/com/arpnetworking/metrics/portal/hosts/impl/HostProviderFactory.java +++ b/app/com/arpnetworking/metrics/portal/hosts/impl/HostProviderFactory.java @@ -15,13 +15,13 @@ */ package com.arpnetworking.metrics.portal.hosts.impl; -import akka.actor.Actor; -import akka.actor.Props; -import com.arpnetworking.commons.akka.GuiceActorCreator; +import com.arpnetworking.commons.pekko.GuiceActorCreator; import com.arpnetworking.utility.ConfigurationOverrideModule; -import com.google.inject.Inject; import com.google.inject.Injector; import com.typesafe.config.Config; +import jakarta.inject.Inject; +import org.apache.pekko.actor.Actor; +import org.apache.pekko.actor.Props; /** * Factory for creating HostProviders with nested/changed Configurations. diff --git a/app/com/arpnetworking/metrics/portal/hosts/impl/LocalHostRepository.java b/app/com/arpnetworking/metrics/portal/hosts/impl/LocalHostRepository.java index b8d272eda..4f91af0b9 100644 --- a/app/com/arpnetworking/metrics/portal/hosts/impl/LocalHostRepository.java +++ b/app/com/arpnetworking/metrics/portal/hosts/impl/LocalHostRepository.java @@ -22,8 +22,8 @@ import com.arpnetworking.steno.LoggerFactory; import com.google.common.collect.Lists; import com.google.common.collect.Maps; -import com.google.inject.Inject; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; +import jakarta.inject.Inject; import models.internal.Host; import models.internal.HostQuery; import models.internal.MetricsSoftwareState; diff --git a/app/com/arpnetworking/metrics/portal/hosts/impl/MultiProvider.java b/app/com/arpnetworking/metrics/portal/hosts/impl/MultiProvider.java index fe5f535c4..ee44d0ffe 100644 --- a/app/com/arpnetworking/metrics/portal/hosts/impl/MultiProvider.java +++ b/app/com/arpnetworking/metrics/portal/hosts/impl/MultiProvider.java @@ -15,15 +15,16 @@ */ package com.arpnetworking.metrics.portal.hosts.impl; -import akka.actor.AbstractActor; -import akka.actor.Props; import com.arpnetworking.play.configuration.ConfigurationHelper; import com.arpnetworking.steno.Logger; import com.arpnetworking.steno.LoggerFactory; -import com.google.inject.Inject; import com.google.inject.assistedinject.Assisted; import com.typesafe.config.Config; import com.typesafe.config.ConfigValueType; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; +import jakarta.inject.Inject; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.Props; import play.Environment; import java.util.Set; @@ -38,6 +39,10 @@ * @author Brandon Arp (brandon dot arp at smartsheet dot com) */ public class MultiProvider extends AbstractActor { + private final HostProviderFactory _factory; + private final Environment _environment; + private final Config _configuration; + /** * Public constructor. * @@ -46,12 +51,21 @@ public class MultiProvider extends AbstractActor { * @param configuration Play configuration. */ @Inject + @SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR", justification = "getContext() and getSelf() are safe to call") public MultiProvider(final HostProviderFactory factory, final Environment environment, @Assisted final Config configuration) { - final Set entries = configuration.root().keySet(); + _factory = factory; + _environment = environment; + _configuration = configuration; + } + + @Override + public void preStart() throws Exception { + super.preStart(); + final Set entries = _configuration.root().keySet(); for (String key : entries) { - if (configuration.getValue(key).valueType() == ConfigValueType.OBJECT) { + if (_configuration.getValue(key).valueType() == ConfigValueType.OBJECT) { // Make sure that we're looking at an Object with a .type subkey - if (!configuration.hasPath(key + ".type")) { + if (!_configuration.hasPath(key + ".type")) { LOGGER.warn() .setMessage("Expected type for host provider") .addData("key", key) @@ -60,11 +74,11 @@ public MultiProvider(final HostProviderFactory factory, final Environment enviro } // Create the child configuration, with a fallback to the current config for things like "interval" - final Config subConfig = configuration.getConfig(key).withFallback(configuration); + final Config subConfig = _configuration.getConfig(key).withFallback(_configuration); // Create the props and launch - final Props subProps = factory.create(subConfig, ConfigurationHelper.getType(environment, subConfig, "type")); - context().actorOf(subProps); + final Props subProps = _factory.create(subConfig, ConfigurationHelper.getType(_environment, subConfig, "type")); + getContext().actorOf(subProps); } } } diff --git a/app/com/arpnetworking/metrics/portal/hosts/impl/NoHostProvider.java b/app/com/arpnetworking/metrics/portal/hosts/impl/NoHostProvider.java index 38120e72b..f039bdba6 100644 --- a/app/com/arpnetworking/metrics/portal/hosts/impl/NoHostProvider.java +++ b/app/com/arpnetworking/metrics/portal/hosts/impl/NoHostProvider.java @@ -15,13 +15,14 @@ */ package com.arpnetworking.metrics.portal.hosts.impl; -import akka.actor.AbstractActor; import com.arpnetworking.play.configuration.ConfigurationHelper; import com.arpnetworking.steno.Logger; import com.arpnetworking.steno.LoggerFactory; -import com.google.inject.Inject; import com.google.inject.assistedinject.Assisted; import com.typesafe.config.Config; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; +import jakarta.inject.Inject; +import org.apache.pekko.actor.AbstractActor; /** * This is a placeholder actor that does not actually find any hosts. @@ -32,16 +33,25 @@ */ public class NoHostProvider extends AbstractActor { + private final Config _configuration; + /** * Public constructor. * * @param configuration Play configuration. */ + @SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR", justification = "getSelf() and getContext() are safe to call") @Inject public NoHostProvider(@Assisted final Config configuration) { - getContext().system().scheduler().schedule( - ConfigurationHelper.getFiniteDuration(configuration, "initialDelay"), - ConfigurationHelper.getFiniteDuration(configuration, "interval"), + _configuration = configuration; + } + + @Override + public void preStart() throws Exception { + super.preStart(); + getContext().system().scheduler().scheduleAtFixedRate( + ConfigurationHelper.getFiniteDuration(_configuration, "initialDelay"), + ConfigurationHelper.getFiniteDuration(_configuration, "interval"), getSelf(), TICK, getContext().dispatcher(), diff --git a/app/com/arpnetworking/metrics/portal/hosts/impl/NoHostRepository.java b/app/com/arpnetworking/metrics/portal/hosts/impl/NoHostRepository.java index 400bb5ac0..28e0ac565 100644 --- a/app/com/arpnetworking/metrics/portal/hosts/impl/NoHostRepository.java +++ b/app/com/arpnetworking/metrics/portal/hosts/impl/NoHostRepository.java @@ -20,7 +20,7 @@ import com.arpnetworking.steno.LogValueMapFactory; import com.arpnetworking.steno.Logger; import com.arpnetworking.steno.LoggerFactory; -import com.google.inject.Inject; +import jakarta.inject.Inject; import models.internal.Host; import models.internal.HostQuery; import models.internal.Organization; diff --git a/app/com/arpnetworking/metrics/portal/hosts/impl/RandomHostProvider.java b/app/com/arpnetworking/metrics/portal/hosts/impl/RandomHostProvider.java index 4982d806a..21df2742f 100644 --- a/app/com/arpnetworking/metrics/portal/hosts/impl/RandomHostProvider.java +++ b/app/com/arpnetworking/metrics/portal/hosts/impl/RandomHostProvider.java @@ -15,7 +15,6 @@ */ package com.arpnetworking.metrics.portal.hosts.impl; -import akka.actor.AbstractActor; import com.arpnetworking.logback.annotations.LogValue; import com.arpnetworking.metrics.portal.hosts.HostRepository; import com.arpnetworking.metrics.portal.organizations.OrganizationRepository; @@ -23,13 +22,14 @@ import com.arpnetworking.steno.LogValueMapFactory; import com.arpnetworking.steno.Logger; import com.arpnetworking.steno.LoggerFactory; -import com.google.inject.Inject; import com.google.inject.assistedinject.Assisted; import com.typesafe.config.Config; +import jakarta.inject.Inject; import models.internal.Host; import models.internal.MetricsSoftwareState; import models.internal.Organization; import models.internal.impl.DefaultHost; +import org.apache.pekko.actor.AbstractActor; import java.time.Duration; import java.util.UUID; @@ -58,7 +58,7 @@ public RandomHostProvider( _hostRepository = hostRepository; _organizationRepository = organizationRepository; _targetOrganizationId = UUID.fromString(configuration.getString("targetOrganizationId")); - getContext().system().scheduler().schedule( + getContext().system().scheduler().scheduleAtFixedRate( ConfigurationHelper.getFiniteDuration(configuration, "initialDelay"), ConfigurationHelper.getFiniteDuration(configuration, "interval"), getSelf(), diff --git a/app/com/arpnetworking/metrics/portal/query/impl/DelegatingQueryExecutor.java b/app/com/arpnetworking/metrics/portal/query/impl/DelegatingQueryExecutor.java index 2de04843e..f6c9f96b3 100644 --- a/app/com/arpnetworking/metrics/portal/query/impl/DelegatingQueryExecutor.java +++ b/app/com/arpnetworking/metrics/portal/query/impl/DelegatingQueryExecutor.java @@ -19,7 +19,7 @@ import com.arpnetworking.metrics.portal.query.QueryExecutor; import com.arpnetworking.metrics.portal.query.QueryExecutorRegistry; import com.arpnetworking.metrics.portal.query.QueryWindow; -import com.google.inject.Inject; +import jakarta.inject.Inject; import models.internal.BoundedMetricsQuery; import models.internal.MetricsQuery; import models.internal.MetricsQueryFormat; diff --git a/app/com/arpnetworking/metrics/portal/query/impl/KairosDbQueryExecutor.java b/app/com/arpnetworking/metrics/portal/query/impl/KairosDbQueryExecutor.java index 2c06591a3..1816528bc 100644 --- a/app/com/arpnetworking/metrics/portal/query/impl/KairosDbQueryExecutor.java +++ b/app/com/arpnetworking/metrics/portal/query/impl/KairosDbQueryExecutor.java @@ -29,6 +29,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.ImmutableList; import com.google.common.collect.Streams; +import jakarta.inject.Inject; import models.internal.BoundedMetricsQuery; import models.internal.MetricsQuery; import models.internal.MetricsQueryFormat; @@ -43,7 +44,6 @@ import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionStage; -import javax.inject.Inject; /** * A {@code QueryExecutor} that accepts KairosDB JSON metrics queries. diff --git a/app/com/arpnetworking/metrics/portal/query/impl/NoQueryExecutor.java b/app/com/arpnetworking/metrics/portal/query/impl/NoQueryExecutor.java index 849aaaf08..b9c821a9f 100644 --- a/app/com/arpnetworking/metrics/portal/query/impl/NoQueryExecutor.java +++ b/app/com/arpnetworking/metrics/portal/query/impl/NoQueryExecutor.java @@ -20,6 +20,7 @@ import com.arpnetworking.metrics.portal.query.QueryExecutor; import com.arpnetworking.metrics.portal.query.QueryWindow; import com.google.common.collect.ImmutableList; +import jakarta.inject.Singleton; import models.internal.BoundedMetricsQuery; import models.internal.MetricsQuery; import models.internal.MetricsQueryResult; @@ -28,7 +29,6 @@ import java.time.Duration; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionStage; -import javax.inject.Singleton; /** * Implementation of a {@link QueryExecutor} that just returns an error result. diff --git a/app/com/arpnetworking/metrics/portal/reports/ReportExecutionContext.java b/app/com/arpnetworking/metrics/portal/reports/ReportExecutionContext.java index f9e69d971..7739420da 100644 --- a/app/com/arpnetworking/metrics/portal/reports/ReportExecutionContext.java +++ b/app/com/arpnetworking/metrics/portal/reports/ReportExecutionContext.java @@ -31,10 +31,10 @@ import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.net.MediaType; -import com.google.inject.Inject; import com.google.inject.Injector; import com.typesafe.config.Config; import com.typesafe.config.ConfigObject; +import jakarta.inject.Inject; import models.internal.Problem; import models.internal.TimeRange; import models.internal.impl.DefaultRenderedReport; @@ -211,7 +211,9 @@ private ImmutableMultimap getFormatsByRecipient(final R final S source, final F format ) { - final Renderer result = _renderers.getOrDefault(source.getType(), ImmutableMap.of()).get(format.getMimeType()); + final ImmutableMap> renderers = _renderers.getOrDefault(source.getType(), ImmutableMap.of()); + assert renderers != null; + final Renderer result = renderers.get(format.getMimeType()); if (result == null) { throw new IllegalArgumentException( "no Renderer exists for source type " + source.getType() + ", MIME type " + format.getMimeType() diff --git a/app/com/arpnetworking/metrics/portal/reports/impl/DatabaseReportExecutionRepository.java b/app/com/arpnetworking/metrics/portal/reports/impl/DatabaseReportExecutionRepository.java index 891f95dd3..b11ca3623 100644 --- a/app/com/arpnetworking/metrics/portal/reports/impl/DatabaseReportExecutionRepository.java +++ b/app/com/arpnetworking/metrics/portal/reports/impl/DatabaseReportExecutionRepository.java @@ -20,8 +20,11 @@ import com.arpnetworking.metrics.portal.scheduling.impl.DatabaseExecutionHelper; import com.arpnetworking.steno.Logger; import com.arpnetworking.steno.LoggerFactory; -import io.ebean.EbeanServer; +import io.ebean.Database; import io.ebean.ExpressionList; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.persistence.EntityNotFoundException; import models.ebean.ReportExecution; import models.internal.Organization; import models.internal.reports.Report; @@ -35,9 +38,6 @@ import java.util.concurrent.CompletionStage; import java.util.concurrent.Executor; import java.util.concurrent.atomic.AtomicBoolean; -import javax.inject.Inject; -import javax.inject.Named; -import javax.persistence.EntityNotFoundException; /** * Implementation of {@link JobExecutionRepository} for {@link Report} jobs using a SQL database. @@ -49,18 +49,18 @@ public final class DatabaseReportExecutionRepository implements ReportExecutionR private static final Logger LOGGER = LoggerFactory.getLogger(DatabaseReportExecutionRepository.class); private final AtomicBoolean _isOpen = new AtomicBoolean(false); - private final EbeanServer _ebeanServer; + private final Database _ebeanServer; private final DatabaseExecutionHelper _executionHelper; private final Executor _executor; /** * Public constructor. * - * @param ebeanServer Play's {@code EbeanServer} for this repository. + * @param ebeanServer Play's {@code Database} for this repository. * @param executor The executor to spawn futures onto. */ @Inject - public DatabaseReportExecutionRepository(@Named("metrics_portal") final EbeanServer ebeanServer, final Executor executor) { + public DatabaseReportExecutionRepository(@Named("metrics_portal") final Database ebeanServer, final Executor executor) { _ebeanServer = ebeanServer; _executionHelper = new DatabaseExecutionHelper<>(LOGGER, _ebeanServer, this::findOrCreateReportExecution, executor); _executor = executor; diff --git a/app/com/arpnetworking/metrics/portal/reports/impl/DatabaseReportRepository.java b/app/com/arpnetworking/metrics/portal/reports/impl/DatabaseReportRepository.java index 912511f42..0f7ac3cef 100644 --- a/app/com/arpnetworking/metrics/portal/reports/impl/DatabaseReportRepository.java +++ b/app/com/arpnetworking/metrics/portal/reports/impl/DatabaseReportRepository.java @@ -27,9 +27,12 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSetMultimap; import com.typesafe.config.Config; -import io.ebean.EbeanServer; +import io.ebean.Database; import io.ebean.PagedList; import io.ebean.Transaction; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.persistence.PersistenceException; import models.ebean.NeverReportSchedule; import models.ebean.OneOffReportSchedule; import models.ebean.PeriodicReportSchedule; @@ -57,9 +60,6 @@ import java.util.UUID; import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.Function; -import javax.inject.Inject; -import javax.inject.Named; -import javax.persistence.PersistenceException; /** * Implementation of {@link ReportRepository} using a SQL database. @@ -87,29 +87,29 @@ public models.ebean.ReportFormat visitHtml(final HtmlReportFormat htmlFormat) { }; private AtomicBoolean _isOpen = new AtomicBoolean(false); - private final EbeanServer _ebeanServer; + private final Database _ebeanServer; /** * Public constructor. * * @param environment Play's {@code Environment} instance. * @param config Play's {@code Configuration} instance. - * @param ebeanServer Play's {@code EbeanServer} for this repository. + * @param ebeanServer Play's {@code Database} for this repository. */ @Inject public DatabaseReportRepository( final Environment environment, final Config config, - @Named("metrics_portal") final EbeanServer ebeanServer) { + @Named("metrics_portal") final Database ebeanServer) { this(ebeanServer); } /** * Public constructor for manual configuration. This is intended for testing. * - * @param ebeanServer Play's {@code EbeanServer} for this repository. + * @param ebeanServer Play's {@code Database} for this repository. */ - public DatabaseReportRepository(final EbeanServer ebeanServer) { + public DatabaseReportRepository(final Database ebeanServer) { _ebeanServer = ebeanServer; } @@ -297,7 +297,7 @@ public QueryResult queryReports(final ReportQuery query) { } private static PagedList createReportQuery( - final EbeanServer ebeanServer, + final Database ebeanServer, final ReportQuery query) { final int offset = query.getOffset().orElse(0); final int limit = query.getLimit(); diff --git a/app/com/arpnetworking/metrics/portal/reports/impl/EmailSender.java b/app/com/arpnetworking/metrics/portal/reports/impl/EmailSender.java index 9c735a0dc..11ec68e50 100644 --- a/app/com/arpnetworking/metrics/portal/reports/impl/EmailSender.java +++ b/app/com/arpnetworking/metrics/portal/reports/impl/EmailSender.java @@ -29,17 +29,18 @@ import com.google.common.collect.ImmutableSet; import com.google.common.io.ByteSource; import com.google.common.net.MediaType; -import com.google.inject.Inject; import com.google.inject.assistedinject.Assisted; import com.typesafe.config.Config; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; +import jakarta.inject.Inject; import models.internal.Problem; import models.internal.TimeRange; import models.internal.reports.Recipient; import models.internal.reports.Report; import models.internal.reports.ReportFormat; +import org.simplejavamail.api.email.EmailPopulatingBuilder; +import org.simplejavamail.api.mailer.Mailer; import org.simplejavamail.email.EmailBuilder; -import org.simplejavamail.email.EmailPopulatingBuilder; -import org.simplejavamail.mailer.Mailer; import org.simplejavamail.mailer.MailerBuilder; import java.io.IOException; @@ -140,17 +141,27 @@ private EmailPopulatingBuilder addFormat( */ @Inject public EmailSender(@Assisted final Config config, final ObjectMapper mapper) { - this(buildMailer(config), config, mapper); + this(buildMailer(config), config.getString("fromAddress"), buildAllowedRecipients(config, mapper)); } /** * Constructor for tests, allowing dependency injection of the {@link Mailer}. */ + @SuppressFBWarnings(value = "CT_CONSTRUCTOR_THROW", justification = "Protected as mentioned at " + + "https://wiki.sei.cmu.edu/confluence/display/java/OBJ11-J.+Be+wary+of+letting+constructors+throw+exceptions") /* package private */ EmailSender(final Mailer mailer, final Config config, final ObjectMapper mapper) { - _fromAddress = config.getString("fromAddress"); + this(mailer, config.getString("fromAddress"), buildAllowedRecipients(config, mapper)); + } + + private EmailSender(final Mailer mailer, final String fromAddress, final ImmutableSet allowedRecipients) { + _fromAddress = fromAddress; + _allowedRecipients = allowedRecipients; _mailer = mailer; + } + + private static ImmutableSet buildAllowedRecipients(final Config config, final ObjectMapper mapper) { try { - _allowedRecipients = mapper.readValue(ConfigurationHelper.toJson(config, ALLOWED_RECIPIENTS_KEY), ALLOWED_RECIPIENTS_TYPE); + return mapper.readValue(ConfigurationHelper.toJson(config, ALLOWED_RECIPIENTS_KEY), ALLOWED_RECIPIENTS_TYPE); } catch (final IOException e) { throw new IllegalArgumentException(e); } diff --git a/app/com/arpnetworking/metrics/portal/reports/impl/chrome/BaseScreenshotRenderer.java b/app/com/arpnetworking/metrics/portal/reports/impl/chrome/BaseScreenshotRenderer.java index cad9b027c..4e59a70ab 100644 --- a/app/com/arpnetworking/metrics/portal/reports/impl/chrome/BaseScreenshotRenderer.java +++ b/app/com/arpnetworking/metrics/portal/reports/impl/chrome/BaseScreenshotRenderer.java @@ -120,16 +120,34 @@ public ImmutableList validateRender(final S source, final F format) { }); result.whenComplete((x, e) -> { - LOGGER.debug() - .setMessage("rendering completed") - .addData("source", source) - .addData("format", format) - .addData("timeRange", timeRange) - .addData("result", x) - .setThrowable(e) - .log(); - navigate.cancel(true); - dts.close(); + try { + if (e != null) { + LOGGER.error() + .setMessage("rendering failed") + .addData("source", source) + .addData("format", format) + .addData("timeRange", timeRange) + .setThrowable(e) + .log(); + } else { + LOGGER.debug() + .setMessage("rendering completed") + .addData("source", source) + .addData("format", format) + .addData("timeRange", timeRange) + .addData("result", x) + .log(); + } + navigate.cancel(true); + } finally { + dts.close(); + LOGGER.debug() + .setMessage("devtools service closed") + .addData("source", source) + .addData("format", format) + .addData("timeRange", timeRange) + .log(); + } }); TIMEOUT_SERVICE.schedule(() -> result.cancel(true), timeout.toNanos(), TimeUnit.NANOSECONDS); diff --git a/app/com/arpnetworking/metrics/portal/reports/impl/chrome/HtmlScreenshotRenderer.java b/app/com/arpnetworking/metrics/portal/reports/impl/chrome/HtmlScreenshotRenderer.java index 735fa129c..033b9b650 100644 --- a/app/com/arpnetworking/metrics/portal/reports/impl/chrome/HtmlScreenshotRenderer.java +++ b/app/com/arpnetworking/metrics/portal/reports/impl/chrome/HtmlScreenshotRenderer.java @@ -17,7 +17,9 @@ package com.arpnetworking.metrics.portal.reports.impl.chrome; import com.arpnetworking.metrics.portal.reports.RenderedReport; -import com.google.inject.Inject; +import com.arpnetworking.steno.Logger; +import com.arpnetworking.steno.LoggerFactory; +import jakarta.inject.Inject; import models.internal.TimeRange; import models.internal.impl.HtmlReportFormat; import models.internal.impl.WebPageReportSource; @@ -32,6 +34,7 @@ * @author Spencer Pearson (spencerpearson at dropbox dot com) */ public final class HtmlScreenshotRenderer extends BaseScreenshotRenderer { + private static final Logger LOGGER = LoggerFactory.getLogger(HtmlScreenshotRenderer.class); @Override protected boolean getIgnoreCertificateErrors(final WebPageReportSource source) { @@ -51,6 +54,13 @@ protected URI getUri(final WebPageReportSource source) { final TimeRange timeRange, final B builder ) { + LOGGER.debug() + .setMessage("Rendering page content to HTML") + .addData("source", source) + .addData("format", format) + .addData("timeRange", timeRange) + .addData("builder", builder) + .log(); return devToolsService.evaluate("document.documentElement.outerHTML").thenApply( jsObject -> builder.setBytes(((String) jsObject).getBytes(StandardCharsets.UTF_8)) ); diff --git a/app/com/arpnetworking/metrics/portal/reports/impl/chrome/PdfScreenshotRenderer.java b/app/com/arpnetworking/metrics/portal/reports/impl/chrome/PdfScreenshotRenderer.java index 9100838c3..38550751f 100644 --- a/app/com/arpnetworking/metrics/portal/reports/impl/chrome/PdfScreenshotRenderer.java +++ b/app/com/arpnetworking/metrics/portal/reports/impl/chrome/PdfScreenshotRenderer.java @@ -17,7 +17,9 @@ package com.arpnetworking.metrics.portal.reports.impl.chrome; import com.arpnetworking.metrics.portal.reports.RenderedReport; -import com.google.inject.Inject; +import com.arpnetworking.steno.Logger; +import com.arpnetworking.steno.LoggerFactory; +import jakarta.inject.Inject; import models.internal.TimeRange; import models.internal.impl.PdfReportFormat; import models.internal.impl.WebPageReportSource; @@ -31,6 +33,7 @@ * @author Spencer Pearson (spencerpearson at dropbox dot com) */ public final class PdfScreenshotRenderer extends BaseScreenshotRenderer { + private static final Logger LOGGER = LoggerFactory.getLogger(HtmlScreenshotRenderer.class); @Override protected boolean getIgnoreCertificateErrors(final WebPageReportSource source) { @@ -50,6 +53,13 @@ protected URI getUri(final WebPageReportSource source) { final TimeRange timeRange, final B builder ) { + LOGGER.debug() + .setMessage("Rendering page content to HTML") + .addData("source", source) + .addData("format", format) + .addData("timeRange", timeRange) + .addData("builder", builder) + .log(); return devToolsService.printToPdf(format.getWidthInches(), format.getHeightInches()).thenApply(builder::setBytes); } diff --git a/app/com/arpnetworking/metrics/portal/reports/impl/chrome/grafana/BaseGrafanaScreenshotRenderer.java b/app/com/arpnetworking/metrics/portal/reports/impl/chrome/grafana/BaseGrafanaScreenshotRenderer.java index a0abaf849..511fd38bd 100644 --- a/app/com/arpnetworking/metrics/portal/reports/impl/chrome/grafana/BaseGrafanaScreenshotRenderer.java +++ b/app/com/arpnetworking/metrics/portal/reports/impl/chrome/grafana/BaseGrafanaScreenshotRenderer.java @@ -21,7 +21,7 @@ import com.arpnetworking.metrics.portal.reports.impl.chrome.DevToolsService; import com.arpnetworking.steno.Logger; import com.arpnetworking.steno.LoggerFactory; -import com.google.inject.Inject; +import jakarta.inject.Inject; import models.internal.TimeRange; import models.internal.impl.GrafanaReportPanelReportSource; import models.internal.reports.ReportFormat; @@ -80,6 +80,12 @@ public URI getUri(final GrafanaReportPanelReportSource source) { final B builder ) { final CompletableFuture result = new CompletableFuture<>(); + LOGGER.debug() + .setMessage("waiting for reportrendered event") + .addData("source", source) + .addData("format", format) + .addData("timeRange", timeRange) + .log(); final CompletableFuture successFuture = devToolsService.nowOrOnEvent( "reportrendered", @@ -96,7 +102,7 @@ public URI getUri(final GrafanaReportPanelReportSource source) { } catch (final InterruptedException | ExecutionException e) { throw new CompletionException(e); } - final boolean ready = (html instanceof String) && !((String) html).isEmpty(); + final boolean ready = html instanceof String && !((String) html).isEmpty(); LOGGER.debug() .setMessage("checked for readiness") .addData("source", source) diff --git a/app/com/arpnetworking/metrics/portal/reports/impl/chrome/grafana/HtmlGrafanaScreenshotRenderer.java b/app/com/arpnetworking/metrics/portal/reports/impl/chrome/grafana/HtmlGrafanaScreenshotRenderer.java index 6e364ce9d..5a51031aa 100644 --- a/app/com/arpnetworking/metrics/portal/reports/impl/chrome/grafana/HtmlGrafanaScreenshotRenderer.java +++ b/app/com/arpnetworking/metrics/portal/reports/impl/chrome/grafana/HtmlGrafanaScreenshotRenderer.java @@ -19,7 +19,7 @@ import com.arpnetworking.metrics.portal.reports.RenderedReport; import com.arpnetworking.metrics.portal.reports.impl.chrome.DevToolsFactory; import com.arpnetworking.metrics.portal.reports.impl.chrome.DevToolsService; -import com.google.inject.Inject; +import jakarta.inject.Inject; import models.internal.TimeRange; import models.internal.impl.GrafanaReportPanelReportSource; import models.internal.impl.HtmlReportFormat; diff --git a/app/com/arpnetworking/metrics/portal/reports/impl/chrome/grafana/PdfGrafanaScreenshotRenderer.java b/app/com/arpnetworking/metrics/portal/reports/impl/chrome/grafana/PdfGrafanaScreenshotRenderer.java index 820ecb361..71ed53be2 100644 --- a/app/com/arpnetworking/metrics/portal/reports/impl/chrome/grafana/PdfGrafanaScreenshotRenderer.java +++ b/app/com/arpnetworking/metrics/portal/reports/impl/chrome/grafana/PdfGrafanaScreenshotRenderer.java @@ -19,7 +19,7 @@ import com.arpnetworking.metrics.portal.reports.RenderedReport; import com.arpnetworking.metrics.portal.reports.impl.chrome.DevToolsFactory; import com.arpnetworking.metrics.portal.reports.impl.chrome.DevToolsService; -import com.google.inject.Inject; +import jakarta.inject.Inject; import models.internal.TimeRange; import models.internal.impl.GrafanaReportPanelReportSource; import models.internal.impl.PdfReportFormat; diff --git a/app/com/arpnetworking/metrics/portal/scheduling/DefaultJobRefSerializer.java b/app/com/arpnetworking/metrics/portal/scheduling/DefaultJobRefSerializer.java index dd69efa31..8cf613a01 100644 --- a/app/com/arpnetworking/metrics/portal/scheduling/DefaultJobRefSerializer.java +++ b/app/com/arpnetworking/metrics/portal/scheduling/DefaultJobRefSerializer.java @@ -16,7 +16,7 @@ package com.arpnetworking.metrics.portal.scheduling; -import com.arpnetworking.commons.serialization.DeserializationException; +import com.arpnetworking.notcommons.serialization.DeserializationException; import models.internal.impl.DefaultOrganization; import java.util.Arrays; diff --git a/app/com/arpnetworking/metrics/portal/scheduling/JobCoordinator.java b/app/com/arpnetworking/metrics/portal/scheduling/JobCoordinator.java index 1f55670b1..0d03150e2 100644 --- a/app/com/arpnetworking/metrics/portal/scheduling/JobCoordinator.java +++ b/app/com/arpnetworking/metrics/portal/scheduling/JobCoordinator.java @@ -15,10 +15,6 @@ */ package com.arpnetworking.metrics.portal.scheduling; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.pattern.Patterns; -import akka.persistence.AbstractPersistentActorWithTimers; import com.arpnetworking.metrics.incubator.PeriodicMetrics; import com.arpnetworking.metrics.portal.organizations.OrganizationRepository; import com.arpnetworking.metrics.util.PagingIterator; @@ -28,6 +24,10 @@ import com.google.inject.Injector; import models.internal.Organization; import models.internal.scheduling.Job; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.persistence.AbstractPersistentActorWithTimers; import java.time.Clock; import java.time.Duration; @@ -61,7 +61,7 @@ public final class JobCoordinator extends AbstractPersistentActorWithTimers { * @param repositoryType The type of the repository to load. * @param execRepositoryType The type of the execution repository to load. * @param organizationRepository Provides the set of all {@link Organization}s to monitor in the repository. - * @param jobExecutorRegion The ref to the Akka cluster-sharding region that dispatches to {@link JobExecutorActor}s. + * @param jobExecutorRegion The ref to the Pekko cluster-sharding region that dispatches to {@link JobExecutorActor}s. * @param periodicMetrics The {@link PeriodicMetrics} that this actor will use to log its metrics. * @return A new props to create this actor. */ @@ -90,7 +90,7 @@ public static Props props( * @param repositoryType The type of the repository to load. * @param execRepositoryType The type of the execution repository to load. * @param organizationRepository Provides the set of all {@link Organization}s to monitor in the repository. - * @param jobExecutorRegion The ref to the Akka cluster-sharding region that dispatches to {@link JobExecutorActor}s. + * @param jobExecutorRegion The ref to the Pekko cluster-sharding region that dispatches to {@link JobExecutorActor}s. * @param periodicMetrics The {@link PeriodicMetrics} that this actor will use to log its metrics. * @return A new props to create this actor. */ @@ -136,10 +136,10 @@ public void preStart() throws Exception { super.preStart(); // Tick once at startup, then periodically thereafter. self().tell(ANTI_ENTROPY_TICK, self()); - timers().startPeriodicTimer( + timers().startTimerAtFixedRate( ANTI_ENTROPY_PERIODIC_TIMER_NAME, ANTI_ENTROPY_TICK, - scala.concurrent.duration.Duration.fromNanos(ANTI_ENTROPY_TICK_INTERVAL.toNanos())); + ANTI_ENTROPY_TICK_INTERVAL); } /** diff --git a/app/com/arpnetworking/metrics/portal/scheduling/JobExecutorActor.java b/app/com/arpnetworking/metrics/portal/scheduling/JobExecutorActor.java index 82ebeceb2..16184932a 100644 --- a/app/com/arpnetworking/metrics/portal/scheduling/JobExecutorActor.java +++ b/app/com/arpnetworking/metrics/portal/scheduling/JobExecutorActor.java @@ -15,16 +15,10 @@ */ package com.arpnetworking.metrics.portal.scheduling; -import akka.actor.AbstractActorWithTimers; -import akka.actor.PoisonPill; -import akka.actor.Props; -import akka.actor.Status; -import akka.cluster.sharding.ShardRegion; -import akka.pattern.Patterns; import com.arpnetworking.commons.builder.OvalBuilder; -import com.arpnetworking.commons.serialization.DeserializationException; -import com.arpnetworking.commons.serialization.Deserializer; import com.arpnetworking.metrics.incubator.PeriodicMetrics; +import com.arpnetworking.notcommons.serialization.DeserializationException; +import com.arpnetworking.notcommons.serialization.Deserializer; import com.arpnetworking.steno.Logger; import com.arpnetworking.steno.LoggerFactory; import com.google.common.base.CaseFormat; @@ -35,13 +29,18 @@ import models.internal.scheduling.JobExecution; import net.sf.oval.constraint.NotNull; import net.sf.oval.constraint.ValidateWithMethod; -import scala.concurrent.duration.Duration; -import scala.concurrent.duration.FiniteDuration; +import org.apache.pekko.actor.AbstractActorWithTimers; +import org.apache.pekko.actor.PoisonPill; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.cluster.sharding.ShardRegion; +import org.apache.pekko.pattern.Patterns; import java.io.Serializable; import java.net.URLDecoder; import java.nio.charset.StandardCharsets; import java.time.Clock; +import java.time.Duration; import java.time.Instant; import java.time.temporal.ChronoUnit; import java.util.NoSuchElementException; @@ -188,7 +187,7 @@ public void postRestart(final Throwable reason) throws Exception { } private void scheduleTickFor(final Instant wakeUpAt) { - final FiniteDuration delta = Duration.fromNanos(Math.max(0, ChronoUnit.NANOS.between(_clock.instant(), wakeUpAt))); + final Duration delta = Duration.ofNanos(Math.max(0, ChronoUnit.NANOS.between(_clock.instant(), wakeUpAt))); timers().startSingleTimer(EXTRA_TICK_TIMER_NAME, Tick.INSTANCE, delta); } @@ -231,7 +230,7 @@ private void initializeOrEnsureRefMatch(final JobRef ref) throws IllegalState private JobRef unsafeJobRefCast(@SuppressWarnings("rawtypes") final JobRef ref) { - // THIS MAKES ME SO SAD. But there's simply no way to plumb the type information through Akka. + // THIS MAKES ME SO SAD. But there's simply no way to plumb the type information through Pekko. @SuppressWarnings("unchecked") final JobRef typedRef = ref; return typedRef; @@ -566,7 +565,7 @@ public Receive createReceive() { .match(RestartTicker.class, message -> { _currentlyReloading = false; _lastRun = message.getLastRun(); - timers().startPeriodicTimer(PERIODIC_TICK_TIMER_NAME, Tick.INSTANCE, TICK_INTERVAL); + timers().startTimerAtFixedRate(PERIODIC_TICK_TIMER_NAME, Tick.INSTANCE, TICK_INTERVAL); getSelf().tell(Tick.INSTANCE, getSelf()); }) // If any message piping future fails the actor should be restarted. @@ -577,7 +576,7 @@ public Receive createReceive() { private static final String EXTRA_TICK_TIMER_NAME = "EXTRA_TICK"; private static final String PERIODIC_TICK_TIMER_NAME = "PERIODIC_TICK"; - private static final FiniteDuration TICK_INTERVAL = Duration.apply(1, TimeUnit.MINUTES); + private static final Duration TICK_INTERVAL = Duration.ofMinutes(1); /** * If we wake up very slightly before we're supposed to execute, we should just execute, * rather than scheduling another wakeup in the very near future. @@ -589,7 +588,7 @@ public Receive createReceive() { * Internal message telling the actor to request a permanent shutdown. * * This exists because it is unsafe to call `killSelfPermanently` from inside - * a CompletionStage, since we could be outside an Akka dispatcher thread. + * a CompletionStage, since we could be outside an Pekko dispatcher thread. */ private static final String REQUEST_PERMANENT_SHUTDOWN = "REQUEST_SHUTDOWN"; @@ -825,7 +824,7 @@ public Builder setResult(@Nullable final T result) { @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", justification = "invoked reflectively by @ValidateWithMethod") private boolean validateErrorAndResult(@Nullable final Object result) { - return (result == null) ^ (_error == null); + return result == null ^ _error == null; } } } diff --git a/app/com/arpnetworking/metrics/portal/scheduling/JobMessageExtractor.java b/app/com/arpnetworking/metrics/portal/scheduling/JobMessageExtractor.java index af2595230..dfa6c7279 100644 --- a/app/com/arpnetworking/metrics/portal/scheduling/JobMessageExtractor.java +++ b/app/com/arpnetworking/metrics/portal/scheduling/JobMessageExtractor.java @@ -15,8 +15,8 @@ */ package com.arpnetworking.metrics.portal.scheduling; -import akka.cluster.sharding.ShardRegion; -import com.arpnetworking.commons.serialization.Serializer; +import com.arpnetworking.notcommons.serialization.Serializer; +import org.apache.pekko.cluster.sharding.ShardRegion; import javax.annotation.Nullable; diff --git a/app/com/arpnetworking/metrics/portal/scheduling/JobRefSerializer.java b/app/com/arpnetworking/metrics/portal/scheduling/JobRefSerializer.java index 2c35e188b..8d49b1197 100644 --- a/app/com/arpnetworking/metrics/portal/scheduling/JobRefSerializer.java +++ b/app/com/arpnetworking/metrics/portal/scheduling/JobRefSerializer.java @@ -16,14 +16,14 @@ package com.arpnetworking.metrics.portal.scheduling; -import com.arpnetworking.commons.serialization.Deserializer; -import com.arpnetworking.commons.serialization.Serializer; +import com.arpnetworking.notcommons.serialization.Deserializer; +import com.arpnetworking.notcommons.serialization.Serializer; /** * A type that allows for both serialization and deserialization of JobRefs. *

* Alongside a {@link JobMessageExtractor}, this can be used as a workaround - * for the lack of dynamic props in Akka's classic cluster sharding. + * for the lack of dynamic props in Pekko's classic cluster sharding. *

* See this SO post for more details. This is Option A. *

diff --git a/app/com/arpnetworking/metrics/portal/scheduling/impl/BoundedSchedule.java b/app/com/arpnetworking/metrics/portal/scheduling/impl/BoundedSchedule.java index 415c22848..8e13f2099 100644 --- a/app/com/arpnetworking/metrics/portal/scheduling/impl/BoundedSchedule.java +++ b/app/com/arpnetworking/metrics/portal/scheduling/impl/BoundedSchedule.java @@ -153,7 +153,7 @@ public B setRunUntil(@Nullable final Instant runUntil) { @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", justification = "invoked reflectively by @ValidateWithMethod") private boolean validateRunAtAndAfter(final Instant runAtAndAfter) { - return !runAtAndAfter.equals(Instant.MIN) && ((_runUntil == null) || !runAtAndAfter.isAfter(_runUntil)); + return !runAtAndAfter.equals(Instant.MIN) && (_runUntil == null || !runAtAndAfter.isAfter(_runUntil)); } } } diff --git a/app/com/arpnetworking/metrics/portal/scheduling/impl/DatabaseExecutionHelper.java b/app/com/arpnetworking/metrics/portal/scheduling/impl/DatabaseExecutionHelper.java index b8a836a40..a14e9264b 100644 --- a/app/com/arpnetworking/metrics/portal/scheduling/impl/DatabaseExecutionHelper.java +++ b/app/com/arpnetworking/metrics/portal/scheduling/impl/DatabaseExecutionHelper.java @@ -19,8 +19,9 @@ import com.arpnetworking.metrics.portal.scheduling.JobExecutionRepository; import com.arpnetworking.steno.Logger; import com.google.common.base.Throwables; -import io.ebean.EbeanServer; +import io.ebean.Database; import io.ebean.Transaction; +import jakarta.persistence.PersistenceException; import models.ebean.BaseExecution; import models.internal.Organization; import models.internal.scheduling.JobExecution; @@ -31,7 +32,6 @@ import java.util.concurrent.Executor; import java.util.function.Consumer; import javax.annotation.Nullable; -import javax.persistence.PersistenceException; /** * Helper class for implementing a SQL-backed {@link JobExecutionRepository}, providing facilities for updating the state @@ -45,7 +45,7 @@ * @author Christian Briones (cbriones at dropbox dot com) */ public final class DatabaseExecutionHelper> { - private final EbeanServer _ebeanServer; + private final Database _ebeanServer; private final ExecutionAdapter _adapter; private final Logger _logger; private Executor _executor; @@ -60,7 +60,7 @@ public final class DatabaseExecutionHelper> { */ public DatabaseExecutionHelper( final Logger logger, - final EbeanServer ebeanServer, + final Database ebeanServer, final ExecutionAdapter adapter, final Executor executor ) { diff --git a/app/com/arpnetworking/metrics/portal/scheduling/impl/PeriodicSchedule.java b/app/com/arpnetworking/metrics/portal/scheduling/impl/PeriodicSchedule.java index 48f39e3ae..36a958de3 100644 --- a/app/com/arpnetworking/metrics/portal/scheduling/impl/PeriodicSchedule.java +++ b/app/com/arpnetworking/metrics/portal/scheduling/impl/PeriodicSchedule.java @@ -16,6 +16,8 @@ package com.arpnetworking.metrics.portal.scheduling.impl; import com.arpnetworking.logback.annotations.Loggable; +import com.arpnetworking.steno.Logger; +import com.arpnetworking.steno.LoggerFactory; import com.google.common.base.MoreObjects; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import net.sf.oval.constraint.NotNull; @@ -26,6 +28,7 @@ import java.time.ZoneId; import java.time.ZonedDateTime; import java.time.temporal.ChronoUnit; +import java.time.temporal.UnsupportedTemporalTypeException; import java.util.Objects; import java.util.Optional; @@ -48,6 +51,7 @@ public final class PeriodicSchedule extends BoundedSchedule { private final long _periodCount; private final ZoneId _zone; private final Duration _offset; + private static final Logger LOGGER = LoggerFactory.getLogger(PeriodicSchedule.class); private PeriodicSchedule(final Builder builder) { super(builder); @@ -60,16 +64,35 @@ private PeriodicSchedule(final Builder builder) { @Override protected Optional unboundedNextRun(final Optional lastRun) { final Instant untruncatedNextRun = lastRun - .map(run -> run.plus(_periodCount, _period)) + .map(run -> _period.addTo(run, _periodCount)) .orElseGet(this::getRunAtAndAfter); - final Instant nextRun = - ZonedDateTime.ofInstant(untruncatedNextRun, _zone) - .truncatedTo(_period) - .plus(_offset) - .toInstant(); - - return Optional.of(nextRun); + try { + final ChronoUnit truncationPeriod; + if (_period.getDuration().toMillis() > Duration.ofDays(1).toMillis()) { + truncationPeriod = ChronoUnit.DAYS; + } else { + truncationPeriod = _period; + } + final Instant nextRun = + ZonedDateTime.ofInstant(untruncatedNextRun, _zone) + .truncatedTo(truncationPeriod) + .plus(_offset) + .toInstant(); + + return Optional.of(nextRun); + } catch (final UnsupportedTemporalTypeException e) { + LOGGER.error().setMessage("Error creating next run time") + .addData("lastRun", lastRun) + .addData("untruncatedNextRun", untruncatedNextRun) + .addData("period", _period) + .addData("periodCount", _periodCount) + .addData("zone", _zone) + .addData("offset", _offset) + .setThrowable(e) + .log(); + throw e; + } } @Override diff --git a/app/com/arpnetworking/metrics/util/AkkaForkJoinPoolAdapter.java b/app/com/arpnetworking/metrics/util/AkkaForkJoinPoolAdapter.java deleted file mode 100644 index d20b0f272..000000000 --- a/app/com/arpnetworking/metrics/util/AkkaForkJoinPoolAdapter.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2017 Smartsheet - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.arpnetworking.metrics.util; - -/** - * This is a partial adapter to enable instrumentation of Akka's - * {@code ForkJoinPool} as if it were a Java {@code ForkJoinPool}. - * - * @author Brandon Arp (brandon dot arp at smartsheet dot com) - */ -public final class AkkaForkJoinPoolAdapter extends InstrumentingPoolAdapter { - /** - * Public constructor. - * - * @param akkaForkJoinPool pool to measure - */ - public AkkaForkJoinPoolAdapter(final akka.dispatch.forkjoin.ForkJoinPool akkaForkJoinPool) { - _akkaForkJoinPool = akkaForkJoinPool; - } - - private final akka.dispatch.forkjoin.ForkJoinPool _akkaForkJoinPool; - - @Override - public int getParallelism() { - return _akkaForkJoinPool.getParallelism(); - } - - @Override - public int getPoolSize() { - return _akkaForkJoinPool.getPoolSize(); - } - - @Override - public int getRunningThreadCount() { - return _akkaForkJoinPool.getRunningThreadCount(); - } - - @Override - public int getActiveThreadCount() { - return _akkaForkJoinPool.getActiveThreadCount(); - } - - @Override - public boolean isQuiescent() { - return _akkaForkJoinPool.isQuiescent(); - } - - @Override - public long getStealCount() { - return _akkaForkJoinPool.getStealCount(); - } - - @Override - public long getQueuedTaskCount() { - return _akkaForkJoinPool.getQueuedTaskCount(); - } - - @Override - public int getQueuedSubmissionCount() { - return _akkaForkJoinPool.getQueuedSubmissionCount(); - } - - @Override - public boolean hasQueuedSubmissions() { - return _akkaForkJoinPool.hasQueuedSubmissions(); - } - - @Override - public String toString() { - return _akkaForkJoinPool.toString(); - } -} diff --git a/app/com/arpnetworking/metrics/util/ScalaForkJoinPoolAdapter.java b/app/com/arpnetworking/metrics/util/ScalaForkJoinPoolAdapter.java deleted file mode 100644 index 3f0d5a38e..000000000 --- a/app/com/arpnetworking/metrics/util/ScalaForkJoinPoolAdapter.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2017 Smartsheet - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.arpnetworking.metrics.util; - -import scala.concurrent.forkjoin.ForkJoinPool; - -/** - * This is a partial adapter to enable instrumentation of Scala's - * {@code ForkJoinPool} as if it were a Java {@code ForkJoinPool}. - * - * @author Ville Koskela (ville dot koskela at inscopemetrics dot io) - */ -public final class ScalaForkJoinPoolAdapter extends InstrumentingPoolAdapter { - - /** - * Public constructor. - * - * @param scalaForkJoinPool pool to measure - */ - public ScalaForkJoinPoolAdapter(final ForkJoinPool scalaForkJoinPool) { - _scalaForkJoinPool = scalaForkJoinPool; - } - - private final ForkJoinPool _scalaForkJoinPool; - - @Override - public int getParallelism() { - return _scalaForkJoinPool.getParallelism(); - } - - @Override - public int getPoolSize() { - return _scalaForkJoinPool.getPoolSize(); - } - - @Override - public int getRunningThreadCount() { - return _scalaForkJoinPool.getRunningThreadCount(); - } - - @Override - public int getActiveThreadCount() { - return _scalaForkJoinPool.getActiveThreadCount(); - } - - @Override - public boolean isQuiescent() { - return _scalaForkJoinPool.isQuiescent(); - } - - @Override - public long getStealCount() { - return _scalaForkJoinPool.getStealCount(); - } - - @Override - public long getQueuedTaskCount() { - return _scalaForkJoinPool.getQueuedTaskCount(); - } - - @Override - public int getQueuedSubmissionCount() { - return _scalaForkJoinPool.getQueuedSubmissionCount(); - } - - @Override - public boolean hasQueuedSubmissions() { - return _scalaForkJoinPool.hasQueuedSubmissions(); - } - - @Override - public String toString() { - return _scalaForkJoinPool.toString(); - } -} diff --git a/app/com/arpnetworking/commons/jackson/databind/module/akka/ActorRefDeserializer.java b/app/com/arpnetworking/notcommons/jackson/databind/module/pekko/ActorRefDeserializer.java similarity index 90% rename from app/com/arpnetworking/commons/jackson/databind/module/akka/ActorRefDeserializer.java rename to app/com/arpnetworking/notcommons/jackson/databind/module/pekko/ActorRefDeserializer.java index 8303c7b5e..274256d6d 100644 --- a/app/com/arpnetworking/commons/jackson/databind/module/akka/ActorRefDeserializer.java +++ b/app/com/arpnetworking/notcommons/jackson/databind/module/pekko/ActorRefDeserializer.java @@ -13,20 +13,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.arpnetworking.commons.jackson.databind.module.akka; +package com.arpnetworking.notcommons.jackson.databind.module.pekko; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; import com.arpnetworking.logback.annotations.LogValue; import com.arpnetworking.steno.LogValueMapFactory; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.JsonDeserializer; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; import java.io.IOException; /** - * Deserializer for an Akka ActorRef. + * Deserializer for an Pekko ActorRef. * * @author Brandon Arp (brandon dot arp at inscopemetrics dot com) */ diff --git a/app/com/arpnetworking/commons/jackson/databind/module/akka/ActorRefLoggingSerializer.java b/app/com/arpnetworking/notcommons/jackson/databind/module/pekko/ActorRefLoggingSerializer.java similarity index 89% rename from app/com/arpnetworking/commons/jackson/databind/module/akka/ActorRefLoggingSerializer.java rename to app/com/arpnetworking/notcommons/jackson/databind/module/pekko/ActorRefLoggingSerializer.java index bc4633a45..83b6b7c59 100644 --- a/app/com/arpnetworking/commons/jackson/databind/module/akka/ActorRefLoggingSerializer.java +++ b/app/com/arpnetworking/notcommons/jackson/databind/module/pekko/ActorRefLoggingSerializer.java @@ -13,17 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.arpnetworking.commons.jackson.databind.module.akka; +package com.arpnetworking.notcommons.jackson.databind.module.pekko; -import akka.actor.ActorRef; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; +import org.apache.pekko.actor.ActorRef; import java.io.IOException; /** - * Serializer for an Akka ActorRef. + * Serializer for an Pekko ActorRef. * * @author Ville Koskela (ville dot koskela at inscopemetrics dot com) */ diff --git a/app/com/arpnetworking/commons/jackson/databind/module/akka/ActorRefSerializer.java b/app/com/arpnetworking/notcommons/jackson/databind/module/pekko/ActorRefSerializer.java similarity index 85% rename from app/com/arpnetworking/commons/jackson/databind/module/akka/ActorRefSerializer.java rename to app/com/arpnetworking/notcommons/jackson/databind/module/pekko/ActorRefSerializer.java index d118caebc..ef493ef3b 100644 --- a/app/com/arpnetworking/commons/jackson/databind/module/akka/ActorRefSerializer.java +++ b/app/com/arpnetworking/notcommons/jackson/databind/module/pekko/ActorRefSerializer.java @@ -13,18 +13,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.arpnetworking.commons.jackson.databind.module.akka; +package com.arpnetworking.notcommons.jackson.databind.module.pekko; -import akka.actor.ActorRef; -import akka.serialization.Serialization; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.serialization.Serialization; import java.io.IOException; /** - * Serializer for an Akka ActorRef. + * Serializer for an Pekko ActorRef. * * @author Brandon Arp (brandon dot arp at inscopemetrics dot com) */ diff --git a/app/com/arpnetworking/commons/jackson/databind/module/akka/AkkaLoggingModule.java b/app/com/arpnetworking/notcommons/jackson/databind/module/pekko/PekkoLoggingModule.java similarity index 79% rename from app/com/arpnetworking/commons/jackson/databind/module/akka/AkkaLoggingModule.java rename to app/com/arpnetworking/notcommons/jackson/databind/module/pekko/PekkoLoggingModule.java index 9fb9d2d5b..61bfc81a8 100644 --- a/app/com/arpnetworking/commons/jackson/databind/module/akka/AkkaLoggingModule.java +++ b/app/com/arpnetworking/notcommons/jackson/databind/module/pekko/PekkoLoggingModule.java @@ -13,23 +13,23 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.arpnetworking.commons.jackson.databind.module.akka; +package com.arpnetworking.notcommons.jackson.databind.module.pekko; -import akka.actor.ActorRef; import com.fasterxml.jackson.databind.module.SimpleModule; +import org.apache.pekko.actor.ActorRef; /** - * Jackson module for serializing Akka objects for use in JSON/Jackson based + * Jackson module for serializing Pekko objects for use in JSON/Jackson based * logger serializers(e.g. logback-steno). * * @author Ville Koskela (ville dot koskela at inscopemetrics dot com) */ -public final class AkkaLoggingModule extends SimpleModule { +public final class PekkoLoggingModule extends SimpleModule { /** * Public constructor. */ - public AkkaLoggingModule() { } + public PekkoLoggingModule() { } @Override public void setupModule(final SetupContext context) { diff --git a/app/com/arpnetworking/commons/jackson/databind/module/akka/AkkaModule.java b/app/com/arpnetworking/notcommons/jackson/databind/module/pekko/PekkoModule.java similarity index 79% rename from app/com/arpnetworking/commons/jackson/databind/module/akka/AkkaModule.java rename to app/com/arpnetworking/notcommons/jackson/databind/module/pekko/PekkoModule.java index f7aab1093..8d8ab68f0 100644 --- a/app/com/arpnetworking/commons/jackson/databind/module/akka/AkkaModule.java +++ b/app/com/arpnetworking/notcommons/jackson/databind/module/pekko/PekkoModule.java @@ -13,28 +13,30 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.arpnetworking.commons.jackson.databind.module.akka; +package com.arpnetworking.notcommons.jackson.databind.module.pekko; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; import com.arpnetworking.logback.annotations.LogValue; import com.arpnetworking.steno.LogValueMapFactory; import com.fasterxml.jackson.databind.module.SimpleModule; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; + +import java.io.Serial; /** - * Jackson module for serializing and deserializing Akka objects. + * Jackson module for serializing and deserializing Pekko objects. * * @author Brandon Arp (brandon dot arp at inscopemetrics dot com) */ -public final class AkkaModule extends SimpleModule { +public final class PekkoModule extends SimpleModule { /** * Public constructor. * * @param system the actor system to resolve references */ - public AkkaModule(final ActorSystem system) { + public PekkoModule(final ActorSystem system) { _system = system; } @@ -62,8 +64,9 @@ public String toString() { return toLogValue().toString(); } - @SuppressFBWarnings("SE_BAD_FIELD") - private final ActorSystem _system; + @SuppressFBWarnings("SE_TRANSIENT_FIELD_NOT_RESTORED") + private final transient ActorSystem _system; + @Serial private static final long serialVersionUID = 4294591813352245070L; } diff --git a/app/com/arpnetworking/commons/jackson/databind/module/akka/package-info.java b/app/com/arpnetworking/notcommons/jackson/databind/module/pekko/package-info.java similarity index 92% rename from app/com/arpnetworking/commons/jackson/databind/module/akka/package-info.java rename to app/com/arpnetworking/notcommons/jackson/databind/module/pekko/package-info.java index 70e7ac59d..0e5d6a59e 100644 --- a/app/com/arpnetworking/commons/jackson/databind/module/akka/package-info.java +++ b/app/com/arpnetworking/notcommons/jackson/databind/module/pekko/package-info.java @@ -16,7 +16,7 @@ @ParametersAreNonnullByDefault @ReturnValuesAreNonnullByDefault -package com.arpnetworking.commons.jackson.databind.module.akka; +package com.arpnetworking.notcommons.jackson.databind.module.pekko; import com.arpnetworking.commons.javax.annotation.ReturnValuesAreNonnullByDefault; diff --git a/app/com/arpnetworking/commons/java/time/TimeAdapters.java b/app/com/arpnetworking/notcommons/java/time/TimeAdapters.java similarity index 97% rename from app/com/arpnetworking/commons/java/time/TimeAdapters.java rename to app/com/arpnetworking/notcommons/java/time/TimeAdapters.java index be9e56aab..ddf9737a8 100644 --- a/app/com/arpnetworking/commons/java/time/TimeAdapters.java +++ b/app/com/arpnetworking/notcommons/java/time/TimeAdapters.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.arpnetworking.commons.java.time; +package com.arpnetworking.notcommons.java.time; import java.time.temporal.ChronoUnit; import java.util.concurrent.TimeUnit; diff --git a/app/com/arpnetworking/commons/java/time/package-info.java b/app/com/arpnetworking/notcommons/java/time/package-info.java similarity index 94% rename from app/com/arpnetworking/commons/java/time/package-info.java rename to app/com/arpnetworking/notcommons/java/time/package-info.java index 25463e138..550cdac23 100644 --- a/app/com/arpnetworking/commons/java/time/package-info.java +++ b/app/com/arpnetworking/notcommons/java/time/package-info.java @@ -16,7 +16,7 @@ @ParametersAreNonnullByDefault @ReturnValuesAreNonnullByDefault -package com.arpnetworking.commons.java.time; +package com.arpnetworking.notcommons.java.time; import com.arpnetworking.commons.javax.annotation.ReturnValuesAreNonnullByDefault; diff --git a/app/com/arpnetworking/commons/java/util/LexicalNumericComparator.java b/app/com/arpnetworking/notcommons/java/util/LexicalNumericComparator.java similarity index 97% rename from app/com/arpnetworking/commons/java/util/LexicalNumericComparator.java rename to app/com/arpnetworking/notcommons/java/util/LexicalNumericComparator.java index a09d4a6ce..cd3f485c8 100644 --- a/app/com/arpnetworking/commons/java/util/LexicalNumericComparator.java +++ b/app/com/arpnetworking/notcommons/java/util/LexicalNumericComparator.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.arpnetworking.commons.java.util; +package com.arpnetworking.notcommons.java.util; import java.io.Serializable; import java.util.Comparator; diff --git a/test/java/com/arpnetworking/commons/java/util/package-info.java b/app/com/arpnetworking/notcommons/java/util/package-info.java similarity index 94% rename from test/java/com/arpnetworking/commons/java/util/package-info.java rename to app/com/arpnetworking/notcommons/java/util/package-info.java index 831bdcb94..e8ec6e789 100644 --- a/test/java/com/arpnetworking/commons/java/util/package-info.java +++ b/app/com/arpnetworking/notcommons/java/util/package-info.java @@ -16,7 +16,7 @@ @ParametersAreNonnullByDefault @ReturnValuesAreNonnullByDefault -package com.arpnetworking.commons.java.util; +package com.arpnetworking.notcommons.java.util; import com.arpnetworking.commons.javax.annotation.ReturnValuesAreNonnullByDefault; diff --git a/app/com/arpnetworking/commons/akka/JacksonSerializer.java b/app/com/arpnetworking/notcommons/pekko/JacksonSerializer.java similarity index 77% rename from app/com/arpnetworking/commons/akka/JacksonSerializer.java rename to app/com/arpnetworking/notcommons/pekko/JacksonSerializer.java index ca62309a2..98bddc3c2 100644 --- a/app/com/arpnetworking/commons/akka/JacksonSerializer.java +++ b/app/com/arpnetworking/notcommons/pekko/JacksonSerializer.java @@ -14,24 +14,25 @@ * limitations under the License. */ -package com.arpnetworking.commons.akka; +package com.arpnetworking.notcommons.pekko; -import akka.actor.ExtendedActorSystem; -import akka.serialization.JSerializer; import com.arpnetworking.steno.Logger; import com.arpnetworking.steno.LoggerFactory; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Preconditions; import edu.umd.cs.findbugs.annotations.Nullable; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; +import org.apache.pekko.actor.ExtendedActorSystem; +import org.apache.pekko.serialization.JSerializer; import java.io.IOException; /** - * Serializer for Akka using Jackson. + * Serializer for Pekko using Jackson. *
- * This should be replaced with akka-jackson-serialization once this project is - * is on Scala 2.12+ and Akka 2.6+. + * This should be replaced with pekko-jackson-serialization once this project is + * is on Scala 2.12+ and Pekko. * * @author Christian Briones (cbriones at dropbox dot com) */ @@ -40,7 +41,7 @@ public class JacksonSerializer extends JSerializer { private static @Nullable ObjectMapper gObjectMapper; /** - * Constructor used by Akka upon system initialization. + * Constructor used by Pekko upon system initialization. * * @param ignored the actor system */ @@ -50,7 +51,7 @@ public JacksonSerializer(final ExtendedActorSystem ignored) {} * Set the object mapper to be used by all instances. *
* This should only be called once, before initialization. This method exists - * because Akka does not provide any initialization hooks for serializers outside + * because Pekko does not provide any initialization hooks for serializers outside * of passing the configuration object. *
* Since we don't want to define the ObjectMapper twice (once in Guice, the other in the @@ -58,6 +59,7 @@ public JacksonSerializer(final ExtendedActorSystem ignored) {} * * @param objectMapper the ObjectMapper to use. */ + @SuppressFBWarnings(value = "EI_EXPOSE_STATIC_REP2", justification = "Must take an object mapper") public static void setObjectMapper(final ObjectMapper objectMapper) { if (gObjectMapper != null) { LOGGER.warn("ObjectMapper was already registered."); @@ -67,6 +69,7 @@ public static void setObjectMapper(final ObjectMapper objectMapper) { @Override + @SuppressFBWarnings(value = "NP_NULL_ON_SOME_PATH", justification = "Preconditions.checkNotNull will throw") public Object fromBinaryJava(final byte[] bytes, final Class manifest) { Preconditions.checkNotNull(manifest, "Jackson deserialization requires a manifest."); Preconditions.checkNotNull(gObjectMapper, "The mapper was not configured at startup."); @@ -79,12 +82,13 @@ public Object fromBinaryJava(final byte[] bytes, final Class manifest) { @Override public int identifier() { - // Akka allows for this to be any integer >40. + // Pekko allows for this to be any integer >40. // Randomly generated from IDE. return 564_386_063; } @Override + @SuppressFBWarnings(value = "NP_NULL_ON_SOME_PATH", justification = "Preconditions.checkNotNull will throw") public byte[] toBinary(final Object o) { Preconditions.checkNotNull(gObjectMapper, "The mapper was not configured at startup."); try { diff --git a/app/com/arpnetworking/commons/akka/ParallelLeastShardAllocationStrategy.java b/app/com/arpnetworking/notcommons/pekko/ParallelLeastShardAllocationStrategy.java similarity index 92% rename from app/com/arpnetworking/commons/akka/ParallelLeastShardAllocationStrategy.java rename to app/com/arpnetworking/notcommons/pekko/ParallelLeastShardAllocationStrategy.java index 01fd957a9..b206bef57 100644 --- a/app/com/arpnetworking/commons/akka/ParallelLeastShardAllocationStrategy.java +++ b/app/com/arpnetworking/notcommons/pekko/ParallelLeastShardAllocationStrategy.java @@ -13,12 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.arpnetworking.commons.akka; +package com.arpnetworking.notcommons.pekko; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.cluster.sharding.ShardCoordinator; -import akka.dispatch.Futures; import com.arpnetworking.steno.Logger; import com.arpnetworking.steno.LoggerFactory; import com.google.common.collect.ImmutableMap; @@ -26,9 +22,13 @@ import com.google.common.collect.Iterables; import com.google.common.collect.Maps; import com.google.common.collect.Sets; -import scala.collection.JavaConversions; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.cluster.sharding.ShardCoordinator; +import org.apache.pekko.dispatch.Futures; import scala.collection.immutable.IndexedSeq; import scala.concurrent.Future; +import scala.jdk.CollectionConverters; import java.io.Serializable; import java.time.ZonedDateTime; @@ -52,7 +52,7 @@ public final class ParallelLeastShardAllocationStrategy extends ShardCoordinator * * @param maxParallel number of allocations to start in parallel * @param rebalanceThreshold difference in number of shards required to cause a rebalance - * @param notify the {@link akka.actor.ActorSelection} selection to notify of changes + * @param notify the {@link org.apache.pekko.actor.ActorSelection} selection to notify of changes */ public ParallelLeastShardAllocationStrategy( final int maxParallel, @@ -80,7 +80,7 @@ public Future allocateShard( return Futures.successful(currentShardAllocations .entrySet() .stream() - .sorted(Comparator.comparingInt(e -> JavaConversions.seqAsJavaList(e.getValue()).size())) + .sorted(Comparator.comparingInt(e -> CollectionConverters.SeqHasAsJava(e.getValue()).asJava().size())) .findFirst() .get() .getKey()); @@ -99,12 +99,13 @@ public Future> rebalance( new TreeSet<>(Comparator.comparingInt(RegionShardAllocations::getEffectiveShardCount)); for (final Map.Entry> entry : currentShardAllocations.entrySet()) { + final IndexedSeq shardSeq = entry.getValue(); + final Set shards = Sets.newHashSet(CollectionConverters.IterableHasAsJava(shardSeq).asJava()); allocations.add( new RegionShardAllocations( entry.getKey(), // Only count the shards that are not currently rebalancing - JavaConversions.setAsJavaSet(entry.getValue().toSet()) - .stream() + shards.stream() .filter(e -> !rebalanceInProgress.contains(e)) .collect(Collectors.toSet()))); } @@ -153,7 +154,7 @@ public Future> rebalance( // Scala representation final Map> currentAllocations = Maps.transformValues( currentShardAllocations, - e -> Sets.newHashSet(JavaConversions.seqAsJavaList(e))); + e -> Sets.newHashSet(CollectionConverters.SeqHasAsJava(e).asJava())); final RebalanceNotification notification = new RebalanceNotification( currentAllocations, diff --git a/app/com/arpnetworking/commons/akka/AkkaJsonSerializable.java b/app/com/arpnetworking/notcommons/pekko/PekkoJsonSerializable.java similarity index 89% rename from app/com/arpnetworking/commons/akka/AkkaJsonSerializable.java rename to app/com/arpnetworking/notcommons/pekko/PekkoJsonSerializable.java index 96d8d28c1..6e2f2c1c0 100644 --- a/app/com/arpnetworking/commons/akka/AkkaJsonSerializable.java +++ b/app/com/arpnetworking/notcommons/pekko/PekkoJsonSerializable.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.arpnetworking.commons.akka; +package com.arpnetworking.notcommons.pekko; /** * Marker interface for message types to indicate they should be serialized using @@ -21,4 +21,4 @@ * * @author Christian Briones (cbriones at dropbox dot com) */ -public interface AkkaJsonSerializable { } +public interface PekkoJsonSerializable { } diff --git a/app/com/arpnetworking/commons/akka/package-info.java b/app/com/arpnetworking/notcommons/pekko/package-info.java similarity index 94% rename from app/com/arpnetworking/commons/akka/package-info.java rename to app/com/arpnetworking/notcommons/pekko/package-info.java index 3b1c7ae42..77c9267a3 100644 --- a/app/com/arpnetworking/commons/akka/package-info.java +++ b/app/com/arpnetworking/notcommons/pekko/package-info.java @@ -16,7 +16,7 @@ @ParametersAreNonnullByDefault @ReturnValuesAreNonnullByDefault -package com.arpnetworking.commons.akka; +package com.arpnetworking.notcommons.pekko; import com.arpnetworking.commons.javax.annotation.ReturnValuesAreNonnullByDefault; diff --git a/app/com/arpnetworking/commons/serialization/DeserializationException.java b/app/com/arpnetworking/notcommons/serialization/DeserializationException.java similarity index 96% rename from app/com/arpnetworking/commons/serialization/DeserializationException.java rename to app/com/arpnetworking/notcommons/serialization/DeserializationException.java index 68b0550a7..e215cb756 100644 --- a/app/com/arpnetworking/commons/serialization/DeserializationException.java +++ b/app/com/arpnetworking/notcommons/serialization/DeserializationException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.arpnetworking.commons.serialization; +package com.arpnetworking.notcommons.serialization; /** * An exception that occurred during Deserialization. diff --git a/app/com/arpnetworking/commons/serialization/Deserializer.java b/app/com/arpnetworking/notcommons/serialization/Deserializer.java similarity index 95% rename from app/com/arpnetworking/commons/serialization/Deserializer.java rename to app/com/arpnetworking/notcommons/serialization/Deserializer.java index aaa1fe9c1..a74510f64 100644 --- a/app/com/arpnetworking/commons/serialization/Deserializer.java +++ b/app/com/arpnetworking/notcommons/serialization/Deserializer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.arpnetworking.commons.serialization; +package com.arpnetworking.notcommons.serialization; /** * An object that can deserialize a structured value from a string. diff --git a/app/com/arpnetworking/commons/serialization/Serializer.java b/app/com/arpnetworking/notcommons/serialization/Serializer.java similarity index 95% rename from app/com/arpnetworking/commons/serialization/Serializer.java rename to app/com/arpnetworking/notcommons/serialization/Serializer.java index d59a33466..6b5ffed4d 100644 --- a/app/com/arpnetworking/commons/serialization/Serializer.java +++ b/app/com/arpnetworking/notcommons/serialization/Serializer.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.arpnetworking.commons.serialization; +package com.arpnetworking.notcommons.serialization; /** * An object that can serialize a structured value into a string. diff --git a/app/com/arpnetworking/commons/serialization/package-info.java b/app/com/arpnetworking/notcommons/serialization/package-info.java similarity index 93% rename from app/com/arpnetworking/commons/serialization/package-info.java rename to app/com/arpnetworking/notcommons/serialization/package-info.java index 14be6ade2..954fb3b83 100644 --- a/app/com/arpnetworking/commons/serialization/package-info.java +++ b/app/com/arpnetworking/notcommons/serialization/package-info.java @@ -16,7 +16,7 @@ @ParametersAreNonnullByDefault @ReturnValuesAreNonnullByDefault -package com.arpnetworking.commons.serialization; +package com.arpnetworking.notcommons.serialization; import com.arpnetworking.commons.javax.annotation.ReturnValuesAreNonnullByDefault; diff --git a/app/com/arpnetworking/commons/tagger/MetricNameTagger.java b/app/com/arpnetworking/notcommons/tagger/MetricNameTagger.java similarity index 98% rename from app/com/arpnetworking/commons/tagger/MetricNameTagger.java rename to app/com/arpnetworking/notcommons/tagger/MetricNameTagger.java index 2f3e1eb50..3db600b79 100644 --- a/app/com/arpnetworking/commons/tagger/MetricNameTagger.java +++ b/app/com/arpnetworking/notcommons/tagger/MetricNameTagger.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.arpnetworking.commons.tagger; +package com.arpnetworking.notcommons.tagger; import com.arpnetworking.commons.builder.OvalBuilder; import com.google.common.collect.ImmutableList; diff --git a/app/com/arpnetworking/commons/tagger/NoTagsTagger.java b/app/com/arpnetworking/notcommons/tagger/NoTagsTagger.java similarity index 97% rename from app/com/arpnetworking/commons/tagger/NoTagsTagger.java rename to app/com/arpnetworking/notcommons/tagger/NoTagsTagger.java index d9fb36515..bc050d065 100644 --- a/app/com/arpnetworking/commons/tagger/NoTagsTagger.java +++ b/app/com/arpnetworking/notcommons/tagger/NoTagsTagger.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.arpnetworking.commons.tagger; +package com.arpnetworking.notcommons.tagger; import com.google.common.collect.ImmutableMap; diff --git a/app/com/arpnetworking/commons/tagger/Tagger.java b/app/com/arpnetworking/notcommons/tagger/Tagger.java similarity index 96% rename from app/com/arpnetworking/commons/tagger/Tagger.java rename to app/com/arpnetworking/notcommons/tagger/Tagger.java index 4e4dfe402..4acb44a01 100644 --- a/app/com/arpnetworking/commons/tagger/Tagger.java +++ b/app/com/arpnetworking/notcommons/tagger/Tagger.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.arpnetworking.commons.tagger; +package com.arpnetworking.notcommons.tagger; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.google.common.collect.ImmutableMap; diff --git a/app/com/arpnetworking/commons/tagger/package-info.java b/app/com/arpnetworking/notcommons/tagger/package-info.java similarity index 94% rename from app/com/arpnetworking/commons/tagger/package-info.java rename to app/com/arpnetworking/notcommons/tagger/package-info.java index 1cf4f0066..597f7dda1 100644 --- a/app/com/arpnetworking/commons/tagger/package-info.java +++ b/app/com/arpnetworking/notcommons/tagger/package-info.java @@ -16,7 +16,7 @@ @ParametersAreNonnullByDefault @ReturnValuesAreNonnullByDefault -package com.arpnetworking.commons.tagger; +package com.arpnetworking.notcommons.tagger; import com.arpnetworking.commons.javax.annotation.ReturnValuesAreNonnullByDefault; diff --git a/app/com/arpnetworking/pillar/PillarInitializer.java b/app/com/arpnetworking/pillar/CassandraMigrationInitializer.java similarity index 65% rename from app/com/arpnetworking/pillar/PillarInitializer.java rename to app/com/arpnetworking/pillar/CassandraMigrationInitializer.java index 64dfe16d3..c04602df9 100644 --- a/app/com/arpnetworking/pillar/PillarInitializer.java +++ b/app/com/arpnetworking/pillar/CassandraMigrationInitializer.java @@ -15,40 +15,33 @@ */ package com.arpnetworking.pillar; -import akka.japi.Option; -import com.arpnetworking.commons.jackson.databind.ObjectMapperFactory; import com.arpnetworking.steno.Logger; import com.arpnetworking.steno.LoggerFactory; -import com.chrisomeara.pillar.CassandraMigrator; -import com.chrisomeara.pillar.Migrator; -import com.chrisomeara.pillar.Registry; -import com.chrisomeara.pillar.ReplicationOptions; -import com.datastax.driver.core.Session; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; +import com.datastax.oss.driver.api.core.CqlSession; import com.google.inject.Injector; import com.google.inject.Key; import com.google.inject.name.Names; +import jakarta.inject.Inject; +import org.cognitor.cassandra.migration.Database; +import org.cognitor.cassandra.migration.MigrationConfiguration; +import org.cognitor.cassandra.migration.MigrationRepository; +import org.cognitor.cassandra.migration.MigrationTask; import play.Environment; import play.core.WebCommands; -import scala.Predef; -import scala.collection.JavaConverters; import java.io.File; import java.net.URISyntaxException; import java.net.URL; import java.nio.file.Path; -import java.util.Date; import java.util.Map; import javax.annotation.Nullable; -import javax.inject.Inject; /** * Initializer for the Pillar play module. * * @author Brandon Arp (brandon dot arp at smartsheet dot com) */ -public class PillarInitializer { +public class CassandraMigrationInitializer { /** * Public constructor. * @@ -58,7 +51,7 @@ public class PillarInitializer { * @param injector Injector */ @Inject - public PillarInitializer( + public CassandraMigrationInitializer( final com.arpnetworking.pillar.Configuration configuration, final Environment environment, final WebCommands webCommands, @@ -76,6 +69,7 @@ private void runMigrations() { final Configuration.DatastoreConfig config = entry.getValue(); final Path directory = config.getDirectory(); + LOGGER.debug().setMessage("Looking for Cassandra migrations").addData("path", directory.toString()).log(); @Nullable final URL resource = _environment.resource(directory.toString()); if (resource != null) { LOGGER.info() @@ -83,19 +77,14 @@ private void runMigrations() { .addData("database", dbName) .log(); try { - final scala.collection.immutable.Map replication = - JavaConverters.mapAsScalaMapConverter( - MAPPER.convertValue(config.getReplication(), MAP_TYPE_REFERENCE)) - .asScala() - .toMap(Predef.conforms()); final File file = new File(resource.toURI()); - final Registry registry = Registry.fromDirectory(file); - final Migrator migrator = new CassandraMigrator(registry); - final Session session = _injector.getInstance(Key.get(Session.class, Names.named(dbName))); - session.init(); - migrator.initialize(session, config.getKeyspace(), new ReplicationOptions(replication)); - session.execute("USE " + config.getKeyspace()); - migrator.migrate(session, Option.none().asScala()); + + final CqlSession session = _injector.getInstance(Key.get(CqlSession.class, Names.named(dbName))); + + final Database database = new Database(session, new MigrationConfiguration().withKeyspaceName(config.getKeyspace())); + final MigrationTask migration = new MigrationTask(database, new MigrationRepository(file.getAbsolutePath()), true); + migration.migrate(); + } catch (final URISyntaxException e) { LOGGER.error() .setMessage("Unable to run migrations") @@ -117,7 +106,5 @@ private void runMigrations() { private final Environment _environment; private final Injector _injector; - private static final Logger LOGGER = LoggerFactory.getLogger(PillarInitializer.class); - private static final TypeReference> MAP_TYPE_REFERENCE = new TypeReference>() { }; - private static final ObjectMapper MAPPER = ObjectMapperFactory.getInstance(); + private static final Logger LOGGER = LoggerFactory.getLogger(CassandraMigrationInitializer.class); } diff --git a/app/com/arpnetworking/pillar/Configuration.java b/app/com/arpnetworking/pillar/Configuration.java index 3efb75896..1f45cc6bd 100644 --- a/app/com/arpnetworking/pillar/Configuration.java +++ b/app/com/arpnetworking/pillar/Configuration.java @@ -23,13 +23,13 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigValue; import com.typesafe.config.ConfigValueType; +import jakarta.inject.Inject; import java.nio.file.Path; import java.nio.file.Paths; import java.util.List; import java.util.Map; import java.util.Set; -import javax.inject.Inject; /** * Configuration for the Pillar evolutions. diff --git a/app/com/arpnetworking/play/ProxyClient.java b/app/com/arpnetworking/play/ProxyClient.java index caf5bf399..2e02224ee 100644 --- a/app/com/arpnetworking/play/ProxyClient.java +++ b/app/com/arpnetworking/play/ProxyClient.java @@ -15,18 +15,29 @@ */ package com.arpnetworking.play; -import akka.util.ByteString; +import com.google.common.collect.Lists; +import com.google.common.collect.Sets; import com.google.inject.assistedinject.Assisted; import com.google.inject.assistedinject.AssistedInject; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.util.ByteString; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import play.http.HttpEntity; import play.libs.ws.WSClient; -import play.shaded.ahc.org.asynchttpclient.AsyncHandler; -import play.shaded.ahc.org.asynchttpclient.RequestBuilder; +import play.libs.ws.WSRequest; +import play.mvc.Http; +import play.mvc.Result; +import play.mvc.Results; +import play.mvc.StatusHeader; import java.net.URI; +import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Optional; +import java.util.Set; +import java.util.concurrent.CompletionStage; /** * A simple proxy client. @@ -51,47 +62,84 @@ public ProxyClient(@Assisted final URI baseUri, final WSClient client) { * * @param path the path to proxy * @param request the request - * @param handler a handler to execute as a callback - * @param the type of the handler + * + * @return Streaming response */ - public void proxy( + public CompletionStage proxy( final String path, - final play.mvc.Http.Request request, - final AsyncHandler handler) { + final play.mvc.Http.Request request) { + // TODO(brandon): Would be nice to have a streaming api for request body + // Possibly implement a BodyParser that returns the Accumulator? + // See: https://www.playframework.com/documentation/2.8.x/JavaBodyParsers#Directing-the-body-elsewhere final ByteString body = request.body().asBytes(); final URI uri = _baseUri.resolve(path); + final boolean isHttp10 = request.version().equals("HTTP/1.0"); + + WSRequest wsrequest = _client.url(uri.toString()); - final RequestBuilder builder = new RequestBuilder(); for (final Map.Entry entry : request.queryString().entrySet()) { for (final String val : entry.getValue()) { - builder.addQueryParam(entry.getKey(), val); + wsrequest = wsrequest.addQueryParameter(entry.getKey(), val); } } - builder.setUrl(uri.toString()); - builder.setMethod(request.method()); - for (final Map.Entry> entry : request.getHeaders().toMap().entrySet()) { + wsrequest = wsrequest.setMethod(request.method()); + for (final Map.Entry> entry : request.headers().asMap().entrySet()) { for (final String val : entry.getValue()) { - builder.setHeader(entry.getKey(), val); + wsrequest = wsrequest.addHeader(entry.getKey(), val); } } if (body != null) { - builder.setBody(body.asByteBuffer()); + wsrequest = wsrequest.setBody(Source.single(ByteString.fromByteBuffer(body.asByteBuffer()))); } - final Object underlying = _client.getUnderlying(); - if (underlying instanceof play.shaded.ahc.org.asynchttpclient.AsyncHttpClient) { - final play.shaded.ahc.org.asynchttpclient.AsyncHttpClient client = - (play.shaded.ahc.org.asynchttpclient.AsyncHttpClient) underlying; - client.executeRequest(builder.build(), handler); - } else { - throw new RuntimeException("Unknown AsyncHttpClient '" + underlying.getClass().getCanonicalName() + "'"); - } + return wsrequest.stream().thenApply(resp -> { + final Map> entries = resp.getHeaders(); + final Optional length = resp.getSingleHeader(Http.HeaderNames.CONTENT_LENGTH).map(Long::parseLong); + + final Optional contentType = resp.getSingleHeader(Http.HeaderNames.CONTENT_TYPE) + .or(() -> length.map(v -> v == 0 ? "text/html" : null)); + + final StatusHeader status = Results.status(resp.getStatus()); + Result result = status.sendEntity( + new HttpEntity.Streamed( + resp.getBodyAsSource(), + length, + contentType)); + + final ArrayList headersList = entries.entrySet() + .stream() + .filter(entry -> !FILTERED_HEADERS.contains(entry.getKey())) + .reduce(Lists.newArrayList(), (a, b) -> { + a.add(b.getKey()); + a.add(b.getValue().get(0)); + return a; + }, (a, b) -> { + a.addAll(b); + return b; + }); + final String[] headerArray = headersList.toArray(new String[0]); + result = result.withHeaders(headerArray); + + if (isHttp10) { + // Strip the transfer encoding header as chunked isn't supported in 1.0 + result = result.withoutHeader(Http.HeaderNames.TRANSFER_ENCODING); + // Strip the connection header since we don't support keep-alives in 1.0 + result = result.withoutHeader(Http.HeaderNames.CONNECTION); + } + + return result; + }); } private final URI _baseUri; private final WSClient _client; private static final Logger LOGGER = LoggerFactory.getLogger(ProxyClient.class); + private static final Set FILTERED_HEADERS = Sets.newHashSet( + Http.HeaderNames.CONTENT_TYPE, + Http.HeaderNames.CONTENT_LENGTH, + Http.HeaderNames.TRANSFER_ENCODING); + } diff --git a/app/com/arpnetworking/play/configuration/ConfigurationHelper.java b/app/com/arpnetworking/play/configuration/ConfigurationHelper.java index 6132d7ebb..5b9c3fb50 100644 --- a/app/com/arpnetworking/play/configuration/ConfigurationHelper.java +++ b/app/com/arpnetworking/play/configuration/ConfigurationHelper.java @@ -15,7 +15,7 @@ */ package com.arpnetworking.play.configuration; -import com.arpnetworking.commons.java.time.TimeAdapters; +import com.arpnetworking.notcommons.java.time.TimeAdapters; import com.arpnetworking.steno.Logger; import com.arpnetworking.steno.LoggerFactory; import com.arpnetworking.utility.ConfigurationOverrideModule; diff --git a/app/com/arpnetworking/play/metrics/MetricsActionWrapper.java b/app/com/arpnetworking/play/metrics/MetricsActionWrapper.java index 0f9308583..d1fdfc51f 100644 --- a/app/com/arpnetworking/play/metrics/MetricsActionWrapper.java +++ b/app/com/arpnetworking/play/metrics/MetricsActionWrapper.java @@ -23,6 +23,9 @@ import com.arpnetworking.steno.LoggerFactory; import com.google.common.base.Strings; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; +import play.libs.typedmap.TypedEntry; +import play.libs.typedmap.TypedKey; +import play.libs.typedmap.TypedMap; import play.mvc.Action; import play.mvc.Http; import play.mvc.Result; @@ -40,7 +43,6 @@ * @author Ville Koskela (ville dot koskela at inscopemetrics dot io) */ public final class MetricsActionWrapper extends Action.Simple { - /** * Public constructor. * @@ -52,12 +54,13 @@ public MetricsActionWrapper(final MetricsFactory metricsFactory) { @Override @SuppressFBWarnings("DE_MIGHT_IGNORE") - public CompletionStage call(final Http.Context context) { - final Metrics metrics = getMetrics(context); - final BiFunction handler = new HandlerFunction(context, metrics); + public CompletionStage call(final Http.Request request) { + final Http.Request requestWithMetrics = initMetrics(request); + final Metrics metrics = requestWithMetrics.attrs().get(Attrs.METRICS); + final BiFunction handler = new HandlerFunction(request, metrics); try { // Async controllers we can just chain the handler - return delegate.call(context).handle(handler); + return delegate.call(request).handle(handler); // CHECKSTYLE.OFF: IllegalCatch - Need to be able to propagate any fault } catch (final Throwable t1) { // Sync controllers actually throw so we need to do some mapping @@ -76,18 +79,17 @@ public CompletionStage call(final Http.Context context) { } /** - * Create the name of the timer from a {@code Http.Context}. + * Create the name of the timer from a {@code Http.Request}. * - * @param context Context of the HTTP request/response. + * @param request the HTTP request. * @return Name of the timer for the request/response. */ - protected static String createRouteMetricName(final Http.Context context) { - final Http.Request r = context.request(); + private static String createRouteMetricName(final Http.Request request) { final StringBuilder metricNameBuilder = new StringBuilder("rest_service/"); - metricNameBuilder.append(r.method()); + metricNameBuilder.append(request.method()); final String route = ROUTE_PATTERN_REGEX.matcher( - Optional.ofNullable(context.request().attrs().get(Router.Attrs.HANDLER_DEF).path()).orElse("")) + Optional.ofNullable(request.attrs().get(Router.Attrs.HANDLER_DEF).path()).orElse("")) .replaceAll(":$1"); if (!Strings.isNullOrEmpty(route)) { @@ -103,23 +105,21 @@ protected static String createRouteMetricName(final Http.Context context) { return metricNameBuilder.toString(); } - private Metrics getMetrics(final Http.Context context) { - Metrics metrics = (Metrics) context.args.get(METRICS_KEY); - if (metrics == null) { - metrics = _metricsFactory.create(); - context.args.put(METRICS_KEY, metrics); + private Http.Request initMetrics(final Http.Request request) { + final Optional metrics = request.attrs().getOptional(Attrs.METRICS); + if (metrics.isEmpty()) { + return request.withAttrs(TypedMap.create(new TypedEntry<>(Attrs.METRICS, _metricsFactory.create()))); } else { LOGGER.warn() .setMessage("Found metrics in request context; possible issue") .addData("metrics", metrics) .log(); + return request; } - return metrics; } private final MetricsFactory _metricsFactory; - private static final String METRICS_KEY = "metrics"; private static final int STATUS_2XX = 2; private static final int STATUS_3XX = 3; private static final int STATUS_4XX = 4; @@ -135,7 +135,7 @@ public Result apply(final Result r, final Throwable t) { final Counter counter3xx = _metrics.createCounter(_routeMetricName + "status/3xx"); final Counter counter4xx = _metrics.createCounter(_routeMetricName + "status/4xx"); final Counter counter5xx = _metrics.createCounter(_routeMetricName + "status/5xx"); - final long requestSize = _context.request().body().asBytes().size(); + final long requestSize = _request.body().asBytes().size(); final long responseSize; if (t != null) { counter5xx.increment(); @@ -166,18 +166,22 @@ public Result apply(final Result r, final Throwable t) { } /* package private */ HandlerFunction( - final Http.Context context, + final Http.Request request, final Metrics metrics) { - _context = context; + _request = request; _metrics = metrics; - _routeMetricName = createRouteMetricName(context); + _routeMetricName = createRouteMetricName(request); _timer = _metrics.createTimer(_routeMetricName + "latency"); } - private final Http.Context _context; + private final Http.Request _request; private final Metrics _metrics; private final Timer _timer; private final String _routeMetricName; } + + private static final class Attrs { + private static final TypedKey METRICS = TypedKey.create("metrics"); + } } diff --git a/app/com/arpnetworking/play/metrics/ProblemHelper.java b/app/com/arpnetworking/play/metrics/ProblemHelper.java index 77e6118b2..ce5365861 100644 --- a/app/com/arpnetworking/play/metrics/ProblemHelper.java +++ b/app/com/arpnetworking/play/metrics/ProblemHelper.java @@ -18,12 +18,15 @@ import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; import com.google.common.collect.ImmutableList; +import jakarta.inject.Inject; import models.internal.Problem; import play.Environment; +import play.i18n.Lang; +import play.i18n.MessagesApi; import play.libs.Json; -import play.mvc.Http; import java.util.List; +import java.util.Optional; /** * Utilities for sending {@link Problem}-related information to clients. @@ -31,17 +34,28 @@ * @author Spencer Pearson (spencerpearson at dropbox dot com) */ public final class ProblemHelper { + + /** + * Public constructor. + * + * @param messagesApi message api instance to render messages + */ + @Inject + public ProblemHelper(final MessagesApi messagesApi) { + _messagesApi = messagesApi; + } /** * Render a {@link Problem} as JSON. * * @param env The current Play environment. * @param ex The exception causing the problem. * @param problemCode The problem code. + * @param lang The language to render the errors. * * @return A JSON representation of the problem. */ - public static ObjectNode createErrorJson(final Environment env, final Exception ex, final String problemCode) { - final ObjectNode errorNode = createErrorJson(ImmutableList.of(new Problem.Builder().setProblemCode(problemCode).build())); + public ObjectNode createErrorJson(final Environment env, final Exception ex, final String problemCode, final Optional lang) { + final ObjectNode errorNode = createErrorJson(ImmutableList.of(new Problem.Builder().setProblemCode(problemCode).build()), lang); if (env.isDev()) { if (ex.getMessage() != null) { errorNode.put("details", ex.getMessage()); @@ -56,24 +70,26 @@ public static ObjectNode createErrorJson(final Environment env, final Exception * Render a {@link Problem} as JSON. * * @param problem The problem code. + * @param lang The language to render the errors. * * @return A JSON representation of the problem. */ - public static ObjectNode createErrorJson(final Problem problem) { - return createErrorJson(ImmutableList.of(problem)); + public ObjectNode createErrorJson(final Problem problem, final Optional lang) { + return createErrorJson(ImmutableList.of(problem), lang); } /** * Render several {@link Problem}s as JSON. * * @param problems The problems. + * @param lang Language to render problems in * * @return A JSON representation of the problems. */ - public static ObjectNode createErrorJson(final List problems) { + public ObjectNode createErrorJson(final List problems, final Optional lang) { final ObjectNode errorJson = Json.newObject(); final ArrayNode errors = errorJson.putArray("errors"); - problems.forEach(problem -> errors.add(translate(problem))); + problems.forEach(problem -> errors.add(translate(problem, lang))); return errorJson; } @@ -81,11 +97,13 @@ public static ObjectNode createErrorJson(final List problems) { * Translate a problem into a given locale. * * @param problem The problem to translate. + * @param lang Language to render problems in + * * @return The translated problem. */ - public static String translate(final Problem problem) { - return Http.Context.current().messages().at(problem.getProblemCode(), problem.getArgs().toArray()); + public String translate(final Problem problem, final Optional lang) { + return _messagesApi.get(lang.orElse(Lang.defaultLang()), problem.getProblemCode(), problem.getArgs().toArray()); } - private ProblemHelper() {} + private final MessagesApi _messagesApi; } diff --git a/app/com/arpnetworking/rollups/ConsistencyChecker.java b/app/com/arpnetworking/rollups/ConsistencyChecker.java index 394cdd9cd..486954feb 100644 --- a/app/com/arpnetworking/rollups/ConsistencyChecker.java +++ b/app/com/arpnetworking/rollups/ConsistencyChecker.java @@ -15,11 +15,6 @@ */ package com.arpnetworking.rollups; -import akka.actor.AbstractActorWithTimers; -import akka.actor.Props; -import akka.actor.Status; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.Patterns; import com.arpnetworking.commons.builder.ThreadLocalBuilder; import com.arpnetworking.commons.jackson.databind.ObjectMapperFactory; import com.arpnetworking.kairos.client.KairosDbClient; @@ -45,6 +40,11 @@ import net.sf.oval.constraint.NotEmpty; import net.sf.oval.constraint.NotNull; import net.sf.oval.constraint.ValidateWithMethod; +import org.apache.pekko.actor.AbstractActorWithTimers; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.Patterns; import java.io.IOException; import java.io.Serializable; @@ -152,7 +152,7 @@ private ConsistencyChecker( public void preStart() throws Exception { super.preStart(); getSelf().tell(TICK, getSelf()); - getTimers().startPeriodicTimer("PERIODIC_TICK", TICK, TICK_INTERVAL); + getTimers().startTimerAtFixedRate("PERIODIC_TICK", TICK, TICK_INTERVAL); } private Task dequeueWork() { @@ -739,6 +739,8 @@ public MetricsQueryResponse getResponse() { /** * Indicates that a submitted {@link Task} was rejected because the internal task-buffer is full. */ + @SuppressFBWarnings(value = "SING_SINGLETON_IMPLEMENTS_SERIALIZABLE", + justification = "Optimization. Pekko requires serializable messages.") public static final class BufferFull extends Exception { private static final long serialVersionUID = 7840529083811798202L; private static final BufferFull INSTANCE = new BufferFull(); diff --git a/app/com/arpnetworking/rollups/MetricFetch.java b/app/com/arpnetworking/rollups/MetricFetch.java index 75cda747f..9d6b5fd13 100644 --- a/app/com/arpnetworking/rollups/MetricFetch.java +++ b/app/com/arpnetworking/rollups/MetricFetch.java @@ -15,6 +15,8 @@ */ package com.arpnetworking.rollups; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.io.Serializable; /** @@ -23,6 +25,7 @@ * * @author Gilligan Markham (gmarkham at dropbox dot com) */ +@SuppressFBWarnings(value = "SING_SINGLETON_IMPLEMENTS_SERIALIZABLE", justification = "Optimization. Pekko requires serializable messages.") public final class MetricFetch implements Serializable { public static MetricFetch getInstance() { diff --git a/app/com/arpnetworking/rollups/MetricsDiscovery.java b/app/com/arpnetworking/rollups/MetricsDiscovery.java index 8739e3139..aa1659ac9 100644 --- a/app/com/arpnetworking/rollups/MetricsDiscovery.java +++ b/app/com/arpnetworking/rollups/MetricsDiscovery.java @@ -15,10 +15,6 @@ */ package com.arpnetworking.rollups; -import akka.actor.AbstractActorWithTimers; -import akka.actor.ActorRef; -import akka.actor.Status; -import akka.pattern.PatternsCS; import com.arpnetworking.kairos.client.KairosDbClient; import com.arpnetworking.kairos.client.models.MetricNamesResponse; import com.arpnetworking.metrics.incubator.PeriodicMetrics; @@ -27,9 +23,15 @@ import com.arpnetworking.steno.LoggerFactory; import com.google.common.collect.Sets; import com.typesafe.config.Config; +import jakarta.inject.Inject; +import org.apache.pekko.actor.AbstractActorWithTimers; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Status; +import org.apache.pekko.pattern.Patterns; import scala.concurrent.duration.Deadline; import scala.concurrent.duration.FiniteDuration; +import java.time.Duration; import java.util.Collection; import java.util.Iterator; import java.util.LinkedHashSet; @@ -40,7 +42,6 @@ import java.util.function.Predicate; import java.util.regex.Pattern; import java.util.stream.Stream; -import javax.inject.Inject; /** * Actor for discovering the list of metrics available to be rolled up on a periodic basis. @@ -105,12 +106,12 @@ public MetricsDiscovery( _setIterator = _metricsSet.iterator(); _refreshDeadline = Deadline.now(); getSelf().tell(FETCH_MSG, ActorRef.noSender()); - getTimers().startPeriodicTimer(METRICS_TIMER, RECORD_METRICS_MSG, METRICS_INTERVAL); + getTimers().startTimerAtFixedRate(METRICS_TIMER, RECORD_METRICS_MSG, METRICS_INTERVAL); } private void fetchMetricsForRollup() { final long startTime = System.nanoTime(); - PatternsCS.pipe( + Patterns.pipe( _kairosDbClient.queryMetricNames() .whenComplete((response, failure) -> { // Record metrics @@ -173,7 +174,7 @@ static Predicate toPredicate(final List regexList, final boolean private static final String RECORD_METRICS_MSG = "record_metrics"; private static final String METRICS_TIMER = "metrics_timer"; - private static final FiniteDuration METRICS_INTERVAL = FiniteDuration.apply(1, TimeUnit.SECONDS); + private static final Duration METRICS_INTERVAL = Duration.ofSeconds(1); private static final String REFRESH_TIMER = "refresh_timer"; private static final Object FETCH_MSG = new Object(); private static final Logger LOGGER = LoggerFactory.getLogger(MetricsDiscovery.class); diff --git a/app/com/arpnetworking/rollups/NoMoreRollups.java b/app/com/arpnetworking/rollups/NoMoreRollups.java index 9e35a5f31..b5e9c56c7 100644 --- a/app/com/arpnetworking/rollups/NoMoreRollups.java +++ b/app/com/arpnetworking/rollups/NoMoreRollups.java @@ -15,6 +15,8 @@ */ package com.arpnetworking.rollups; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.io.Serializable; /** @@ -22,6 +24,7 @@ * * @author Gilligan Markham (gmarkham at dropbox dot com) */ +@SuppressFBWarnings(value = "SING_SINGLETON_IMPLEMENTS_SERIALIZABLE", justification = "Optimization. Pekko requires serializable messages.") public final class NoMoreRollups implements Serializable { private static final long serialVersionUID = -3503619526731721351L; diff --git a/app/com/arpnetworking/rollups/QueryConsistencyTaskCreator.java b/app/com/arpnetworking/rollups/QueryConsistencyTaskCreator.java index 6123fad78..05a197ee2 100644 --- a/app/com/arpnetworking/rollups/QueryConsistencyTaskCreator.java +++ b/app/com/arpnetworking/rollups/QueryConsistencyTaskCreator.java @@ -15,13 +15,13 @@ */ package com.arpnetworking.rollups; -import akka.actor.ActorRef; -import akka.pattern.Patterns; import com.arpnetworking.kairos.client.models.Metric; import com.arpnetworking.kairos.client.models.MetricsQuery; import com.arpnetworking.metrics.incubator.PeriodicMetrics; import com.arpnetworking.steno.Logger; import com.arpnetworking.steno.LoggerFactory; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.pattern.Patterns; import java.time.Duration; import java.time.Instant; diff --git a/app/com/arpnetworking/rollups/RollupDefinition.java b/app/com/arpnetworking/rollups/RollupDefinition.java index eac1a1d9f..46302f051 100644 --- a/app/com/arpnetworking/rollups/RollupDefinition.java +++ b/app/com/arpnetworking/rollups/RollupDefinition.java @@ -15,7 +15,6 @@ */ package com.arpnetworking.rollups; -import akka.routing.ConsistentHashingRouter; import com.arpnetworking.commons.builder.OvalBuilder; import com.arpnetworking.logback.annotations.Loggable; import com.google.common.base.MoreObjects; @@ -23,6 +22,7 @@ import com.google.common.collect.ImmutableMultimap; import net.sf.oval.constraint.NotEmpty; import net.sf.oval.constraint.NotNull; +import org.apache.pekko.routing.ConsistentHashingRouter; import java.io.Serializable; import java.time.Instant; diff --git a/app/com/arpnetworking/rollups/RollupExecutor.java b/app/com/arpnetworking/rollups/RollupExecutor.java index 0715987cb..c595f6909 100644 --- a/app/com/arpnetworking/rollups/RollupExecutor.java +++ b/app/com/arpnetworking/rollups/RollupExecutor.java @@ -15,9 +15,6 @@ */ package com.arpnetworking.rollups; -import akka.actor.AbstractActorWithTimers; -import akka.actor.ActorRef; -import akka.pattern.Patterns; import com.arpnetworking.commons.builder.ThreadLocalBuilder; import com.arpnetworking.kairos.client.KairosDbClient; import com.arpnetworking.kairos.client.models.Aggregator; @@ -34,7 +31,12 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.typesafe.config.Config; +import jakarta.inject.Inject; +import jakarta.inject.Named; import net.sf.oval.constraint.NotNull; +import org.apache.pekko.actor.AbstractActorWithTimers; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.pattern.Patterns; import scala.concurrent.duration.FiniteDuration; import java.util.Locale; @@ -42,8 +44,6 @@ import java.util.Optional; import java.util.concurrent.CompletionStage; import java.util.concurrent.TimeUnit; -import javax.inject.Inject; -import javax.inject.Named; /** * Actor that fetches RollupDefinitions from a RollupManager and performs the specified diff --git a/app/com/arpnetworking/rollups/RollupFetch.java b/app/com/arpnetworking/rollups/RollupFetch.java index 570b5d97b..01ce00e3f 100644 --- a/app/com/arpnetworking/rollups/RollupFetch.java +++ b/app/com/arpnetworking/rollups/RollupFetch.java @@ -15,6 +15,8 @@ */ package com.arpnetworking.rollups; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.io.Serializable; /** @@ -23,6 +25,7 @@ * * @author Gilligan Markham (gmarkham at dropbox dot com) */ +@SuppressFBWarnings(value = "SING_SINGLETON_IMPLEMENTS_SERIALIZABLE", justification = "Optimization. Pekko requires serializable messages.") public final class RollupFetch implements Serializable { public static RollupFetch getInstance() { diff --git a/app/com/arpnetworking/rollups/RollupGenerator.java b/app/com/arpnetworking/rollups/RollupGenerator.java index 0f9dfbb23..b3b372d72 100644 --- a/app/com/arpnetworking/rollups/RollupGenerator.java +++ b/app/com/arpnetworking/rollups/RollupGenerator.java @@ -15,12 +15,7 @@ */ package com.arpnetworking.rollups; -import akka.actor.AbstractActorWithTimers; -import akka.actor.ActorRef; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.Patterns; import com.arpnetworking.commons.builder.ThreadLocalBuilder; -import com.arpnetworking.commons.tagger.Tagger; import com.arpnetworking.kairos.client.KairosDbClient; import com.arpnetworking.kairos.client.models.Aggregator; import com.arpnetworking.kairos.client.models.DataPoint; @@ -32,6 +27,7 @@ import com.arpnetworking.metrics.Metrics; import com.arpnetworking.metrics.MetricsFactory; import com.arpnetworking.metrics.incubator.PeriodicMetrics; +import com.arpnetworking.notcommons.tagger.Tagger; import com.arpnetworking.play.configuration.ConfigurationHelper; import com.arpnetworking.steno.Logger; import com.arpnetworking.steno.LoggerFactory; @@ -41,6 +37,12 @@ import com.google.common.collect.Lists; import com.typesafe.config.Config; import com.typesafe.config.ConfigUtil; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import org.apache.pekko.actor.AbstractActorWithTimers; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.Patterns; import scala.concurrent.duration.FiniteDuration; import java.time.Clock; @@ -56,8 +58,6 @@ import java.util.concurrent.TimeUnit; import java.util.function.Consumer; import javax.annotation.Nullable; -import javax.inject.Inject; -import javax.inject.Named; /** * Actor for generating rollup jobs for individual source metrics. @@ -123,6 +123,7 @@ public RollupGenerator( final MetricsFactory metricsFactory, @Named("RollupGeneratorTagger") final Tagger tagger ) { + _tagLookbackPeriods = 1; _metricsDiscovery = metricsDiscovery; _rollupManager = rollupManager; _kairosDbClient = kairosDbClient; @@ -157,9 +158,12 @@ private void requestMetricsFromDiscovery(final Object fetch) { private void fetchMetricTags(final String metricName) { _periodicMetrics.recordCounter("rollup/generator/metric_names_message/received", 1); final long startTime = System.nanoTime(); + final long now = System.currentTimeMillis(); + final long beginningOfPeriod = now - (now % KAIROSDB_PERIOD_MILLIS); + final long startPeriod = beginningOfPeriod - (_tagLookbackPeriods * KAIROSDB_PERIOD_MILLIS); Patterns.pipe(_kairosDbClient.queryMetricTags( new TagsQuery.Builder() - .setStartTime(Instant.ofEpochMilli(0)) + .setStartTime(Instant.ofEpochMilli(startPeriod)) .setMetrics(ImmutableList.of( ThreadLocalBuilder.build(MetricTags.Builder.class, builder -> builder.setName(metricName)) )) @@ -510,6 +514,7 @@ private MetricsQuery buildLastDataPointQuery( private final KairosDbClient _kairosDbClient; private final Map _maxBackFillByPeriod; private final FiniteDuration _fetchBackoff; + private final int _tagLookbackPeriods; private final Clock _clock; private final PeriodicMetrics _periodicMetrics; private final MetricsFactory _metricsFactory; @@ -518,4 +523,5 @@ private MetricsQuery buildLastDataPointQuery( static final Object FETCH_METRIC = new Object(); private static final Logger LOGGER = LoggerFactory.getLogger(RollupGenerator.class); + private static final long KAIROSDB_PERIOD_MILLIS = 1000L * 60 * 60 * 24 * 21; } diff --git a/app/com/arpnetworking/rollups/RollupManager.java b/app/com/arpnetworking/rollups/RollupManager.java index c7b0dbe83..2cc3bb0c0 100644 --- a/app/com/arpnetworking/rollups/RollupManager.java +++ b/app/com/arpnetworking/rollups/RollupManager.java @@ -15,10 +15,6 @@ */ package com.arpnetworking.rollups; -import akka.actor.AbstractActorWithTimers; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.pattern.Patterns; import com.arpnetworking.commons.builder.ThreadLocalBuilder; import com.arpnetworking.metrics.Metrics; import com.arpnetworking.metrics.MetricsFactory; @@ -27,7 +23,10 @@ import com.arpnetworking.steno.LoggerFactory; import com.google.common.collect.ImmutableSet; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; -import scala.concurrent.duration.FiniteDuration; +import org.apache.pekko.actor.AbstractActorWithTimers; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.pattern.Patterns; import java.io.Serializable; import java.time.Duration; @@ -56,13 +55,13 @@ public final class RollupManager extends AbstractActorWithTimers { private static final Object RECORD_METRICS_MSG = new Object(); private static final String METRICS_TIMER = "metrics_timer"; - private static final FiniteDuration METRICS_INTERVAL = FiniteDuration.apply(1, TimeUnit.SECONDS); + private static final Duration METRICS_INTERVAL = Duration.ofSeconds(1); private static final Logger LOGGER = LoggerFactory.getLogger(RollupManager.class); private static final Random RANDOM = new Random(); private static final ScheduledThreadPoolExecutor EXECUTOR = new ScheduledThreadPoolExecutor(1); /** - * Creates a {@link Props} for use in Akka. + * Creates a {@link Props} for use in Pekko. * * @param periodicMetrics periodic metrics client * @param metricsFactory metrics factory @@ -101,7 +100,7 @@ private RollupManager( _consistencyChecker = consistencyChecker; _consistencyCheckFractionOfWrites = consistencyCheckFractionOfWrites; _rollupDefinitions = new TreeSet<>(new RollupComparator()); - getTimers().startPeriodicTimer(METRICS_TIMER, RECORD_METRICS_MSG, METRICS_INTERVAL); + getTimers().startTimerAtFixedRate(METRICS_TIMER, RECORD_METRICS_MSG, METRICS_INTERVAL); } @Override @@ -251,7 +250,7 @@ public void setConsistencyCheckDelay(final Duration consistencyCheckDelay) { _consistencyCheckDelay = consistencyCheckDelay; } - private static class RollupComparator implements Comparator, Serializable { + private static final class RollupComparator implements Comparator, Serializable { private static final long serialVersionUID = -3992696463296110397L; diff --git a/app/com/arpnetworking/utility/ConfigTypedProvider.java b/app/com/arpnetworking/utility/ConfigTypedProvider.java index c4c525c8e..732573335 100644 --- a/app/com/arpnetworking/utility/ConfigTypedProvider.java +++ b/app/com/arpnetworking/utility/ConfigTypedProvider.java @@ -16,10 +16,10 @@ package com.arpnetworking.utility; import com.arpnetworking.play.configuration.ConfigurationHelper; -import com.google.inject.Inject; import com.google.inject.Injector; import com.google.inject.Provider; import com.typesafe.config.Config; +import jakarta.inject.Inject; import play.Environment; /** diff --git a/app/controllers/AlertController.java b/app/controllers/AlertController.java index 21716c766..ac7b3ade9 100644 --- a/app/controllers/AlertController.java +++ b/app/controllers/AlertController.java @@ -26,8 +26,8 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; -import com.google.inject.Inject; import com.typesafe.config.Config; +import jakarta.inject.Inject; import models.internal.Organization; import models.internal.Problem; import models.internal.QueryResult; @@ -37,8 +37,9 @@ import models.view.PagedContainer; import models.view.Pagination; import play.libs.Json; -import play.libs.concurrent.HttpExecutionContext; +import play.libs.concurrent.ClassLoaderExecutionContext; import play.mvc.Controller; +import play.mvc.Http; import play.mvc.Result; import java.time.Instant; @@ -74,7 +75,7 @@ public class AlertController extends Controller { // The maximum page size. Any requests larger than this amount will be truncated. private final int _maxPageSize; - private final HttpExecutionContext _httpContext; + private final ClassLoaderExecutionContext _httpContext; // The maximum number of executions to fetch per batch. private final int _executionsBatchSize; // The number of days back to check for executions. @@ -84,6 +85,7 @@ public class AlertController extends Controller { private final AlertExecutionRepository _executionRepository; private final OrganizationRepository _organizationRepository; private final PeriodicMetrics _periodicMetrics; + private final ProblemHelper _problemHelper; /** * Public constructor. @@ -94,6 +96,7 @@ public class AlertController extends Controller { * @param organizationRepository Repository for organizations. * @param periodicMetrics Metrics instance for instrumentation. * @param httpContext The current context of execution. + * @param problemHelper The ProblemHelper to render errors. */ @Inject public AlertController( @@ -102,7 +105,8 @@ public AlertController( final AlertExecutionRepository executionRepository, final OrganizationRepository organizationRepository, final PeriodicMetrics periodicMetrics, - final HttpExecutionContext httpContext + final ClassLoaderExecutionContext httpContext, + final ProblemHelper problemHelper ) { _alertRepository = alertRepository; _executionRepository = executionRepository; @@ -121,18 +125,20 @@ public AlertController( _executionsLookbackDays = DEFAULT_EXECUTIONS_LOOKBACK_DAYS; } _periodicMetrics = periodicMetrics; + _problemHelper = problemHelper; } /** * Get a specific alert. * * @param id The identifier of the alert. + * @param request Http.Request being handled. * @return The alert, if any, otherwise notFound. */ - public CompletionStage get(final UUID id) { + public CompletionStage get(final UUID id, final Http.Request request) { final Organization organization; try { - organization = _organizationRepository.get(request()); + organization = _organizationRepository.get(request); } catch (final NoSuchElementException e) { return CompletableFuture.completedFuture(internalServerError()); } @@ -140,9 +146,10 @@ public CompletionStage get(final UUID id) { return alert .map(a -> fromInternal(a, organization).thenApplyAsync(viewAlert -> ok(Json.toJson(viewAlert)), _httpContext.current())) - .orElseGet(() -> CompletableFuture.completedFuture(notFound(ProblemHelper.createErrorJson(new Problem.Builder() + .orElseGet(() -> CompletableFuture.completedFuture(notFound(_problemHelper.createErrorJson(new Problem.Builder() .setProblemCode("alert_problem.NOT_FOUND") - .build() + .build(), + request.transientLang() )))); } @@ -151,15 +158,17 @@ public CompletionStage get(final UUID id) { * * @param limit The maximum number of results to return. Optional. * @param offset The number of results to skip. Optional. + * @param request Http.Request being handled. * @return {@link Result} paginated matching alerts. */ public CompletionStage query( @Nullable final Integer limit, - @Nullable final Integer offset - ) { + @Nullable final Integer offset, + final Http.Request request + ) { final Organization organization; try { - organization = _organizationRepository.get(request()); + organization = _organizationRepository.get(request); } catch (final NoSuchElementException e) { return CompletableFuture.completedFuture(internalServerError()); } @@ -193,7 +202,7 @@ public CompletionStage query( ok(Json.toJson(new PagedContainer<>( alerts, new Pagination( - request().path(), + request.path(), queryResult.total(), queryResult.values().size(), argLimit, diff --git a/app/controllers/ApplicationController.java b/app/controllers/ApplicationController.java index 56740c971..320728da2 100644 --- a/app/controllers/ApplicationController.java +++ b/app/controllers/ApplicationController.java @@ -19,6 +19,8 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Suppliers; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import models.internal.Features; import play.mvc.Controller; import play.mvc.Result; @@ -26,8 +28,6 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionStage; import java.util.function.Supplier; -import javax.inject.Inject; -import javax.inject.Singleton; /** * Metrics portal application Play controller. @@ -61,7 +61,8 @@ public ApplicationController(final Features features) { */ public CompletionStage getConfigureJs() { return CompletableFuture.completedFuture( - ok(views.html.ConfigureJsViewModel.render(_featuresJson.get())) + ok(views.html + .ConfigureJsViewModel.render(_featuresJson.get())) .as("text/javascript")); } diff --git a/app/controllers/HostController.java b/app/controllers/HostController.java index ea76b1570..6a554bc94 100644 --- a/app/controllers/HostController.java +++ b/app/controllers/HostController.java @@ -25,8 +25,9 @@ import com.google.common.base.MoreObjects; import com.google.common.collect.Maps; import com.google.common.net.HttpHeaders; -import com.google.inject.Inject; import com.typesafe.config.Config; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import models.internal.Host; import models.internal.HostQuery; import models.internal.MetricsSoftwareState; @@ -44,7 +45,6 @@ import java.util.Optional; import java.util.stream.Collectors; import javax.annotation.Nullable; -import javax.inject.Singleton; /** * Metrics portal host controller. Exposes APIs to query and manipulate hosts. @@ -73,10 +73,11 @@ public HostController( * Get specific host by hostname. * * @param id The hostname to retrieve. + * @param request Http.Request being handled. * @return Matching host. */ - public Result get(final String id) { - final Optional result = _hostRepository.getHost(id, _organizationRepository.get(request())); + public Result get(final String id, final Http.Request request) { + final Optional result = _hostRepository.getHost(id, _organizationRepository.get(request)); if (!result.isPresent()) { return notFound(); } @@ -87,12 +88,13 @@ public Result get(final String id) { /** * Adds or updates a host in the host repository. * + * @param request Http.Request being handled. * @return Ok if the host was created or updated successfully, a failure HTTP status code otherwise. */ - public Result addOrUpdate() { + public Result addOrUpdate(final Http.Request request) { final Host host; try { - final models.view.Host viewHost = buildViewHost(request().body()); + final models.view.Host viewHost = buildViewHost(request.body()); host = convertToInternalHost(viewHost); } catch (final IOException e) { LOGGER.error() @@ -103,7 +105,7 @@ public Result addOrUpdate() { } try { - _hostRepository.addOrUpdateHost(host, _organizationRepository.get(request())); + _hostRepository.addOrUpdateHost(host, _organizationRepository.get(request)); // CHECKSTYLE.OFF: IllegalCatch - Convert any exception to 500 } catch (final Exception e) { // CHECKSTYLE.ON: IllegalCatch @@ -125,6 +127,7 @@ public Result addOrUpdate() { * @param limit The maximum number of results to return. Optional. * @param offset The number of results to skip. Optional. * @param sort_by The field to sort results by. Optional. + * @param request Http.Request being handled. * @return {@code Result} paginated matching hosts. */ // CHECKSTYLE.OFF: ParameterNameCheck - Names must match query parameters. @@ -134,7 +137,8 @@ public Result query( @Nullable final String cluster, @Nullable final Integer limit, @Nullable final Integer offset, - @Nullable final String sort_by) { + @Nullable final String sort_by, + final Http.Request request) { // CHECKSTYLE.ON: ParameterNameCheck // Convert and validate parameters @@ -171,7 +175,7 @@ public Result query( argSortBy.ifPresent(v -> conditions.put("sort_by", v.toString())); // Build a host repository query - final HostQuery query = _hostRepository.createHostQuery(_organizationRepository.get(request())) + final HostQuery query = _hostRepository.createHostQuery(_organizationRepository.get(request)) .partialHostname(argName) .metricsSoftwareState(argState) .cluster(argCluster) @@ -180,14 +184,15 @@ public Result query( .sortBy(argSortBy); // Execute the query - return executeQuery(argOffset, argLimit, conditions, query); + return executeQuery(argOffset, argLimit, conditions, query, request); } private Result executeQuery( final Optional argOffset, final int argLimit, final Map conditions, - final HostQuery query) { + final HostQuery query, + final Http.Request request) { final QueryResult result; try { @@ -203,21 +208,22 @@ private Result executeQuery( } // Wrap the query results and return as JSON - if (result.etag().isPresent()) { - response().setHeader(HttpHeaders.ETAG, result.etag().get()); - } - return ok(Json.toJson(new PagedContainer<>( + Result response = ok(Json.toJson(new PagedContainer<>( result.values() .stream() .map(this::internalModelToViewModel) .collect(Collectors.toList()), new Pagination( - request().path(), + request.path(), result.total(), result.values().size(), argLimit, argOffset, conditions)))); + if (result.etag().isPresent()) { + response = response.withHeader(HttpHeaders.ETAG, result.etag().get()); + } + return response; } private models.view.Host internalModelToViewModel(final Host host) { diff --git a/app/controllers/KairosDbProxyController.java b/app/controllers/KairosDbProxyController.java index 0117f207e..9137c1048 100644 --- a/app/controllers/KairosDbProxyController.java +++ b/app/controllers/KairosDbProxyController.java @@ -15,7 +15,6 @@ */ package controllers; -import akka.stream.javadsl.StreamConverters; import com.arpnetworking.commons.builder.ThreadLocalBuilder; import com.arpnetworking.kairos.client.models.Aggregator; import com.arpnetworking.kairos.client.models.Metric; @@ -34,35 +33,24 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Sets; -import com.google.inject.Singleton; import com.typesafe.config.Config; -import play.http.HttpEntity; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import play.libs.ws.WSClient; import play.mvc.Controller; import play.mvc.Http; import play.mvc.Result; import play.mvc.Results; -import play.shaded.ahc.io.netty.handler.codec.http.HttpHeaders; -import play.shaded.ahc.org.asynchttpclient.AsyncCompletionHandler; -import play.shaded.ahc.org.asynchttpclient.HttpResponseBodyPart; -import play.shaded.ahc.org.asynchttpclient.HttpResponseHeaders; -import play.shaded.ahc.org.asynchttpclient.HttpResponseStatus; -import play.shaded.ahc.org.asynchttpclient.Response; import java.io.IOException; -import java.io.PipedInputStream; -import java.io.PipedOutputStream; import java.net.URI; import java.time.Duration; import java.util.ArrayList; import java.util.List; import java.util.Optional; -import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionStage; import javax.annotation.Nullable; -import javax.inject.Inject; /** * KairosDb proxy controller. @@ -101,27 +89,30 @@ public KairosDbProxyController( /** * Proxied status call. * + * @param request Http.Request being handled. * @return Proxied status response. */ - public CompletionStage status() { - return proxy(); + public CompletionStage status(final Http.Request request) { + return proxy(request); } /** * Proxied healthcheck call. * + * @param request Http.Request being handled. * @return Proxied health check response. */ - public CompletionStage healthCheck() { - return proxy(); + public CompletionStage healthCheck(final Http.Request request) { + return proxy(request); } /** * Proxied tagNames call. * + * @param request Http.Request being handled. * @return Proxied tagNames response. */ - public CompletionStage tagNames() { + public CompletionStage tagNames(final Http.Request request) { return _kairosService.listTagNames() .thenApply(_mapper::valueToTree) .thenApply(Results::ok); @@ -130,10 +121,11 @@ public CompletionStage tagNames() { /** * Proxied tagValues call. * + * @param request Http.Request being handled. * @return Proxied tagValues response. */ - public CompletionStage tagValues() { - return proxy(); + public CompletionStage tagValues(final Http.Request request) { + return proxy(request); } private static CompletionStage noJsonFoundResponse() { @@ -145,11 +137,12 @@ private static CompletionStage noJsonFoundResponse() { /** * Proxied queryTags call. * + * @param request Http.Request being handled. * @return Proxied queryTags response. */ - public CompletionStage queryTags() { + public CompletionStage queryTags(final Http.Request request) { try { - final JsonNode jsonBody = request().body().asJson(); + final JsonNode jsonBody = request.body().asJson(); if (jsonBody == null) { return noJsonFoundResponse(); } @@ -166,11 +159,12 @@ public CompletionStage queryTags() { /** * Proxied queryMetrics call. * + * @param request Http.Request being handled. * @return Proxied queryMetrics response. */ - public CompletionStage queryMetrics() { + public CompletionStage queryMetrics(final Http.Request request) { try { - final JsonNode jsonBody = request().body().asJson(); + final JsonNode jsonBody = request.body().asJson(); if (jsonBody == null) { return noJsonFoundResponse(); } @@ -225,11 +219,11 @@ public CompletionStage queryMetrics() { .collect(ImmutableList.toImmutableList()); newMetrics.add(ThreadLocalBuilder.clone( - metric, Metric.Builder.class, b->b.setAggregators(newAggregators))); + metric, Metric.Builder.class, b -> b.setAggregators(newAggregators))); } final ImmutableList finalNewMetrics = ImmutableList.copyOf(newMetrics); - return ThreadLocalBuilder.clone(metricsQuery, MetricsQuery.Builder.class, b->b.setMetrics(finalNewMetrics)); + return ThreadLocalBuilder.clone(metricsQuery, MetricsQuery.Builder.class, b -> b.setMetrics(finalNewMetrics)); } /* package private */ MetricsQuery checkAndAddMergeAggregator(final MetricsQuery metricsQuery) { @@ -257,14 +251,14 @@ public CompletionStage queryMetrics() { newAggregators.addAll(metric.getAggregators()); final ImmutableList finalNewAggregators = ImmutableList.copyOf(newAggregators); newMetrics.add(ThreadLocalBuilder.clone( - metric, Metric.Builder.class, b->b.setAggregators(finalNewAggregators))); + metric, Metric.Builder.class, b -> b.setAggregators(finalNewAggregators))); } else { newMetrics.add(metric); } } final ImmutableList finalNewMetrics = ImmutableList.copyOf(newMetrics); - return ThreadLocalBuilder.clone(metricsQuery, MetricsQuery.Builder.class, b->b.setMetrics(finalNewMetrics)); + return ThreadLocalBuilder.clone(metricsQuery, MetricsQuery.Builder.class, b -> b.setMetrics(finalNewMetrics)); } private Boolean needMergeAggregator(final ImmutableList aggregators) { @@ -276,10 +270,11 @@ private Boolean needMergeAggregator(final ImmutableList aggregators) /** * Proxied version call. * + * @param request Http.Request being handled. * @return Proxied version response. */ - public CompletionStage version() { - return proxy(); + public CompletionStage version(final Http.Request request) { + return proxy(request); } /** @@ -300,20 +295,14 @@ public CompletionStage metricNames(@Nullable final String containing, @N * * @return the proxied {@link Result} */ - private CompletionStage proxy() { - final String path = request().uri(); + private CompletionStage proxy(final Http.Request request) { + final String path = request.uri(); LOGGER.debug().setMessage("proxying call to kairosdb") .addData("from", path) .log(); - final CompletableFuture promise = new CompletableFuture<>(); - final Http.Request request = request(); - final boolean isHttp10 = request.version().equals("HTTP/1.0"); - final Http.Response configResponse = response(); - _client.proxy( + return _client.proxy( path.startsWith("/") ? path : "/" + path, - request, - new ResponseHandler(configResponse, promise, isHttp10)); - return promise; + request); } private final ProxyClient _client; @@ -328,115 +317,5 @@ private CompletionStage proxy() { private static final Logger LOGGER = LoggerFactory.getLogger(KairosDbProxyController.class); - private static class ResponseHandler extends AsyncCompletionHandler { - ResponseHandler( - final Http.Response response, - final CompletableFuture promise, - final boolean isHttp10) { - try { - _outputStream = new PipedOutputStream(); - _inputStream = new PipedInputStream(_outputStream); - _response = response; - _promise = promise; - _isHttp10 = isHttp10; - } catch (final IOException ex) { - throw new RuntimeException(ex); - } - } - - @Override - public State onStatusReceived(final HttpResponseStatus status) { - _status = status.getStatusCode(); - return State.CONTINUE; - } - - @Override - public State onBodyPartReceived(final HttpResponseBodyPart content) throws Exception { - _outputStream.write(content.getBodyPartBytes()); - - if (content.isLast()) { - _outputStream.flush(); - _outputStream.close(); - } - return State.CONTINUE; - } - - @Override - public State onHeadersReceived(final HttpResponseHeaders headers) { - try { - final HttpHeaders entries = headers.getHeaders(); - Optional length = Optional.empty(); - if (entries.contains(CONTENT_LENGTH)) { - final String clen = entries.get(CONTENT_LENGTH); - length = Optional.of(Long.parseLong(clen)); - } - final String contentType; - if (entries.get(CONTENT_TYPE) != null) { - contentType = entries.get(CONTENT_TYPE); - } else if (length.isPresent() && length.get() == 0) { - contentType = "text/html"; - } else { - contentType = null; - } - - entries.entries() - .stream() - .filter(entry -> !FILTERED_HEADERS.contains(entry.getKey())) - .forEach(entry -> _response.setHeader(entry.getKey(), entry.getValue())); - - if (_isHttp10) { - // Strip the transfer encoding header as chunked isn't supported in 1.0 - _response.getHeaders().remove(TRANSFER_ENCODING); - // Strip the connection header since we don't support keep-alives in 1.0 - _response.getHeaders().remove(CONNECTION); - } - - final play.mvc.Result result = Results.status(_status).sendEntity( - new HttpEntity.Streamed( - StreamConverters.fromInputStream(() -> _inputStream, DEFAULT_CHUNK_SIZE), - length, - Optional.ofNullable(contentType))); - - _promise.complete(result); - return State.CONTINUE; - // CHECKSTYLE.OFF: IllegalCatch - We need to return a response no matter what - } catch (final Throwable e) { - // CHECKSTYLE.ON: IllegalCatch - _promise.completeExceptionally(e); - throw e; - } - } - - @Override - public void onThrowable(final Throwable t) { - try { - _outputStream.close(); - _promise.completeExceptionally(t); - } catch (final IOException e) { - throw new RuntimeException(e); - } - super.onThrowable(t); - } - - @Override - public Void onCompleted(final Response response) { - try { - _outputStream.flush(); - _outputStream.close(); - } catch (final IOException e) { - throw new RuntimeException(e); - } - return null; - } - - private int _status; - private final PipedOutputStream _outputStream; - private final Http.Response _response; - private final PipedInputStream _inputStream; - private final CompletableFuture _promise; - private final boolean _isHttp10; - private static final int DEFAULT_CHUNK_SIZE = 8 * 1024; - private static final Set FILTERED_HEADERS = Sets.newHashSet(CONTENT_TYPE, CONTENT_LENGTH, TRANSFER_ENCODING); - } } diff --git a/app/controllers/MetaController.java b/app/controllers/MetaController.java index 3cae36d06..0611b6244 100644 --- a/app/controllers/MetaController.java +++ b/app/controllers/MetaController.java @@ -15,9 +15,6 @@ */ package controllers; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.pattern.PatternsCS; import com.arpnetworking.metrics.portal.health.HealthProvider; import com.arpnetworking.metrics.portal.health.StatusActor; import com.fasterxml.jackson.databind.JsonNode; @@ -27,8 +24,14 @@ import com.fasterxml.jackson.databind.node.ObjectNode; import com.typesafe.config.Config; import com.typesafe.config.ConfigValue; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; import models.view.StatusResponse; import models.view.VersionInfo; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.pattern.Patterns; import play.mvc.Controller; import play.mvc.Result; @@ -36,9 +39,6 @@ import java.util.ArrayList; import java.util.Map; import java.util.concurrent.CompletionStage; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; /** * Metrics portal generic Play controller. @@ -52,10 +52,10 @@ public final class MetaController extends Controller { * Public constructor. * * @param objectMapper Instance of {@code ObjectMapper}. - * @param actorSystem Instance of Akka {@code ActorSystem}. + * @param actorSystem Instance of Pekko {@code ActorSystem}. * @param healthProvider Instance of {@link HealthProvider}. * @param configuration Play configuration for the app. - * @param statusActor Reference to Akka {@link StatusActor}. + * @param statusActor Reference to Pekko {@link StatusActor}. */ @Inject public MetaController( @@ -89,13 +89,12 @@ public Result config() { public Result ping() { final boolean healthy = _healthProvider.isHealthy(); final ObjectNode result = JsonNodeFactory.instance.objectNode(); - response().setHeader(CACHE_CONTROL, "private, no-cache, no-store, must-revalidate"); if (healthy) { result.put("status", HEALTHY_STATE); - return ok(result); + return ok(result).withHeader(CACHE_CONTROL, "private, no-cache, no-store, must-revalidate"); } result.put("status", UNHEALTHY_STATE); - return internalServerError(result); + return internalServerError(result).withHeader(CACHE_CONTROL, "private, no-cache, no-store, must-revalidate"); } /** @@ -104,7 +103,7 @@ public Result ping() { * @return Serialized response containing service status. */ public CompletionStage status() { - return PatternsCS.ask( + return Patterns.ask( _statusActor, new StatusActor.StatusRequest(), Duration.ofSeconds(1)) diff --git a/app/controllers/ReportController.java b/app/controllers/ReportController.java index 6877eebac..a2d70503b 100644 --- a/app/controllers/ReportController.java +++ b/app/controllers/ReportController.java @@ -15,8 +15,6 @@ */ package controllers; -import akka.actor.ActorRef; -import akka.cluster.sharding.ClusterSharding; import com.arpnetworking.commons.jackson.databind.ObjectMapperFactory; import com.arpnetworking.metrics.portal.organizations.OrganizationRepository; import com.arpnetworking.metrics.portal.reports.ReportExecutionContext; @@ -34,9 +32,10 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.net.HttpHeaders; -import com.google.inject.Inject; import com.google.inject.name.Named; import com.typesafe.config.Config; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import models.internal.Organization; import models.internal.Problem; import models.internal.QueryResult; @@ -44,9 +43,12 @@ import models.view.PagedContainer; import models.view.Pagination; import net.sf.oval.exception.ConstraintsViolatedException; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.cluster.sharding.ClusterSharding; import play.Environment; import play.libs.Json; import play.mvc.Controller; +import play.mvc.Http; import play.mvc.Result; import java.util.Map; @@ -55,7 +57,6 @@ import java.util.UUID; import java.util.stream.Collectors; import javax.annotation.Nullable; -import javax.inject.Singleton; /** * Metrics portal report controller. Exposes APIs to query and manipulate reports. @@ -73,7 +74,8 @@ public class ReportController extends Controller { * @param organizationRepository Instance of {@link OrganizationRepository}. * @param jobExecutorRegion {@link ClusterSharding} actor balancing the execution of {@link models.internal.scheduling.Job}s. * @param reportExecutionContext {@link ReportExecutionContext} to use to validate new reports. - * @param environment environment we're executing in + * @param environment environment we're executing in. + * @param problemHelper ProblemHelper to render errors. */ @Inject public ReportController( @@ -83,7 +85,8 @@ public ReportController( @Named("job-execution-shard-region") final ActorRef jobExecutorRegion, final ReportExecutionContext reportExecutionContext, - final Environment environment + final Environment environment, + final ProblemHelper problemHelper ) { this( configuration.getInt("reports.limit"), @@ -91,35 +94,37 @@ public ReportController( organizationRepository, jobExecutorRegion, reportExecutionContext, - environment + environment, + problemHelper ); } /** * Updates a report within the report repository, or creates one if it doesn't already exist. * + * @param request Http.Request being handled. * @return Ok if the report was added or updated successfully, an HTTP error code otherwise. */ - public Result addOrUpdate() { + public Result addOrUpdate(final Http.Request request) { final Report report; try { - final JsonNode body = request().body().asJson(); + final JsonNode body = request.body().asJson(); report = OBJECT_MAPPER.treeToValue(body, models.view.reports.Report.class).toInternal(); } catch (final JsonProcessingException | ConstraintsViolatedException e) { LOGGER.error() .setMessage("Failed to build a report.") .setThrowable(e) .log(); - return badRequest(ProblemHelper.createErrorJson(_environment, e, "request.BAD_REQUEST")); + return badRequest(_problemHelper.createErrorJson(_environment, e, "request.BAD_REQUEST", request.transientLang())); } final ImmutableList problems = _reportExecutionContext.validateExecute(report); if (!problems.isEmpty()) { - return badRequest(ProblemHelper.createErrorJson(problems)); + return badRequest(_problemHelper.createErrorJson(problems, request.transientLang())); } - final Organization organization = _organizationRepository.get(request()); + final Organization organization = _organizationRepository.get(request); try { _reportRepository.addOrUpdateReport(report, organization); // CHECKSTYLE.OFF: IllegalCatch - Convert any exception to 500 @@ -132,7 +137,7 @@ public Result addOrUpdate() { return internalServerError(); } - kickJobExecutor(report.getId()); + kickJobExecutor(report.getId(), _organizationRepository.get(request)); return noContent(); } @@ -141,17 +146,19 @@ public Result addOrUpdate() { * * @param limit The maximum number of results to return. Optional. * @param offset The number of results to skip. Optional. + * @param request Http.Request being handled. * @return {@link Result} paginated matching reports. */ // CHECKSTYLE.OFF: ParameterNameCheck - Names must match query parameters. public Result query( @Nullable final Integer limit, - @Nullable final Integer offset) { + @Nullable final Integer offset, + final Http.Request request) { // CHECKSTYLE.ON: ParameterNameCheck final Organization organization; try { - organization = _organizationRepository.get(request()); + organization = _organizationRepository.get(request); } catch (final NoSuchElementException e) { return internalServerError(); } @@ -186,40 +193,45 @@ public Result query( final Map conditions = ImmutableMap.of(); - result.etag().ifPresent(etag -> response().setHeader(HttpHeaders.ETAG, etag)); - return ok(Json.toJson(new PagedContainer<>( + Result response = ok(Json.toJson(new PagedContainer<>( result.values() .stream() .map(models.view.reports.Report::fromInternal) .collect(Collectors.toList()), new Pagination( - request().path(), + request.path(), result.total(), result.values().size(), argLimit, argOffset, conditions)))); + if (result.etag().isPresent()) { + response = response.withHeader(HttpHeaders.ETAG, result.etag().get()); + } + return response; } /** * Get specific report. * * @param id The identifier of the report. + * @param request Http.Request being handled. * @return The report, if any, otherwise notFound. */ - public Result get(final UUID id) { + public Result get(final UUID id, final Http.Request request) { final Organization organization; try { - organization = _organizationRepository.get(request()); + organization = _organizationRepository.get(request); } catch (final NoSuchElementException e) { return internalServerError(); } final Optional report = _reportRepository.getReport(id, organization); return report .map(r -> ok(Json.toJson(models.view.reports.Report.fromInternal(r)))) - .orElseGet(() -> notFound(ProblemHelper.createErrorJson(new Problem.Builder() + .orElseGet(() -> notFound(_problemHelper.createErrorJson(new Problem.Builder() .setProblemCode("report_problem.NOT_FOUND") - .build() + .build(), + request.transientLang() ))); } @@ -227,15 +239,16 @@ public Result get(final UUID id) { * Delete a specific report. * * @param id The identifier of the report. + * @param request Http.Request being handled. * @return No content if successful, otherwise an HTTP error code. */ - public Result delete(final UUID id) { - final Organization organization = _organizationRepository.get(request()); + public Result delete(final UUID id, final Http.Request request) { + final Organization organization = _organizationRepository.get(request); final int deletedCount = _reportRepository.deleteReport(id, organization); if (deletedCount == 0) { return notFound(); } - kickJobExecutor(id); + kickJobExecutor(id, organization); return noContent(); } @@ -245,7 +258,8 @@ private ReportController( final OrganizationRepository organizationRepository, final ActorRef jobExecutorRegion, final ReportExecutionContext reportExecutionContext, - final Environment environment + final Environment environment, + final ProblemHelper problemHelper ) { _maxLimit = maxLimit; _reportRepository = reportRepository; @@ -253,14 +267,15 @@ private ReportController( _jobExecutorRegion = jobExecutorRegion; _reportExecutionContext = reportExecutionContext; _environment = environment; + _problemHelper = problemHelper; } - private void kickJobExecutor(final UUID reportId) { + private void kickJobExecutor(final UUID reportId, final Organization organization) { _jobExecutorRegion.tell( new JobExecutorActor.Reload.Builder() .setJobRef(new JobRef.Builder() .setId(reportId) - .setOrganization(_organizationRepository.get(request())) + .setOrganization(organization) .setRepositoryType(ReportRepository.class) .setExecutionRepositoryType(ReportExecutionRepository.class) .build()) @@ -274,6 +289,7 @@ private void kickJobExecutor(final UUID reportId) { private final ActorRef _jobExecutorRegion; private final ReportExecutionContext _reportExecutionContext; private final Environment _environment; + private final ProblemHelper _problemHelper; private static final Logger LOGGER = LoggerFactory.getLogger(ReportController.class); private static final ObjectMapper OBJECT_MAPPER = ObjectMapperFactory.getInstance(); diff --git a/app/controllers/RollupController.java b/app/controllers/RollupController.java index 86bd8a686..748cbb8b8 100644 --- a/app/controllers/RollupController.java +++ b/app/controllers/RollupController.java @@ -15,14 +15,17 @@ */ package controllers; -import akka.actor.ActorRef; -import akka.pattern.Patterns; import com.arpnetworking.rollups.ConsistencyChecker; import com.arpnetworking.steno.Logger; import com.arpnetworking.steno.LoggerFactory; import com.fasterxml.jackson.databind.ObjectMapper; -import com.google.inject.Inject; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.pattern.Patterns; import play.mvc.Controller; +import play.mvc.Http; import play.mvc.Result; import java.io.IOException; @@ -30,8 +33,6 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionException; import java.util.concurrent.CompletionStage; -import javax.inject.Named; -import javax.inject.Singleton; /** * Metrics portal rollup controller. Exposes APIs to query and manipulate rollups. @@ -61,12 +62,14 @@ public RollupController( * * This endpoint is currently intended only for debugging purposes. Do not rely on it. * + * @param request Http.Request being handled. + * * @return 204 if the consistency-check task was successfully enqueued; else 503 if the queue is full; else 500 for unknown failures. */ - public CompletionStage enqueueConsistencyCheck() { + public CompletionStage enqueueConsistencyCheck(final Http.Request request) { final ConsistencyChecker.Task task; try { - task = _mapper.treeToValue(request().body().asJson(), ConsistencyChecker.Task.class); + task = _mapper.treeToValue(request.body().asJson(), ConsistencyChecker.Task.class); } catch (final IOException err) { return CompletableFuture.completedFuture(badRequest(err.getMessage())); } diff --git a/app/controllers/TelemetryProxyController.java b/app/controllers/TelemetryProxyController.java index b82fc7e4a..20827fc21 100644 --- a/app/controllers/TelemetryProxyController.java +++ b/app/controllers/TelemetryProxyController.java @@ -15,17 +15,17 @@ */ package controllers; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.http.javadsl.Http; -import akka.http.javadsl.model.ws.Message; -import akka.http.javadsl.model.ws.TextMessage; -import akka.http.javadsl.model.ws.WebSocketRequest; -import akka.http.javadsl.model.ws.WebSocketUpgradeResponse; -import akka.stream.ActorMaterializer; -import akka.stream.javadsl.Flow; -import com.google.inject.Inject; +import jakarta.inject.Inject; import models.internal.Features; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.Http; +import org.apache.pekko.http.javadsl.model.ws.Message; +import org.apache.pekko.http.javadsl.model.ws.TextMessage; +import org.apache.pekko.http.javadsl.model.ws.WebSocketRequest; +import org.apache.pekko.http.javadsl.model.ws.WebSocketUpgradeResponse; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.javadsl.Flow; import play.mvc.Controller; import play.mvc.WebSocket; @@ -51,7 +51,7 @@ public TelemetryProxyController( final Features features) { _system = system; _enabled = features.isProxyEnabled(); - _materializer = ActorMaterializer.create(_system); + _materializer = Materializer.createMaterializer(_system); } /** @@ -79,7 +79,7 @@ public WebSocket stream(final String uri) throws URISyntaxException { } - private ActorMaterializer _materializer; + private Materializer _materializer; private final ActorSystem _system; private final boolean _enabled; } diff --git a/app/global/ActionCreator.java b/app/global/ActionCreator.java index 1c166c35e..c93f5dffc 100644 --- a/app/global/ActionCreator.java +++ b/app/global/ActionCreator.java @@ -19,11 +19,11 @@ import com.arpnetworking.metrics.MetricsFactory; import com.arpnetworking.play.metrics.MetricsActionWrapper; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; +import jakarta.inject.Inject; import play.mvc.Action; import play.mvc.Http; import java.lang.reflect.Method; -import javax.inject.Inject; /** * Request handler for the application. diff --git a/app/global/BlockingIOExecutionContext.java b/app/global/BlockingIOExecutionContext.java index eb10fc9d4..5e0e03638 100644 --- a/app/global/BlockingIOExecutionContext.java +++ b/app/global/BlockingIOExecutionContext.java @@ -16,8 +16,8 @@ package global; -import akka.actor.ActorSystem; -import com.google.inject.Inject; +import jakarta.inject.Inject; +import org.apache.pekko.actor.ActorSystem; import play.libs.concurrent.CustomExecutionContext; /** diff --git a/app/global/PillarModule.java b/app/global/CassandraMigrationModule.java similarity index 51% rename from app/global/PillarModule.java rename to app/global/CassandraMigrationModule.java index 5f1101017..bd4157dab 100644 --- a/app/global/PillarModule.java +++ b/app/global/CassandraMigrationModule.java @@ -15,12 +15,10 @@ */ package global; -import com.arpnetworking.pillar.PillarInitializer; -import com.datastax.driver.core.Cluster; -import com.datastax.driver.core.CodecRegistry; -import com.datastax.driver.core.Session; -import com.datastax.driver.extras.codecs.jdk8.InstantCodec; -import com.datastax.driver.mapping.MappingManager; +import com.arpnetworking.pillar.CassandraMigrationInitializer; +import com.datastax.oss.driver.api.core.CqlSession; +import com.datastax.oss.driver.api.core.CqlSessionBuilder; +import com.datastax.oss.driver.api.core.type.codec.registry.MutableCodecRegistry; import com.google.common.util.concurrent.MoreExecutors; import com.google.inject.AbstractModule; import com.google.inject.Key; @@ -29,15 +27,15 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigException; import com.typesafe.config.ConfigObject; +import jakarta.inject.Inject; import play.Environment; import play.inject.ApplicationLifecycle; -import java.net.InetAddress; +import java.net.InetSocketAddress; import java.util.List; import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.stream.Collectors; -import javax.inject.Inject; import javax.inject.Provider; /** @@ -45,7 +43,7 @@ * * @author Brandon Arp (brandon dot arp at smartsheet dot com) */ -public class PillarModule extends AbstractModule { +public class CassandraMigrationModule extends AbstractModule { /** * Public constructor. * @@ -53,7 +51,7 @@ public class PillarModule extends AbstractModule { * @param configuration Play configuration */ @Inject - public PillarModule(final Environment environment, final Config configuration) { + public CassandraMigrationModule(final Environment environment, final Config configuration) { _configuration = configuration; } @@ -66,37 +64,31 @@ protected void configure() { return; } - bind(PillarInitializer.class).asEagerSingleton(); + bind(CassandraMigrationInitializer.class).asEagerSingleton(); final ConfigObject cassConfig = dbConfig.root(); final Set dbNames = cassConfig.keySet(); - final Provider registryProvider = binder().getProvider(CodecRegistry.class); + final Provider registryProvider = binder().getProvider(MutableCodecRegistry.class); final Provider lifecycle = binder().getProvider(ApplicationLifecycle.class); for (final String name : dbNames) { - bind(Cluster.class).annotatedWith(Names.named(name)) + bind(CqlSession.class).annotatedWith(Names.named(name)) .toProvider(new CassandraClusterProvider(cassConfig.toConfig().getConfig(name), registryProvider, lifecycle)) .in(Scopes.SINGLETON); - final com.google.inject.Provider clusterProvider = binder().getProvider(Key.get(Cluster.class, Names.named(name))); - bind(Session.class).annotatedWith(Names.named(name)) - .toProvider(new CassandraSessionProvider(clusterProvider, lifecycle)); - bind(MappingManager.class).annotatedWith(Names.named(name)) - .toProvider(new CassandraMappingProvider(binder().getProvider(Key.get(Session.class, Names.named(name))))); } if (dbNames.contains("default")) { - bind(Session.class).toProvider(binder().getProvider(Key.get(Session.class, Names.named("default")))); - bind(MappingManager.class).toProvider(binder().getProvider(Key.get(MappingManager.class, Names.named("default")))); + bind(CqlSession.class).toProvider(binder().getProvider(Key.get(CqlSession.class, Names.named("default")))); } - bind(PillarInitializer.class).asEagerSingleton(); + bind(CassandraMigrationInitializer.class).asEagerSingleton(); } private final Config _configuration; - private static final class CassandraClusterProvider implements Provider { + private static final class CassandraClusterProvider implements Provider { CassandraClusterProvider( final Config config, - final Provider registryProvider, + final Provider registryProvider, final Provider lifecycleProvider) { _config = config; _registryProvider = registryProvider; @@ -104,7 +96,7 @@ private static final class CassandraClusterProvider implements Provider } @Override - public Cluster get() { + public CqlSession get() { final String clusterName = _config.getString("clusterName"); final int port; if (_config.hasPath("port")) { @@ -112,70 +104,35 @@ public Cluster get() { } else { port = DEFAULT_CASSANDRA_PORT; } - final List hosts = _config.getStringList("hosts") + final List hosts = _config.getStringList("hosts") .stream() .map(host -> { try { - return InetAddress.getByName(host); + return InetSocketAddress.createUnresolved(host, port); // CHECKSTYLE.OFF: IllegalCatch - Cannot throw checked exceptions inside .map } catch (final Exception e) { // CHECKSTYLE.ON: IllegalCatch throw new RuntimeException(e); } }).collect(Collectors.toList()); - final Cluster cluster = Cluster.builder() + final MutableCodecRegistry registry = _registryProvider.get(); + final CqlSession session = new CqlSessionBuilder() .addContactPoints(hosts) - .withClusterName(clusterName) - .withPort(port) - .withCodecRegistry(_registryProvider.get()) + .withCodecRegistry(registry) .build(); - cluster.getConfiguration().getCodecRegistry().register(InstantCodec.instance); _lifecycleProvider.get().addStopHook(() -> { final CompletableFuture done = new CompletableFuture<>(); - cluster.closeAsync().addListener(() -> done.complete(null), MoreExecutors.directExecutor()); + session.closeAsync().whenCompleteAsync((v, t) -> done.complete(null), MoreExecutors.directExecutor()); return done; }); - return cluster; + return session; } private final Config _config; - private final Provider _registryProvider; + private final Provider _registryProvider; private final Provider _lifecycleProvider; private static final int DEFAULT_CASSANDRA_PORT = 9042; } - private static final class CassandraSessionProvider implements Provider { - CassandraSessionProvider(final Provider clusterProvider, final Provider lifecycleProvider) { - _lifecycleProvider = lifecycleProvider; - _clusterProvider = clusterProvider; - } - - @Override - public Session get() { - final Session session = _clusterProvider.get().newSession(); - _lifecycleProvider.get().addStopHook(() -> { - final CompletableFuture done = new CompletableFuture<>(); - session.closeAsync().addListener(() -> done.complete(null), MoreExecutors.directExecutor()); - return done; - }); - return session; - } - - private final Provider _clusterProvider; - private final Provider _lifecycleProvider; - } - - private static final class CassandraMappingProvider implements Provider { - CassandraMappingProvider(final com.google.inject.Provider sessionProvider) { - _sessionProvider = sessionProvider; - } - - @Override - public MappingManager get() { - return new MappingManager(_sessionProvider.get()); - } - - private final com.google.inject.Provider _sessionProvider; - } } diff --git a/app/global/Filters.java b/app/global/Filters.java index 6f5d0266a..2f81a9183 100644 --- a/app/global/Filters.java +++ b/app/global/Filters.java @@ -15,6 +15,8 @@ */ package global; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import play.api.http.EnabledFilters; import play.filters.cors.CORSFilter; import play.filters.gzip.GzipFilter; @@ -23,8 +25,6 @@ import java.util.ArrayList; import java.util.List; -import javax.inject.Inject; -import javax.inject.Singleton; /** * Creates the set of filters used for handling requests. diff --git a/app/global/Global.java b/app/global/Global.java index dfb33ac33..556f97bce 100644 --- a/app/global/Global.java +++ b/app/global/Global.java @@ -16,11 +16,11 @@ package global; -import akka.actor.ActorSystem; import com.arpnetworking.steno.Logger; import com.arpnetworking.steno.LoggerFactory; -import com.google.inject.Inject; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; +import jakarta.inject.Inject; +import org.apache.pekko.actor.ActorSystem; import play.inject.ApplicationLifecycle; import java.util.concurrent.CompletableFuture; @@ -35,13 +35,13 @@ public final class Global { /** * Public constructor. * - * @param akka the actor system. + * @param pekko the actor system. * @param lifecycle injected lifecycle. */ @Inject - public Global(final ActorSystem akka, final ApplicationLifecycle lifecycle) { + public Global(final ActorSystem pekko, final ApplicationLifecycle lifecycle) { LOGGER.info().setMessage("Starting application...").log(); - _akka = akka; + _pekko = pekko; lifecycle.addStopHook(this::onStop); LOGGER.debug().setMessage("Startup complete").log(); @@ -57,7 +57,7 @@ private CompletionStage onStop() { return shutdownFuture; } - private final ActorSystem _akka; + private final ActorSystem _pekko; private final CompletableFuture _shutdownFuture = new CompletableFuture<>(); private static final Logger LOGGER = LoggerFactory.getLogger(Global.class); diff --git a/app/global/MainModule.java b/app/global/MainModule.java index 03844c560..a412ae899 100644 --- a/app/global/MainModule.java +++ b/app/global/MainModule.java @@ -17,26 +17,10 @@ import actors.JvmMetricsCollector; import actors.NoopActor; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.PoisonPill; -import akka.actor.Props; -import akka.cluster.Cluster; -import akka.cluster.sharding.ClusterSharding; -import akka.cluster.sharding.ClusterShardingSettings; -import akka.cluster.singleton.ClusterSingletonManager; -import akka.cluster.singleton.ClusterSingletonManagerSettings; -import akka.cluster.singleton.ClusterSingletonProxy; -import akka.cluster.singleton.ClusterSingletonProxySettings; -import com.arpnetworking.commons.akka.GuiceActorCreator; -import com.arpnetworking.commons.akka.JacksonSerializer; -import com.arpnetworking.commons.akka.ParallelLeastShardAllocationStrategy; import com.arpnetworking.commons.jackson.databind.EnumerationDeserializer; import com.arpnetworking.commons.jackson.databind.EnumerationDeserializerStrategyUsingToUpperCase; import com.arpnetworking.commons.jackson.databind.ObjectMapperFactory; -import com.arpnetworking.commons.jackson.databind.module.akka.AkkaModule; -import com.arpnetworking.commons.java.time.TimeAdapters; -import com.arpnetworking.commons.tagger.Tagger; +import com.arpnetworking.commons.pekko.GuiceActorCreator; import com.arpnetworking.kairos.client.KairosDbClient; import com.arpnetworking.kairos.client.KairosDbClientImpl; import com.arpnetworking.kairos.client.models.Metric; @@ -80,6 +64,11 @@ import com.arpnetworking.metrics.portal.scheduling.JobRefSerializer; import com.arpnetworking.metrics.portal.scheduling.Schedule; import com.arpnetworking.metrics.portal.scheduling.impl.UnboundedPeriodicSchedule; +import com.arpnetworking.notcommons.jackson.databind.module.pekko.PekkoModule; +import com.arpnetworking.notcommons.java.time.TimeAdapters; +import com.arpnetworking.notcommons.pekko.JacksonSerializer; +import com.arpnetworking.notcommons.pekko.ParallelLeastShardAllocationStrategy; +import com.arpnetworking.notcommons.tagger.Tagger; import com.arpnetworking.play.configuration.ConfigurationHelper; import com.arpnetworking.rollups.ConsistencyChecker; import com.arpnetworking.rollups.MetricsDiscovery; @@ -89,14 +78,13 @@ import com.arpnetworking.rollups.RollupManager; import com.arpnetworking.rollups.RollupPartitioner; import com.arpnetworking.utility.ConfigTypedProvider; -import com.datastax.driver.core.CodecRegistry; -import com.datastax.driver.extras.codecs.jdk8.InstantCodec; -import com.fasterxml.jackson.core.JsonParser; +import com.datastax.oss.driver.api.core.type.codec.registry.CodecRegistry; +import com.fasterxml.jackson.core.json.JsonReadFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair; import com.fasterxml.jackson.databind.module.SimpleModule; -import com.fasterxml.jackson.module.guice.GuiceAnnotationIntrospector; -import com.fasterxml.jackson.module.guice.GuiceInjectableValues; +import com.fasterxml.jackson.module.guice7.GuiceAnnotationIntrospector; +import com.fasterxml.jackson.module.guice7.GuiceInjectableValues; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.inject.AbstractModule; @@ -107,17 +95,31 @@ import com.google.inject.name.Names; import com.typesafe.config.Config; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; -import io.ebean.Ebean; -import io.ebean.EbeanServer; +import io.ebean.DB; +import io.ebean.Database; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; import models.internal.Features; import models.internal.MetricsQueryFormat; import models.internal.impl.DefaultFeatures; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.PoisonPill; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.cluster.sharding.ClusterSharding; +import org.apache.pekko.cluster.sharding.ClusterShardingSettings; +import org.apache.pekko.cluster.singleton.ClusterSingletonManager; +import org.apache.pekko.cluster.singleton.ClusterSingletonManagerSettings; +import org.apache.pekko.cluster.singleton.ClusterSingletonProxy; +import org.apache.pekko.cluster.singleton.ClusterSingletonProxySettings; import org.flywaydb.play.PlayInitializer; import play.Environment; import play.api.Configuration; import play.api.db.evolutions.DynamicEvolutions; -import play.api.libs.json.JsonParserSettings; -import play.api.libs.json.jackson.PlayJsonModule; +import play.api.libs.json.JsonConfig; +import play.api.libs.json.jackson.PlayJsonMapperModule; import play.db.ebean.EbeanConfig; import play.inject.ApplicationLifecycle; import play.libs.Json; @@ -125,6 +127,7 @@ import java.net.URI; import java.time.Clock; +import java.time.Duration; import java.util.ArrayList; import java.util.Collections; import java.util.EnumSet; @@ -132,11 +135,8 @@ import java.util.Optional; import java.util.Set; import java.util.concurrent.CompletableFuture; -import java.util.concurrent.TimeUnit; import java.util.function.Consumer; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; +import javax.annotation.Nullable; /** * Module that defines the main bindings. @@ -155,11 +155,11 @@ protected void configure() { // Databases // NOTE: These are not singletons because the lifecycle is controlled by // Ebean itself and we are just binding the instances by name through Guice - bind(EbeanServer.class) + bind(Database.class) .annotatedWith(Names.named("metrics_portal")) .toProvider(MetricsPortalEbeanServerProvider.class); - bind(EbeanServer.class) + bind(Database.class) .annotatedWith(Names.named("metrics_portal_ddl")) .toProvider(MetricsPortalDDLEbeanServerProvider.class); @@ -258,9 +258,7 @@ private AlertExecutionContext provideAlertExecutionContext( final Schedule defaultAlertSchedule = new UnboundedPeriodicSchedule.Builder() .setPeriod(TimeAdapters.toChronoUnit(interval.unit())) .setPeriodCount(interval.length()) - .setOverrunReporter(overrunPeriodCount -> { - metrics.recordCounter("jobs/executor/overrunPeriods", overrunPeriodCount); - }) + .setOverrunReporter(overrunPeriodCount -> metrics.recordCounter("jobs/executor/overrunPeriods", overrunPeriodCount)) .build(); return new AlertExecutionContext(defaultAlertSchedule, executor, queryOffset, alertNotifier); } @@ -367,9 +365,7 @@ private DevToolsFactory provideChromeDevToolsFactory(final Config config, final @Provides @SuppressFBWarnings("UPM_UNCALLED_PRIVATE_METHOD") // Invoked reflectively by Guice private CodecRegistry provideCodecRegistry() { - final CodecRegistry registry = CodecRegistry.DEFAULT_INSTANCE; - registry.register(InstantCodec.instance); - return registry; + return CodecRegistry.DEFAULT; } @Provides @@ -451,9 +447,9 @@ private ObjectMapper provideObjectMapper( Metric.Order.class, EnumerationDeserializerStrategyUsingToUpperCase.newInstance())); final ObjectMapper objectMapper = ObjectMapperFactory.createInstance(); - objectMapper.enable(JsonParser.Feature.ALLOW_NON_NUMERIC_NUMBERS); - objectMapper.registerModule(new PlayJsonModule(JsonParserSettings.apply())); - objectMapper.registerModule(new AkkaModule(actorSystem)); + objectMapper.enable(JsonReadFeature.ALLOW_NON_NUMERIC_NUMBERS.mappedFeature()); + objectMapper.registerModule(new PlayJsonMapperModule(JsonConfig.apply())); + objectMapper.registerModule(new PekkoModule(actorSystem)); objectMapper.registerModule(customModule); configureMapperForInjection(objectMapper, injector); @@ -532,14 +528,14 @@ private PeriodicMetrics providePeriodicMetrics(final MetricsFactory metricsFacto .setMetricsFactory(metricsFactory) .setPollingExecutor(actorSystem.dispatcher()) .build(); - final FiniteDuration delay = FiniteDuration.apply(1, TimeUnit.SECONDS); - actorSystem.scheduler().schedule(delay, delay, periodicMetrics, actorSystem.dispatcher()); + final Duration delay = Duration.ofSeconds(1); + actorSystem.scheduler().scheduleAtFixedRate(delay, delay, periodicMetrics, actorSystem.dispatcher()); return periodicMetrics; } @Provides - @com.google.inject.Singleton - @com.google.inject.name.Named("status") + @Singleton + @Named("status") @SuppressFBWarnings("UPM_UNCALLED_PRIVATE_METHOD") // Invoked reflectively by Guice private ActorRef provideStatusActor( final ActorSystem system, @@ -596,7 +592,7 @@ private Tagger provideRollupGeneratorTagger( return ConfigurationHelper.toInstanceMapped(Tagger.class, mapper, taggerConfig); } - private static final class MetricsPortalEbeanServerProvider implements Provider { + private static final class MetricsPortalEbeanServerProvider implements Provider { @Inject MetricsPortalEbeanServerProvider( final Configuration configuration, @@ -608,12 +604,12 @@ private static final class MetricsPortalEbeanServerProvider implements Provider< } @Override - public EbeanServer get() { - return Ebean.getServer("metrics_portal"); + public Database get() { + return DB.byName("metrics_portal"); } } - private static final class MetricsPortalDDLEbeanServerProvider implements Provider { + private static final class MetricsPortalDDLEbeanServerProvider implements Provider { @Inject MetricsPortalDDLEbeanServerProvider( final Configuration configuration, @@ -625,8 +621,8 @@ private static final class MetricsPortalDDLEbeanServerProvider implements Provid } @Override - public EbeanServer get() { - return Ebean.getServer("metrics_portal_ddl"); + public Database get() { + return DB.byName("metrics_portal_ddl"); } } @@ -836,10 +832,11 @@ private static final class HostProviderProvider implements Provider { } @Override + @Nullable public ActorRef get() { final Cluster cluster = Cluster.get(_system); // Start a singleton instance of the scheduler on a "host_indexer" node in the cluster. - if (cluster.selfRoles().contains(INDEXER_ROLE)) { + if (cluster.getSelfRoles().contains(INDEXER_ROLE)) { final ActorRef managerRef = _system.actorOf(ClusterSingletonManager.props( _hostProviderProps, PoisonPill.getInstance(), @@ -876,10 +873,11 @@ private static final class ReportRepositoryJobCoordinatorProvider implements Pro } @Override + @Nullable public ActorRef get() { final Cluster cluster = Cluster.get(_system); // Start a singleton instance of the scheduler on a "host_indexer" node in the cluster. - if (cluster.selfRoles().contains(ANTI_ENTROPY_ROLE)) { + if (cluster.getSelfRoles().contains(ANTI_ENTROPY_ROLE)) { final ActorRef managerRef = _system.actorOf(ClusterSingletonManager.props( JobCoordinator.props(_injector, ReportRepository.class, @@ -924,9 +922,10 @@ private static final class AlertRepositoryJobCoordinatorProvider implements Prov } @Override + @Nullable public ActorRef get() { final Cluster cluster = Cluster.get(_system); - if (cluster.selfRoles().contains(ANTI_ENTROPY_ROLE)) { + if (cluster.getSelfRoles().contains(ANTI_ENTROPY_ROLE)) { final ActorRef managerRef = _system.actorOf(ClusterSingletonManager.props( JobCoordinator.props(_injector, AlertJobRepository.class, @@ -968,10 +967,11 @@ private static final class RollupGeneratorProvider implements Provider } @Override + @Nullable public ActorRef get() { final Cluster cluster = Cluster.get(_system); final int actorCount = _configuration.getInt("rollup.generator.count"); - if (_enabled && cluster.selfRoles().contains(RollupMetricsDiscoveryProvider.ROLLUP_METRICS_DISCOVERY_ROLE)) { + if (_enabled && cluster.getSelfRoles().contains(RollupMetricsDiscoveryProvider.ROLLUP_METRICS_DISCOVERY_ROLE)) { for (int i = 0; i < actorCount; i++) { _system.actorOf(GuiceActorCreator.props(_injector, RollupGenerator.class)); } @@ -1107,7 +1107,7 @@ private abstract static class ClusterSingletonProvider implements Provider * This is necessary for configuring the Ebean server with dependencies * constructed via Guice, for instance. This class will be invoked for every - * instance of {@code EbeanServer}. + * instance of {@code Database}. *

* NOTE: This must be used alongside an injector, since its whole purpose * is a shim around Ebean's lack of Guice support. @@ -47,7 +47,7 @@ public class MetricsPortalServerConfigStartup implements ServerConfigStartup { public MetricsPortalServerConfigStartup() {} @Override - public void onStart(final ServerConfig serverConfig) { + public void onStart(final DatabaseBuilder serverConfig) { LOGGER.info().setMessage("Initializing Ebean ServerConfig").log(); // In some cases we manually load the ebean model classes via // ServerConfig#addPackage (see EbeanServerHelper). @@ -63,6 +63,6 @@ public void onStart(final ServerConfig serverConfig) { if (gObjectMapper == null) { throw new IllegalStateException("ObjectMapper is null - was this class loaded manually outside of Play?"); } - serverConfig.setObjectMapper(gObjectMapper); + serverConfig.objectMapper(gObjectMapper); } } diff --git a/app/models/cassandra/Host.java b/app/models/cassandra/Host.java index 27701bae1..102214ba4 100644 --- a/app/models/cassandra/Host.java +++ b/app/models/cassandra/Host.java @@ -15,19 +15,24 @@ */ package models.cassandra; -import com.datastax.driver.mapping.Result; -import com.datastax.driver.mapping.annotations.Accessor; -import com.datastax.driver.mapping.annotations.Column; -import com.datastax.driver.mapping.annotations.Param; -import com.datastax.driver.mapping.annotations.PartitionKey; -import com.datastax.driver.mapping.annotations.Query; -import com.datastax.driver.mapping.annotations.Table; +import com.datastax.oss.driver.api.mapper.annotations.ClusteringColumn; +import com.datastax.oss.driver.api.mapper.annotations.CqlName; +import com.datastax.oss.driver.api.mapper.annotations.Dao; +import com.datastax.oss.driver.api.mapper.annotations.DaoFactory; +import com.datastax.oss.driver.api.mapper.annotations.Delete; +import com.datastax.oss.driver.api.mapper.annotations.Entity; +import com.datastax.oss.driver.api.mapper.annotations.Insert; +import com.datastax.oss.driver.api.mapper.annotations.PartitionKey; +import com.datastax.oss.driver.api.mapper.annotations.Query; +import com.datastax.oss.driver.api.mapper.annotations.Select; +import jakarta.persistence.Version; import models.internal.MetricsSoftwareState; import models.internal.impl.DefaultHost; import java.time.Instant; import java.util.UUID; -import javax.persistence.Version; +import java.util.concurrent.CompletionStage; +import java.util.stream.Stream; /** * Model for alerts stored in Cassandra. @@ -35,30 +40,24 @@ * @author Brandon Arp (brandon dot arp at smartsheet dot com) */ // CHECKSTYLE.OFF: MemberNameCheck -@Table(name = "hosts", keyspace = "portal") +@Entity(defaultKeyspace = "portal") +@CqlName("hosts") public class Host { @Version - @Column(name = "version") private Long version; - @Column(name = "created_at") private Instant createdAt; - @Column(name = "updated_at") private Instant updatedAt; - @PartitionKey(1) - @Column(name = "name") + @ClusteringColumn(0) private String name; - @Column(name = "cluster") private String cluster; - @Column(name = "metrics_software_state") private String metricsSoftwareState; @PartitionKey(0) - @Column(name = "organization") private UUID organization; public Long getVersion() { @@ -135,16 +134,59 @@ public models.internal.Host toInternal() { * * @author Brandon Arp (brandon dot arp at smartsheet dot com) */ - @Accessor + @Dao public interface HostQueries { /** * Queries for all hosts in an organization. * - * @param organization Organization owning the alerts + * @param org Organization uuid owning the hosts * @return Mapped query results */ - @Query("select * from portal.hosts_by_organization where organization = :org") - Result getHostsForOrganization(@Param("org") UUID organization); + @Query("select * from ${keyspaceId}.hosts where organization = :org") + Stream getHostsForOrganization(UUID org); + + /** + * Gets a host by organization and name. + * + * @param organizationId the id of the organization + * @param name the name of the host + * + * @return A future host or null if none found + */ + @Select + CompletionStage get(UUID organizationId, String name); + + /** + * Saves a host record. + * + * @param host the host + */ + @Insert + void save(Host host); + + /** + * Deletes a host record. + * + * @param organizationId the organization id that owns the host + * @param name the name of the host + */ + @Delete(entityClass = Host.class) + void delete(UUID organizationId, String name); + } + + /** + * Mapper for Host queries. + */ + @com.datastax.oss.driver.api.mapper.annotations.Mapper + public interface Mapper { + /** + * Gets the DAO. + * + * @return the DAO + */ + @DaoFactory + HostQueries dao(); + } } // CHECKSTYLE.ON: MemberNameCheck diff --git a/app/models/ebean/AlertExecution.java b/app/models/ebean/AlertExecution.java index 79b76ffd7..fe25a5548 100644 --- a/app/models/ebean/AlertExecution.java +++ b/app/models/ebean/AlertExecution.java @@ -18,19 +18,19 @@ import com.google.common.base.Objects; import io.ebean.annotation.DbJsonB; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.IdClass; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; import models.internal.alerts.AlertEvaluationResult; import java.time.Instant; import java.util.UUID; import javax.annotation.Nullable; -import javax.persistence.Column; -import javax.persistence.Embeddable; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.IdClass; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; /** * An execution event for an {@link models.internal.alerts.Alert}. diff --git a/app/models/ebean/BaseExecution.java b/app/models/ebean/BaseExecution.java index 49d3d6fc8..89a93e4ea 100644 --- a/app/models/ebean/BaseExecution.java +++ b/app/models/ebean/BaseExecution.java @@ -17,17 +17,17 @@ package models.ebean; import io.ebean.annotation.DbJsonB; +import jakarta.persistence.Column; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.persistence.Id; +import jakarta.persistence.MappedSuperclass; import java.time.Instant; import java.util.Collections; import java.util.Map; import java.util.UUID; import javax.annotation.Nullable; -import javax.persistence.Column; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.Id; -import javax.persistence.MappedSuperclass; /** * A generic execution event for a {@code Job}. diff --git a/app/models/ebean/GrafanaReportPanelReportSource.java b/app/models/ebean/GrafanaReportPanelReportSource.java index f5c01bec3..b81c8613e 100644 --- a/app/models/ebean/GrafanaReportPanelReportSource.java +++ b/app/models/ebean/GrafanaReportPanelReportSource.java @@ -15,10 +15,11 @@ */ package models.ebean; +import jakarta.persistence.Column; +import jakarta.persistence.DiscriminatorValue; +import jakarta.persistence.Entity; + import java.net.URI; -import javax.persistence.Column; -import javax.persistence.DiscriminatorValue; -import javax.persistence.Entity; /** * Data Model for SQL storage of a Grafana based report generation scheme. diff --git a/app/models/ebean/Host.java b/app/models/ebean/Host.java index e97b828c9..92c7aa6b8 100644 --- a/app/models/ebean/Host.java +++ b/app/models/ebean/Host.java @@ -16,22 +16,22 @@ package models.ebean; -import io.ebean.annotation.CreatedTimestamp; -import io.ebean.annotation.UpdatedTimestamp; +import io.ebean.annotation.WhenCreated; +import io.ebean.annotation.WhenModified; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.Version; import models.internal.MetricsSoftwareState; import models.internal.impl.DefaultHost; import java.sql.Timestamp; import javax.annotation.Nullable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.Version; /** * Data model for hosts. @@ -57,11 +57,11 @@ public class Host { @Column(name = "version") private Long version; - @CreatedTimestamp + @WhenCreated @Column(name = "created_at") private Timestamp createdAt; - @UpdatedTimestamp + @WhenModified @Column(name = "updated_at") private Timestamp updatedAt; diff --git a/app/models/ebean/HtmlReportFormat.java b/app/models/ebean/HtmlReportFormat.java index ad4c6dcef..7e8725d3b 100644 --- a/app/models/ebean/HtmlReportFormat.java +++ b/app/models/ebean/HtmlReportFormat.java @@ -16,8 +16,8 @@ package models.ebean; -import javax.persistence.DiscriminatorValue; -import javax.persistence.Entity; +import jakarta.persistence.DiscriminatorValue; +import jakarta.persistence.Entity; /** * Ebean data model for an HTML report format. diff --git a/app/models/ebean/NeverReportSchedule.java b/app/models/ebean/NeverReportSchedule.java index 208c91e8c..de9b76b14 100644 --- a/app/models/ebean/NeverReportSchedule.java +++ b/app/models/ebean/NeverReportSchedule.java @@ -17,9 +17,8 @@ import com.arpnetworking.metrics.portal.scheduling.Schedule; import com.arpnetworking.metrics.portal.scheduling.impl.NeverSchedule; - -import javax.persistence.DiscriminatorValue; -import javax.persistence.Entity; +import jakarta.persistence.DiscriminatorValue; +import jakarta.persistence.Entity; /** * Data Model for SQL storage of report schedules. diff --git a/app/models/ebean/OneOffReportSchedule.java b/app/models/ebean/OneOffReportSchedule.java index aa94a5a32..79b2e3112 100644 --- a/app/models/ebean/OneOffReportSchedule.java +++ b/app/models/ebean/OneOffReportSchedule.java @@ -17,9 +17,8 @@ import com.arpnetworking.metrics.portal.scheduling.Schedule; import com.arpnetworking.metrics.portal.scheduling.impl.OneOffSchedule; - -import javax.persistence.DiscriminatorValue; -import javax.persistence.Entity; +import jakarta.persistence.DiscriminatorValue; +import jakarta.persistence.Entity; /** * Data Model for SQL storage of report schedules. diff --git a/app/models/ebean/Organization.java b/app/models/ebean/Organization.java index 72f872e37..00812b2d1 100644 --- a/app/models/ebean/Organization.java +++ b/app/models/ebean/Organization.java @@ -15,20 +15,20 @@ */ package models.ebean; -import io.ebean.EbeanServer; -import io.ebean.annotation.CreatedTimestamp; -import io.ebean.annotation.UpdatedTimestamp; +import io.ebean.Database; +import io.ebean.annotation.WhenCreated; +import io.ebean.annotation.WhenModified; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Table; +import jakarta.persistence.Version; import java.sql.Timestamp; import java.util.Optional; import java.util.UUID; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; -import javax.persistence.Version; /** * Data model for organizations. @@ -57,11 +57,11 @@ public class Organization { @Column(name = "version") private Long version; - @CreatedTimestamp + @WhenCreated @Column(name = "created_at") private Timestamp createdAt; - @UpdatedTimestamp + @WhenModified @Column(name = "updated_at") private Timestamp updatedAt; @@ -73,7 +73,7 @@ public class Organization { * @return The organization from the database. */ public static Optional findByOrganization( - final EbeanServer ebeanServer, + final Database ebeanServer, final models.internal.Organization organization) { return Optional.ofNullable( ebeanServer.createQuery(Organization.class) diff --git a/app/models/ebean/PdfReportFormat.java b/app/models/ebean/PdfReportFormat.java index adacca40e..caf020e1e 100644 --- a/app/models/ebean/PdfReportFormat.java +++ b/app/models/ebean/PdfReportFormat.java @@ -16,9 +16,9 @@ package models.ebean; -import javax.persistence.Column; -import javax.persistence.DiscriminatorValue; -import javax.persistence.Entity; +import jakarta.persistence.Column; +import jakarta.persistence.DiscriminatorValue; +import jakarta.persistence.Entity; /** * Ebean data model for a PDF report format. diff --git a/app/models/ebean/PeriodicReportSchedule.java b/app/models/ebean/PeriodicReportSchedule.java index aa6308423..bb339cea9 100644 --- a/app/models/ebean/PeriodicReportSchedule.java +++ b/app/models/ebean/PeriodicReportSchedule.java @@ -18,16 +18,16 @@ import com.arpnetworking.metrics.portal.scheduling.Schedule; import com.arpnetworking.metrics.portal.scheduling.impl.PeriodicSchedule; +import jakarta.persistence.Column; +import jakarta.persistence.DiscriminatorValue; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; import models.internal.scheduling.Period; import java.time.Duration; import java.time.ZoneId; import java.util.Objects; -import javax.persistence.Column; -import javax.persistence.DiscriminatorValue; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; /** * Data Model for a periodically recurring report schedule (i.e. recurs daily). diff --git a/app/models/ebean/Recipient.java b/app/models/ebean/Recipient.java index 5a60e03c7..160e2fd41 100644 --- a/app/models/ebean/Recipient.java +++ b/app/models/ebean/Recipient.java @@ -16,21 +16,21 @@ package models.ebean; import com.arpnetworking.metrics.portal.reports.RecipientType; -import io.ebean.annotation.CreatedTimestamp; -import io.ebean.annotation.UpdatedTimestamp; +import io.ebean.annotation.WhenCreated; +import io.ebean.annotation.WhenModified; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import models.internal.impl.DefaultRecipient; import java.sql.Timestamp; import java.util.Objects; import java.util.UUID; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; /** * Data Model for SQL storage of a report recipient. @@ -55,11 +55,11 @@ public final class Recipient { @Column(name = "uuid") private UUID uuid; - @CreatedTimestamp + @WhenCreated @Column(name = "created_at") private Timestamp createdAt; - @UpdatedTimestamp + @WhenModified @Column(name = "updated_at") private Timestamp updatedAt; diff --git a/app/models/ebean/Report.java b/app/models/ebean/Report.java index c883c7ee0..d704abc9c 100644 --- a/app/models/ebean/Report.java +++ b/app/models/ebean/Report.java @@ -17,10 +17,21 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSetMultimap; -import io.ebean.EbeanServer; -import io.ebean.annotation.CreatedTimestamp; +import io.ebean.Database; import io.ebean.annotation.SoftDelete; -import io.ebean.annotation.UpdatedTimestamp; +import io.ebean.annotation.WhenCreated; +import io.ebean.annotation.WhenModified; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OneToOne; +import jakarta.persistence.Table; import models.internal.impl.DefaultReport; import org.apache.commons.codec.digest.DigestUtils; @@ -33,17 +44,6 @@ import java.util.Set; import java.util.UUID; import java.util.stream.Collectors; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.OneToOne; -import javax.persistence.Table; /** @@ -82,11 +82,11 @@ public class Report { ) private List recipientAssocs = Collections.emptyList(); - @CreatedTimestamp + @WhenCreated @Column(name = "created_at") private Timestamp createdAt; - @UpdatedTimestamp + @WhenModified @Column(name = "updated_at") private Timestamp updatedAt; @@ -199,13 +199,13 @@ public void setOrganization(final Organization value) { /** * Finds a {@link Report} when given a uuid. * - * @param ebeanServer The {@code EbeanServer} instance to use. + * @param ebeanServer The {@code Database} instance to use. * @param organization The parent organization for this report. * @param reportId The report uuid to lookup. * @return The report from the database. */ public static Optional findByUUID( - final EbeanServer ebeanServer, + final Database ebeanServer, final models.ebean.Organization organization, final UUID reportId) { return ebeanServer.find(models.ebean.Report.class) diff --git a/app/models/ebean/ReportExecution.java b/app/models/ebean/ReportExecution.java index a4370be86..c66cb7227 100644 --- a/app/models/ebean/ReportExecution.java +++ b/app/models/ebean/ReportExecution.java @@ -17,19 +17,19 @@ package models.ebean; import io.ebean.annotation.DbJsonB; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.IdClass; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; import java.time.Instant; import java.util.Objects; import java.util.UUID; import javax.annotation.Nullable; -import javax.persistence.Column; -import javax.persistence.Embeddable; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.IdClass; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; /** * An execution event for a {@link ReportExecution}. diff --git a/app/models/ebean/ReportFormat.java b/app/models/ebean/ReportFormat.java index c4486e46a..bcfae456c 100644 --- a/app/models/ebean/ReportFormat.java +++ b/app/models/ebean/ReportFormat.java @@ -16,16 +16,16 @@ package models.ebean; -import javax.persistence.DiscriminatorColumn; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Inheritance; -import javax.persistence.InheritanceType; -import javax.persistence.OneToOne; -import javax.persistence.Table; +import jakarta.persistence.DiscriminatorColumn; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Inheritance; +import jakarta.persistence.InheritanceType; +import jakarta.persistence.OneToOne; +import jakarta.persistence.Table; // CHECKSTYLE.OFF: MemberNameCheck diff --git a/app/models/ebean/ReportRecipientAssoc.java b/app/models/ebean/ReportRecipientAssoc.java index 0dcb14959..982bc0efa 100644 --- a/app/models/ebean/ReportRecipientAssoc.java +++ b/app/models/ebean/ReportRecipientAssoc.java @@ -16,22 +16,22 @@ package models.ebean; -import io.ebean.annotation.CreatedTimestamp; +import io.ebean.annotation.WhenCreated; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.IdClass; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToOne; +import jakarta.persistence.Table; import java.sql.Timestamp; import java.util.Objects; import javax.annotation.Nullable; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Embeddable; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.IdClass; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToOne; -import javax.persistence.Table; /** * Data model for a mapping between a report and a recipient. @@ -48,7 +48,7 @@ @IdClass(ReportRecipientAssoc.Key.class) // CHECKSTYLE.OFF: MemberNameCheck public class ReportRecipientAssoc { - @CreatedTimestamp + @WhenCreated @Column(name = "created_at") private Timestamp createdAt; diff --git a/app/models/ebean/ReportSchedule.java b/app/models/ebean/ReportSchedule.java index d6228d653..a9367900a 100644 --- a/app/models/ebean/ReportSchedule.java +++ b/app/models/ebean/ReportSchedule.java @@ -16,18 +16,18 @@ package models.ebean; import com.arpnetworking.metrics.portal.scheduling.Schedule; +import jakarta.persistence.Column; +import jakarta.persistence.DiscriminatorColumn; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Inheritance; +import jakarta.persistence.InheritanceType; +import jakarta.persistence.Table; import java.time.Instant; import javax.annotation.Nullable; -import javax.persistence.Column; -import javax.persistence.DiscriminatorColumn; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Inheritance; -import javax.persistence.InheritanceType; -import javax.persistence.Table; /** * Data Model for SQL storage of report schedules. diff --git a/app/models/ebean/ReportSource.java b/app/models/ebean/ReportSource.java index b13ec66d1..5fd64d836 100644 --- a/app/models/ebean/ReportSource.java +++ b/app/models/ebean/ReportSource.java @@ -15,21 +15,21 @@ */ package models.ebean; -import io.ebean.annotation.CreatedTimestamp; import io.ebean.annotation.SoftDelete; -import io.ebean.annotation.UpdatedTimestamp; +import io.ebean.annotation.WhenCreated; +import io.ebean.annotation.WhenModified; +import jakarta.persistence.Column; +import jakarta.persistence.DiscriminatorColumn; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Inheritance; +import jakarta.persistence.InheritanceType; +import jakarta.persistence.Table; import java.sql.Timestamp; import java.util.UUID; -import javax.persistence.Column; -import javax.persistence.DiscriminatorColumn; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Inheritance; -import javax.persistence.InheritanceType; -import javax.persistence.Table; /** * Data Model for SQL storage of a report generation scheme. @@ -53,10 +53,10 @@ public abstract class ReportSource { private long id; @Column(name = "uuid") private UUID uuid; - @CreatedTimestamp + @WhenCreated @Column(name = "created_at") private Timestamp createdAt; - @UpdatedTimestamp + @WhenModified @Column(name = "updated_at") private Timestamp updatedAt; @SoftDelete diff --git a/app/models/ebean/WebPageReportSource.java b/app/models/ebean/WebPageReportSource.java index 302afd83b..a10c161d5 100644 --- a/app/models/ebean/WebPageReportSource.java +++ b/app/models/ebean/WebPageReportSource.java @@ -15,10 +15,11 @@ */ package models.ebean; +import jakarta.persistence.Column; +import jakarta.persistence.DiscriminatorValue; +import jakarta.persistence.Entity; + import java.net.URI; -import javax.persistence.Column; -import javax.persistence.DiscriminatorValue; -import javax.persistence.Entity; /** * Data Model for SQL storage of a web based report generation scheme. diff --git a/app/models/internal/AlertQuery.java b/app/models/internal/AlertQuery.java index 434e31c54..6d0e6397a 100644 --- a/app/models/internal/AlertQuery.java +++ b/app/models/internal/AlertQuery.java @@ -34,6 +34,15 @@ public interface AlertQuery { */ AlertQuery contains(String contains); + /** + * Filter to only alerts that are enabled. Optional. Default is not set. + * + * @param enabled The enabled flag. + * @return This instance of {@link AlertQuery}. + */ + AlertQuery enabled(boolean enabled); + + /** * The maximum number of alerts to return. Optional. Default is 1000. * @@ -71,6 +80,13 @@ public interface AlertQuery { */ Optional getContains(); + /** + * Accessor for the enabled flag. + * + * @return The enabled flag. + */ + Optional getEnabled(); + /** * Accessor for the limit. * diff --git a/app/models/internal/HostQuery.java b/app/models/internal/HostQuery.java index f78289377..c67a9b839 100644 --- a/app/models/internal/HostQuery.java +++ b/app/models/internal/HostQuery.java @@ -15,6 +15,7 @@ */ package models.internal; +import java.io.Serializable; import java.util.Optional; /** @@ -22,7 +23,7 @@ * * @author Ville Koskela (ville dot koskela at inscopemetrics dot io) */ -public interface HostQuery { +public interface HostQuery extends Serializable { /** * Set the hostname to query for. Optional. Defaults to all hosts. If this field is not set it is strongly diff --git a/app/models/internal/Organization.java b/app/models/internal/Organization.java index 8b65f6ee8..a7d995072 100644 --- a/app/models/internal/Organization.java +++ b/app/models/internal/Organization.java @@ -15,6 +15,7 @@ */ package models.internal; +import java.io.Serializable; import java.util.UUID; /** @@ -23,7 +24,7 @@ * * @author Brandon Arp (brandon dot arp at smartsheet dot com) */ -public interface Organization { +public interface Organization extends Serializable { /** * Accessor for the uuid. * diff --git a/app/models/internal/ShardAllocation.java b/app/models/internal/ShardAllocation.java index b9722f283..a330b43ac 100644 --- a/app/models/internal/ShardAllocation.java +++ b/app/models/internal/ShardAllocation.java @@ -15,26 +15,29 @@ */ package models.internal; -import akka.actor.ActorRef; import com.arpnetworking.commons.builder.OvalBuilder; -import com.arpnetworking.commons.java.util.LexicalNumericComparator; +import com.arpnetworking.notcommons.java.util.LexicalNumericComparator; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.google.common.collect.Sets; import net.sf.oval.constraint.NotNull; +import org.apache.pekko.actor.ActorRef; import java.io.IOException; +import java.io.Serial; +import java.io.Serializable; import java.util.Collections; import java.util.Set; +import java.util.TreeSet; /** * Represents a shard allocation. * * @author Brandon Arp (brandon dot arp at inscopemetrics dot io) */ -public final class ShardAllocation { +public final class ShardAllocation implements Serializable { public String getHost() { return _host; } @@ -71,9 +74,11 @@ private ShardAllocation(final Builder builder) { private final String _host; private final ActorRef _shardRegion; - private final Set _currentShards; - private final Set _incomingShards; - private final Set _outgoingShards; + private final TreeSet _currentShards; + private final TreeSet _incomingShards; + private final TreeSet _outgoingShards; + @Serial + private static final long serialVersionUID = 1L; /** * Implementation of builder pattern for {@link ShardAllocation}. @@ -155,7 +160,7 @@ public Builder setHost(final String value) { private ActorRef _shardRegion; } - private static class CountingSetSerializer extends JsonSerializer> { + private static final class CountingSetSerializer extends JsonSerializer> { /** * Method that can be called to ask implementation to serialize values of type this serializer handles. diff --git a/app/models/internal/TimeSeriesResult.java b/app/models/internal/TimeSeriesResult.java index 9a8fe1c5e..9d755471d 100644 --- a/app/models/internal/TimeSeriesResult.java +++ b/app/models/internal/TimeSeriesResult.java @@ -40,8 +40,18 @@ public interface TimeSeriesResult { * @author Brandon Arp (brandon dot arp at inscopemetrics dot com) */ interface Query { + /** + * Gets the number of samples. + * + * @return the number of samples + */ long getSampleSize(); + /** + * Gets the results of the query. + * + * @return a list of {@link Result} + */ ImmutableList getResults(); } @@ -51,14 +61,39 @@ interface Query { * @author Brandon Arp (brandon dot arp at inscopemetrics dot com) */ interface Result { + /** + * Gets the name of the metric. + * + * @return the metric name + */ String getName(); + /** + * Gets the data points. + * + * @return a list of {@link DataPoint} + */ ImmutableList getValues(); + /** + * Gets the tags. + * + * @return the tags + */ ImmutableMultimap getTags(); + /** + * Gets the alert triggers (if any). + * + * @return list of triggers + */ ImmutableList getAlerts(); + /** + * Gets group-by parameters. + * + * @return group by details + */ ImmutableList getGroupBy(); } @@ -77,9 +112,19 @@ interface QueryGroupBy { * @author Brandon Arp (brandon dot arp at inscopemetrics dot com) */ interface QueryTagGroupBy extends QueryGroupBy { + /** + * Gets the tags. + * + * @return the tags + */ ImmutableList getTags(); - ImmutableMap getGroup(); + /** + * The key/value pairs for this group by record. + * + * @return key/value map for the group by tags + */ + ImmutableMap getGroup(); } /** @@ -89,6 +134,11 @@ interface QueryTagGroupBy extends QueryGroupBy { * @author Brandon Arp (brandon dot arp at inscopemetrics dot com) */ interface QueryTypeGroupBy extends QueryGroupBy { + /** + * Gets the group by type. + * + * @return the group by type + */ String getType(); } @@ -98,8 +148,18 @@ interface QueryTypeGroupBy extends QueryGroupBy { * @author Brandon Arp (brandon dot arp at inscopemetrics dot com) */ interface DataPoint { + /** + * Gets the time of the datapoint. + * + * @return the datapoint time + */ Instant getTime(); + /** + * Gets the recorded value of the datapoint. + * + * @return the datapoint value + */ Object getValue(); } } diff --git a/app/models/internal/impl/DefaultAlertQuery.java b/app/models/internal/impl/DefaultAlertQuery.java index b0e550eb1..ba300ae07 100644 --- a/app/models/internal/impl/DefaultAlertQuery.java +++ b/app/models/internal/impl/DefaultAlertQuery.java @@ -50,6 +50,12 @@ public AlertQuery contains(final String contains) { return this; } + @Override + public AlertQuery enabled(final boolean enabled) { + _enabled = Optional.of(enabled); + return this; + } + @Override public AlertQuery limit(final int limit) { _limit = limit; @@ -77,6 +83,11 @@ public Optional getContains() { return _contains; } + @Override + public Optional getEnabled() { + return _enabled; + } + @Override public int getLimit() { return _limit; @@ -102,6 +113,7 @@ public String toString() { private final AlertRepository _repository; private final Organization _organization; private Optional _contains = Optional.empty(); + private Optional _enabled = Optional.empty(); private int _limit = DEFAULT_LIMIT; private Optional _offset = Optional.empty(); diff --git a/app/models/internal/impl/DefaultAlertTrigger.java b/app/models/internal/impl/DefaultAlertTrigger.java index 96de4343a..dbd3abc38 100644 --- a/app/models/internal/impl/DefaultAlertTrigger.java +++ b/app/models/internal/impl/DefaultAlertTrigger.java @@ -18,9 +18,11 @@ import com.arpnetworking.commons.builder.OvalBuilder; import com.arpnetworking.logback.annotations.Loggable; import com.google.common.collect.ImmutableMap; +import net.sf.oval.Validator; import net.sf.oval.constraint.CheckWith; import net.sf.oval.constraint.CheckWithCheck; import net.sf.oval.constraint.NotNull; +import net.sf.oval.context.OValContext; import java.time.ZonedDateTime; import java.util.Optional; @@ -152,7 +154,7 @@ public Builder setEndTime(final Optional value) { private static final class EndAfterStart implements CheckWithCheck.SimpleCheck { @Override - public boolean isSatisfied(final Object obj, final Object val) { + public boolean isSatisfied(final Object obj, final Object val, final OValContext context, final Validator validator) { if (obj instanceof Builder) { final Builder builder = (Builder) obj; return builder._endTime.map(endTime -> !endTime.isBefore(builder._time)).orElse(true); diff --git a/app/models/internal/impl/DefaultHostQuery.java b/app/models/internal/impl/DefaultHostQuery.java index b416b3cb9..371469f70 100644 --- a/app/models/internal/impl/DefaultHostQuery.java +++ b/app/models/internal/impl/DefaultHostQuery.java @@ -18,11 +18,14 @@ import com.arpnetworking.logback.annotations.Loggable; import com.arpnetworking.metrics.portal.hosts.HostRepository; import com.google.common.base.MoreObjects; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import models.internal.HostQuery; import models.internal.MetricsSoftwareState; import models.internal.Organization; +import java.io.Serial; import java.util.Optional; +import javax.annotation.Nullable; /** * Default internal model implementation for a host query. @@ -45,19 +48,19 @@ public DefaultHostQuery(final HostRepository repository, final Organization orga @Override public HostQuery partialHostname(final Optional partialHostname) { - _partialHostname = partialHostname; + _partialHostname = partialHostname.orElse(null); return this; } @Override public HostQuery metricsSoftwareState(final Optional metricsSoftwareState) { - _metricsSoftwareState = metricsSoftwareState; + _metricsSoftwareState = metricsSoftwareState.orElse(null); return this; } @Override public HostQuery cluster(final Optional cluster) { - _cluster = cluster; + _cluster = cluster.orElse(null); return this; } @@ -69,19 +72,19 @@ public HostQuery limit(final int limit) { @Override public HostQuery offset(final Optional offset) { - _offset = offset; + _offset = offset.orElse(null); return this; } @Override public HostQuery sortBy(final Optional sortBy) { - _sortBy = sortBy; + _sortBy = sortBy.orElse(null); return this; } @Override public Optional getPartialHostname() { - return _partialHostname; + return Optional.ofNullable(_partialHostname); } @Override @@ -91,12 +94,12 @@ public Organization getOrganization() { @Override public Optional getMetricsSoftwareState() { - return _metricsSoftwareState; + return Optional.ofNullable(_metricsSoftwareState); } @Override public Optional getCluster() { - return _cluster; + return Optional.ofNullable(_cluster); } @Override @@ -106,12 +109,12 @@ public int getLimit() { @Override public Optional getOffset() { - return _offset; + return Optional.ofNullable(_offset); } @Override public Optional getSortBy() { - return _sortBy; + return Optional.ofNullable(_sortBy); } @Override @@ -129,14 +132,22 @@ public String toString() { } - private final HostRepository _repository; + @SuppressFBWarnings("SE_TRANSIENT_FIELD_NOT_RESTORED") + private final transient HostRepository _repository; private final Organization _organization; - private Optional _partialHostname = Optional.empty(); - private Optional _metricsSoftwareState = Optional.empty(); - private Optional _cluster = Optional.empty(); + @Nullable + private String _partialHostname = null; + @Nullable + private MetricsSoftwareState _metricsSoftwareState = null; + @Nullable + private String _cluster = null; private int _limit = DEFAULT_LIMIT; - private Optional _offset = Optional.empty(); - private Optional _sortBy = Optional.empty(); + @Nullable + private Integer _offset = null; + @Nullable + private Field _sortBy = null; private static final int DEFAULT_LIMIT = 1000; + @Serial + private static final long serialVersionUID = 1L; } diff --git a/app/models/internal/impl/DefaultOrganization.java b/app/models/internal/impl/DefaultOrganization.java index 2e8b3d2ec..528f903bc 100644 --- a/app/models/internal/impl/DefaultOrganization.java +++ b/app/models/internal/impl/DefaultOrganization.java @@ -23,6 +23,8 @@ import net.sf.oval.constraint.NotEmpty; import net.sf.oval.constraint.NotNull; +import java.io.Serial; +import java.io.Serializable; import java.util.UUID; /** @@ -31,7 +33,7 @@ * @author Brandon Arp (brandon dot arp at smartsheet dot com) */ @Loggable -public final class DefaultOrganization implements Organization { +public final class DefaultOrganization implements Organization, Serializable { @Override public UUID getId() { @@ -71,6 +73,8 @@ private DefaultOrganization(final Builder builder) { } private final UUID _id; + @Serial + private static final long serialVersionUID = 1L; /** * Implementation of builder pattern for {@link DefaultOrganization}. diff --git a/app/models/view/AlertTrigger.java b/app/models/view/AlertTrigger.java index d8a2a0d19..74edca521 100644 --- a/app/models/view/AlertTrigger.java +++ b/app/models/view/AlertTrigger.java @@ -19,9 +19,11 @@ import com.arpnetworking.logback.annotations.Loggable; import com.google.common.collect.ImmutableMap; import models.internal.impl.DefaultAlertTrigger; +import net.sf.oval.Validator; import net.sf.oval.constraint.CheckWith; import net.sf.oval.constraint.CheckWithCheck; import net.sf.oval.constraint.NotNull; +import net.sf.oval.context.OValContext; import java.time.ZonedDateTime; import java.util.Optional; @@ -178,7 +180,7 @@ public Builder setEndTime(final Optional value) { private static final class EndAfterStart implements CheckWithCheck.SimpleCheck { @Override - public boolean isSatisfied(final Object obj, final Object val) { + public boolean isSatisfied(final Object obj, final Object val, final OValContext context, final Validator validator) { if (obj instanceof Builder) { final Builder builder = (Builder) obj; return builder._endTime.map(endTime -> !endTime.isBefore(builder._time)).orElse(true); diff --git a/app/models/view/Pagination.java b/app/models/view/Pagination.java index 560217d81..baa4aaa3b 100644 --- a/app/models/view/Pagination.java +++ b/app/models/view/Pagination.java @@ -17,7 +17,8 @@ import com.arpnetworking.logback.annotations.Loggable; import com.google.common.base.MoreObjects; -import org.jboss.netty.handler.codec.http.QueryStringEncoder; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; +import org.apache.hc.core5.net.URIBuilder; import java.net.URI; import java.net.URISyntaxException; @@ -42,6 +43,8 @@ public class Pagination { * @param offset The offset, in records, of the first record in this page. * @param conditions The {@code Map} of query parameter key-value pairs. */ + @SuppressFBWarnings(value = "CT_CONSTRUCTOR_THROW", justification = "Protected as mentioned at " + + "https://wiki.sei.cmu.edu/confluence/display/java/OBJ11-J.+Be+wary+of+letting+constructors+throw+exceptions") public Pagination( final String path, final long total, @@ -106,14 +109,14 @@ private URI createReference( final int limit, final int offset, final Map conditions) { - final QueryStringEncoder queryStringEncoder = new QueryStringEncoder(path); + final URIBuilder builder = new URIBuilder().setPath(path); for (Map.Entry entry : conditions.entrySet()) { - queryStringEncoder.addParam(entry.getKey(), entry.getValue()); + builder.addParameter(entry.getKey(), entry.getValue()); } - queryStringEncoder.addParam("limit", String.valueOf(limit)); - queryStringEncoder.addParam("offset", String.valueOf(offset)); + builder.addParameter("limit", String.valueOf(limit)); + builder.addParameter("offset", String.valueOf(offset)); try { - return new URI(queryStringEncoder.toString()); + return new URI(builder.toString()); } catch (final URISyntaxException e) { throw new RuntimeException("Failed building uri", e); } diff --git a/app/models/view/StatusResponse.java b/app/models/view/StatusResponse.java index ae84b3b55..6d91cc6d6 100644 --- a/app/models/view/StatusResponse.java +++ b/app/models/view/StatusResponse.java @@ -15,8 +15,6 @@ */ package models.view; -import akka.actor.Address; -import akka.cluster.Member; import com.arpnetworking.commons.builder.OvalBuilder; import com.arpnetworking.metrics.portal.health.ClusterStatusCacheActor; import com.fasterxml.jackson.annotation.JsonProperty; @@ -28,7 +26,9 @@ import com.google.common.collect.Iterables; import models.internal.ShardAllocation; import net.sf.oval.constraint.NotNull; -import scala.collection.JavaConversions; +import org.apache.pekko.actor.Address; +import org.apache.pekko.cluster.Member; +import scala.jdk.CollectionConverters; import java.io.IOException; import java.util.Collections; @@ -146,7 +146,7 @@ public void serialize( throws IOException { gen.writeStartObject(); gen.writeStringField("address", value.address().toString()); - gen.writeObjectField("roles", JavaConversions.setAsJavaSet(value.roles())); + gen.writeObjectField("roles", CollectionConverters.SetHasAsJava(value.roles()).asJava()); gen.writeNumberField("upNumber", value.upNumber()); gen.writeStringField("status", value.status().toString()); gen.writeNumberField("uniqueAddress", value.uniqueAddress().longUid()); diff --git a/build.sbt b/build.sbt index 16941226b..686692cf8 100644 --- a/build.sbt +++ b/build.sbt @@ -1,37 +1,8 @@ -import com.arpnetworking.sbt.typescript.Import.TypescriptKeys - -scalaVersion := "2.11.12" +scalaVersion := "2.12.15" lazy val main = (project in file(".")) - .enablePlugins(SbtWeb) .settings( - libraryDependencies ++= Seq( - "org.webjars" % "bean" % "1.0.14", - "org.webjars" % "bootstrap" % "3.3.7", - "org.webjars" % "durandal" % "2.2.0", - "org.webjars" % "Eonasdan-bootstrap-datetimepicker" % "4.17.47", - "org.webjars" % "flotr2" % "d43f8566e8", - "org.webjars" % "font-awesome" % "4.3.0-2", - "org.webjars" % "jQRangeSlider" % "5.7.0", - "org.webjars" % "jquery" % "3.2.1", - "org.webjars" % "jquery-ui" % "1.12.1", - "org.webjars" % "jquery-ui-themes" % "1.12.1", - "org.webjars" % "knockout" % "3.4.0", - "org.webjars" % "requirejs-text" % "2.0.10-1", - "org.webjars" % "typeaheadjs" % "0.10.4-1", - "org.webjars" % "underscorejs" % "1.8.3", - "org.webjars.npm" % "d3" % "4.11.0", - "org.webjars.npm" % "github-com-auth0-jwt-decode" % "2.1.0", - "org.webjars.npm" % "graceful-readlink" % "1.0.1", - "org.webjars.npm" % "iconv-lite" % "0.4.24", - "org.webjars.npm" % "moment" % "2.24.0", - "org.webjars.npm" % "moment-timezone" % "0.5.23" - ), + libraryDependencies ++= Seq(), ivyLoggingLevel := UpdateLogging.Quiet, - sourceDirectory in Assets := baseDirectory.value / "app/assets", - resourceDirectory in Assets := baseDirectory.value / "public", - target := baseDirectory.value / "target/sbt", - includeFilter in gzip := "*", - TypescriptKeys.configFile := "tsconfig.json", - pipelineStages := Seq(digest, gzip) + target := baseDirectory.value / "target/sbt" ) diff --git a/conf/cassandra/migration/default/V1__create_portal.cql b/conf/cassandra/migration/default/001_create_portal.cql similarity index 95% rename from conf/cassandra/migration/default/V1__create_portal.cql rename to conf/cassandra/migration/default/001_create_portal.cql index 8f7119098..41636bbb6 100644 --- a/conf/cassandra/migration/default/V1__create_portal.cql +++ b/conf/cassandra/migration/default/001_create_portal.cql @@ -1,6 +1,5 @@ -- description: creates initial schema -- authoredAt: 1370028263000 --- up: -- stage: 1 CREATE TABLE alerts @@ -37,8 +36,3 @@ SELECT * FROM alerts WHERE organization IS NOT NULL AND uuid IS NOT NULL PRIMARY KEY (organization, uuid); - --- down: - --- stage: 1 -DROP TABLE alerts; \ No newline at end of file diff --git a/conf/cassandra/migration/default/V2__create_hosts_table.cql b/conf/cassandra/migration/default/002_create_hosts_table.cql similarity index 81% rename from conf/cassandra/migration/default/V2__create_hosts_table.cql rename to conf/cassandra/migration/default/002_create_hosts_table.cql index ce054911b..97dc18583 100644 --- a/conf/cassandra/migration/default/V2__create_hosts_table.cql +++ b/conf/cassandra/migration/default/002_create_hosts_table.cql @@ -1,8 +1,6 @@ -- description: creates hosts table -- authoredAt: 1525330368000 --- up: - -- stage: 1 CREATE TABLE hosts ( @@ -22,11 +20,3 @@ SELECT * FROM hosts WHERE organization IS NOT NULL AND name IS NOT NULL PRIMARY KEY (organization, name); - --- down: - --- stage: 1 -DROP MATERIALIZED VIEW hosts_by_organization; - --- stage: 2 -DROP TABLE hosts; diff --git a/conf/db/migration/akka_ddl/V1__akka_persistence_jdbc.sql b/conf/db/migration/akka_ddl/V1__akka_persistence_jdbc.sql deleted file mode 100644 index 8bc809103..000000000 --- a/conf/db/migration/akka_ddl/V1__akka_persistence_jdbc.sql +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright 2019 Dropbox - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Based on: - * - * https://github.com/dnvriend/akka-persistence-jdbc/blob/master/src/test/resources/schema/postgres/postgres-schema.sql - */ - -DROP TABLE IF EXISTS akka.journal; - -CREATE TABLE IF NOT EXISTS akka.journal ( - ordering BIGSERIAL, - persistence_id VARCHAR(255) NOT NULL, - sequence_number BIGINT NOT NULL, - deleted BOOLEAN DEFAULT FALSE, - tags VARCHAR(255) DEFAULT NULL, - message BYTEA NOT NULL, - PRIMARY KEY(persistence_id, sequence_number) -); - -CREATE UNIQUE INDEX journal_ordering_idx ON akka.journal(ordering); - -DROP TABLE IF EXISTS akka.snapshot; - -CREATE TABLE IF NOT EXISTS akka.snapshot ( - persistence_id VARCHAR(255) NOT NULL, - sequence_number BIGINT NOT NULL, - created BIGINT NOT NULL, - snapshot BYTEA NOT NULL, - PRIMARY KEY(persistence_id, sequence_number) -); diff --git a/conf/db/migration/pekko_ddl/V1__pekko_persistence_jdbc.sql b/conf/db/migration/pekko_ddl/V1__pekko_persistence_jdbc.sql new file mode 100644 index 000000000..8f10f3761 --- /dev/null +++ b/conf/db/migration/pekko_ddl/V1__pekko_persistence_jdbc.sql @@ -0,0 +1,88 @@ +/** + * Copyright 2019 Dropbox + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Based on: + * + * https://github.com/dnvriend/akka-persistence-jdbc/blob/master/src/test/resources/schema/postgres/postgres-schema.sql + */ +DROP TABLE IF EXISTS event_journal; +DROP TABLE IF EXISTS event_tag; +DROP TABLE IF EXISTS event_snapshot; +DROP TABLE IF EXISTS durable_state; + +CREATE TABLE IF NOT EXISTS event_journal( + ordering BIGSERIAL, + persistence_id VARCHAR(255) NOT NULL, + sequence_number BIGINT NOT NULL, + deleted BOOLEAN DEFAULT FALSE NOT NULL, + + writer VARCHAR(255) NOT NULL, + write_timestamp BIGINT, + adapter_manifest VARCHAR(255), + + event_ser_id INTEGER NOT NULL, + event_ser_manifest VARCHAR(255) NOT NULL, + event_payload BYTEA NOT NULL, + + meta_ser_id INTEGER, + meta_ser_manifest VARCHAR(255), + meta_payload BYTEA, + + PRIMARY KEY(persistence_id, sequence_number) + ); + +CREATE UNIQUE INDEX event_journal_ordering_idx ON event_journal(ordering); + +CREATE TABLE IF NOT EXISTS event_tag( + event_id BIGINT, + tag VARCHAR(256), + PRIMARY KEY(event_id, tag), + CONSTRAINT fk_event_journal + FOREIGN KEY(event_id) + REFERENCES event_journal(ordering) + ON DELETE CASCADE + ); + +CREATE TABLE IF NOT EXISTS snapshot ( + persistence_id VARCHAR(255) NOT NULL, + sequence_number BIGINT NOT NULL, + created BIGINT NOT NULL, + + snapshot_ser_id INTEGER NOT NULL, + snapshot_ser_manifest VARCHAR(255) NOT NULL, + snapshot_payload BYTEA NOT NULL, + + meta_ser_id INTEGER, + meta_ser_manifest VARCHAR(255), + meta_payload BYTEA, + + PRIMARY KEY(persistence_id, sequence_number) + ); + +CREATE TABLE IF NOT EXISTS durable_state ( + global_offset BIGSERIAL, + persistence_id VARCHAR(255) NOT NULL, + revision BIGINT NOT NULL, + state_payload BYTEA NOT NULL, + state_serial_id INTEGER NOT NULL, + state_serial_manifest VARCHAR(255), + tag VARCHAR, + state_timestamp BIGINT NOT NULL, + PRIMARY KEY(persistence_id) + ); +CREATE INDEX state_tag_idx on durable_state (tag); +CREATE INDEX state_global_offset_idx on durable_state (global_offset); diff --git a/conf/logback-console.xml b/conf/logback-console.xml new file mode 100644 index 000000000..a758a59b0 --- /dev/null +++ b/conf/logback-console.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + true + true + + + + true + + + + + + + + + + + + + + + + + diff --git a/conf/logback-test.xml b/conf/logback-test.xml new file mode 100644 index 000000000..a85f7b947 --- /dev/null +++ b/conf/logback-test.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + %date %t [%level] %logger : %message %ex%n + + + + + + + + + + + + + + + + + + + + + diff --git a/conf/logback.xml b/conf/logback.xml index 5ad17a67e..dd6729164 100644 --- a/conf/logback.xml +++ b/conf/logback.xml @@ -1,4 +1,5 @@ + + + + + + + - - - - + + logs/metrics-portal.log - - + + 900000 2gb @@ -30,14 +35,14 @@ 5 true - - + + %date %t [%level] %logger : %message %ex%n - + 0 500 @@ -55,5 +60,4 @@ - diff --git a/conf/portal.application.conf b/conf/portal.application.conf index ca29d8d5f..be3dc9084 100644 --- a/conf/portal.application.conf +++ b/conf/portal.application.conf @@ -36,8 +36,9 @@ play.http.errorHandler = "global.ErrorHandler" play.http.filters = "global.Filters" play.http.session.httpOnly = false play.filters.cors.pathPrefixes = ["/v1/", "/api/v1/"] -play.filters.headers.contentSecurityPolicy = "script-src 'self' 'unsafe-eval'" +play.filters.csp.CSPFilter = "script-src 'self' 'unsafe-eval'" +play.evolutions.enabled = false # Http Server # ~~~~~ play.server.http.port = 8080 @@ -54,7 +55,7 @@ reports.limit = 1000 # Health Provider # ~~~~~ -http.healthProvider.type = "com.arpnetworking.metrics.portal.health.AkkaMembershipHealthProvider" +http.healthProvider.type = "com.arpnetworking.metrics.portal.health.PekkoMembershipHealthProvider" # Features # ~~~~~ @@ -157,7 +158,7 @@ rollup { ttl = 0s generator.count = 5 - generator.tagger.type = com.arpnetworking.commons.tagger.NoTagsTagger + generator.tagger.type = com.arpnetworking.notcommons.tagger.NoTagsTagger executor.count = 5 executor.pollInterval = "5min" manager.consistency_check_fraction_of_writes = 0.1 @@ -305,12 +306,12 @@ query { } } -# Akka +# Pekko # ~~~~~ -akka { - # Loggers to register at boot time (akka.event.Logging$DefaultLogger logs +pekko { + # Loggers to register at boot time (org.apache.pekko.event.Logging$DefaultLogger logs # to STDOUT) - loggers = ["akka.event.slf4j.Slf4jLogger"] + loggers = ["org.apache.pekko.event.slf4j.Slf4jLogger"] # Log level used by the configured loggers (see "loggers") as soon # as they have been started; before that, see "stdout-loglevel" @@ -324,16 +325,16 @@ akka { # Filter of log events that is used by the LoggingAdapter before # publishing log events to the eventStream. - logging-filter = "akka.event.slf4j.Slf4jLoggingFilter" + logging-filter = "org.apache.pekko.event.slf4j.Slf4jLoggingFilter" actor { - provider="akka.cluster.ClusterActorRefProvider" + provider="cluster" debug.unhandled = on serializers = { - jackson-json = "com.arpnetworking.commons.akka.JacksonSerializer" + jackson-json = "com.arpnetworking.notcommons.pekko.JacksonSerializer" } serialization-bindings = { - "com.arpnetworking.commons.akka.AkkaJsonSerializable" = "jackson-json" + "com.arpnetworking.notcommons.pekko.PekkoJsonSerializable" = "jackson-json" } default-dispatcher = { fork-join-executor = { @@ -345,8 +346,8 @@ akka { } cluster { - seed-nodes=["akka.tcp://mportal@127.0.0.1:2558"] - auto-down-unreachable-after = 300s + seed-nodes=["pekko://mportal@127.0.0.1:2558"] + downing-provider-class = "org.apache.pekko.cluster.sbr.SplitBrainResolverProvider" roles = [ "host_indexer", "rollup_metrics_discovery", @@ -363,36 +364,55 @@ akka { handoff-timeout="60 s" rebalance-interval="10 s" snapshot-interval="720 s" - state-store-mode="persistence" + state-store-mode="ddata" least-shard-allocation-strategy { rebalance-threshold=10 max-simultaneous-rebalance=3 } } } - remote { - log-remote-lifecycle-events="on" - netty.tcp.hostname="127.0.0.1" - netty.tcp.port=2558 + remote.artery { + canonical.hostname="127.0.0.1" + canonical.port = 2558 + bind.port = 2558 + bind.hostname = "0.0.0.0" } persistence { - journal.plugin = "inmemory-journal" - snapshot-store.plugin = "inmemory-snapshot-store" + journal { + plugin = "jdbc-journal" + } + snapshot-store { + plugin = "jdbc-snapshot-store" + } + state { + plugin = "jdbc-durable-state-store" + } } http { client { parsing.max-content-length = 104857600 - idle-timeout = 600s + idle-timeout = 60s } host-connection-pool { max-connections = 64 max-open-requests = 512 + max-connection-lifetime = 60s } } } +slick { + profile = "slick.jdbc.H2Profile$" + db { + url = "jdbc:h2:mem:test-database;DATABASE_TO_UPPER=false;" + user = "root" + password = "root" + driver = "org.h2.Driver" + numThreads = 5 + maxConnections = 5 + minConnections = 1 + } +} -play.akka.actor-system = "mportal" -play.akka.run-cs-from-phase = "before-cluster-shutdown" - -play.server.akka.requestTimeout = 600s +play.pekko.actor-system = "mportal" +play.server.pekko.requestTimeout = 600s play.server.http.idleTimeout = 600s diff --git a/conf/portal.routes b/conf/portal.routes index 64603be11..deba760a7 100644 --- a/conf/portal.routes +++ b/conf/portal.routes @@ -30,23 +30,23 @@ GET /version controllers.MetaController.versi GET /v1/proxy/stream controllers.TelemetryProxyController.stream(uri: String ?= null) # Hosts -GET /v1/hosts/query controllers.HostController.query(name: String ?= null, state: String ?= null, cluster: String ?= null, limit: java.lang.Integer ?= null, offset: java.lang.Integer ?= null, sort_by: String ?= null) -GET /v1/hosts/:id controllers.HostController.get(id: String) -PUT /v1/hosts controllers.HostController.addOrUpdate +GET /v1/hosts/query controllers.HostController.query(name: String ?= null, state: String ?= null, cluster: String ?= null, limit: java.lang.Integer ?= null, offset: java.lang.Integer ?= null, sort_by: String ?= null, request: Request) +GET /v1/hosts/:id controllers.HostController.get(id: String, request: Request) +PUT /v1/hosts controllers.HostController.addOrUpdate(request: Request) # Reports -GET /v1/reports/query controllers.ReportController.query(limit: java.lang.Integer ?= null, offset: java.lang.Integer ?= null) -GET /v1/reports/:id controllers.ReportController.get(id: java.util.UUID) -DELETE /v1/reports/:id controllers.ReportController.delete(id: java.util.UUID) -PUT /v1/reports controllers.ReportController.addOrUpdate +GET /v1/reports/query controllers.ReportController.query(limit: java.lang.Integer ?= null, offset: java.lang.Integer ?= null, request: Request) +GET /v1/reports/:id controllers.ReportController.get(id: java.util.UUID, request: Request) +DELETE /v1/reports/:id controllers.ReportController.delete(id: java.util.UUID, request: Request) +PUT /v1/reports controllers.ReportController.addOrUpdate(request: Request) # Alerts -GET /v1/alerts/query controllers.AlertController.query(limit: java.lang.Integer ?= null, offset: java.lang.Integer ?= null) -GET /v1/alerts/:id controllers.AlertController.get(id: java.util.UUID) +GET /v1/alerts/query controllers.AlertController.query(limit: java.lang.Integer ?= null, offset: java.lang.Integer ?= null, request: Request) +GET /v1/alerts/:id controllers.AlertController.get(id: java.util.UUID, request: Request) # Rollups # vvv This endpoint is currently intended only for debugging purposes. Do not rely on it. -POST /v1/rollups/check_consistency controllers.RollupController.enqueueConsistencyCheck() +POST /v1/rollups/check_consistency controllers.RollupController.enqueueConsistencyCheck(request: Request) # Templates GET /assets/lib/configure.js controllers.ApplicationController.getConfigureJs @@ -54,13 +54,13 @@ GET /assets/html/HeaderViewModel.html controllers.ApplicationControlle # Kairosdb proxy GET /api/v1/metricnames controllers.KairosDbProxyController.metricNames(containing: String ?= null, prefix: String ?= null) -GET /api/v1/health/check controllers.KairosDbProxyController.healthCheck() -GET /api/v1/health/status controllers.KairosDbProxyController.status() -GET /api/v1/tagnames controllers.KairosDbProxyController.tagNames() -GET /api/v1/tagvalues controllers.KairosDbProxyController.tagValues() -GET /api/v1/version controllers.KairosDbProxyController.version() -POST /api/v1/datapoints/query/tags controllers.KairosDbProxyController.queryTags() -POST /api/v1/datapoints/query controllers.KairosDbProxyController.queryMetrics() +GET /api/v1/health/check controllers.KairosDbProxyController.healthCheck(request: Request) +GET /api/v1/health/status controllers.KairosDbProxyController.status(request: Request) +GET /api/v1/tagnames controllers.KairosDbProxyController.tagNames(request: Request) +GET /api/v1/tagvalues controllers.KairosDbProxyController.tagValues(request: Request) +GET /api/v1/version controllers.KairosDbProxyController.version(request: Request) +POST /api/v1/datapoints/query/tags controllers.KairosDbProxyController.queryTags(request: Request) +POST /api/v1/datapoints/query controllers.KairosDbProxyController.queryMetrics(request: Request) # Map static resources from the /public folder to the /assets URL path GET /assets/*file controllers.Assets.versioned(path = "/public", file: Asset) diff --git a/conf/postgresql.application.conf b/conf/postgresql.application.conf index 50c610c50..56617d188 100644 --- a/conf/postgresql.application.conf +++ b/conf/postgresql.application.conf @@ -57,33 +57,34 @@ db { hikaricp.maximumPoolSize = 2 } - akka_ddl { - username = "akka_dba" - username = ${?PG_AKKA_DBA_USER} - password = "akka_dba_password" - password = ${?PG_AKKA_DBA_PASSWORD} - url = "jdbc:postgresql://"${postgres.host}":"${postgres.port}"/"${postgres.db}"?currentSchema=akka" - url = ${?PG_AKKA_URL} + pekko_ddl { + username = "pekko_dba" + username = ${?PG_PEKKO_DBA_USER} + password = "pekko_dba_password" + password = ${?PG_PEKKO_DBA_PASSWORD} + url = "jdbc:postgresql://"${postgres.host}":"${postgres.port}"/"${postgres.db}"?currentSchema=pekko" + url = ${?PG_PEKKO_URL} driver = "org.postgresql.Driver" initOnMigrate = false validateOnMigrate = true encoding = "UTF-8" migration.auto = true - migration.schemas = ["akka"] + migration.schemas = ["pekko"] - hikaricp.poolName = "akka_ddl" + hikaricp.poolName = "pekko_ddl" hikaricp.maximumPoolSize = 2 } # NOTE: Please refer to main/postgres/initdb.d for how to initialize your Postgresql instance. - # NOTE: The akka DML connection pool is configured below under Akka using Slick. + # NOTE: The Pekko DML connection pool is configured below under Pekko using Slick. } # Evolutions & Ebean play.evolutions.enabled = false play.modules.enabled += "org.flywaydb.play.PlayModule" ebeanconfig.datasource.default = "metrics_portal" +play.db.default = "metrics_portal" play.ebean.defaultDatasource = "metrics_portal" ebean.metrics_portal = ["models.ebean.*", "global.MetricsPortalServerConfigStartup"] @@ -117,9 +118,9 @@ alertExecutionCache { reportRepository.type = "com.arpnetworking.metrics.portal.reports.impl.DatabaseReportRepository" reportExecutionRepository.type = "com.arpnetworking.metrics.portal.reports.impl.DatabaseReportExecutionRepository" -# Akka +# Pekko # ~~~~~ -akka { +pekko { persistence { journal { plugin="jdbc-journal" @@ -129,34 +130,42 @@ akka { plugin="jdbc-snapshot-store" auto-start-snapshot-stores = ["jdbc-snapshot-store"] } + state { + plugin = "jdbc-durable-state-store" + } } } jdbc-journal { slick = ${slick} - tables.journal.schemaName = akka + tables.journal.schemaName = pekko } jdbc-snapshot-store { slick = ${slick} - tables.snapshot.schemaName = akka + tables.snapshot.schemaName = pekko +} + +jdbc-read-journal { + slick = ${slick} + tables.journal.schemaName = pekko } jdbc-read-journal { slick = ${slick} - tables.journal.schemaName = akka + tables.journal.schemaName = pekko } slick { profile = "slick.jdbc.PostgresProfile$" db { host = ${postgres.db} - user = "akka_app" - user = ${?PG_AKKA_APP_USER} - password = "akka_app_password" - password = ${?PG_AKKA_APP_PASSWORD} - url = "jdbc:postgresql://"${postgres.host}":"${postgres.port}"/"${postgres.db}"?reWriteBatchedInserts=true" - url = ${?PG_AKKA_URL} + user = "pekko_app" + user = ${?PG_PEKKO_APP_USER} + password = "pekko_app_password" + password = ${?PG_PEKKO_APP_PASSWORD} + url = "jdbc:postgresql://"${postgres.host}":"${postgres.port}"/"${postgres.db}"?reWriteBatchedInserts=true¤tSchema=pekko" + url = ${?PG_PEKKO_URL} driver = "org.postgresql.Driver" numThreads = 5 maxConnections = 5 diff --git a/extra-checkstyle-suppressions.xml b/extra-checkstyle-suppressions.xml index cc520c307..73da286ce 100644 --- a/extra-checkstyle-suppressions.xml +++ b/extra-checkstyle-suppressions.xml @@ -28,4 +28,5 @@ + diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 000000000..cea0a51ca --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,39 @@ +import gulp from 'gulp'; +import tscript from 'gulp-typescript'; +import {deleteAsync as del} from 'del'; +import npmDist from 'gulp-npm-dist'; +import rename from 'gulp-rename'; + + +const tsProject = tscript.createProject('tsconfig.json'); + +export function ts() { + var tsResult = tsProject.src() + .pipe(tsProject()); + + return tsResult.js.pipe(gulp.dest('target/sbt/web/public/main/javascripts')); +} + +export function copyVendored() { + return gulp.src('app/assets/vendored/**') + .pipe(gulp.dest('target/sbt/web/public/main/')); +} + +export function copy() { + return gulp.src(npmDist(), {base:'./node_modules'}) + .pipe(rename(function(path) { + path.dirname = path.dirname.replace(/\/dist/, '').replace(/\\dist/, ''); + // path.dirname = path.dirname.replace(/\/build/, '').replace(/\\build/, ''); + })) + .pipe(gulp.dest('target/sbt/web/public/main/lib')); +} + +export function clean() { + // You can use multiple globbing patterns as you would with `gulp.src`, + // for example if you are using del 2.0 or above, return its promise + return del([ 'target/sbt/web/public/main' ]); +} + +const build = gulp.series(clean, gulp.parallel(ts, copy, copyVendored)); + +export default build; diff --git a/main/config/logback-console.xml b/main/config/logback-console.xml index 34fabb2cc..544e70419 100644 --- a/main/config/logback-console.xml +++ b/main/config/logback-console.xml @@ -22,7 +22,7 @@ - + true diff --git a/main/config/logback.xml b/main/config/logback.xml index 5ad0e4ab9..8a9783ab9 100644 --- a/main/config/logback.xml +++ b/main/config/logback.xml @@ -32,7 +32,7 @@ - + true diff --git a/main/docker/Dockerfile b/main/docker/Dockerfile index 9e3dd18a4..7cd4eb08a 100644 --- a/main/docker/Dockerfile +++ b/main/docker/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM openjdk:8-jre-bullseye +FROM eclipse-temurin:17-jre MAINTAINER inscopemetrics.io @@ -50,17 +50,15 @@ WORKDIR /opt/metrics-portal ENV JVM_XMS="64m" ENV JVM_XMX="1024m" -ENV LOGBACK_CONFIG="-Dlogger.file=/opt/metrics-portal/config/logback.xml" +ENV LOGBACK_CONFIG="-Dlogger.file=/opt/metrics-portal/config/logback-console.xml" ENV METRICS_PORTAL_CONFIG="-Dconfig.resource=portal.application.conf" ENV JAVA_OPTS="\ + --add-opens java.base/java.nio=ALL-UNNAMED \ + --add-opens java.base/sun.nio.ch=ALL-UNNAMED \ + --add-opens=java.base/java.lang=ALL-UNNAMED \ -XX:+HeapDumpOnOutOfMemoryError \ -XX:HeapDumpPath=/opt/metrics-portal/logs/metrics-portal.oom.hprof \ - -XX:+PrintGCDetails \ - -XX:+PrintGCDateStamps \ - -Xloggc:/opt/metrics-portal/logs/metrics-portal.gc.log \ - -XX:NumberOfGCLogFiles=2 \ - -XX:GCLogFileSize=50M \ - -XX:+UseGCLogFileRotation \ + -Xlog:gc*:file=/opt/metrics-portal/logs/metrics-portal.gc.log:none:filecount=5,filesize=10M \ -XX:+UseStringDeduplication \ -XX:+UseG1GC \ -Duser.timezone=UTC" @@ -69,18 +67,20 @@ ENV APP_OPTS="/opt/metrics-portal" ENV ADDITIONAL_APP_OPTS="" # Build -RUN apt update && apt install -y gosu chromium && rm -rf /var/lib/apt/lists/* +RUN apt update && DEBIAN_FRONTEND=noninteractive apt install -y gosu chromium-browser && rm -rf /var/lib/apt/lists/* RUN mkdir -p /opt/metrics-portal/lib/ext && \ mkdir -p /opt/metrics-portal/config && \ mkdir -p /opt/metrics-portal/logs -ADD deps /opt/metrics-portal/lib/ -ADD bin /opt/metrics-portal/bin/ -ADD config /opt/metrics-portal/config/ -ADD lib /opt/metrics-portal/lib/ +COPY --link deps /opt/metrics-portal/lib/ +COPY --link bin /opt/metrics-portal/bin/ +COPY --link config /opt/metrics-portal/config/ +COPY --link lib /opt/metrics-portal/lib/ # Entry point ENTRYPOINT [ \ "/opt/metrics-portal/bin/metrics-portal", \ + "--add-opens=java.base/java.nio=ALL-UNNAMED", \ + "--add-opens java.base/sun.nio.ch=ALL-UNNAMED", \ "${LOGBACK_CONFIG}", \ "${METRICS_PORTAL_CONFIG}", \ "-Xms${JVM_XMS}", \ diff --git a/main/postgres/initdb.d/init.sh b/main/postgres/initdb.d/init.sh index a6cdf9b9d..b67dff10b 100755 --- a/main/postgres/initdb.d/init.sh +++ b/main/postgres/initdb.d/init.sh @@ -3,7 +3,7 @@ psql_root_postgres=( psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --no-password --dbname "$POSTGRES_DB" ) psql_root_metrics=( psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --no-password --dbname "metrics" ) psql_metrics_dba=( psql -v ON_ERROR_STOP=1 --username "metrics_dba" --no-password --dbname "metrics" ) -psql_akka_dba=( psql -v ON_ERROR_STOP=1 --username "akka_dba" --no-password --dbname "metrics" ) +psql_pekko_dba=( psql -v ON_ERROR_STOP=1 --username "pekko_dba" --no-password --dbname "metrics" ) # Run as database administrator against the postgres database # NOTE: The password is already set by the caller @@ -19,9 +19,9 @@ echo "$0: running /docker-entrypoint-initdb.d/init.sql.1"; "${psql_root_metrics[ export PGPASSWORD="metrics_dba_password" echo "$0: running /docker-entrypoint-initdb.d/init.sql.2"; "${psql_metrics_dba[@]}" -f "/docker-entrypoint-initdb.d/init.sql.3"; -# Run as akka dba -export PGPASSWORD="akka_dba_password" -echo "$0: running /docker-entrypoint-initdb.d/init.sql.3"; "${psql_akka_dba[@]}" -f "/docker-entrypoint-initdb.d/init.sql.4"; +# Run as pekko dba +export PGPASSWORD="pekko_dba_password" +echo "$0: running /docker-entrypoint-initdb.d/init.sql.3"; "${psql_pekko_dba[@]}" -f "/docker-entrypoint-initdb.d/init.sql.4"; # Restore the root password export PGPASSWORD="${PGPASSWORD:-$POSTGRES_PASSWORD}" diff --git a/main/postgres/initdb.d/init.sql.1 b/main/postgres/initdb.d/init.sql.1 index 3951ae522..b8a1d90ec 100644 --- a/main/postgres/initdb.d/init.sql.1 +++ b/main/postgres/initdb.d/init.sql.1 @@ -23,18 +23,18 @@ BEGIN; CREATE ROLE metrics_app LOGIN; ALTER ROLE metrics_app WITH PASSWORD 'metrics_app_password'; -ALTER ROLE metrics_app WITH NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION CONNECTION LIMIT 100; +ALTER ROLE metrics_app WITH NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION CONNECTION LIMIT 200; CREATE ROLE metrics_dba LOGIN; ALTER ROLE metrics_dba WITH PASSWORD 'metrics_dba_password'; ALTER ROLE metrics_dba WITH NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION CONNECTION LIMIT 6; -CREATE ROLE akka_app LOGIN; -ALTER ROLE akka_app WITH PASSWORD 'akka_app_password'; -ALTER ROLE akka_app WITH NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION CONNECTION LIMIT 100; -CREATE ROLE akka_dba LOGIN; -ALTER ROLE akka_dba WITH PASSWORD 'akka_dba_password'; -ALTER ROLE akka_dba WITH NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION CONNECTION LIMIT 6; +CREATE ROLE pekko_app LOGIN; +ALTER ROLE pekko_app WITH PASSWORD 'pekko_app_password'; +ALTER ROLE pekko_app WITH NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION CONNECTION LIMIT 100; +CREATE ROLE pekko_dba LOGIN; +ALTER ROLE pekko_dba WITH PASSWORD 'pekko_dba_password'; +ALTER ROLE pekko_dba WITH NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION CONNECTION LIMIT 6; COMMIT; @@ -44,7 +44,7 @@ BEGIN; GRANT CONNECT ON DATABASE metrics TO metrics_dba; GRANT CONNECT ON DATABASE metrics TO metrics_app; -GRANT CONNECT ON DATABASE metrics TO akka_dba; -GRANT CONNECT ON DATABASE metrics TO akka_app; +GRANT CONNECT ON DATABASE metrics TO pekko_dba; +GRANT CONNECT ON DATABASE metrics TO pekko_app; COMMIT; diff --git a/main/postgres/initdb.d/init.sql.3 b/main/postgres/initdb.d/init.sql.3 index 153b97caf..54b840cc3 100644 --- a/main/postgres/initdb.d/init.sql.3 +++ b/main/postgres/initdb.d/init.sql.3 @@ -23,9 +23,9 @@ CREATE SCHEMA portal AUTHORIZATION metrics_dba; GRANT ALL ON SCHEMA portal TO metrics_dba; GRANT USAGE ON SCHEMA portal TO metrics_app; -CREATE SCHEMA akka; -GRANT ALL ON SCHEMA akka TO akka_dba; -GRANT USAGE ON SCHEMA akka TO akka_app; +CREATE SCHEMA pekko; +GRANT ALL ON SCHEMA pekko TO pekko_dba; +GRANT USAGE ON SCHEMA pekko TO pekko_app; ALTER DEFAULT PRIVILEGES IN SCHEMA portal GRANT ALL ON TABLES TO metrics_dba; ALTER DEFAULT PRIVILEGES IN SCHEMA portal GRANT ALL ON SEQUENCES TO metrics_dba; diff --git a/main/postgres/initdb.d/init.sql.4 b/main/postgres/initdb.d/init.sql.4 index 9f374ae5e..a97e45bd5 100644 --- a/main/postgres/initdb.d/init.sql.4 +++ b/main/postgres/initdb.d/init.sql.4 @@ -15,15 +15,15 @@ */ /* - * NOTE: This file must be run as the akka dba. + * NOTE: This file must be run as the pekko dba. * NOTE: This file cannot end in .sql or else it will be executed by the entry point. */ -ALTER DEFAULT PRIVILEGES IN SCHEMA akka GRANT ALL ON TABLES TO akka_dba; -ALTER DEFAULT PRIVILEGES IN SCHEMA akka GRANT ALL ON SEQUENCES TO akka_dba; -ALTER DEFAULT PRIVILEGES IN SCHEMA akka GRANT ALL ON FUNCTIONS TO akka_dba; -ALTER DEFAULT PRIVILEGES IN SCHEMA akka GRANT ALL ON TYPES TO akka_dba; -ALTER DEFAULT PRIVILEGES IN SCHEMA akka GRANT ALL ON TABLES TO akka_app; -ALTER DEFAULT PRIVILEGES IN SCHEMA akka GRANT ALL ON SEQUENCES TO akka_app; -ALTER DEFAULT PRIVILEGES IN SCHEMA akka GRANT ALL ON FUNCTIONS TO akka_app; -ALTER DEFAULT PRIVILEGES IN SCHEMA akka GRANT ALL ON TYPES TO akka_app; +ALTER DEFAULT PRIVILEGES IN SCHEMA pekko GRANT ALL ON TABLES TO pekko_dba; +ALTER DEFAULT PRIVILEGES IN SCHEMA pekko GRANT ALL ON SEQUENCES TO pekko_dba; +ALTER DEFAULT PRIVILEGES IN SCHEMA pekko GRANT ALL ON FUNCTIONS TO pekko_dba; +ALTER DEFAULT PRIVILEGES IN SCHEMA pekko GRANT ALL ON TYPES TO pekko_dba; +ALTER DEFAULT PRIVILEGES IN SCHEMA pekko GRANT ALL ON TABLES TO pekko_app; +ALTER DEFAULT PRIVILEGES IN SCHEMA pekko GRANT ALL ON SEQUENCES TO pekko_app; +ALTER DEFAULT PRIVILEGES IN SCHEMA pekko GRANT ALL ON FUNCTIONS TO pekko_app; +ALTER DEFAULT PRIVILEGES IN SCHEMA pekko GRANT ALL ON TYPES TO pekko_app; diff --git a/maven/maven-wrapper.properties b/maven/maven-wrapper.properties index 1679318e6..75703a498 100644 --- a/maven/maven-wrapper.properties +++ b/maven/maven-wrapper.properties @@ -1,5 +1,5 @@ #Maven download properties -#Wed Feb 10 15:52:42 PST 2021 -checksumAlgorithm=SHA1 +#Mon Jan 23 13:53:57 PST 2023 +distributionUrl=https\://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip verifyDownload=true -distributionUrl=https\://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip +checksumAlgorithm=SHA1 diff --git a/package-lock.json b/package-lock.json index 4ac7df6f6..eb4085d83 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,16 +5,74 @@ "packages": { "": { "dependencies": { - "@types/bootstrap": "^3.3.36", - "@types/durandal": "^2.1.36", - "@types/jquery": "^3.2.16", - "@types/jqueryui": "^1.11.37", - "@types/jwt-decode": "^2.2.1", - "@types/knockout": "^3.4.46", - "@types/requirejs": "^2.1.31", - "@types/typeahead": "^0.11.31", - "@types/underscore": "^1.8.4", - "moment": "^2.24.0" + "@types/bootstrap": "3.3.36", + "@types/durandal": "2.1.36", + "@types/jqueryui": "1.11.37", + "@types/jwt-decode": "2.2.1", + "@types/knockout": "3.4.46", + "@types/requirejs": "2.1.31", + "@types/typeahead": "0.11.31", + "@types/underscore": "1.8.4", + "bean": "1.0.14", + "bootstrap": "3.4.1", + "d3": "4.11.0", + "durandal": "2.2.0", + "eonasdan-bootstrap-datetimepicker": "4.17.47", + "flotr2": "0.1.0", + "font-awesome": "4.3.0", + "gulp": "^4.0.2", + "gulp-npm-dist": "1.0.4", + "gulp-typescript": "6.0.0-alpha.1", + "jquery": "3.5.0", + "jquery-ui-dist": "1.12.1", + "jquery-ui-themes": "1.12.0", + "knockout": "3.4.0", + "moment": "2.24.0", + "moment-timezone": "0.5.35", + "requirejs": "2.3.6", + "requirejs-text": "2.0.12", + "typeahead.js": "0.10.4", + "underscore": "1.8.3" + }, + "devDependencies": { + "del": "^7.1.0", + "gulp-rename": "^2.0.0", + "typescript": "^4.0.5" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" } }, "node_modules/@types/bootstrap": { @@ -35,9 +93,12 @@ } }, "node_modules/@types/jquery": { - "version": "3.2.16", - "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.2.16.tgz", - "integrity": "sha512-q2WC02YxQoX2nY1HRKlYGHpGP1saPmD7GN0pwCDlTz35a4eOtJG+aHRlXyjCuXokUukSrR2aXyBhSW3j+jPc0A==" + "version": "3.5.29", + "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.29.tgz", + "integrity": "sha512-oXQQC9X9MOPRrMhPHHOsXqeQDnWeCDT3PelUIg/Oy8FAbzSZtFHRjc7IpbfFVmpLtJ+UOoywpRsuO5Jxjybyeg==", + "dependencies": { + "@types/sizzle": "*" + } }, "node_modules/@types/jqueryui": { "version": "1.11.37", @@ -62,6 +123,11 @@ "resolved": "https://registry.npmjs.org/@types/requirejs/-/requirejs-2.1.31.tgz", "integrity": "sha512-b2soeyuU76rMbcRJ4e0hEl0tbMhFwZeTC0VZnfuWlfGlk6BwWNsev6kFu/twKABPX29wkX84wU2o+cEJoXsiTw==" }, + "node_modules/@types/sizzle": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.8.tgz", + "integrity": "sha512-0vWLNK2D5MT9dg0iOo8GlKguPAU02QjmZitPEsXRuJXU/OGIOt9vT9Fc26wtYuavLxtO45v9PGleoL9Z0k1LHg==" + }, "node_modules/@types/typeahead": { "version": "0.11.31", "resolved": "https://registry.npmjs.org/@types/typeahead/-/typeahead-0.11.31.tgz", @@ -75,12 +141,4737 @@ "resolved": "https://registry.npmjs.org/@types/underscore/-/underscore-1.8.4.tgz", "integrity": "sha512-lYM1FJ9v+gxyeH13ty22qvl5Z/UPq1xCwmxZANqzPNRBddshb6Q6uOUeat2FcPNKRqVg2dunxDCEa5X9gmrqeQ==" }, - "node_modules/moment": { - "version": "2.29.4", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", - "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", + "node_modules/aggregate-error": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-4.0.1.tgz", + "integrity": "sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==", + "dev": true, + "dependencies": { + "clean-stack": "^4.0.0", + "indent-string": "^5.0.0" + }, "engines": { - "node": "*" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-colors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", + "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", + "dependencies": { + "ansi-wrap": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-gray": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", + "integrity": "sha512-HrgGIZUl8h2EHuZaU9hTR/cU5nhKxpVE1V6kdGsQ8e4zirElJ5fvtfc8N7Q1oq1aatO275i8pUFUCpNWCAnVWw==", + "dependencies": { + "ansi-wrap": "0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-wrap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha512-ZyznvL8k/FZeQHr2T6LzcJ/+vBApDnMNZvfVFy3At0knswWd6rJ3/0Hhmpu8oqa6C92npmozs890sX9Dl6q+Qw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dependencies": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "node_modules/anymatch/node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/anymatch/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/anymatch/node_modules/is-descriptor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/anymatch/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/anymatch/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/anymatch/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/anymatch/node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/anymatch/node_modules/normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/append-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz", + "integrity": "sha512-WLbYiXzD3y/ATLZFufV/rZvWdZOs+Z/+5v1rBZ463Jn398pa6kcde27cvozYnBoxXblGZTFfoPpsaEw0orU5BA==", + "dependencies": { + "buffer-equal": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==" + }, + "node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-filter": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/arr-filter/-/arr-filter-1.1.2.tgz", + "integrity": "sha512-A2BETWCqhsecSvCkWAeVBFLH6sXEUGASuzkpjL3GR1SlL/PWL6M3J8EAAld2Uubmh39tvkJTqC9LeLHCUKmFXA==", + "dependencies": { + "make-iterator": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz", + "integrity": "sha512-tVqVTHt+Q5Xb09qRkbu+DidW1yYzz5izWS2Xm2yFm7qJnmUfz4HPzNxbHkdRJbz2lrqI7S+z17xNYdFcBBO8Hw==", + "dependencies": { + "make-iterator": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-initial": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz", + "integrity": "sha512-BC4Yl89vneCYfpLrs5JU2aAu9/a+xWbeKhvISg9PT7eWFB9UlRvI+rKEtk6mgxWr3dSkk9gQ8hCrdqt06NXPdw==", + "dependencies": { + "array-slice": "^1.0.0", + "is-number": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-initial/node_modules/is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-last": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/array-last/-/array-last-1.3.0.tgz", + "integrity": "sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==", + "dependencies": { + "is-number": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-last/node_modules/is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-slice": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-sort": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-sort/-/array-sort-1.0.0.tgz", + "integrity": "sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg==", + "dependencies": { + "default-compare": "^1.0.0", + "get-value": "^2.0.6", + "kind-of": "^5.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/async-done": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz", + "integrity": "sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw==", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.2", + "process-nextick-args": "^2.0.0", + "stream-exhaust": "^1.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/async-each": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.6.tgz", + "integrity": "sha512-c646jH1avxr+aVpndVMeAfYw7wAa6idufrlN3LPA4PmKS0QEGp6PIC9nwz0WQkkvBGAMEki3pFdtxaF39J9vvg==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] + }, + "node_modules/async-settle": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-settle/-/async-settle-1.0.0.tgz", + "integrity": "sha512-VPXfB4Vk49z1LHHodrEQ6Xf7W4gg1w0dAPROHngx7qgDjqmIQ+fXmwgGXTW/ITLai0YLSvWepJOP9EVpMnEAcw==", + "dependencies": { + "async-done": "^1.2.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "bin": { + "atob": "bin/atob.js" + }, + "engines": { + "node": ">= 4.5.0" + } + }, + "node_modules/bach": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz", + "integrity": "sha512-bZOOfCb3gXBXbTFXq3OZtGR88LwGeJvzu6szttaIzymOTS4ZttBNOWSv7aLZja2EMycKtRYV0Oa8SNKH/zkxvg==", + "dependencies": { + "arr-filter": "^1.1.1", + "arr-flatten": "^1.0.1", + "arr-map": "^2.0.0", + "array-each": "^1.0.0", + "array-initial": "^1.0.0", + "array-last": "^1.1.1", + "async-done": "^1.2.2", + "async-settle": "^1.0.0", + "now-and-later": "^2.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dependencies": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/is-descriptor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/bean": { + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/bean/-/bean-1.0.14.tgz", + "integrity": "sha512-PVkIv8S/YSd9z7nRaUtDdZlAxf850iccRZO9yTcDbXEL4kKIFv1hZQz+f75mG2ABAFqCZjl5+UvkbH5xQ+qArA==" + }, + "node_modules/binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "optional": true, + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bootstrap": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-3.4.1.tgz", + "integrity": "sha512-yN5oZVmRCwe5aKwzRj6736nSmKDX7pLYwsXiCj/EYmo16hODaBiT4En5btW/jhBF/seV+XMx3aYwukYC3A49DA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/buffer-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.1.tgz", + "integrity": "sha512-QoV3ptgEaQpvVwbXdSO39iqPQTCxSF7A5U99AxbHYqUdCizL/lH2Z0A2y6nbZucxMEOtNyZfG2s6gsVugGpKkg==", + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, + "node_modules/cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dependencies": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/call-bind": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "dependencies": { + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "deprecated": "Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies", + "dependencies": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + }, + "optionalDependencies": { + "fsevents": "^1.2.7" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==", + "dependencies": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + } + }, + "node_modules/chokidar/node_modules/glob-parent/node_modules/is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==", + "dependencies": { + "is-extglob": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dependencies": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/clean-stack": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-4.2.0.tgz", + "integrity": "sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==", + "dev": true, + "dependencies": { + "escape-string-regexp": "5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w==", + "dependencies": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "node_modules/clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/clone-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", + "integrity": "sha512-KLLTJWrvwIP+OPfMn0x2PheDEP20RPUcGXj/ERegTgdmPEZylALQldygiqrPPu8P45uNuPs7ckmReLY6v/iA5g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha512-au6ydSpg6nsrigcZ4m8Bc9hxjeW+GJ8xh5G3BJCMt4WXe1H10UNaVOamqQTmrx1kjVuxAHIQSNU6hY4Nsn9/ag==" + }, + "node_modules/cloneable-readable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", + "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", + "dependencies": { + "inherits": "^2.0.1", + "process-nextick-args": "^2.0.0", + "readable-stream": "^2.3.5" + } + }, + "node_modules/code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/collection-map": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz", + "integrity": "sha512-5D2XXSpkOnleOI21TG7p3T0bGAsZ/XknZpKBmGYyluO8pw4zA3K8ZlrBIbC4FXg3m6z/RNFiUFfT2sQK01+UHA==", + "dependencies": { + "arr-map": "^2.0.2", + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==", + "dependencies": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "bin": { + "color-support": "bin.js" + } + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "node_modules/component-emitter": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.1.tgz", + "integrity": "sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "engines": [ + "node >= 0.8" + ], + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" + }, + "node_modules/copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/copy-props": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.5.tgz", + "integrity": "sha512-XBlx8HSqrT0ObQwmSzM7WE5k8FxTV75h1DX1Z3n6NhQ/UYYAvInWYmG06vFt7hQZArE2fuO62aihiWIVQwh1sw==", + "dependencies": { + "each-props": "^1.3.2", + "is-plain-object": "^5.0.0" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dependencies": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "node_modules/d3": { + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/d3/-/d3-4.11.0.tgz", + "integrity": "sha512-o048nfmydnbt0ciIvCUDTq9p62rZYOXzl8cKps0XVzk+5nHgeXmAS7jU4nh+3v82pUyH7t/GFm1bJRX4oIAlPw==", + "dependencies": { + "d3-array": "1.2.1", + "d3-axis": "1.0.8", + "d3-brush": "1.0.4", + "d3-chord": "1.0.4", + "d3-collection": "1.0.4", + "d3-color": "1.0.3", + "d3-dispatch": "1.0.3", + "d3-drag": "1.2.1", + "d3-dsv": "1.0.7", + "d3-ease": "1.0.3", + "d3-force": "1.1.0", + "d3-format": "1.2.0", + "d3-geo": "1.8.1", + "d3-hierarchy": "1.1.5", + "d3-interpolate": "1.1.5", + "d3-path": "1.0.5", + "d3-polygon": "1.0.3", + "d3-quadtree": "1.0.3", + "d3-queue": "3.0.7", + "d3-random": "1.1.0", + "d3-request": "1.0.6", + "d3-scale": "1.0.6", + "d3-selection": "1.1.0", + "d3-shape": "1.2.0", + "d3-time": "1.0.7", + "d3-time-format": "2.0.5", + "d3-timer": "1.0.7", + "d3-transition": "1.1.0", + "d3-voronoi": "1.1.2", + "d3-zoom": "1.6.0" + } + }, + "node_modules/d3-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-1.2.1.tgz", + "integrity": "sha512-CyINJQ0SOUHojDdFDH4JEM0552vCR1utGyLHegJHyYH0JyCpSeTPxi4OBqHMA2jJZq4NH782LtaJWBImqI/HBw==" + }, + "node_modules/d3-axis": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-1.0.8.tgz", + "integrity": "sha512-K0djTb26iQ6AsuD2d6Ka08wBHf4V30awIxV4XFuB/iLzYtTqqJlE/nIN0DBJJCX7lbOqbt2/oeX3r+sU5k2veg==" + }, + "node_modules/d3-brush": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-1.0.4.tgz", + "integrity": "sha512-nUFueDzOlvwFvuOBynGSyJM7Wt1H9fKgJeoWFSg3ScS4c7FJBch92FKUJKum4xtgPYHdgH2C3bRg3GzSVltCJQ==", + "dependencies": { + "d3-dispatch": "1", + "d3-drag": "1", + "d3-interpolate": "1", + "d3-selection": "1", + "d3-transition": "1" + } + }, + "node_modules/d3-chord": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-1.0.4.tgz", + "integrity": "sha512-o0ExexkK1N0KikUakKrQwttP5Flu8AYD6iBUh3AdPJqnTh6xlvcX5wFRuuo29sLOAr9+T4yZPUH1S3CCQJ1SlQ==", + "dependencies": { + "d3-array": "1", + "d3-path": "1" + } + }, + "node_modules/d3-collection": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/d3-collection/-/d3-collection-1.0.4.tgz", + "integrity": "sha512-+TPxaBFzbzfpLF3Hjz8JPeuStNmJnyWAufu8VUfpDCDn5RieIgY+OQDjhKMDorf2naLgAjjZXLUQN7XFp/kgog==" + }, + "node_modules/d3-color": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-1.0.3.tgz", + "integrity": "sha512-t+rSOrshj6m2AUOe8kHvTwfUQ5TFoInEkBfmsHHAHPof58dmbRXNpicB7XAyPbMQbcC7i09p2BxeCEdgBd8xmw==" + }, + "node_modules/d3-dispatch": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-1.0.3.tgz", + "integrity": "sha512-Qh2DR3neW3lq/ug4oymXHYoIsA91nYt47ERb+fPKjRg6zLij06aP7KqHHl2NyziK9ASxrR3GLkHCtZvXe/jMVg==" + }, + "node_modules/d3-drag": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-1.2.1.tgz", + "integrity": "sha512-Cg8/K2rTtzxzrb0fmnYOUeZHvwa4PHzwXOLZZPwtEs2SKLLKLXeYwZKBB+DlOxUvFmarOnmt//cU4+3US2lyyQ==", + "dependencies": { + "d3-dispatch": "1", + "d3-selection": "1" + } + }, + "node_modules/d3-dsv": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-1.0.7.tgz", + "integrity": "sha512-12szKhDhM/tM5U/Ch3hyJ7sMdcwPqMRmrUWitLLdPBMKO9Wuox95ezKZvemy/fxFbefLF/HIPKUmJMBLLuFDaQ==", + "dependencies": { + "commander": "2", + "iconv-lite": "0.4", + "rw": "1" + }, + "bin": { + "csv2json": "bin/dsv2json", + "csv2tsv": "bin/dsv2dsv", + "dsv2dsv": "bin/dsv2dsv", + "dsv2json": "bin/dsv2json", + "json2csv": "bin/json2dsv", + "json2dsv": "bin/json2dsv", + "json2tsv": "bin/json2dsv", + "tsv2csv": "bin/dsv2dsv", + "tsv2json": "bin/dsv2json" + } + }, + "node_modules/d3-ease": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-1.0.3.tgz", + "integrity": "sha512-io3QwOJwVPAxRF2UXpKpCdz2wm/7VLFCQQ1yy+GzX6YCtt3vi2BGnimI8agSF5jyUrHsADyF303d2S+ps7zU8w==" + }, + "node_modules/d3-force": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-1.1.0.tgz", + "integrity": "sha512-2HVQz3/VCQs0QeRNZTYb7GxoUCeb6bOzMp/cGcLa87awY9ZsPvXOGeZm0iaGBjXic6I1ysKwMn+g+5jSAdzwcg==", + "dependencies": { + "d3-collection": "1", + "d3-dispatch": "1", + "d3-quadtree": "1", + "d3-timer": "1" + } + }, + "node_modules/d3-format": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-1.2.0.tgz", + "integrity": "sha512-rWwvQ1mGxY3bnrvN+qT0kVOtrE2kUjgIMoif5jankVHQ31ejeCdG5MIxCTh5KmQ+Vugvq49SgAvC0uD2UOsk9g==" + }, + "node_modules/d3-geo": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-1.8.1.tgz", + "integrity": "sha512-PuvmWl1A1UXuaxcH55EGNhvMNAUBS0RQN2PAnxrZbDvDX56Xwkd+Yp1t1+ECkaJO3my+dnhxAyqAKMyyK+IFPQ==", + "dependencies": { + "d3-array": "1" + } + }, + "node_modules/d3-hierarchy": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-1.1.5.tgz", + "integrity": "sha512-PcsLIhThc60mWnxlojIOH7Sc0tQ2DgLWfEwEAyzCtej5f3H9wSsRmrg5pEhKZLrwiJnI2zyw/pznJxL9a/Eugw==" + }, + "node_modules/d3-interpolate": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-1.1.5.tgz", + "integrity": "sha512-NY6sXPRRFRXXNUgoeVMnS3TcuS7hIKj7H8ino1u6cljwgoKKLQej8jkjXuoNJp9xYYw4DjLDYzvSsgvvSobSrA==", + "dependencies": { + "d3-color": "1" + } + }, + "node_modules/d3-path": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.5.tgz", + "integrity": "sha512-eD76prgnTKYkLzHlY2UMyOEZXTpC+WOanCr1BLxo38w4fPPPq/LgCFqRQvqFU3AJngfZmmKR7rgKPZ4EGJ9Atw==" + }, + "node_modules/d3-polygon": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-1.0.3.tgz", + "integrity": "sha512-2zP7GOvf4XOWTeQouK7fCO534yQxyhYYTw6GTqcXifIalHgA6qV/es+4GRQii9m6XxEPFcht4loobD/o2iEo1A==" + }, + "node_modules/d3-quadtree": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-1.0.3.tgz", + "integrity": "sha512-U2Jc3jF3JOBGXIOnvWY9C4ekRwRX9hEVpMMmeduJyaxAwPmoe7t84iZFTLn1RwYOyrXxJF55H/Hrg186TFQQdw==" + }, + "node_modules/d3-queue": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/d3-queue/-/d3-queue-3.0.7.tgz", + "integrity": "sha512-2rs+6pNFKkrJhqe1rg5znw7dKJ7KZr62j9aLZfhondkrnz6U7VRmJj1UGcbD8MRc46c7H8m4SWhab8EalBQrkw==" + }, + "node_modules/d3-random": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/d3-random/-/d3-random-1.1.0.tgz", + "integrity": "sha512-XuMbjx3Jq4EWfJP4g6nR7zns/bZfaVbWHWfR8auDkEiWCzVbWifmasfszV1ZRN3xXK3nY4RUFL2nTIhceGZSFQ==" + }, + "node_modules/d3-request": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/d3-request/-/d3-request-1.0.6.tgz", + "integrity": "sha512-FJj8ySY6GYuAJHZMaCQ83xEYE4KbkPkmxZ3Hu6zA1xxG2GD+z6P+Lyp+zjdsHf0xEbp2xcluDI50rCS855EQ6w==", + "dependencies": { + "d3-collection": "1", + "d3-dispatch": "1", + "d3-dsv": "1", + "xmlhttprequest": "1" + } + }, + "node_modules/d3-scale": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-1.0.6.tgz", + "integrity": "sha512-0vI2BkXJGLvMsLYfr49yZiegLe4MhsqOLRoDzV03Pc/Y5EkutKWmMg6abyG3PpSXCL5OzUJo3+KforHKEiOzyw==", + "dependencies": { + "d3-array": "^1.2.0", + "d3-collection": "1", + "d3-color": "1", + "d3-format": "1", + "d3-interpolate": "1", + "d3-time": "1", + "d3-time-format": "2" + } + }, + "node_modules/d3-selection": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-1.1.0.tgz", + "integrity": "sha512-WRNvCFiGnn+M/r6X5+NmEm6VeJMj2xmGimH3SVF91pj9wYj/50ldIBSUBYmogjFcB3jySWFjgPeRl4lviUyuvQ==" + }, + "node_modules/d3-shape": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.2.0.tgz", + "integrity": "sha512-LP48zJ9ykPKjCdd0vSu5k2l4s8v1vI6vvdDeJtmgtTa+L6Ery0lzvOaV7pMunFuLv11hwSRZQnSnlhFl801aiw==", + "dependencies": { + "d3-path": "1" + } + }, + "node_modules/d3-time": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-1.0.7.tgz", + "integrity": "sha512-mq+DcUQ57TjeFAOvbu0f6ycFcT2V0qfwCGJweL8/N1PPooruwpcqUJB1uewpnkixpT+eYx3vVh/LV97LI3AHGw==" + }, + "node_modules/d3-time-format": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-2.0.5.tgz", + "integrity": "sha512-GeI9vaBqOVw1EPwIfbJQQxwOTK/xyvxBB5hv4Kxfj0sD04hj/GBYpYuj79+eFzlazgBbKsaZFS2E1isqR3PiTg==", + "dependencies": { + "d3-time": "1" + } + }, + "node_modules/d3-timer": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-1.0.7.tgz", + "integrity": "sha512-vMZXR88XujmG/L5oB96NNKH5lCWwiLM/S2HyyAQLcjWJCloK5shxta4CwOFYLZoY3AWX73v8Lgv4cCAdWtRmOA==" + }, + "node_modules/d3-transition": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-1.1.0.tgz", + "integrity": "sha512-ALRQj7bWk36Q6gwXQ+oSI5K1X70D8XAx+sMxXymiUXTTY2dBcvRj43Ell7BxM9WqwxvA5y4IKTrnRrpsoWqixA==", + "dependencies": { + "d3-color": "1", + "d3-dispatch": "1", + "d3-ease": "1", + "d3-interpolate": "1", + "d3-selection": "^1.1.0", + "d3-timer": "1" + } + }, + "node_modules/d3-voronoi": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/d3-voronoi/-/d3-voronoi-1.1.2.tgz", + "integrity": "sha512-RhGS1u2vavcO7ay7ZNAPo4xeDh/VYeGof3x5ZLJBQgYhLegxr3s5IykvWmJ94FTU6mcbtp4sloqZ54mP6R4Utw==" + }, + "node_modules/d3-zoom": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-1.6.0.tgz", + "integrity": "sha512-viq+6rXA9JQY1wD+gpDEdlOtCeJ6IfcsNT2aVr31VTjIAIhYlO0YurQ80yDRZeMJw5P/e6nVPhGJF9D9Ade5Og==", + "dependencies": { + "d3-dispatch": "1", + "d3-drag": "1", + "d3-interpolate": "1", + "d3-selection": "1", + "d3-transition": "1" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decode-uri-component": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/default-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz", + "integrity": "sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ==", + "dependencies": { + "kind-of": "^5.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/default-resolution": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-resolution/-/default-resolution-2.0.0.tgz", + "integrity": "sha512-2xaP6GiwVwOEbXCGoJ4ufgC76m8cj805jrghScewJC2ZDsb9U0b4BIrba+xt/Uytyd0HvQ6+WymSRTfnYj59GQ==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/define-data-property": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", + "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "dependencies": { + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/del": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/del/-/del-7.1.0.tgz", + "integrity": "sha512-v2KyNk7efxhlyHpjEvfyxaAihKKK0nWCuf6ZtqZcFFpQRG0bJ12Qsr0RpvsICMjAAZ8DOVCxrlqpxISlMHC4Kg==", + "dev": true, + "dependencies": { + "globby": "^13.1.2", + "graceful-fs": "^4.2.10", + "is-glob": "^4.0.3", + "is-path-cwd": "^3.0.0", + "is-path-inside": "^4.0.0", + "p-map": "^5.5.0", + "rimraf": "^3.0.2", + "slash": "^4.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dependencies": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "node_modules/durandal": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/durandal/-/durandal-2.2.0.tgz", + "integrity": "sha512-ccQz/vxqlDgzuDfhLsvFcXF4pq8yCJRBMva5c0wzp/QRZEF/jqkmY3/vZ7aKWbb2eLoecdglJCuo/pmjf7ci7Q==", + "dependencies": { + "jquery": "^1.9.1", + "knockout": "^3.4.0", + "requirejs": "^2.1.11", + "requirejs-text": "^2.0.12" + } + }, + "node_modules/durandal/node_modules/jquery": { + "version": "1.12.4", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-1.12.4.tgz", + "integrity": "sha512-UEVp7PPK9xXYSk8xqXCJrkXnKZtlgWkd2GsAQbMRFK6S/ePU2JN5G2Zum8hIVjzR3CpdfSqdqAzId/xd4TJHeg==" + }, + "node_modules/each-props": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/each-props/-/each-props-1.3.2.tgz", + "integrity": "sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==", + "dependencies": { + "is-plain-object": "^2.0.1", + "object.defaults": "^1.1.0" + } + }, + "node_modules/each-props/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/eonasdan-bootstrap-datetimepicker": { + "version": "4.17.47", + "resolved": "https://registry.npmjs.org/eonasdan-bootstrap-datetimepicker/-/eonasdan-bootstrap-datetimepicker-4.17.47.tgz", + "integrity": "sha512-RwN84DIjG1kbN5PGLiI4aRS/hzRqLgs/OYLfhBAG82rqZpW7F5Y+SeQ0VOLW4cXyzj/iK6jG/psWj+F+sryVhA==", + "dependencies": { + "bootstrap": "^3.3", + "jquery": "^1.8.3 || ^2.0 || ^3.0", + "moment": "^2.10", + "moment-timezone": "^0.4.0" + }, + "peerDependencies": { + "bootstrap": "^3.3", + "jquery": "^1.8.3 || ^2.0 || ^3.0", + "moment": "^2.10", + "moment-timezone": "^0.4.0" + } + }, + "node_modules/eonasdan-bootstrap-datetimepicker/node_modules/moment-timezone": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.4.1.tgz", + "integrity": "sha512-5cNPVUwaVJDCe9JM8m/qz17f9SkaI8rpnRUyDJi2K5HAd6EwhuQ3n5nLclZkNC/qJnomKgQH2TIu70Gy2dxFKA==", + "dependencies": { + "moment": ">= 2.6.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es5-ext": { + "version": "0.10.64", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", + "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", + "hasInstallScript": true, + "dependencies": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "esniff": "^2.0.1", + "next-tick": "^1.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dependencies": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "node_modules/es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dependencies": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/esniff": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", + "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.62", + "event-emitter": "^0.3.5", + "type": "^2.7.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esniff/node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" + }, + "node_modules/event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dependencies": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "node_modules/expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==", + "dependencies": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", + "dependencies": { + "homedir-polyfill": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dependencies": { + "type": "^2.7.2" + } + }, + "node_modules/ext/node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dependencies": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/is-descriptor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/fancy-log": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz", + "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==", + "dependencies": { + "ansi-gray": "^0.1.1", + "color-support": "^1.1.3", + "parse-node-version": "^1.0.0", + "time-stamp": "^1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-levenshtein": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.4.tgz", + "integrity": "sha512-Ia0sQNrMPXXkqVFt6w6M1n1oKo3NfKs+mvaV811Jwir7vAk9a6PVV9VPYf6X3BU97QiLEmuW3uXH9u87zDFfdw==" + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "optional": true + }, + "node_modules/fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==", + "dependencies": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/findup-sync": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", + "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", + "dependencies": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/findup-sync/node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/findup-sync/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/findup-sync/node_modules/is-descriptor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/findup-sync/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/findup-sync/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/findup-sync/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/findup-sync/node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fined": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", + "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", + "dependencies": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^2.0.3", + "object.defaults": "^1.1.0", + "object.pick": "^1.2.0", + "parse-filepath": "^1.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/fined/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/flagged-respawn": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", + "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/flotr2": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/flotr2/-/flotr2-0.1.0.tgz", + "integrity": "sha512-6JvA9O09AP9zWFKgO+QycLUkgydtciewM0OtV5d4lG39QlqxxkQv3Mgv5Fd8URBr8AW29RLFEyaFpUhugWR8Mg==" + }, + "node_modules/flush-write-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "dependencies": { + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + } + }, + "node_modules/font-awesome": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/font-awesome/-/font-awesome-4.3.0.tgz", + "integrity": "sha512-h3Z1K82ULpvvV+Utr9k0Ib6b5/zuBcyVI5uaA34p7EsFrMDyLoWx0DmKKfOeMwh5SG4kqSO9Nooou5TiTXQPfg==", + "engines": { + "node": ">=0.10.3" + } + }, + "node_modules/for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", + "dependencies": { + "for-in": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", + "dependencies": { + "map-cache": "^0.2.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fs-mkdirp-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", + "integrity": "sha512-+vSd9frUnapVC2RZYfL3FCB2p3g4TBhaUmrsWlSudsGdnxIuUvBB2QM1VZeBtc49QFwrp+wQLrDs3+xxDgI5gQ==", + "dependencies": { + "graceful-fs": "^4.1.11", + "through2": "^2.0.3" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/fs-mkdirp-stream/node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dependencies": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "node_modules/fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "deprecated": "The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "dependencies": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + }, + "engines": { + "node": ">= 4.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" + }, + "node_modules/get-intrinsic": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", + "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", + "dependencies": { + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob-stream": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", + "integrity": "sha512-uMbLGAP3S2aDOHUDfdoYcdIePUCfysbAd0IAoWVZbeGU/oNQ8asHVSshLDJUPWxfzj8zsCG7/XeHPHTtow0nsw==", + "dependencies": { + "extend": "^3.0.0", + "glob": "^7.1.1", + "glob-parent": "^3.1.0", + "is-negated-glob": "^1.0.0", + "ordered-read-streams": "^1.0.0", + "pumpify": "^1.3.5", + "readable-stream": "^2.1.5", + "remove-trailing-separator": "^1.0.1", + "to-absolute-glob": "^2.0.0", + "unique-stream": "^2.0.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/glob-stream/node_modules/glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==", + "dependencies": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + } + }, + "node_modules/glob-stream/node_modules/is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==", + "dependencies": { + "is-extglob": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/glob-watcher": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.5.tgz", + "integrity": "sha512-zOZgGGEHPklZNjZQaZ9f41i7F2YwE+tS5ZHrDhbBCk3stwahn5vQxnFmBJZHoYdusR6R1bLSXeGUy/BhctwKzw==", + "dependencies": { + "anymatch": "^2.0.0", + "async-done": "^1.2.0", + "chokidar": "^2.0.0", + "is-negated-glob": "^1.0.0", + "just-debounce": "^1.0.0", + "normalize-path": "^3.0.0", + "object.defaults": "^1.1.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dependencies": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", + "dependencies": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/globby": { + "version": "13.2.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz", + "integrity": "sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==", + "dev": true, + "dependencies": { + "dir-glob": "^3.0.1", + "fast-glob": "^3.3.0", + "ignore": "^5.2.4", + "merge2": "^1.4.1", + "slash": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glogg": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz", + "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==", + "dependencies": { + "sparkles": "^1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + }, + "node_modules/gulp": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz", + "integrity": "sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA==", + "dependencies": { + "glob-watcher": "^5.0.3", + "gulp-cli": "^2.2.0", + "undertaker": "^1.2.1", + "vinyl-fs": "^3.0.0" + }, + "bin": { + "gulp": "bin/gulp.js" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/gulp-cli": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.3.0.tgz", + "integrity": "sha512-zzGBl5fHo0EKSXsHzjspp3y5CONegCm8ErO5Qh0UzFzk2y4tMvzLWhoDokADbarfZRL2pGpRp7yt6gfJX4ph7A==", + "dependencies": { + "ansi-colors": "^1.0.1", + "archy": "^1.0.0", + "array-sort": "^1.0.0", + "color-support": "^1.1.3", + "concat-stream": "^1.6.0", + "copy-props": "^2.0.1", + "fancy-log": "^1.3.2", + "gulplog": "^1.0.0", + "interpret": "^1.4.0", + "isobject": "^3.0.1", + "liftoff": "^3.1.0", + "matchdep": "^2.0.0", + "mute-stdout": "^1.0.0", + "pretty-hrtime": "^1.0.0", + "replace-homedir": "^1.0.0", + "semver-greatest-satisfied-range": "^1.1.0", + "v8flags": "^3.2.0", + "yargs": "^7.1.0" + }, + "bin": { + "gulp": "bin/gulp.js" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/gulp-npm-dist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/gulp-npm-dist/-/gulp-npm-dist-1.0.4.tgz", + "integrity": "sha512-He/IVPaJjRatWcmA5vPdY6QjQ4+GCLZVfP0TDkaGH7PzwUP9ltiXlllQod6cdcHlo3dXJxWqH4Kp2h9y7MeOAg==" + }, + "node_modules/gulp-rename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-2.0.0.tgz", + "integrity": "sha512-97Vba4KBzbYmR5VBs9mWmK+HwIf5mj+/zioxfZhOKeXtx5ZjBk57KFlePf5nxq9QsTtFl0ejnHE3zTC9MHXqyQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/gulp-typescript": { + "version": "6.0.0-alpha.1", + "resolved": "https://registry.npmjs.org/gulp-typescript/-/gulp-typescript-6.0.0-alpha.1.tgz", + "integrity": "sha512-KoT0TTfjfT7w3JItHkgFH1T/zK4oXWC+a8xxKfniRfVcA0Fa1bKrIhztYelYmb+95RB80OLMBreknYkdwzdi2Q==", + "dependencies": { + "ansi-colors": "^4.1.1", + "plugin-error": "^1.0.1", + "source-map": "^0.7.3", + "through2": "^3.0.1", + "vinyl": "^2.2.0", + "vinyl-fs": "^3.0.3" + }, + "engines": { + "node": ">= 8" + }, + "peerDependencies": { + "typescript": "~2.7.1 || >=2.8.0-dev || >=2.9.0-dev || ~3.0.0 || >=3.0.0-dev || >=3.1.0-dev || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.7.0-dev " + } + }, + "node_modules/gulp-typescript/node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "engines": { + "node": ">=6" + } + }, + "node_modules/gulplog": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "integrity": "sha512-hm6N8nrm3Y08jXie48jsC55eCZz9mnb4OirAStEk2deqeyhXU3C1otDVh+ccttMuc1sBi6RX6ZJ720hs9RCvgw==", + "dependencies": { + "glogg": "^1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", + "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", + "dependencies": { + "get-intrinsic": "^1.2.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw==", + "dependencies": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==", + "dependencies": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "dependencies": { + "parse-passwd": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/indent-string": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", + "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "node_modules/interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "dependencies": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-accessor-descriptor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.1.tgz", + "integrity": "sha512-YBUanLI8Yoihw923YeFUS5fs0fF2f5TSFTNiYAAzhhDscDa3lEqYuz1pDOEP5KvX94I9ey3vsqjJcLVFVU+3QA==", + "dependencies": { + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" + }, + "node_modules/is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha512-9fRVlXc0uCxEDj1nQzaWONSpbTfx0FmJfzHF7pwlI8DkWGoHBBea4Pg5Ky0ojwwxQmnSifgbKkI06Qv0Ljgj+Q==", + "dependencies": { + "binary-extensions": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "node_modules/is-core-module": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-descriptor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.1.tgz", + "integrity": "sha512-bc4NlCDiCr28U4aEsQ3Qs2491gVq4V8G7MQyws968ImqjKuYtTJXrl7Vq7jsN7Ly/C3xj5KWFrY7sHNeDkAzXw==", + "dependencies": { + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-descriptor": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.7.tgz", + "integrity": "sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", + "dependencies": { + "number-is-nan": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-negated-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", + "integrity": "sha512-czXVVn/QEmgvej1f50BZ648vUI+em0xqMq2Sn+QncCLN4zj1UAxlT+kw/6ggQTOaZPd1HqKQGEqbpQVtJucWug==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-path-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-3.0.0.tgz", + "integrity": "sha512-kyiNFFLU0Ampr6SDZitD/DwUo4Zs1nSdnygUBqsu3LooL00Qvb5j+UnvApUn/TTj1J3OuE6BTdQ5rudKmU2ZaA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-path-inside": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz", + "integrity": "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "dependencies": { + "is-unc-path": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "dependencies": { + "unc-path-regex": "^0.1.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==" + }, + "node_modules/is-valid-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", + "integrity": "sha512-AhiROmoEFDSsjx8hW+5sGwgKVIORcXnrlAx/R0ZSeaPw70Vw0CqkGBBhHGL58Uox2eXnU1AnvXJl1XlyedO5bA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jquery": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.0.tgz", + "integrity": "sha512-Xb7SVYMvygPxbFMpTFQiHh1J7HClEaThguL15N/Gg37Lri/qKyhRGZYzHRyLH8Stq3Aow0LsHO2O2ci86fCrNQ==" + }, + "node_modules/jquery-ui-dist": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/jquery-ui-dist/-/jquery-ui-dist-1.12.1.tgz", + "integrity": "sha512-UnQQWIvxaP7s13FLx37WufEwDYLSXKpp9JHrqEYTP6GqQNM+RMVEwsJMoc163QlzEaAV5YVfWlgQU5FPjKBtSw==" + }, + "node_modules/jquery-ui-themes": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/jquery-ui-themes/-/jquery-ui-themes-1.12.0.tgz", + "integrity": "sha512-3+GsDM7HifCXDn2s8i7LMGIG64yc+C+kl3DZc6FFT64kIsW4espXwY8MjZwesAaNTmDntQgUdLTOf/3DKg9RNg==" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==" + }, + "node_modules/just-debounce": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.1.0.tgz", + "integrity": "sha512-qpcRocdkUmf+UTNBYx5w6dexX5J31AKK1OmPwH630a83DdVVUIngk55RSAiIGpQyoH0dlr872VHfPjnQnK1qDQ==" + }, + "node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/knockout": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/knockout/-/knockout-3.4.0.tgz", + "integrity": "sha512-Jkui3Z3Ll318UBcZElSMwDSnWYZDiIOqf2YVbUlxEcuX3B1BN55NOVVrZEf7WEyiUKRF8N/uLLN9iqOXXpcKGw==" + }, + "node_modules/last-run": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz", + "integrity": "sha512-U/VxvpX4N/rFvPzr3qG5EtLKEnNI0emvIQB3/ecEwv+8GHaUKbIB8vxv1Oai5FAF0d0r7LXHhLLe5K/yChm5GQ==", + "dependencies": { + "default-resolution": "^2.0.0", + "es6-weak-map": "^2.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/lazystream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", + "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", + "dependencies": { + "readable-stream": "^2.0.5" + }, + "engines": { + "node": ">= 0.6.3" + } + }, + "node_modules/lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw==", + "dependencies": { + "invert-kv": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lead": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz", + "integrity": "sha512-IpSVCk9AYvLHo5ctcIXxOBpMWUe+4TKN3VPWAKUbJikkmsGp0VrSM8IttVc32D6J4WUsiPE6aEFRNmIoF/gdow==", + "dependencies": { + "flush-write-stream": "^1.0.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/liftoff": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz", + "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==", + "dependencies": { + "extend": "^3.0.0", + "findup-sync": "^3.0.0", + "fined": "^1.0.1", + "flagged-respawn": "^1.0.0", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.0", + "rechoir": "^0.6.2", + "resolve": "^1.1.7" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/liftoff/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==", + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/make-iterator/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==", + "dependencies": { + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/matchdep": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz", + "integrity": "sha512-LFgVbaHIHMqCRuCZyfCtUOq9/Lnzhi7Z0KFUE2fhD54+JN2jLh3hC02RLkqauJ3U4soU6H1J3tfj/Byk7GoEjA==", + "dependencies": { + "findup-sync": "^2.0.0", + "micromatch": "^3.0.4", + "resolve": "^1.4.0", + "stack-trace": "0.0.10" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/matchdep/node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/matchdep/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/matchdep/node_modules/findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha512-vs+3unmJT45eczmcAZ6zMJtxN3l/QXeccaXQx5cu/MeJMhewVfoWZqibRkOxPnmoR59+Zy5hjabfQc6JLSah4g==", + "dependencies": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/matchdep/node_modules/is-descriptor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/matchdep/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/matchdep/node_modules/is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==", + "dependencies": { + "is-extglob": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/matchdep/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/matchdep/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/matchdep/node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/micromatch/node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/micromatch/node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/micromatch/node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dependencies": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mixin-deep/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mixin-deep/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/moment": { + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz", + "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==", + "engines": { + "node": "*" + } + }, + "node_modules/moment-timezone": { + "version": "0.5.35", + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.35.tgz", + "integrity": "sha512-cY/pBOEXepQvlgli06ttCTKcIf8cD1nmNwOKQQAdHBqYApQSpAqotBMX0RJZNgMp6i0PlZuf1mFtnlyEkwyvFw==", + "dependencies": { + "moment": ">= 2.9.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/mute-stdout": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz", + "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/nan": { + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", + "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==", + "optional": true + }, + "node_modules/nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/is-descriptor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/nanomatch/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nanomatch/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/now-and-later": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", + "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", + "dependencies": { + "once": "^1.3.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==", + "dependencies": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==", + "dependencies": { + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==", + "dependencies": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==", + "dependencies": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.reduce": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.reduce/-/object.reduce-1.0.1.tgz", + "integrity": "sha512-naLhxxpUESbNkRqc35oQ2scZSJueHGQNUfMW/0U37IgN6tE2dgDWg3whf+NEliy3F/QysrO48XKUz/nGPe+AQw==", + "dependencies": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/ordered-read-streams": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", + "integrity": "sha512-Z87aSjx3r5c0ZB7bcJqIgIRX5bxR7A4aSzvIbaxd0oTkWBCOoKfuGHiKj60CHVUgg1Phm5yMZzBdt8XqRs73Mw==", + "dependencies": { + "readable-stream": "^2.0.1" + } + }, + "node_modules/os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g==", + "dependencies": { + "lcid": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/p-map": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-5.5.0.tgz", + "integrity": "sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==", + "dev": true, + "dependencies": { + "aggregate-error": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parse-filepath": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==", + "dependencies": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", + "dependencies": { + "error-ex": "^1.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/parse-node-version": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", + "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q==" + }, + "node_modules/path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==", + "dependencies": { + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "node_modules/path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==", + "dependencies": { + "path-root-regex": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", + "dependencies": { + "pinkie": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/plugin-error": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", + "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==", + "dependencies": { + "ansi-colors": "^1.0.1", + "arr-diff": "^4.0.0", + "arr-union": "^3.1.0", + "extend-shallow": "^3.0.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/plugin-error/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/plugin-error/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/plugin-error/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha512-66hKPCr+72mlfiSjlEB1+45IjXSqvVAIy6mocupoww4tBFE9R9IhwwUGoI4G++Tc9Aq+2rxOt0RFU6gPcrte0A==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "node_modules/pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dependencies": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==", + "dependencies": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==", + "dependencies": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/read-pkg/node_modules/path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==", + "dependencies": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dependencies": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/readdirp/node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/is-descriptor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/readdirp/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp/node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", + "dependencies": { + "resolve": "^1.1.6" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dependencies": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-not/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-not/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-not/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/remove-bom-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", + "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==", + "dependencies": { + "is-buffer": "^1.1.5", + "is-utf8": "^0.2.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/remove-bom-stream": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz", + "integrity": "sha512-wigO8/O08XHb8YPzpDDT+QmRANfW6vLqxfaXm1YXhnFf3AkSLyjfG3GEFg4McZkmgL7KvCj5u2KczkvSP6NfHA==", + "dependencies": { + "remove-bom-buffer": "^3.0.0", + "safe-buffer": "^5.1.0", + "through2": "^2.0.3" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/remove-bom-stream/node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dependencies": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==" + }, + "node_modules/repeat-element": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/replace-ext": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", + "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/replace-homedir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-homedir/-/replace-homedir-1.0.0.tgz", + "integrity": "sha512-CHPV/GAglbIB1tnQgaiysb8H2yCy8WQ7lcEwQ/eT+kLj0QHV8LnJW0zpqpE7RSkrMSRoa+EBoag86clf7WAgSg==", + "dependencies": { + "homedir-polyfill": "^1.0.1", + "is-absolute": "^1.0.0", + "remove-trailing-separator": "^1.1.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug==" + }, + "node_modules/requirejs": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.6.tgz", + "integrity": "sha512-ipEzlWQe6RK3jkzikgCupiTbTvm4S0/CAU5GlgptkN5SO6F3u0UD0K18wy6ErDqiCyP4J4YYe1HuAShvsxePLg==", + "bin": { + "r_js": "bin/r.js", + "r.js": "bin/r.js" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/requirejs-text": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/requirejs-text/-/requirejs-text-2.0.12.tgz", + "integrity": "sha512-Dbct1V0sAPkvaAflSJmq+iHNB+WakFkWvHEcrh04MvCgC6m1yOwYG//mKUznLkuaFjcFctXTOZamb0UWimNbGA==" + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", + "dependencies": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-options": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz", + "integrity": "sha512-NYDgziiroVeDC29xq7bp/CacZERYsA9bXYd1ZmcJlF3BcrZv5pTb4NG7SjdyKDnXZ84aC4vo2u6sNKIA1LCu/A==", + "dependencies": { + "value-or-function": "^3.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==", + "deprecated": "https://github.com/lydell/resolve-url#deprecated" + }, + "node_modules/ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "engines": { + "node": ">=0.12" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/rw": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", + "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==" + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==", + "dependencies": { + "ret": "~0.1.10" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/semver-greatest-satisfied-range": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz", + "integrity": "sha512-Ny/iyOzSSa8M5ML46IAx3iXc6tfOsYU2R4AXi2UpHk60Zrgyq6eqPj/xiOfS0rRl/iiQ/rdJkVjw/5cdUyCntQ==", + "dependencies": { + "sver-compat": "^1.5.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" + }, + "node_modules/set-function-length": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", + "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "dependencies": { + "define-data-property": "^1.1.1", + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/set-value/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dependencies": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dependencies": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/is-descriptor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dependencies": { + "kind-of": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", + "dependencies": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "node_modules/source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "deprecated": "See https://github.com/lydell/source-map-url#deprecated" + }, + "node_modules/sparkles": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", + "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==" + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.16", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz", + "integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==" + }, + "node_modules/split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dependencies": { + "extend-shallow": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split-string/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split-string/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split-string/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==", + "engines": { + "node": "*" + } + }, + "node_modules/static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==", + "dependencies": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stream-exhaust": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz", + "integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==" + }, + "node_modules/stream-shift": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==" + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", + "dependencies": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==", + "dependencies": { + "is-utf8": "^0.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/sver-compat": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz", + "integrity": "sha512-aFTHfmjwizMNlNE6dsGmoAM4lHjL0CyiobWaFiXWSlD7cIxshW422Nb8KbXCmR6z+0ZEPY+daXJrDyh/vuwTyg==", + "dependencies": { + "es6-iterator": "^2.0.1", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/through2": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", + "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "2 || 3" + } + }, + "node_modules/through2-filter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", + "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", + "dependencies": { + "through2": "~2.0.0", + "xtend": "~4.0.0" + } + }, + "node_modules/through2-filter/node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dependencies": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/time-stamp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", + "integrity": "sha512-gLCeArryy2yNTRzTGKbZbloctj64jkZ57hj5zdraXue6aFgd6PmvVtEyiUU+hvU0v7q08oVv8r8ev0tRo6bvgw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-absolute-glob": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", + "integrity": "sha512-rtwLUQEwT8ZeKQbyFJyomBRYXyE16U5VKuy0ftxLMK/PZb2fkOsg5r9kHdauuVDbsNdIBoC/HCthpidamQFXYA==", + "dependencies": { + "is-absolute": "^1.0.0", + "is-negated-glob": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-object-path/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dependencies": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/is-descriptor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.3.tgz", + "integrity": "sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==", + "dependencies": { + "is-accessor-descriptor": "^1.0.1", + "is-data-descriptor": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/to-regex/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-through": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", + "integrity": "sha512-+QIz37Ly7acM4EMdw2PRN389OneM5+d844tirkGp4dPKzI5OE72V9OsbFp+CIYJDahZ41ZV05hNtcPAQUAm9/Q==", + "dependencies": { + "through2": "^2.0.3" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/to-through/node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dependencies": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + }, + "node_modules/typeahead.js": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/typeahead.js/-/typeahead.js-0.10.4.tgz", + "integrity": "sha512-KwTS6RlkZPSnFndQIM+rvnf43S2m9WtbFXMAHPuw3MnTrlGsn9rLRMJkVYnIUOgXYZzx9ABYovBbyjSiEBaJXw==" + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" + }, + "node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha512-5WsVTFcH1ut/kkhAaHf4PVgI8c7++GiVcpCGxPouI6ZVjsqPnSDf8h/8HtVqc0t4fzRXwnMK70EcZeAs3PIddg==" + }, + "node_modules/undertaker": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.3.0.tgz", + "integrity": "sha512-/RXwi5m/Mu3H6IHQGww3GNt1PNXlbeCuclF2QYR14L/2CHPz3DFZkvB5hZ0N/QUkiXWCACML2jXViIQEQc2MLg==", + "dependencies": { + "arr-flatten": "^1.0.1", + "arr-map": "^2.0.0", + "bach": "^1.0.0", + "collection-map": "^1.0.0", + "es6-weak-map": "^2.0.1", + "fast-levenshtein": "^1.0.0", + "last-run": "^1.1.0", + "object.defaults": "^1.0.0", + "object.reduce": "^1.0.0", + "undertaker-registry": "^1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/undertaker-registry": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/undertaker-registry/-/undertaker-registry-1.0.1.tgz", + "integrity": "sha512-UR1khWeAjugW3548EfQmL9Z7pGMlBgXteQpr1IZeZBtnkCJQJIJ1Scj0mb9wQaPvUZ9Q17XqW6TIaPchJkyfqw==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dependencies": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unique-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", + "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", + "dependencies": { + "json-stable-stringify-without-jsonify": "^1.0.1", + "through2-filter": "^3.0.0" + } + }, + "node_modules/unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==", + "dependencies": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==", + "dependencies": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==", + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "engines": { + "node": ">=4", + "yarn": "*" + } + }, + "node_modules/urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==", + "deprecated": "Please see https://github.com/lydell/urix#deprecated" + }, + "node_modules/use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/v8flags": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", + "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", + "dependencies": { + "homedir-polyfill": "^1.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/value-or-function": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz", + "integrity": "sha512-jdBB2FrWvQC/pnPtIqcLsMaQgjhdb6B7tk1MMyTKapox+tQZbdRP4uLxu/JY0t7fbfDCUMnuelzEYv5GsxHhdg==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vinyl": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz", + "integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==", + "dependencies": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vinyl-fs": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz", + "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==", + "dependencies": { + "fs-mkdirp-stream": "^1.0.0", + "glob-stream": "^6.1.0", + "graceful-fs": "^4.0.0", + "is-valid-glob": "^1.0.0", + "lazystream": "^1.0.0", + "lead": "^1.0.0", + "object.assign": "^4.0.4", + "pumpify": "^1.3.5", + "readable-stream": "^2.3.3", + "remove-bom-buffer": "^3.0.0", + "remove-bom-stream": "^1.2.0", + "resolve-options": "^1.1.0", + "through2": "^2.0.0", + "to-through": "^2.0.0", + "value-or-function": "^3.0.0", + "vinyl": "^2.0.0", + "vinyl-sourcemap": "^1.1.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vinyl-fs/node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dependencies": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/vinyl-sourcemap": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz", + "integrity": "sha512-NiibMgt6VJGJmyw7vtzhctDcfKch4e4n9TBeoWlirb7FMg9/1Ov9k+A5ZRAtywBpRPiyECvQRQllYM8dECegVA==", + "dependencies": { + "append-buffer": "^1.0.2", + "convert-source-map": "^1.5.0", + "graceful-fs": "^4.1.6", + "normalize-path": "^2.1.1", + "now-and-later": "^2.0.0", + "remove-bom-buffer": "^3.0.0", + "vinyl": "^2.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vinyl-sourcemap/node_modules/normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha512-F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ==" + }, + "node_modules/wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==", + "dependencies": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/xmlhttprequest": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", + "integrity": "sha512-58Im/U0mlVBLM38NdZjHyhuMtCqa61469k2YP/AaPbvCoV9aQGUpbJBj1QRm2ytRiVQBD/fsw7L2bJGDVQswBA==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/y18n": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", + "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==" + }, + "node_modules/yargs": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.2.tgz", + "integrity": "sha512-ZEjj/dQYQy0Zx0lgLMLR8QuaqTihnxirir7EwUHp1Axq4e3+k8jXU5K0VLbNvedv1f4EWtBonDIZm0NUr+jCcA==", + "dependencies": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^5.0.1" + } + }, + "node_modules/yargs-parser": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.1.tgz", + "integrity": "sha512-wpav5XYiddjXxirPoCTUPbqM0PXvJ9hiBMvuJgInvo4/lAOTZzUprArw17q2O1P2+GHhbBr18/iQwjL5Z9BqfA==", + "dependencies": { + "camelcase": "^3.0.0", + "object.assign": "^4.1.0" } } } diff --git a/package.json b/package.json index 04a59ad0f..55ea4fe34 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,39 @@ { + "private": true, "dependencies": { - "@types/bootstrap": "^3.3.36", - "@types/durandal": "^2.1.36", - "@types/jquery": "^3.2.16", - "@types/jqueryui": "^1.11.37", - "@types/jwt-decode": "^2.2.1", - "@types/knockout": "^3.4.46", - "@types/requirejs": "^2.1.31", - "@types/typeahead": "^0.11.31", - "@types/underscore": "^1.8.4", - "moment" : "^2.24.0" - } + "@types/bootstrap": "3.3.36", + "@types/durandal": "2.1.36", + "@types/jqueryui": "1.11.37", + "@types/jwt-decode": "2.2.1", + "@types/knockout": "3.4.46", + "@types/requirejs": "2.1.31", + "@types/typeahead": "0.11.31", + "@types/underscore": "1.8.4", + "bean": "1.0.14", + "bootstrap": "3.4.1", + "d3": "4.11.0", + "durandal": "2.2.0", + "eonasdan-bootstrap-datetimepicker": "4.17.47", + "flotr2": "0.1.0", + "font-awesome": "4.3.0", + "gulp": "^4.0.2", + "gulp-npm-dist": "1.0.4", + "gulp-typescript": "6.0.0-alpha.1", + "jquery": "3.5.0", + "jquery-ui-dist": "1.12.1", + "jquery-ui-themes": "1.12.0", + "knockout": "3.4.0", + "moment": "2.24.0", + "moment-timezone": "0.5.35", + "requirejs": "2.3.6", + "requirejs-text": "2.0.12", + "typeahead.js": "0.10.4", + "underscore": "1.8.3" + }, + "devDependencies": { + "del": "^7.1.0", + "gulp-rename": "^2.0.0", + "typescript": "^4.0.5" + }, + "type": "module" } diff --git a/pom.xml b/pom.xml index 87890b31d..5008b8d63 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ com.arpnetworking.build arpnetworking-parent-pom - 2.0.6 + 3.3.4 @@ -28,12 +28,12 @@ play2 Metrics Portal Web user interface for managing the metrics stack. - 0.10.80 + 0.13.3-SNAPSHOT Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt + https://www.apache.org/licenses/LICENSE-2.0.txt repo A business-friendly OSS license @@ -66,95 +66,85 @@ scm:git:git@github.com:ArpNetworking/metrics-portal.git scm:git:git@github.com:ArpNetworking/metrics-portal.git https://github.com/arpnetworking/metrics-portal - metrics-portal-0.10.80 + metrics-portal-0.11.0 - 2.5.20 - 10.0.13 - 0.58 - 3.5.0 - 2.5.1.1 + 1.1.0 + 1.0.1 + 1.0.0 + 1.0.0 2.6.2 - 1.20.0 - 1.9.2 - 1.1.9 - 3.2.0 + 3.1.1 + 1.9.22.1 + 4.17.0 4.0.0-fluidsonic-1 - 3.2.1 - 2.3.0 - 1.15 - 1.1.12 + 2.6.1_v4 + 1.17.1 + 2.0.1 1.7.1 - 11.15.4 - 3.11 - 2.2.1 - 4.2.0 - 4.0.0 - 23.6.1-jre - 4.0 - 4.1.0 - 2.7.9 - 2.9.10 - 0.2.1 - 5.0.0 + 14.0.2 + 10.17.3 + 9.1.0 + 33.3.0-jre + 6.0.0 + 6.0.0 + 5.1.0 + 2.17.2 + 0.2.8 1.3.0 - 1 3.0.2 - 1.18.3 - 0.11.3 - 0.11.2 - 0.11.2 - 0.11.2 - 3.10.6.Final - 1.90 - 2.6.23 - 2.6.13 - 4.1.3 - 1.2.2 - 2.6.13 - 42.3.8 - 2.11.12 - 0.8.0 - 1.0.6 - 5.1.7 - 1.7.25 - 3.1.12 - 1.3.14 - 1.3.3 - 4.0.1 + 0.9.0 + 2.1.2 + 1.5.8 + 0.13.0 + 0.13.1 + 0.13.0 + 0.13.1 + 3.2.1 + 3.0.5 + 3.0.4 + 8.3.0 + 3.0.5 + 42.7.4 + 2.13.12 + 2.3.0 + 8.11.2 + 2.0.16 + 4.8.6 + 2.0.3 + 1.4.3 + 5.1.0 - 4.5.13 - 4.4.10 - 2.1 + 5.3.1 + 5.2.5 + 3.0 1.5.0 - 4.12 - 2.23.4 - 0.18.1 - 2.19.0 + 4.13.2 + 5.13.0 + 0.20.0 + 2.27.2 - 1.9.1 - 1.8 - 1.10 - 2.13.0 - 0.27.2 - 0.1.2 - 2.6 - 2.1.5 - 1.0.0-rc5 - 1.0.0 - 1.0.1 - 1.14.0 + 1.9.22.1 + 1.15.0 + 3.6.0 + 2.16.1 + 0.45.0 + 0.2.8 + 3.7.1 + 2.3.0 + 1.0.5 + 1.0.3 + 1.15.0 - 2.11 + 2.13 ${project.basedir}/target - 3.6.3 ${project.build.finalName} @@ -180,8 +170,9 @@ false false 2.1.7 - 10.7 + 14.1 3.11 + ${project.version} ${project.build.finalName} @@ -239,14 +230,42 @@ org.apache.maven.plugins - maven-javadoc-plugin + maven-compiler-plugin - controllers.javascript - - routes.java - + + + com.datastax.oss + java-driver-mapper-processor + ${cassandra.version} + + + org.slf4j + slf4j-nop + ${slf4j.version} + + + ${generated.sources} + + org.apache.maven.plugins + maven-javadoc-plugin + + + attach-javadocs + + jar + + + true + controllers.javascript + + routes.java + + + + + org.apache.maven.plugins maven-source-plugin @@ -262,11 +281,26 @@ org.apache.maven.plugins maven-surefire-plugin + + + default-test + test + + test + + + @{argLine} --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED -Xms512m -ea -Duser.timezone="UTC" + classes + 300 + + + org.apache.maven.plugins maven-failsafe-plugin + @{argLine} --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED ${docker.host.address} @@ -320,8 +354,13 @@ npm - - + generate-resources + + + gulp build + + gulp + generate-resources @@ -368,14 +407,28 @@ maven-dependency-plugin - com.typesafe.play:play-java_${scala.package.version}:jar:* + org.playframework:play-java_${scala.package.version}:jar:* + com.datastax.oss:java-driver-shaded-guava:jar:* + + + analyze + verify + + analyze-only + + + false + true + + + - com.google.code.play2-maven-plugin + com.arpnetworking.code.play2-maven-plugin play2-maven-plugin ${play.maven.plugin.version} true @@ -402,9 +455,38 @@ - com.google.code.sbt-compiler-maven-plugin + com.arpnetworking.code.sbt-compiler-maven-plugin sbt-compiler-maven-plugin ${sbt.compiler.plugin.version} + + + annotate-models + + compile + + process-resources + + ${project.build.directory}/generated-sources/annotations + -g -implicit:class -proc:only + + + + default-compile + + compile + + compile + + + -g -deprecation -Xlint:all -Xlint:-processing -Xlint:-path -Xlint:-this-escape -Werror -proc:none + + + - arpnetworking/metrics-portal:${project.version} + arpnetworking/metrics-portal:${docker.image.tag} metrics-portal ${project.build.directory}/docker-assembly/Dockerfile ${buildNumber} + cache-base + + docker.arpnetworking.com/arpnetworking/metrics-portal:cache-base + ${docker.skip.metrics-portal} @@ -770,7 +886,7 @@ GET 200 - + 1000 @@ -795,100 +911,95 @@ ${scala.xml.version} - org.scala-lang.modules - scala-java8-compat_${scala.package.version} - ${scala.java8.version} - - - com.typesafe.play + org.playframework play_${scala.package.version} ${play2.version} - - com.typesafe.play - play-guice_${scala.package.version} - ${play2.version} + + org.playframework + play-guice_${scala.package.version} + ${play2.version} runtime + + + com.google.inject + guice + + + com.google.inject.extensions + guice-assistedinject + + - com.typesafe.play + org.playframework play-json_${scala.package.version} ${play2-json.version} - com.typesafe.play + org.playframework play-ws_${scala.package.version} ${play2.version} - com.typesafe.play - filters-helpers_${scala.package.version} + org.playframework + play-filters-helpers_${scala.package.version} ${play2.version} - com.typesafe.play + org.playframework play-java_${scala.package.version} ${play2.version} - com.typesafe.play + org.playframework play-ebean_${scala.package.version} ${play2-ebean.version} - com.typesafe.play + org.playframework play-jdbc-evolutions_${scala.package.version} ${play2-jdbc-evolutions.version} - - com.typesafe.play - shaded-asynchttpclient - ${asynchttpclient.version} - io.ebean ebean ${ebean.version} - - io.ebean - ebean-annotation - ${ebean.annotation.version} - - - io.ebean - persistence-api - ${ebean.api.version} - - - com.typesafe.play - play-enhancer - ${play2-enhancer.version} - + + + + + + + + + + com.typesafe config ${typesafe.config.version} - com.typesafe.play + org.playframework.twirl twirl-api_${scala.package.version} - ${twirl.api.version} + 2.0.7 - com.typesafe.play - play-akka-http-server_${scala.package.version} + org.playframework + play-pekko-http-server_${scala.package.version} ${play2.version} runtime - com.typesafe.play + org.playframework play-ahc-ws_${scala.package.version} ${play2.version} runtime - com.typesafe.play + org.playframework play-jdbc_${scala.package.version} ${play2.version} runtime @@ -901,7 +1012,7 @@ runtime --> - com.typesafe.play + org.playframework play-logback_${scala.package.version} ${play2.version} runtime @@ -926,81 +1037,90 @@ - + - com.typesafe.akka - akka-actor_${scala.package.version} - ${akka.version} + org.apache.pekko + pekko-actor_${scala.package.version} + ${pekko.version} - com.typesafe.akka - akka-remote_${scala.package.version} - ${akka.version} + org.apache.pekko + pekko-actor-typed_${scala.package.version} + ${pekko.version} - com.typesafe.akka - akka-cluster_${scala.package.version} - ${akka.version} + org.apache.pekko + pekko-serialization-jackson_${scala.package.version} + ${pekko.version} - com.typesafe.akka - akka-cluster-sharding_${scala.package.version} - ${akka.version} + org.apache.pekko + pekko-remote_${scala.package.version} + ${pekko.version} - com.typesafe.akka - akka-cluster-tools_${scala.package.version} - ${akka.version} + org.apache.pekko + pekko-cluster_${scala.package.version} + ${pekko.version} - com.typesafe.akka - akka-http_${scala.package.version} - ${akka.http.version} + org.apache.pekko + pekko-cluster-typed_${scala.package.version} + ${pekko.version} - com.typesafe.akka - akka-http-core_${scala.package.version} - ${akka.http.version} + org.apache.pekko + pekko-cluster-sharding_${scala.package.version} + ${pekko.version} - com.typesafe.akka - akka-persistence_${scala.package.version} - ${akka.version} + org.apache.pekko + pekko-cluster-tools_${scala.package.version} + ${pekko.version} - - com.typesafe.akka - akka-persistence-query_${scala.package.version} - ${akka.version} - runtime + org.apache.pekko + pekko-http_${scala.package.version} + ${pekko.http.version} - com.typesafe.akka - akka-stream_${scala.package.version} - ${akka.version} + org.apache.pekko + pekko-http-core_${scala.package.version} + ${pekko.http.version} - com.typesafe.akka - akka-persistence-cassandra_${scala.package.version} - ${akka.persistence.cassandra.version} + org.apache.pekko + pekko-persistence_${scala.package.version} + ${pekko.version} + + + + org.apache.pekko + pekko-persistence-query_${scala.package.version} + ${pekko.version} runtime - com.github.dnvriend - akka-persistence-jdbc_${scala.package.version} - ${akka.persistence.jdbc.version} + org.apache.pekko + pekko-stream_${scala.package.version} + ${pekko.version} + + + org.apache.pekko + pekko-persistence-cassandra_${scala.package.version} + ${pekko.persistence.cassandra.version} runtime - com.github.dnvriend - akka-persistence-inmemory_${scala.package.version} - ${akka.persistence.inmemory.version} + org.apache.pekko + pekko-persistence-jdbc_${scala.package.version} + ${pekko.persistence.jdbc.version} runtime - com.typesafe.akka - akka-slf4j_${scala.package.version} - ${akka.version} + org.apache.pekko + pekko-slf4j_${scala.package.version} + ${pekko.version} runtime @@ -1063,6 +1183,16 @@ + + com.google.inject + guice + ${guice.version} + + + com.google.inject.extensions + guice-assistedinject + ${guice.assisted.version} + @@ -1100,7 +1230,17 @@ com.fasterxml.jackson.module - jackson-module-guice + jackson-module-guice7 + ${jackson.version} + + + com.google.inject + guice + + + + com.fasterxml.jackson.module + jackson-module-scala_${scala.package.version} ${jackson.version} @@ -1111,23 +1251,10 @@ ${aspectjrt.version} runtime - - cglib - cglib - ${cglib.version} - runtime - com.arpnetworking.commons commons ${arpnetworking.commons.version} - - - - com.google.code.findbugs - findbugs-annotations - - com.arpnetworking.commons @@ -1135,9 +1262,9 @@ ${javassist.maven.core.version} - com.chrisomeara - pillar_${scala.package.version} - ${chrisomeara.pillar.version} + org.cognitor.cassandra + cassandra-migration + ${cassandra.migration.version} com.google.code.findbugs @@ -1149,36 +1276,16 @@ spotbugs-annotations ${spotbugs.annotations.version} - - javax.inject - javax.inject - ${javax.inject.version} - com.google.guava guava ${guava.version} - - com.google.inject - guice - ${guice.version} - - - com.google.inject.extensions - guice-assistedinject - ${guice.assisted.version} - net.sf.oval oval ${oval.version} - - io.netty - netty - ${netty.version} - commons-codec commons-codec @@ -1189,6 +1296,21 @@ java-uuid-generator ${jug.version} + + ch.qos.logback + logback-core + ${logback.version} + + + ch.qos.logback + logback-classic + ${logback.version} + + + org.lmdbjava + lmdbjava + ${lmdb.version} + - com.datastax.cassandra - cassandra-driver-core + com.datastax.oss + java-driver-core + ${cassandra.version} + + + com.datastax.oss + java-driver-mapper-runtime ${cassandra.version} - com.datastax.cassandra - cassandra-driver-mapping + com.datastax.oss + java-driver-query-builder ${cassandra.version} - com.datastax.cassandra - cassandra-driver-extras + com.datastax.oss + java-driver-mapper-processor ${cassandra.version} + provided org.flywaydb flyway-core ${flyway.core.version} + + org.flywaydb + flyway-database-postgresql + ${flyway.core.version} + org.flywaydb flyway-play_${scala.package.version} @@ -1239,6 +1372,7 @@ com.zaxxer HikariCP ${hikaricp.version} + runtime @@ -1258,15 +1392,15 @@ - com.typesafe.play + org.playframework play-test_${scala.package.version} ${play2.version} test - com.typesafe.akka - akka-testkit_${scala.package.version} - ${akka.version} + org.apache.pekko + pekko-testkit_${scala.package.version} + ${pekko.version} test @@ -1294,16 +1428,15 @@ test - org.apache.httpcomponents - httpclient + org.apache.httpcomponents.client5 + httpclient5 ${apache.http.client.version} test - org.apache.httpcomponents - httpcore + org.apache.httpcomponents.core5 + httpcore5 ${apache.http.core.version} - test commons-io diff --git a/project/build.properties b/project/build.properties index 176a863a5..3161d2146 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.9 \ No newline at end of file +sbt.version=1.6.1 diff --git a/project/plugins.sbt b/project/plugins.sbt index abaab20a8..5aeff37f9 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,8 +1,3 @@ logLevel := Level.Warn resolvers += Resolver.typesafeRepo("releases") - -addSbtPlugin("com.typesafe.sbt" % "sbt-web" % "1.2.2") -addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.1.0") -addSbtPlugin("com.typesafe.sbt" % "sbt-gzip" % "1.0.0") -addSbtPlugin("com.arpnetworking" %% "sbt-typescript" % "0.3.6") diff --git a/public/html/index.html b/public/html/index.html index 8481820a3..89a50876b 100644 --- a/public/html/index.html +++ b/public/html/index.html @@ -3,17 +3,16 @@ - - + - - + +

- \ No newline at end of file + diff --git a/sbt b/sbt deleted file mode 100755 index f0b5bddd8..000000000 --- a/sbt +++ /dev/null @@ -1,568 +0,0 @@ -#!/usr/bin/env bash -# -# A more capable sbt runner, coincidentally also called sbt. -# Author: Paul Phillips - -set -o pipefail - -declare -r sbt_release_version="0.13.15" -declare -r sbt_unreleased_version="0.13.15" - -declare -r latest_212="2.12.1" -declare -r latest_211="2.11.11" -declare -r latest_210="2.10.6" -declare -r latest_29="2.9.3" -declare -r latest_28="2.8.2" - -declare -r buildProps="project/build.properties" - -declare -r sbt_launch_ivy_release_repo="http://repo.typesafe.com/typesafe/ivy-releases" -declare -r sbt_launch_ivy_snapshot_repo="https://repo.scala-sbt.org/scalasbt/ivy-snapshots" -declare -r sbt_launch_mvn_release_repo="http://repo.scala-sbt.org/scalasbt/maven-releases" -declare -r sbt_launch_mvn_snapshot_repo="http://repo.scala-sbt.org/scalasbt/maven-snapshots" - -declare -r default_jvm_opts_common="-Xms512m -Xmx1536m -Xss2m" -declare -r noshare_opts="-Dsbt.global.base=project/.sbtboot -Dsbt.boot.directory=project/.boot -Dsbt.ivy.home=project/.ivy" - -declare sbt_jar sbt_dir sbt_create sbt_version sbt_script sbt_new -declare sbt_explicit_version -declare verbose noshare batch trace_level -declare sbt_saved_stty debugUs - -declare java_cmd="java" -declare sbt_launch_dir="$HOME/.sbt/launchers" -declare sbt_launch_repo - -# pull -J and -D options to give to java. -declare -a java_args scalac_args sbt_commands residual_args - -# args to jvm/sbt via files or environment variables -declare -a extra_jvm_opts extra_sbt_opts - -echoerr () { echo >&2 "$@"; } -vlog () { [[ -n "$verbose" ]] && echoerr "$@"; } -die () { echo "Aborting: $@" ; exit 1; } - -# restore stty settings (echo in particular) -onSbtRunnerExit() { - [[ -n "$sbt_saved_stty" ]] || return - vlog "" - vlog "restoring stty: $sbt_saved_stty" - stty "$sbt_saved_stty" - unset sbt_saved_stty -} - -# save stty and trap exit, to ensure echo is re-enabled if we are interrupted. -trap onSbtRunnerExit EXIT -sbt_saved_stty="$(stty -g 2>/dev/null)" -vlog "Saved stty: $sbt_saved_stty" - -# this seems to cover the bases on OSX, and someone will -# have to tell me about the others. -get_script_path () { - local path="$1" - [[ -L "$path" ]] || { echo "$path" ; return; } - - local target="$(readlink "$path")" - if [[ "${target:0:1}" == "/" ]]; then - echo "$target" - else - echo "${path%/*}/$target" - fi -} - -declare -r script_path="$(get_script_path "$BASH_SOURCE")" -declare -r script_name="${script_path##*/}" - -init_default_option_file () { - local overriding_var="${!1}" - local default_file="$2" - if [[ ! -r "$default_file" && "$overriding_var" =~ ^@(.*)$ ]]; then - local envvar_file="${BASH_REMATCH[1]}" - if [[ -r "$envvar_file" ]]; then - default_file="$envvar_file" - fi - fi - echo "$default_file" -} - -declare sbt_opts_file="$(init_default_option_file SBT_OPTS .sbtopts)" -declare jvm_opts_file="$(init_default_option_file JVM_OPTS .jvmopts)" - -build_props_sbt () { - [[ -r "$buildProps" ]] && \ - grep '^sbt\.version' "$buildProps" | tr '=\r' ' ' | awk '{ print $2; }' -} - -update_build_props_sbt () { - local ver="$1" - local old="$(build_props_sbt)" - - [[ -r "$buildProps" ]] && [[ "$ver" != "$old" ]] && { - perl -pi -e "s/^sbt\.version\b.*\$/sbt.version=${ver}/" "$buildProps" - grep -q '^sbt.version[ =]' "$buildProps" || printf "\nsbt.version=%s\n" "$ver" >> "$buildProps" - - vlog "!!!" - vlog "!!! Updated file $buildProps setting sbt.version to: $ver" - vlog "!!! Previous value was: $old" - vlog "!!!" - } -} - -set_sbt_version () { - sbt_version="${sbt_explicit_version:-$(build_props_sbt)}" - [[ -n "$sbt_version" ]] || sbt_version=$sbt_release_version - export sbt_version -} - -url_base () { - local version="$1" - - case "$version" in - 0.7.*) echo "http://simple-build-tool.googlecode.com" ;; - 0.10.* ) echo "$sbt_launch_ivy_release_repo" ;; - 0.11.[12]) echo "$sbt_launch_ivy_release_repo" ;; - 0.*-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9][0-9][0-9]) # ie "*-yyyymmdd-hhMMss" - echo "$sbt_launch_ivy_snapshot_repo" ;; - 0.*) echo "$sbt_launch_ivy_release_repo" ;; - *-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9][0-9][0-9]) # ie "*-yyyymmdd-hhMMss" - echo "$sbt_launch_mvn_snapshot_repo" ;; - *) echo "$sbt_launch_mvn_release_repo" ;; - esac -} - -make_url () { - local version="$1" - - local base="${sbt_launch_repo:-$(url_base "$version")}" - - case "$version" in - 0.7.*) echo "$base/files/sbt-launch-0.7.7.jar" ;; - 0.10.* ) echo "$base/org.scala-tools.sbt/sbt-launch/$version/sbt-launch.jar" ;; - 0.11.[12]) echo "$base/org.scala-tools.sbt/sbt-launch/$version/sbt-launch.jar" ;; - 0.*) echo "$base/org.scala-sbt/sbt-launch/$version/sbt-launch.jar" ;; - *) echo "$base/org/scala-sbt/sbt-launch/$version/sbt-launch.jar" ;; - esac -} - -addJava () { vlog "[addJava] arg = '$1'" ; java_args+=("$1"); } -addSbt () { vlog "[addSbt] arg = '$1'" ; sbt_commands+=("$1"); } -addScalac () { vlog "[addScalac] arg = '$1'" ; scalac_args+=("$1"); } -addResidual () { vlog "[residual] arg = '$1'" ; residual_args+=("$1"); } - -addResolver () { addSbt "set resolvers += $1"; } -addDebugger () { addJava "-Xdebug" ; addJava "-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=$1"; } -setThisBuild () { - vlog "[addBuild] args = '$@'" - local key="$1" && shift - addSbt "set $key in ThisBuild := $@" -} -setScalaVersion () { - [[ "$1" == *"-SNAPSHOT" ]] && addResolver 'Resolver.sonatypeRepo("snapshots")' - addSbt "++ $1" -} -setJavaHome () { - java_cmd="$1/bin/java" - setThisBuild javaHome "_root_.scala.Some(file(\"$1\"))" - export JAVA_HOME="$1" - export JDK_HOME="$1" - export PATH="$JAVA_HOME/bin:$PATH" -} - -getJavaVersion() { "$1" -version 2>&1 | grep -E -e '(java|openjdk) version' | awk '{ print $3 }' | tr -d \"; } - -checkJava() { - # Warn if there is a Java version mismatch between PATH and JAVA_HOME/JDK_HOME - - [[ -n "$JAVA_HOME" && -e "$JAVA_HOME/bin/java" ]] && java="$JAVA_HOME/bin/java" - [[ -n "$JDK_HOME" && -e "$JDK_HOME/lib/tools.jar" ]] && java="$JDK_HOME/bin/java" - - if [[ -n "$java" ]]; then - pathJavaVersion=$(getJavaVersion java) - homeJavaVersion=$(getJavaVersion "$java") - if [[ "$pathJavaVersion" != "$homeJavaVersion" ]]; then - echoerr "Warning: Java version mismatch between PATH and JAVA_HOME/JDK_HOME, sbt will use the one in PATH" - echoerr " Either: fix your PATH, remove JAVA_HOME/JDK_HOME or use -java-home" - echoerr " java version from PATH: $pathJavaVersion" - echoerr " java version from JAVA_HOME/JDK_HOME: $homeJavaVersion" - fi - fi -} - -java_version () { - local version=$(getJavaVersion "$java_cmd") - vlog "Detected Java version: $version" - echo "${version:2:1}" -} - -# MaxPermSize critical on pre-8 JVMs but incurs noisy warning on 8+ -default_jvm_opts () { - local v="$(java_version)" - if [[ $v -ge 8 ]]; then - echo "$default_jvm_opts_common" - else - echo "-XX:MaxPermSize=384m $default_jvm_opts_common" - fi -} - -build_props_scala () { - if [[ -r "$buildProps" ]]; then - versionLine="$(grep '^build.scala.versions' "$buildProps")" - versionString="${versionLine##build.scala.versions=}" - echo "${versionString%% .*}" - fi -} - -execRunner () { - # print the arguments one to a line, quoting any containing spaces - vlog "# Executing command line:" && { - for arg; do - if [[ -n "$arg" ]]; then - if printf "%s\n" "$arg" | grep -q ' '; then - printf >&2 "\"%s\"\n" "$arg" - else - printf >&2 "%s\n" "$arg" - fi - fi - done - vlog "" - } - - [[ -n "$batch" ]] && exec /dev/null; then - curl --fail --silent --location "$url" --output "$jar" - elif which wget >/dev/null; then - wget -q -O "$jar" "$url" - fi - } && [[ -r "$jar" ]] -} - -acquire_sbt_jar () { - { - sbt_jar="$(jar_file "$sbt_version")" - [[ -r "$sbt_jar" ]] - } || { - sbt_jar="$HOME/.ivy2/local/org.scala-sbt/sbt-launch/$sbt_version/jars/sbt-launch.jar" - [[ -r "$sbt_jar" ]] - } || { - sbt_jar="$(jar_file "$sbt_version")" - download_url "$(make_url "$sbt_version")" "$sbt_jar" - } -} - -usage () { - set_sbt_version - cat < display stack traces with a max of frames (default: -1, traces suppressed) - -debug-inc enable debugging log for the incremental compiler - -no-colors disable ANSI color codes - -sbt-create start sbt even if current directory contains no sbt project - -sbt-dir path to global settings/plugins directory (default: ~/.sbt/) - -sbt-boot path to shared boot directory (default: ~/.sbt/boot in 0.11+) - -ivy path to local Ivy repository (default: ~/.ivy2) - -no-share use all local caches; no sharing - -offline put sbt in offline mode - -jvm-debug Turn on JVM debugging, open at the given port. - -batch Disable interactive mode - -prompt Set the sbt prompt; in expr, 's' is the State and 'e' is Extracted - -script Run the specified file as a scala script - - # sbt version (default: sbt.version from $buildProps if present, otherwise $sbt_release_version) - -sbt-force-latest force the use of the latest release of sbt: $sbt_release_version - -sbt-version use the specified version of sbt (default: $sbt_release_version) - -sbt-dev use the latest pre-release version of sbt: $sbt_unreleased_version - -sbt-jar use the specified jar as the sbt launcher - -sbt-launch-dir directory to hold sbt launchers (default: $sbt_launch_dir) - -sbt-launch-repo repo url for downloading sbt launcher jar (default: $(url_base "$sbt_version")) - - # scala version (default: as chosen by sbt) - -28 use $latest_28 - -29 use $latest_29 - -210 use $latest_210 - -211 use $latest_211 - -212 use $latest_212 - -scala-home use the scala build at the specified directory - -scala-version use the specified version of scala - -binary-version use the specified scala version when searching for dependencies - - # java version (default: java from PATH, currently $(java -version 2>&1 | grep version)) - -java-home alternate JAVA_HOME - - # passing options to the jvm - note it does NOT use JAVA_OPTS due to pollution - # The default set is used if JVM_OPTS is unset and no -jvm-opts file is found - $(default_jvm_opts) - JVM_OPTS environment variable holding either the jvm args directly, or - the reference to a file containing jvm args if given path is prepended by '@' (e.g. '@/etc/jvmopts') - Note: "@"-file is overridden by local '.jvmopts' or '-jvm-opts' argument. - -jvm-opts file containing jvm args (if not given, .jvmopts in project root is used if present) - -Dkey=val pass -Dkey=val directly to the jvm - -J-X pass option -X directly to the jvm (-J is stripped) - - # passing options to sbt, OR to this runner - SBT_OPTS environment variable holding either the sbt args directly, or - the reference to a file containing sbt args if given path is prepended by '@' (e.g. '@/etc/sbtopts') - Note: "@"-file is overridden by local '.sbtopts' or '-sbt-opts' argument. - -sbt-opts file containing sbt args (if not given, .sbtopts in project root is used if present) - -S-X add -X to sbt's scalacOptions (-S is stripped) -EOM -} - -process_args () { - require_arg () { - local type="$1" - local opt="$2" - local arg="$3" - - if [[ -z "$arg" ]] || [[ "${arg:0:1}" == "-" ]]; then - die "$opt requires <$type> argument" - fi - } - while [[ $# -gt 0 ]]; do - case "$1" in - -h|-help) usage; exit 0 ;; - -v) verbose=true && shift ;; - -d) addSbt "--debug" && shift ;; - -w) addSbt "--warn" && shift ;; - -q) addSbt "--error" && shift ;; - -x) debugUs=true && shift ;; - -trace) require_arg integer "$1" "$2" && trace_level="$2" && shift 2 ;; - -ivy) require_arg path "$1" "$2" && addJava "-Dsbt.ivy.home=$2" && shift 2 ;; - -no-colors) addJava "-Dsbt.log.noformat=true" && shift ;; - -no-share) noshare=true && shift ;; - -sbt-boot) require_arg path "$1" "$2" && addJava "-Dsbt.boot.directory=$2" && shift 2 ;; - -sbt-dir) require_arg path "$1" "$2" && sbt_dir="$2" && shift 2 ;; - -debug-inc) addJava "-Dxsbt.inc.debug=true" && shift ;; - -offline) addSbt "set offline in Global := true" && shift ;; - -jvm-debug) require_arg port "$1" "$2" && addDebugger "$2" && shift 2 ;; - -batch) batch=true && shift ;; - -prompt) require_arg "expr" "$1" "$2" && setThisBuild shellPrompt "(s => { val e = Project.extract(s) ; $2 })" && shift 2 ;; - -script) require_arg file "$1" "$2" && sbt_script="$2" && addJava "-Dsbt.main.class=sbt.ScriptMain" && shift 2 ;; - - -sbt-create) sbt_create=true && shift ;; - -sbt-jar) require_arg path "$1" "$2" && sbt_jar="$2" && shift 2 ;; - -sbt-version) require_arg version "$1" "$2" && sbt_explicit_version="$2" && shift 2 ;; - -sbt-force-latest) sbt_explicit_version="$sbt_release_version" && shift ;; - -sbt-dev) sbt_explicit_version="$sbt_unreleased_version" && shift ;; - -sbt-launch-dir) require_arg path "$1" "$2" && sbt_launch_dir="$2" && shift 2 ;; - -sbt-launch-repo) require_arg path "$1" "$2" && sbt_launch_repo="$2" && shift 2 ;; - -scala-version) require_arg version "$1" "$2" && setScalaVersion "$2" && shift 2 ;; - -binary-version) require_arg version "$1" "$2" && setThisBuild scalaBinaryVersion "\"$2\"" && shift 2 ;; - -scala-home) require_arg path "$1" "$2" && setThisBuild scalaHome "_root_.scala.Some(file(\"$2\"))" && shift 2 ;; - -java-home) require_arg path "$1" "$2" && setJavaHome "$2" && shift 2 ;; - -sbt-opts) require_arg path "$1" "$2" && sbt_opts_file="$2" && shift 2 ;; - -jvm-opts) require_arg path "$1" "$2" && jvm_opts_file="$2" && shift 2 ;; - - -D*) addJava "$1" && shift ;; - -J*) addJava "${1:2}" && shift ;; - -S*) addScalac "${1:2}" && shift ;; - -28) setScalaVersion "$latest_28" && shift ;; - -29) setScalaVersion "$latest_29" && shift ;; - -210) setScalaVersion "$latest_210" && shift ;; - -211) setScalaVersion "$latest_211" && shift ;; - -212) setScalaVersion "$latest_212" && shift ;; - new) sbt_new=true && : ${sbt_explicit_version:=$sbt_release_version} && addResidual "$1" && shift ;; - *) addResidual "$1" && shift ;; - esac - done -} - -# process the direct command line arguments -process_args "$@" - -# skip #-styled comments and blank lines -readConfigFile() { - local end=false - until $end; do - read || end=true - [[ $REPLY =~ ^# ]] || [[ -z $REPLY ]] || echo "$REPLY" - done < "$1" -} - -# if there are file/environment sbt_opts, process again so we -# can supply args to this runner -if [[ -r "$sbt_opts_file" ]]; then - vlog "Using sbt options defined in file $sbt_opts_file" - while read opt; do extra_sbt_opts+=("$opt"); done < <(readConfigFile "$sbt_opts_file") -elif [[ -n "$SBT_OPTS" && ! ("$SBT_OPTS" =~ ^@.*) ]]; then - vlog "Using sbt options defined in variable \$SBT_OPTS" - extra_sbt_opts=( $SBT_OPTS ) -else - vlog "No extra sbt options have been defined" -fi - -[[ -n "${extra_sbt_opts[*]}" ]] && process_args "${extra_sbt_opts[@]}" - -# reset "$@" to the residual args -set -- "${residual_args[@]}" -argumentCount=$# - -# set sbt version -set_sbt_version - -checkJava - -# only exists in 0.12+ -setTraceLevel() { - case "$sbt_version" in - "0.7."* | "0.10."* | "0.11."* ) echoerr "Cannot set trace level in sbt version $sbt_version" ;; - *) setThisBuild traceLevel $trace_level ;; - esac -} - -# set scalacOptions if we were given any -S opts -[[ ${#scalac_args[@]} -eq 0 ]] || addSbt "set scalacOptions in ThisBuild += \"${scalac_args[@]}\"" - -# Update build.properties on disk to set explicit version - sbt gives us no choice -[[ -n "$sbt_explicit_version" && -z "$sbt_new" ]] && update_build_props_sbt "$sbt_explicit_version" -vlog "Detected sbt version $sbt_version" - -if [[ -n "$sbt_script" ]]; then - residual_args=( $sbt_script ${residual_args[@]} ) -else - # no args - alert them there's stuff in here - (( argumentCount > 0 )) || { - vlog "Starting $script_name: invoke with -help for other options" - residual_args=( shell ) - } -fi - -# verify this is an sbt dir, -create was given or user attempts to run a scala script -[[ -r ./build.sbt || -d ./project || -n "$sbt_create" || -n "$sbt_script" || -n "$sbt_new" ]] || { - cat < + + + + + + + + +