commit 2cc5840ac0df6c07fbd80138acee3cadc2f49dea Author: Julien Veyssier Date: Wed Nov 30 20:00:03 2016 +0100 gpxedit on the rails diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 0000000..b4609d7 --- /dev/null +++ b/AUTHORS.md @@ -0,0 +1,4 @@ +# Authors + +* Julien Veyssier (Developper) + diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..bd335ea --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +# Change Log +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/) +and this project adheres to [Semantic Versioning](http://semver.org/). + +## [Unreleased] diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..2def0e8 --- /dev/null +++ b/COPYING @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 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 Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are 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. + + 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. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + 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 Affero 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. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + 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 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 work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero 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 Affero 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 Affero 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 Affero 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 Affero 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 Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + 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 AGPL, see +. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..c8e8cf9 --- /dev/null +++ b/README.md @@ -0,0 +1,80 @@ +# GpxPod owncloud/nextcloud application + +If you want to help to translate this app in your language, take the english=>french files in "l10n" directory as examples. + +This app's purpose is to display gpx, kml and tcx files collections, +view elevation profiles and tracks stats, filter tracks, + color tracks by speed, slope, elevation and compare divergent parts of similar tracks. + +It's compatible with SQLite, MySQL and PostgreSQL databases. + +It works with gpx/kml/tcx files anywhere in your files, files shared with you, files in folders shared with you. +kml and tcx files will be displayed only if GpsBabel is found on the server system. + +Elevations can be corrected for entire folders or specific track if SRTM.py (gpxelevations) is found. + +Personal map tile servers can be added. + +It works with encrypted data folder (server side encryption). + +A public link pointing to a specific track can be shared if the corresponding gpx file is already shared by public link. + +!!! GpxPod now uses the owncloud database to store meta-information. If you want to get rid of the .geojson, .geojson.colored and .markers produced by previous versions, there are two buttons at the bottom of the "Settings" tab in user interface. !!! + +GpxPod proudly uses Leaflet with lots of plugins to display the map. + +This app is tested under Owncloud/Nextcloud 9.0/10 with Firefox and Chromium. +This app is under development. + +Link to Owncloud application website : https://apps.owncloud.com/content/show.php/GpxPod+again?content=174733 + +## Install + +No special installation instruction except : +!! Server needs python2.x or 3.x "gpxpy" and "geojson" module to work !! +They may be installed with pip. + +For example, on Debian-like systems : + +``` +sudo apt-get install python-pip +sudo pip install gpxpy geojson +``` +or on Redhat-like systems : +``` +sudo yum install python-pip +sudo pip install gpxpy geojson +``` + +Then put gpxpod directory in the Owncloud/Nextcloud apps to install. +There are several ways to do that : + +### Clone the git repository + +``` +cd /path/to/owncloud/apps +git clone https://gitlab.com/eneiluj/gpxpod-oc.git gpxpod +``` + +### Download from apps.owncloud.org + +Extract gpxpod archive you just downloaded from apps.owncloud.org : +``` +cd /path/to/owncloud/apps +tar xvf 174733-gpxpod-1.0.0.tar.gz +``` + +### Post install precautions + +Just in case, make python scripts executables : +``` +cd /path/to/owncloud/apps +chmod +x gpxpod/*.py +``` + +## Known issues + +* bad management of file names including simple or double quotes +* _WARNING_, kml conversion will NOT work with recent kml files using the proprietary "gx:track" extension tag. + +Any feedback will be appreciated. diff --git a/appinfo/app.php b/appinfo/app.php new file mode 100644 index 0000000..6604c71 --- /dev/null +++ b/appinfo/app.php @@ -0,0 +1,41 @@ + + * @copyright Julien Veyssier 2015 + */ + +namespace OCA\GpxEdit\AppInfo; + +use OCP\AppFramework\App; + +$app = new Application(); +$container = $app->getContainer(); + +$container->query('OCP\INavigationManager')->add(function () use ($container) { + $urlGenerator = $container->query('OCP\IURLGenerator'); + $l10n = $container->query('OCP\IL10N'); + return [ + // the string under which your app will be referenced in owncloud + 'id' => 'gpxedit', + + // sorting weight for the navigation. The higher the number, the higher + // will it be listed in the navigation + 'order' => 10, + + // the route that will be shown on startup + 'href' => $urlGenerator->linkToRoute('gpxedit.page.index'), + + // the icon that will be shown in the navigation + // this file needs to exist in img/ + 'icon' => $urlGenerator->imagePath('gpxedit', 'app.svg'), + + // the title of your application. This will be used in the + // navigation or on the settings page of your app + 'name' => $l10n->t('GpxEdit'), + ]; +}); diff --git a/appinfo/application.php b/appinfo/application.php new file mode 100644 index 0000000..6e930fc --- /dev/null +++ b/appinfo/application.php @@ -0,0 +1,88 @@ +getContainer(); + + /** + * Controllers + */ + $container->registerService( + 'PageController', function (IAppContainer $c) { + return new PageController( + $c->query('AppName'), + $c->query('Request'), + $c->query('UserId'), + $c->query('ServerContainer')->getUserFolder($c->query('UserId')), + $c->query('ServerContainer')->getConfig(), + $c->getServer()->getShareManager() + ); + } + ); + + $container->registerService( + 'ComparisonController', function (IAppContainer $c) { + return new ComparisonController( + $c->query('AppName'), + $c->query('Request'), + $c->query('UserId'), + //$c->getServer()->getUserFolder($c->query('UserId')), + //$c->query('OCP\IConfig'), + $c->query('ServerContainer')->getUserFolder($c->query('UserId')), + $c->query('ServerContainer')->getConfig() + ); + } + ); + + $container->registerService( + 'UtilsController', function (IAppContainer $c) { + return new UtilsController( + $c->query('AppName'), + $c->query('Request'), + $c->query('UserId'), + //$c->getServer()->getUserFolder($c->query('UserId')), + //$c->query('OCP\IConfig'), + $c->query('ServerContainer')->getUserFolder($c->query('UserId')), + $c->query('ServerContainer')->getConfig() + ); + } + ); + + } + +} + diff --git a/appinfo/info.xml b/appinfo/info.xml new file mode 100644 index 0000000..7d41f06 --- /dev/null +++ b/appinfo/info.xml @@ -0,0 +1,33 @@ + + + gpxedit + GpxEdit + +# GpxEdit owncloud/nextcloud application + +Any feedback will be appreciated. + + + AGPL + Display, analyse, compare and share gpx tracks + Julien Veyssier + Fritz Kleinschroth + 0.0.1 + GpxEdit + + https://gitlab.com/eneiluj/gpxedit-oc/wikis/userdoc + https://gitlab.com/eneiluj/gpxedit-oc/wikis/admindoc + https://gitlab.com/eneiluj/gpxedit-oc/wikis/devdoc + + tool + multimedia + https://gitlab.com/eneiluj/gpxedit-oc + https://gitlab.com/eneiluj/gpxedit-oc/issues + + + + + + + + diff --git a/appinfo/routes.php b/appinfo/routes.php new file mode 100644 index 0000000..4d81662 --- /dev/null +++ b/appinfo/routes.php @@ -0,0 +1,24 @@ + + * @copyright Julien Veyssier 2015 + */ + +/** + * Create your routes in here. The name is the lowercase name of the controller + * without the controller part, the stuff after the hash is the method. + * e.g. page#index -> OCA\GpxEdit\Controller\PageController->index() + * + * The controller class has to be registered in the application.php file since + * it's instantiated in there + */ +return [ + 'routes' => [ + ['name' => 'page#index', 'url' => '/', 'verb' => 'GET'], + ] +]; diff --git a/controller/pagecontroller.php b/controller/pagecontroller.php new file mode 100644 index 0000000..53f74c1 --- /dev/null +++ b/controller/pagecontroller.php @@ -0,0 +1,183 @@ + + * @copyright Julien Veyssier 2015 + */ + +namespace OCA\GpxEdit\Controller; + +use \OC_App; + +use OCP\IURLGenerator; +use OCP\IConfig; + +use OCP\AppFramework\Http; +use OCP\AppFramework\Http\RedirectResponse; + +use OCP\AppFramework\Http\ContentSecurityPolicy; + +use OCP\IRequest; +use OCP\AppFramework\Http\TemplateResponse; +use OCP\AppFramework\Http\DataResponse; +use OCP\AppFramework\Controller; + +function delTree($dir) { + $files = array_diff(scandir($dir), array('.','..')); + foreach ($files as $file) { + (is_dir("$dir/$file")) ? delTree("$dir/$file") : unlink("$dir/$file"); + } + return rmdir($dir); +} + +/** + * Recursive find files from name pattern + */ +function globRecursive($path, $find, $recursive=True) { + $result = Array(); + $dh = opendir($path); + while (($file = readdir($dh)) !== false) { + if (substr($file, 0, 1) === '.') continue; + $rfile = "{$path}/{$file}"; + if (is_dir($rfile) and $recursive) { + foreach (globRecursive($rfile, $find) as $ret) { + array_push($result, $ret); + } + } else { + if (fnmatch($find, $file)){ + array_push($result, $rfile); + } + } + } + closedir($dh); + return $result; +} + +/* + * search into all directories in PATH environment variable + * to find a program and return it if found + */ +function getProgramPath($progname){ + $path_ar = explode(':',getenv('path')); + foreach ($path_ar as $path){ + $supposed_gpath = $path.'/'.$progname; + if (file_exists($supposed_gpath) and + is_executable($supposed_gpath)){ + return $supposed_gpath; + } + } + return null; +} + +function endswith($string, $test) { + $strlen = strlen($string); + $testlen = strlen($test); + if ($testlen > $strlen) return false; + return substr_compare($string, $test, $strlen - $testlen, $testlen) === 0; +} + +class PageController extends Controller { + + private $userId; + private $userfolder; + private $config; + private $appVersion; + private $userAbsoluteDataPath; + private $shareManager; + private $dbconnection; + private $dbtype; + private $dbdblquotes; + private $appPath; + + public function __construct($AppName, IRequest $request, $UserId, + $userfolder, $config, $shareManager){ + parent::__construct($AppName, $request); + $this->appVersion = $config->getAppValue('gpxedit', 'installed_version'); + $this->appPath = \OC_App::getAppPath('gpxedit'); + $this->userId = $UserId; + $this->dbtype = $config->getSystemValue('dbtype'); + // IConfig object + $this->config = $config; + + if ($this->dbtype === 'pgsql'){ + $this->dbdblquotes = '"'; + } + else{ + $this->dbdblquotes = ''; + } + if ($UserId !== '' and $userfolder !== null){ + // path of user files folder relative to DATA folder + $this->userfolder = $userfolder; + // absolute path to user files folder + $this->userAbsoluteDataPath = + $this->config->getSystemValue('datadirectory'). + rtrim($this->userfolder->getFullPath(''), '/'); + + // make cache if it does not exist + $cachedirpath = $this->userAbsoluteDataPath.'/../cache'; + if (! is_dir($cachedirpath)){ + mkdir($cachedirpath); + } + + $this->dbconnection = \OC::$server->getDatabaseConnection(); + } + //$this->shareManager = \OC::$server->getShareManager(); + $this->shareManager = $shareManager; + } + + /** + * Welcome page. + * @NoAdminRequired + * @NoCSRFRequired + */ + public function index() { + $userFolder = \OC::$server->getUserFolder(); + $userfolder_path = $userFolder->getPath(); + + // DIRS array population + $all = $userFolder->search(".gpx"); + $alldirs = Array(); + foreach($all as $file){ + if ($file->getType() === \OCP\Files\FileInfo::TYPE_FILE and + ( + endswith($file->getName(), '.gpx') or + endswith($file->getName(), '.GPX') + ) + ){ + $rel_dir = str_replace($userfolder_path, '', dirname($file->getPath())); + $rel_dir = str_replace('//', '/', $rel_dir); + if ($rel_dir === ''){ + $rel_dir = '/'; + } + if (!in_array($rel_dir, $alldirs)){ + array_push($alldirs, $rel_dir); + } + } + } + + // PARAMS to view + + sort($alldirs); + $params = [ + 'dirs'=>$alldirs, + 'username'=>$this->userId, + 'gpxedit_version'=>$this->appVersion + ]; + $response = new TemplateResponse('gpxedit', 'main', $params); + $csp = new ContentSecurityPolicy(); + $csp->addAllowedImageDomain('*') + ->addAllowedMediaDomain('*') + ->addAllowedChildSrcDomain('*') + ->addAllowedObjectDomain('*') + ->addAllowedScriptDomain('*') + //->allowEvalScript('*') + ->addAllowedConnectDomain('*'); + $response->setContentSecurityPolicy($csp); + return $response; + } + +} diff --git a/css/Control.Geocoder.css b/css/Control.Geocoder.css new file mode 100644 index 0000000..244df5e --- /dev/null +++ b/css/Control.Geocoder.css @@ -0,0 +1,144 @@ +.leaflet-control-geocoder { + background: white; + box-shadow: 0 1px 7px rgba(0,0,0,0.65); + -webkit-border-radius: 4px; + border-radius: 4px; + line-height: 26px; + overflow: hidden; +} + +.leaflet-touch .leaflet-control-geocoder { + box-shadow: none; + border: 2px solid rgba(0,0,0,0.2); + background-clip: padding-box; + line-height: 30px; +} + +.leaflet-control-geocoder-form { + display: none; +} + +.leaflet-control-geocoder-expanded .leaflet-control-geocoder-form { + display: inline; +} + +.leaflet-control-geocoder-form input, .leaflet-control-geocoder-form ul, .leaflet-control-geocoder-error { + border: 0; + color: transparent; + background: white; +} + +.leaflet-control-geocoder-form input { + font-size: 16px; + width: 0; + transition: width 0.125s ease-in; +} + +.leaflet-touch .leaflet-control-geocoder-form input { + font-size: 22px; +} + +.leaflet-control-geocoder-icon { + width: 26px; + height: 26px; + background-image: url(./images/geocoder.png); + background-repeat: no-repeat; + background-position: center; + float: right; + cursor: pointer; +} + +.leaflet-touch .leaflet-control-geocoder-icon { + margin-top: 2px; + width: 30px; +} + +.leaflet-control-geocoder-throbber .leaflet-control-geocoder-icon { + background-image: url(./images/throbber.gif); +} + +.leaflet-control-geocoder-expanded input, .leaflet-control-geocoder-error { + width: 226px; + margin: 0 0 0 4px; + padding: 0 0 0 4px; + vertical-align: middle; + color: #000; +} + +.leaflet-control-geocoder-form input:focus { + outline: none; +} + +.leaflet-control-geocoder-form button { + display: none; +} + +.leaflet-control-geocoder-form-no-error { + display: none; +} + +.leaflet-control-geocoder-error { + margin-top: 8px; + display: block; + color: #444; +} + +ul.leaflet-control-geocoder-alternatives { + width: 260px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + list-style: none; + padding: 0; + transition: height 0.125s ease-in; +} + +.leaflet-control-geocoder-alternatives-minimized { + width: 0 !important; + height: 0; + overflow: hidden; + margin: 0; + padding: 0; +} + +.leaflet-control-geocoder-alternatives li { + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + border-bottom: 1px solid #eee; + padding: 0; +} + + +.leaflet-control-geocoder-alternatives li:last-child { + border-bottom: none; +} + +.leaflet-control-geocoder-alternatives a { + display: block; + text-decoration: none; + color: black; + padding: 6px 8px 16px 6px; + font-size: 14px; + line-height: 1; + font-weight: bold; +} + +.leaflet-touch .leaflet-control-geocoder-alternatives a { + font-size: 18px; +} + +.leaflet-control-geocoder-alternatives a:hover, .leaflet-control-geocoder-selected { + background-color: #ddd; +} + +.leaflet-control-geocoder-address-detail { + font-size: 12px; + font-weight: normal; +} + +.leaflet-control-geocoder-address-context { + color: #666; + font-size: 12px; + font-weight: lighter; +} diff --git a/css/Control.MiniMap.css b/css/Control.MiniMap.css new file mode 100644 index 0000000..666047c --- /dev/null +++ b/css/Control.MiniMap.css @@ -0,0 +1,88 @@ +.leaflet-control-minimap { + border:solid rgba(255, 255, 255, 1.0) 4px; + box-shadow: 0 1px 5px rgba(0,0,0,0.65); + border-radius: 3px; + background: #f8f8f9; + transition: all .6s; +} + +.leaflet-control-minimap a { + background-color: rgba(255, 255, 255, 1.0); + background-repeat: no-repeat; + z-index: 99999; + transition: all .6s; +} + +.leaflet-control-minimap a.minimized-bottomright { + -webkit-transform: rotate(180deg); + transform: rotate(180deg); + border-radius: 0px; +} + +.leaflet-control-minimap a.minimized-topleft { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + border-radius: 0px; +} + +.leaflet-control-minimap a.minimized-bottomleft { + -webkit-transform: rotate(270deg); + transform: rotate(270deg); + border-radius: 0px; +} + +.leaflet-control-minimap a.minimized-topright { + -webkit-transform: rotate(90deg); + transform: rotate(90deg); + border-radius: 0px; +} + +.leaflet-control-minimap-toggle-display{ + background-image: url("images/toggle.svg"); + background-size: cover; + position: absolute; + border-radius: 3px 0px 0px 0px; +} + +.leaflet-oldie .leaflet-control-minimap-toggle-display{ + background-image: url("images/toggle.png"); +} + +.leaflet-control-minimap-toggle-display-bottomright { + bottom: 0; + right: 0; +} + +.leaflet-control-minimap-toggle-display-topleft{ + top: 0; + left: 0; + -webkit-transform: rotate(180deg); + transform: rotate(180deg); +} + +.leaflet-control-minimap-toggle-display-bottomleft{ + bottom: 0; + left: 0; + -webkit-transform: rotate(90deg); + transform: rotate(90deg); +} + +.leaflet-control-minimap-toggle-display-topright{ + top: 0; + right: 0; + -webkit-transform: rotate(270deg); + transform: rotate(270deg); +} + +/* Old IE */ +.leaflet-oldie .leaflet-control-minimap { + border: 1px solid #999; +} + +.leaflet-oldie .leaflet-control-minimap a { + background-color: #fff; +} + +.leaflet-oldie .leaflet-control-minimap a.minimized { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); +} diff --git a/css/L.Control.Locate.min.css b/css/L.Control.Locate.min.css new file mode 100644 index 0000000..d923316 --- /dev/null +++ b/css/L.Control.Locate.min.css @@ -0,0 +1,5 @@ +/*! Version: 0.42.0 +Date: 2015-04-29 */ + +.leaflet-touch .leaflet-bar-part-single{-webkit-border-radius:7px 7px 7px 7px;border-radius:7px 7px 7px 7px;border-bottom:none}.leaflet-touch .leaflet-control-locate{box-shadow:none;border:2px solid rgba(0,0,0,0.2);background-clip:padding-box}.leaflet-control-locate a{font-size:1.4em;margin-left:1px;color:#444}.leaflet-control-locate.active a{color:#2074B6}.leaflet-control-locate.active.following a{color:#FC8428} +/*# sourceMappingURL=L.Control.Locate.min.css.map */ diff --git a/css/L.Control.MousePosition.css b/css/L.Control.MousePosition.css new file mode 100644 index 0000000..71e09a2 --- /dev/null +++ b/css/L.Control.MousePosition.css @@ -0,0 +1,9 @@ +.leaflet-container .leaflet-control-mouseposition { + background-color: rgba(255, 255, 255, 0.7); + box-shadow: 0 0 5px #bbb; + padding: 0 5px; + margin:0; + color: #333; + font: 11px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; +} + diff --git a/css/colorbox.css b/css/colorbox.css new file mode 100644 index 0000000..0bf753f --- /dev/null +++ b/css/colorbox.css @@ -0,0 +1,45 @@ +/* + Colorbox Core Style: + The following CSS is consistent between example themes and should not be altered. +*/ +#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden; -webkit-transform: translate3d(0,0,0);} +#cboxWrapper {max-width:none;} +#cboxOverlay{position:fixed; width:100%; height:100%;} +#cboxMiddleLeft, #cboxBottomLeft{clear:left;} +#cboxContent{position:relative;} +#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;} +#cboxTitle{margin:0;} +#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;} +#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;} +.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;} +.cboxIframe{width:100%; height:100%; display:block; border:0; padding:0; margin:0;} +#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;} + +/* + User Style: + Change the following styles to modify the appearance of Colorbox. They are + ordered & tabbed in a way that represents the nesting of the generated HTML. +*/ +#cboxOverlay{background:#000; opacity: 0.9; filter: alpha(opacity = 90);} +#colorbox{outline:0;} + #cboxContent{margin-top:20px;background:#000;} + .cboxIframe{background:#fff;} + #cboxError{padding:50px; border:1px solid #ccc;} + #cboxLoadedContent{border:5px solid #000; background:#fff;} + #cboxTitle{position:absolute; top:-20px; left:0; color:#ccc;} + #cboxCurrent{position:absolute; top:-20px; right:0px; color:#ccc;} + #cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;} + + /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */ + #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; } + + /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */ + #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;} + + #cboxSlideshow{position:absolute; top:-20px; right:90px; color:#fff;} + #cboxPrevious{position:absolute; top:50%; left:5px; margin-top:-32px; background:url(images/controls.png) no-repeat top left; width:28px; height:65px; text-indent:-9999px;} + #cboxPrevious:hover{background-position:bottom left;} + #cboxNext{position:absolute; top:50%; right:5px; margin-top:-32px; background:url(images/controls.png) no-repeat top right; width:28px; height:65px; text-indent:-9999px;} + #cboxNext:hover{background-position:bottom right;} + #cboxClose{position:absolute; top:5px; right:5px; display:block; background:url(images/controls.png) no-repeat top center; width:38px; height:19px; text-indent:-9999px;} + #cboxClose:hover{background-position:bottom center;} diff --git a/css/font-awesome.min.css b/css/font-awesome.min.css new file mode 100644 index 0000000..3f942ff --- /dev/null +++ b/css/font-awesome.min.css @@ -0,0 +1,4 @@ +/*! + * Font Awesome 4.6.3 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:'FontAwesome';src:url('./fontawesome-webfont.eot?v=4.6.3');src:url('./fontawesome-webfont.eot?#iefix&v=4.6.3') format('embedded-opentype'),url('./fontawesome-webfont.woff2?v=4.6.3') format('woff2'),url('./fontawesome-webfont.woff?v=4.6.3') format('woff'),url('./fontawesome-webfont.ttf?v=4.6.3') format('truetype'),url('./fontawesome-webfont.svg?v=4.6.3#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto} diff --git a/css/fontawesome-webfont.ttf b/css/fontawesome-webfont.ttf new file mode 100644 index 0000000..f221e50 Binary files /dev/null and b/css/fontawesome-webfont.ttf differ diff --git a/css/fontawesome-webfont.woff b/css/fontawesome-webfont.woff new file mode 100644 index 0000000..6e7483c Binary files /dev/null and b/css/fontawesome-webfont.woff differ diff --git a/css/fontawesome-webfont.woff2 b/css/fontawesome-webfont.woff2 new file mode 100644 index 0000000..7eb74fd Binary files /dev/null and b/css/fontawesome-webfont.woff2 differ diff --git a/css/gpxedit.css b/css/gpxedit.css new file mode 100644 index 0000000..4049e09 --- /dev/null +++ b/css/gpxedit.css @@ -0,0 +1,489 @@ +html { + min-height: 100%; + position: relative; +} + +body { + margin: 0; + width: 100%; + height: 100%; +} + +div#map { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + width:100%; + /*width: calc(100% - 300px);*/ +} + +div.trackcol{ + width:100px; +} + +div.durationcol{ + max-width:50px; +} + +#gpxtable a.permalink , #gpxtable a.csrtm , #gpxtable a.csrtms{ + float: right; + font-size: 11px; + margin-left: 2px; + margin-right: 2px; +} + +div#logo, div#logo img { + height:80px; +} +div#logo div{ + position:absolute; + bottom:0; + width:100%; +} +div#logo div p{ + width:100%; + text-align:center; + float:right; + font-size:10px; +} +div#logo{ + position:relative; +} +div#logo p{ + margin-top: 0px; + margin-bottom: 0px; +} +div#logo { + background-image: url('images/gpxpod.png'); + width: 65px; + background-size: 65px 65px; + background-repeat: no-repeat; + margin-left: 15px; +} + + +#folderrightdiv, #waypointstyle, #comparebutton, #optionbuttonsdiv, #folderdiv, #tzselect, #trackwaypointdisplay, +#astlegend, #picturestylediv{ + float:right; + display:block; +} + +#picturestyleselect{ + max-width: 90px; +} + +#folderrightdiv, #removeelevation, #comparebutton, #optionbuttonsdiv{ + font-size: 11px; +} + +#optionbuttonsdiv{ + max-width: 60%; +} +#optioncheckdiv{ + max-width: 40%; + font-size: 11px; +} +#folderdiv, #scantypediv{ + max-width: 80%; +} + +#tzselect{ + max-width:200px; +} + +#titlechoosedirform, #logo, #optioncheckdiv, #computecheckdiv{ + float:left; + display:block; +} +#folderrightdiv { + /*max-width:60%; + margin-top: 12px;*/ +} +#scantypediv{ + float:right; +} +#logo { + max-width:40%; +} + +#optionbuttonsdiv{ + border-left:solid 1px; +} + +#titlechoosedirform{ + font-size: 16px; + font-weight: bold; +} +h1.sectiontitle{ + font-size: 18px; + font-weight: bold; +} +h3.sectiontitle{ + font-size: 16px; + font-weight: bold; +} +div#settings h1, div#help h1{ + /*margin-left:30px;*/ + text-align:center; +} + +ul,hr { + margin-top : 3px; + margin-bottom : 3px; +} +h3 { + margin-top : 5px; + margin-bottom : 5px; +} + +.transparent { + opacity : 0.6; +} + +.uibutton { + font-size: 13px; + height : 28px; +} + +#filterlist li input{ + margin-bottom: 10px; + width:100px; +} + +#filterlist li b{ + margin-bottom: 10px; +} + +#filterlist li .ui-spinner { + height:28px; + margin-bottom: 5px; + margin-top: 5px; +} + +#clearfilter{ + margin-left:10px; +} +.filterbutton{ + float:right; +} + +#filtertabtitle h1{ + float:left; + margin-left:30px; +} +#filtertabtitle h3{ + float:left; +} + +#gpxtable{ + word-wrap: break-word; + border-radius: 7px; +} +#gpxtable tr:first-child th:first-child +{ + border-top-left-radius: 7px; +} +#gpxtable tr:first-child th:last-child +{ + border-top-right-radius: 7px; +} +#gpxtable tr:last-child td:first-child +{ + border-bottom-left-radius: 7px; +} +#gpxtable tr:last-child td:last-child +{ + border-bottom-right-radius: 7px; +} + +#gpxtable th, #gpxtable td { + border: 1px solid grey; +} +#gpxtable td { + background-color: white; +} + +.activeArea{ + position: absolute; + top: 10px; + left: 450px; + right: 10px; + bottom: 10px; +} + +#settings{ + color:black; +} +.disclist{ + margin-left:20px; + list-style-type:disc; +} +.circlist{ + margin-left:20px; + list-style-type:circle; +} +#loading, #loadingmarkers, #deleting { + /*width: 330px;*/ + padding-left: 5px; + /*height: 35px;*/ + text-align: right; + font-weight: bold; + font-size: 22px; + color: white; + background-color: #0074D9; + background-size: 30px 30px; + background-repeat: no-repeat; + background-position: 3% 50%; + border-radius: 7px; + /*float: right;*/ + position:fixed; + left:60px; + top:60px; + display:none; + /*z-index: 1000;*/ +} +#loading .fa, #loadingmarkers .fa, #deleting .fa { + font-size: 22px; +} + +#loadingmarkers { + background-color: green; +} + +#loading p, #loadingmarkers p, #deleting p{ + padding: 6px 6px 6px 6px; +} +.clear { + clear:both; +} +#nofolder { + font-size: 16px; + font-weight: bold; + color:red; +} +#nofoldertext ,#nofolder { + float:left; + clear:both; +} +#nofoldertext{ + color:blue; +} +#subfolderselect, #processtypeselect, #tablecriteriasel { + max-width:200px; + text-overflow:ellipsis; +} +/*#ticv { + display:none; +}*/ + +.spinning { + -moz-animation:spin 0.7s linear infinite; + -webkit-animation:spin 0.7s linear infinite; + animation:spin 0.7s linear infinite; +} + +@-moz-keyframes spin { 100% { -moz-transform: rotate(360deg); } } +@-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); } } +@keyframes spin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } } + +/*#tablecriterialabel{ + float:left; +} +#tablecriteriasel{ + float:right; +} +*/ +#colorcriteriadiv{ + float:right; +} + +.toplink:link { + color: blue; + text-decoration: underline; +} +.toplink:visited { + color: blue; + text-decoration: underline; +} +.toplink:hover { + color: hotpink; + text-decoration: underline; +} +.toplink:active { + color: green; + text-decoration: underline; +} +#clean_results{ + word-wrap:break-word; +} +#clean_results ul{ + list-style-type:disc; +} +#tileserveradd, #tileserveradd input{ + width:100%; +} + +#gpxtable thead i.bigfa{ + width: 100%; + text-align: center; + font-size:19px; +} +.permalink:link { + color: black; + text-decoration: underline; +} +.permalink:visited { + color: black; + text-decoration: underline; +} +.permalink:hover { + color: hotpink; + text-decoration: underline; +} +.permalink:active { + color: green; + text-decoration: underline; +} +#folderdiv .permalink{ + font-size:16px; +} +.popuptable{ + font-size: 10px; + border-collapse: collapse; + word-wrap: break-word; + white-space: normal; + width: 250px; + margin: auto; +} +.popuptable td{ + border: 1px solid black; + padding: 0px 5px 0px 5px; +} +.popuptable tr:nth-child(even){background-color: #f2f2f2;} +.popuptable tr:hover {background-color: #ddd;} + +#linkinput { + width:98%; +} +#optiontitle{ + width:100%; + float:left; + cursor: pointer; +} + +/* adapt right leaflet controls when sidebar pushes them */ +@media screen and (max-width: 767px) { + .leaflet-right { right:40px; } +} + +input[type=checkbox] +{ + /* Double-sized Checkboxes */ + -ms-transform: scale(1.5); /* IE */ + -moz-transform: scale(1.5); /* FF */ + -webkit-transform: scale(1.5); /* Safari and Chrome */ + -o-transform: scale(1.5); /* Opera */ + padding: 10px; +} + +.tooltipblue{ + background: rgba(0, 0, 255, 0.4); + color: white; + font-weight: bold; +} +.tooltipred{ + background: rgba(255, 0, 0, 0.4); + color: white; + font-weight: bold; +} +.tooltipcyan{ + background: rgba(0, 255, 255, 0.4); + color: black; + font-weight: bold; +} +.tooltippurple{ + background: rgba(128, 0, 128, 0.4); + color: white; + font-weight: bold; +} +.tooltipLime{ + background: rgba(0, 255, 0, 0.4); + color: black; + font-weight: bold; +} +.tooltipyellow{ + background: rgba(255, 255, 0, 0.4); + color: black; + font-weight: bold; +} +.tooltipblack{ + background: rgba(0, 0, 0, 0.4); + color: white; + font-weight: bold; +} +.tooltiporange{ + background: rgba(255, 165, 0, 0.4); + color: black; + font-weight: bold; +} +.tooltipbrown{ + background: rgba(165, 42, 42, 0.4); + color: white; + font-weight: bold; +} +.tooltipChartreuse{ + background: rgba(127, 255, 0, 0.4); + color: black; + font-weight: bold; +} +.tooltipCrimson{ + background: rgba(220, 20, 60, 0.4); + color: white; + font-weight: bold; +} +.tooltipDeepPink{ + background: rgba(255, 20, 147, 0.4); + color: white; + font-weight: bold; +} +.tooltipGold{ + background: rgba(255, 215, 0, 0.4); + color: black; + font-weight: bold; +} + +.leaflet-div-icon2 +{ + background-image: url('images/pinblue.png') !important; + width: 21px !important; + height: 30px !important; +} + +.leaflet-marker-red +{ + background-image: url('images/marker-icon-red.png'); + width: 25px !important; + height: 41px !important; +} + +.popupImage{ + width: 80px; + height: 80px; +} + +.leaflet-popup-content{ + margin: 4px 4px; +} + +.smallRedMarker{ + background: rgba(255,0,0,1); + border: 1px solid black; +} +.trackNamesList{ + list-style-type:disc; + text-align: center; + margin-left: 10px; + margin-right: 10px; +} diff --git a/css/gpxvcomp.css b/css/gpxvcomp.css new file mode 100644 index 0000000..9d3e982 --- /dev/null +++ b/css/gpxvcomp.css @@ -0,0 +1,125 @@ +html { + min-height: 100%; + position: relative; +} + +body { + margin: 0; + width: 100%; + height: 100%; +} + +div#map { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + width: 100%; +} + +div#parameters { + font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; + color: black; + font-size: 75%; + background-color: white; + position: absolute; + top: 0px; + right: 0px; + width: 300px; + height: 100%; + padding: 10px; + z-index: 5; +} + +#gpxselect { + width:100%; +} + +div#logo, div#logo img { + height:100px; +} +div#logo { + background-image: url('images/gpxvcomp.png'); + width: 125px; + background-size: 125px 100px; + background-repeat: no-repeat; + margin: auto; +} +h1.sectiontitle{ + font-size: 18px; + font-weight: bold; +} +h3.sectiontitle{ + font-size: 16px; + font-weight: bold; +} + +ul,hr { + margin-top : 3px; + margin-bottom : 3px; +} +h3 { + margin-top : 5px; + margin-bottom : 5px; +} + +.uibutton { + font-size: 13px; + height : 28px; +} +#help ul, .trackpairlist{ + list-style-type:disc; +} +.activeArea{ + position: absolute; + top: 10px; + left: 450px; + right: 10px; + bottom: 10px; +} + +#stattable{ + word-wrap: break-word; + white-space: normal; + border-radius: 7px; +} +#stattable tr:first-child th:first-child +{ + border-top-left-radius: 7px; +} +#stattable tr:first-child th:last-child +{ + border-top-right-radius: 7px; +} +#stattable tr:last-child td:first-child +{ + border-bottom-left-radius: 7px; +} +#stattable tr:last-child td:last-child +{ + border-bottom-right-radius: 7px; +} + +#stattable th, #stattable td { + border: 1px solid grey; + max-width: 100px; +} + +div#statdiv{ + overflow:scroll; +} +#stattable td.normal{ + background-color: white; +} +td.selectedColumn{ + background-color: #FFE464; +} +#stattable td.statnamecol { + background-color: #E6EEEE; +} + +/* adapt right leaflet controls when sidebar pushes them */ +@media screen and (max-width: 767px) { + .leaflet-right { right:40px; } +} diff --git a/css/images/controls.png b/css/images/controls.png new file mode 100644 index 0000000..e1e9798 Binary files /dev/null and b/css/images/controls.png differ diff --git a/css/images/geocoder.png b/css/images/geocoder.png new file mode 100644 index 0000000..246bbe7 Binary files /dev/null and b/css/images/geocoder.png differ diff --git a/css/images/gpxpod.ico b/css/images/gpxpod.ico new file mode 100644 index 0000000..9a75db7 Binary files /dev/null and b/css/images/gpxpod.ico differ diff --git a/css/images/gpxpod.png b/css/images/gpxpod.png new file mode 100644 index 0000000..8f4d542 Binary files /dev/null and b/css/images/gpxpod.png differ diff --git a/css/images/gpxvcomp.png b/css/images/gpxvcomp.png new file mode 100644 index 0000000..3df694f Binary files /dev/null and b/css/images/gpxvcomp.png differ diff --git a/css/images/layers-2x.png b/css/images/layers-2x.png new file mode 100644 index 0000000..200c333 Binary files /dev/null and b/css/images/layers-2x.png differ diff --git a/css/images/layers.png b/css/images/layers.png new file mode 100644 index 0000000..1a72e57 Binary files /dev/null and b/css/images/layers.png differ diff --git a/css/images/loading.gif b/css/images/loading.gif new file mode 100644 index 0000000..a32df5c Binary files /dev/null and b/css/images/loading.gif differ diff --git a/css/images/marker-icon-2x.png b/css/images/marker-icon-2x.png new file mode 100644 index 0000000..e4abba3 Binary files /dev/null and b/css/images/marker-icon-2x.png differ diff --git a/css/images/marker-icon-red.png b/css/images/marker-icon-red.png new file mode 100644 index 0000000..07fdaaf Binary files /dev/null and b/css/images/marker-icon-red.png differ diff --git a/css/images/marker-icon.png b/css/images/marker-icon.png new file mode 100644 index 0000000..950edf2 Binary files /dev/null and b/css/images/marker-icon.png differ diff --git a/css/images/marker-shadow.png b/css/images/marker-shadow.png new file mode 100644 index 0000000..9fd2979 Binary files /dev/null and b/css/images/marker-shadow.png differ diff --git a/css/images/measure-control.png b/css/images/measure-control.png new file mode 100644 index 0000000..b88e8e4 Binary files /dev/null and b/css/images/measure-control.png differ diff --git a/css/images/pinblue.png b/css/images/pinblue.png new file mode 100644 index 0000000..56194f4 Binary files /dev/null and b/css/images/pinblue.png differ diff --git a/css/images/spritesheet-2x.png b/css/images/spritesheet-2x.png new file mode 100644 index 0000000..1525c9f Binary files /dev/null and b/css/images/spritesheet-2x.png differ diff --git a/css/images/spritesheet.png b/css/images/spritesheet.png new file mode 100644 index 0000000..f7035a1 Binary files /dev/null and b/css/images/spritesheet.png differ diff --git a/css/images/spritesheet.svg b/css/images/spritesheet.svg new file mode 100644 index 0000000..5423793 --- /dev/null +++ b/css/images/spritesheet.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/css/images/throbber.gif b/css/images/throbber.gif new file mode 100644 index 0000000..c0c52a0 Binary files /dev/null and b/css/images/throbber.gif differ diff --git a/css/images/toggle.png b/css/images/toggle.png new file mode 100644 index 0000000..7a55db4 Binary files /dev/null and b/css/images/toggle.png differ diff --git a/css/images/toggle.svg b/css/images/toggle.svg new file mode 100644 index 0000000..e829952 --- /dev/null +++ b/css/images/toggle.svg @@ -0,0 +1,224 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/css/images/tux.jpg b/css/images/tux.jpg new file mode 100644 index 0000000..04f0f3d Binary files /dev/null and b/css/images/tux.jpg differ diff --git a/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png new file mode 100644 index 0000000..ed79373 Binary files /dev/null and b/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png differ diff --git a/css/images/ui-bg_diagonals-thick_20_666666_40x40.png b/css/images/ui-bg_diagonals-thick_20_666666_40x40.png new file mode 100644 index 0000000..337d9ed Binary files /dev/null and b/css/images/ui-bg_diagonals-thick_20_666666_40x40.png differ diff --git a/css/images/ui-bg_flat_10_000000_40x100.png b/css/images/ui-bg_flat_10_000000_40x100.png new file mode 100644 index 0000000..2fd24e2 Binary files /dev/null and b/css/images/ui-bg_flat_10_000000_40x100.png differ diff --git a/css/images/ui-bg_glass_100_f6f6f6_1x400.png b/css/images/ui-bg_glass_100_f6f6f6_1x400.png new file mode 100644 index 0000000..0fccfbc Binary files /dev/null and b/css/images/ui-bg_glass_100_f6f6f6_1x400.png differ diff --git a/css/images/ui-bg_glass_100_fdf5ce_1x400.png b/css/images/ui-bg_glass_100_fdf5ce_1x400.png new file mode 100644 index 0000000..d789996 Binary files /dev/null and b/css/images/ui-bg_glass_100_fdf5ce_1x400.png differ diff --git a/css/images/ui-bg_glass_65_ffffff_1x400.png b/css/images/ui-bg_glass_65_ffffff_1x400.png new file mode 100644 index 0000000..3945b3e Binary files /dev/null and b/css/images/ui-bg_glass_65_ffffff_1x400.png differ diff --git a/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png b/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png new file mode 100644 index 0000000..06a7321 Binary files /dev/null and b/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png differ diff --git a/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png b/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png new file mode 100644 index 0000000..2561545 Binary files /dev/null and b/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png differ diff --git a/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png b/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png new file mode 100644 index 0000000..367be20 Binary files /dev/null and b/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png differ diff --git a/css/images/ui-icons_222222_256x240.png b/css/images/ui-icons_222222_256x240.png new file mode 100644 index 0000000..82fad68 Binary files /dev/null and b/css/images/ui-icons_222222_256x240.png differ diff --git a/css/images/ui-icons_228ef1_256x240.png b/css/images/ui-icons_228ef1_256x240.png new file mode 100644 index 0000000..0c554ac Binary files /dev/null and b/css/images/ui-icons_228ef1_256x240.png differ diff --git a/css/images/ui-icons_ef8c08_256x240.png b/css/images/ui-icons_ef8c08_256x240.png new file mode 100644 index 0000000..d76d10a Binary files /dev/null and b/css/images/ui-icons_ef8c08_256x240.png differ diff --git a/css/images/ui-icons_ffd27a_256x240.png b/css/images/ui-icons_ffd27a_256x240.png new file mode 100644 index 0000000..5e9d27a Binary files /dev/null and b/css/images/ui-icons_ffd27a_256x240.png differ diff --git a/css/images/ui-icons_ffffff_256x240.png b/css/images/ui-icons_ffffff_256x240.png new file mode 100644 index 0000000..cd6c265 Binary files /dev/null and b/css/images/ui-icons_ffffff_256x240.png differ diff --git a/css/jquery-ui.min.css b/css/jquery-ui.min.css new file mode 100644 index 0000000..efccc47 --- /dev/null +++ b/css/jquery-ui.min.css @@ -0,0 +1,7 @@ +/*! jQuery UI - v1.11.4 - 2015-03-11 +* http://jqueryui.com +* Includes: core.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, draggable.css, menu.css, progressbar.css, resizable.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=gloss_wave&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=highlight_soft&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=glass&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=diagonals_thick&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=diagonals_thick&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=flat&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px +* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ + +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:bold;line-height:1.5;padding:2px 0.4em;margin:0.5em 0 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-button{display:inline-block;overflow:hidden;position:relative;text-decoration:none;cursor:pointer}.ui-selectmenu-button span.ui-icon{right:0.5em;left:auto;margin-top:-8px;position:absolute;top:50%}.ui-selectmenu-button span.ui-selectmenu-text{text-align:left;padding:0.4em 2.1em 0.4em 1em;display:block;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #ddd;background:#eee url("images/ui-bg_highlight-soft_100_eeeeee_1x100.png") 50% top repeat-x;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #e78f08;background:#f6a828 url("images/ui-bg_gloss-wave_35_f6a828_500x100.png") 50% 50% repeat-x;color:#fff;font-weight:bold}.ui-widget-header a{color:#fff}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #ccc;background:#f6f6f6 url("images/ui-bg_glass_100_f6f6f6_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#1c94c4}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#1c94c4;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #fbcb09;background:#fdf5ce url("images/ui-bg_glass_100_fdf5ce_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#c77405}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#c77405;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #fbd850;background:#fff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#eb8f00}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#eb8f00;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fed22f;background:#ffe45c url("images/ui-bg_highlight-soft_75_ffe45c_1x100.png") 50% top repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#b81900 url("images/ui-bg_diagonals-thick_18_b81900_40x40.png") 50% 50% repeat;color:#fff}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#fff}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#fff}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_ffffff_256x240.png")}.ui-state-default .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-active .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("images/ui-icons_228ef1_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_ffd27a_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#666 url("images/ui-bg_diagonals-thick_20_666666_40x40.png") 50% 50% repeat;opacity:.5;filter:Alpha(Opacity=50)}.ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url("images/ui-bg_flat_10_000000_40x100.png") 50% 50% repeat-x;opacity:.2;filter:Alpha(Opacity=20);border-radius:5px} \ No newline at end of file diff --git a/css/leaflet-sidebar.css b/css/leaflet-sidebar.css new file mode 100644 index 0000000..d7d2b90 --- /dev/null +++ b/css/leaflet-sidebar.css @@ -0,0 +1,117 @@ +.sidebar { + position: absolute; + left: 0; + top: 0; + bottom: 0; + width: 100%; + overflow: hidden; + z-index: 1100; } + .sidebar.collapsed { + width: 40px; } + @media (min-width: 768px) { + .sidebar { + left: 10px; + top: 10px; + bottom: 10px; + transition: width 500ms; } } + @media (min-width: 768px) and (max-width: 991px) { + .sidebar { + width: 305px; } } + @media (min-width: 992px) and (max-width: 1199px) { + .sidebar { + width: 390px; } } + @media (min-width: 1200px) { + .sidebar { + width: 460px; } } + +.sidebar-tabs { + position: absolute; + top: 0; + bottom: 0; + width: 40px; + height: 100%; + margin: 0; + padding: 0; + background-color: #fff; } + .sidebar-tabs > li { + width: 100%; + height: 40px; + color: #333; + font-size: 12pt; + overflow: hidden; + transition: all 80ms; } + .sidebar-tabs > li:hover { + color: #000; + background-color: #eee; } + .sidebar-tabs > li.active { + color: #fff; + background-color: #0074d9; } + .sidebar-tabs > li > a { + display: block; + width: 100%; + height: 100%; + line-height: 40px; + color: inherit; + text-decoration: none; + text-align: center; } + +.sidebar-content { + position: absolute; + left: 40px; + right: 0; + top: 0; + bottom: 0; + background-color: rgba(255, 255, 255, 0.95); + overflow-x: hidden; + overflow-y: auto; } + +.sidebar-pane { + display: none; + right: 0; + box-sizing: border-box; + padding: 10px 20px; } + .sidebar-pane.active { + display: block; } + @media (min-width: 768px) and (max-width: 991px) { + .sidebar-pane { + width: 265px; } } + @media (min-width: 992px) and (max-width: 1199px) { + .sidebar-pane { + width: 350px; } } + @media (min-width: 1200px) { + .sidebar-pane { + width: 420px; } } + +.sidebar-map { + margin-left: 40px; } + @media (min-width: 768px) { + .sidebar-map { + margin-left: 0; } } + +.sidebar { + box-shadow: 0 1px 5px rgba(0, 0, 0, 0.65); } + .sidebar.leaflet-touch { + box-shadow: none; + border-right: 2px solid rgba(0, 0, 0, 0.2); } + @media (min-width: 768px) { + .sidebar { + border-radius: 4px; } + .sidebar.leaflet-touch { + border: 2px solid rgba(0, 0, 0, 0.2); } + .sidebar.collapsed ~ .sidebar-map .leaflet-left { + left: 50px; } } + +@media (min-width: 768px) { + .sidebar-map .leaflet-left { + transition: left 500ms; } } +@media (min-width: 768px) and (max-width: 991px) { + .sidebar-map .leaflet-left { + left: 315px; } } +@media (min-width: 992px) and (max-width: 1199px) { + .sidebar-map .leaflet-left { + left: 400px; } } +@media (min-width: 1200px) { + .sidebar-map .leaflet-left { + left: 470px; } } + +/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJzY3NzL2xlYWZsZXQtc2lkZWJhci5zY3NzIiwic2Nzcy9fYmFzZS5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQ3NCQTtFQUNJLFVBQVU7RUFFVixNQUFNO0VBQ04sS0FBSztFQUNMLFFBQVE7RUFDUixPQXJCTztFQXVCUCxVQUFVO0VBRVYsU0F2QmM7RUF1QmxCLFFBQVE7SUFHQSxPQXZCRztFQTBCUDtJQWhCSjtNQWlCUSxNRHZDVTtNQ3dDVixLRHhDVTtNQ3lDVixRRHpDVTtNQzJDVixZQUFZO0VBR2hCO0lBeEJKO01BeUJRLE9BekNHO0VBNENQO0lBNUJKO01BNkJRLE9BOUNHO0VBaURQO0lBaENKO01BaUNRLE9BbkRHOztBQXVEWDtFQUNJLFVBQVU7RUFFVixLQUFLO0VBQ0wsUUFBUTtFQUVSLE9BckRPO0VBc0RQLFFBQVE7RUFFUixRQUFRO0VBQ1IsU0FBUztFQUVULGtCRGpFTTtFQ2lFVixnQkFBZ0I7SUFHUixPQUFPO0lBQ1AsUUEvREc7SUFpRUgsT0R4RUM7SUMyRUQsV0FuRVE7SUFxRVIsVUFBVTtJQUVWLFlBQVk7SUFBcEIsZ0JBQWdCLEVBQUU7TUFHTixPRGhGRztNQ2lGSCxrQkRoRkc7SUNpRmYsZ0JBQWdCLEVBQUU7TUFHTixPRG5GSTtNQ29GSixrQkRuRkk7SUNvRmhCLGdCQUFnQixLQUFLO01BR1QsU0FBUztNQUVULE9BQU87TUFDUCxRQUFRO01BRVIsYUExRkQ7TUE0RkMsT0FBTztNQUNQLGlCQUFpQjtNQUNqQixZQUFZOztBQUt4QjtFQUNJLFVBQVU7RUFFVixNQXRHTztFQXVHUCxPQUFPO0VBRVAsS0FBSztFQUNMLFFBQVE7RUFFUixrQkF2R1M7RUF5R1QsWUFBWTtFQUNaLFlBQVk7O0FBR2hCO0VBQ0ksU0FBUztFQUVULE9BQU87RUFDUCxZQUFZO0VBRVosU0FsSGM7RUFrSGxCLGFBQWE7SUFHTCxTQUFTO0VBR2I7SUFaSjtNQWFRLE9BQU87RUFHWDtJQWhCSjtNQWlCUSxPQUFPO0VBR1g7SUFwQko7TUFxQlEsT0FBTzs7QUFJZjtFQUVRLGFBN0lHO0VBK0lIO0lBSlI7TUFLWSxhQUFhOztBRDlJekI7RUFDSSxZQVphO0VBWWpCLFFBQVE7SUFHQSxZQUFZO0lBQ1osY0FqQmU7RUFvQm5CO0lBUko7TUFTUSxlQXRCZ0I7TUFzQnhCLFFBQVE7UUFHSSxRQXhCVztNQXlCdkIsUUFBUSxhQUFhLGFBQWE7UUFHdEIsTUFBTTs7QUFPZDtFQURKLGFBQWE7SUFFTCxZQUFZO0FBR2hCO0VBTEosYUFBYTtJQU1MLE1BQU07QUFHVjtFQVRKLGFBQWE7SUFVTCxNQUFNO0FBR1Y7RUFiSixhQUFhO0lBY0wsTUFBTSIsInNvdXJjZXNDb250ZW50IjpbIiRzaWRlYmFyLW1hcmdpbnM6IDEwcHg7XG4kc2lkZWJhci1ib3JkZXItcmFkaXVzOiA0cHg7XG4kc2lkZWJhci10b3VjaC1ib3JkZXI6IDJweCBzb2xpZCByZ2JhKDAsIDAsIDAsIDAuMik7XG4kc2lkZWJhci1zaGFkb3c6IDAgMXB4IDVweCByZ2JhKDAsIDAsIDAsIDAuNjUpO1xuXG4kdGFiLWZnOiAjMzMzO1xuJHRhYnMtYmc6ICNmZmY7XG4kdGFiLWhvdmVyLWZnOiAjMDAwO1xuJHRhYi1ob3Zlci1iZzogI2VlZTtcbiR0YWItYWN0aXZlLWZnOiAjZmZmO1xuJHRhYi1hY3RpdmUtYmc6ICMwMDc0ZDk7XG5cbkBpbXBvcnQgJ2Jhc2UnO1xuXG4uc2lkZWJhciB7XG4gICAgYm94LXNoYWRvdzogJHNpZGViYXItc2hhZG93O1xuXG4gICAgJi5sZWFmbGV0LXRvdWNoIHtcbiAgICAgICAgYm94LXNoYWRvdzogbm9uZTtcbiAgICAgICAgYm9yZGVyLXJpZ2h0OiAkc2lkZWJhci10b3VjaC1ib3JkZXI7XG4gICAgfVxuXG4gICAgQG1lZGlhKG1pbi13aWR0aDokdGhyZXNob2xkLXNtKSB7XG4gICAgICAgIGJvcmRlci1yYWRpdXM6ICRzaWRlYmFyLWJvcmRlci1yYWRpdXM7XG5cbiAgICAgICAgJi5sZWFmbGV0LXRvdWNoIHtcbiAgICAgICAgICAgIGJvcmRlcjogJHNpZGViYXItdG91Y2gtYm9yZGVyO1xuICAgICAgICB9XG5cbiAgICAgICAgJi5jb2xsYXBzZWQgfiAuc2lkZWJhci1tYXAgLmxlYWZsZXQtbGVmdCB7XG4gICAgICAgICAgICBsZWZ0OiAkdGFiLXNpemUgKyAkc2lkZWJhci1tYXJnaW5zO1xuICAgICAgICB9XG4gICAgfVxuXG59XG5cbi5zaWRlYmFyLW1hcCAubGVhZmxldC1sZWZ0IHtcbiAgICBAbWVkaWEobWluLXdpZHRoOiR0aHJlc2hvbGQtc20pIHtcbiAgICAgICAgdHJhbnNpdGlvbjogbGVmdCAkc2lkZWJhci10cmFuc2l0aW9uO1xuICAgIH1cblxuICAgIEBtZWRpYShtaW4td2lkdGg6JHRocmVzaG9sZC1zbSkgYW5kIChtYXgtd2lkdGg6JHRocmVzaG9sZC1tZCAtIDFweCkge1xuICAgICAgICBsZWZ0OiAkd2lkdGgtc20gKyAkc2lkZWJhci1tYXJnaW5zO1xuICAgIH1cblxuICAgIEBtZWRpYShtaW4td2lkdGg6JHRocmVzaG9sZC1tZCkgYW5kIChtYXgtd2lkdGg6JHRocmVzaG9sZC1sZyAtIDFweCkge1xuICAgICAgICBsZWZ0OiAkd2lkdGgtbWQgKyAkc2lkZWJhci1tYXJnaW5zO1xuICAgIH1cblxuICAgIEBtZWRpYShtaW4td2lkdGg6JHRocmVzaG9sZC1sZykge1xuICAgICAgICBsZWZ0OiAkd2lkdGgtbGcgKyAkc2lkZWJhci1tYXJnaW5zO1xuICAgIH1cbn1cbiIsIiR0aHJlc2hvbGQtbGc6IDEyMDBweDtcbiR0aHJlc2hvbGQtbWQ6IDk5MnB4O1xuJHRocmVzaG9sZC1zbTogNzY4cHg7XG5cbiR3aWR0aC1sZzogNDYwcHg7XG4kd2lkdGgtbWQ6IDM5MHB4O1xuJHdpZHRoLXNtOiAzMDVweDtcbiR3aWR0aC14czogMTAwJTtcblxuJHNpZGViYXItei1pbmRleDogMjAwMCAhZGVmYXVsdDtcbiRzaWRlYmFyLXRyYW5zaXRpb246IDUwMG1zICFkZWZhdWx0O1xuXG4kdGFiLXNpemU6IDQwcHggIWRlZmF1bHQ7XG4kdGFiLWZvbnQtc2l6ZTogMTJwdCAhZGVmYXVsdDtcbiR0YWItYmc6IG51bGwgIWRlZmF1bHQ7XG4kdGFiLXRyYW5zaXRpb246IDgwbXMgIWRlZmF1bHQ7XG5cbiRjb250ZW50LWJnOiByZ2JhKDI1NSwgMjU1LCAyNTUsIDAuOTUpICFkZWZhdWx0O1xuJGNvbnRlbnQtcGFkZGluZzogMTBweCAyMHB4ICFkZWZhdWx0O1xuXG4kbW92ZS1tYXAtaW4teHM6IHRydWUgIWRlZmF1bHQ7XG5cbi5zaWRlYmFyIHtcbiAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG5cbiAgICBsZWZ0OiAwO1xuICAgIHRvcDogMDtcbiAgICBib3R0b206IDA7XG4gICAgd2lkdGg6ICR3aWR0aC14cztcblxuICAgIG92ZXJmbG93OiBoaWRkZW47XG5cbiAgICB6LWluZGV4OiAkc2lkZWJhci16LWluZGV4O1xuXG4gICAgJi5jb2xsYXBzZWQge1xuICAgICAgICB3aWR0aDogJHRhYi1zaXplO1xuICAgIH1cblxuICAgIEBtZWRpYShtaW4td2lkdGg6JHRocmVzaG9sZC1zbSkge1xuICAgICAgICBsZWZ0OiAkc2lkZWJhci1tYXJnaW5zO1xuICAgICAgICB0b3A6ICRzaWRlYmFyLW1hcmdpbnM7XG4gICAgICAgIGJvdHRvbTogJHNpZGViYXItbWFyZ2lucztcblxuICAgICAgICB0cmFuc2l0aW9uOiB3aWR0aCAkc2lkZWJhci10cmFuc2l0aW9uO1xuICAgIH1cblxuICAgIEBtZWRpYShtaW4td2lkdGg6JHRocmVzaG9sZC1zbSkgYW5kIChtYXgtd2lkdGg6JHRocmVzaG9sZC1tZCAtIDFweCkge1xuICAgICAgICB3aWR0aDogJHdpZHRoLXNtO1xuICAgIH1cblxuICAgIEBtZWRpYShtaW4td2lkdGg6JHRocmVzaG9sZC1tZCkgYW5kIChtYXgtd2lkdGg6JHRocmVzaG9sZC1sZyAtIDFweCkge1xuICAgICAgICB3aWR0aDogJHdpZHRoLW1kO1xuICAgIH1cblxuICAgIEBtZWRpYShtaW4td2lkdGg6JHRocmVzaG9sZC1sZykge1xuICAgICAgICB3aWR0aDogJHdpZHRoLWxnO1xuICAgIH1cbn1cblxuLnNpZGViYXItdGFicyB7XG4gICAgcG9zaXRpb246IGFic29sdXRlO1xuXG4gICAgdG9wOiAwO1xuICAgIGJvdHRvbTogMDtcblxuICAgIHdpZHRoOiAkdGFiLXNpemU7XG4gICAgaGVpZ2h0OiAxMDAlO1xuXG4gICAgbWFyZ2luOiAwO1xuICAgIHBhZGRpbmc6IDA7XG5cbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiAkdGFicy1iZztcblxuICAgICYgPiBsaSB7XG4gICAgICAgIHdpZHRoOiAxMDAlO1xuICAgICAgICBoZWlnaHQ6ICR0YWItc2l6ZTtcblxuICAgICAgICBjb2xvcjogJHRhYi1mZztcbiAgICAgICAgQGlmICR0YWItYmcgeyBiYWNrZ3JvdW5kOiAkdGFiLWJnOyB9XG5cbiAgICAgICAgZm9udC1zaXplOiAkdGFiLWZvbnQtc2l6ZTtcblxuICAgICAgICBvdmVyZmxvdzogaGlkZGVuO1xuXG4gICAgICAgIHRyYW5zaXRpb246IGFsbCAkdGFiLXRyYW5zaXRpb247XG5cbiAgICAgICAgJjpob3ZlciB7XG4gICAgICAgICAgICBjb2xvcjogJHRhYi1ob3Zlci1mZztcbiAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6ICR0YWItaG92ZXItYmc7XG4gICAgICAgIH1cblxuICAgICAgICAmLmFjdGl2ZSB7XG4gICAgICAgICAgICBjb2xvcjogJHRhYi1hY3RpdmUtZmc7XG4gICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAkdGFiLWFjdGl2ZS1iZztcbiAgICAgICAgfVxuXG4gICAgICAgICYgPiBhIHtcbiAgICAgICAgICAgIGRpc3BsYXk6IGJsb2NrO1xuXG4gICAgICAgICAgICB3aWR0aDogMTAwJTtcbiAgICAgICAgICAgIGhlaWdodDogMTAwJTtcblxuICAgICAgICAgICAgbGluZS1oZWlnaHQ6ICR0YWItc2l6ZTtcblxuICAgICAgICAgICAgY29sb3I6IGluaGVyaXQ7XG4gICAgICAgICAgICB0ZXh0LWRlY29yYXRpb246IG5vbmU7XG4gICAgICAgICAgICB0ZXh0LWFsaWduOiBjZW50ZXI7XG4gICAgICAgIH1cbiAgICB9XG59XG5cbi5zaWRlYmFyLWNvbnRlbnQge1xuICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcblxuICAgIGxlZnQ6ICR0YWItc2l6ZTtcbiAgICByaWdodDogMDtcblxuICAgIHRvcDogMDtcbiAgICBib3R0b206IDA7XG5cbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiAkY29udGVudC1iZztcblxuICAgIG92ZXJmbG93LXg6IGhpZGRlbjtcbiAgICBvdmVyZmxvdy15OiBhdXRvO1xufVxuXG4uc2lkZWJhci1wYW5lIHtcbiAgICBkaXNwbGF5OiBub25lO1xuXG4gICAgcmlnaHQ6IDA7XG4gICAgYm94LXNpemluZzogYm9yZGVyLWJveDtcblxuICAgIHBhZGRpbmc6ICRjb250ZW50LXBhZGRpbmc7XG5cbiAgICAmLmFjdGl2ZSB7XG4gICAgICAgIGRpc3BsYXk6IGJsb2NrO1xuICAgIH1cblxuICAgIEBtZWRpYShtaW4td2lkdGg6JHRocmVzaG9sZC1zbSkgYW5kIChtYXgtd2lkdGg6JHRocmVzaG9sZC1tZCAtIDFweCkge1xuICAgICAgICB3aWR0aDogJHdpZHRoLXNtIC0gJHRhYi1zaXplO1xuICAgIH1cblxuICAgIEBtZWRpYShtaW4td2lkdGg6JHRocmVzaG9sZC1tZCkgYW5kIChtYXgtd2lkdGg6JHRocmVzaG9sZC1sZyAtIDFweCkge1xuICAgICAgICB3aWR0aDogJHdpZHRoLW1kIC0gJHRhYi1zaXplO1xuICAgIH1cblxuICAgIEBtZWRpYShtaW4td2lkdGg6JHRocmVzaG9sZC1sZykge1xuICAgICAgICB3aWR0aDogJHdpZHRoLWxnIC0gJHRhYi1zaXplO1xuICAgIH1cbn1cblxuQGlmICRtb3ZlLW1hcC1pbi14cyB7XG4gICAgLnNpZGViYXItbWFwIHtcbiAgICAgICAgbWFyZ2luLWxlZnQ6ICR0YWItc2l6ZTtcblxuICAgICAgICBAbWVkaWEobWluLXdpZHRoOiR0aHJlc2hvbGQtc20pIHtcbiAgICAgICAgICAgIG1hcmdpbi1sZWZ0OiAwO1xuICAgICAgICB9XG4gICAgfVxufVxuIl19*/ diff --git a/css/leaflet.css b/css/leaflet.css new file mode 100644 index 0000000..9c7e2d1 --- /dev/null +++ b/css/leaflet.css @@ -0,0 +1,623 @@ +/* required styles */ + +.leaflet-pane, +.leaflet-tile, +.leaflet-marker-icon, +.leaflet-marker-shadow, +.leaflet-tile-container, +.leaflet-map-pane svg, +.leaflet-map-pane canvas, +.leaflet-zoom-box, +.leaflet-image-layer, +.leaflet-layer { + position: absolute; + left: 0; + top: 0; + } +.leaflet-container { + overflow: hidden; + } +.leaflet-tile, +.leaflet-marker-icon, +.leaflet-marker-shadow { + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-user-drag: none; + } +/* Safari renders non-retina tile on retina better with this, but Chrome is worse */ +.leaflet-safari .leaflet-tile { + image-rendering: -webkit-optimize-contrast; + } +/* hack that prevents hw layers "stretching" when loading new tiles */ +.leaflet-safari .leaflet-tile-container { + width: 1600px; + height: 1600px; + -webkit-transform-origin: 0 0; + } +.leaflet-marker-icon, +.leaflet-marker-shadow { + display: block; + } +/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */ +/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */ +.leaflet-container .leaflet-overlay-pane svg, +.leaflet-container .leaflet-marker-pane img, +.leaflet-container .leaflet-tile-pane img, +.leaflet-container img.leaflet-image-layer { + max-width: none !important; + } + +.leaflet-container.leaflet-touch-zoom { + -ms-touch-action: pan-x pan-y; + touch-action: pan-x pan-y; + } +.leaflet-container.leaflet-touch-drag { + -ms-touch-action: pinch-zoom; + } +.leaflet-container.leaflet-touch-drag.leaflet-touch-drag { + -ms-touch-action: none; + touch-action: none; +} +.leaflet-tile { + filter: inherit; + visibility: hidden; + } +.leaflet-tile-loaded { + visibility: inherit; + } +.leaflet-zoom-box { + width: 0; + height: 0; + -moz-box-sizing: border-box; + box-sizing: border-box; + z-index: 800; + } +/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */ +.leaflet-overlay-pane svg { + -moz-user-select: none; + } + +.leaflet-pane { z-index: 400; } + +.leaflet-tile-pane { z-index: 200; } +.leaflet-overlay-pane { z-index: 400; } +.leaflet-shadow-pane { z-index: 500; } +.leaflet-marker-pane { z-index: 600; } +.leaflet-tooltip-pane { z-index: 650; } +.leaflet-popup-pane { z-index: 700; } + +.leaflet-map-pane canvas { z-index: 100; } +.leaflet-map-pane svg { z-index: 200; } + +.leaflet-vml-shape { + width: 1px; + height: 1px; + } +.lvml { + behavior: url(#default#VML); + display: inline-block; + position: absolute; + } + + +/* control positioning */ + +.leaflet-control { + position: relative; + z-index: 800; + pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ + pointer-events: auto; + } +.leaflet-top, +.leaflet-bottom { + position: absolute; + z-index: 1000; + pointer-events: none; + } +.leaflet-top { + top: 0; + } +.leaflet-right { + right: 0; + } +.leaflet-bottom { + bottom: 0; + } +.leaflet-left { + left: 0; + } +.leaflet-control { + float: left; + clear: both; + } +.leaflet-right .leaflet-control { + float: right; + } +.leaflet-top .leaflet-control { + margin-top: 10px; + } +.leaflet-bottom .leaflet-control { + margin-bottom: 10px; + } +.leaflet-left .leaflet-control { + margin-left: 10px; + } +.leaflet-right .leaflet-control { + margin-right: 10px; + } + + +/* zoom and fade animations */ + +.leaflet-fade-anim .leaflet-tile { + will-change: opacity; + } +.leaflet-fade-anim .leaflet-popup { + opacity: 0; + -webkit-transition: opacity 0.2s linear; + -moz-transition: opacity 0.2s linear; + -o-transition: opacity 0.2s linear; + transition: opacity 0.2s linear; + } +.leaflet-fade-anim .leaflet-map-pane .leaflet-popup { + opacity: 1; + } +.leaflet-zoom-animated { + -webkit-transform-origin: 0 0; + -ms-transform-origin: 0 0; + transform-origin: 0 0; + } +.leaflet-zoom-anim .leaflet-zoom-animated { + will-change: transform; + } +.leaflet-zoom-anim .leaflet-zoom-animated { + -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1); + -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1); + -o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1); + transition: transform 0.25s cubic-bezier(0,0,0.25,1); + } +.leaflet-zoom-anim .leaflet-tile, +.leaflet-pan-anim .leaflet-tile { + -webkit-transition: none; + -moz-transition: none; + -o-transition: none; + transition: none; + } + +.leaflet-zoom-anim .leaflet-zoom-hide { + visibility: hidden; + } + + +/* cursors */ + +.leaflet-interactive { + cursor: pointer; + } +.leaflet-grab { + cursor: -webkit-grab; + cursor: -moz-grab; + } +.leaflet-crosshair, +.leaflet-crosshair .leaflet-interactive { + cursor: crosshair; + } +.leaflet-popup-pane, +.leaflet-control { + cursor: auto; + } +.leaflet-dragging .leaflet-grab, +.leaflet-dragging .leaflet-grab .leaflet-interactive, +.leaflet-dragging .leaflet-marker-draggable { + cursor: move; + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + } + +/* marker & overlays interactivity */ +.leaflet-marker-icon, +.leaflet-marker-shadow, +.leaflet-image-layer, +.leaflet-pane > svg path, +.leaflet-tile-container { + pointer-events: none; + } + +.leaflet-marker-icon.leaflet-interactive, +.leaflet-image-layer.leaflet-interactive, +.leaflet-pane > svg path.leaflet-interactive { + pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ + pointer-events: auto; + } + +/* visual tweaks */ + +.leaflet-container { + background: #ddd; + outline: 0; + } +.leaflet-container a { + color: #0078A8; + } +.leaflet-container a.leaflet-active { + outline: 2px solid orange; + } +.leaflet-zoom-box { + border: 2px dotted #38f; + background: rgba(255,255,255,0.5); + } + + +/* general typography */ +.leaflet-container { + font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; + } + + +/* general toolbar styles */ + +.leaflet-bar { + box-shadow: 0 1px 5px rgba(0,0,0,0.65); + border-radius: 4px; + } +.leaflet-bar a, +.leaflet-bar a:hover { + background-color: #fff; + border-bottom: 1px solid #ccc; + width: 26px; + height: 26px; + line-height: 26px; + display: block; + text-align: center; + text-decoration: none; + color: black; + } +.leaflet-bar a, +.leaflet-control-layers-toggle { + background-position: 50% 50%; + background-repeat: no-repeat; + display: block; + } +.leaflet-bar a:hover { + background-color: #f4f4f4; + } +.leaflet-bar a:first-child { + border-top-left-radius: 4px; + border-top-right-radius: 4px; + } +.leaflet-bar a:last-child { + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + border-bottom: none; + } +.leaflet-bar a.leaflet-disabled { + cursor: default; + background-color: #f4f4f4; + color: #bbb; + } + +.leaflet-touch .leaflet-bar a { + width: 30px; + height: 30px; + line-height: 30px; + } + + +/* zoom control */ + +.leaflet-control-zoom-in, +.leaflet-control-zoom-out { + font: bold 18px 'Lucida Console', Monaco, monospace; + text-indent: 1px; + } +.leaflet-control-zoom-out { + font-size: 20px; + } + +.leaflet-touch .leaflet-control-zoom-in { + font-size: 22px; + } +.leaflet-touch .leaflet-control-zoom-out { + font-size: 24px; + } + + +/* layers control */ + +.leaflet-control-layers { + box-shadow: 0 1px 5px rgba(0,0,0,0.4); + background: #fff; + border-radius: 5px; + } +.leaflet-control-layers-toggle { + background-image: url(images/layers.png); + width: 36px; + height: 36px; + } +.leaflet-retina .leaflet-control-layers-toggle { + background-image: url(images/layers-2x.png); + background-size: 26px 26px; + } +.leaflet-touch .leaflet-control-layers-toggle { + width: 44px; + height: 44px; + } +.leaflet-control-layers .leaflet-control-layers-list, +.leaflet-control-layers-expanded .leaflet-control-layers-toggle { + display: none; + } +.leaflet-control-layers-expanded .leaflet-control-layers-list { + display: block; + position: relative; + } +.leaflet-control-layers-expanded { + padding: 6px 10px 6px 6px; + color: #333; + background: #fff; + } +.leaflet-control-layers-scrollbar { + overflow-y: scroll; + padding-right: 5px; + } +.leaflet-control-layers-selector { + margin-top: 2px; + position: relative; + top: 1px; + } +.leaflet-control-layers label { + display: block; + } +.leaflet-control-layers-separator { + height: 0; + border-top: 1px solid #ddd; + margin: 5px -10px 5px -6px; + } + +/* Default icon URLs */ +.leaflet-default-icon-path { + background-image: url(images/); + } + + +/* attribution and scale controls */ + +.leaflet-container .leaflet-control-attribution { + background: #fff; + background: rgba(255, 255, 255, 0.7); + margin: 0; + } +.leaflet-control-attribution, +.leaflet-control-scale-line { + padding: 0 5px; + color: #333; + } +.leaflet-control-attribution a { + text-decoration: none; + } +.leaflet-control-attribution a:hover { + text-decoration: underline; + } +.leaflet-container .leaflet-control-attribution, +.leaflet-container .leaflet-control-scale { + font-size: 11px; + } +.leaflet-left .leaflet-control-scale { + margin-left: 5px; + } +.leaflet-bottom .leaflet-control-scale { + margin-bottom: 5px; + } +.leaflet-control-scale-line { + border: 2px solid #777; + border-top: none; + line-height: 1.1; + padding: 2px 5px 1px; + font-size: 11px; + white-space: nowrap; + overflow: hidden; + -moz-box-sizing: border-box; + box-sizing: border-box; + + background: #fff; + background: rgba(255, 255, 255, 0.5); + } +.leaflet-control-scale-line:not(:first-child) { + border-top: 2px solid #777; + border-bottom: none; + margin-top: -2px; + } +.leaflet-control-scale-line:not(:first-child):not(:last-child) { + border-bottom: 2px solid #777; + } + +.leaflet-touch .leaflet-control-attribution, +.leaflet-touch .leaflet-control-layers, +.leaflet-touch .leaflet-bar { + box-shadow: none; + } +.leaflet-touch .leaflet-control-layers, +.leaflet-touch .leaflet-bar { + border: 2px solid rgba(0,0,0,0.2); + background-clip: padding-box; + } + + +/* popup */ + +.leaflet-popup { + position: absolute; + text-align: center; + margin-bottom: 20px; + } +.leaflet-popup-content-wrapper { + padding: 1px; + text-align: left; + border-radius: 12px; + } +.leaflet-popup-content { + margin: 13px 19px; + line-height: 1.4; + } +.leaflet-popup-content p { + margin: 18px 0; + } +.leaflet-popup-tip-container { + width: 40px; + height: 20px; + position: absolute; + left: 50%; + margin-left: -20px; + overflow: hidden; + pointer-events: none; + } +.leaflet-popup-tip { + width: 17px; + height: 17px; + padding: 1px; + + margin: -10px auto 0; + + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); + } +.leaflet-popup-content-wrapper, +.leaflet-popup-tip { + background: white; + color: #333; + box-shadow: 0 3px 14px rgba(0,0,0,0.4); + } +.leaflet-container a.leaflet-popup-close-button { + position: absolute; + top: 0; + right: 0; + padding: 4px 4px 0 0; + border: none; + text-align: center; + width: 18px; + height: 14px; + font: 16px/14px Tahoma, Verdana, sans-serif; + color: #c3c3c3; + text-decoration: none; + font-weight: bold; + background: transparent; + } +.leaflet-container a.leaflet-popup-close-button:hover { + color: #999; + } +.leaflet-popup-scrolled { + overflow: auto; + border-bottom: 1px solid #ddd; + border-top: 1px solid #ddd; + } + +.leaflet-oldie .leaflet-popup-content-wrapper { + zoom: 1; + } +.leaflet-oldie .leaflet-popup-tip { + width: 24px; + margin: 0 auto; + + -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; + filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); + } +.leaflet-oldie .leaflet-popup-tip-container { + margin-top: -1px; + } + +.leaflet-oldie .leaflet-control-zoom, +.leaflet-oldie .leaflet-control-layers, +.leaflet-oldie .leaflet-popup-content-wrapper, +.leaflet-oldie .leaflet-popup-tip { + border: 1px solid #999; + } + + +/* div icon */ + +.leaflet-div-icon { + background: #fff; + border: 1px solid #666; + } + + +/* Tooltip */ +/* Base styles for the element that has a tooltip */ +.leaflet-tooltip { + position: absolute; + padding: 6px; + background-color: #fff; + border: 1px solid #fff; + border-radius: 3px; + color: #222; + white-space: nowrap; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + pointer-events: none; + box-shadow: 0 1px 3px rgba(0,0,0,0.4); + } +.leaflet-tooltip.leaflet-clickable { + cursor: pointer; + pointer-events: auto; + } +.leaflet-tooltip-top:before, +.leaflet-tooltip-bottom:before, +.leaflet-tooltip-left:before, +.leaflet-tooltip-right:before { + position: absolute; + pointer-events: none; + border: 6px solid transparent; + background: transparent; + content: ""; + } + +/* Directions */ + +.leaflet-tooltip-bottom { + margin-top: 6px; +} +.leaflet-tooltip-top { + margin-top: -6px; +} +.leaflet-tooltip-bottom:before, +.leaflet-tooltip-top:before { + left: 50%; + margin-left: -6px; + } +.leaflet-tooltip-top:before { + bottom: 0; + margin-bottom: -12px; + border-top-color: #fff; + } +.leaflet-tooltip-bottom:before { + top: 0; + margin-top: -12px; + margin-left: -6px; + border-bottom-color: #fff; + } +.leaflet-tooltip-left { + margin-left: -6px; +} +.leaflet-tooltip-right { + margin-left: 6px; +} +.leaflet-tooltip-left:before, +.leaflet-tooltip-right:before { + top: 50%; + margin-top: -6px; + } +.leaflet-tooltip-left:before { + right: 0; + margin-right: -12px; + border-left-color: #fff; + } +.leaflet-tooltip-right:before { + left: 0; + margin-left: -12px; + border-right-color: #fff; + } diff --git a/css/leaflet.draw.css b/css/leaflet.draw.css new file mode 100644 index 0000000..95cc298 --- /dev/null +++ b/css/leaflet.draw.css @@ -0,0 +1,305 @@ +/* ================================================================== */ +/* Toolbars +/* ================================================================== */ + +.leaflet-draw-section { + position: relative; +} + +.leaflet-draw-toolbar { + margin-top: 12px; +} + +.leaflet-draw-toolbar-top { + margin-top: 0; +} + +.leaflet-draw-toolbar-notop a:first-child { + border-top-right-radius: 0; +} + +.leaflet-draw-toolbar-nobottom a:last-child { + border-bottom-right-radius: 0; +} + +.leaflet-draw-toolbar a { + background-image: url('images/spritesheet.png'); + background-image: linear-gradient(transparent, transparent), url('images/spritesheet.svg'); + background-repeat: no-repeat; + background-size: 270px 30px; +} + +.leaflet-retina .leaflet-draw-toolbar a { + background-image: url('images/spritesheet-2x.png'); + background-image: linear-gradient(transparent, transparent), url('images/spritesheet.svg'); +} + +.leaflet-draw a { + display: block; + text-align: center; + text-decoration: none; +} + +/* ================================================================== */ +/* Toolbar actions menu +/* ================================================================== */ + +.leaflet-draw-actions { + display: none; + list-style: none; + margin: 0; + padding: 0; + position: absolute; + left: 26px; /* leaflet-draw-toolbar.left + leaflet-draw-toolbar.width */ + top: 0; + white-space: nowrap; +} + +.leaflet-touch .leaflet-draw-actions { + left: 32px; +} + +.leaflet-right .leaflet-draw-actions { + right:26px; + left:auto; +} + +.leaflet-touch .leaflet-right .leaflet-draw-actions { + right:32px; + left:auto; +} + +.leaflet-draw-actions li { + display: inline-block; +} + +.leaflet-draw-actions li:first-child a { + border-left: none; +} + +.leaflet-draw-actions li:last-child a { + -webkit-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.leaflet-right .leaflet-draw-actions li:last-child a { + -webkit-border-radius: 0; + border-radius: 0; +} + +.leaflet-right .leaflet-draw-actions li:first-child a { + -webkit-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.leaflet-draw-actions a { + background-color: #919187; + border-left: 1px solid #AAA; + color: #FFF; + font: 11px/19px "Helvetica Neue", Arial, Helvetica, sans-serif; + line-height: 28px; + text-decoration: none; + padding-left: 10px; + padding-right: 10px; + height: 28px; +} + +.leaflet-touch .leaflet-draw-actions a { + font-size: 12px; + line-height: 30px; + height: 30px; +} + +.leaflet-draw-actions-bottom { + margin-top: 0; +} + +.leaflet-draw-actions-top { + margin-top: 1px; +} + +.leaflet-draw-actions-top a, +.leaflet-draw-actions-bottom a { + height: 27px; + line-height: 27px; +} + +.leaflet-draw-actions a:hover { + background-color: #A0A098; +} + +.leaflet-draw-actions-top.leaflet-draw-actions-bottom a { + height: 26px; + line-height: 26px; +} + +/* ================================================================== */ +/* Draw toolbar +/* ================================================================== */ + +.leaflet-draw-toolbar .leaflet-draw-draw-polyline { + background-position: -2px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polyline { + background-position: 0 -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-draw-polygon { + background-position: -31px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polygon { + background-position: -29px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-draw-rectangle { + background-position: -62px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-rectangle { + background-position: -60px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-draw-circle { + background-position: -92px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circle { + background-position: -90px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-draw-marker { + background-position: -122px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-marker { + background-position: -120px -1px; +} + +/* ================================================================== */ +/* Edit toolbar +/* ================================================================== */ + +.leaflet-draw-toolbar .leaflet-draw-edit-edit { + background-position: -152px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit { + background-position: -150px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-edit-remove { + background-position: -182px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove { + background-position: -180px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled { + background-position: -212px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled { + background-position: -210px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled { + background-position: -242px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled { + background-position: -240px -2px; +} + +/* ================================================================== */ +/* Drawing styles +/* ================================================================== */ + +.leaflet-mouse-marker { + background-color: #fff; + cursor: crosshair; +} + +.leaflet-draw-tooltip { + background: rgb(54, 54, 54); + background: rgba(0, 0, 0, 0.5); + border: 1px solid transparent; + -webkit-border-radius: 4px; + border-radius: 4px; + color: #fff; + font: 12px/18px "Helvetica Neue", Arial, Helvetica, sans-serif; + margin-left: 20px; + margin-top: -21px; + padding: 4px 8px; + position: absolute; + visibility: hidden; + white-space: nowrap; + z-index: 6; +} + +.leaflet-draw-tooltip:before { + border-right: 6px solid black; + border-right-color: rgba(0, 0, 0, 0.5); + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + content: ""; + position: absolute; + top: 7px; + left: -7px; +} + +.leaflet-error-draw-tooltip { + background-color: #F2DEDE; + border: 1px solid #E6B6BD; + color: #B94A48; +} + +.leaflet-error-draw-tooltip:before { + border-right-color: #E6B6BD; +} + +.leaflet-draw-tooltip-single { + margin-top: -12px +} + +.leaflet-draw-tooltip-subtext { + color: #f8d5e4; +} + +.leaflet-draw-guide-dash { + font-size: 1%; + opacity: 0.6; + position: absolute; + width: 5px; + height: 5px; +} + +/* ================================================================== */ +/* Edit styles +/* ================================================================== */ + +.leaflet-edit-marker-selected { + background: rgba(254, 87, 161, 0.1); + border: 4px dashed rgba(254, 87, 161, 0.6); + -webkit-border-radius: 4px; + border-radius: 4px; + box-sizing: content-box; +} + +.leaflet-edit-move { + cursor: move; +} + +.leaflet-edit-resize { + cursor: pointer; +} + +/* ================================================================== */ +/* Old IE styles +/* ================================================================== */ + +.leaflet-oldie .leaflet-draw-toolbar { + border: 1px solid #999; +} \ No newline at end of file diff --git a/css/leaflet.ie.css b/css/leaflet.ie.css new file mode 100644 index 0000000..14b84b6 --- /dev/null +++ b/css/leaflet.ie.css @@ -0,0 +1,51 @@ +.leaflet-vml-shape { + width: 1px; + height: 1px; + } +.lvml { + behavior: url(#default#VML); + display: inline-block; + position: absolute; + } + +.leaflet-control { + display: inline; + } + +.leaflet-popup-tip { + width: 21px; + _width: 27px; + margin: 0 auto; + _margin-top: -3px; + + filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); + -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; + } +.leaflet-popup-tip-container { + margin-top: -1px; + } +.leaflet-popup-content-wrapper, .leaflet-popup-tip { + border: 1px solid #999; + } +.leaflet-popup-content-wrapper { + zoom: 1; + } + +.leaflet-control-zoom, +.leaflet-control-layers { + border: 3px solid #999; + } +.leaflet-control-layers-toggle { + } +.leaflet-control-attribution, +.leaflet-control-layers, +.leaflet-control-scale-line { + background: white; + } +.leaflet-zoom-box { + filter: alpha(opacity=50); + } +.leaflet-control-attribution { + border-top: 1px solid #bbb; + border-left: 1px solid #bbb; + } diff --git a/css/leaflet.label.css b/css/leaflet.label.css new file mode 100644 index 0000000..7b64d32 --- /dev/null +++ b/css/leaflet.label.css @@ -0,0 +1,37 @@ +.leaflet-label { + background: rgb(235, 235, 235); + background: rgba(235, 235, 235, 0.81); + background-clip: padding-box; + border-color: #777; + border-color: rgba(0,0,0,0.25); + border-radius: 4px; + border-style: solid; + border-width: 4px; + color: #111; + display: block; + font: 12px/20px "Helvetica Neue", Arial, Helvetica, sans-serif; + font-weight: bold; + padding: 1px 6px; + position: absolute; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + white-space: nowrap; + z-index: 6; +} + +.leaflet-label.leaflet-clickable { + cursor: pointer; +} + +.leaflet-label:before { + border-right: 6px solid black; + border-right-color: inherit; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + content: ""; + position: absolute; + top: 5px; + left: -10px; +} \ No newline at end of file diff --git a/css/leaflet.measurecontrol.css b/css/leaflet.measurecontrol.css new file mode 100644 index 0000000..c33511c --- /dev/null +++ b/css/leaflet.measurecontrol.css @@ -0,0 +1,3 @@ +.leaflet-control-draw-measure { + background-image: url(images/measure-control.png); +} diff --git a/css/style.css b/css/style.css new file mode 100644 index 0000000..779b410 --- /dev/null +++ b/css/style.css @@ -0,0 +1,30 @@ +#hello { + color: red; +} +#app-navigation *, #app-settings *{ + width:2px; + z-index:-10; +} +#app-navigation, #app-settings{ + width:2px; +} + +#app *{ + box-sizing: border-box; +} + +#map *{ + box-sizing: content-box; +} +#gpxlist td{ + word-wrap: break-word; + white-space: normal; +} +#gpxlist a{ + color: blue; + text-decoration: underline; +} +/* jquery dialog */ +.ui-dialog{ + z-index: 2001 !important ; +} diff --git a/css/tablesorter/themes/blue/asc.gif b/css/tablesorter/themes/blue/asc.gif new file mode 100644 index 0000000..7415786 Binary files /dev/null and b/css/tablesorter/themes/blue/asc.gif differ diff --git a/css/tablesorter/themes/blue/bg.gif b/css/tablesorter/themes/blue/bg.gif new file mode 100644 index 0000000..fac668f Binary files /dev/null and b/css/tablesorter/themes/blue/bg.gif differ diff --git a/css/tablesorter/themes/blue/desc.gif b/css/tablesorter/themes/blue/desc.gif new file mode 100644 index 0000000..3b30b3c Binary files /dev/null and b/css/tablesorter/themes/blue/desc.gif differ diff --git a/css/tablesorter/themes/blue/style.css b/css/tablesorter/themes/blue/style.css new file mode 100644 index 0000000..ef6f02b --- /dev/null +++ b/css/tablesorter/themes/blue/style.css @@ -0,0 +1,39 @@ +/* tables */ +table.tablesorter { + font-family:arial; + background-color: #CDCDCD; + margin:10px 0pt 15px; + font-size: 8pt; + width: 100%; + text-align: left; +} +table.tablesorter thead tr th, table.tablesorter tfoot tr th { + background-color: #e6EEEE; + border: 1px solid #FFF; + font-size: 8pt; + padding: 4px; +} +table.tablesorter thead tr .header { + background-image: url(bg.gif); + background-repeat: no-repeat; + /*background-position: center right;*/ + cursor: pointer; +} +table.tablesorter tbody td { + color: #3D3D3D; + padding: 4px; + /*background-color: #FFF;*/ + vertical-align: top; +} +table.tablesorter tbody tr.odd td { + background-color:#F0F0F6; +} +table.tablesorter thead tr .headerSortUp { + background-image: url(asc.gif); +} +table.tablesorter thead tr .headerSortDown { + background-image: url(desc.gif); +} +table.tablesorter thead tr .headerSortDown, table.tablesorter thead tr .headerSortUp { +background-color: #8dbdd8; +} diff --git a/css/tablesorter/themes/green/asc.png b/css/tablesorter/themes/green/asc.png new file mode 100644 index 0000000..66e39ca Binary files /dev/null and b/css/tablesorter/themes/green/asc.png differ diff --git a/css/tablesorter/themes/green/bg.png b/css/tablesorter/themes/green/bg.png new file mode 100644 index 0000000..ca83716 Binary files /dev/null and b/css/tablesorter/themes/green/bg.png differ diff --git a/css/tablesorter/themes/green/desc.png b/css/tablesorter/themes/green/desc.png new file mode 100644 index 0000000..431f63a Binary files /dev/null and b/css/tablesorter/themes/green/desc.png differ diff --git a/css/tablesorter/themes/green/style.css b/css/tablesorter/themes/green/style.css new file mode 100644 index 0000000..4a54589 --- /dev/null +++ b/css/tablesorter/themes/green/style.css @@ -0,0 +1,39 @@ +table.tablesorter { + font-size: 12px; + background-color: #4D4D4D; + width: 1024px; + border: 1px solid #000; +} +table.tablesorter th { + text-align: left; + padding: 5px; + background-color: #6E6E6E; +} +table.tablesorter td { + color: #FFF; + padding: 5px; +} +table.tablesorter .even { + background-color: #3D3D3D; +} +table.tablesorter .odd { + background-color: #6E6E6E; +} +table.tablesorter .header { + background-image: url(bg.png); + background-repeat: no-repeat; + border-left: 1px solid #FFF; + border-right: 1px solid #000; + border-top: 1px solid #FFF; + padding-left: 30px; + padding-top: 8px; + height: auto; +} +table.tablesorter .headerSortUp { + background-image: url(asc.png); + background-repeat: no-repeat; +} +table.tablesorter .headerSortDown { + background-image: url(desc.png); + background-repeat: no-repeat; +} \ No newline at end of file diff --git a/img/app.svg b/img/app.svg new file mode 100644 index 0000000..e295509 --- /dev/null +++ b/img/app.svg @@ -0,0 +1,52 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/img/favicon.ico b/img/favicon.ico new file mode 100644 index 0000000..47cdad3 Binary files /dev/null and b/img/favicon.ico differ diff --git a/img/favicon.png b/img/favicon.png new file mode 100644 index 0000000..d152928 Binary files /dev/null and b/img/favicon.png differ diff --git a/js/ActiveLayers.js b/js/ActiveLayers.js new file mode 100644 index 0000000..a9f5582 --- /dev/null +++ b/js/ActiveLayers.js @@ -0,0 +1,137 @@ +/** + * Created: vogdb Date: 5/4/13 Time: 1:54 PM + * Version: 0.3.0 + */ + +L.Control.ActiveLayers = L.Control.Layers.extend({ + + /** + * Get currently active base layer on the map + * @return {Object} l where l.name - layer name on the control, + * l.layer is L.TileLayer, l.overlay is overlay layer. + */ + getActiveBaseLayer: function () { + return this._activeBaseLayer + }, + + /** + * Get currently active overlay layers on the map + * @return {{layerId: l}} where layerId is L.stamp(l.layer) + * and l @see #getActiveBaseLayer jsdoc. + */ + getActiveOverlayLayers: function () { + return this._activeOverlayLayers + }, + + onAdd: function (map) { + var container = L.Control.Layers.prototype.onAdd.call(this, map) + + if (Array.isArray(this._layers)) { + this._activeBaseLayer = this._findActiveBaseLayer() + this._activeOverlayLayers = this._findActiveOverlayLayers() + } else { // 0.7.x + this._activeBaseLayer = this._findActiveBaseLayerLegacy() + this._activeOverlayLayers = this._findActiveOverlayLayersLegacy() + } + return container + }, + + _findActiveBaseLayer: function () { + var layers = this._layers + for (var i = 0; i < layers.length; i++) { + var layer = layers[i] + if (!layer.overlay && this._map.hasLayer(layer.layer)) { + return layer + } + } + throw new Error('Control doesn\'t have any active base layer!') + }, + + _findActiveOverlayLayers: function () { + var result = {} + var layers = this._layers + for (var i = 0; i < layers.length; i++) { + var layer = layers[i] + if (layer.overlay && this._map.hasLayer(layer.layer)) { + result[layer.layer._leaflet_id] = layer + } + } + return result + }, + + /** + * Legacy 0.7.x support methods + */ + _findActiveBaseLayerLegacy: function () { + var layers = this._layers + for (var layerId in layers) { + if (this._layers.hasOwnProperty(layerId)) { + var layer = layers[layerId] + if (!layer.overlay && this._map.hasLayer(layer.layer)) { + return layer + } + } + } + throw new Error('Control doesn\'t have any active base layer!') + }, + + _findActiveOverlayLayersLegacy: function () { + var result = {} + var layers = this._layers + for (var layerId in layers) { + if (this._layers.hasOwnProperty(layerId)) { + var layer = layers[layerId] + if (layer.overlay && this._map.hasLayer(layer.layer)) { + result[layerId] = layer + } + } + } + return result + }, + + _onLayerChange: function () { + L.Control.Layers.prototype._onLayerChange.apply(this, arguments) + this._recountLayers() + }, + + _onInputClick: function () { + this._handlingClick = true + + this._recountLayers() + L.Control.Layers.prototype._onInputClick.call(this) + + this._handlingClick = false + }, + + _recountLayers: function () { + var i, input, obj, + inputs = this._form.getElementsByTagName('input'), + inputsLen = inputs.length; + + for (i = 0; i < inputsLen; i++) { + input = inputs[i] + if (Array.isArray(this._layers)) { + obj = this._layers[i] + } else { + obj = this._layers[input.layerId] // 0.7.x + } + + if (input.checked && !this._map.hasLayer(obj.layer)) { + if (obj.overlay) { + this._activeOverlayLayers[input.layerId] = obj + } else { + this._activeBaseLayer = obj + } + } else if (!input.checked && this._map.hasLayer(obj.layer)) { + if (obj.overlay) { + delete this._activeOverlayLayers[input.layerId] + } + } + } + } + +}) + +L.control.activeLayers = function (baseLayers, overlays, options) { + return new L.Control.ActiveLayers(baseLayers, overlays, options) +} diff --git a/js/Control.Geocoder.js b/js/Control.Geocoder.js new file mode 100644 index 0000000..e419ce2 --- /dev/null +++ b/js/Control.Geocoder.js @@ -0,0 +1,739 @@ +(function (factory) { + // Packaging/modules magic dance + var L; + if (typeof define === 'function' && define.amd) { + // AMD + define(['leaflet'], factory); + } else if (typeof module !== 'undefined') { + // Node/CommonJS + L = require('leaflet'); + module.exports = factory(L); + } else { + // Browser globals + if (typeof window.L === 'undefined') + throw 'Leaflet must be loaded first'; + factory(window.L); + } +}(function (L) { + 'use strict'; + L.Control.Geocoder = L.Control.extend({ + options: { + showResultIcons: false, + collapsed: true, + expand: 'click', + position: 'topright', + placeholder: 'Search...', + errorMessage: 'Nothing found.' + }, + + _callbackId: 0, + + initialize: function (options) { + L.Util.setOptions(this, options); + if (!this.options.geocoder) { + this.options.geocoder = new L.Control.Geocoder.Nominatim(); + } + }, + + onAdd: function (map) { + var className = 'leaflet-control-geocoder', + container = L.DomUtil.create('div', className), + icon = L.DomUtil.create('div', 'leaflet-control-geocoder-icon', container), + form = this._form = L.DomUtil.create('form', className + '-form', container), + input; + + this._map = map; + this._container = container; + input = this._input = L.DomUtil.create('input'); + input.type = 'text'; + input.placeholder = this.options.placeholder; + + L.DomEvent.addListener(input, 'keydown', this._keydown, this); + //L.DomEvent.addListener(input, 'onpaste', this._clearResults, this); + //L.DomEvent.addListener(input, 'oninput', this._clearResults, this); + + this._errorElement = document.createElement('div'); + this._errorElement.className = className + '-form-no-error'; + this._errorElement.innerHTML = this.options.errorMessage; + + this._alts = L.DomUtil.create('ul', className + '-alternatives leaflet-control-geocoder-alternatives-minimized'); + + form.appendChild(input); + form.appendChild(this._errorElement); + container.appendChild(this._alts); + + L.DomEvent.addListener(form, 'submit', this._geocode, this); + + if (this.options.collapsed) { + if (this.options.expand === 'click') { + L.DomEvent.addListener(icon, 'click', function(e) { + // TODO: touch + if (e.button === 0 && e.detail !== 2) { + this._toggle(); + } + }, this); + } else { + L.DomEvent.addListener(icon, 'mouseover', this._expand, this); + L.DomEvent.addListener(icon, 'mouseout', this._collapse, this); + this._map.on('movestart', this._collapse, this); + } + } else { + this._expand(); + } + + L.DomEvent.disableClickPropagation(container); + + return container; + }, + + _geocodeResult: function (results) { + L.DomUtil.removeClass(this._container, 'leaflet-control-geocoder-throbber'); + if (results.length === 1) { + this._geocodeResultSelected(results[0]); + } else if (results.length > 0) { + this._alts.innerHTML = ''; + this._results = results; + L.DomUtil.removeClass(this._alts, 'leaflet-control-geocoder-alternatives-minimized'); + for (var i = 0; i < results.length; i++) { + this._alts.appendChild(this._createAlt(results[i], i)); + } + } else { + L.DomUtil.addClass(this._errorElement, 'leaflet-control-geocoder-error'); + } + }, + + markGeocode: function(result) { + this._map.fitBounds(result.bbox); + + if (this._geocodeMarker) { + this._map.removeLayer(this._geocodeMarker); + } + + this._geocodeMarker = new L.Marker(result.center) + .bindPopup(result.html || result.name) + .addTo(this._map) + .openPopup(); + + return this; + }, + + _geocode: function(event) { + L.DomEvent.preventDefault(event); + + L.DomUtil.addClass(this._container, 'leaflet-control-geocoder-throbber'); + this._clearResults(); + this.options.geocoder.geocode(this._input.value, this._geocodeResult, this); + + return false; + }, + + _geocodeResultSelected: function(result) { + if (this.options.collapsed) { + this._collapse(); + } else { + this._clearResults(); + } + this.markGeocode(result); + }, + + _toggle: function() { + if (this._container.className.indexOf('leaflet-control-geocoder-expanded') >= 0) { + this._collapse(); + } else { + this._expand(); + } + }, + + _expand: function () { + L.DomUtil.addClass(this._container, 'leaflet-control-geocoder-expanded'); + this._input.select(); + }, + + _collapse: function () { + this._container.className = this._container.className.replace(' leaflet-control-geocoder-expanded', ''); + L.DomUtil.addClass(this._alts, 'leaflet-control-geocoder-alternatives-minimized'); + L.DomUtil.removeClass(this._errorElement, 'leaflet-control-geocoder-error'); + }, + + _clearResults: function () { + L.DomUtil.addClass(this._alts, 'leaflet-control-geocoder-alternatives-minimized'); + this._selection = null; + L.DomUtil.removeClass(this._errorElement, 'leaflet-control-geocoder-error'); + }, + + _createAlt: function(result, index) { + var li = document.createElement('li'), + a = L.DomUtil.create('a', '', li), + icon = this.options.showResultIcons && result.icon ? L.DomUtil.create('img', '', a) : null, + text = result.html ? undefined : document.createTextNode(result.name); + + if (icon) { + icon.src = result.icon; + } + + a.href = '#'; + a.setAttribute('data-result-index', index); + + if (result.html) { + a.innerHTML = result.html; + } else { + a.appendChild(text); + } + + L.DomEvent.addListener(li, 'click', function clickHandler(e) { + L.DomEvent.preventDefault(e); + this._geocodeResultSelected(result); + }, this); + + return li; + }, + + _keydown: function(e) { + var _this = this, + select = function select(dir) { + if (_this._selection) { + L.DomUtil.removeClass(_this._selection.firstChild, 'leaflet-control-geocoder-selected'); + _this._selection = _this._selection[dir > 0 ? 'nextSibling' : 'previousSibling']; + } + if (!_this._selection) { + _this._selection = _this._alts[dir > 0 ? 'firstChild' : 'lastChild']; + } + + if (_this._selection) { + L.DomUtil.addClass(_this._selection.firstChild, 'leaflet-control-geocoder-selected'); + } + }; + + switch (e.keyCode) { + // Escape + case 27: + if (this.options.collapsed) { + this._collapse(); + } + break; + // Up + case 38: + select(-1); + L.DomEvent.preventDefault(e); + break; + // Up + case 40: + select(1); + L.DomEvent.preventDefault(e); + break; + // Enter + case 13: + if (this._selection) { + var index = parseInt(this._selection.firstChild.getAttribute('data-result-index'), 10); + this._geocodeResultSelected(this._results[index]); + this._clearResults(); + L.DomEvent.preventDefault(e); + } + } + return true; + } + }); + + L.Control.geocoder = function(id, options) { + return new L.Control.Geocoder(id, options); + }; + + L.Control.Geocoder.callbackId = 0; + L.Control.Geocoder.jsonp = function(url, params, callback, context, jsonpParam) { + var callbackId = '_l_geocoder_' + (L.Control.Geocoder.callbackId++); + params[jsonpParam || 'callback'] = callbackId; + window[callbackId] = L.Util.bind(callback, context); + var script = document.createElement('script'); + script.type = 'text/javascript'; + script.src = url + L.Util.getParamString(params); + script.id = callbackId; + document.getElementsByTagName('head')[0].appendChild(script); + }; + L.Control.Geocoder.getJSON = function(url, params, callback) { + var xmlHttp = new XMLHttpRequest(); + xmlHttp.open( "GET", url + L.Util.getParamString(params), true); + xmlHttp.send(null); + xmlHttp.onreadystatechange = function () { + if (xmlHttp.readyState != 4) return; + if (xmlHttp.status != 200 && req.status != 304) return; + callback(JSON.parse(xmlHttp.response)); + }; + }; + + L.Control.Geocoder.template = function (str, data, htmlEscape) { + return str.replace(/\{ *([\w_]+) *\}/g, function (str, key) { + var value = data[key]; + if (value === undefined) { + value = ''; + } else if (typeof value === 'function') { + value = value(data); + } + return L.Control.Geocoder.htmlEscape(value); + }); + }; + + // Adapted from handlebars.js + // https://github.com/wycats/handlebars.js/ + L.Control.Geocoder.htmlEscape = (function() { + var badChars = /[&<>"'`]/g; + var possible = /[&<>"'`]/; + var escape = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + '\'': ''', + '`': '`' + }; + + function escapeChar(chr) { + return escape[chr]; + } + + return function(string) { + if (string == null) { + return ''; + } else if (!string) { + return string + ''; + } + + // Force a string conversion as this will be done by the append regardless and + // the regex test will do this transparently behind the scenes, causing issues if + // an object's to string has escaped characters in it. + string = '' + string; + + if (!possible.test(string)) { + return string; + } + return string.replace(badChars, escapeChar); + }; + })(); + + L.Control.Geocoder.Nominatim = L.Class.extend({ + options: { + serviceUrl: '//nominatim.openstreetmap.org/', + geocodingQueryParams: {}, + reverseQueryParams: {}, + htmlTemplate: function(r) { + var a = r.address, + parts = []; + if (a.road || a.building) { + parts.push('{building} {road} {house_number}'); + } + + if (a.city || a.town || a.village) { + parts.push('{postcode} {city} {town} {village}'); + } + + if (a.state || a.country) { + parts.push('{state} {country}'); + } + + return L.Control.Geocoder.template(parts.join('
'), a, true); + } + }, + + initialize: function(options) { + L.Util.setOptions(this, options); + }, + + geocode: function(query, cb, context) { + L.Control.Geocoder.jsonp(this.options.serviceUrl + 'search/', L.extend({ + q: query, + limit: 5, + format: 'json', + addressdetails: 1 + }, this.options.geocodingQueryParams), + function(data) { + var results = []; + for (var i = data.length - 1; i >= 0; i--) { + var bbox = data[i].boundingbox; + for (var j = 0; j < 4; j++) bbox[j] = parseFloat(bbox[j]); + results[i] = { + icon: data[i].icon, + name: data[i].display_name, + html: this.options.htmlTemplate ? + this.options.htmlTemplate(data[i]) + : undefined, + bbox: L.latLngBounds([bbox[0], bbox[2]], [bbox[1], bbox[3]]), + center: L.latLng(data[i].lat, data[i].lon), + properties: data[i] + }; + } + cb.call(context, results); + }, this, 'json_callback'); + }, + + reverse: function(location, scale, cb, context) { + L.Control.Geocoder.jsonp(this.options.serviceUrl + 'reverse/', L.extend({ + lat: location.lat, + lon: location.lng, + zoom: Math.round(Math.log(scale / 256) / Math.log(2)), + addressdetails: 1, + format: 'json' + }, this.options.reverseQueryParams), function(data) { + var result = [], + loc; + + if (data && data.lat && data.lon) { + loc = L.latLng(data.lat, data.lon); + result.push({ + name: data.display_name, + html: this.options.htmlTemplate ? + this.options.htmlTemplate(data) + : undefined, + center: loc, + bounds: L.latLngBounds(loc, loc), + properties: data + }); + } + + cb.call(context, result); + }, this, 'json_callback'); + } + }); + + L.Control.Geocoder.nominatim = function(options) { + return new L.Control.Geocoder.Nominatim(options); + }; + + L.Control.Geocoder.Bing = L.Class.extend({ + initialize: function(key) { + this.key = key; + }, + + geocode : function (query, cb, context) { + L.Control.Geocoder.jsonp('//dev.virtualearth.net/REST/v1/Locations', { + query: query, + key : this.key + }, function(data) { + var results = []; + for (var i = data.resourceSets[0].resources.length - 1; i >= 0; i--) { + var resource = data.resourceSets[0].resources[i], + bbox = resource.bbox; + results[i] = { + name: resource.name, + bbox: L.latLngBounds([bbox[0], bbox[1]], [bbox[2], bbox[3]]), + center: L.latLng(resource.point.coordinates) + }; + } + cb.call(context, results); + }, this, 'jsonp'); + }, + + reverse: function(location, scale, cb, context) { + L.Control.Geocoder.jsonp('//dev.virtualearth.net/REST/v1/Locations/' + location.lat + ',' + location.lng, { + key : this.key + }, function(data) { + var results = []; + for (var i = data.resourceSets[0].resources.length - 1; i >= 0; i--) { + var resource = data.resourceSets[0].resources[i], + bbox = resource.bbox; + results[i] = { + name: resource.name, + bbox: L.latLngBounds([bbox[0], bbox[1]], [bbox[2], bbox[3]]), + center: L.latLng(resource.point.coordinates) + }; + } + cb.call(context, results); + }, this, 'jsonp'); + } + }); + + L.Control.Geocoder.bing = function(key) { + return new L.Control.Geocoder.Bing(key); + }; + + L.Control.Geocoder.RaveGeo = L.Class.extend({ + options: { + querySuffix: '', + deepSearch: true, + wordBased: false + }, + + jsonp: function(params, callback, context) { + var callbackId = '_l_geocoder_' + (L.Control.Geocoder.callbackId++), + paramParts = []; + params.prepend = callbackId + '('; + params.append = ')'; + for (var p in params) { + paramParts.push(p + '=' + escape(params[p])); + } + + window[callbackId] = L.Util.bind(callback, context); + var script = document.createElement('script'); + script.type = 'text/javascript'; + script.src = this._serviceUrl + '?' + paramParts.join('&'); + script.id = callbackId; + document.getElementsByTagName('head')[0].appendChild(script); + }, + + initialize: function(serviceUrl, scheme, options) { + L.Util.setOptions(this, options); + + this._serviceUrl = serviceUrl; + this._scheme = scheme; + }, + + geocode: function(query, cb, context) { + L.Control.Geocoder.jsonp(this._serviceUrl, { + address: query + this.options.querySuffix, + scheme: this._scheme, + outputFormat: 'jsonp', + deepSearch: this.options.deepSearch, + wordBased: this.options.wordBased + }, function(data) { + var results = []; + for (var i = data.length - 1; i >= 0; i--) { + var r = data[i], + c = L.latLng(r.y, r.x); + results[i] = { + name: r.address, + bbox: L.latLngBounds([c]), + center: c + }; + } + cb.call(context, results); + }, this); + } + }); + + L.Control.Geocoder.raveGeo = function(serviceUrl, scheme, options) { + return new L.Control.Geocoder.RaveGeo(serviceUrl, scheme, options); + }; + + L.Control.Geocoder.MapQuest = L.Class.extend({ + initialize: function(key) { + // MapQuest seems to provide URI encoded API keys, + // so to avoid encoding them twice, we decode them here + this._key = decodeURIComponent(key); + }, + + _formatName: function() { + var r = [], + i; + for (i = 0; i < arguments.length; i++) { + if (arguments[i]) { + r.push(arguments[i]); + } + } + + return r.join(', '); + }, + + geocode: function(query, cb, context) { + L.Control.Geocoder.jsonp('//www.mapquestapi.com/geocoding/v1/address', { + key: this._key, + location: query, + limit: 5, + outFormat: 'json' + }, function(data) { + var results = [], + loc, + latLng; + if (data.results && data.results[0].locations) { + for (var i = data.results[0].locations.length - 1; i >= 0; i--) { + loc = data.results[0].locations[i]; + latLng = L.latLng(loc.latLng); + results[i] = { + name: this._formatName(loc.street, loc.adminArea4, loc.adminArea3, loc.adminArea1), + bbox: L.latLngBounds(latLng, latLng), + center: latLng + }; + } + } + + cb.call(context, results); + }, this); + }, + + reverse: function(location, scale, cb, context) { + L.Control.Geocoder.jsonp('//www.mapquestapi.com/geocoding/v1/reverse', { + key: this._key, + location: location.lat + ',' + location.lng, + outputFormat: 'json' + }, function(data) { + var results = [], + loc, + latLng; + if (data.results && data.results[0].locations) { + for (var i = data.results[0].locations.length - 1; i >= 0; i--) { + loc = data.results[0].locations[i]; + latLng = L.latLng(loc.latLng); + results[i] = { + name: this._formatName(loc.street, loc.adminArea4, loc.adminArea3, loc.adminArea1), + bbox: L.latLngBounds(latLng, latLng), + center: latLng + }; + } + } + + cb.call(context, results); + }, this); + } + }); + + L.Control.Geocoder.mapQuest = function(key) { + return new L.Control.Geocoder.MapQuest(key); + }; + + L.Control.Geocoder.Mapbox = L.Class.extend({ + options: { + service_url: 'https://api.tiles.mapbox.com/v4/geocode/mapbox.places-v1/' + }, + + initialize: function(access_token) { + this._access_token = access_token; + }, + + geocode: function(query, cb, context) { + L.Control.Geocoder.getJSON(this.options.service_url + encodeURIComponent(query) + '.json', { + access_token: this._access_token, + }, function(data) { + var results = [], + loc, + latLng, + latLngBounds; + if (data.features && data.features.length) { + for (var i = 0; i <= data.features.length - 1; i++) { + loc = data.features[i]; + latLng = L.latLng(loc.center.reverse()); + if(loc.hasOwnProperty('bbox')) + { + latLngBounds = L.latLngBounds(L.latLng(loc.bbox.slice(0, 2).reverse()), L.latLng(loc.bbox.slice(2, 4).reverse())); + } + else + { + latLngBounds = L.latLngBounds(latLng, latLng); + } + results[i] = { + name: loc.place_name, + bbox: latLngBounds, + center: latLng + }; + } + } + + cb.call(context, results); + }); + }, + + suggest: function(query, cb, context) { + return this.geocode(query, cb, context); + }, + + reverse: function(location, scale, cb, context) { + L.Control.Geocoder.getJSON(this.options.service_url + encodeURIComponent(location.lng) + ',' + encodeURIComponent(location.lat) + '.json', { + access_token: this._access_token, + }, function(data) { + var results = [], + loc, + latLng, + latLngBounds; + if (data.features && data.features.length) { + for (var i = 0; i <= data.features.length - 1; i++) { + loc = data.features[i]; + latLng = L.latLng(loc.center.reverse()); + if(loc.hasOwnProperty('bbox')) + { + latLngBounds = L.latLngBounds(L.latLng(loc.bbox.slice(0, 2).reverse()), L.latLng(loc.bbox.slice(2, 4).reverse())); + } + else + { + latLngBounds = L.latLngBounds(latLng, latLng); + } + results[i] = { + name: loc.place_name, + bbox: latLngBounds, + center: latLng + }; + } + } + + cb.call(context, results); + }); + } + }); + + L.Control.Geocoder.mapbox = function(access_token) { + return new L.Control.Geocoder.Mapbox(access_token); + }; + + L.Control.Geocoder.Google = L.Class.extend({ + options: { + service_url: 'https://maps.googleapis.com/maps/api/geocode/json' + }, + + initialize: function(key) { + this._key = key; + }, + + geocode: function(query, cb, context) { + var params = { + address: query, + }; + if(this._key && this._key.length) + { + params['key'] = this._key + } + + L.Control.Geocoder.getJSON(this.options.service_url, params, function(data) { + var results = [], + loc, + latLng, + latLngBounds; + if (data.results && data.results.length) { + for (var i = 0; i <= data.results.length - 1; i++) { + loc = data.results[i]; + latLng = L.latLng(loc.geometry.location); + latLngBounds = L.latLngBounds(L.latLng(loc.geometry.viewport.northeast), L.latLng(loc.geometry.viewport.southwest)); + results[i] = { + name: loc.formatted_address, + bbox: latLngBounds, + center: latLng + }; + } + } + + cb.call(context, results); + }); + }, + + reverse: function(location, scale, cb, context) { + var params = { + latlng: encodeURIComponent(location.lat) + ',' + encodeURIComponent(location.lng) + }; + if(this._key && this._key.length) + { + params['key'] = this._key + } + L.Control.Geocoder.getJSON(this.options.service_url, params, function(data) { + var results = [], + loc, + latLng, + latLngBounds; + if (data.results && data.results.length) { + for (var i = 0; i <= data.results.length - 1; i++) { + loc = data.results[i]; + latLng = L.latLng(loc.geometry.location); + latLngBounds = L.latLngBounds(L.latLng(loc.geometry.viewport.northeast), L.latLng(loc.geometry.viewport.southwest)); + results[i] = { + name: loc.formatted_address, + bbox: latLngBounds, + center: latLng + }; + } + } + + cb.call(context, results); + }); + } + }); + + L.Control.Geocoder.google = function(key) { + return new L.Control.Geocoder.Google(key); + }; + return L.Control.Geocoder; +})); diff --git a/js/Control.MiniMap.js b/js/Control.MiniMap.js new file mode 100644 index 0000000..bd59741 --- /dev/null +++ b/js/Control.MiniMap.js @@ -0,0 +1,331 @@ +// Following https://github.com/Leaflet/Leaflet/blob/master/PLUGIN-GUIDE.md +(function (factory, window) { + + // define an AMD module that relies on 'leaflet' + if (typeof define === 'function' && define.amd) { + define(['leaflet'], factory); + + // define a Common JS module that relies on 'leaflet' + } else if (typeof exports === 'object') { + module.exports = factory(require('leaflet')); + } + + // attach your plugin to the global 'L' variable + if (typeof window !== 'undefined' && window.L) { + window.L.Control.MiniMap = factory(L); + window.L.control.minimap = function (layer, options) { + return new window.L.Control.MiniMap(layer, options); + }; + } +}(function (L) { + + var MiniMap = L.Control.extend({ + options: { + position: 'bottomright', + toggleDisplay: false, + zoomLevelOffset: -5, + zoomLevelFixed: false, + centerFixed: false, + zoomAnimation: false, + autoToggleDisplay: false, + minimized: false, + width: 150, + height: 150, + collapsedWidth: 19, + collapsedHeight: 19, + aimingRectOptions: {color: '#ff7800', weight: 1, clickable: false}, + shadowRectOptions: {color: '#000000', weight: 1, clickable: false, opacity: 0, fillOpacity: 0}, + strings: {hideText: 'Hide MiniMap', showText: 'Show MiniMap'}, + mapOptions: {} // Allows definition / override of Leaflet map options. + }, + + // layer is the map layer to be shown in the minimap + initialize: function (layer, options) { + L.Util.setOptions(this, options); + // Make sure the aiming rects are non-clickable even if the user tries to set them clickable (most likely by forgetting to specify them false) + this.options.aimingRectOptions.clickable = false; + this.options.shadowRectOptions.clickable = false; + this._layer = layer; + }, + + onAdd: function (map) { + + this._mainMap = map; + + // Creating the container and stopping events from spilling through to the main map. + this._container = L.DomUtil.create('div', 'leaflet-control-minimap'); + this._container.style.width = this.options.width + 'px'; + this._container.style.height = this.options.height + 'px'; + L.DomEvent.disableClickPropagation(this._container); + L.DomEvent.on(this._container, 'mousewheel', L.DomEvent.stopPropagation); + + var mapOptions = { + attributionControl: false, + dragging: !this.options.centerFixed, + zoomControl: false, + zoomAnimation: this.options.zoomAnimation, + autoToggleDisplay: this.options.autoToggleDisplay, + touchZoom: this.options.centerFixed ? 'center' : !this._isZoomLevelFixed(), + scrollWheelZoom: this.options.centerFixed ? 'center' : !this._isZoomLevelFixed(), + doubleClickZoom: this.options.centerFixed ? 'center' : !this._isZoomLevelFixed(), + boxZoom: !this._isZoomLevelFixed(), + crs: map.options.crs + }; + mapOptions = L.Util.extend(this.options.mapOptions, mapOptions); // merge with priority of the local mapOptions object. + + this._miniMap = new L.Map(this._container, mapOptions); + + this._miniMap.addLayer(this._layer); + + // These bools are used to prevent infinite loops of the two maps notifying each other that they've moved. + this._mainMapMoving = false; + this._miniMapMoving = false; + + // Keep a record of this to prevent auto toggling when the user explicitly doesn't want it. + this._userToggledDisplay = false; + this._minimized = false; + + if (this.options.toggleDisplay) { + this._addToggleButton(); + } + + this._miniMap.whenReady(L.Util.bind(function () { + this._aimingRect = L.rectangle(this._mainMap.getBounds(), this.options.aimingRectOptions).addTo(this._miniMap); + this._shadowRect = L.rectangle(this._mainMap.getBounds(), this.options.shadowRectOptions).addTo(this._miniMap); + this._mainMap.on('moveend', this._onMainMapMoved, this); + this._mainMap.on('move', this._onMainMapMoving, this); + this._miniMap.on('movestart', this._onMiniMapMoveStarted, this); + this._miniMap.on('move', this._onMiniMapMoving, this); + this._miniMap.on('moveend', this._onMiniMapMoved, this); + }, this)); + + return this._container; + }, + + addTo: function (map) { + L.Control.prototype.addTo.call(this, map); + + var center = this.options.centerFixed || this._mainMap.getCenter(); + this._miniMap.setView(center, this._decideZoom(true)); + this._setDisplay(this.options.minimized); + return this; + }, + + onRemove: function (map) { + this._mainMap.off('moveend', this._onMainMapMoved, this); + this._mainMap.off('move', this._onMainMapMoving, this); + this._miniMap.off('moveend', this._onMiniMapMoved, this); + + this._miniMap.removeLayer(this._layer); + }, + + changeLayer: function (layer) { + this._miniMap.removeLayer(this._layer); + this._layer = layer; + this._miniMap.addLayer(this._layer); + }, + + _addToggleButton: function () { + this._toggleDisplayButton = this.options.toggleDisplay ? this._createButton( + '', this._toggleButtonInitialTitleText(), ('leaflet-control-minimap-toggle-display leaflet-control-minimap-toggle-display-' + + this.options.position), this._container, this._toggleDisplayButtonClicked, this) : undefined; + + this._toggleDisplayButton.style.width = this.options.collapsedWidth + 'px'; + this._toggleDisplayButton.style.height = this.options.collapsedHeight + 'px'; + }, + + _toggleButtonInitialTitleText: function () { + if (this.options.minimized) { + return this.options.strings.showText; + } else { + return this.options.strings.hideText; + } + }, + + _createButton: function (html, title, className, container, fn, context) { + var link = L.DomUtil.create('a', className, container); + link.innerHTML = html; + link.href = '#'; + link.title = title; + + var stop = L.DomEvent.stopPropagation; + + L.DomEvent + .on(link, 'click', stop) + .on(link, 'mousedown', stop) + .on(link, 'dblclick', stop) + .on(link, 'click', L.DomEvent.preventDefault) + .on(link, 'click', fn, context); + + return link; + }, + + _toggleDisplayButtonClicked: function () { + this._userToggledDisplay = true; + if (!this._minimized) { + this._minimize(); + } else { + this._restore(); + } + }, + + _setDisplay: function (minimize) { + if (minimize !== this._minimized) { + if (!this._minimized) { + this._minimize(); + } else { + this._restore(); + } + } + }, + + _minimize: function () { + // hide the minimap + if (this.options.toggleDisplay) { + this._container.style.width = this.options.collapsedWidth + 'px'; + this._container.style.height = this.options.collapsedHeight + 'px'; + this._toggleDisplayButton.className += (' minimized-' + this.options.position); + this._toggleDisplayButton.title = this.options.strings.showText; + } else { + this._container.style.display = 'none'; + } + this._minimized = true; + }, + + _restore: function () { + if (this.options.toggleDisplay) { + this._container.style.width = this.options.width + 'px'; + this._container.style.height = this.options.height + 'px'; + this._toggleDisplayButton.className = this._toggleDisplayButton.className + .replace('minimized-' + this.options.position, ''); + this._toggleDisplayButton.title = this.options.strings.hideText; + } else { + this._container.style.display = 'block'; + } + this._minimized = false; + }, + + _onMainMapMoved: function (e) { + if (!this._miniMapMoving) { + var center = this.options.centerFixed || this._mainMap.getCenter(); + + this._mainMapMoving = true; + this._miniMap.setView(center, this._decideZoom(true)); + this._setDisplay(this._decideMinimized()); + } else { + this._miniMapMoving = false; + } + this._aimingRect.setBounds(this._mainMap.getBounds()); + }, + + _onMainMapMoving: function (e) { + this._aimingRect.setBounds(this._mainMap.getBounds()); + }, + + _onMiniMapMoveStarted: function (e) { + if (!this.options.centerFixed) { + var lastAimingRect = this._aimingRect.getBounds(); + var sw = this._miniMap.latLngToContainerPoint(lastAimingRect.getSouthWest()); + var ne = this._miniMap.latLngToContainerPoint(lastAimingRect.getNorthEast()); + this._lastAimingRectPosition = {sw: sw, ne: ne}; + } + }, + + _onMiniMapMoving: function (e) { + if (!this.options.centerFixed) { + if (!this._mainMapMoving && this._lastAimingRectPosition) { + this._shadowRect.setBounds(new L.LatLngBounds(this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.sw), this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.ne))); + this._shadowRect.setStyle({opacity: 1, fillOpacity: 0.3}); + } + } + }, + + _onMiniMapMoved: function (e) { + if (!this._mainMapMoving) { + this._miniMapMoving = true; + this._mainMap.setView(this._miniMap.getCenter(), this._decideZoom(false)); + this._shadowRect.setStyle({opacity: 0, fillOpacity: 0}); + } else { + this._mainMapMoving = false; + } + }, + + _isZoomLevelFixed: function () { + var zoomLevelFixed = this.options.zoomLevelFixed; + return this._isDefined(zoomLevelFixed) && this._isInteger(zoomLevelFixed); + }, + + _decideZoom: function (fromMaintoMini) { + if (!this._isZoomLevelFixed()) { + if (fromMaintoMini) { + return this._mainMap.getZoom() + this.options.zoomLevelOffset; + } else { + var currentDiff = this._miniMap.getZoom() - this._mainMap.getZoom(); + var proposedZoom = this._miniMap.getZoom() - this.options.zoomLevelOffset; + var toRet; + + if (currentDiff > this.options.zoomLevelOffset && this._mainMap.getZoom() < this._miniMap.getMinZoom() - this.options.zoomLevelOffset) { + // This means the miniMap is zoomed out to the minimum zoom level and can't zoom any more. + if (this._miniMap.getZoom() > this._lastMiniMapZoom) { + // This means the user is trying to zoom in by using the minimap, zoom the main map. + toRet = this._mainMap.getZoom() + 1; + // Also we cheat and zoom the minimap out again to keep it visually consistent. + this._miniMap.setZoom(this._miniMap.getZoom() - 1); + } else { + // Either the user is trying to zoom out past the mini map's min zoom or has just panned using it, we can't tell the difference. + // Therefore, we ignore it! + toRet = this._mainMap.getZoom(); + } + } else { + // This is what happens in the majority of cases, and always if you configure the min levels + offset in a sane fashion. + toRet = proposedZoom; + } + this._lastMiniMapZoom = this._miniMap.getZoom(); + return toRet; + } + } else { + if (fromMaintoMini) { + return this.options.zoomLevelFixed; + } else { + return this._mainMap.getZoom(); + } + } + }, + + _decideMinimized: function () { + if (this._userToggledDisplay) { + return this._minimized; + } + + if (this.options.autoToggleDisplay) { + if (this._mainMap.getBounds().contains(this._miniMap.getBounds())) { + return true; + } + return false; + } + + return this._minimized; + }, + + _isInteger: function (value) { + return typeof value === 'number'; + }, + + _isDefined: function (value) { + return typeof value !== 'undefined'; + } + }); + + L.Map.mergeOptions({ + miniMapControl: false + }); + + L.Map.addInitHook(function () { + if (this.options.miniMapControl) { + this.miniMapControl = (new MiniMap()).addTo(this); + } + }); + + return MiniMap; + +}, window)); diff --git a/js/L.Control.Locate.min.js b/js/L.Control.Locate.min.js new file mode 100644 index 0000000..8f40908 --- /dev/null +++ b/js/L.Control.Locate.min.js @@ -0,0 +1,11 @@ +/*! Version: 0.42.0 +Date: 2015-04-29 */ + +/*! +Copyright (c) 2014 Dominik Moritz + +This file is part of the leaflet locate control. It is licensed under the MIT license. +You can find the project at: https://github.com/domoritz/leaflet-locatecontrol +*/ +!function(a,b){"function"==typeof define&&define.amd?define(["leaflet"],a):"object"==typeof exports&&(module.exports=a("undefined"!=typeof b&&b.L?L:require("leaflet"))),"undefined"!=typeof b&&b.L&&(b.L.Locate=a(L))}(function(a){return a.Control.Locate=a.Control.extend({options:{position:"topleft",drawCircle:!0,follow:!1,stopFollowingOnDrag:!1,remainActive:!1,markerClass:a.circleMarker,circleStyle:{color:"#136AEC",fillColor:"#136AEC",fillOpacity:.15,weight:2,opacity:.5},markerStyle:{color:"#136AEC",fillColor:"#2A93EE",fillOpacity:.7,weight:2,opacity:.9,radius:5},followCircleStyle:{},followMarkerStyle:{},icon:"fa fa-map-marker",iconLoading:"fa fa-spinner fa-spin",circlePadding:[0,0],metric:!0,onLocationError:function(a){alert(a.message)},onLocationOutsideMapBounds:function(a){a.stop(),alert(a.options.strings.outsideMapBoundsMsg)},setView:!0,keepCurrentZoomLevel:!1,showPopup:!0,strings:{title:"Show me where I am",popup:"You are within {distance} {unit} from this point",outsideMapBoundsMsg:"You seem located outside the boundaries of the map"},locateOptions:{maxZoom:1/0,watch:!0}},initialize:function(b){a.Map.addInitHook(function(){this.options.locateControl&&(this.locateControl=a.control.locate(),this.addControl(this.locateControl))});for(var c in b)"object"==typeof this.options[c]?a.extend(this.options[c],b[c]):this.options[c]=b[c];a.extend(this.options.locateOptions,{setView:!1})},_activate:function(){this.options.setView&&(this._locateOnNextLocationFound=!0),this._active||this._map.locate(this.options.locateOptions),this._active=!0,this.options.follow&&this._startFollowing(this._map)},_deactivate:function(){this._map.stopLocate(),this._map.off("dragstart",this._stopFollowing),this.options.follow&&this._following&&this._stopFollowing(this._map)},drawMarker:function(b){void 0===this._event.accuracy&&(this._event.accuracy=0);var c=this._event.accuracy;this._locateOnNextLocationFound&&(this._isOutsideMapBounds()?this.options.onLocationOutsideMapBounds(this):this.options.keepCurrentZoomLevel||!this.options.drawCircle?b.panTo([this._event.latitude,this._event.longitude]):b.fitBounds(this._event.bounds,{padding:this.options.circlePadding,maxZoom:this.options.keepCurrentZoomLevel?b.getZoom():this.options.locateOptions.maxZoom}),this._locateOnNextLocationFound=!1);var d,e;if(this.options.drawCircle)if(d=this._following?this.options.followCircleStyle:this.options.circleStyle,this._circle){this._circle.setLatLng(this._event.latlng).setRadius(c);for(e in d)this._circle.options[e]=d[e]}else this._circle=a.circle(this._event.latlng,c,d).addTo(this._layer);var f,g;this.options.metric?(f=c.toFixed(0),g="meters"):(f=(3.2808399*c).toFixed(0),g="feet");var h;h=this._following?this.options.followMarkerStyle:this.options.markerStyle,this._marker?this.updateMarker(this._event.latlng,h):this._marker=this.createMarker(this._event.latlng,h).addTo(this._layer);var i=this.options.strings.popup;this.options.showPopup&&i&&this._marker.bindPopup(a.Util.template(i,{distance:f,unit:g}))._popup.setLatLng(this._event.latlng),this._toggleContainerStyle()},createMarker:function(a,b){return this.options.markerClass(a,b)},updateMarker:function(a,b){this._marker.setLatLng(a);for(var c in b)this._marker.options[c]=b[c]},removeMarker:function(){this._layer.clearLayers(),this._marker=void 0,this._circle=void 0},onAdd:function(b){var c=a.DomUtil.create("div","leaflet-control-locate leaflet-bar leaflet-control");this._layer=new a.LayerGroup,this._layer.addTo(b),this._event=void 0;var d={};return a.extend(d,this.options.markerStyle,this.options.followMarkerStyle),this.options.followMarkerStyle=d,d={},a.extend(d,this.options.circleStyle,this.options.followCircleStyle),this.options.followCircleStyle=d,this._link=a.DomUtil.create("a","leaflet-bar-part leaflet-bar-part-single",c),this._link.href="#",this._link.title=this.options.strings.title,this._icon=a.DomUtil.create("span",this.options.icon,this._link),a.DomEvent.on(this._link,"click",a.DomEvent.stopPropagation).on(this._link,"click",a.DomEvent.preventDefault).on(this._link,"click",function(){var a=void 0===this._event||this._map.getBounds().contains(this._event.latlng)||!this.options.setView||this._isOutsideMapBounds();!this.options.remainActive&&this._active&&a?this.stop():this.start()},this).on(this._link,"dblclick",a.DomEvent.stopPropagation),this._resetVariables(),this.bindEvents(b),c},bindEvents:function(a){a.on("locationfound",this._onLocationFound,this),a.on("locationerror",this._onLocationError,this),a.on("unload",this.stop,this)},start:function(){this._activate(),this._event?this.drawMarker(this._map):this._setClasses("requesting")},stop:function(){this._deactivate(),this._cleanClasses(),this._resetVariables(),this.removeMarker()},_onLocationError:function(a){3==a.code&&this.options.locateOptions.watch||(this.stop(),this.options.onLocationError(a))},_onLocationFound:function(a){this._event&&this._event.latlng.lat===a.latlng.lat&&this._event.latlng.lng===a.latlng.lng&&this._event.accuracy===a.accuracy||this._active&&(this._event=a,this.options.follow&&this._following&&(this._locateOnNextLocationFound=!0),this.drawMarker(this._map))},_startFollowing:function(){this._map.fire("startfollowing",this),this._following=!0,this.options.stopFollowingOnDrag&&this._map.on("dragstart",this._stopFollowing,this)},_stopFollowing:function(){this._map.fire("stopfollowing",this),this._following=!1,this.options.stopFollowingOnDrag&&this._map.off("dragstart",this._stopFollowing),this._toggleContainerStyle()},_isOutsideMapBounds:function(){return void 0===this._event?!1:this._map.options.maxBounds&&!this._map.options.maxBounds.contains(this._event.latlng)},_toggleContainerStyle:function(){this._container&&this._setClasses(this._following?"following":"active")},_setClasses:function(b){"requesting"==b?(a.DomUtil.removeClasses(this._container,"active following"),a.DomUtil.addClasses(this._container,"requesting"),a.DomUtil.removeClasses(this._icon,this.options.icon),a.DomUtil.addClasses(this._icon,this.options.iconLoading)):"active"==b?(a.DomUtil.removeClasses(this._container,"requesting following"),a.DomUtil.addClasses(this._container,"active"),a.DomUtil.removeClasses(this._icon,this.options.iconLoading),a.DomUtil.addClasses(this._icon,this.options.icon)):"following"==b&&(a.DomUtil.removeClasses(this._container,"requesting"),a.DomUtil.addClasses(this._container,"active following"),a.DomUtil.removeClasses(this._icon,this.options.iconLoading),a.DomUtil.addClasses(this._icon,this.options.icon))},_cleanClasses:function(){a.DomUtil.removeClass(this._container,"requesting"),a.DomUtil.removeClass(this._container,"active"),a.DomUtil.removeClass(this._container,"following"),a.DomUtil.removeClasses(this._icon,this.options.iconLoading),a.DomUtil.addClasses(this._icon,this.options.icon)},_resetVariables:function(){this._active=!1,this._locateOnNextLocationFound=this.options.setView,this._following=!1}}),a.Map.addInitHook(function(){this.options.locateControl&&(this.locateControl=a.control.locate(),this.addControl(this.locateControl))}),a.control.locate=function(b){return new a.Control.Locate(b)},function(){var b=function(b,c,d){d=d.split(" "),d.forEach(function(d){a.DomUtil[b].call(this,c,d)})};a.DomUtil.addClasses=function(a,c){b("addClass",a,c)},a.DomUtil.removeClasses=function(a,c){b("removeClass",a,c)}}(),a.Control.Locate},window); +//# sourceMappingURL=L.Control.Locate.min.js.map \ No newline at end of file diff --git a/js/L.Control.MousePosition.js b/js/L.Control.MousePosition.js new file mode 100644 index 0000000..656bc78 --- /dev/null +++ b/js/L.Control.MousePosition.js @@ -0,0 +1,48 @@ +L.Control.MousePosition = L.Control.extend({ + options: { + position: 'bottomleft', + separator: ' : ', + emptyString: 'Unavailable', + lngFirst: false, + numDigits: 5, + lngFormatter: undefined, + latFormatter: undefined, + prefix: "" + }, + + onAdd: function (map) { + this._container = L.DomUtil.create('div', 'leaflet-control-mouseposition'); + L.DomEvent.disableClickPropagation(this._container); + map.on('mousemove', this._onMouseMove, this); + this._container.innerHTML=this.options.emptyString; + return this._container; + }, + + onRemove: function (map) { + map.off('mousemove', this._onMouseMove) + }, + + _onMouseMove: function (e) { + var lng = this.options.lngFormatter ? this.options.lngFormatter(e.latlng.lng) : L.Util.formatNum(e.latlng.lng, this.options.numDigits); + var lat = this.options.latFormatter ? this.options.latFormatter(e.latlng.lat) : L.Util.formatNum(e.latlng.lat, this.options.numDigits); + var value = this.options.lngFirst ? lng + this.options.separator + lat : lat + this.options.separator + lng; + var prefixAndValue = this.options.prefix + ' ' + value; + this._container.innerHTML = prefixAndValue; + } + +}); + +L.Map.mergeOptions({ + positionControl: false +}); + +L.Map.addInitHook(function () { + if (this.options.positionControl) { + this.positionControl = new L.Control.MousePosition(); + this.addControl(this.positionControl); + } +}); + +L.control.mousePosition = function (options) { + return new L.Control.MousePosition(options); +}; diff --git a/js/L.activearea.js b/js/L.activearea.js new file mode 100644 index 0000000..e4f54c0 --- /dev/null +++ b/js/L.activearea.js @@ -0,0 +1,180 @@ +(function(previousMethods){ +if (typeof previousMethods === 'undefined') { + // Defining previously that object allows you to use that plugin even if you have overridden L.map + previousMethods = { + getCenter: L.Map.prototype.getCenter, + setView: L.Map.prototype.setView, + setZoomAround: L.Map.prototype.setZoomAround, + getBoundsZoom: L.Map.prototype.getBoundsZoom, + scaleUpdate: L.Control.Scale.prototype._update + }; +} + + +L.Map.include({ + getBounds: function() { + if (this._viewport) { + return this.getViewportLatLngBounds() + } else { + var bounds = this.getPixelBounds(), + sw = this.unproject(bounds.getBottomLeft()), + ne = this.unproject(bounds.getTopRight()); + + return new L.LatLngBounds(sw, ne); + } + }, + + getViewport: function() { + return this._viewport; + }, + + getViewportBounds: function() { + var vp = this._viewport, + topleft = L.point(vp.offsetLeft, vp.offsetTop), + vpsize = L.point(vp.clientWidth, vp.clientHeight); + + if (vpsize.x === 0 || vpsize.y === 0) { + //Our own viewport has no good size - so we fallback to the container size: + vp = this.getContainer(); + if(vp){ + topleft = L.point(0, 0); + vpsize = L.point(vp.clientWidth, vp.clientHeight); + } + + } + + return L.bounds(topleft, topleft.add(vpsize)); + }, + + getViewportLatLngBounds: function() { + var bounds = this.getViewportBounds(); + return L.latLngBounds(this.containerPointToLatLng(bounds.min), this.containerPointToLatLng(bounds.max)); + }, + + getOffset: function() { + var mCenter = this.getSize().divideBy(2), + vCenter = this.getViewportBounds().getCenter(); + + return mCenter.subtract(vCenter); + }, + + getCenter: function () { + var center = previousMethods.getCenter.call(this); + + if (this.getViewport()) { + var zoom = this.getZoom(), + point = this.project(center, zoom); + point = point.subtract(this.getOffset()); + + center = this.unproject(point, zoom); + } + + return center; + }, + + setView: function (center, zoom, options) { + center = L.latLng(center); + zoom = zoom || this.getZoom(); + + if (this.getViewport()) { + var point = this.project(center, this._limitZoom(zoom)); + point = point.add(this.getOffset()); + center = this.unproject(point, this._limitZoom(zoom)); + } + + return previousMethods.setView.call(this, center, zoom, options); + }, + + setZoomAround: function (latlng, zoom, options) { + var vp = this.getViewport(); + + if (vp) { + var scale = this.getZoomScale(zoom), + viewHalf = this.getViewportBounds().getCenter(), + containerPoint = latlng instanceof L.Point ? latlng : this.latLngToContainerPoint(latlng), + + centerOffset = containerPoint.subtract(viewHalf).multiplyBy(1 - 1 / scale), + newCenter = this.containerPointToLatLng(viewHalf.add(centerOffset)); + + return this.setView(newCenter, zoom, {zoom: options}); + } else { + return previousMethods.setZoomAround.call(this, latlng, zoom, options); + } + }, + + getBoundsZoom: function (bounds, inside, padding) { // (LatLngBounds[, Boolean, Point]) -> Number + bounds = L.latLngBounds(bounds); + + var zoom = this.getMinZoom() - (inside ? 1 : 0), + maxZoom = this.getMaxZoom(), + vp = this.getViewport(), + size = (vp) ? L.point(vp.clientWidth, vp.clientHeight) : this.getSize(), + + nw = bounds.getNorthWest(), + se = bounds.getSouthEast(), + + zoomNotFound = true, + boundsSize; + + padding = L.point(padding || [0, 0]); + + do { + zoom++; + boundsSize = this.project(se, zoom).subtract(this.project(nw, zoom)).add(padding); + zoomNotFound = !inside ? size.contains(boundsSize) : boundsSize.x < size.x || boundsSize.y < size.y; + + } while (zoomNotFound && zoom <= maxZoom); + + if (zoomNotFound && inside) { + return null; + } + + return inside ? zoom : zoom - 1; + } +}); + +L.Control.Scale.include({ + _update: function () { + if (!this._map._viewport) { + previousMethods.scaleUpdate.call(this); + } else { + var bounds = this._map.getBounds(), + centerLat = bounds.getCenter().lat, + halfWorldMeters = 6378137 * Math.PI * Math.cos(centerLat * Math.PI / 180), + dist = halfWorldMeters * (bounds.getNorthEast().lng - bounds.getSouthWest().lng) / 180, + + size = this._map.getSize(), + options = this.options, + maxMeters = 0; + + var size = new L.Point( + this._map._viewport.clientWidth, + this._map._viewport.clientHeight); + + if (size.x > 0) { + maxMeters = dist * (options.maxWidth / size.x); + } + + this._updateScales(options, maxMeters); + } + } +}); + +L.Map.include({ + setActiveArea: function (css) { + if( !this._viewport ){ + //Make viewport if not already made + var container = this.getContainer(); + this._viewport = L.DomUtil.create('div', ''); + container.insertBefore(this._viewport, container.firstChild); + } + + if (typeof css === 'string') { + this._viewport.className = css; + } else { + L.extend(this._viewport.style, css); + } + return this; + } +}); +})(window.leafletActiveAreaPreviousMethods); diff --git a/js/Leaflet.Elevation-0.0.2.min.js b/js/Leaflet.Elevation-0.0.2.min.js new file mode 100644 index 0000000..ea1c1ad --- /dev/null +++ b/js/Leaflet.Elevation-0.0.2.min.js @@ -0,0 +1,2 @@ +/*! Leaflet.Elevation 21-02-2014 */ +L.Control.Elevation=L.Control.extend({options:{position:"topright",theme:"lime-theme",width:600,height:175,margins:{top:10,right:20,bottom:30,left:50},useHeightIndicator:!0,interpolation:"linear",hoverNumber:{decimalsX:3,decimalsY:0,formatter:void 0},xTicks:void 0,yTicks:void 0,collapsed:!1},onRemove:function(){this._container=null,this._data=null,this._dist=null},onAdd:function(a){this._map=a;var b=this.options,c=b.margins;b.width=b.width-c.left-c.right,b.height=b.height-c.top-c.bottom,b.xTicks=b.xTicks||Math.round(b.width/75),b.yTicks=b.yTicks||Math.round(b.height/30),b.hoverNumber.formatter=b.hoverNumber.formatter||this._formatter,d3.select("body").classed(b.theme,!0);var d=this._x=d3.scale.linear().range([0,b.width]),e=this._y=d3.scale.linear().range([b.height,0]),f=(this._area=d3.svg.area().interpolate(b.interpolation).x(function(a){return d(a.dist)}).y0(b.height).y1(function(a){return e(a.altitude)}),this._container=L.DomUtil.create("div","elevation"));this._initToggle();var g=b.width+c.left+c.right,h=d3.select(f);h.attr("width",g);var i=h.append("svg");i.attr("width",g).attr("class","background").attr("height",b.height+c.top+c.bottom).append("g").attr("transform","translate("+c.left+","+c.top+")");var j=d3.svg.line();j=j.x(function(){return d3.mouse(i.select("g"))[0]}).y(function(){return b.height});var k=d3.select(this._container).select("svg").select("g");this._areapath=k.append("path").attr("class","area");var l=this._background=k.append("rect").attr("width",b.width).attr("height",b.height).style("fill","none").style("stroke","none").style("pointer-events","all");L.Browser.touch?(l.on("touchmove.drag",this._dragHandler.bind(this)).on("touchstart.drag",this._dragStartHandler.bind(this)).on("touchstart.focus",this._mousemoveHandler.bind(this)),L.DomEvent.on(this._container,"touchend",this._dragEndHandler,this)):(l.on("mousemove.focus",this._mousemoveHandler.bind(this)).on("mouseout.focus",this._mouseoutHandler.bind(this)).on("mousedown.drag",this._dragStartHandler.bind(this)).on("mousemove.drag",this._dragHandler.bind(this)),L.DomEvent.on(this._container,"mouseup",this._dragEndHandler,this)),this._xaxisgraphicnode=k.append("g"),this._yaxisgraphicnode=k.append("g"),this._appendXaxis(this._xaxisgraphicnode),this._appendYaxis(this._yaxisgraphicnode);var m=this._focusG=k.append("g");return this._mousefocus=m.append("svg:line").attr("class","mouse-focus-line").attr("x2","0").attr("y2","0").attr("x1","0").attr("y1","0"),this._focuslabelX=m.append("svg:text").style("pointer-events","none").attr("class","mouse-focus-label-x"),this._focuslabelY=m.append("svg:text").style("pointer-events","none").attr("class","mouse-focus-label-y"),f},_dragHandler:function(){d3.event.preventDefault(),d3.event.stopPropagation(),this._gotDragged=!0,this._drawDragRectangle()},_drawDragRectangle:function(){if(this._dragStartCoords){var a=this._dragCurrentCoords=d3.mouse(this._background.node()),b=Math.min(this._dragStartCoords[0],a[0]),c=Math.max(this._dragStartCoords[0],a[0]);if(this._dragRectangle||this._dragRectangleG)this._dragRectangle.attr("width",c-b).attr("x",b);else{var d=d3.select(this._container).select("svg").select("g");this._dragRectangleG=d.append("g"),this._dragRectangle=this._dragRectangleG.append("rect").attr("width",c-b).attr("height",this.options.height).attr("x",b).attr("class","mouse-drag").style("pointer-events","none")}}},_resetDrag:function(){if(this._dragRectangleG){this._dragRectangleG.remove(),this._dragRectangleG=null,this._dragRectangle=null,this._hidePositionMarker();var a=L.latLngBounds(this._data[0].latlng,this._data[0].latlng);a.extend(this._data[this._data.length-1].latlng),this._map.fitBounds(a)}},_dragEndHandler:function(){if(!this._dragStartCoords||!this._gotDragged)return this._dragStartCoords=null,this._gotDragged=!1,void this._resetDrag();this._hidePositionMarker();var a=this._findItemForX(this._dragStartCoords[0]),b=this._findItemForX(this._dragCurrentCoords[0]),c=L.latLngBounds(a.latlng,a.latlng);c.extend(b.latlng),this._map.fitBounds(c),this._dragStartCoords=null,this._gotDragged=!1},_dragStartHandler:function(){this._gotDragged=!1,this._dragStartCoords=d3.mouse(this._background.node())},_findItemForX:function(a){var b=d3.bisector(function(a){return a.dist}).left,c=this._x.invert(a),d=b(this._data,c);return this._data[d]},_initToggle:function(){var a=this._container;if(a.setAttribute("aria-haspopup",!0),L.Browser.touch?L.DomEvent.on(a,"click",L.DomEvent.stopPropagation):L.DomEvent.disableClickPropagation(a),this.options.collapsed){this._collapse(),L.Browser.android||L.DomEvent.on(a,"mouseover",this._expand,this).on(a,"mouseout",this._collapse,this);var b=this._button=L.DomUtil.create("a","elevation-toggle",a);b.href="#",b.title="Elevation",L.Browser.touch?L.DomEvent.on(b,"click",L.DomEvent.stop).on(b,"click",this._expand,this):L.DomEvent.on(b,"focus",this._expand,this),this._map.on("click",this._collapse,this)}},_expand:function(){this._container.className=this._container.className.replace(" elevation-collapsed","")},_collapse:function(){L.DomUtil.addClass(this._container,"elevation-collapsed")},_formatter:function(a,b,c){var d;d=0===b?Math.round(a)+"":L.Util.formatNum(a,b)+"";var e=d.split(".");if(e[1]){for(var f=b-e[1].length;f>0;f--)e[1]+="0";d=e.join(c||".")}return d},_appendYaxis:function(a){a.attr("class","y axis").call(d3.svg.axis().scale(this._y).ticks(this.options.yTicks).orient("left")).append("text").attr("x",-10).style("text-anchor","end").text("m")},_appendXaxis:function(a){a.attr("class","x axis").attr("transform","translate(0,"+this.options.height+")").call(d3.svg.axis().scale(this._x).ticks(this.options.xTicks).orient("bottom")).append("text").attr("x",this.options.width+20).attr("y",15).style("text-anchor","end").text("km")},_updateAxis:function(){this._xaxisgraphicnode.selectAll("g").remove(),this._xaxisgraphicnode.selectAll("path").remove(),this._xaxisgraphicnode.selectAll("text").remove(),this._yaxisgraphicnode.selectAll("g").remove(),this._yaxisgraphicnode.selectAll("path").remove(),this._yaxisgraphicnode.selectAll("text").remove(),this._appendXaxis(this._xaxisgraphicnode),this._appendYaxis(this._yaxisgraphicnode)},_mouseoutHandler:function(){this._hidePositionMarker()},_hidePositionMarker:function(){this._marker&&(this._map.removeLayer(this._marker),this._marker=null),this._mouseHeightFocus&&(this._mouseHeightFocus.style("visibility","hidden"),this._mouseHeightFocusLabel.style("visibility","hidden")),this._pointG&&this._pointG.style("visibility","hidden"),this._focusG.style("visibility","hidden")},_mousemoveHandler:function(){if(this._data&&0!==this._data.length){var a=d3.mouse(this._background.node()),b=this.options;this._focusG.style("visibility","visible"),this._mousefocus.attr("x1",a[0]).attr("y1",0).attr("x2",a[0]).attr("y2",b.height).classed("hidden",!1);var c=d3.bisector(function(a){return a.dist}).left,d=this._x.invert(a[0]),e=c(this._data,d),f=this._data[e].altitude,g=this._data[e].dist,h=this._data[e].latlng,i=b.hoverNumber.formatter(f,b.hoverNumber.decimalsY),j=b.hoverNumber.formatter(g,b.hoverNumber.decimalsX);this._focuslabelX.attr("x",a[0]).text(i+" m"),this._focuslabelY.attr("y",b.height-5).attr("x",a[0]).text(j+" km");var k=this._map.latLngToLayerPoint(h);if(b.useHeightIndicator){if(!this._mouseHeightFocus){var l=d3.select(".leaflet-overlay-pane svg").append("g");this._mouseHeightFocus=l.append("svg:line").attr("class","height-focus line").attr("x2","0").attr("y2","0").attr("x1","0").attr("y1","0");var m=this._pointG=l.append("g");m.append("svg:circle").attr("r",6).attr("cx",0).attr("cy",0).attr("class","height-focus circle-lower"),this._mouseHeightFocusLabel=l.append("svg:text").attr("class","height-focus-label").style("pointer-events","none")}var n=this.options.height/this._maxElevation*f,o=k.y-n;this._mouseHeightFocus.attr("x1",k.x).attr("x2",k.x).attr("y1",k.y).attr("y2",o).style("visibility","visible"),this._pointG.attr("transform","translate("+k.x+","+k.y+")").style("visibility","visible"),this._mouseHeightFocusLabel.attr("x",k.x).attr("y",o).text(f+" m").style("visibility","visible")}else this._marker?this._marker.setLatLng(h):this._marker=new L.Marker(h).addTo(this._map)}},_addGeoJSONData:function(a){if(a){for(var b=this._data||[],c=this._dist||0,d=this._maxElevation||0,e=0;e'; + response_text += 'Zoneinfo key: ' + this.olson_tz + '
'; + response_text += 'Zone uses DST: ' + (this.uses_dst ? 'yes' : 'no') + '
'; + + return response_text; +}; + +/** + * Checks if a timezone has possible ambiguities. I.e timezones that are similar. + * + * If the preliminary scan determines that we're in America/Denver. We double check + * here that we're really there and not in America/Mazatlan. + * + * This is done by checking known dates for when daylight savings start for different + * timezones. + */ +jstz.TimeZone.prototype.ambiguity_check = function () { + var ambiguity_list, length, i, tz; + ambiguity_list = jstz.olson.ambiguity_list[this.olson_tz]; + + if (typeof (ambiguity_list) === 'undefined') { + return; + } + + length = ambiguity_list.length; + i = 0; + + for (; i < length; i += 1) { + tz = ambiguity_list[i]; + + if (jstz.date_is_dst(jstz.olson.dst_start_dates[tz])) { + this.olson_tz = tz; + return; + } + } +}; + +/** + * Checks whether a given date is in daylight savings time. + * + * If the date supplied is after june, we assume that we're checking + * for southern hemisphere DST. + * + * @param {Date} date + * @returns {boolean} + */ +jstz.date_is_dst = function (date) { + var date_offset, base_offset; + base_offset = ((date.getMonth() > 5 ? jstz.get_june_offset() + : jstz.get_january_offset())); + + date_offset = jstz.get_date_offset(date); + + return (base_offset - date_offset) !== 0; +}; + +/** + * Gets the offset in minutes from UTC for a certain date. + * + * @param date + * @returns {number} + */ +jstz.get_date_offset = function (date) { + return -date.getTimezoneOffset(); +}; + +/** + * This function does some basic calculations to create information about + * the user's timezone. + * + * Returns a primitive object on the format + * {'utc_offset' : -9, 'dst': 1, hemisphere' : 'north'} + * where dst is 1 if the region uses daylight savings. + * + * @returns {Object} + */ +jstz.get_timezone_info = function () { + var january_offset, june_offset, diff; + january_offset = jstz.get_january_offset(); + june_offset = jstz.get_june_offset(); + diff = january_offset - june_offset; + + if (diff < 0) { + return { + 'utc_offset' : january_offset, + 'dst': 1, + 'hemisphere' : jstz.HEMISPHERE_NORTH + }; + } else if (diff > 0) { + return { + 'utc_offset' : june_offset, + 'dst' : 1, + 'hemisphere' : jstz.HEMISPHERE_SOUTH + }; + } + + return { + 'utc_offset' : january_offset, + 'dst': 0, + 'hemisphere' : jstz.HEMISPHERE_UNKNOWN + }; +}; + +jstz.get_january_offset = function () { + return jstz.get_date_offset(new Date(2011, 0, 1, 0, 0, 0, 0)); +}; + +jstz.get_june_offset = function () { + return jstz.get_date_offset(new Date(2011, 5, 1, 0, 0, 0, 0)); +}; + +/** + * Uses get_timezone_info() to formulate a key to use in the olson.timezones dictionary. + * + * Returns a primitive object on the format: + * {'timezone': TimeZone, 'key' : 'the key used to find the TimeZone object'} + * + * @returns Object + */ +jstz.determine_timezone = function () { + var timezone_key_info, hemisphere_suffix, tz_key; + timezone_key_info = jstz.get_timezone_info(); + hemisphere_suffix = ''; + + if (timezone_key_info.hemisphere === jstz.HEMISPHERE_SOUTH) { + hemisphere_suffix = ',s'; + } + + tz_key = timezone_key_info.utc_offset + ',' + timezone_key_info.dst + hemisphere_suffix; + + return {'timezone' : jstz.olson.timezones[tz_key], 'key' : tz_key}; +}; + +/** + * The keys in this dictionary are comma separated as such: + * + * First the offset compared to UTC time in minutes. + * + * Then a flag which is 0 if the timezone does not take daylight savings into account and 1 if it does. + * + * Thirdly an optional 's' signifies that the timezone is in the southern hemisphere, only interesting for timezones with DST. + * + * The values of the dictionary are TimeZone objects. + */ +jstz.olson.timezones = { + '-720,0' : new jstz.TimeZone('-12:00', 'Etc/GMT+12', false), + '-660,0' : new jstz.TimeZone('-11:00', 'Pacific/Pago_Pago', false), + '-600,1' : new jstz.TimeZone('-11:00', 'America/Adak', true), + '-660,1,s' : new jstz.TimeZone('-11:00', 'Pacific/Apia', true), + '-600,0' : new jstz.TimeZone('-10:00', 'Pacific/Honolulu', false), + '-570,0' : new jstz.TimeZone('-10:30', 'Pacific/Marquesas', false), + '-540,0' : new jstz.TimeZone('-09:00', 'Pacific/Gambier', false), + '-540,1' : new jstz.TimeZone('-09:00', 'America/Anchorage', true), + '-480,1' : new jstz.TimeZone('-08:00', 'America/Los_Angeles', true), + '-480,0' : new jstz.TimeZone('-08:00', 'Pacific/Pitcairn', false), + '-420,0' : new jstz.TimeZone('-07:00', 'America/Phoenix', false), + '-420,1' : new jstz.TimeZone('-07:00', 'America/Denver', true), + '-360,0' : new jstz.TimeZone('-06:00', 'America/Guatemala', false), + '-360,1' : new jstz.TimeZone('-06:00', 'America/Chicago', true), + '-360,1,s' : new jstz.TimeZone('-06:00', 'Pacific/Easter', true), + '-300,0' : new jstz.TimeZone('-05:00', 'America/Bogota', false), + '-300,1' : new jstz.TimeZone('-05:00', 'America/New_York', true), + '-270,0' : new jstz.TimeZone('-04:30', 'America/Caracas', false), + '-240,1' : new jstz.TimeZone('-04:00', 'America/Halifax', true), + '-240,0' : new jstz.TimeZone('-04:00', 'America/Santo_Domingo', false), + '-240,1,s' : new jstz.TimeZone('-04:00', 'America/Asuncion', true), + '-210,1' : new jstz.TimeZone('-03:30', 'America/St_Johns', true), + '-180,1' : new jstz.TimeZone('-03:00', 'America/Godthab', true), + '-180,0' : new jstz.TimeZone('-03:00', 'America/Argentina/Buenos_Aires', false), + '-180,1,s' : new jstz.TimeZone('-03:00', 'America/Montevideo', true), + '-120,0' : new jstz.TimeZone('-02:00', 'America/Noronha', false), + '-120,1' : new jstz.TimeZone('-02:00', 'Etc/GMT+2', true), + '-60,1' : new jstz.TimeZone('-01:00', 'Atlantic/Azores', true), + '-60,0' : new jstz.TimeZone('-01:00', 'Atlantic/Cape_Verde', false), + '0,0' : new jstz.TimeZone('00:00', 'Etc/UTC', false), + '0,1' : new jstz.TimeZone('00:00', 'Europe/London', true), + '60,1' : new jstz.TimeZone('+01:00', 'Europe/Berlin', true), + '60,0' : new jstz.TimeZone('+01:00', 'Africa/Lagos', false), + '60,1,s' : new jstz.TimeZone('+01:00', 'Africa/Windhoek', true), + '120,1' : new jstz.TimeZone('+02:00', 'Asia/Beirut', true), + '120,0' : new jstz.TimeZone('+02:00', 'Africa/Johannesburg', false), + '180,1' : new jstz.TimeZone('+03:00', 'Europe/Moscow', true), + '180,0' : new jstz.TimeZone('+03:00', 'Asia/Baghdad', false), + '210,1' : new jstz.TimeZone('+03:30', 'Asia/Tehran', true), + '240,0' : new jstz.TimeZone('+04:00', 'Asia/Dubai', false), + '240,1' : new jstz.TimeZone('+04:00', 'Asia/Yerevan', true), + '270,0' : new jstz.TimeZone('+04:30', 'Asia/Kabul', false), + '300,1' : new jstz.TimeZone('+05:00', 'Asia/Yekaterinburg', true), + '300,0' : new jstz.TimeZone('+05:00', 'Asia/Karachi', false), + '330,0' : new jstz.TimeZone('+05:30', 'Asia/Kolkata', false), + '345,0' : new jstz.TimeZone('+05:45', 'Asia/Kathmandu', false), + '360,0' : new jstz.TimeZone('+06:00', 'Asia/Dhaka', false), + '360,1' : new jstz.TimeZone('+06:00', 'Asia/Omsk', true), + '390,0' : new jstz.TimeZone('+06:30', 'Asia/Rangoon', false), + '420,1' : new jstz.TimeZone('+07:00', 'Asia/Krasnoyarsk', true), + '420,0' : new jstz.TimeZone('+07:00', 'Asia/Jakarta', false), + '480,0' : new jstz.TimeZone('+08:00', 'Asia/Shanghai', false), + '480,1' : new jstz.TimeZone('+08:00', 'Asia/Irkutsk', true), + '525,0' : new jstz.TimeZone('+08:45', 'Australia/Eucla', true), + '525,1,s' : new jstz.TimeZone('+08:45', 'Australia/Eucla', true), + '540,1' : new jstz.TimeZone('+09:00', 'Asia/Yakutsk', true), + '540,0' : new jstz.TimeZone('+09:00', 'Asia/Tokyo', false), + '570,0' : new jstz.TimeZone('+09:30', 'Australia/Darwin', false), + '570,1,s' : new jstz.TimeZone('+09:30', 'Australia/Adelaide', true), + '600,0' : new jstz.TimeZone('+10:00', 'Australia/Brisbane', false), + '600,1' : new jstz.TimeZone('+10:00', 'Asia/Vladivostok', true), + '600,1,s' : new jstz.TimeZone('+10:00', 'Australia/Sydney', true), + '630,1,s' : new jstz.TimeZone('+10:30', 'Australia/Lord_Howe', true), + '660,1' : new jstz.TimeZone('+11:00', 'Asia/Kamchatka', true), + '660,0' : new jstz.TimeZone('+11:00', 'Pacific/Noumea', false), + '690,0' : new jstz.TimeZone('+11:30', 'Pacific/Norfolk', false), + '720,1,s' : new jstz.TimeZone('+12:00', 'Pacific/Auckland', true), + '720,0' : new jstz.TimeZone('+12:00', 'Pacific/Tarawa', false), + '765,1,s' : new jstz.TimeZone('+12:45', 'Pacific/Chatham', true), + '780,0' : new jstz.TimeZone('+13:00', 'Pacific/Tongatapu', false), + '840,0' : new jstz.TimeZone('+14:00', 'Pacific/Kiritimati', false) +}; + +/** + * This object contains information on when daylight savings starts for + * different timezones. + * + * The list is short for a reason. Often we do not have to be very specific + * to single out the correct timezone. But when we do, this list comes in + * handy. + * + * Each value is a date denoting when daylight savings starts for that timezone. + */ +jstz.olson.dst_start_dates = { + 'America/Denver' : new Date(2011, 2, 13, 3, 0, 0, 0), + 'America/Mazatlan' : new Date(2011, 3, 3, 3, 0, 0, 0), + 'America/Chicago' : new Date(2011, 2, 13, 3, 0, 0, 0), + 'America/Mexico_City' : new Date(2011, 3, 3, 3, 0, 0, 0), + 'Atlantic/Stanley' : new Date(2011, 8, 4, 7, 0, 0, 0), + 'America/Asuncion' : new Date(2011, 9, 2, 3, 0, 0, 0), + 'America/Santiago' : new Date(2011, 9, 9, 3, 0, 0, 0), + 'America/Campo_Grande' : new Date(2011, 9, 16, 5, 0, 0, 0), + 'America/Montevideo' : new Date(2011, 9, 2, 3, 0, 0, 0), + 'America/Sao_Paulo' : new Date(2011, 9, 16, 5, 0, 0, 0), + 'America/Los_Angeles' : new Date(2011, 2, 13, 8, 0, 0, 0), + 'America/Santa_Isabel' : new Date(2011, 3, 5, 8, 0, 0, 0), + 'America/Havana' : new Date(2011, 2, 13, 2, 0, 0, 0), + 'America/New_York' : new Date(2011, 2, 13, 7, 0, 0, 0), + 'Asia/Gaza' : new Date(2011, 2, 26, 23, 0, 0, 0), + 'Asia/Beirut' : new Date(2011, 2, 27, 1, 0, 0, 0), + 'Europe/Minsk' : new Date(2011, 2, 27, 3, 0, 0, 0), + 'Europe/Istanbul' : new Date(2011, 2, 27, 7, 0, 0, 0), + 'Asia/Damascus' : new Date(2011, 3, 1, 2, 0, 0, 0), + 'Asia/Jerusalem' : new Date(2011, 3, 1, 6, 0, 0, 0), + 'Africa/Cairo' : new Date(2011, 3, 29, 4, 0, 0, 0), + 'Asia/Yerevan' : new Date(2011, 2, 27, 4, 0, 0, 0), + 'Asia/Baku' : new Date(2011, 2, 27, 8, 0, 0, 0), + 'Pacific/Auckland' : new Date(2011, 8, 26, 7, 0, 0, 0), + 'Pacific/Fiji' : new Date(2010, 11, 29, 23, 0, 0, 0), + 'America/Halifax' : new Date(2011, 2, 13, 6, 0, 0, 0), + 'America/Goose_Bay' : new Date(2011, 2, 13, 2, 1, 0, 0), + 'America/Miquelon' : new Date(2011, 2, 13, 5, 0, 0, 0), + 'America/Godthab' : new Date(2011, 2, 27, 1, 0, 0, 0) +}; + +/** + * The keys in this object are timezones that we know may be ambiguous after + * a preliminary scan through the olson_tz object. + * + * The array of timezones to compare must be in the order that daylight savings + * starts for the regions. + */ +jstz.olson.ambiguity_list = { + 'America/Denver' : ['America/Denver', 'America/Mazatlan'], + 'America/Chicago' : ['America/Chicago', 'America/Mexico_City'], + 'America/Asuncion' : ['Atlantic/Stanley', 'America/Asuncion', 'America/Santiago', 'America/Campo_Grande'], + 'America/Montevideo' : ['America/Montevideo', 'America/Sao_Paulo'], + 'Asia/Beirut' : ['Asia/Gaza', 'Asia/Beirut', 'Europe/Minsk', 'Europe/Istanbul', 'Asia/Damascus', 'Asia/Jerusalem', 'Africa/Cairo'], + 'Asia/Yerevan' : ['Asia/Yerevan', 'Asia/Baku'], + 'Pacific/Auckland' : ['Pacific/Auckland', 'Pacific/Fiji'], + 'America/Los_Angeles' : ['America/Los_Angeles', 'America/Santa_Isabel'], + 'America/New_York' : ['America/Havana', 'America/New_York'], + 'America/Halifax' : ['America/Goose_Bay', 'America/Halifax'], + 'America/Godthab' : ['America/Miquelon', 'America/Godthab'] +}; diff --git a/js/gpxedit.js b/js/gpxedit.js new file mode 100644 index 0000000..4041c1d --- /dev/null +++ b/js/gpxedit.js @@ -0,0 +1,310 @@ +(function ($, OC) { +'use strict'; + +var gpxedit = { + map: {}, + baseLayers: null, + id: 0, + // indexed by gpxedit_id + layersData: {} +}; + +function load_map() { + var layer = getUrlParameter('layer'); + console.log('layer '+layer); + var default_layer = 'OpenStreetMap'; + if (typeof layer !== 'undefined'){ + default_layer = decodeURI(layer); + } + + // get url from key and layer type + function geopUrl (key, layer, format) + { return 'http://wxs.ign.fr/'+ key + '/wmts?LAYER=' + layer + +'&EXCEPTIONS=text/xml&FORMAT='+(format?format:'image/jpeg') + +'&SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&STYLE=normal' + +'&TILEMATRIXSET=PM&TILEMATRIX={z}&TILECOL={x}&TILEROW={y}' ; + } + // change it if you deploy GPXPOD + var API_KEY = 'ljthe66m795pr2v2g8p7faxt'; + var ign = new L.tileLayer ( geopUrl(API_KEY,'GEOGRAPHICALGRIDSYSTEMS.MAPS'), + { attribution:'© IGN-France', + maxZoom:18 + }); + + var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'; + var osmAttribution = 'Map data © 2013 OpenStreetMap contributors'; + var osm = new L.TileLayer(osmUrl, {maxZoom: 18, attribution: osmAttribution}); + + var osmfrUrl = 'http://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png'; + var osmfr = new L.TileLayer(osmfrUrl, + {maxZoom: 20, attribution: osmAttribution}); + var osmfr2 = new L.TileLayer(osmfrUrl, + {minZoom: 0, maxZoom: 13, attribution: osmAttribution}); + + var openmapsurferUrl = 'http://openmapsurfer.uni-hd.de/tiles/roads/'+ + 'x={x}&y={y}&z={z}'; + var openmapsurferAttribution = 'Imagery from GIScience Research Group @ University of Heidelberg — '+ + 'Map data © '+ + 'OpenStreetMap'; + var openmapsurfer = new L.TileLayer(openmapsurferUrl, + {maxZoom: 18, attribution: openmapsurferAttribution}); + + var transportUrl = 'http://a.tile2.opencyclemap.org/transport/{z}/{x}/{y}.'+ + 'png'; + var transport = new L.TileLayer(transportUrl, + {maxZoom: 18, attribution: osmAttribution}); + + var pisteUrl = 'http://tiles.openpistemap.org/nocontours/{z}/{x}/{y}.png'; + var piste = new L.TileLayer(pisteUrl, + {maxZoom: 18, attribution: osmAttribution}); + + var hikebikeUrl = 'http://toolserver.org/tiles/hikebike/{z}/{x}/{y}.png'; + var hikebike = new L.TileLayer(hikebikeUrl, + {maxZoom: 18, attribution: osmAttribution}); + + var osmCycleUrl = 'http://{s}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png'; + var osmCycleAttrib = '© '+ + 'OpenCycleMap, © '+ + 'OpenStreetMap'; + var osmCycle = new L.TileLayer(osmCycleUrl, + {maxZoom: 18, attribution: osmCycleAttrib}); + + var darkUrl = 'http://a.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png'; + var darkAttrib = '© Map tiles by CartoDB, under CC BY 3.0. Data by'+ + ' OpenStreetMap, under ODbL.'; + var dark = new L.TileLayer(darkUrl, {maxZoom: 18, attribution: darkAttrib}); + + var esriTopoUrl = 'https://server.arcgisonline.com/ArcGIS/rest/services/World'+ + '_Topo_Map/MapServer/tile/{z}/{y}/{x}'; + var esriTopoAttrib = 'Tiles © Esri — Esri, DeLorme, NAVTEQ, '+ + 'TomTom, Intermap, iPC, USGS, FAO, NPS, NRCAN, GeoBase, Kadaster NL, Ord'+ + 'nance Survey, Esri Japan, METI, Esri China (Hong Kong), and the GIS User'+ + ' Community'; + var esriTopo = new L.TileLayer(esriTopoUrl, + {maxZoom: 18, attribution: esriTopoAttrib}); + + var esriAerialUrl = 'https://server.arcgisonline.com/ArcGIS/rest/services'+ + '/World_Imagery/MapServer/tile/{z}/{y}/{x}'; + var esriAerialAttrib = 'Tiles © Esri — Source: Esri, i-cubed, '+ + 'USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the'+ + ' GIS User Community'; + var esriAerial = new L.TileLayer(esriAerialUrl, + {maxZoom: 18, attribution: esriAerialAttrib}); + + var tonerUrl = 'http://{s}.tile.stamen.com/toner/{z}/{x}/{y}.jpg'; + var stamenAttribution = 'Leaflet | © Map tiles by Stamen Design, under CC BY 3.0, Data by OpenSt'+ + 'reetMap, under CC BY SA.'; + var toner = new L.TileLayer(tonerUrl, + {maxZoom: 18, attribution: stamenAttribution}); + + var watercolorUrl = 'http://{s}.tile.stamen.com/watercolor/{z}/{x}/{y}.jpg'; + var watercolor = new L.TileLayer(watercolorUrl, + {maxZoom: 18, attribution: stamenAttribution}); + + var routeUrl = 'http://{s}.tile.openstreetmap.fr/route500/{z}/{x}/{y}.png'; + var routeAttrib = '©, Tiles © O'+ + 'penStreetMap France'; + var route = new L.TileLayer(routeUrl, + {minZoom: 1, maxZoom: 20, attribution: routeAttrib}); + + var baseLayers = { + 'OpenStreetMap': osm, + 'OpenCycleMap': osmCycle, + 'IGN France': ign, + 'OpenMapSurfer Roads': openmapsurfer, + 'Hike & bike': hikebike, + 'OSM Transport': transport, + 'ESRI Aerial': esriAerial, + 'ESRI Topo with relief': esriTopo, + 'Dark' : dark, + 'Toner' : toner, + 'Watercolor' : watercolor, + 'OpenStreetMap France': osmfr + }; + gpxedit.baseLayers = baseLayers; + var baseOverlays = { + 'OsmFr Route500': route, + 'OpenPisteMap Relief': + L.tileLayer('http://tiles2.openpistemap.org/landshaded/{z}/{x}/{y}.png', + { + attribution: '©, Tiles © OpenStreetMap France', + minZoom: 1, + maxZoom: 15 + } + ), + 'OpenPisteMap pistes' : piste + }; + + var layerlist = []; + + gpxedit.map = new L.Map('map', { + zoomControl: true, + layers: layerlist, + }); + + L.control.scale({metric: true, imperial: true, position:'topleft'}) + .addTo(gpxedit.map); + + L.control.mousePosition().addTo(gpxedit.map); + gpxedit.searchControl = L.Control.geocoder({position:'topleft'}); + gpxedit.searchControl.addTo(gpxedit.map); + gpxedit.locateControl = L.control.locate({follow:true}); + gpxedit.locateControl.addTo(gpxedit.map); + L.Control.measureControl().addTo(gpxedit.map); + L.control.sidebar('sidebar').addTo(gpxedit.map); + + gpxedit.map.setView(new L.LatLng(27, 5), 3); + + if (! baseLayers.hasOwnProperty(default_layer)){ + default_layer = 'OpenStreetMap'; + } + gpxedit.map.addLayer(baseLayers[default_layer]); + + gpxedit.activeLayers = L.control.activeLayers(baseLayers, baseOverlays); + gpxedit.activeLayers.addTo(gpxedit.map); + + gpxedit.minimapControl = new L.Control.MiniMap( + osmfr2, + { toggleDisplay: true, position:'bottomleft' } + ).addTo(gpxedit.map); + gpxedit.minimapControl._toggleDisplayButtonClicked(); + + //gpxedit.map.on('moveend',updateTrackListFromBounds); + //gpxedit.map.on('zoomend',updateTrackListFromBounds); + //gpxedit.map.on('baselayerchange',updateTrackListFromBounds); + + var editableLayers = new L.FeatureGroup(); + gpxedit.map.addLayer(editableLayers); + + var MyCustomMarker = L.Icon.extend({ + options: { + shadowUrl: null, + //iconAnchor: new L.Point(12, 12), + //iconSize: new L.Point(24, 24), + //iconUrl: 'link/to/image.png' + icon: L.divIcon({ + className: 'leaflet-div-icon2', + iconAnchor: [5, 30] + }) + + } + }); + + var options = { + position: 'topright', + draw: { + polyline: { + shapeOptions: { + color: '#f357a1', + weight: 7 + } + }, + polygon:false, + circle: false, + rectangle:false, + marker: { + icon: L.divIcon({ + className: 'leaflet-div-icon2', + iconAnchor: [5, 30] + }) + } + }, + edit: { + featureGroup: editableLayers, //REQUIRED!! + } + }; + + var drawControl = new L.Control.Draw(options); + gpxedit.map.addControl(drawControl); + + gpxedit.map.on(L.Draw.Event.CREATED, function (e) { + var type = e.layerType, + layer = e.layer; + var popupTitle = 'Line'; + if (type === 'marker') { + popupTitle = 'Waypoint'; + } + + layer.bindPopup('

'+popupTitle+'

Name :
'+ + 'Description :
'+ + 'Comment :
'+ + ''); + + layer.gpxedit_id = gpxedit.id; + layer.type = type; + gpxedit.layersData[gpxedit.id] = {name:'', description:'', comment:'', layer: layer}; + editableLayers.addLayer(layer); + gpxedit.id++; + }); + gpxedit.map.on('draw:edited', function (e) { + var layers = e.layers; + layers.eachLayer(function (layer) { + //do whatever you want; most likely save back to db + //alert('edited : '+Object.keys(layer)); + }); + editableLayers.eachLayer(function (layer) { + //alert('edited : '+Object.keys(layer)); + alert('edited : '+Object.keys(layer._leaflet_id)); + }); + }); + gpxedit.map.on('draw:deleted', function (e) { + var layers = e.layers; + layers.eachLayer(function (layer) { + delete gpxedit.layersData[layer.gpxedit_id]; + }); + editableLayers.eachLayer(function (layer) { + alert(layer.gpxedit_id); + }); + }); + + gpxedit.map.on('popupopen', function(e){ + var id = parseInt(e.popup.getContent().match(/layerid="(\d+)"/)[1]); + var buttonParent = $('button.popupOkButton[layerid='+id+']').parent(); + buttonParent.find('input.layerName').val(gpxedit.layersData[id].name); + buttonParent.find('textarea.layerDesc').val(gpxedit.layersData[id].description); + buttonParent.find('textarea.layerCmt').val(gpxedit.layersData[id].comment); + }); + +} + +function getUrlParameter(sParam) +{ + var sPageURL = window.location.search.substring(1); + var sURLVariables = sPageURL.split('&'); + for (var i = 0; i < sURLVariables.length; i++) + { + var sParameterName = sURLVariables[i].split('='); + if (sParameterName[0] === sParam) + { + return sParameterName[1]; + } + } +} + +$(document).ready(function(){ + gpxedit.username = $('p#username').html(); + load_map(); + + $('body').on('click','button.popupOkButton', function(e) { + var id = parseInt($(this).attr('layerid')); + var name = $(this).parent().find('.layerName').val(); + var description = $(this).parent().find('.layerDesc').val(); + var comment = $(this).parent().find('.layerCmt').val(); + + gpxedit.layersData[id].name = name; + gpxedit.layersData[id].description = description; + gpxedit.layersData[id].comment = comment; + gpxedit.layersData[id].layer.bindTooltip(name, {sticky:true}); + + gpxedit.map.closePopup(); + }); +}); + +})(jQuery, OC); diff --git a/js/images/marker-icon-2x-red.png b/js/images/marker-icon-2x-red.png new file mode 100644 index 0000000..3513ede Binary files /dev/null and b/js/images/marker-icon-2x-red.png differ diff --git a/js/images/marker-icon-2x.png b/js/images/marker-icon-2x.png new file mode 100644 index 0000000..0015b64 Binary files /dev/null and b/js/images/marker-icon-2x.png differ diff --git a/js/images/marker-icon.png b/js/images/marker-icon.png new file mode 100644 index 0000000..e2e9f75 Binary files /dev/null and b/js/images/marker-icon.png differ diff --git a/js/images/marker-shadow.png b/js/images/marker-shadow.png new file mode 100644 index 0000000..d1e773c Binary files /dev/null and b/js/images/marker-shadow.png differ diff --git a/js/jquery-ui.min.js b/js/jquery-ui.min.js new file mode 100644 index 0000000..5824d12 --- /dev/null +++ b/js/jquery-ui.min.js @@ -0,0 +1,13 @@ +/*! jQuery UI - v1.11.4 - 2015-03-11 +* http://jqueryui.com +* Includes: core.js, widget.js, mouse.js, position.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, draggable.js, droppable.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js, menu.js, progressbar.js, resizable.js, selectable.js, selectmenu.js, slider.js, sortable.js, spinner.js, tabs.js, tooltip.js +* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ + +(function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)})(function(e){function t(t,s){var n,a,o,r=t.nodeName.toLowerCase();return"area"===r?(n=t.parentNode,a=n.name,t.href&&a&&"map"===n.nodeName.toLowerCase()?(o=e("img[usemap='#"+a+"']")[0],!!o&&i(o)):!1):(/^(input|select|textarea|button|object)$/.test(r)?!t.disabled:"a"===r?t.href||s:s)&&i(t)}function i(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}function s(e){for(var t,i;e.length&&e[0]!==document;){if(t=e.css("position"),("absolute"===t||"relative"===t||"fixed"===t)&&(i=parseInt(e.css("zIndex"),10),!isNaN(i)&&0!==i))return i;e=e.parent()}return 0}function n(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[""]),this.regional.en=e.extend(!0,{},this.regional[""]),this.regional["en-US"]=e.extend(!0,{},this.regional.en),this.dpDiv=a(e("
"))}function a(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(i,"mouseout",function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",o)}function o(){e.datepicker._isDisabledDatepicker(v.inline?v.dpDiv.parent()[0]:v.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))}function r(t,i){e.extend(t,i);for(var s in i)null==i[s]&&(t[s]=i[s]);return t}function h(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}e.ui=e.ui||{},e.extend(e.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({scrollParent:function(t){var i=this.css("position"),s="absolute"===i,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,a=this.parents().filter(function(){var t=e(this);return s&&"static"===t.css("position")?!1:n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==i&&a.length?a:e(this[0].ownerDocument||document)},uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(i){return t(i,!isNaN(e.attr(i,"tabindex")))},tabbable:function(i){var s=e.attr(i,"tabindex"),n=isNaN(s);return(n||s>=0)&&t(i,!n)}}),e("").outerWidth(1).jquery||e.each(["Width","Height"],function(t,i){function s(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],a=i.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+i]=function(t){return void 0===t?o["inner"+i].call(this):this.each(function(){e(this).css(a,s(this,t)+"px")})},e.fn["outer"+i]=function(t,n){return"number"!=typeof t?o["outer"+i].call(this,t):this.each(function(){e(this).css(a,s(this,t,!0,n)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var i,s,n=e(this[0]);n.length&&n[0]!==document;){if(i=n.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0}}),e.ui.plugin={add:function(t,i,s){var n,a=e.ui[t].prototype;for(n in s)a.plugins[n]=a.plugins[n]||[],a.plugins[n].push([i,s[n]])},call:function(e,t,i,s){var n,a=e.plugins[t];if(a&&(s||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(n=0;a.length>n;n++)e.options[a[n][0]]&&a[n][1].apply(e.element,i)}};var l=0,u=Array.prototype.slice;e.cleanData=function(t){return function(i){var s,n,a;for(a=0;null!=(n=i[a]);a++)try{s=e._data(n,"events"),s&&s.remove&&e(n).triggerHandler("remove")}catch(o){}t(i)}}(e.cleanData),e.widget=function(t,i,s){var n,a,o,r,h={},l=t.split(".")[0];return t=t.split(".")[1],n=l+"-"+t,s||(s=i,i=e.Widget),e.expr[":"][n.toLowerCase()]=function(t){return!!e.data(t,n)},e[l]=e[l]||{},a=e[l][t],o=e[l][t]=function(e,t){return this._createWidget?(arguments.length&&this._createWidget(e,t),void 0):new o(e,t)},e.extend(o,a,{version:s.version,_proto:e.extend({},s),_childConstructors:[]}),r=new i,r.options=e.widget.extend({},r.options),e.each(s,function(t,s){return e.isFunction(s)?(h[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},n=function(e){return i.prototype[t].apply(this,e)};return function(){var t,i=this._super,a=this._superApply;return this._super=e,this._superApply=n,t=s.apply(this,arguments),this._super=i,this._superApply=a,t}}(),void 0):(h[t]=s,void 0)}),o.prototype=e.widget.extend(r,{widgetEventPrefix:a?r.widgetEventPrefix||t:t},h,{constructor:o,namespace:l,widgetName:t,widgetFullName:n}),a?(e.each(a._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete a._childConstructors):i._childConstructors.push(o),e.widget.bridge(t,o),o},e.widget.extend=function(t){for(var i,s,n=u.call(arguments,1),a=0,o=n.length;o>a;a++)for(i in n[a])s=n[a][i],n[a].hasOwnProperty(i)&&void 0!==s&&(t[i]=e.isPlainObject(s)?e.isPlainObject(t[i])?e.widget.extend({},t[i],s):e.widget.extend({},s):s);return t},e.widget.bridge=function(t,i){var s=i.prototype.widgetFullName||t;e.fn[t]=function(n){var a="string"==typeof n,o=u.call(arguments,1),r=this;return a?this.each(function(){var i,a=e.data(this,s);return"instance"===n?(r=a,!1):a?e.isFunction(a[n])&&"_"!==n.charAt(0)?(i=a[n].apply(a,o),i!==a&&void 0!==i?(r=i&&i.jquery?r.pushStack(i.get()):i,!1):void 0):e.error("no such method '"+n+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; "+"attempted to call method '"+n+"'")}):(o.length&&(n=e.widget.extend.apply(null,[n].concat(o))),this.each(function(){var t=e.data(this,s);t?(t.option(n||{}),t._init&&t._init()):e.data(this,s,new i(n,this))})),r}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=l++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var s,n,a,o=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(o={},s=t.split("."),t=s.shift(),s.length){for(n=o[t]=e.widget.extend({},this.options[t]),a=0;s.length-1>a;a++)n[s[a]]=n[s[a]]||{},n=n[s[a]];if(t=s.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=i}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,i,s){var n,a=this;"boolean"!=typeof t&&(s=i,i=t,t=!1),s?(i=n=e(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),e.each(s,function(s,o){function r(){return t||a.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?a[o]:o).apply(a,arguments):void 0}"string"!=typeof o&&(r.guid=o.guid=o.guid||r.guid||e.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+a.eventNamespace,u=h[2];u?n.delegate(u,l,r):i.bind(l,r)})},_off:function(t,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(i).undelegate(i),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,o=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(o)&&o.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var o,r=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),o=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),o&&e.effects&&e.effects.effect[r]?s[t](n):r!==t&&s[r]?s[r](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}}),e.widget;var d=!1;e(document).mouseup(function(){d=!1}),e.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!d){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var i=this,s=1===t.which,n="string"==typeof this.options.cancel&&t.target.nodeName?e(t.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return i._mouseMove(e)},this._mouseUpDelegate=function(e){return i._mouseUp(e)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),d=!0,!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button)return this._mouseUp(t);if(!t.which)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),d=!1,!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),function(){function t(e,t,i){return[parseFloat(e[0])*(p.test(e[0])?t/100:1),parseFloat(e[1])*(p.test(e[1])?i/100:1)]}function i(t,i){return parseInt(e.css(t,i),10)||0}function s(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var n,a,o=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,u=/top|center|bottom/,d=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,p=/%$/,f=e.fn.position;e.position={scrollbarWidth:function(){if(void 0!==n)return n;var t,i,s=e("
"),a=s.children()[0];return e("body").append(s),t=a.offsetWidth,s.css("overflow","scroll"),i=a.offsetWidth,t===i&&(i=s[0].clientWidth),s.remove(),n=t-i},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),s=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),n="scroll"===i||"auto"===i&&t.widthi?"left":t>0?"right":"center",vertical:0>a?"top":s>0?"bottom":"middle"};d>m&&m>r(t+i)&&(h.horizontal="center"),c>g&&g>r(s+a)&&(h.vertical="middle"),h.important=o(r(t),r(i))>o(r(s),r(a))?"horizontal":"vertical",n.using.call(this,e,h)}),u.offset(e.extend(M,{using:l}))})},e.ui.position={fit:{left:function(e,t){var i,s=t.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=e.left-t.collisionPosition.marginLeft,h=n-r,l=r+t.collisionWidth-a-n;t.collisionWidth>a?h>0&&0>=l?(i=e.left+h+t.collisionWidth-a-n,e.left+=h-i):e.left=l>0&&0>=h?n:h>l?n+a-t.collisionWidth:n:h>0?e.left+=h:l>0?e.left-=l:e.left=o(e.left-r,e.left)},top:function(e,t){var i,s=t.within,n=s.isWindow?s.scrollTop:s.offset.top,a=t.within.height,r=e.top-t.collisionPosition.marginTop,h=n-r,l=r+t.collisionHeight-a-n;t.collisionHeight>a?h>0&&0>=l?(i=e.top+h+t.collisionHeight-a-n,e.top+=h-i):e.top=l>0&&0>=h?n:h>l?n+a-t.collisionHeight:n:h>0?e.top+=h:l>0?e.top-=l:e.top=o(e.top-r,e.top)}},flip:{left:function(e,t){var i,s,n=t.within,a=n.offset.left+n.scrollLeft,o=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=e.left-t.collisionPosition.marginLeft,u=l-h,d=l+t.collisionWidth-o-h,c="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];0>u?(i=e.left+c+p+f+t.collisionWidth-o-a,(0>i||r(u)>i)&&(e.left+=c+p+f)):d>0&&(s=e.left-t.collisionPosition.marginLeft+c+p+f-h,(s>0||d>r(s))&&(e.left+=c+p+f))},top:function(e,t){var i,s,n=t.within,a=n.offset.top+n.scrollTop,o=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=e.top-t.collisionPosition.marginTop,u=l-h,d=l+t.collisionHeight-o-h,c="top"===t.my[1],p=c?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,f="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,m=-2*t.offset[1];0>u?(s=e.top+p+f+m+t.collisionHeight-o-a,(0>s||r(u)>s)&&(e.top+=p+f+m)):d>0&&(i=e.top-t.collisionPosition.marginTop+p+f+m-h,(i>0||d>r(i))&&(e.top+=p+f+m))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,s,n,o,r=document.getElementsByTagName("body")[0],h=document.createElement("div");t=document.createElement(r?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},r&&e.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in s)t.style[o]=s[o];t.appendChild(h),i=r||document.documentElement,i.insertBefore(t,i.firstChild),h.style.cssText="position: absolute; left: 10.7432222px;",n=e(h).offset().left,a=n>10&&11>n,t.innerHTML="",i.removeChild(t)}()}(),e.ui.position,e.widget("ui.accordion",{version:"1.11.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),t.collapsible||t.active!==!1&&null!=t.active||(t.active=0),this._processPanels(),0>t.active&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?(this._activate(t),void 0):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===e&&(this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t)),void 0)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=e.ui.keyCode,s=this.headers.length,n=this.headers.index(t.target),a=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:a=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:a=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:a=this.headers[0];break;case i.END:a=this.headers[s-1]}a&&(e(t.target).attr("tabIndex",-1),e(a).attr("tabIndex",0),a.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels(),t.active===!1&&t.collapsible===!0||!this.headers.length?(t.active=!1,this.active=e()):t.active===!1?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels)))},_refresh:function(){var t,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var t=e(this),i=t.uniqueId().attr("id"),s=t.next(),n=s.uniqueId().attr("id");t.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===s?(t=n.height(),this.element.siblings(":visible").each(function(){var i=e(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(t-=i.outerHeight(!0))}),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===s&&(t=0,this.headers.next().each(function(){t=Math.max(t,e(this).css("height","").height())}).height(t))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var i=this.options,s=this.active,n=e(t.currentTarget),a=n[0]===s[0],o=a&&i.collapsible,r=o?e():n.next(),h=s.next(),l={oldHeader:s,oldPanel:h,newHeader:o?e():n,newPanel:r};t.preventDefault(),a&&!i.collapsible||this._trigger("beforeActivate",t,l)===!1||(i.active=o?!1:this.headers.index(n),this.active=a?e():n,this._toggle(l),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),a||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var i=t.newPanel,s=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,t):(s.hide(),i.show(),this._toggleComplete(t)),s.attr({"aria-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(e(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,t,i){var s,n,a,o=this,r=0,h=e.css("box-sizing"),l=e.length&&(!t.length||e.index()",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault()},"click .ui-menu-item":function(t){var i=e(t.target);!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&e(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){if(!this.previousFilter){var i=e(t.currentTarget); +i.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(t,i)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,i)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){var i,s,n,a,o=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:o=!1,s=this.previousFilter||"",n=String.fromCharCode(t.keyCode),a=!1,clearTimeout(this.filterTimer),n===s?a=!0:n=s+n,i=this._filterMenuItems(n),i=a&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(t.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(t,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}o&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(e):this.select(e))},refresh:function(){var t,i,s=this,n=this.options.icons.submenu,a=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),a.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),i=t.parent(),s=e("").addClass("ui-menu-icon ui-icon "+n).data("ui-menu-submenu-carat",!0);i.attr("aria-haspopup","true").prepend(s),t.attr("aria-labelledby",i.attr("id"))}),t=a.add(this.element),i=t.find(this.options.items),i.not(".ui-menu-item").each(function(){var t=e(this);s._isDivider(t)&&t.addClass("ui-widget-content ui-menu-divider")}),i.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){"icons"===e&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},focus:function(e,t){var i,s;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),s=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=t.children(".ui-menu"),i.length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,n=t.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=t.outerHeight(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(t),this.activeMenu=s},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(t){return!e(t.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,i){var s;this.active&&(s="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[t]()),this.focus(i,s)},nextPage:function(t){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=e(this),0>i.offset().top-s-n}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(t),void 0)},previousPage:function(t){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-s+n>0}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items).first())),void 0):(this.next(t),void 0)},_hasScroll:function(){return this.element.outerHeight()",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=a?!0:o?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return t=!0,s=!0,i=!0,void 0;t=!1,s=!1,i=!1;var a=e.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:t=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:t=!0,this._move("nextPage",n);break;case a.UP:t=!0,this._keyEvent("previous",n);break;case a.DOWN:t=!0,this._keyEvent("next",n);break;case a.ENTER:this.menu.active&&(t=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=e.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(e){return s?(s=!1,e.preventDefault(),void 0):(this._searchTimeout(e),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(e),this._change(e),void 0)}}),this._initSource(),this.menu=e("