diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..89ab4780 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,4 @@ +# Change Log + +This project adheres to [Semantic Versioning](http://semver.org/). +Every release is documented on the Github [Releases](https://github.com/tfussell/xlnt/releases) page. diff --git a/LICENSE.md b/LICENSE.md index b6795c1e..043183ce 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,9 @@ -This software is distributed under the MIT Licence -================================================== +# License +## [xlnt](https://github.com/tfussell/xlnt) +>[MIT License](https://github.com/tfussell/xlnt/blob/master/LICENSE.md) + +``` Copyright (c) 2014-2017 Thomas Fussell Permission is hereby granted, free of charge, to any person obtaining a @@ -21,14 +24,12 @@ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +``` +## [POLE](http://www.dimin.net/software/pole/) +>[BSD 2-Clause License](https://bitbucket.org/dimin/pole/src/c15e513bdce4c3a52b3dbc925d4d2bb520dc71d8/pole/LICENSE) -Third-party licenses -==================== - -Pole is distributed under the BSD 2-Clause License -================================================== - +``` POLE - Portable C++ library to access OLE Storage Copyright (C) 2002-2007 Ariya Hidayat (ariya@kde.org). All rights reserved. @@ -52,11 +53,12 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +``` +## [libstudxml](http://www.codesynthesis.com/projects/libstudxml/) +>[MIT License](http://www.codesynthesis.com/licenses/mit.txt) -libstudxml is distributed under the MIT License -=============================================== - +``` Summary: Everything is licensed under the MIT License (text below). Code found in the xml/details/expat/ directory is distributed under @@ -88,11 +90,12 @@ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +``` +## [CxxTest](http://cxxtest.com/) +>[LGPL License](https://github.com/CxxTest/cxxtest/blob/master/COPYING) -CxxTest is distributed under the LGPL License -============================================= - +``` GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 @@ -258,11 +261,12 @@ whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. +``` +## [PartIO](https://www.disneyanimation.com/technology/partio.html) +>[BSD 3-Clause License (with specific non-attribution clause)](https://github.com/wdas/partio/blob/master/src/lib/io/ZIP.h) -partio is distributed under the BSD 3-Clause License (with specific non-attribution clause) -=========================================================================================== - +``` Copyright 2010 Disney Enterprises, Inc. All rights reserved Redistribution and use in source and binary forms, with or without @@ -294,10 +298,36 @@ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +``` +## [miniz](https://github.com/richgel999/miniz) +>[Public Domain/MIT License](https://github.com/richgel999/miniz/blob/master/LICENSE) -miniz is in the public domain while portions are distributed under the MIT License -================================================================================== +``` +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to Copyright 2013-2014 RAD Game Tools and Valve Software Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC @@ -320,29 +350,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -base64 is distributed under the MIT License -=========================================== - -Copyright (C) 2017 Thomas Fussell -Copyright (C) 2013 Tomas Kislan -Copyright (C) 2013 Adam Rudd - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +``` diff --git a/README.md b/README.md index f019d5b7..65c04301 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ [![License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](http://opensource.org/licenses/MIT) ## Introduction -xlnt is a modern C++ library for manipulating spreadsheets in memory and reading/writing them from/to XLSX files as described in [ECMA 376 4th edition](http://www.ecma-international.org/publications/standards/Ecma-376.htm). xlnt is currently under active feature development and is on track for the version 1.0 release in the next few weeks. Until then, the API could have significant changes. For a high-level summary of what you can do with this library, see [here](https://thomas.fussell.io/xlnt/#features). +xlnt is a modern C++ library for manipulating spreadsheets in memory and reading/writing them from/to XLSX files as described in [ECMA 376 4th edition](http://www.ecma-international.org/publications/standards/Ecma-376.htm). xlnt is currently under active feature development and is on track for the version 1.0 release in the next few weeks. Until then, the API could have significant changes. For a high-level summary of what you can do with this library, see [here](https://tfussell.github.io/xlnt/docs/introduction/Features.html). ## Example @@ -34,7 +34,7 @@ int main() ## Documentation -Documentation for the current release of xlnt is available [here](https://thomas.fussell.io/xlnt). +Documentation for the current release of xlnt is available [here](https://tfussell.github.io/xlnt). ## License xlnt is released to the public for free under the terms of the MIT License. See [LICENSE.md](https://github.com/tfussell/xlnt/blob/master/LICENCE.md) for the full text of the license and the licenses of xlnt's third-party dependencies. [LICENSE.md](https://github.com/tfussell/xlnt/blob/master/LICENCE.md) should be distributed alongside any assemblies that use xlnt in source or compiled form. diff --git a/SUMMARY.md b/SUMMARY.md new file mode 120000 index 00000000..0e01b430 --- /dev/null +++ b/SUMMARY.md @@ -0,0 +1 @@ +docs/README.md \ No newline at end of file diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md deleted file mode 100644 index 8b0454f7..00000000 --- a/docs/CHANGELOG.md +++ /dev/null @@ -1,88 +0,0 @@ -# Changelog - -## Version 1.4.0 - -*November 24, 2016* - -- Upgrade Middleman and Rouge gems, should hopefully solve a number of bugs -- Update some links in README -- Fix broken Vagrant startup script -- Fix some problems with deploy.sh help message -- Fix bug with language tabs not hiding properly if no error -- Add `!default` to SASS variables -- Fix bug with logo margin -- Bump tested Ruby versions in .travis.yml - -## Version 1.3.3 - -*June 11, 2016* - -Documentation and example changes. - -## Version 1.3.2 - -*February 3, 2016* - -A small bugfix for slightly incorrect background colors on code samples in some cases. - -## Version 1.3.1 - -*January 31, 2016* - -A small bugfix for incorrect whitespace in code blocks. - -## Version 1.3 - -*January 27, 2016* - -We've upgraded Middleman and a number of other dependencies, which should fix quite a few bugs. - -Instead of `rake build` and `rake deploy`, you should now run `bundle exec middleman build --clean` to build your server, and `./deploy.sh` to deploy it to Github Pages. - -## Version 1.2 - -*June 20, 2015* - -**Fixes:** - -- Remove crash on invalid languages -- Update Tocify to scroll to the highlighted header in the Table of Contents -- Fix variable leak and update search algorithms -- Update Python examples to be valid Python -- Update gems -- More misc. bugfixes of Javascript errors -- Add Dockerfile -- Remove unused gems -- Optimize images, fonts, and generated asset files -- Add chinese font support -- Remove RedCarpet header ID patch -- Update language tabs to not disturb existing query strings - -## Version 1.1 - -*July 27, 2014* - -**Fixes:** - -- Finally, a fix for the redcarpet upgrade bug - -## Version 1.0 - -*July 2, 2014* - -[View Issues](https://github.com/tripit/slate/issues?milestone=1&state=closed) - -**Features:** - -- Responsive designs for phones and tablets -- Started tagging versions - -**Fixes:** - -- Fixed 'unrecognized expression' error -- Fixed #undefined hash bug -- Fixed bug where the current language tab would be unselected -- Fixed bug where tocify wouldn't highlight the current section while searching -- Fixed bug where ids of header tags would have special characters that caused problems -- Updated layout so that pages with disabled search wouldn't load search.js -- Cleaned up Javascript diff --git a/docs/Gemfile b/docs/Gemfile deleted file mode 100644 index 27539b05..00000000 --- a/docs/Gemfile +++ /dev/null @@ -1,9 +0,0 @@ -source 'https://rubygems.org' - -# Middleman -gem 'middleman', '~>4.1.0' -gem 'middleman-syntax', '~> 3.0.0' -gem 'middleman-autoprefixer', '~> 2.7.0' -gem "middleman-sprockets", "~> 4.0.0" -gem 'rouge', '~> 2.0.5' -gem 'redcarpet', '~> 3.3.2' diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock deleted file mode 100644 index 092117d8..00000000 --- a/docs/Gemfile.lock +++ /dev/null @@ -1,122 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - activesupport (4.2.7.1) - i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) - minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) - tzinfo (~> 1.1) - addressable (2.4.0) - autoprefixer-rails (6.4.1) - execjs - backports (3.6.8) - coffee-script (2.4.1) - coffee-script-source - execjs - coffee-script-source (1.10.0) - compass-import-once (1.0.5) - sass (>= 3.2, < 3.5) - concurrent-ruby (1.0.2) - contracts (0.13.0) - dotenv (2.1.1) - erubis (2.7.0) - execjs (2.7.0) - fast_blank (1.0.0) - fastimage (2.0.0) - addressable (~> 2) - ffi (1.9.14) - haml (4.0.7) - tilt - hamster (3.0.0) - concurrent-ruby (~> 1.0) - hashie (3.4.4) - i18n (0.7.0) - json (1.8.3) - kramdown (1.12.0) - listen (3.0.8) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - memoist (0.15.0) - middleman (4.1.10) - coffee-script (~> 2.2) - compass-import-once (= 1.0.5) - haml (>= 4.0.5) - kramdown (~> 1.2) - middleman-cli (= 4.1.10) - middleman-core (= 4.1.10) - sass (>= 3.4.0, < 4.0) - middleman-autoprefixer (2.7.0) - autoprefixer-rails (>= 6.3.1, < 7.0.0) - middleman-core (>= 3.3.3) - middleman-cli (4.1.10) - thor (>= 0.17.0, < 2.0) - middleman-core (4.1.10) - activesupport (~> 4.2) - addressable (~> 2.3) - backports (~> 3.6) - bundler (~> 1.1) - contracts (~> 0.13.0) - dotenv - erubis - execjs (~> 2.0) - fast_blank - fastimage (~> 2.0) - hamster (~> 3.0) - hashie (~> 3.4) - i18n (~> 0.7.0) - listen (~> 3.0.0) - memoist (~> 0.14) - padrino-helpers (~> 0.13.0) - parallel - rack (>= 1.4.5, < 2.0) - sass (>= 3.4) - servolux - tilt (~> 1.4.1) - uglifier (~> 3.0) - middleman-sprockets (4.0.0) - middleman-core (~> 4.0) - sprockets (>= 3.0) - middleman-syntax (3.0.0) - middleman-core (>= 3.2) - rouge (~> 2.0) - minitest (5.9.0) - padrino-helpers (0.13.3.1) - i18n (~> 0.6, >= 0.6.7) - padrino-support (= 0.13.3.1) - tilt (>= 1.4.1, < 3) - padrino-support (0.13.3.1) - activesupport (>= 3.1) - parallel (1.9.0) - rack (1.6.4) - rb-fsevent (0.9.7) - rb-inotify (0.9.7) - ffi (>= 0.5.0) - redcarpet (3.3.4) - rouge (2.0.5) - sass (3.4.22) - servolux (0.12.0) - sprockets (3.7.0) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - thor (0.19.1) - thread_safe (0.3.5) - tilt (1.4.1) - tzinfo (1.2.2) - thread_safe (~> 0.1) - uglifier (3.0.2) - execjs (>= 0.3.0, < 3) - -PLATFORMS - ruby - -DEPENDENCIES - middleman (~> 4.1.0) - middleman-autoprefixer (~> 2.7.0) - middleman-sprockets (~> 4.0.0) - middleman-syntax (~> 3.0.0) - redcarpet (~> 3.3.2) - rouge (~> 2.0.5) - -BUNDLED WITH - 1.12.5 diff --git a/docs/LICENSE b/docs/LICENSE deleted file mode 100644 index 5ceddf59..00000000 --- a/docs/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2008-2013 Concur Technologies, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); you may -not use this file except in compliance with the License. You may obtain -a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -License for the specific language governing permissions and limitations -under the License. \ No newline at end of file diff --git a/docs/README.md b/docs/README.md index 3b634c84..22f207fd 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,110 +1,25 @@ -

- Slate: API Documentation Generator -
- Build Status -

+# Table of Contents -

Slate helps you create beautiful, intelligent, responsive API documentation.

- -

Screenshot of Example Documentation created with Slate

- -

The example above was created with Slate. Check it out at lord.github.io/slate.

- -Features ------------- - -* **Clean, intuitive design** — With Slate, the description of your API is on the left side of your documentation, and all the code examples are on the right side. Inspired by [Stripe's](https://stripe.com/docs/api) and [Paypal's](https://developer.paypal.com/webapps/developer/docs/api/) API docs. Slate is responsive, so it looks great on tablets, phones, and even in print. - -* **Everything on a single page** — Gone are the days when your users had to search through a million pages to find what they wanted. Slate puts the entire documentation on a single page. We haven't sacrificed linkability, though. As you scroll, your browser's hash will update to the nearest header, so linking to a particular point in the documentation is still natural and easy. - -* **Slate is just Markdown** — When you write docs with Slate, you're just writing Markdown, which makes it simple to edit and understand. Everything is written in Markdown — even the code samples are just Markdown code blocks. - -* **Write code samples in multiple languages** — If your API has bindings in multiple programming languages, you can easily put in tabs to switch between them. In your document, you'll distinguish different languages by specifying the language name at the top of each code block, just like with Github Flavored Markdown. - -* **Out-of-the-box syntax highlighting** for [over 100 languages](https://github.com/jneen/rouge/wiki/List-of-supported-languages-and-lexers), no configuration required. - -* **Automatic, smoothly scrolling table of contents** on the far left of the page. As you scroll, it displays your current position in the document. It's fast, too. We're using Slate at TripIt to build documentation for our new API, where our table of contents has over 180 entries. We've made sure that the performance remains excellent, even for larger documents. - -* **Let your users update your documentation for you** — By default, your Slate-generated documentation is hosted in a public Github repository. Not only does this mean you get free hosting for your docs with Github Pages, but it also makes it simple for other developers to make pull requests to your docs if they find typos or other problems. Of course, if you don't want to use GitHub, you're also welcome to host your docs elsewhere. - -Getting started with Slate is super easy! Simply fork this repository and follow the instructions below. Or, if you'd like to check out what Slate is capable of, take a look at the [sample docs](http://lord.github.io/slate). - -Getting Started with Slate ------------------------------- - -### Prerequisites - -You're going to need: - - - **Linux or OS X** — Windows may work, but is unsupported. - - **Ruby, version 2.2.5 or newer** - - **Bundler** — If Ruby is already installed, but the `bundle` command doesn't work, just run `gem install bundler` in a terminal. - -### Getting Set Up - -1. Fork this repository on Github. -2. Clone *your forked repository* (not our original one) to your hard drive with `git clone https://github.com/YOURUSERNAME/slate.git` -3. `cd slate` -4. Initialize and start Slate. You can either do this locally, or with Vagrant: - -```shell -# either run this to run locally -bundle install -bundle exec middleman server - -# OR run this to run with vagrant -vagrant up -``` - -You can now see the docs at http://localhost:4567. Whoa! That was fast! - -Now that Slate is all set up on your machine, you'll probably want to learn more about [editing Slate markdown](https://github.com/lord/slate/wiki/Markdown-Syntax), or [how to publish your docs](https://github.com/lord/slate/wiki/Deploying-Slate). - -If you'd prefer to use Docker, instructions are available [in the wiki](https://github.com/lord/slate/wiki/Docker). - -Companies Using Slate ---------------------------------- - -* [NASA](https://api.nasa.gov) -* [IBM](https://docs.cloudant.com/api.html) -* [Sony](http://developers.cimediacloud.com) -* [Mozilla](http://mozilla.github.io/localForage/) -* [Best Buy](https://bestbuyapis.github.io/api-documentation/) -* [Travis-CI](https://docs.travis-ci.com/api/) -* [Greenhouse](https://developers.greenhouse.io/harvest.html) -* [Woocommerce](http://woocommerce.github.io/woocommerce-rest-api-docs/) -* [Appium](http://appium.io/slate/en/master) -* [Dwolla](https://docs.dwolla.com/) -* [Clearbit](https://clearbit.com/docs) -* [Coinbase](https://developers.coinbase.com/api) -* [Parrot Drones](http://developer.parrot.com/docs/bebop/) -* [Fidor Bank](http://docs.fidor.de/) - -You can view more in [the list on the wiki](https://github.com/lord/slate/wiki/Slate-in-the-Wild). - -Need Help? Found a bug? --------------------- - -[Submit an issue](https://github.com/lord/slate/issues) to the Slate Github if you need any help. And, of course, feel free to submit pull requests with bug fixes or changes. - -Contributors --------------------- - -Slate was built by [Robert Lord](https://lord.io) while interning at [TripIt](https://www.tripit.com/). - -Thanks to the following people who have submitted major pull requests: - -- [@chrissrogers](https://github.com/chrissrogers) -- [@bootstraponline](https://github.com/bootstraponline) -- [@realityking](https://github.com/realityking) -- [@cvkef](https://github.com/cvkef) - -Also, thanks to [Sauce Labs](http://saucelabs.com) for helping sponsor the project. - -Special Thanks --------------------- -- [Middleman](https://github.com/middleman/middleman) -- [jquery.tocify.js](https://github.com/gfranko/jquery.tocify.js) -- [middleman-syntax](https://github.com/middleman/middleman-syntax) -- [middleman-gh-pages](https://github.com/edgecase/middleman-gh-pages) -- [Font Awesome](http://fortawesome.github.io/Font-Awesome/) +* [Read Me](/README.md) +* [Introduction](/docs/introduction/README.md) + * [Motivation](/docs/introduction/Motivation.md) + * [Examples](/docs/introduction/Examples.md) + * [Features](/docs/introduction/Features.md) + * [Installation](/docs/introduction/Installation.md) +* [Basics](/docs/basics/README.md) + * [Workbook](/docs/basics/Workbook.md) + * [Worksheet](/docs/basics/Worksheet.md) + * [Cell](/docs/basics/Cell.md) + * [Iteration](/docs/basics/Iteration.md) +* [Advanced](/docs/advanced/README.md) + * [Formatting](/docs/advanced/Formatting.md) + * [Properties](/docs/advanced/Properties.md) + * [Printing](/docs/advanced/Printing.md) + * [Encryption](/docs/advanced/Encryption.md) + * [Views](/docs/advanced/Views.md) +* [API Reference](/docs/api/README.md) + * [cell](/docs/api/cell.md) + * [cell_reference](/docs/api/cell_reference.md) +* [Change Log](/CHANGELOG.md) +* [Contributing](/CONTRIBUTING.md) +* [License](/LICENSE.md) diff --git a/docs/Vagrantfile b/docs/Vagrantfile deleted file mode 100644 index 59610839..00000000 --- a/docs/Vagrantfile +++ /dev/null @@ -1,39 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.box = "ubuntu/trusty64" - config.vm.network :forwarded_port, guest: 4567, host: 4567 - - config.vm.provision "bootstrap", - type: "shell", - inline: <<-SHELL - sudo apt-get update - sudo apt-get install -yq ruby2.0 ruby2.0-dev pkg-config build-essential nodejs git libxml2-dev libxslt-dev - sudo apt-get autoremove -yq - gem2.0 install --no-ri --no-rdoc bundler - SHELL - - # add the local user git config to the vm - config.vm.provision "file", source: "~/.gitconfig", destination: ".gitconfig" - - config.vm.provision "install", - type: "shell", - privileged: false, - inline: <<-SHELL - echo "==============================================" - echo "Installing app dependencies" - cd /vagrant - bundle config build.nokogiri --use-system-libraries - bundle install - SHELL - - config.vm.provision "run", - type: "shell", - privileged: false, - run: "always", - inline: <<-SHELL - echo "==============================================" - echo "Starting up middleman at http://localhost:4567" - echo "If it does not come up, check the ~/middleman.log file for any error messages" - cd /vagrant - bundle exec middleman server --watcher-force-polling --watcher_latency=1 &> ~/middleman.log & - SHELL -end diff --git a/docs/advanced/Encryption.md b/docs/advanced/Encryption.md new file mode 100644 index 00000000..9db6035f --- /dev/null +++ b/docs/advanced/Encryption.md @@ -0,0 +1 @@ +## Encryption diff --git a/docs/source/includes/_formatting.md b/docs/advanced/Formatting.md similarity index 100% rename from docs/source/includes/_formatting.md rename to docs/advanced/Formatting.md diff --git a/docs/advanced/Printing.md b/docs/advanced/Printing.md new file mode 100644 index 00000000..a412b38d --- /dev/null +++ b/docs/advanced/Printing.md @@ -0,0 +1 @@ +## Printing diff --git a/docs/source/includes/_properties.md b/docs/advanced/Properties.md similarity index 100% rename from docs/source/includes/_properties.md rename to docs/advanced/Properties.md diff --git a/docs/advanced/README.md b/docs/advanced/README.md new file mode 100644 index 00000000..91d7eed0 --- /dev/null +++ b/docs/advanced/README.md @@ -0,0 +1,7 @@ +## Advanced + +* [Formatting](Formatting.md) +* [Properties](Properties.md) +* [Printing](Printing.md) +* [Encryption](Encryption.md) +* [Views](Views.md) \ No newline at end of file diff --git a/docs/advanced/Views.md b/docs/advanced/Views.md new file mode 100644 index 00000000..06b4f28b --- /dev/null +++ b/docs/advanced/Views.md @@ -0,0 +1 @@ +## Views diff --git a/docs/api/README.md b/docs/api/README.md new file mode 100644 index 00000000..5e11d117 --- /dev/null +++ b/docs/api/README.md @@ -0,0 +1,4 @@ +## API + +* [cell](cell.md) +* [cell_reference](cell_reference.md) diff --git a/docs/api/cell.md b/docs/api/cell.md new file mode 100644 index 00000000..2e28c390 --- /dev/null +++ b/docs/api/cell.md @@ -0,0 +1,188 @@ +# cell +## ```using xlnt::cell::type = cell_typeundefined``` +Alias xlnt::cell_type to xlnt::cell::type since it looks nicer. +## ```friend class detail::xlsx_consumerundefined``` +## ```friend class detail::xlsx_producerundefined``` +## ```friend struct detail::cell_implundefined``` +## ```static const std::unordered_map& xlnt::cell::error_codes()``` +Returns a map of error strings such as #DIV/0! and their associated indices. +## ```xlnt::cell::cell(const cell &)=default``` +Default copy constructor. +## ```bool xlnt::cell::has_value() const``` +Returns true if value has been set and has not been cleared using cell::clear_value(). +## ```T xlnt::cell::value() const``` +Returns the value of this cell as an instance of type T. Overloads exist for most C++ fundamental types like bool, int, etc. as well as for std::string and xlnt datetime types: date, time, datetime, and timedelta. +## ```void xlnt::cell::clear_value()``` +Makes this cell have a value of type null. All other cell attributes are retained. +## ```void xlnt::cell::value(std::nullptr_t)``` +Sets the type of this cell to null. +## ```void xlnt::cell::value(bool boolean_value)``` +Sets the value of this cell to the given boolean value. +## ```void xlnt::cell::value(int int_value)``` +Sets the value of this cell to the given value. +## ```void xlnt::cell::value(unsigned int int_value)``` +Sets the value of this cell to the given value. +## ```void xlnt::cell::value(long long int int_value)``` +Sets the value of this cell to the given value. +## ```void xlnt::cell::value(unsigned long long int int_value)``` +Sets the value of this cell to the given value. +## ```void xlnt::cell::value(float float_value)``` +Sets the value of this cell to the given value. +## ```void xlnt::cell::value(double float_value)``` +Sets the value of this cell to the given value. +## ```void xlnt::cell::value(long double float_value)``` +Sets the value of this cell to the given value. +## ```void xlnt::cell::value(const date &date_value)``` +Sets the value of this cell to the given value. +## ```void xlnt::cell::value(const time &time_value)``` +Sets the value of this cell to the given value. +## ```void xlnt::cell::value(const datetime &datetime_value)``` +Sets the value of this cell to the given value. +## ```void xlnt::cell::value(const timedelta &timedelta_value)``` +Sets the value of this cell to the given value. +## ```void xlnt::cell::value(const std::string &string_value)``` +Sets the value of this cell to the given value. +## ```void xlnt::cell::value(const char *string_value)``` +Sets the value of this cell to the given value. +## ```void xlnt::cell::value(const rich_text &text_value)``` +Sets the value of this cell to the given value. +## ```void xlnt::cell::value(const cell other_cell)``` +Sets the value and formatting of this cell to that of other_cell. +## ```void xlnt::cell::value(const std::string &string_value, bool infer_type)``` +Analyzes string_value to determine its type, convert it to that type, and set the value of this cell to that converted value. +## ```type xlnt::cell::data_type() const``` +Returns the type of this cell. +## ```void xlnt::cell::data_type(type t)``` +Sets the type of this cell. This should usually be done indirectly by setting the value of the cell to a value of that type. +## ```bool xlnt::cell::garbage_collectible() const``` +There's no reason to keep a cell which has no value and is not a placeholder. Returns true if this cell has no value, style, isn't merged, etc. +## ```bool xlnt::cell::is_date() const``` +Returns true iff this cell's number format matches a date format. +## ```cell_reference xlnt::cell::reference() const``` +Returns a cell_reference that points to the location of this cell. +## ```column_t xlnt::cell::column() const``` +Returns the column of this cell. +## ```row_t xlnt::cell::row() const``` +Returns the row of this cell. +## ```std::pair xlnt::cell::anchor() const``` +Returns the location of this cell as an ordered pair (left, top). +## ```std::string xlnt::cell::hyperlink() const``` +Returns the URL of this cell's hyperlink. +## ```void xlnt::cell::hyperlink(const std::string &url)``` +Adds a hyperlink to this cell pointing to the URL of the given value. +## ```void xlnt::cell::hyperlink(const std::string &url, const std::string &display)``` +Adds a hyperlink to this cell pointing to the URI of the given value and sets the text value of the cell to the given parameter. +## ```void xlnt::cell::hyperlink(xlnt::cell target)``` +Adds an internal hyperlink to this cell pointing to the given cell. +## ```bool xlnt::cell::has_hyperlink() const``` +Returns true if this cell has a hyperlink set. +## ```class alignment xlnt::cell::computed_alignment() const``` +Returns the alignment that should be used when displaying this cell graphically based on the workbook default, the cell-level format, and the named style applied to the cell in that order. +## ```class border xlnt::cell::computed_border() const``` +Returns the border that should be used when displaying this cell graphically based on the workbook default, the cell-level format, and the named style applied to the cell in that order. +## ```class fill xlnt::cell::computed_fill() const``` +Returns the fill that should be used when displaying this cell graphically based on the workbook default, the cell-level format, and the named style applied to the cell in that order. +## ```class font xlnt::cell::computed_font() const``` +Returns the font that should be used when displaying this cell graphically based on the workbook default, the cell-level format, and the named style applied to the cell in that order. +## ```class number_format xlnt::cell::computed_number_format() const``` +Returns the number format that should be used when displaying this cell graphically based on the workbook default, the cell-level format, and the named style applied to the cell in that order. +## ```class protection xlnt::cell::computed_protection() const``` +Returns the protection that should be used when displaying this cell graphically based on the workbook default, the cell-level format, and the named style applied to the cell in that order. +## ```bool xlnt::cell::has_format() const``` +Returns true if this cell has had a format applied to it. +## ```const class format xlnt::cell::format() const``` +Returns the format applied to this cell. If this cell has no format, an invalid_attribute exception will be thrown. +## ```void xlnt::cell::format(const class format new_format)``` +Applies the cell-level formatting of new_format to this cell. +## ```void xlnt::cell::clear_format()``` +Removes the cell-level formatting from this cell. This doesn't affect the style that may also be applied to the cell. Throws an invalid_attribute exception if no format is applied. +## ```class number_format xlnt::cell::number_format() const``` +Returns the number format of this cell. +## ```void xlnt::cell::number_format(const class number_format &format)``` +Creates a new format in the workbook, sets its number_format to the given format, and applies the format to this cell. +## ```class font xlnt::cell::font() const``` +Returns the font applied to the text in this cell. +## ```void xlnt::cell::font(const class font &font_)``` +Creates a new format in the workbook, sets its font to the given font, and applies the format to this cell. +## ```class fill xlnt::cell::fill() const``` +Returns the fill applied to this cell. +## ```void xlnt::cell::fill(const class fill &fill_)``` +Creates a new format in the workbook, sets its fill to the given fill, and applies the format to this cell. +## ```class border xlnt::cell::border() const``` +Returns the border of this cell. +## ```void xlnt::cell::border(const class border &border_)``` +Creates a new format in the workbook, sets its border to the given border, and applies the format to this cell. +## ```class alignment xlnt::cell::alignment() const``` +Returns the alignment of the text in this cell. +## ```void xlnt::cell::alignment(const class alignment &alignment_)``` +Creates a new format in the workbook, sets its alignment to the given alignment, and applies the format to this cell. +## ```class protection xlnt::cell::protection() const``` +Returns the protection of this cell. +## ```void xlnt::cell::protection(const class protection &protection_)``` +Creates a new format in the workbook, sets its protection to the given protection, and applies the format to this cell. +## ```bool xlnt::cell::has_style() const``` +Returns true if this cell has had a style applied to it. +## ```class style xlnt::cell::style()``` +Returns a wrapper pointing to the named style applied to this cell. +## ```const class style xlnt::cell::style() const``` +Returns a wrapper pointing to the named style applied to this cell. +## ```void xlnt::cell::style(const class style &new_style)``` +Sets the named style applied to this cell to a style named style_name. Equivalent to style(new_style.name()). +## ```void xlnt::cell::style(const std::string &style_name)``` +Sets the named style applied to this cell to a style named style_name. If this style has not been previously created in the workbook, a key_not_found exception will be thrown. +## ```void xlnt::cell::clear_style()``` +Removes the named style from this cell. An invalid_attribute exception will be thrown if this cell has no style. This will not affect the cell format of the cell. +## ```std::string xlnt::cell::formula() const``` +Returns the string representation of the formula applied to this cell. +## ```void xlnt::cell::formula(const std::string &formula)``` +Sets the formula of this cell to the given value. This formula string should begin with '='. +## ```void xlnt::cell::clear_formula()``` +Removes the formula from this cell. After this is called, has_formula() will return false. +## ```bool xlnt::cell::has_formula() const``` +Returns true if this cell has had a formula applied to it. +## ```std::string xlnt::cell::to_string() const``` +Returns a string representing the value of this cell. If the data type is not a string, it will be converted according to the number format. +## ```bool xlnt::cell::is_merged() const``` +Returns true iff this cell has been merged with one or more surrounding cells. +## ```void xlnt::cell::merged(bool merged)``` +Makes this a merged cell iff merged is true. Generally, this shouldn't be called directly. Instead, use worksheet::merge_cells on its parent worksheet. +## ```std::string xlnt::cell::error() const``` +Returns the error string that is stored in this cell. +## ```void xlnt::cell::error(const std::string &error)``` +Directly assigns the value of this cell to be the given error. +## ```cell xlnt::cell::offset(int column, int row)``` +Returns a cell from this cell's parent workbook at a relative offset given by the parameters. +## ```class worksheet xlnt::cell::worksheet()``` +Returns the worksheet that owns this cell. +## ```const class worksheet xlnt::cell::worksheet() const``` +Returns the worksheet that owns this cell. +## ```class workbook& xlnt::cell::workbook()``` +Returns the workbook of the worksheet that owns this cell. +## ```const class workbook& xlnt::cell::workbook() const``` +Returns the workbook of the worksheet that owns this cell. +## ```calendar xlnt::cell::base_date() const``` +Returns the base date of the parent workbook. +## ```std::string xlnt::cell::check_string(const std::string &to_check)``` +Returns to_check after verifying and fixing encoding, size, and illegal characters. +## ```bool xlnt::cell::has_comment()``` +Returns true if this cell has a comment applied. +## ```void xlnt::cell::clear_comment()``` +Deletes the comment applied to this cell if it exists. +## ```class comment xlnt::cell::comment()``` +Gets the comment applied to this cell. +## ```void xlnt::cell::comment(const std::string &text, const std::string &author="Microsoft Office User")``` +Creates a new comment with the given text and optional author and applies it to the cell. +## ```void xlnt::cell::comment(const std::string &comment_text, const class font &comment_font, const std::string &author="Microsoft Office User")``` +Creates a new comment with the given text, formatting, and optional author and applies it to the cell. +## ```void xlnt::cell::comment(const class comment &new_comment)``` +Apply the comment provided as the only argument to the cell. +## ```double xlnt::cell::width() const``` +Returns the width of this cell in pixels. +## ```double xlnt::cell::height() const``` +Returns the height of this cell in pixels. +## ```cell& xlnt::cell::operator=(const cell &rhs)``` +Makes this cell interally point to rhs. The cell data originally pointed to by this cell will be unchanged. +## ```bool xlnt::cell::operator==(const cell &comparand) const``` +Returns true if this cell the same cell as comparand (compared by reference). +## ```bool xlnt::cell::operator==(std::nullptr_t) const``` +Returns true if this cell is uninitialized. diff --git a/docs/api/cell_reference.md b/docs/api/cell_reference.md new file mode 100644 index 00000000..e4ed5645 --- /dev/null +++ b/docs/api/cell_reference.md @@ -0,0 +1,55 @@ +# cell_reference +## ```static std::pair xlnt::cell_reference::split_reference(const std::string &reference_string)``` +Splits a coordinate string like "A1" into an equivalent pair like {"A", 1}. +## ```static std::pair xlnt::cell_reference::split_reference(const std::string &reference_string, bool &absolute_column, bool &absolute_row)``` +Splits a coordinate string like "A1" into an equivalent pair like {"A", 1}. Reference parameters absolute_column and absolute_row will be set to true if column part or row part are prefixed by a dollar-sign indicating they are absolute, otherwise false. +## ```xlnt::cell_reference::cell_reference()``` +Default constructor makes a reference to the top-left-most cell, "A1". +## ```xlnt::cell_reference::cell_reference(const char *reference_string)``` +Constructs a cell_reference from a string reprenting a cell coordinate (e.g. $B14). +## ```xlnt::cell_reference::cell_reference(const std::string &reference_string)``` +Constructs a cell_reference from a string reprenting a cell coordinate (e.g. $B14). +## ```xlnt::cell_reference::cell_reference(column_t column, row_t row)``` +Constructs a cell_reference from a 1-indexed column index and row index. +## ```cell_reference& xlnt::cell_reference::make_absolute(bool absolute_column=true, bool absolute_row=true)``` +Converts a coordinate to an absolute coordinate string (e.g. B12 -> $B$12) Defaulting to true, absolute_column and absolute_row can optionally control whether the resulting cell_reference has an absolute column (e.g. B12 -> $B12) and absolute row (e.g. B12 -> B$12) respectively. +## ```bool xlnt::cell_reference::column_absolute() const``` +Returns true if the reference refers to an absolute column, otherwise false. +## ```void xlnt::cell_reference::column_absolute(bool absolute_column)``` +Makes this reference have an absolute column if absolute_column is true, otherwise not absolute. +## ```bool xlnt::cell_reference::row_absolute() const``` +Returns true if the reference refers to an absolute row, otherwise false. +## ```void xlnt::cell_reference::row_absolute(bool absolute_row)``` +Makes this reference have an absolute row if absolute_row is true, otherwise not absolute. +## ```column_t xlnt::cell_reference::column() const``` +Returns a string that identifies the column of this reference (e.g. second column from left is "B") +## ```void xlnt::cell_reference::column(const std::string &column_string)``` +Sets the column of this reference from a string that identifies a particular column. +## ```column_t::index_t xlnt::cell_reference::column_index() const``` +Returns a 1-indexed numeric index of the column of this reference. +## ```void xlnt::cell_reference::column_index(column_t column)``` +Sets the column of this reference from a 1-indexed number that identifies a particular column. +## ```row_t xlnt::cell_reference::row() const``` +Returns a 1-indexed numeric index of the row of this reference. +## ```void xlnt::cell_reference::row(row_t row)``` +Sets the row of this reference from a 1-indexed number that identifies a particular row. +## ```cell_reference xlnt::cell_reference::make_offset(int column_offset, int row_offset) const``` +Returns a cell_reference offset from this cell_reference by the number of columns and rows specified by the parameters. A negative value for column_offset or row_offset results in a reference above or left of this cell_reference, respectively. +## ```std::string xlnt::cell_reference::to_string() const``` +Returns a string like "A1" for cell_reference(1, 1). +## ```range_reference xlnt::cell_reference::to_range() const``` +Returns a 1x1 range_reference containing only this cell_reference. +## ```range_reference xlnt::cell_reference::operator,(const cell_reference &other) const``` +I've always wanted to overload the comma operator. cell_reference("A", 1), cell_reference("B", 1) will return range_reference(cell_reference("A", 1), cell_reference("B", 1)) +## ```bool xlnt::cell_reference::operator==(const cell_reference &comparand) const``` +Returns true if this reference is identical to comparand including in absoluteness of column and row. +## ```bool xlnt::cell_reference::operator==(const std::string &reference_string) const``` +Constructs a cell_reference from reference_string and return the result of their comparison. +## ```bool xlnt::cell_reference::operator==(const char *reference_string) const``` +Constructs a cell_reference from reference_string and return the result of their comparison. +## ```bool xlnt::cell_reference::operator!=(const cell_reference &comparand) const``` +Returns true if this reference is not identical to comparand including in absoluteness of column and row. +## ```bool xlnt::cell_reference::operator!=(const std::string &reference_string) const``` +Constructs a cell_reference from reference_string and return the result of their comparison. +## ```bool xlnt::cell_reference::operator!=(const char *reference_string) const``` +Constructs a cell_reference from reference_string and return the result of their comparison. diff --git a/docs/basics/Cell.md b/docs/basics/Cell.md new file mode 100644 index 00000000..2f13df68 --- /dev/null +++ b/docs/basics/Cell.md @@ -0,0 +1 @@ +## Cell diff --git a/docs/basics/Iteration.md b/docs/basics/Iteration.md new file mode 100644 index 00000000..4d3b83c4 --- /dev/null +++ b/docs/basics/Iteration.md @@ -0,0 +1 @@ +## Iteration diff --git a/docs/source/includes/_memory_model.md b/docs/basics/MemoryModel.md similarity index 100% rename from docs/source/includes/_memory_model.md rename to docs/basics/MemoryModel.md diff --git a/docs/basics/README.md b/docs/basics/README.md new file mode 100644 index 00000000..3e3b2887 --- /dev/null +++ b/docs/basics/README.md @@ -0,0 +1,6 @@ +## Basics + +* [Workbook](/docs/basics/Workbook.md) +* [Worksheet](/docs/basics/Worksheet.md) +* [Cell](/docs/basics/Cell.md) +* [Iteration](/docs/basics/Iteration.md) diff --git a/docs/basics/Workbook.md b/docs/basics/Workbook.md new file mode 100644 index 00000000..d4138020 --- /dev/null +++ b/docs/basics/Workbook.md @@ -0,0 +1 @@ +## Workbook diff --git a/docs/basics/Worksheet.md b/docs/basics/Worksheet.md new file mode 100644 index 00000000..136663f9 --- /dev/null +++ b/docs/basics/Worksheet.md @@ -0,0 +1 @@ +## Worksheet diff --git a/docs/config.rb b/docs/config.rb deleted file mode 100644 index 41553c59..00000000 --- a/docs/config.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Markdown -set :markdown_engine, :redcarpet -set :markdown, - fenced_code_blocks: true, - smartypants: true, - disable_indented_code_blocks: true, - prettify: true, - tables: true, - with_toc_data: true, - no_intra_emphasis: true - -# Assets -set :css_dir, 'stylesheets' -set :js_dir, 'javascripts' -set :images_dir, 'images' -set :fonts_dir, 'fonts' - -# Activate the syntax highlighter -activate :syntax - -activate :sprockets - -activate :autoprefixer do |config| - config.browsers = ['last 2 version', 'Firefox ESR'] - config.cascade = false - config.inline = true -end - -# Github pages require relative links -activate :relative_assets -set :relative_links, true - -# Build Configuration -configure :build do - # If you're having trouble with Middleman hanging, commenting - # out the following two lines has been known to help - activate :minify_css - activate :minify_javascript - # activate :relative_assets - # activate :asset_hash - # activate :gzip -end - -# Deploy Configuration -# If you want Middleman to listen on a different port, you can set that below -set :port, 4567 diff --git a/docs/deploy.sh b/docs/deploy.sh deleted file mode 100755 index 909a9d90..00000000 --- a/docs/deploy.sh +++ /dev/null @@ -1,203 +0,0 @@ -#!/usr/bin/env bash -set -o errexit #abort if any command fails -me=$(basename "$0") - -help_message="\ -Usage: $me [-c FILE] [] -Deploy generated files to a git branch. - -Options: - - -h, --help Show this help information. - -v, --verbose Increase verbosity. Useful for debugging. - -e, --allow-empty Allow deployment of an empty directory. - -m, --message MESSAGE Specify the message used when committing on the - deploy branch. - -n, --no-hash Don't append the source commit's hash to the deploy - commit's message. -" - -bundle exec middleman build --clean - -parse_args() { - # Set args from a local environment file. - if [ -e ".env" ]; then - source .env - fi - - # Parse arg flags - # If something is exposed as an environment variable, set/overwrite it - # here. Otherwise, set/overwrite the internal variable instead. - while : ; do - if [[ $1 = "-h" || $1 = "--help" ]]; then - echo "$help_message" - return 0 - elif [[ $1 = "-v" || $1 = "--verbose" ]]; then - verbose=true - shift - elif [[ $1 = "-e" || $1 = "--allow-empty" ]]; then - allow_empty=true - shift - elif [[ ( $1 = "-m" || $1 = "--message" ) && -n $2 ]]; then - commit_message=$2 - shift 2 - elif [[ $1 = "-n" || $1 = "--no-hash" ]]; then - GIT_DEPLOY_APPEND_HASH=false - shift - else - break - fi - done - - # Set internal option vars from the environment and arg flags. All internal - # vars should be declared here, with sane defaults if applicable. - - # Source directory & target branch. - deploy_directory=build - deploy_branch=gh-pages - - #if no user identity is already set in the current git environment, use this: - default_username=${GIT_DEPLOY_USERNAME:-deploy.sh} - default_email=${GIT_DEPLOY_EMAIL:-} - - #repository to deploy to. must be readable and writable. - repo=origin - - #append commit hash to the end of message by default - append_hash=${GIT_DEPLOY_APPEND_HASH:-true} -} - -main() { - parse_args "$@" - - enable_expanded_output - - if ! git diff --exit-code --quiet --cached; then - echo Aborting due to uncommitted changes in the index >&2 - return 1 - fi - - commit_title=`git log -n 1 --format="%s" HEAD` - commit_hash=` git log -n 1 --format="%H" HEAD` - - #default commit message uses last title if a custom one is not supplied - if [[ -z $commit_message ]]; then - commit_message="publish: $commit_title" - fi - - #append hash to commit message unless no hash flag was found - if [ $append_hash = true ]; then - commit_message="$commit_message"$'\n\n'"generated from commit $commit_hash" - fi - - previous_branch=`git rev-parse --abbrev-ref HEAD` - - if [ ! -d "$deploy_directory" ]; then - echo "Deploy directory '$deploy_directory' does not exist. Aborting." >&2 - return 1 - fi - - # must use short form of flag in ls for compatibility with OS X and BSD - if [[ -z `ls -A "$deploy_directory" 2> /dev/null` && -z $allow_empty ]]; then - echo "Deploy directory '$deploy_directory' is empty. Aborting. If you're sure you want to deploy an empty tree, use the --allow-empty / -e flag." >&2 - return 1 - fi - - if git ls-remote --exit-code $repo "refs/heads/$deploy_branch" ; then - # deploy_branch exists in $repo; make sure we have the latest version - - disable_expanded_output - git fetch --force $repo $deploy_branch:$deploy_branch - enable_expanded_output - fi - - # check if deploy_branch exists locally - if git show-ref --verify --quiet "refs/heads/$deploy_branch" - then incremental_deploy - else initial_deploy - fi - - restore_head -} - -initial_deploy() { - git --work-tree "$deploy_directory" checkout --orphan $deploy_branch - git --work-tree "$deploy_directory" add --all - commit+push -} - -incremental_deploy() { - #make deploy_branch the current branch - git symbolic-ref HEAD refs/heads/$deploy_branch - #put the previously committed contents of deploy_branch into the index - git --work-tree "$deploy_directory" reset --mixed --quiet - git --work-tree "$deploy_directory" add --all - - set +o errexit - diff=$(git --work-tree "$deploy_directory" diff --exit-code --quiet HEAD --)$? - set -o errexit - case $diff in - 0) echo No changes to files in $deploy_directory. Skipping commit.;; - 1) commit+push;; - *) - echo git diff exited with code $diff. Aborting. Staying on branch $deploy_branch so you can debug. To switch back to master, use: git symbolic-ref HEAD refs/heads/master && git reset --mixed >&2 - return $diff - ;; - esac -} - -commit+push() { - set_user_id - git --work-tree "$deploy_directory" commit -m "$commit_message" - - disable_expanded_output - #--quiet is important here to avoid outputting the repo URL, which may contain a secret token - git push --quiet $repo $deploy_branch - enable_expanded_output -} - -#echo expanded commands as they are executed (for debugging) -enable_expanded_output() { - if [ $verbose ]; then - set -o xtrace - set +o verbose - fi -} - -#this is used to avoid outputting the repo URL, which may contain a secret token -disable_expanded_output() { - if [ $verbose ]; then - set +o xtrace - set -o verbose - fi -} - -set_user_id() { - if [[ -z `git config user.name` ]]; then - git config user.name "$default_username" - fi - if [[ -z `git config user.email` ]]; then - git config user.email "$default_email" - fi -} - -restore_head() { - if [[ $previous_branch = "HEAD" ]]; then - #we weren't on any branch before, so just set HEAD back to the commit it was on - git update-ref --no-deref HEAD $commit_hash $deploy_branch - else - git symbolic-ref HEAD refs/heads/$previous_branch - fi - - git reset --mixed -} - -filter() { - sed -e "s|$repo|\$repo|g" -} - -sanitize() { - "$@" 2> >(filter 1>&2) | filter -} - -[[ $1 = --source-only ]] || main "$@" diff --git a/docs/font-selection.json b/docs/font-selection.json deleted file mode 100755 index 5e78f5d8..00000000 --- a/docs/font-selection.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "IcoMoonType": "selection", - "icons": [ - { - "icon": { - "paths": [ - "M438.857 73.143q119.429 0 220.286 58.857t159.714 159.714 58.857 220.286-58.857 220.286-159.714 159.714-220.286 58.857-220.286-58.857-159.714-159.714-58.857-220.286 58.857-220.286 159.714-159.714 220.286-58.857zM512 785.714v-108.571q0-8-5.143-13.429t-12.571-5.429h-109.714q-7.429 0-13.143 5.714t-5.714 13.143v108.571q0 7.429 5.714 13.143t13.143 5.714h109.714q7.429 0 12.571-5.429t5.143-13.429zM510.857 589.143l10.286-354.857q0-6.857-5.714-10.286-5.714-4.571-13.714-4.571h-125.714q-8 0-13.714 4.571-5.714 3.429-5.714 10.286l9.714 354.857q0 5.714 5.714 10t13.714 4.286h105.714q8 0 13.429-4.286t6-10z" - ], - "attrs": [], - "isMulticolor": false, - "tags": [ - "exclamation-circle" - ], - "defaultCode": 61546, - "grid": 14 - }, - "attrs": [], - "properties": { - "id": 100, - "order": 4, - "prevSize": 28, - "code": 58880, - "name": "exclamation-sign", - "ligatures": "" - }, - "setIdx": 0, - "iconIdx": 0 - }, - { - "icon": { - "paths": [ - "M585.143 786.286v-91.429q0-8-5.143-13.143t-13.143-5.143h-54.857v-292.571q0-8-5.143-13.143t-13.143-5.143h-182.857q-8 0-13.143 5.143t-5.143 13.143v91.429q0 8 5.143 13.143t13.143 5.143h54.857v182.857h-54.857q-8 0-13.143 5.143t-5.143 13.143v91.429q0 8 5.143 13.143t13.143 5.143h256q8 0 13.143-5.143t5.143-13.143zM512 274.286v-91.429q0-8-5.143-13.143t-13.143-5.143h-109.714q-8 0-13.143 5.143t-5.143 13.143v91.429q0 8 5.143 13.143t13.143 5.143h109.714q8 0 13.143-5.143t5.143-13.143zM877.714 512q0 119.429-58.857 220.286t-159.714 159.714-220.286 58.857-220.286-58.857-159.714-159.714-58.857-220.286 58.857-220.286 159.714-159.714 220.286-58.857 220.286 58.857 159.714 159.714 58.857 220.286z" - ], - "attrs": [], - "isMulticolor": false, - "tags": [ - "info-circle" - ], - "defaultCode": 61530, - "grid": 14 - }, - "attrs": [], - "properties": { - "id": 85, - "order": 3, - "name": "info-sign", - "prevSize": 28, - "code": 58882 - }, - "setIdx": 0, - "iconIdx": 2 - }, - { - "icon": { - "paths": [ - "M733.714 419.429q0-16-10.286-26.286l-52-51.429q-10.857-10.857-25.714-10.857t-25.714 10.857l-233.143 232.571-129.143-129.143q-10.857-10.857-25.714-10.857t-25.714 10.857l-52 51.429q-10.286 10.286-10.286 26.286 0 15.429 10.286 25.714l206.857 206.857q10.857 10.857 25.714 10.857 15.429 0 26.286-10.857l310.286-310.286q10.286-10.286 10.286-25.714zM877.714 512q0 119.429-58.857 220.286t-159.714 159.714-220.286 58.857-220.286-58.857-159.714-159.714-58.857-220.286 58.857-220.286 159.714-159.714 220.286-58.857 220.286 58.857 159.714 159.714 58.857 220.286z" - ], - "attrs": [], - "isMulticolor": false, - "tags": [ - "check-circle" - ], - "defaultCode": 61528, - "grid": 14 - }, - "attrs": [], - "properties": { - "id": 83, - "order": 9, - "prevSize": 28, - "code": 58886, - "name": "ok-sign" - }, - "setIdx": 0, - "iconIdx": 6 - }, - { - "icon": { - "paths": [ - "M658.286 475.429q0-105.714-75.143-180.857t-180.857-75.143-180.857 75.143-75.143 180.857 75.143 180.857 180.857 75.143 180.857-75.143 75.143-180.857zM950.857 950.857q0 29.714-21.714 51.429t-51.429 21.714q-30.857 0-51.429-21.714l-196-195.429q-102.286 70.857-228 70.857-81.714 0-156.286-31.714t-128.571-85.714-85.714-128.571-31.714-156.286 31.714-156.286 85.714-128.571 128.571-85.714 156.286-31.714 156.286 31.714 128.571 85.714 85.714 128.571 31.714 156.286q0 125.714-70.857 228l196 196q21.143 21.143 21.143 51.429z" - ], - "width": 951, - "attrs": [], - "isMulticolor": false, - "tags": [ - "search" - ], - "defaultCode": 61442, - "grid": 14 - }, - "attrs": [], - "properties": { - "id": 2, - "order": 1, - "prevSize": 28, - "code": 58887, - "name": "icon-search" - }, - "setIdx": 0, - "iconIdx": 7 - } - ], - "height": 1024, - "metadata": { - "name": "slate", - "license": "SIL OFL 1.1" - }, - "preferences": { - "showGlyphs": true, - "showQuickUse": true, - "showQuickUse2": true, - "showSVGs": true, - "fontPref": { - "prefix": "icon-", - "metadata": { - "fontFamily": "slate", - "majorVersion": 1, - "minorVersion": 0, - "description": "Based on FontAwesome", - "license": "SIL OFL 1.1" - }, - "metrics": { - "emSize": 1024, - "baseline": 6.25, - "whitespace": 50 - }, - "resetPoint": 58880, - "showSelector": false, - "selector": "class", - "classSelector": ".icon", - "showMetrics": false, - "showMetadata": true, - "showVersion": true, - "ie7": false - }, - "imagePref": { - "prefix": "icon-", - "png": true, - "useClassSelector": true, - "color": 4473924, - "bgColor": 16777215 - }, - "historySize": 100, - "showCodes": true, - "gridSize": 16, - "showLiga": false - } -} diff --git a/docs/introduction/Examples.md b/docs/introduction/Examples.md new file mode 100644 index 00000000..acfebc0e --- /dev/null +++ b/docs/introduction/Examples.md @@ -0,0 +1 @@ +## Examples \ No newline at end of file diff --git a/docs/source/includes/_introduction.md b/docs/introduction/Features.md similarity index 82% rename from docs/source/includes/_introduction.md rename to docs/introduction/Features.md index 5e6eb4e9..82e2b53b 100644 --- a/docs/source/includes/_introduction.md +++ b/docs/introduction/Features.md @@ -1,25 +1,4 @@ -# Introduction - -```c++ -#include - -int main() -{ - xlnt::workbook wb; - xlnt::worksheet ws = wb.active_sheet(); - ws.cell("A1").value(5); - ws.cell("B2").value("string data"); - ws.cell("C3").formula("=RAND()"); - ws.merge_cells("C3:C4"); - ws.freeze_panes("B2"); - wb.save("xlnt.xlsx"); - return 0; -} -``` - -xlnt is a C++14 library for reading, writing, and modifying XLSX files as described in [ECMA 376](http://www.ecma-international.org/publications/standards/Ecma-376.htm). The API is based on [openpyxl](https://bitbucket.org/openpyxl/openpyxl), a Python library to read/write Excel 2007 xlsx/xlsm files, and ultimately on [PHPExcel](https://github.com/PHPOffice/PHPExcel), pure PHP library for reading and writing spreadsheet files upon which openpyxl was based. This project is still very much a work in progress, but the core development work is complete. - ## Features | Feature | Read | Edit | Write | @@ -73,7 +52,3 @@ xlnt is a C++14 library for reading, writing, and modifying XLSX files as descri | WordArt | | | | | Embedded Content (e.g. images) | | | | | Excel VBA | | | | - -## Performance - -Creates a new workbook and writes 1 million cells to a file in X seconds using a fully optimized build on Windows 10 with MSVC 2015. diff --git a/docs/introduction/Installation.md b/docs/introduction/Installation.md new file mode 100644 index 00000000..106206c0 --- /dev/null +++ b/docs/introduction/Installation.md @@ -0,0 +1,34 @@ +# Getting xlnt + +## Binaries + +## Homebrew + +## Arch + +## vcpkg + +## Compiling from Source + +Build configurations for Visual Studio, GNU Make, Ninja, and Xcode can be created using [cmake](https://cmake.org/) v3.2+. A full list of cmake generators can be found [here](https://cmake.org/cmake/help/v3.0/manual/cmake-generators.7.html). A basic build would look like (starting in the root xlnt directory): + +```bash +mkdir build +cd build +cmake .. +make -j8 +``` + +The resulting shared (e.g. libxlnt.dylib) library would be found in the build/lib directory. Other cmake configuration options for xlnt can be found using "cmake -LH". These options include building a static library instead of shared and whether to build sample executables or not. An example of building a static library with an Xcode project: + +```bash +mkdir build +cd build +cmake -D STATIC=ON -G Xcode .. +cmake --build . +cd bin && ./xlnt.test +``` +*Note for Windows: cmake defaults to building a 32-bit library project. To build a 64-bit library, use the Win64 generator* +```bash +cmake -G "Visual Studio 14 2015 Win64" .. +``` diff --git a/docs/introduction/Motivation.md b/docs/introduction/Motivation.md new file mode 100644 index 00000000..266273bc --- /dev/null +++ b/docs/introduction/Motivation.md @@ -0,0 +1 @@ +## Motivation diff --git a/docs/introduction/README.md b/docs/introduction/README.md new file mode 100644 index 00000000..22f14d81 --- /dev/null +++ b/docs/introduction/README.md @@ -0,0 +1,6 @@ +## Introduction + +* [Motivation](Motivation.md) +* [Examples](Examples.md) +* [Features](Features.md) +* [Installation](Installation.md) \ No newline at end of file diff --git a/docs/source/fonts/slate.eot b/docs/source/fonts/slate.eot deleted file mode 100755 index 13c4839a..00000000 Binary files a/docs/source/fonts/slate.eot and /dev/null differ diff --git a/docs/source/fonts/slate.svg b/docs/source/fonts/slate.svg deleted file mode 100755 index 5f349823..00000000 --- a/docs/source/fonts/slate.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - -Generated by IcoMoon - - - - - - - - - - diff --git a/docs/source/fonts/slate.ttf b/docs/source/fonts/slate.ttf deleted file mode 100755 index ace9a46a..00000000 Binary files a/docs/source/fonts/slate.ttf and /dev/null differ diff --git a/docs/source/fonts/slate.woff b/docs/source/fonts/slate.woff deleted file mode 100755 index 1e72e0ee..00000000 Binary files a/docs/source/fonts/slate.woff and /dev/null differ diff --git a/docs/source/fonts/slate.woff2 b/docs/source/fonts/slate.woff2 deleted file mode 100755 index 7c585a72..00000000 Binary files a/docs/source/fonts/slate.woff2 and /dev/null differ diff --git a/docs/source/images/github.png b/docs/source/images/github.png deleted file mode 100644 index 192846a1..00000000 Binary files a/docs/source/images/github.png and /dev/null differ diff --git a/docs/source/images/logo.png b/docs/source/images/logo.png deleted file mode 100644 index 9656cd46..00000000 Binary files a/docs/source/images/logo.png and /dev/null differ diff --git a/docs/source/images/navbar.png b/docs/source/images/navbar.png deleted file mode 100644 index df38e90d..00000000 Binary files a/docs/source/images/navbar.png and /dev/null differ diff --git a/docs/source/includes/_api_reference.md b/docs/source/includes/_api_reference.md deleted file mode 100644 index 64446521..00000000 --- a/docs/source/includes/_api_reference.md +++ /dev/null @@ -1,2428 +0,0 @@ -# API Reference -## Cell Module -### cell -#### ```using xlnt::cell::type = cell_typeundefined``` -Alias xlnt::cell_type to xlnt::cell::type since it looks nicer. -#### ```friend class detail::xlsx_consumerundefined``` -#### ```friend class detail::xlsx_producerundefined``` -#### ```friend struct detail::cell_implundefined``` -#### ```static const std::unordered_map& xlnt::cell::error_codes()``` -Returns a map of error strings such as #DIV/0! and their associated indices. -#### ```xlnt::cell::cell(const cell &)=default``` -Default copy constructor. -#### ```bool xlnt::cell::has_value() const``` -Returns true if value has been set and has not been cleared using cell::clear_value(). -#### ```T xlnt::cell::value() const``` -Returns the value of this cell as an instance of type T. Overloads exist for most C++ fundamental types like bool, int, etc. as well as for std::string and xlnt datetime types: date, time, datetime, and timedelta. -#### ```void xlnt::cell::clear_value()``` -Makes this cell have a value of type null. All other cell attributes are retained. -#### ```void xlnt::cell::value(std::nullptr_t)``` -Sets the type of this cell to null. -#### ```void xlnt::cell::value(bool boolean_value)``` -Sets the value of this cell to the given boolean value. -#### ```void xlnt::cell::value(int int_value)``` -Sets the value of this cell to the given value. -#### ```void xlnt::cell::value(unsigned int int_value)``` -Sets the value of this cell to the given value. -#### ```void xlnt::cell::value(long long int int_value)``` -Sets the value of this cell to the given value. -#### ```void xlnt::cell::value(unsigned long long int int_value)``` -Sets the value of this cell to the given value. -#### ```void xlnt::cell::value(float float_value)``` -Sets the value of this cell to the given value. -#### ```void xlnt::cell::value(double float_value)``` -Sets the value of this cell to the given value. -#### ```void xlnt::cell::value(long double float_value)``` -Sets the value of this cell to the given value. -#### ```void xlnt::cell::value(const date &date_value)``` -Sets the value of this cell to the given value. -#### ```void xlnt::cell::value(const time &time_value)``` -Sets the value of this cell to the given value. -#### ```void xlnt::cell::value(const datetime &datetime_value)``` -Sets the value of this cell to the given value. -#### ```void xlnt::cell::value(const timedelta &timedelta_value)``` -Sets the value of this cell to the given value. -#### ```void xlnt::cell::value(const std::string &string_value)``` -Sets the value of this cell to the given value. -#### ```void xlnt::cell::value(const char *string_value)``` -Sets the value of this cell to the given value. -#### ```void xlnt::cell::value(const rich_text &text_value)``` -Sets the value of this cell to the given value. -#### ```void xlnt::cell::value(const cell other_cell)``` -Sets the value and formatting of this cell to that of other_cell. -#### ```void xlnt::cell::value(const std::string &string_value, bool infer_type)``` -Analyzes string_value to determine its type, convert it to that type, and set the value of this cell to that converted value. -#### ```type xlnt::cell::data_type() const``` -Returns the type of this cell. -#### ```void xlnt::cell::data_type(type t)``` -Sets the type of this cell. This should usually be done indirectly by setting the value of the cell to a value of that type. -#### ```bool xlnt::cell::garbage_collectible() const``` -There's no reason to keep a cell which has no value and is not a placeholder. Returns true if this cell has no value, style, isn't merged, etc. -#### ```bool xlnt::cell::is_date() const``` -Returns true iff this cell's number format matches a date format. -#### ```cell_reference xlnt::cell::reference() const``` -Returns a cell_reference that points to the location of this cell. -#### ```column_t xlnt::cell::column() const``` -Returns the column of this cell. -#### ```row_t xlnt::cell::row() const``` -Returns the row of this cell. -#### ```std::pair xlnt::cell::anchor() const``` -Returns the location of this cell as an ordered pair (left, top). -#### ```std::string xlnt::cell::hyperlink() const``` -Returns the URL of this cell's hyperlink. -#### ```void xlnt::cell::hyperlink(const std::string &url)``` -Adds a hyperlink to this cell pointing to the URL of the given value. -#### ```void xlnt::cell::hyperlink(const std::string &url, const std::string &display)``` -Adds a hyperlink to this cell pointing to the URI of the given value and sets the text value of the cell to the given parameter. -#### ```void xlnt::cell::hyperlink(xlnt::cell target)``` -Adds an internal hyperlink to this cell pointing to the given cell. -#### ```bool xlnt::cell::has_hyperlink() const``` -Returns true if this cell has a hyperlink set. -#### ```class alignment xlnt::cell::computed_alignment() const``` -Returns the alignment that should be used when displaying this cell graphically based on the workbook default, the cell-level format, and the named style applied to the cell in that order. -#### ```class border xlnt::cell::computed_border() const``` -Returns the border that should be used when displaying this cell graphically based on the workbook default, the cell-level format, and the named style applied to the cell in that order. -#### ```class fill xlnt::cell::computed_fill() const``` -Returns the fill that should be used when displaying this cell graphically based on the workbook default, the cell-level format, and the named style applied to the cell in that order. -#### ```class font xlnt::cell::computed_font() const``` -Returns the font that should be used when displaying this cell graphically based on the workbook default, the cell-level format, and the named style applied to the cell in that order. -#### ```class number_format xlnt::cell::computed_number_format() const``` -Returns the number format that should be used when displaying this cell graphically based on the workbook default, the cell-level format, and the named style applied to the cell in that order. -#### ```class protection xlnt::cell::computed_protection() const``` -Returns the protection that should be used when displaying this cell graphically based on the workbook default, the cell-level format, and the named style applied to the cell in that order. -#### ```bool xlnt::cell::has_format() const``` -Returns true if this cell has had a format applied to it. -#### ```const class format xlnt::cell::format() const``` -Returns the format applied to this cell. If this cell has no format, an invalid_attribute exception will be thrown. -#### ```void xlnt::cell::format(const class format new_format)``` -Applies the cell-level formatting of new_format to this cell. -#### ```void xlnt::cell::clear_format()``` -Removes the cell-level formatting from this cell. This doesn't affect the style that may also be applied to the cell. Throws an invalid_attribute exception if no format is applied. -#### ```class number_format xlnt::cell::number_format() const``` -Returns the number format of this cell. -#### ```void xlnt::cell::number_format(const class number_format &format)``` -Creates a new format in the workbook, sets its number_format to the given format, and applies the format to this cell. -#### ```class font xlnt::cell::font() const``` -Returns the font applied to the text in this cell. -#### ```void xlnt::cell::font(const class font &font_)``` -Creates a new format in the workbook, sets its font to the given font, and applies the format to this cell. -#### ```class fill xlnt::cell::fill() const``` -Returns the fill applied to this cell. -#### ```void xlnt::cell::fill(const class fill &fill_)``` -Creates a new format in the workbook, sets its fill to the given fill, and applies the format to this cell. -#### ```class border xlnt::cell::border() const``` -Returns the border of this cell. -#### ```void xlnt::cell::border(const class border &border_)``` -Creates a new format in the workbook, sets its border to the given border, and applies the format to this cell. -#### ```class alignment xlnt::cell::alignment() const``` -Returns the alignment of the text in this cell. -#### ```void xlnt::cell::alignment(const class alignment &alignment_)``` -Creates a new format in the workbook, sets its alignment to the given alignment, and applies the format to this cell. -#### ```class protection xlnt::cell::protection() const``` -Returns the protection of this cell. -#### ```void xlnt::cell::protection(const class protection &protection_)``` -Creates a new format in the workbook, sets its protection to the given protection, and applies the format to this cell. -#### ```bool xlnt::cell::has_style() const``` -Returns true if this cell has had a style applied to it. -#### ```class style xlnt::cell::style()``` -Returns a wrapper pointing to the named style applied to this cell. -#### ```const class style xlnt::cell::style() const``` -Returns a wrapper pointing to the named style applied to this cell. -#### ```void xlnt::cell::style(const class style &new_style)``` -Sets the named style applied to this cell to a style named style_name. Equivalent to style(new_style.name()). -#### ```void xlnt::cell::style(const std::string &style_name)``` -Sets the named style applied to this cell to a style named style_name. If this style has not been previously created in the workbook, a key_not_found exception will be thrown. -#### ```void xlnt::cell::clear_style()``` -Removes the named style from this cell. An invalid_attribute exception will be thrown if this cell has no style. This will not affect the cell format of the cell. -#### ```std::string xlnt::cell::formula() const``` -Returns the string representation of the formula applied to this cell. -#### ```void xlnt::cell::formula(const std::string &formula)``` -Sets the formula of this cell to the given value. This formula string should begin with '='. -#### ```void xlnt::cell::clear_formula()``` -Removes the formula from this cell. After this is called, has_formula() will return false. -#### ```bool xlnt::cell::has_formula() const``` -Returns true if this cell has had a formula applied to it. -#### ```std::string xlnt::cell::to_string() const``` -Returns a string representing the value of this cell. If the data type is not a string, it will be converted according to the number format. -#### ```bool xlnt::cell::is_merged() const``` -Returns true iff this cell has been merged with one or more surrounding cells. -#### ```void xlnt::cell::merged(bool merged)``` -Makes this a merged cell iff merged is true. Generally, this shouldn't be called directly. Instead, use worksheet::merge_cells on its parent worksheet. -#### ```std::string xlnt::cell::error() const``` -Returns the error string that is stored in this cell. -#### ```void xlnt::cell::error(const std::string &error)``` -Directly assigns the value of this cell to be the given error. -#### ```cell xlnt::cell::offset(int column, int row)``` -Returns a cell from this cell's parent workbook at a relative offset given by the parameters. -#### ```class worksheet xlnt::cell::worksheet()``` -Returns the worksheet that owns this cell. -#### ```const class worksheet xlnt::cell::worksheet() const``` -Returns the worksheet that owns this cell. -#### ```class workbook& xlnt::cell::workbook()``` -Returns the workbook of the worksheet that owns this cell. -#### ```const class workbook& xlnt::cell::workbook() const``` -Returns the workbook of the worksheet that owns this cell. -#### ```calendar xlnt::cell::base_date() const``` -Returns the base date of the parent workbook. -#### ```std::string xlnt::cell::check_string(const std::string &to_check)``` -Returns to_check after verifying and fixing encoding, size, and illegal characters. -#### ```bool xlnt::cell::has_comment()``` -Returns true if this cell has a comment applied. -#### ```void xlnt::cell::clear_comment()``` -Deletes the comment applied to this cell if it exists. -#### ```class comment xlnt::cell::comment()``` -Gets the comment applied to this cell. -#### ```void xlnt::cell::comment(const std::string &text, const std::string &author="Microsoft Office User")``` -Creates a new comment with the given text and optional author and applies it to the cell. -#### ```void xlnt::cell::comment(const std::string &comment_text, const class font &comment_font, const std::string &author="Microsoft Office User")``` -Creates a new comment with the given text, formatting, and optional author and applies it to the cell. -#### ```void xlnt::cell::comment(const class comment &new_comment)``` -Apply the comment provided as the only argument to the cell. -#### ```double xlnt::cell::width() const``` -Returns the width of this cell in pixels. -#### ```double xlnt::cell::height() const``` -Returns the height of this cell in pixels. -#### ```cell& xlnt::cell::operator=(const cell &rhs)``` -Makes this cell interally point to rhs. The cell data originally pointed to by this cell will be unchanged. -#### ```bool xlnt::cell::operator==(const cell &comparand) const``` -Returns true if this cell the same cell as comparand (compared by reference). -#### ```bool xlnt::cell::operator==(std::nullptr_t) const``` -Returns true if this cell is uninitialized. -### cell_reference_hash -#### ```std::size_t xlnt::cell_reference_hash::operator()(const cell_reference &k) const``` -Returns a hash representing a particular cell_reference. -### cell_reference -#### ```static std::pair xlnt::cell_reference::split_reference(const std::string &reference_string)``` -Splits a coordinate string like "A1" into an equivalent pair like {"A", 1}. -#### ```static std::pair xlnt::cell_reference::split_reference(const std::string &reference_string, bool &absolute_column, bool &absolute_row)``` -Splits a coordinate string like "A1" into an equivalent pair like {"A", 1}. Reference parameters absolute_column and absolute_row will be set to true if column part or row part are prefixed by a dollar-sign indicating they are absolute, otherwise false. -#### ```xlnt::cell_reference::cell_reference()``` -Default constructor makes a reference to the top-left-most cell, "A1". -#### ```xlnt::cell_reference::cell_reference(const char *reference_string)``` -Constructs a cell_reference from a string reprenting a cell coordinate (e.g. $B14). -#### ```xlnt::cell_reference::cell_reference(const std::string &reference_string)``` -Constructs a cell_reference from a string reprenting a cell coordinate (e.g. $B14). -#### ```xlnt::cell_reference::cell_reference(column_t column, row_t row)``` -Constructs a cell_reference from a 1-indexed column index and row index. -#### ```cell_reference& xlnt::cell_reference::make_absolute(bool absolute_column=true, bool absolute_row=true)``` -Converts a coordinate to an absolute coordinate string (e.g. B12 -> $B$12) Defaulting to true, absolute_column and absolute_row can optionally control whether the resulting cell_reference has an absolute column (e.g. B12 -> $B12) and absolute row (e.g. B12 -> B$12) respectively. -#### ```bool xlnt::cell_reference::column_absolute() const``` -Returns true if the reference refers to an absolute column, otherwise false. -#### ```void xlnt::cell_reference::column_absolute(bool absolute_column)``` -Makes this reference have an absolute column if absolute_column is true, otherwise not absolute. -#### ```bool xlnt::cell_reference::row_absolute() const``` -Returns true if the reference refers to an absolute row, otherwise false. -#### ```void xlnt::cell_reference::row_absolute(bool absolute_row)``` -Makes this reference have an absolute row if absolute_row is true, otherwise not absolute. -#### ```column_t xlnt::cell_reference::column() const``` -Returns a string that identifies the column of this reference (e.g. second column from left is "B") -#### ```void xlnt::cell_reference::column(const std::string &column_string)``` -Sets the column of this reference from a string that identifies a particular column. -#### ```column_t::index_t xlnt::cell_reference::column_index() const``` -Returns a 1-indexed numeric index of the column of this reference. -#### ```void xlnt::cell_reference::column_index(column_t column)``` -Sets the column of this reference from a 1-indexed number that identifies a particular column. -#### ```row_t xlnt::cell_reference::row() const``` -Returns a 1-indexed numeric index of the row of this reference. -#### ```void xlnt::cell_reference::row(row_t row)``` -Sets the row of this reference from a 1-indexed number that identifies a particular row. -#### ```cell_reference xlnt::cell_reference::make_offset(int column_offset, int row_offset) const``` -Returns a cell_reference offset from this cell_reference by the number of columns and rows specified by the parameters. A negative value for column_offset or row_offset results in a reference above or left of this cell_reference, respectively. -#### ```std::string xlnt::cell_reference::to_string() const``` -Returns a string like "A1" for cell_reference(1, 1). -#### ```range_reference xlnt::cell_reference::to_range() const``` -Returns a 1x1 range_reference containing only this cell_reference. -#### ```range_reference xlnt::cell_reference::operator,(const cell_reference &other) const``` -I've always wanted to overload the comma operator. cell_reference("A", 1), cell_reference("B", 1) will return range_reference(cell_reference("A", 1), cell_reference("B", 1)) -#### ```bool xlnt::cell_reference::operator==(const cell_reference &comparand) const``` -Returns true if this reference is identical to comparand including in absoluteness of column and row. -#### ```bool xlnt::cell_reference::operator==(const std::string &reference_string) const``` -Constructs a cell_reference from reference_string and return the result of their comparison. -#### ```bool xlnt::cell_reference::operator==(const char *reference_string) const``` -Constructs a cell_reference from reference_string and return the result of their comparison. -#### ```bool xlnt::cell_reference::operator!=(const cell_reference &comparand) const``` -Returns true if this reference is not identical to comparand including in absoluteness of column and row. -#### ```bool xlnt::cell_reference::operator!=(const std::string &reference_string) const``` -Constructs a cell_reference from reference_string and return the result of their comparison. -#### ```bool xlnt::cell_reference::operator!=(const char *reference_string) const``` -Constructs a cell_reference from reference_string and return the result of their comparison. -### comment -#### ```xlnt::comment::comment()``` -Constructs a new blank comment. -#### ```xlnt::comment::comment(const rich_text &text, const std::string &author)``` -Constructs a new comment with the given text and author. -#### ```xlnt::comment::comment(const std::string &text, const std::string &author)``` -Constructs a new comment with the given unformatted text and author. -#### ```rich_text xlnt::comment::text() const``` -Returns the text that will be displayed for this comment. -#### ```std::string xlnt::comment::plain_text() const``` -Returns the plain text that will be displayed for this comment without formatting information. -#### ```std::string xlnt::comment::author() const``` -Returns the author of this comment. -#### ```void xlnt::comment::hide()``` -Makes this comment only visible when the associated cell is hovered. -#### ```void xlnt::comment::show()``` -Makes this comment always visible. -#### ```bool xlnt::comment::visible() const``` -Returns true if this comment is not hidden. -#### ```void xlnt::comment::position(int left, int top)``` -Sets the absolute position of this cell to the given coordinates. -#### ```int xlnt::comment::left() const``` -Returns the distance from the left side of the sheet to the left side of the comment. -#### ```int xlnt::comment::top() const``` -Returns the distance from the top of the sheet to the top of the comment. -#### ```void xlnt::comment::size(int width, int height)``` -Sets the size of the comment. -#### ```int xlnt::comment::width() const``` -Returns the width of this comment. -#### ```int xlnt::comment::height() const``` -Returns the height of this comment. -#### ```bool xlnt::comment::operator==(const comment &other) const``` -Return true if this comment is equivalent to other. -#### ```bool xlnt::comment::operator!=(const comment &other) const``` -Returns true if this comment is not equivalent to other. -### column_t -#### ```using xlnt::column_t::index_t = std::uint32_tundefined``` -Alias declaration for the internal numeric type of this column. -#### ```index_t xlnt::column_t::indexundefined``` -Internal numeric value of this column index. -#### ```static index_t xlnt::column_t::column_index_from_string(const std::string &column_string)``` -Convert a column letter into a column number (e.g. B -> 2) -#### ```static std::string xlnt::column_t::column_string_from_index(index_t column_index)``` -Convert a column number into a column letter (3 -> 'C') -#### ```xlnt::column_t::column_t()``` -Default constructor. The column points to the "A" column. -#### ```xlnt::column_t::column_t(index_t column_index)``` -Constructs a column from a number. -#### ```xlnt::column_t::column_t(const std::string &column_string)``` -Constructs a column from a string. -#### ```xlnt::column_t::column_t(const char *column_string)``` -Constructs a column from a string. -#### ```xlnt::column_t::column_t(const column_t &other)``` -Copy constructor. Constructs a column by copying it from other. -#### ```xlnt::column_t::column_t(column_t &&other)``` -Move constructor. Constructs a column by moving it from other. -#### ```std::string xlnt::column_t::column_string() const``` -Returns a string representation of this column index. -#### ```column_t& xlnt::column_t::operator=(column_t rhs)``` -Sets this column to be the same as rhs's and return reference to self. -#### ```column_t& xlnt::column_t::operator=(const std::string &rhs)``` -Sets this column to be equal to rhs and return reference to self. -#### ```column_t& xlnt::column_t::operator=(const char *rhs)``` -Sets this column to be equal to rhs and return reference to self. -#### ```bool xlnt::column_t::operator==(const column_t &other) const``` -Returns true if this column refers to the same column as other. -#### ```bool xlnt::column_t::operator!=(const column_t &other) const``` -Returns true if this column doesn't refer to the same column as other. -#### ```bool xlnt::column_t::operator==(int other) const``` -Returns true if this column refers to the same column as other. -#### ```bool xlnt::column_t::operator==(index_t other) const``` -Returns true if this column refers to the same column as other. -#### ```bool xlnt::column_t::operator==(const std::string &other) const``` -Returns true if this column refers to the same column as other. -#### ```bool xlnt::column_t::operator==(const char *other) const``` -Returns true if this column refers to the same column as other. -#### ```bool xlnt::column_t::operator!=(int other) const``` -Returns true if this column doesn't refer to the same column as other. -#### ```bool xlnt::column_t::operator!=(index_t other) const``` -Returns true if this column doesn't refer to the same column as other. -#### ```bool xlnt::column_t::operator!=(const std::string &other) const``` -Returns true if this column doesn't refer to the same column as other. -#### ```bool xlnt::column_t::operator!=(const char *other) const``` -Returns true if this column doesn't refer to the same column as other. -#### ```bool xlnt::column_t::operator>(const column_t &other) const``` -Returns true if other is to the right of this column. -#### ```bool xlnt::column_t::operator>=(const column_t &other) const``` -Returns true if other is to the right of or equal to this column. -#### ```bool xlnt::column_t::operator<(const column_t &other) const``` -Returns true if other is to the left of this column. -#### ```bool xlnt::column_t::operator<=(const column_t &other) const``` -Returns true if other is to the left of or equal to this column. -#### ```bool xlnt::column_t::operator>(const column_t::index_t &other) const``` -Returns true if other is to the right of this column. -#### ```bool xlnt::column_t::operator>=(const column_t::index_t &other) const``` -Returns true if other is to the right of or equal to this column. -#### ```bool xlnt::column_t::operator<(const column_t::index_t &other) const``` -Returns true if other is to the left of this column. -#### ```bool xlnt::column_t::operator<=(const column_t::index_t &other) const``` -Returns true if other is to the left of or equal to this column. -#### ```column_t& xlnt::column_t::operator++()``` -Pre-increments this column, making it point to the column one to the right and returning a reference to it. -#### ```column_t& xlnt::column_t::operator--()``` -Pre-deccrements this column, making it point to the column one to the left and returning a reference to it. -#### ```column_t xlnt::column_t::operator++(int)``` -Post-increments this column, making it point to the column one to the right and returning the old column. -#### ```column_t xlnt::column_t::operator--(int)``` -Post-decrements this column, making it point to the column one to the left and returning the old column. -#### ```column_t& xlnt::column_t::operator+=(const column_t &rhs)``` -Adds rhs to this column and returns a reference to this column. -#### ```column_t& xlnt::column_t::operator-=(const column_t &rhs)``` -Subtracts rhs from this column and returns a reference to this column. -#### ```column_t operator+(column_t lhs, const column_t &rhs)``` -Returns the result of adding rhs to this column. -#### ```column_t operator-(column_t lhs, const column_t &rhs)``` -Returns the result of subtracing lhs by rhs column. -#### ```bool operator>(const column_t::index_t &left, const column_t &right)``` -Returns true if other is to the right of this column. -#### ```bool operator>=(const column_t::index_t &left, const column_t &right)``` -Returns true if other is to the right of or equal to this column. -#### ```bool operator<(const column_t::index_t &left, const column_t &right)``` -Returns true if other is to the left of this column. -#### ```bool operator<=(const column_t::index_t &left, const column_t &right)``` -Returns true if other is to the left of or equal to this column. -#### ```void swap(column_t &left, column_t &right)``` -Swaps the columns that left and right refer to. -### column_hash -#### ```std::size_t xlnt::column_hash::operator()(const column_t &k) const``` -Returns the result of hashing column k. -### column_t > -#### ```size_t std::hash< xlnt::column_t >::operator()(const xlnt::column_t &k) const``` -Returns the result of hashing column k. -### rich_text -#### ```xlnt::rich_text::rich_text()=default``` -Constructs an empty rich text object with no font and empty text. -#### ```xlnt::rich_text::rich_text(const std::string &plain_text)``` -Constructs a rich text object with the given text and no font. -#### ```xlnt::rich_text::rich_text(const std::string &plain_text, const class font &text_font)``` -Constructs a rich text object with the given text and font. -#### ```xlnt::rich_text::rich_text(const rich_text_run &single_run)``` -Copy constructor. -#### ```void xlnt::rich_text::clear()``` -Removes all text runs from this text. -#### ```void xlnt::rich_text::plain_text(const std::string &s)``` -Clears any runs in this text and adds a single run with default formatting and the given string as its textual content. -#### ```std::string xlnt::rich_text::plain_text() const``` -Combines the textual content of each text run in order and returns the result. -#### ```std::vector xlnt::rich_text::runs() const``` -Returns a copy of the individual runs that comprise this text. -#### ```void xlnt::rich_text::runs(const std::vector< rich_text_run > &new_runs)``` -Sets the runs of this text all at once. -#### ```void xlnt::rich_text::add_run(const rich_text_run &t)``` -Adds a new run to the end of the set of runs. -#### ```bool xlnt::rich_text::operator==(const rich_text &rhs) const``` -Returns true if the runs that make up this text are identical to those in rhs. -#### ```bool xlnt::rich_text::operator==(const std::string &rhs) const``` -Returns true if this text has a single unformatted run with text equal to rhs. -## Packaging Module -### manifest -#### ```void xlnt::manifest::clear()``` -Unregisters all default and override type and all relationships and known parts. -#### ```std::vector xlnt::manifest::parts() const``` -Returns the path to all internal package parts registered as a source or target of a relationship. -#### ```bool xlnt::manifest::has_relationship(const path &source, relationship_type type) const``` -Returns true if the manifest contains a relationship with the given type with part as the source. -#### ```bool xlnt::manifest::has_relationship(const path &source, const std::string &rel_id) const``` -Returns true if the manifest contains a relationship with the given type with part as the source. -#### ```class relationship xlnt::manifest::relationship(const path &source, relationship_type type) const``` -Returns the relationship with "source" as the source and with a type of "type". Throws a key_not_found exception if no such relationship is found. -#### ```class relationship xlnt::manifest::relationship(const path &source, const std::string &rel_id) const``` -Returns the relationship with "source" as the source and with an ID of "rel_id". Throws a key_not_found exception if no such relationship is found. -#### ```std::vector xlnt::manifest::relationships(const path &source) const``` -Returns all relationship with "source" as the source. -#### ```std::vector xlnt::manifest::relationships(const path &source, relationship_type type) const``` -Returns all relationships with "source" as the source and with a type of "type". -#### ```path xlnt::manifest::canonicalize(const std::vector< xlnt::relationship > &rels) const``` -Returns the canonical path of the chain of relationships by traversing through rels and forming the absolute combined path. -#### ```std::string xlnt::manifest::register_relationship(const uri &source, relationship_type type, const uri &target, target_mode mode)``` -Registers a new relationship by specifying all of the relationship properties explicitly. -#### ```std::string xlnt::manifest::register_relationship(const class relationship &rel)``` -Registers a new relationship already constructed elsewhere. -#### ```std::unordered_map xlnt::manifest::unregister_relationship(const uri &source, const std::string &rel_id)``` -Delete the relationship with the given id from source part. Returns a mapping of relationship IDs since IDs are shifted down. For example, if there are three relationships for part a.xml like [rId1, rId2, rId3] and rId2 is deleted, the resulting map would look like [rId3->rId2]. -#### ```std::string xlnt::manifest::content_type(const path &part) const``` -Given the path to a part, returns the content type of the part as a string. -#### ```bool xlnt::manifest::has_default_type(const std::string &extension) const``` -Returns true if a default content type for the extension has been registered. -#### ```std::vector xlnt::manifest::extensions_with_default_types() const``` -Returns a vector of all extensions with registered default content types. -#### ```std::string xlnt::manifest::default_type(const std::string &extension) const``` -Returns the registered default content type for parts of the given extension. -#### ```void xlnt::manifest::register_default_type(const std::string &extension, const std::string &type)``` -Associates the given extension with the given content type. -#### ```void xlnt::manifest::unregister_default_type(const std::string &extension)``` -Unregisters the default content type for the given extension. -#### ```bool xlnt::manifest::has_override_type(const path &part) const``` -Returns true if a content type overriding the default content type has been registered for the given part. -#### ```std::string xlnt::manifest::override_type(const path &part) const``` -Returns the override content type registered for the given part. Throws key_not_found exception if no override type was found. -#### ```std::vector xlnt::manifest::parts_with_overriden_types() const``` -Returns the path of every part in this manifest with an overriden content type. -#### ```void xlnt::manifest::register_override_type(const path &part, const std::string &type)``` -Overrides any default type registered for the part's extension with the given content type. -#### ```void xlnt::manifest::unregister_override_type(const path &part)``` -Unregisters the overriding content type of the given part. -### relationship -#### ```xlnt::relationship::relationship()``` -Constructs a new empty relationship. -#### ```xlnt::relationship::relationship(const std::string &id, relationship_type t, const uri &source, const uri &target, xlnt::target_mode mode)``` -Constructs a new relationship by specifying all of its properties. -#### ```std::string xlnt::relationship::id() const``` -Returns a string of the form rId# that identifies the relationship. -#### ```relationship_type xlnt::relationship::type() const``` -Returns the type of this relationship. -#### ```xlnt::target_mode xlnt::relationship::target_mode() const``` -Returns whether the target of the relationship is internal or external to the package. -#### ```uri xlnt::relationship::source() const``` -Returns the URI of the package part this relationship points to. -#### ```uri xlnt::relationship::target() const``` -Returns the URI of the package part this relationship points to. -#### ```bool xlnt::relationship::operator==(const relationship &rhs) const``` -Returns true if and only if rhs is equal to this relationship. -#### ```bool xlnt::relationship::operator!=(const relationship &rhs) const``` -Returns true if and only if rhs is not equal to this relationship. -### uri -#### ```xlnt::uri::uri()``` -Constructs an empty URI. -#### ```xlnt::uri::uri(const uri &base, const uri &relative)``` -Constructs a URI by combining base with relative. -#### ```xlnt::uri::uri(const uri &base, const path &relative)``` -Constructs a URI by combining base with relative path. -#### ```xlnt::uri::uri(const std::string &uri_string)``` -Constructs a URI by parsing the given uri_string. -#### ```bool xlnt::uri::is_relative() const``` -Returns true if this URI is relative. -#### ```bool xlnt::uri::is_absolute() const``` -Returns true if this URI is not relative (i.e. absolute). -#### ```std::string xlnt::uri::scheme() const``` -Returns the scheme of this URI. E.g. the scheme of http://user:pass@example.com is "http" -#### ```std::string xlnt::uri::authority() const``` -Returns the authority of this URI. E.g. the authority of http://user:pass@example.com:80/document is "user:pass@example.com:80" -#### ```bool xlnt::uri::has_authentication() const``` -Returns true if an authentication section is specified for this URI. -#### ```std::string xlnt::uri::authentication() const``` -Returns the authentication of this URI. E.g. the authentication of http://user:pass@example.com is "user:pass" -#### ```std::string xlnt::uri::username() const``` -Returns the username of this URI. E.g. the username of http://user:pass@example.com is "user" -#### ```std::string xlnt::uri::password() const``` -Returns the password of this URI. E.g. the password of http://user:pass@example.com is "pass" -#### ```std::string xlnt::uri::host() const``` -Returns the host of this URI. E.g. the host of http://example.com:80/document is "example.com" -#### ```bool xlnt::uri::has_port() const``` -Returns true if a non-default port is specified for this URI. -#### ```std::size_t xlnt::uri::port() const``` -Returns the port of this URI. E.g. the port of https://example.com:443/document is "443" -#### ```class path xlnt::uri::path() const``` -Returns the path of this URI. E.g. the path of http://example.com/document is "/document" -#### ```bool xlnt::uri::has_query() const``` -Returns true if this URI has a non-null query string section. -#### ```std::string xlnt::uri::query() const``` -Returns the query string of this URI. E.g. the query of http://example.com/document?v=1&x=3#abc is "v=1&x=3" -#### ```bool xlnt::uri::has_fragment() const``` -Returns true if this URI has a non-empty fragment section. -#### ```std::string xlnt::uri::fragment() const``` -Returns the fragment section of this URI. E.g. the fragment of http://example.com/document#abc is "abc" -#### ```std::string xlnt::uri::to_string() const``` -Returns a string representation of this URI. -#### ```uri xlnt::uri::make_absolute(const uri &base)``` -If this URI is relative, an absolute URI will be returned by appending the path to the given absolute base URI. -#### ```uri xlnt::uri::make_reference(const uri &base)``` -If this URI is absolute, a relative URI will be returned by removing the common base path from the given absolute base URI. -#### ```bool xlnt::uri::operator==(const uri &other) const``` -Returns true if this URI is equivalent to other. -## Styles Module -### alignment -#### ```bool xlnt::alignment::shrink() const``` -Returns true if shrink-to-fit has been enabled. -#### ```alignment& xlnt::alignment::shrink(bool shrink_to_fit)``` -Sets whether the font size should be reduced until all of the text fits in a cell without wrapping. -#### ```bool xlnt::alignment::wrap() const``` -Returns true if text-wrapping has been enabled. -#### ```alignment& xlnt::alignment::wrap(bool wrap_text)``` -Sets whether text in a cell should continue to multiple lines if it doesn't fit in one line. -#### ```optional xlnt::alignment::indent() const``` -Returns the optional value of indentation width in number of spaces. -#### ```alignment& xlnt::alignment::indent(int indent_size)``` -Sets the indent size in number of spaces from the side of the cell. This will only take effect when left or right horizontal alignment has also been set. -#### ```optional xlnt::alignment::rotation() const``` -Returns the optional value of rotation for text in the cell in degrees. -#### ```alignment& xlnt::alignment::rotation(int text_rotation)``` -Sets the rotation for text in the cell in degrees. -#### ```optional xlnt::alignment::horizontal() const``` -Returns the optional horizontal alignment. -#### ```alignment& xlnt::alignment::horizontal(horizontal_alignment horizontal)``` -Sets the horizontal alignment. -#### ```optional xlnt::alignment::vertical() const``` -Returns the optional vertical alignment. -#### ```alignment& xlnt::alignment::vertical(vertical_alignment vertical)``` -Sets the vertical alignment. -#### ```bool xlnt::alignment::operator==(const alignment &other) const``` -Returns true if this alignment is equivalent to other. -#### ```bool xlnt::alignment::operator!=(const alignment &other) const``` -Returns true if this alignment is not equivalent to other. -### border -#### ```static const std::vector& xlnt::border::all_sides()``` -Returns a vector containing all of the border sides to be used for iteration. -#### ```xlnt::border::border()``` -Constructs a default border. -#### ```optional xlnt::border::side(border_side s) const``` -Returns the border properties of the given side. -#### ```border& xlnt::border::side(border_side s, const border_property &prop)``` -Sets the border properties of the side s to prop. -#### ```optional xlnt::border::diagonal() const``` -Returns the diagonal direction of this border. -#### ```border& xlnt::border::diagonal(diagonal_direction dir)``` -Sets the diagonal direction of this border to dir. -#### ```bool xlnt::border::operator==(const border &right) const``` -Returns true if left is exactly equal to right. -#### ```bool xlnt::border::operator!=(const border &right) const``` -Returns true if left is not exactly equal to right. -### border_property -#### ```optional xlnt::border::border_property::color() const``` -Returns the color of the side. -#### ```border_property& xlnt::border::border_property::color(const xlnt::color &c)``` -Sets the color of the side and returns a reference to the side properties. -#### ```optional xlnt::border::border_property::style() const``` -Returns the style of the side. -#### ```border_property& xlnt::border::border_property::style(border_style style)``` -Sets the style of the side and returns a reference to the side properties. -#### ```bool xlnt::border::border_property::operator==(const border_property &right) const``` -Returns true if left is exactly equal to right. -#### ```bool xlnt::border::border_property::operator!=(const border_property &right) const``` -Returns true if left is not exactly equal to right. -### indexed_color -#### ```xlnt::indexed_color::indexed_color(std::size_t index)``` -Constructs an indexed_color from an index. -#### ```std::size_t xlnt::indexed_color::index() const``` -Returns the index this color points to. -#### ```void xlnt::indexed_color::index(std::size_t index)``` -Sets the index to index. -### theme_color -#### ```xlnt::theme_color::theme_color(std::size_t index)``` -Constructs a theme_color from an index. -#### ```std::size_t xlnt::theme_color::index() const``` -Returns the index of the color in the theme this points to. -#### ```void xlnt::theme_color::index(std::size_t index)``` -Sets the index of this color to index. -### rgb_color -#### ```xlnt::rgb_color::rgb_color(const std::string &hex_string)``` -Constructs an RGB color from a string in the form #[aa]rrggbb -#### ```xlnt::rgb_color::rgb_color(std::uint8_t r, std::uint8_t g, std::uint8_t b, std::uint8_t a=255)``` -Constructs an RGB color from red, green, and blue values in the range 0 to 255 plus an optional alpha which defaults to fully opaque. -#### ```std::string xlnt::rgb_color::hex_string() const``` -Returns a string representation of this color in the form #aarrggbb -#### ```std::uint8_t xlnt::rgb_color::red() const``` -Returns a byte representing the red component of this color -#### ```std::uint8_t xlnt::rgb_color::green() const``` -Returns a byte representing the red component of this color -#### ```std::uint8_t xlnt::rgb_color::blue() const``` -Returns a byte representing the blue component of this color -#### ```std::uint8_t xlnt::rgb_color::alpha() const``` -Returns a byte representing the alpha component of this color -#### ```std::array xlnt::rgb_color::rgb() const``` -Returns the red, green, and blue components of this color separately in an array in that order. -#### ```std::array xlnt::rgb_color::rgba() const``` -Returns the red, green, blue, and alpha components of this color separately in an array in that order. -### color -#### ```static const color xlnt::color::black()``` -Returns the color #000000 -#### ```static const color xlnt::color::white()``` -Returns the color #ffffff -#### ```static const color xlnt::color::red()``` -Returns the color #ff0000 -#### ```static const color xlnt::color::darkred()``` -Returns the color #8b0000 -#### ```static const color xlnt::color::blue()``` -Returns the color #00ff00 -#### ```static const color xlnt::color::darkblue()``` -Returns the color #008b00 -#### ```static const color xlnt::color::green()``` -Returns the color #0000ff -#### ```static const color xlnt::color::darkgreen()``` -Returns the color #00008b -#### ```static const color xlnt::color::yellow()``` -Returns the color #ffff00 -#### ```static const color xlnt::color::darkyellow()``` -Returns the color #cccc00 -#### ```xlnt::color::color()``` -Constructs a default color -#### ```xlnt::color::color(const rgb_color &rgb)``` -Constructs a color from a given RGB color -#### ```xlnt::color::color(const indexed_color &indexed)``` -Constructs a color from a given indexed color -#### ```xlnt::color::color(const theme_color &theme)``` -Constructs a color from a given theme color -#### ```color_type xlnt::color::type() const``` -Returns the type of this color -#### ```bool xlnt::color::auto_() const``` -Returns true if this color has been set to auto -#### ```void xlnt::color::auto_(bool value)``` -Sets the auto property of this color to value -#### ```rgb_color xlnt::color::rgb() const``` -Returns the internal indexed color representing this color. If this is not an RGB color, an invalid_attribute exception will be thrown. -#### ```indexed_color xlnt::color::indexed() const``` -Returns the internal indexed color representing this color. If this is not an indexed color, an invalid_attribute exception will be thrown. -#### ```theme_color xlnt::color::theme() const``` -Returns the internal indexed color representing this color. If this is not a theme color, an invalid_attribute exception will be thrown. -#### ```double xlnt::color::tint() const``` -Returns the tint of this color. -#### ```void xlnt::color::tint(double tint)``` -Sets the tint of this color to tint. Tints lighten or darken an existing color by multiplying the color with the tint. -#### ```bool xlnt::color::operator==(const color &other) const``` -Returns true if this color is equivalent to other -#### ```bool xlnt::color::operator!=(const color &other) const``` -Returns true if this color is not equivalent to other -### pattern_fill -#### ```xlnt::pattern_fill::pattern_fill()``` -Constructs a default pattern fill with a none pattern and no colors. -#### ```pattern_fill_type xlnt::pattern_fill::type() const``` -Returns the pattern used by this fill -#### ```pattern_fill& xlnt::pattern_fill::type(pattern_fill_type new_type)``` -Sets the pattern of this fill and returns a reference to it. -#### ```optional xlnt::pattern_fill::foreground() const``` -Returns the optional foreground color of this fill -#### ```pattern_fill& xlnt::pattern_fill::foreground(const color &foreground)``` -Sets the foreground color and returns a reference to this pattern. -#### ```optional xlnt::pattern_fill::background() const``` -Returns the optional background color of this fill -#### ```pattern_fill& xlnt::pattern_fill::background(const color &background)``` -Sets the foreground color and returns a reference to this pattern. -#### ```bool xlnt::pattern_fill::operator==(const pattern_fill &other) const``` -Returns true if this pattern fill is equivalent to other. -#### ```bool xlnt::pattern_fill::operator!=(const pattern_fill &other) const``` -Returns true if this pattern fill is not equivalent to other. -### gradient_fill -#### ```xlnt::gradient_fill::gradient_fill()``` -Constructs a default linear fill -#### ```gradient_fill_type xlnt::gradient_fill::type() const``` -Returns the type of this gradient fill -#### ```gradient_fill& xlnt::gradient_fill::type(gradient_fill_type new_type)``` -Sets the type of this gradient fill -#### ```gradient_fill& xlnt::gradient_fill::degree(double degree)``` -Sets the angle of the gradient in degrees -#### ```double xlnt::gradient_fill::degree() const``` -Returns the angle of the gradient -#### ```double xlnt::gradient_fill::left() const``` -Returns the distance from the left where the gradient starts. -#### ```gradient_fill& xlnt::gradient_fill::left(double value)``` -Sets the distance from the left where the gradient starts. -#### ```double xlnt::gradient_fill::right() const``` -Returns the distance from the right where the gradient starts. -#### ```gradient_fill& xlnt::gradient_fill::right(double value)``` -Sets the distance from the right where the gradient starts. -#### ```double xlnt::gradient_fill::top() const``` -Returns the distance from the top where the gradient starts. -#### ```gradient_fill& xlnt::gradient_fill::top(double value)``` -Sets the distance from the top where the gradient starts. -#### ```double xlnt::gradient_fill::bottom() const``` -Returns the distance from the bottom where the gradient starts. -#### ```gradient_fill& xlnt::gradient_fill::bottom(double value)``` -Sets the distance from the bottom where the gradient starts. -#### ```gradient_fill& xlnt::gradient_fill::add_stop(double position, color stop_color)``` -Adds a gradient stop at position with the given color. -#### ```gradient_fill& xlnt::gradient_fill::clear_stops()``` -Deletes all stops from the gradient. -#### ```std::unordered_map xlnt::gradient_fill::stops() const``` -Returns all of the gradient stops. -#### ```bool xlnt::gradient_fill::operator==(const gradient_fill &other) const``` -Returns true if the gradient is equivalent to other. -#### ```bool xlnt::gradient_fill::operator!=(const gradient_fill &right) const``` -Returns true if the gradient is not equivalent to other. -### fill -#### ```static fill xlnt::fill::solid(const color &fill_color)``` -Helper method for the most common use case, setting the fill color of a cell to a single solid color. The foreground and background colors of a fill are not the same as the foreground and background colors of a cell. When setting a fill color in Excel, a new fill is created with the given color as the fill's fgColor and index color number 64 as the bgColor. This method creates a fill in the same way. -#### ```xlnt::fill::fill()``` -Constructs a fill initialized as a none-type pattern fill with no foreground or background colors. -#### ```xlnt::fill::fill(const pattern_fill &pattern)``` -Constructs a fill initialized as a pattern fill based on the given pattern. -#### ```xlnt::fill::fill(const gradient_fill &gradient)``` -Constructs a fill initialized as a gradient fill based on the given gradient. -#### ```fill_type xlnt::fill::type() const``` -Returns the fill_type of this fill depending on how it was constructed. -#### ```class gradient_fill xlnt::fill::gradient_fill() const``` -Returns the gradient fill represented by this fill. Throws an invalid_attribute exception if this is not a gradient fill. -#### ```class pattern_fill xlnt::fill::pattern_fill() const``` -Returns the pattern fill represented by this fill. Throws an invalid_attribute exception if this is not a pattern fill. -#### ```bool xlnt::fill::operator==(const fill &other) const``` -Returns true if left is exactly equal to right. -#### ```bool xlnt::fill::operator!=(const fill &other) const``` -Returns true if left is not exactly equal to right. -### font -#### ```undefinedundefined``` -Text can be underlined in the enumerated ways -#### ```xlnt::font::font()``` -Constructs a default font. Calibri, size 12 -#### ```font& xlnt::font::bold(bool bold)``` -Sets the bold state of the font to bold and returns a reference to the font. -#### ```bool xlnt::font::bold() const``` -Returns the bold state of the font. -#### ```font& xlnt::font::superscript(bool superscript)``` -Sets the bold state of the font to bold and returns a reference to the font. -#### ```bool xlnt::font::superscript() const``` -Returns true if this font has a superscript applied. -#### ```font& xlnt::font::italic(bool italic)``` -Sets the bold state of the font to bold and returns a reference to the font. -#### ```bool xlnt::font::italic() const``` -Returns true if this font has italics applied. -#### ```font& xlnt::font::strikethrough(bool strikethrough)``` -Sets the bold state of the font to bold and returns a reference to the font. -#### ```bool xlnt::font::strikethrough() const``` -Returns true if this font has a strikethrough applied. -#### ```font& xlnt::font::outline(bool outline)``` -Sets the bold state of the font to bold and returns a reference to the font. -#### ```bool xlnt::font::outline() const``` -Returns true if this font has an outline applied. -#### ```font& xlnt::font::shadow(bool shadow)``` -Sets the shadow state of the font to shadow and returns a reference to the font. -#### ```bool xlnt::font::shadow() const``` -Returns true if this font has a shadow applied. -#### ```font& xlnt::font::underline(underline_style new_underline)``` -Sets the underline state of the font to new_underline and returns a reference to the font. -#### ```bool xlnt::font::underlined() const``` -Returns true if this font has any type of underline applied. -#### ```underline_style xlnt::font::underline() const``` -Returns the particular style of underline this font has applied. -#### ```bool xlnt::font::has_size() const``` -Returns true if this font has a defined size. -#### ```font& xlnt::font::size(double size)``` -Sets the size of the font to size and returns a reference to the font. -#### ```double xlnt::font::size() const``` -Returns the size of the font. -#### ```bool xlnt::font::has_name() const``` -Returns true if this font has a particular face applied (e.g. "Comic Sans"). -#### ```font& xlnt::font::name(const std::string &name)``` -Sets the font face to name and returns a reference to the font. -#### ```std::string xlnt::font::name() const``` -Returns the name of the font face. -#### ```bool xlnt::font::has_color() const``` -Returns true if this font has a color applied. -#### ```font& xlnt::font::color(const color &c)``` -Sets the color of the font to c and returns a reference to the font. -#### ```xlnt::color xlnt::font::color() const``` -Returns the color that this font is using. -#### ```bool xlnt::font::has_family() const``` -Returns true if this font has a family defined. -#### ```font& xlnt::font::family(std::size_t family)``` -Sets the family index of the font to family and returns a reference to the font. -#### ```std::size_t xlnt::font::family() const``` -Returns the family index for the font. -#### ```bool xlnt::font::has_charset() const``` -Returns true if this font has a charset defined. -#### ```font& xlnt::font::charset(std::size_t charset)``` -Sets the charset of the font to charset and returns a reference to the font. -#### ```std::size_t xlnt::font::charset() const``` -Returns the charset of the font. -#### ```bool xlnt::font::has_scheme() const``` -Returns true if this font has a scheme. -#### ```font& xlnt::font::scheme(const std::string &scheme)``` -Sets the scheme of the font to scheme and returns a reference to the font. -#### ```std::string xlnt::font::scheme() const``` -Returns the scheme of this font. -#### ```bool xlnt::font::operator==(const font &other) const``` -Returns true if left is exactly equal to right. -#### ```bool xlnt::font::operator!=(const font &other) const``` -Returns true if left is not exactly equal to right. -### format -#### ```friend struct detail::stylesheetundefined``` -#### ```friend class detail::xlsx_producerundefined``` -#### ```class alignment xlnt::format::alignment() const``` -Returns the alignment of this format. -#### ```format xlnt::format::alignment(const xlnt::alignment &new_alignment, bool applied=true)``` -Sets the alignment of this format to new_alignment. Applied, which defaults to true, determines whether the alignment should be enabled for cells using this format. -#### ```bool xlnt::format::alignment_applied() const``` -Returns true if the alignment of this format should be applied to cells using it. -#### ```class border xlnt::format::border() const``` -Returns the border of this format. -#### ```format xlnt::format::border(const xlnt::border &new_border, bool applied=true)``` -Sets the border of this format to new_border. Applied, which defaults to true, determines whether the border should be enabled for cells using this format. -#### ```bool xlnt::format::border_applied() const``` -Returns true if the border set for this format should be applied to cells using the format. -#### ```class fill xlnt::format::fill() const``` -Returns the fill of this format. -#### ```format xlnt::format::fill(const xlnt::fill &new_fill, bool applied=true)``` -Sets the fill of this format to new_fill. Applied, which defaults to true, determines whether the border should be enabled for cells using this format. -#### ```bool xlnt::format::fill_applied() const``` -Returns true if the fill set for this format should be applied to cells using the format. -#### ```class font xlnt::format::font() const``` -Returns the font of this format. -#### ```format xlnt::format::font(const xlnt::font &new_font, bool applied=true)``` -Sets the font of this format to new_font. Applied, which defaults to true, determines whether the font should be enabled for cells using this format. -#### ```bool xlnt::format::font_applied() const``` -Returns true if the font set for this format should be applied to cells using the format. -#### ```class number_format xlnt::format::number_format() const``` -Returns the number format of this format. -#### ```format xlnt::format::number_format(const xlnt::number_format &new_number_format, bool applied=true)``` -Sets the number format of this format to new_number_format. Applied, which defaults to true, determines whether the number format should be enabled for cells using this format. -#### ```bool xlnt::format::number_format_applied() const``` -Returns true if the number_format set for this format should be applied to cells using the format. -#### ```class protection xlnt::format::protection() const``` -Returns the protection of this format. -#### ```bool xlnt::format::protection_applied() const``` -Returns true if the protection set for this format should be applied to cells using the format. -#### ```format xlnt::format::protection(const xlnt::protection &new_protection, bool applied=true)``` -Sets the protection of this format to new_protection. Applied, which defaults to true, determines whether the protection should be enabled for cells using this format. -#### ```bool xlnt::format::pivot_button() const``` -Returns true if the pivot table interface is enabled for this format. -#### ```void xlnt::format::pivot_button(bool show)``` -If show is true, a pivot table interface will be displayed for cells using this format. -#### ```bool xlnt::format::quote_prefix() const``` -Returns true if this format should add a single-quote prefix for all text values. -#### ```void xlnt::format::quote_prefix(bool quote)``` -If quote is true, enables a single-quote prefix for all text values in cells using this format (e.g. "abc" will appear as "'abc"). The text will also not be stored in sharedStrings when this is enabled. -#### ```bool xlnt::format::has_style() const``` -Returns true if this format has a corresponding style applied. -#### ```void xlnt::format::clear_style()``` -Removes the style from this format if it exists. -#### ```format xlnt::format::style(const std::string &name)``` -Sets the style of this format to a style with the given name. -#### ```format xlnt::format::style(const class style &new_style)``` -Sets the style of this format to new_style. -#### ```class style xlnt::format::style()``` -Returns the style of this format. If it has no style, an invalid_parameter exception will be thrown. -#### ```const class style xlnt::format::style() const``` -Returns the style of this format. If it has no style, an invalid_parameters exception will be thrown. -### number_format -#### ```static const number_format xlnt::number_format::general()``` -Number format "General" -#### ```static const number_format xlnt::number_format::text()``` -Number format "@" -#### ```static const number_format xlnt::number_format::number()``` -Number format "0" -#### ```static const number_format xlnt::number_format::number_00()``` -Number format "00" -#### ```static const number_format xlnt::number_format::number_comma_separated1()``` -Number format "#,##0.00" -#### ```static const number_format xlnt::number_format::percentage()``` -Number format "0%" -#### ```static const number_format xlnt::number_format::percentage_00()``` -Number format "0.00%" -#### ```static const number_format xlnt::number_format::date_yyyymmdd2()``` -Number format "yyyy-mm-dd" -#### ```static const number_format xlnt::number_format::date_yymmdd()``` -Number format "yy-mm-dd" -#### ```static const number_format xlnt::number_format::date_ddmmyyyy()``` -Number format "dd/mm/yy" -#### ```static const number_format xlnt::number_format::date_dmyslash()``` -Number format "d/m/yy" -#### ```static const number_format xlnt::number_format::date_dmyminus()``` -Number format "d-m-yy" -#### ```static const number_format xlnt::number_format::date_dmminus()``` -Number format "d-m" -#### ```static const number_format xlnt::number_format::date_myminus()``` -Number format "m-yy" -#### ```static const number_format xlnt::number_format::date_xlsx14()``` -Number format "mm-dd-yy" -#### ```static const number_format xlnt::number_format::date_xlsx15()``` -Number format "d-mmm-yy" -#### ```static const number_format xlnt::number_format::date_xlsx16()``` -Number format "d-mmm" -#### ```static const number_format xlnt::number_format::date_xlsx17()``` -Number format "mmm-yy" -#### ```static const number_format xlnt::number_format::date_xlsx22()``` -Number format "m/d/yy h:mm" -#### ```static const number_format xlnt::number_format::date_datetime()``` -Number format "yyyy-mm-dd h:mm:ss" -#### ```static const number_format xlnt::number_format::date_time1()``` -Number format "h:mm AM/PM" -#### ```static const number_format xlnt::number_format::date_time2()``` -Number format "h:mm:ss AM/PM" -#### ```static const number_format xlnt::number_format::date_time3()``` -Number format "h:mm" -#### ```static const number_format xlnt::number_format::date_time4()``` -Number format "h:mm:ss" -#### ```static const number_format xlnt::number_format::date_time5()``` -Number format "mm:ss" -#### ```static const number_format xlnt::number_format::date_time6()``` -Number format "h:mm:ss" -#### ```static bool xlnt::number_format::is_builtin_format(std::size_t builtin_id)``` -Returns true if the given format ID corresponds to a known builtin format. -#### ```static const number_format& xlnt::number_format::from_builtin_id(std::size_t builtin_id)``` -Returns the format with the given ID. Thows an invalid_parameter exception if builtin_id is not a valid ID. -#### ```xlnt::number_format::number_format()``` -Constructs a default number_format equivalent to "General" -#### ```xlnt::number_format::number_format(std::size_t builtin_id)``` -Constructs a number format equivalent to that returned from number_format::from_builtin_id(builtin_id). -#### ```xlnt::number_format::number_format(const std::string &code)``` -Constructs a number format from a code string. If the string matches a builtin ID, its ID will also be set to match the builtin ID. -#### ```xlnt::number_format::number_format(const std::string &code, std::size_t custom_id)``` -Constructs a number format from a code string and custom ID. Custom ID should generally be >= 164. -#### ```void xlnt::number_format::format_string(const std::string &format_code)``` -Sets the format code of this number format to format_code. -#### ```void xlnt::number_format::format_string(const std::string &format_code, std::size_t custom_id)``` -Sets the format code of this number format to format_code and the ID to custom_id. -#### ```std::string xlnt::number_format::format_string() const``` -Returns the format code this number format uses. -#### ```bool xlnt::number_format::has_id() const``` -Returns true if this number format has an ID. -#### ```void xlnt::number_format::id(std::size_t id)``` -Sets the ID of this number format to id. -#### ```std::size_t xlnt::number_format::id() const``` -Returns the ID of this format. -#### ```std::string xlnt::number_format::format(const std::string &text) const``` -Returns text formatted according to this number format's format code. -#### ```std::string xlnt::number_format::format(long double number, calendar base_date) const``` -Returns number formatted according to this number format's format code with the given base date. -#### ```bool xlnt::number_format::is_date_format() const``` -Returns true if this format code returns a number formatted as a date. -#### ```bool xlnt::number_format::operator==(const number_format &other) const``` -Returns true if this format is equivalent to other. -#### ```bool xlnt::number_format::operator!=(const number_format &other) const``` -Returns true if this format is not equivalent to other. -### protection -#### ```static protection xlnt::protection::unlocked_and_visible()``` -Returns an unlocked and unhidden protection object. -#### ```static protection xlnt::protection::locked_and_visible()``` -Returns a locked and unhidden protection object. -#### ```static protection xlnt::protection::unlocked_and_hidden()``` -Returns an unlocked and hidden protection object. -#### ```static protection xlnt::protection::locked_and_hidden()``` -Returns a locked and hidden protection object. -#### ```xlnt::protection::protection()``` -Constructs a default unlocked unhidden protection object. -#### ```bool xlnt::protection::locked() const``` -Returns true if cells using this protection should be locked. -#### ```protection& xlnt::protection::locked(bool locked)``` -Sets the locked state of the protection to locked and returns a reference to the protection. -#### ```bool xlnt::protection::hidden() const``` -Returns true if cells using this protection should be hidden. -#### ```protection& xlnt::protection::hidden(bool hidden)``` -Sets the hidden state of the protection to hidden and returns a reference to the protection. -#### ```bool xlnt::protection::operator==(const protection &other) const``` -Returns true if this protections is equivalent to right. -#### ```bool xlnt::protection::operator!=(const protection &other) const``` -Returns true if this protection is not equivalent to right. -### style -#### ```friend struct detail::stylesheetundefined``` -#### ```friend class detail::xlsx_consumerundefined``` -#### ```xlnt::style::style()=delete``` -Delete zero-argument constructor -#### ```xlnt::style::style(const style &other)=default``` -Default copy constructor. Constructs a style using the same PIMPL as other. -#### ```std::string xlnt::style::name() const``` -Returns the name of this style. -#### ```style xlnt::style::name(const std::string &name)``` -Sets the name of this style to name. -#### ```bool xlnt::style::hidden() const``` -Returns true if this style is hidden. -#### ```style xlnt::style::hidden(bool value)``` -Sets the hidden state of this style to value. A hidden style will not be shown in the list of selectable styles in the UI, but will still apply its formatting to cells using it. -#### ```bool xlnt::style::custom_builtin() const``` -Returns true if this is a builtin style that has been customized and should therefore be persisted in the workbook. -#### ```std::size_t xlnt::style::builtin_id() const``` -Returns the index of the builtin style that this style is an instance of or is a customized version thereof. If style::builtin() is false, this will throw an invalid_attribute exception. -#### ```bool xlnt::style::builtin() const``` -Returns true if this is a builtin style. -#### ```class alignment xlnt::style::alignment() const``` -Returns the alignment of this style. -#### ```bool xlnt::style::alignment_applied() const``` -Returns true if the alignment of this style should be applied to cells using it. -#### ```style xlnt::style::alignment(const xlnt::alignment &new_alignment, bool applied=true)``` -Sets the alignment of this style to new_alignment. Applied, which defaults to true, determines whether the alignment should be enabled for cells using this style. -#### ```class border xlnt::style::border() const``` -Returns the border of this style. -#### ```bool xlnt::style::border_applied() const``` -Returns true if the border set for this style should be applied to cells using the style. -#### ```style xlnt::style::border(const xlnt::border &new_border, bool applied=true)``` -Sets the border of this style to new_border. Applied, which defaults to true, determines whether the border should be enabled for cells using this style. -#### ```class fill xlnt::style::fill() const``` -Returns the fill of this style. -#### ```bool xlnt::style::fill_applied() const``` -Returns true if the fill set for this style should be applied to cells using the style. -#### ```style xlnt::style::fill(const xlnt::fill &new_fill, bool applied=true)``` -Sets the fill of this style to new_fill. Applied, which defaults to true, determines whether the border should be enabled for cells using this style. -#### ```class font xlnt::style::font() const``` -Returns the font of this style. -#### ```bool xlnt::style::font_applied() const``` -Returns true if the font set for this style should be applied to cells using the style. -#### ```style xlnt::style::font(const xlnt::font &new_font, bool applied=true)``` -Sets the font of this style to new_font. Applied, which defaults to true, determines whether the font should be enabled for cells using this style. -#### ```class number_format xlnt::style::number_format() const``` -Returns the number_format of this style. -#### ```bool xlnt::style::number_format_applied() const``` -Returns true if the number_format set for this style should be applied to cells using the style. -#### ```style xlnt::style::number_format(const xlnt::number_format &new_number_format, bool applied=true)``` -Sets the number format of this style to new_number_format. Applied, which defaults to true, determines whether the number format should be enabled for cells using this style. -#### ```class protection xlnt::style::protection() const``` -Returns the protection of this style. -#### ```bool xlnt::style::protection_applied() const``` -Returns true if the protection set for this style should be applied to cells using the style. -#### ```style xlnt::style::protection(const xlnt::protection &new_protection, bool applied=true)``` -Sets the border of this style to new_protection. Applied, which defaults to true, determines whether the protection should be enabled for cells using this style. -#### ```bool xlnt::style::pivot_button() const``` -Returns true if the pivot table interface is enabled for this style. -#### ```void xlnt::style::pivot_button(bool show)``` -If show is true, a pivot table interface will be displayed for cells using this style. -#### ```bool xlnt::style::quote_prefix() const``` -Returns true if this style should add a single-quote prefix for all text values. -#### ```void xlnt::style::quote_prefix(bool quote)``` -If quote is true, enables a single-quote prefix for all text values in cells using this style (e.g. "abc" will appear as "'abc"). The text will also not be stored in sharedStrings when this is enabled. -#### ```bool xlnt::style::operator==(const style &other) const``` -Returns true if this style is equivalent to other. -#### ```bool xlnt::style::operator!=(const style &other) const``` -Returns true if this style is not equivalent to other. -## Utils Module -### date -#### ```int xlnt::date::yearundefined``` -The year -#### ```int xlnt::date::monthundefined``` -The month -#### ```int xlnt::date::dayundefined``` -The day -#### ```static date xlnt::date::today()``` -Return the current date according to the system time. -#### ```static date xlnt::date::from_number(int days_since_base_year, calendar base_date)``` -Return a date by adding days_since_base_year to base_date. This includes leap years. -#### ```xlnt::date::date(int year_, int month_, int day_)``` -Constructs a data from a given year, month, and day. -#### ```int xlnt::date::to_number(calendar base_date) const``` -Return the number of days between this date and base_date. -#### ```int xlnt::date::weekday() const``` -Calculates and returns the day of the week that this date represents in the range 0 to 6 where 0 represents Sunday. -#### ```bool xlnt::date::operator==(const date &comparand) const``` -Return true if this date is equal to comparand. -### datetime -#### ```int xlnt::datetime::yearundefined``` -The year -#### ```int xlnt::datetime::monthundefined``` -The month -#### ```int xlnt::datetime::dayundefined``` -The day -#### ```int xlnt::datetime::hourundefined``` -The hour -#### ```int xlnt::datetime::minuteundefined``` -The minute -#### ```int xlnt::datetime::secondundefined``` -The second -#### ```int xlnt::datetime::microsecondundefined``` -The microsecond -#### ```static datetime xlnt::datetime::now()``` -Returns the current date and time according to the system time. -#### ```static datetime xlnt::datetime::today()``` -Returns the current date and time according to the system time. This is equivalent to datetime::now(). -#### ```static datetime xlnt::datetime::from_number(long double number, calendar base_date)``` -Returns a datetime from number by converting the integer part into a date and the fractional part into a time according to date::from_number and time::from_number. -#### ```static datetime xlnt::datetime::from_iso_string(const std::string &iso_string)``` -Returns a datetime equivalent to the ISO-formatted string iso_string. -#### ```xlnt::datetime::datetime(const date &d, const time &t)``` -Constructs a datetime from a date and a time. -#### ```xlnt::datetime::datetime(int year_, int month_, int day_, int hour_=0, int minute_=0, int second_=0, int microsecond_=0)``` -Constructs a datetime from a year, month, and day plus optional hour, minute, second, and microsecond. -#### ```std::string xlnt::datetime::to_string() const``` -Returns a string represenation of this date and time. -#### ```std::string xlnt::datetime::to_iso_string() const``` -Returns an ISO-formatted string representation of this date and time. -#### ```long double xlnt::datetime::to_number(calendar base_date) const``` -Returns this datetime as a number of seconds since 1900 or 1904 (depending on base_date provided). -#### ```bool xlnt::datetime::operator==(const datetime &comparand) const``` -Returns true if this datetime is equivalent to comparand. -#### ```int xlnt::datetime::weekday() const``` -Calculates and returns the day of the week that this date represents in the range 0 to 6 where 0 represents Sunday. -### exception -#### ```xlnt::exception::exception(const std::string &message)``` -Constructs an exception with a message. This message will be returned by std::exception::what(), an inherited member of this class. -#### ```xlnt::exception::exception(const exception &)=default``` -Default copy constructor. -#### ```virtual xlnt::exception::~exception()``` -Destructor -#### ```void xlnt::exception::message(const std::string &message)``` -Sets the message after the xlnt::exception is constructed. This can show more specific information than std::exception::what(). -### invalid_parameter -#### ```xlnt::invalid_parameter::invalid_parameter()``` -Default constructor. -#### ```xlnt::invalid_parameter::invalid_parameter(const invalid_parameter &)=default``` -Default copy constructor. -#### ```virtual xlnt::invalid_parameter::~invalid_parameter()``` -Destructor -### invalid_sheet_title -#### ```xlnt::invalid_sheet_title::invalid_sheet_title(const std::string &title)``` -Default constructor. -#### ```xlnt::invalid_sheet_title::invalid_sheet_title(const invalid_sheet_title &)=default``` -Default copy constructor. -#### ```virtual xlnt::invalid_sheet_title::~invalid_sheet_title()``` -Destructor -### missing_number_format -#### ```xlnt::missing_number_format::missing_number_format()``` -Default constructor. -#### ```xlnt::missing_number_format::missing_number_format(const missing_number_format &)=default``` -Default copy constructor. -#### ```virtual xlnt::missing_number_format::~missing_number_format()``` -Destructor -### invalid_file -#### ```xlnt::invalid_file::invalid_file(const std::string &filename)``` -Constructs an invalid_file exception thrown when attempt to access the given filename. -#### ```xlnt::invalid_file::invalid_file(const invalid_file &)=default``` -Default copy constructor. -#### ```virtual xlnt::invalid_file::~invalid_file()``` -Destructor -### illegal_character -#### ```xlnt::illegal_character::illegal_character(char c)``` -Constructs an illegal_character exception thrown as a result of the given character. -#### ```xlnt::illegal_character::illegal_character(const illegal_character &)=default``` -Default copy constructor. -#### ```virtual xlnt::illegal_character::~illegal_character()``` -Destructor -### invalid_data_type -#### ```xlnt::invalid_data_type::invalid_data_type()``` -Default constructor. -#### ```xlnt::invalid_data_type::invalid_data_type(const invalid_data_type &)=default``` -Default copy constructor. -#### ```virtual xlnt::invalid_data_type::~invalid_data_type()``` -Destructor -### invalid_column_index -#### ```xlnt::invalid_column_index::invalid_column_index()``` -Default constructor. -#### ```xlnt::invalid_column_index::invalid_column_index(const invalid_column_index &)=default``` -Default copy constructor. -#### ```virtual xlnt::invalid_column_index::~invalid_column_index()``` -Destructor -### invalid_cell_reference -#### ```xlnt::invalid_cell_reference::invalid_cell_reference(column_t column, row_t row)``` -Constructs an invalid_cell_reference exception for the given column and row. -#### ```xlnt::invalid_cell_reference::invalid_cell_reference(const std::string &reference_string)``` -Constructs an invalid_cell_reference exception for the given string. -#### ```xlnt::invalid_cell_reference::invalid_cell_reference(const invalid_cell_reference &)=default``` -Default copy constructor. -#### ```virtual xlnt::invalid_cell_reference::~invalid_cell_reference()``` -Destructor -### invalid_attribute -#### ```xlnt::invalid_attribute::invalid_attribute()``` -Default constructor. -#### ```xlnt::invalid_attribute::invalid_attribute(const invalid_attribute &)=default``` -Default copy constructor. -#### ```virtual xlnt::invalid_attribute::~invalid_attribute()``` -Destructor -### key_not_found -#### ```xlnt::key_not_found::key_not_found()``` -Default constructor. -#### ```xlnt::key_not_found::key_not_found(const key_not_found &)=default``` -Default copy constructor. -#### ```virtual xlnt::key_not_found::~key_not_found()``` -Destructor -### no_visible_worksheets -#### ```xlnt::no_visible_worksheets::no_visible_worksheets()``` -Default constructor. -#### ```xlnt::no_visible_worksheets::no_visible_worksheets(const no_visible_worksheets &)=default``` -Default copy constructor. -#### ```virtual xlnt::no_visible_worksheets::~no_visible_worksheets()``` -Destructor -### unhandled_switch_case -#### ```xlnt::unhandled_switch_case::unhandled_switch_case()``` -Default constructor. -#### ```xlnt::unhandled_switch_case::unhandled_switch_case(const unhandled_switch_case &)=default``` -Default copy constructor. -#### ```virtual xlnt::unhandled_switch_case::~unhandled_switch_case()``` -Destructor -### unsupported -#### ```xlnt::unsupported::unsupported(const std::string &message)``` -Constructs an unsupported exception with a message describing the unsupported feature. -#### ```xlnt::unsupported::unsupported(const unsupported &)=default``` -Default copy constructor. -#### ```virtual xlnt::unsupported::~unsupported()``` -Destructor -### optional -#### ```xlnt::optional< T >::optional()``` -Default contructor. is_set() will be false initially. -#### ```xlnt::optional< T >::optional(const T &value)``` -Constructs this optional with a value. -#### ```bool xlnt::optional< T >::is_set() const``` -Returns true if this object currently has a value set. This should be called before accessing the value with optional::get(). -#### ```void xlnt::optional< T >::set(const T &value)``` -Sets the value to value. -#### ```T& xlnt::optional< T >::get()``` -Gets the value. If no value has been initialized in this object, an xlnt::invalid_attribute exception will be thrown. -#### ```const T& xlnt::optional< T >::get() const``` -Gets the value. If no value has been initialized in this object, an xlnt::invalid_attribute exception will be thrown. -#### ```void xlnt::optional< T >::clear()``` -Resets the internal value using its default constructor. After this is called, is_set() will return false until a new value is provided. -#### ```optional& xlnt::optional< T >::operator=(const T &rhs)``` -Assignment operator. Equivalent to setting the value using optional::set. -#### ```bool xlnt::optional< T >::operator==(const optional< T > &other) const``` -Returns true if neither this nor other have a value or both have a value and those values are equal according to their equality operator. -### path -#### ```static char xlnt::path::system_separator()``` -The system-specific path separator character (e.g. '/' or '\'). -#### ```xlnt::path::path()``` -Construct an empty path. -#### ```xlnt::path::path(const std::string &path_string)``` -Counstruct a path from a string representing the path. -#### ```xlnt::path::path(const std::string &path_string, char sep)``` -Construct a path from a string with an explicit directory seprator. -#### ```bool xlnt::path::is_relative() const``` -Return true iff this path doesn't begin with / (or a drive letter on Windows). -#### ```bool xlnt::path::is_absolute() const``` -Return true iff path::is_relative() is false. -#### ```bool xlnt::path::is_root() const``` -Return true iff this path is the root directory. -#### ```path xlnt::path::parent() const``` -Return a new path that points to the directory containing the current path Return the path unchanged if this path is the absolute or relative root. -#### ```std::string xlnt::path::filename() const``` -Return the last component of this path. -#### ```std::string xlnt::path::extension() const``` -Return the part of the path following the last dot in the filename. -#### ```std::pair xlnt::path::split_extension() const``` -Return a pair of strings resulting from splitting the filename on the last dot. -#### ```std::vector xlnt::path::split() const``` -Create a string representing this path separated by the provided separator or the system-default separator if not provided. -#### ```std::string xlnt::path::string() const``` -Create a string representing this path separated by the provided separator or the system-default separator if not provided. -#### ```path xlnt::path::resolve(const path &base_path) const``` -If this path is relative, append each component of this path to base_path and return the resulting absolute path. Otherwise, the the current path will be returned and base_path will be ignored. -#### ```path xlnt::path::relative_to(const path &base_path) const``` -The inverse of path::resolve. Creates a relative path from an absolute path by removing the common root between base_path and this path. If the current path is already relative, return it unchanged. -#### ```bool xlnt::path::exists() const``` -Return true iff the file or directory pointed to by this path exists on the filesystem. -#### ```bool xlnt::path::is_directory() const``` -Return true if the file or directory pointed to by this path is a directory. -#### ```bool xlnt::path::is_file() const``` -Return true if the file or directory pointed to by this path is a regular file. -#### ```std::string xlnt::path::read_contents() const``` -Open the file pointed to by this path and return a string containing the files contents. -#### ```path xlnt::path::append(const std::string &to_append) const``` -Append the provided part to this path and return the result. -#### ```path xlnt::path::append(const path &to_append) const``` -Append the provided part to this path and return the result. -#### ```bool xlnt::path::operator==(const path &other) const``` -Returns true if left path is equal to right path. -### path > -#### ```size_t std::hash< xlnt::path >::operator()(const xlnt::path &p) const``` -Returns a hashed represenation of the given path. -### scoped_enum_hash -#### ```std::size_t xlnt::scoped_enum_hash< Enum >::operator()(Enum e) const``` -Cast the enumeration e to a std::size_t and hash that value using std::hash. -### time -#### ```int xlnt::time::hourundefined``` -The hour -#### ```int xlnt::time::minuteundefined``` -The minute -#### ```int xlnt::time::secondundefined``` -The second -#### ```int xlnt::time::microsecondundefined``` -The microsecond -#### ```static time xlnt::time::now()``` -Return the current time according to the system time. -#### ```static time xlnt::time::from_number(long double number)``` -Return a time from a number representing a fraction of a day. The integer part of number will be ignored. 0.5 would return time(12, 0, 0, 0) or noon, halfway through the day. -#### ```xlnt::time::time(int hour_=0, int minute_=0, int second_=0, int microsecond_=0)``` -Constructs a time object from an optional hour, minute, second, and microsecond. -#### ```xlnt::time::time(const std::string &time_string)``` -Constructs a time object from a string representing the time. -#### ```long double xlnt::time::to_number() const``` -Returns a numeric representation of the time in the range 0-1 where the value is equal to the fraction of the day elapsed. -#### ```bool xlnt::time::operator==(const time &comparand) const``` -Returns true if this time is equivalent to comparand. -### timedelta -#### ```int xlnt::timedelta::daysundefined``` -The days -#### ```int xlnt::timedelta::hoursundefined``` -The hours -#### ```int xlnt::timedelta::minutesundefined``` -The minutes -#### ```int xlnt::timedelta::secondsundefined``` -The seconds -#### ```int xlnt::timedelta::microsecondsundefined``` -The microseconds -#### ```static timedelta xlnt::timedelta::from_number(long double number)``` -Returns a timedelta from a number representing the factional number of days elapsed. -#### ```xlnt::timedelta::timedelta()``` -Constructs a timedelta equal to zero. -#### ```xlnt::timedelta::timedelta(int days_, int hours_, int minutes_, int seconds_, int microseconds_)``` -Constructs a timedelta from a number of days, hours, minutes, seconds, and microseconds. -#### ```long double xlnt::timedelta::to_number() const``` -Returns a numeric representation of this timedelta as a fractional number of days. -### variant -#### ```undefinedundefined``` -The possible types a variant can hold. -#### ```xlnt::variant::variant()``` -Default constructor. Creates a null-type variant. -#### ```xlnt::variant::variant(const std::string &value)``` -Creates a string-type variant with the given value. -#### ```xlnt::variant::variant(const char *value)``` -Creates a string-type variant with the given value. -#### ```xlnt::variant::variant(int value)``` -Creates a i4-type variant with the given value. -#### ```xlnt::variant::variant(bool value)``` -Creates a bool-type variant with the given value. -#### ```xlnt::variant::variant(const datetime &value)``` -Creates a date-type variant with the given value. -#### ```xlnt::variant::variant(const std::initializer_list< int > &value)``` -Creates a vector_i4-type variant with the given value. -#### ```xlnt::variant::variant(const std::vector< int > &value)``` -Creates a vector_i4-type variant with the given value. -#### ```xlnt::variant::variant(const std::initializer_list< const char *> &value)``` -Creates a vector_string-type variant with the given value. -#### ```xlnt::variant::variant(const std::vector< const char *> &value)``` -Creates a vector_string-type variant with the given value. -#### ```xlnt::variant::variant(const std::initializer_list< std::string > &value)``` -Creates a vector_string-type variant with the given value. -#### ```xlnt::variant::variant(const std::vector< std::string > &value)``` -Creates a vector_string-type variant with the given value. -#### ```xlnt::variant::variant(const std::vector< variant > &value)``` -Creates a vector_variant-type variant with the given value. -#### ```bool xlnt::variant::is(type t) const``` -Returns true if this variant is of type t. -#### ```T xlnt::variant::get() const``` -Returns the value of this variant as type T. An exception will be thrown if the types are not convertible. -#### ```type xlnt::variant::value_type() const``` -Returns the type of this variant. -## Workbook Module -### calculation_properties -#### ```std::size_t xlnt::calculation_properties::calc_idundefined``` -The version of calculation engine used to calculate cell formula values. If this is older than the version of the Excel calculation engine opening the workbook, cell values will be recalculated. -#### ```bool xlnt::calculation_properties::concurrent_calcundefined``` -If this is true, concurrent calculation will be enabled for the workbook. -### document_security -#### ```bool xlnt::document_security::lock_revisionundefined``` -If true, the workbook is locked for revisions. -#### ```bool xlnt::document_security::lock_structureundefined``` -If true, worksheets can't be moved, renamed, (un)hidden, inserted, or deleted. -#### ```bool xlnt::document_security::lock_windowsundefined``` -If true, workbook windows will be opened at the same position with the same size every time they are loaded. -#### ```lock_verifier xlnt::document_security::revision_lockundefined``` -The settings to allow the revision lock to be removed. -#### ```lock_verifier xlnt::document_security::workbook_lockundefined``` -The settings to allow the structure and windows lock to be removed. -#### ```xlnt::document_security::document_security()``` -Constructs a new document security object with default values. -### lock_verifier -#### ```std::string xlnt::document_security::lock_verifier::hash_algorithmundefined``` -The algorithm used to create and verify this lock. -#### ```std::string xlnt::document_security::lock_verifier::saltundefined``` -The initial salt combined with the password used to prevent rainbow table attacks -#### ```std::string xlnt::document_security::lock_verifier::hashundefined``` -The actual hash value represented as a string -#### ```std::size_t xlnt::document_security::lock_verifier::spin_countundefined``` -The number of times the hash should be applied to the password combined with the salt. This allows the difficulty of the hash to be increased as computing power increases. -### external_book -### named_range -#### ```using xlnt::named_range::target = std::pairundefined``` -Type alias for the combination of sheet and range this named_range points to. -#### ```xlnt::named_range::named_range()``` -Constructs a named range that has no name and has no targets. -#### ```xlnt::named_range::named_range(const named_range &other)``` -Constructs a named range by copying its name and targets from other. -#### ```xlnt::named_range::named_range(const std::string &name, const std::vector< target > &targets)``` -Constructs a named range with the given name and targets. -#### ```std::string xlnt::named_range::name() const``` -Returns the name of this range. -#### ```const std::vector& xlnt::named_range::targets() const``` -Returns the set of targets of this named range as a vector. -#### ```named_range& xlnt::named_range::operator=(const named_range &other)``` -Assigns the name and targets of this named_range to that of other. -### theme -### workbook -#### ```using xlnt::workbook::iterator = worksheet_iteratorundefined``` -typedef for the iterator used for iterating through this workbook (non-const) in a range-based for loop. -#### ```using xlnt::workbook::const_iterator = const_worksheet_iteratorundefined``` -typedef for the iterator used for iterating through this workbook (const) in a range-based for loop. -#### ```using xlnt::workbook::reverse_iterator = std::reverse_iteratorundefined``` -typedef for the iterator used for iterating through this workbook (non-const) in a range-based for loop in reverse order using std::make_reverse_iterator. -#### ```using xlnt::workbook::const_reverse_iterator = std::reverse_iteratorundefined``` -typedef for the iterator used for iterating through this workbook (const) in a range-based for loop in reverse order using std::make_reverse_iterator. -#### ```friend class detail::xlsx_consumerundefined``` -#### ```friend class detail::xlsx_producerundefined``` -#### ```static workbook xlnt::workbook::empty()``` -Constructs and returns an empty workbook similar to a default. Excel workbook -#### ```xlnt::workbook::workbook()``` -Default constructor. Constructs a workbook containing a single empty worksheet using workbook::empty(). -#### ```xlnt::workbook::workbook(workbook &&other)``` -Move constructor. Constructs a workbook from existing workbook, other. -#### ```xlnt::workbook::workbook(const workbook &other)``` -Copy constructor. Constructs this workbook from existing workbook, other. -#### ```xlnt::workbook::~workbook()``` -Destroys this workbook, deallocating all internal storage space. Any pimpl wrapper classes (e.g. cell) pointing into this workbook will be invalid after this is executed. -#### ```worksheet xlnt::workbook::create_sheet()``` -Creates and returns a sheet after the last sheet in this workbook. -#### ```worksheet xlnt::workbook::create_sheet(std::size_t index)``` -Creates and returns a sheet at the specified index. -#### ```worksheet xlnt::workbook::create_sheet_with_rel(const std::string &title, const relationship &rel)``` -TODO: This should be private... -#### ```worksheet xlnt::workbook::copy_sheet(worksheet worksheet)``` -Creates and returns a new sheet after the last sheet initializing it with all of the data from the provided worksheet. -#### ```worksheet xlnt::workbook::copy_sheet(worksheet worksheet, std::size_t index)``` -Creates and returns a new sheet at the specified index initializing it with all of the data from the provided worksheet. -#### ```worksheet xlnt::workbook::active_sheet()``` -Returns the worksheet that is determined to be active. An active sheet is that which is initially shown by the spreadsheet editor. -#### ```worksheet xlnt::workbook::sheet_by_title(const std::string &title)``` -Returns the worksheet with the given name. This may throw an exception if the sheet isn't found. Use workbook::contains(const std::string &) to make sure the sheet exists before calling this method. -#### ```const worksheet xlnt::workbook::sheet_by_title(const std::string &title) const``` -Returns the worksheet with the given name. This may throw an exception if the sheet isn't found. Use workbook::contains(const std::string &) to make sure the sheet exists before calling this method. -#### ```worksheet xlnt::workbook::sheet_by_index(std::size_t index)``` -Returns the worksheet at the given index. This will throw an exception if index is greater than or equal to the number of sheets in this workbook. -#### ```const worksheet xlnt::workbook::sheet_by_index(std::size_t index) const``` -Returns the worksheet at the given index. This will throw an exception if index is greater than or equal to the number of sheets in this workbook. -#### ```worksheet xlnt::workbook::sheet_by_id(std::size_t id)``` -Returns the worksheet with a sheetId of id. Sheet IDs are arbitrary numbers that uniquely identify a sheet. Most users won't need this. -#### ```const worksheet xlnt::workbook::sheet_by_id(std::size_t id) const``` -Returns the worksheet with a sheetId of id. Sheet IDs are arbitrary numbers that uniquely identify a sheet. Most users won't need this. -#### ```bool xlnt::workbook::contains(const std::string &title) const``` -Returns true if this workbook contains a sheet with the given title. -#### ```std::size_t xlnt::workbook::index(worksheet worksheet)``` -Returns the index of the given worksheet. The worksheet must be owned by this workbook. -#### ```void xlnt::workbook::remove_sheet(worksheet worksheet)``` -Removes the given worksheet from this workbook. -#### ```void xlnt::workbook::clear()``` -Sets the contents of this workbook to be equivalent to that of a workbook returned by workbook::empty(). -#### ```iterator xlnt::workbook::begin()``` -Returns an iterator to the first worksheet in this workbook. -#### ```iterator xlnt::workbook::end()``` -Returns an iterator to the worksheet following the last worksheet of the workbook. This worksheet acts as a placeholder; attempting to access it will cause an exception to be thrown. -#### ```const_iterator xlnt::workbook::begin() const``` -Returns a const iterator to the first worksheet in this workbook. -#### ```const_iterator xlnt::workbook::end() const``` -Returns a const iterator to the worksheet following the last worksheet of the workbook. This worksheet acts as a placeholder; attempting to access it will cause an exception to be thrown. -#### ```const_iterator xlnt::workbook::cbegin() const``` -Returns an iterator to the first worksheet in this workbook. -#### ```const_iterator xlnt::workbook::cend() const``` -Returns a const iterator to the worksheet following the last worksheet of the workbook. This worksheet acts as a placeholder; attempting to access it will cause an exception to be thrown. -#### ```void xlnt::workbook::apply_to_cells(std::function< void(cell)> f)``` -Applies the function "f" to every non-empty cell in every worksheet in this workbook. -#### ```std::vector xlnt::workbook::sheet_titles() const``` -Returns a temporary vector containing the titles of each sheet in the order of the sheets in the workbook. -#### ```std::size_t xlnt::workbook::sheet_count() const``` -Returns the number of sheets in this workbook. -#### ```bool xlnt::workbook::has_core_property(xlnt::core_property type) const``` -Returns true if the workbook has the core property with the given name. -#### ```std::vector xlnt::workbook::core_properties() const``` -Returns a vector of the type of each core property that is set to a particular value in this workbook. -#### ```variant xlnt::workbook::core_property(xlnt::core_property type) const``` -Returns the value of the given core property. -#### ```void xlnt::workbook::core_property(xlnt::core_property type, const variant &value)``` -Sets the given core property to the provided value. -#### ```bool xlnt::workbook::has_extended_property(xlnt::extended_property type) const``` -Returns true if the workbook has the extended property with the given name. -#### ```std::vector xlnt::workbook::extended_properties() const``` -Returns a vector of the type of each extended property that is set to a particular value in this workbook. -#### ```variant xlnt::workbook::extended_property(xlnt::extended_property type) const``` -Returns the value of the given extended property. -#### ```void xlnt::workbook::extended_property(xlnt::extended_property type, const variant &value)``` -Sets the given extended property to the provided value. -#### ```bool xlnt::workbook::has_custom_property(const std::string &property_name) const``` -Returns true if the workbook has the custom property with the given name. -#### ```std::vector xlnt::workbook::custom_properties() const``` -Returns a vector of the name of each custom property that is set to a particular value in this workbook. -#### ```variant xlnt::workbook::custom_property(const std::string &property_name) const``` -Returns the value of the given custom property. -#### ```void xlnt::workbook::custom_property(const std::string &property_name, const variant &value)``` -Creates a new custom property in this workbook and sets it to the provided value. -#### ```calendar xlnt::workbook::base_date() const``` -Returns the base date used by this workbook. This will generally be windows_1900 except on Apple based systems when it will default to mac_1904 unless otherwise set via void workbook::base_date(calendar base_date). -#### ```void xlnt::workbook::base_date(calendar base_date)``` -Sets the base date style of this workbook. This is the date and time that a numeric value of 0 represents. -#### ```bool xlnt::workbook::has_title() const``` -Returns true if this workbook has had its title set. -#### ```std::string xlnt::workbook::title() const``` -Returns the title of this workbook. -#### ```void xlnt::workbook::title(const std::string &title)``` -Sets the title of this workbook to title. -#### ```std::vector xlnt::workbook::named_ranges() const``` -Returns a vector of the named ranges in this workbook. -#### ```void xlnt::workbook::create_named_range(const std::string &name, worksheet worksheet, const range_reference &reference)``` -Creates a new names range. -#### ```void xlnt::workbook::create_named_range(const std::string &name, worksheet worksheet, const std::string &reference_string)``` -Creates a new names range. -#### ```bool xlnt::workbook::has_named_range(const std::string &name) const``` -Returns true if a named range of the given name exists in the workbook. -#### ```class range xlnt::workbook::named_range(const std::string &name)``` -Returns the named range with the given name. -#### ```void xlnt::workbook::remove_named_range(const std::string &name)``` -Deletes the named range with the given name. -#### ```void xlnt::workbook::save(std::vector< std::uint8_t > &data) const``` -Serializes the workbook into an XLSX file and saves the bytes into byte vector data. -#### ```void xlnt::workbook::save(std::vector< std::uint8_t > &data, const std::string &password) const``` -Serializes the workbook into an XLSX file encrypted with the given password and saves the bytes into byte vector data. -#### ```void xlnt::workbook::save(const std::string &filename) const``` -Serializes the workbook into an XLSX file and saves the data into a file named filename. -#### ```void xlnt::workbook::save(const std::string &filename, const std::string &password) const``` -Serializes the workbook into an XLSX file encrypted with the given password and loads the bytes into a file named filename. -#### ```void xlnt::workbook::save(const xlnt::path &filename) const``` -Serializes the workbook into an XLSX file and saves the data into a file named filename. -#### ```void xlnt::workbook::save(const xlnt::path &filename, const std::string &password) const``` -Serializes the workbook into an XLSX file encrypted with the given password and loads the bytes into a file named filename. -#### ```void xlnt::workbook::save(std::ostream &stream) const``` -Serializes the workbook into an XLSX file and saves the data into stream. -#### ```void xlnt::workbook::save(std::ostream &stream, const std::string &password) const``` -Serializes the workbook into an XLSX file encrypted with the given password and loads the bytes into the given stream. -#### ```void xlnt::workbook::load(const std::vector< std::uint8_t > &data)``` -Interprets byte vector data as an XLSX file and sets the content of this workbook to match that file. -#### ```void xlnt::workbook::load(const std::vector< std::uint8_t > &data, const std::string &password)``` -Interprets byte vector data as an XLSX file encrypted with the given password and sets the content of this workbook to match that file. -#### ```void xlnt::workbook::load(const std::string &filename)``` -Interprets file with the given filename as an XLSX file and sets the content of this workbook to match that file. -#### ```void xlnt::workbook::load(const std::string &filename, const std::string &password)``` -Interprets file with the given filename as an XLSX file encrypted with the given password and sets the content of this workbook to match that file. -#### ```void xlnt::workbook::load(const xlnt::path &filename)``` -Interprets file with the given filename as an XLSX file and sets the content of this workbook to match that file. -#### ```void xlnt::workbook::load(const xlnt::path &filename, const std::string &password)``` -Interprets file with the given filename as an XLSX file encrypted with the given password and sets the content of this workbook to match that file. -#### ```void xlnt::workbook::load(std::istream &stream)``` -Interprets data in stream as an XLSX file and sets the content of this workbook to match that file. -#### ```void xlnt::workbook::load(std::istream &stream, const std::string &password)``` -Interprets data in stream as an XLSX file encrypted with the given password and sets the content of this workbook to match that file. -#### ```bool xlnt::workbook::has_view() const``` -Returns true if this workbook has a view. -#### ```workbook_view xlnt::workbook::view() const``` -Returns the view. -#### ```void xlnt::workbook::view(const workbook_view &view)``` -Sets the view to view. -#### ```bool xlnt::workbook::has_code_name() const``` -Returns true if a code name has been set for this workbook. -#### ```std::string xlnt::workbook::code_name() const``` -Returns the code name that was set for this workbook. -#### ```void xlnt::workbook::code_name(const std::string &code_name)``` -Sets the code name of this workbook to code_name. -#### ```bool xlnt::workbook::has_file_version() const``` -Returns true if this workbook has a file version. -#### ```std::string xlnt::workbook::app_name() const``` -Returns the AppName workbook file property. -#### ```std::size_t xlnt::workbook::last_edited() const``` -Returns the LastEdited workbook file property. -#### ```std::size_t xlnt::workbook::lowest_edited() const``` -Returns the LowestEdited workbook file property. -#### ```std::size_t xlnt::workbook::rup_build() const``` -Returns the RupBuild workbook file property. -#### ```bool xlnt::workbook::has_theme() const``` -Returns true if this workbook has a theme defined. -#### ```const xlnt::theme& xlnt::workbook::theme() const``` -Returns a const reference to this workbook's theme. -#### ```void xlnt::workbook::theme(const class theme &value)``` -Sets the theme to value. -#### ```xlnt::format xlnt::workbook::format(std::size_t format_index)``` -Returns the cell format at the given index. The index is the position of the format in xl/styles.xml. -#### ```const xlnt::format xlnt::workbook::format(std::size_t format_index) const``` -Returns the cell format at the given index. The index is the position of the format in xl/styles.xml. -#### ```xlnt::format xlnt::workbook::create_format(bool default_format=false)``` -Creates a new format and returns it. -#### ```void xlnt::workbook::clear_formats()``` -Clear all cell-level formatting and formats from the styelsheet. This leaves all other styling in place (e.g. named styles). -#### ```bool xlnt::workbook::has_style(const std::string &name) const``` -Returns true if this workbook has a style with a name of name. -#### ```class style xlnt::workbook::style(const std::string &name)``` -Returns the named style with the given name. -#### ```const class style xlnt::workbook::style(const std::string &name) const``` -Returns the named style with the given name. -#### ```class style xlnt::workbook::create_style(const std::string &name)``` -Creates a new style and returns it. -#### ```class style xlnt::workbook::create_builtin_style(std::size_t builtin_id)``` -Creates a new style and returns it. -#### ```void xlnt::workbook::clear_styles()``` -Clear all named styles from cells and remove the styles from from the styelsheet. This leaves all other styling in place (e.g. cell formats). -#### ```class manifest& xlnt::workbook::manifest()``` -Returns a reference to the workbook's internal manifest. -#### ```const class manifest& xlnt::workbook::manifest() const``` -Returns a reference to the workbook's internal manifest. -#### ```void xlnt::workbook::add_shared_string(const rich_text &shared, bool allow_duplicates=false)``` -Append a shared string to the shared string collection in this workbook. This should not generally be called unless you know what you're doing. If allow_duplicates is false and the string is already in the collection, it will not be added. -#### ```std::vector& xlnt::workbook::shared_strings()``` -Returns a reference to the shared strings being used by cells in this workbook. -#### ```const std::vector& xlnt::workbook::shared_strings() const``` -Returns a reference to the shared strings being used by cells in this workbook. -#### ```void xlnt::workbook::thumbnail(const std::vector< std::uint8_t > &thumbnail, const std::string &extension, const std::string &content_type)``` -Sets the workbook's thumbnail to the given vector of bytes, thumbnail, with the given extension (e.g. jpg) and content_type (e.g. image/jpeg). -#### ```const std::vector& xlnt::workbook::thumbnail() const``` -Returns a vector of bytes representing the workbook's thumbnail. -#### ```bool xlnt::workbook::has_calculation_properties() const``` -Returns true if this workbook has any calculation properties set. -#### ```class calculation_properties xlnt::workbook::calculation_properties() const``` -Returns the calculation properties used in this workbook. -#### ```void xlnt::workbook::calculation_properties(const class calculation_properties &props)``` -Sets the calculation properties of this workbook to props. -#### ```workbook& xlnt::workbook::operator=(workbook other)``` -Set the contents of this workbook to be equal to those of "other". Other is passed as value to allow for copy-swap idiom. -#### ```worksheet xlnt::workbook::operator[](const std::string &name)``` -Return the worksheet with a title of "name". -#### ```worksheet xlnt::workbook::operator[](std::size_t index)``` -Return the worksheet at "index". -#### ```bool xlnt::workbook::operator==(const workbook &rhs) const``` -Return true if this workbook internal implementation points to the same memory as rhs's. -#### ```bool xlnt::workbook::operator!=(const workbook &rhs) const``` -Return true if this workbook internal implementation doesn't point to the same memory as rhs's. -### workbook_view -#### ```bool xlnt::workbook_view::auto_filter_date_groupingundefined``` -If true, dates will be grouped when presenting the user with filtering options. -#### ```bool xlnt::workbook_view::minimizedundefined``` -If true, the view will be minimized. -#### ```bool xlnt::workbook_view::show_horizontal_scrollundefined``` -If true, the horizontal scroll bar will be displayed. -#### ```bool xlnt::workbook_view::show_sheet_tabsundefined``` -If true, the sheet tabs will be displayed. -#### ```bool xlnt::workbook_view::show_vertical_scrollundefined``` -If true, the vertical scroll bar will be displayed. -#### ```bool xlnt::workbook_view::visibleundefined``` -If true, the workbook window will be visible. -#### ```optional xlnt::workbook_view::active_tabundefined``` -The optional index to the active sheet in this view. -#### ```optional xlnt::workbook_view::first_sheetundefined``` -The optional index to the first sheet in this view. -#### ```optional xlnt::workbook_view::tab_ratioundefined``` -The optional ratio between the tabs bar and the horizontal scroll bar. -#### ```optional xlnt::workbook_view::window_widthundefined``` -The width of the workbook window in twips. -#### ```optional xlnt::workbook_view::window_heightundefined``` -The height of the workbook window in twips. -#### ```optional xlnt::workbook_view::x_windowundefined``` -The distance of the workbook window from the left side of the screen in twips. -#### ```optional xlnt::workbook_view::y_windowundefined``` -The distance of the workbook window from the top of the screen in twips. -### worksheet_iterator -#### ```xlnt::worksheet_iterator::worksheet_iterator(workbook &wb, std::size_t index)``` -Constructs a worksheet iterator from a workbook and sheet index. -#### ```xlnt::worksheet_iterator::worksheet_iterator(const worksheet_iterator &)``` -Copy constructs a worksheet iterator from another iterator. -#### ```worksheet_iterator& xlnt::worksheet_iterator::operator=(const worksheet_iterator &)``` -Assigns the iterator so that it points to the same worksheet in the same workbook. -#### ```worksheet xlnt::worksheet_iterator::operator*()``` -Dereferences the iterator to return the worksheet it is pointing to. If the iterator points to one-past-the-end of the workbook, an invalid_parameter exception will be thrown. -#### ```bool xlnt::worksheet_iterator::operator==(const worksheet_iterator &comparand) const``` -Returns true if this iterator points to the same worksheet as comparand. -#### ```bool xlnt::worksheet_iterator::operator!=(const worksheet_iterator &comparand) const``` -Returns true if this iterator doesn't point to the same worksheet as comparand. -#### ```worksheet_iterator xlnt::worksheet_iterator::operator++(int)``` -Post-increment the iterator's internal workseet index. Returns a copy of the iterator as it was before being incremented. -#### ```worksheet_iterator& xlnt::worksheet_iterator::operator++()``` -Pre-increment the iterator's internal workseet index. Returns a refernce to the same iterator. -### const_worksheet_iterator -#### ```xlnt::const_worksheet_iterator::const_worksheet_iterator(const workbook &wb, std::size_t index)``` -Constructs a worksheet iterator from a workbook and sheet index. -#### ```xlnt::const_worksheet_iterator::const_worksheet_iterator(const const_worksheet_iterator &)``` -Copy constructs a worksheet iterator from another iterator. -#### ```const_worksheet_iterator& xlnt::const_worksheet_iterator::operator=(const const_worksheet_iterator &)``` -Assigns the iterator so that it points to the same worksheet in the same workbook. -#### ```const worksheet xlnt::const_worksheet_iterator::operator*()``` -Dereferences the iterator to return the worksheet it is pointing to. If the iterator points to one-past-the-end of the workbook, an invalid_parameter exception will be thrown. -#### ```bool xlnt::const_worksheet_iterator::operator==(const const_worksheet_iterator &comparand) const``` -Returns true if this iterator points to the same worksheet as comparand. -#### ```bool xlnt::const_worksheet_iterator::operator!=(const const_worksheet_iterator &comparand) const``` -Returns true if this iterator doesn't point to the same worksheet as comparand. -#### ```const_worksheet_iterator xlnt::const_worksheet_iterator::operator++(int)``` -Post-increment the iterator's internal workseet index. Returns a copy of the iterator as it was before being incremented. -#### ```const_worksheet_iterator& xlnt::const_worksheet_iterator::operator++()``` -Pre-increment the iterator's internal workseet index. Returns a refernce to the same iterator. -## Worksheet Module -### cell_iterator -#### ```xlnt::cell_iterator::cell_iterator(worksheet ws, const cell_reference &start_cell, const range_reference &limits, major_order order, bool skip_null, bool wrap)``` -Constructs a cell_iterator from a worksheet, range, and iteration settings. -#### ```xlnt::cell_iterator::cell_iterator(const cell_iterator &other)``` -Constructs a cell_iterator as a copy of an existing cell_iterator. -#### ```cell_iterator& xlnt::cell_iterator::operator=(const cell_iterator &rhs)=default``` -Assigns this iterator to match the data in rhs. -#### ```cell xlnt::cell_iterator::operator*()``` -Dereferences this iterator to return the cell it points to. -#### ```bool xlnt::cell_iterator::operator==(const cell_iterator &other) const``` -Returns true if this iterator is equivalent to other. -#### ```bool xlnt::cell_iterator::operator!=(const cell_iterator &other) const``` -Returns true if this iterator isn't equivalent to other. -#### ```cell_iterator& xlnt::cell_iterator::operator--()``` -Pre-decrements the iterator to point to the previous cell and returns a reference to the iterator. -#### ```cell_iterator xlnt::cell_iterator::operator--(int)``` -Post-decrements the iterator to point to the previous cell and return a copy of the iterator before the decrement. -#### ```cell_iterator& xlnt::cell_iterator::operator++()``` -Pre-increments the iterator to point to the previous cell and returns a reference to the iterator. -#### ```cell_iterator xlnt::cell_iterator::operator++(int)``` -Post-increments the iterator to point to the previous cell and return a copy of the iterator before the decrement. -### const_cell_iterator -#### ```xlnt::const_cell_iterator::const_cell_iterator(worksheet ws, const cell_reference &start_cell, const range_reference &limits, major_order order, bool skip_null, bool wrap)``` -Constructs a cell_iterator from a worksheet, range, and iteration settings. -#### ```xlnt::const_cell_iterator::const_cell_iterator(const const_cell_iterator &other)``` -Constructs a cell_iterator as a copy of an existing cell_iterator. -#### ```const_cell_iterator& xlnt::const_cell_iterator::operator=(const const_cell_iterator &)=default``` -Assigns this iterator to match the data in rhs. -#### ```const cell xlnt::const_cell_iterator::operator*() const``` -Dereferences this iterator to return the cell it points to. -#### ```bool xlnt::const_cell_iterator::operator==(const const_cell_iterator &other) const``` -Returns true if this iterator is equivalent to other. -#### ```bool xlnt::const_cell_iterator::operator!=(const const_cell_iterator &other) const``` -Returns true if this iterator isn't equivalent to other. -#### ```const_cell_iterator& xlnt::const_cell_iterator::operator--()``` -Pre-decrements the iterator to point to the previous cell and returns a reference to the iterator. -#### ```const_cell_iterator xlnt::const_cell_iterator::operator--(int)``` -Post-decrements the iterator to point to the previous cell and return a copy of the iterator before the decrement. -#### ```const_cell_iterator& xlnt::const_cell_iterator::operator++()``` -Pre-increments the iterator to point to the previous cell and returns a reference to the iterator. -#### ```const_cell_iterator xlnt::const_cell_iterator::operator++(int)``` -Post-increments the iterator to point to the previous cell and return a copy of the iterator before the decrement. -### cell_vector -#### ```using xlnt::cell_vector::iterator = cell_iteratorundefined``` -Iterate over cells in a cell_vector with an iterator of this type. -#### ```using xlnt::cell_vector::const_iterator = const_cell_iteratorundefined``` -Iterate over const cells in a const cell_vector with an iterator of this type. -#### ```using xlnt::cell_vector::reverse_iterator = std::reverse_iteratorundefined``` -Iterate over cells in a cell_vector in reverse oreder with an iterator of this type. -#### ```using xlnt::cell_vector::const_reverse_iterator = std::reverse_iteratorundefined``` -Iterate over const cells in a const cell_vector in reverse order with an iterator of this type. -#### ```xlnt::cell_vector::cell_vector(worksheet ws, const cell_reference &cursor, const range_reference &ref, major_order order, bool skip_null, bool wrap)``` -Constructs a cell vector pointing to a given range in a given worksheet. order determines whether this vector is a row or a column. If skip_null is true, iterating over this vector will skip empty cells. -#### ```bool xlnt::cell_vector::empty() const``` -Returns true if every cell in this vector is null (i.e. the cell doesn't exist in the worksheet). -#### ```cell xlnt::cell_vector::front()``` -Returns the first cell in this vector. -#### ```const cell xlnt::cell_vector::front() const``` -Returns the first cell in this vector. -#### ```cell xlnt::cell_vector::back()``` -Returns the last cell in this vector. -#### ```const cell xlnt::cell_vector::back() const``` -Returns the last cell in this vector. -#### ```std::size_t xlnt::cell_vector::length() const``` -Returns the distance between the first and last cells in this vector. -#### ```iterator xlnt::cell_vector::begin()``` -Returns an iterator to the first cell in this vector. -#### ```iterator xlnt::cell_vector::end()``` -Returns an iterator to a cell one-past-the-end of this vector. -#### ```const_iterator xlnt::cell_vector::begin() const``` -Returns an iterator to the first cell in this vector. -#### ```const_iterator xlnt::cell_vector::cbegin() const``` -Returns an iterator to the first cell in this vector. -#### ```const_iterator xlnt::cell_vector::end() const``` -Returns an iterator to a cell one-past-the-end of this vector. -#### ```const_iterator xlnt::cell_vector::cend() const``` -Returns an iterator to a cell one-past-the-end of this vector. -#### ```reverse_iterator xlnt::cell_vector::rbegin()``` -Returns a reverse iterator to the first cell of this reversed vector. -#### ```reverse_iterator xlnt::cell_vector::rend()``` -Returns a reverse iterator to to a cell one-past-the-end of this reversed vector. -#### ```const_reverse_iterator xlnt::cell_vector::rbegin() const``` -Returns a reverse iterator to the first cell of this reversed vector. -#### ```const_reverse_iterator xlnt::cell_vector::rend() const``` -Returns a reverse iterator to to a cell one-past-the-end of this reversed vector. -#### ```const_reverse_iterator xlnt::cell_vector::crbegin() const``` -Returns a reverse iterator to the first cell of this reversed vector. -#### ```const_reverse_iterator xlnt::cell_vector::crend() const``` -Returns a reverse iterator to to a cell one-past-the-end of this reversed vector. -#### ```cell xlnt::cell_vector::operator[](std::size_t column_index)``` -Returns the cell column_index distance away from the first cell in this vector. -#### ```const cell xlnt::cell_vector::operator[](std::size_t column_index) const``` -Returns the cell column_index distance away from the first cell in this vector. -### column_properties -#### ```optional xlnt::column_properties::widthundefined``` -The optional width of the column -#### ```bool xlnt::column_properties::custom_widthundefined``` -If true, this is a custom width -#### ```optional xlnt::column_properties::styleundefined``` -The style index of this column. This shouldn't be used since style indices aren't supposed to be used directly in xlnt. (TODO) -#### ```bool xlnt::column_properties::hiddenundefined``` -If true, this column will be hidden -### header_footer -#### ```undefinedundefined``` -Enumerates the three possible locations of a header or footer. -#### ```bool xlnt::header_footer::has_header() const``` -True if any text has been added for a header at any location on any page. -#### ```bool xlnt::header_footer::has_footer() const``` -True if any text has been added for a footer at any location on any page. -#### ```bool xlnt::header_footer::align_with_margins() const``` -True if headers and footers should align to the page margins. -#### ```header_footer& xlnt::header_footer::align_with_margins(bool align)``` -Set to true if headers and footers should align to the page margins. Set to false if headers and footers should align to the edge of the page. -#### ```bool xlnt::header_footer::different_odd_even() const``` -True if headers and footers differ based on page number. -#### ```bool xlnt::header_footer::different_first() const``` -True if headers and footers are different on the first page. -#### ```bool xlnt::header_footer::scale_with_doc() const``` -True if headers and footers should scale to match the worksheet. -#### ```header_footer& xlnt::header_footer::scale_with_doc(bool scale)``` -Set to true if headers and footers should scale to match the worksheet. -#### ```bool xlnt::header_footer::has_header(location where) const``` -True if any text has been added at the given location on any page. -#### ```void xlnt::header_footer::clear_header()``` -Remove all headers from all pages. -#### ```void xlnt::header_footer::clear_header(location where)``` -Remove header at the given location on any page. -#### ```header_footer& xlnt::header_footer::header(location where, const std::string &text)``` -Add a header at the given location with the given text. -#### ```header_footer& xlnt::header_footer::header(location where, const rich_text &text)``` -Add a header at the given location with the given text. -#### ```rich_text xlnt::header_footer::header(location where) const``` -Get the text of the header at the given location. If headers are different on odd and even pages, the odd header will be returned. -#### ```bool xlnt::header_footer::has_first_page_header() const``` -True if a header has been set for the first page at any location. -#### ```bool xlnt::header_footer::has_first_page_header(location where) const``` -True if a header has been set for the first page at the given location. -#### ```void xlnt::header_footer::clear_first_page_header()``` -Remove all headers from the first page. -#### ```void xlnt::header_footer::clear_first_page_header(location where)``` -Remove header from the first page at the given location. -#### ```header_footer& xlnt::header_footer::first_page_header(location where, const rich_text &text)``` -Add a header on the first page at the given location with the given text. -#### ```rich_text xlnt::header_footer::first_page_header(location where) const``` -Get the text of the first page header at the given location. If no first page header has been set, the general header for that location will be returned. -#### ```bool xlnt::header_footer::has_odd_even_header() const``` -True if different headers have been set for odd and even pages. -#### ```bool xlnt::header_footer::has_odd_even_header(location where) const``` -True if different headers have been set for odd and even pages at the given location. -#### ```void xlnt::header_footer::clear_odd_even_header()``` -Remove odd/even headers at all locations. -#### ```void xlnt::header_footer::clear_odd_even_header(location where)``` -Remove odd/even headers at the given location. -#### ```header_footer& xlnt::header_footer::odd_even_header(location where, const rich_text &odd, const rich_text &even)``` -Add a header for odd pages at the given location with the given text. -#### ```rich_text xlnt::header_footer::odd_header(location where) const``` -Get the text of the odd page header at the given location. If no odd page header has been set, the general header for that location will be returned. -#### ```rich_text xlnt::header_footer::even_header(location where) const``` -Get the text of the even page header at the given location. If no even page header has been set, the general header for that location will be returned. -#### ```bool xlnt::header_footer::has_footer(location where) const``` -True if any text has been added at the given location on any page. -#### ```void xlnt::header_footer::clear_footer()``` -Remove all footers from all pages. -#### ```void xlnt::header_footer::clear_footer(location where)``` -Remove footer at the given location on any page. -#### ```header_footer& xlnt::header_footer::footer(location where, const std::string &text)``` -Add a footer at the given location with the given text. -#### ```header_footer& xlnt::header_footer::footer(location where, const rich_text &text)``` -Add a footer at the given location with the given text. -#### ```rich_text xlnt::header_footer::footer(location where) const``` -Get the text of the footer at the given location. If footers are different on odd and even pages, the odd footer will be returned. -#### ```bool xlnt::header_footer::has_first_page_footer() const``` -True if a footer has been set for the first page at any location. -#### ```bool xlnt::header_footer::has_first_page_footer(location where) const``` -True if a footer has been set for the first page at the given location. -#### ```void xlnt::header_footer::clear_first_page_footer()``` -Remove all footers from the first page. -#### ```void xlnt::header_footer::clear_first_page_footer(location where)``` -Remove footer from the first page at the given location. -#### ```header_footer& xlnt::header_footer::first_page_footer(location where, const rich_text &text)``` -Add a footer on the first page at the given location with the given text. -#### ```rich_text xlnt::header_footer::first_page_footer(location where) const``` -Get the text of the first page footer at the given location. If no first page footer has been set, the general footer for that location will be returned. -#### ```bool xlnt::header_footer::has_odd_even_footer() const``` -True if different footers have been set for odd and even pages. -#### ```bool xlnt::header_footer::has_odd_even_footer(location where) const``` -True if different footers have been set for odd and even pages at the given location. -#### ```void xlnt::header_footer::clear_odd_even_footer()``` -Remove odd/even footers at all locations. -#### ```void xlnt::header_footer::clear_odd_even_footer(location where)``` -Remove odd/even footers at the given location. -#### ```header_footer& xlnt::header_footer::odd_even_footer(location where, const rich_text &odd, const rich_text &even)``` -Add a footer for odd pages at the given location with the given text. -#### ```rich_text xlnt::header_footer::odd_footer(location where) const``` -Get the text of the odd page footer at the given location. If no odd page footer has been set, the general footer for that location will be returned. -#### ```rich_text xlnt::header_footer::even_footer(location where) const``` -Get the text of the even page footer at the given location. If no even page footer has been set, the general footer for that location will be returned. -### page_margins -#### ```xlnt::page_margins::page_margins()``` -Constructs a page margins objects with Excel-default margins. -#### ```double xlnt::page_margins::top() const``` -Returns the top margin -#### ```void xlnt::page_margins::top(double top)``` -Sets the top margin to top -#### ```double xlnt::page_margins::left() const``` -Returns the left margin -#### ```void xlnt::page_margins::left(double left)``` -Sets the left margin to left -#### ```double xlnt::page_margins::bottom() const``` -Returns the bottom margin -#### ```void xlnt::page_margins::bottom(double bottom)``` -Sets the bottom margin to bottom -#### ```double xlnt::page_margins::right() const``` -Returns the right margin -#### ```void xlnt::page_margins::right(double right)``` -Sets the right margin to right -#### ```double xlnt::page_margins::header() const``` -Returns the header margin -#### ```void xlnt::page_margins::header(double header)``` -Sets the header margin to header -#### ```double xlnt::page_margins::footer() const``` -Returns the footer margin -#### ```void xlnt::page_margins::footer(double footer)``` -Sets the footer margin to footer -### page_setup -#### ```xlnt::page_setup::page_setup()``` -Default constructor. -#### ```xlnt::page_break xlnt::page_setup::page_break() const``` -Returns the page break. -#### ```void xlnt::page_setup::page_break(xlnt::page_break b)``` -Sets the page break to b. -#### ```xlnt::sheet_state xlnt::page_setup::sheet_state() const``` -Returns the current sheet state of this page setup. -#### ```void xlnt::page_setup::sheet_state(xlnt::sheet_state sheet_state)``` -Sets the sheet state to sheet_state. -#### ```xlnt::paper_size xlnt::page_setup::paper_size() const``` -Returns the paper size which should be used to print the worksheet using this page setup. -#### ```void xlnt::page_setup::paper_size(xlnt::paper_size paper_size)``` -Sets the paper size of this page setup. -#### ```xlnt::orientation xlnt::page_setup::orientation() const``` -Returns the orientation of the worksheet using this page setup. -#### ```void xlnt::page_setup::orientation(xlnt::orientation orientation)``` -Sets the orientation of the page. -#### ```bool xlnt::page_setup::fit_to_page() const``` -Returns true if this worksheet should be scaled to fit on a single page during printing. -#### ```void xlnt::page_setup::fit_to_page(bool fit_to_page)``` -If true, forces the worksheet to be scaled to fit on a single page during printing. -#### ```bool xlnt::page_setup::fit_to_height() const``` -Returns true if the height of this worksheet should be scaled to fit on a printed page. -#### ```void xlnt::page_setup::fit_to_height(bool fit_to_height)``` -Sets whether the height of the page should be scaled to fit on a printed page. -#### ```bool xlnt::page_setup::fit_to_width() const``` -Returns true if the width of this worksheet should be scaled to fit on a printed page. -#### ```void xlnt::page_setup::fit_to_width(bool fit_to_width)``` -Sets whether the width of the page should be scaled to fit on a printed page. -#### ```void xlnt::page_setup::horizontal_centered(bool horizontal_centered)``` -Sets whether the worksheet should be centered horizontall on the page if it takes up less than a full page. -#### ```bool xlnt::page_setup::horizontal_centered() const``` -Returns whether horizontal centering has been enabled. -#### ```void xlnt::page_setup::vertical_centered(bool vertical_centered)``` -Sets whether the worksheet should be vertically centered on the page if it takes up less than a full page. -#### ```bool xlnt::page_setup::vertical_centered() const``` -Returns whether vertical centering has been enabled. -#### ```void xlnt::page_setup::scale(double scale)``` -Sets the factor by which the page should be scaled during printing. -#### ```double xlnt::page_setup::scale() const``` -Returns the factor by which the page should be scaled during printing. -### pane -#### ```optional xlnt::pane::top_left_cellundefined``` -The optional top left cell -#### ```pane_state xlnt::pane::stateundefined``` -The state of the pane -#### ```pane_corner xlnt::pane::active_paneundefined``` -The pane which contains the active cell -#### ```row_t xlnt::pane::y_splitundefined``` -The row where the split should take place -#### ```column_t xlnt::pane::x_splitundefined``` -The column where the split should take place -#### ```bool xlnt::pane::operator==(const pane &rhs) const``` -Returns true if this pane is equal to rhs based on its top-left cell, state, active pane, and x/y split location. -### range -#### ```using xlnt::range::iterator = range_iteratorundefined``` -Alias for the iterator type -#### ```using xlnt::range::const_iterator = const_range_iteratorundefined``` -Alias for the const iterator type -#### ```using xlnt::range::reverse_iterator = std::reverse_iteratorundefined``` -Alias for the reverse iterator type -#### ```using xlnt::range::const_reverse_iterator = std::reverse_iteratorundefined``` -Alias for the const reverse iterator type -#### ```xlnt::range::range(worksheet ws, const range_reference &reference, major_order order=major_order::row, bool skip_null=false)``` -Constructs a range on the given worksheet. -#### ```xlnt::range::~range()``` -Desctructor -#### ```xlnt::range::range(const range &)=default``` -Default copy constructor. -#### ```cell_vector xlnt::range::vector(std::size_t n)``` -Returns a vector pointing to the n-th row or column in this range (depending on major order). -#### ```const cell_vector xlnt::range::vector(std::size_t n) const``` -Returns a vector pointing to the n-th row or column in this range (depending on major order). -#### ```class cell xlnt::range::cell(const cell_reference &ref)``` -Returns a cell in the range relative to its top left cell. -#### ```const class cell xlnt::range::cell(const cell_reference &ref) const``` -Returns a cell in the range relative to its top left cell. -#### ```range_reference xlnt::range::reference() const``` -Returns the reference defining the bounds of this range. -#### ```std::size_t xlnt::range::length() const``` -Returns the number of rows or columns in this range (depending on major order). -#### ```bool xlnt::range::contains(const cell_reference &ref)``` -Returns true if the given cell exists in the parent worksheet of this range. -#### ```range xlnt::range::alignment(const xlnt::alignment &new_alignment)``` -Sets the alignment of all cells in the range to new_alignment and returns the range. -#### ```range xlnt::range::border(const xlnt::border &new_border)``` -Sets the border of all cells in the range to new_border and returns the range. -#### ```range xlnt::range::fill(const xlnt::fill &new_fill)``` -Sets the fill of all cells in the range to new_fill and returns the range. -#### ```range xlnt::range::font(const xlnt::font &new_font)``` -Sets the font of all cells in the range to new_font and returns the range. -#### ```range xlnt::range::number_format(const xlnt::number_format &new_number_format)``` -Sets the number format of all cells in the range to new_number_format and returns the range. -#### ```range xlnt::range::protection(const xlnt::protection &new_protection)``` -Sets the protection of all cells in the range to new_protection and returns the range. -#### ```range xlnt::range::style(const class style &new_style)``` -Sets the named style applied to all cells in this range to a style named style_name. -#### ```range xlnt::range::style(const std::string &style_name)``` -Sets the named style applied to all cells in this range to a style named style_name. If this style has not been previously created in the workbook, a key_not_found exception will be thrown. -#### ```cell_vector xlnt::range::front()``` -Returns the first row or column in this range. -#### ```const cell_vector xlnt::range::front() const``` -Returns the first row or column in this range. -#### ```cell_vector xlnt::range::back()``` -Returns the last row or column in this range. -#### ```const cell_vector xlnt::range::back() const``` -Returns the last row or column in this range. -#### ```iterator xlnt::range::begin()``` -Returns an iterator to the first row or column in this range. -#### ```iterator xlnt::range::end()``` -Returns an iterator to one past the last row or column in this range. -#### ```const_iterator xlnt::range::begin() const``` -Returns an iterator to the first row or column in this range. -#### ```const_iterator xlnt::range::end() const``` -Returns an iterator to one past the last row or column in this range. -#### ```const_iterator xlnt::range::cbegin() const``` -Returns an iterator to the first row or column in this range. -#### ```const_iterator xlnt::range::cend() const``` -Returns an iterator to one past the last row or column in this range. -#### ```reverse_iterator xlnt::range::rbegin()``` -Returns a reverse iterator to the first row or column in this range. -#### ```reverse_iterator xlnt::range::rend()``` -Returns a reverse iterator to one past the last row or column in this range. -#### ```const_reverse_iterator xlnt::range::rbegin() const``` -Returns a reverse iterator to the first row or column in this range. -#### ```const_reverse_iterator xlnt::range::rend() const``` -Returns a reverse iterator to one past the last row or column in this range. -#### ```const_reverse_iterator xlnt::range::crbegin() const``` -Returns a reverse iterator to the first row or column in this range. -#### ```const_reverse_iterator xlnt::range::crend() const``` -Returns a reverse iterator to one past the last row or column in this range. -#### ```void xlnt::range::apply(std::function< void(class cell)> f)``` -Applies function f to all cells in the range -#### ```cell_vector xlnt::range::operator[](std::size_t n)``` -Returns the n-th row or column in this range. -#### ```const cell_vector xlnt::range::operator[](std::size_t n) const``` -Returns the n-th row or column in this range. -#### ```bool xlnt::range::operator==(const range &comparand) const``` -Returns true if this range is equivalent to comparand. -#### ```bool xlnt::range::operator!=(const range &comparand) const``` -Returns true if this range is not equivalent to comparand. -### range_iterator -#### ```xlnt::range_iterator::range_iterator(worksheet &ws, const cell_reference &cursor, const range_reference &bounds, major_order order, bool skip_null)``` -Constructs a range iterator on a worksheet, cell pointing to the current row or column, range bounds, an order, and whether or not to skip null column/rows. -#### ```xlnt::range_iterator::range_iterator(const range_iterator &other)``` -Copy constructor. -#### ```cell_vector xlnt::range_iterator::operator*() const``` -Dereference the iterator to return a column or row. -#### ```range_iterator& xlnt::range_iterator::operator=(const range_iterator &)=default``` -Default assignment operator. -#### ```bool xlnt::range_iterator::operator==(const range_iterator &other) const``` -Returns true if this iterator is equivalent to other. -#### ```bool xlnt::range_iterator::operator!=(const range_iterator &other) const``` -Returns true if this iterator is not equivalent to other. -#### ```range_iterator& xlnt::range_iterator::operator--()``` -Pre-decrement the iterator to point to the previous row/column. -#### ```range_iterator xlnt::range_iterator::operator--(int)``` -Post-decrement the iterator to point to the previous row/column. -#### ```range_iterator& xlnt::range_iterator::operator++()``` -Pre-increment the iterator to point to the next row/column. -#### ```range_iterator xlnt::range_iterator::operator++(int)``` -Post-increment the iterator to point to the next row/column. -### const_range_iterator -#### ```xlnt::const_range_iterator::const_range_iterator(const worksheet &ws, const cell_reference &cursor, const range_reference &bounds, major_order order, bool skip_null)``` -Constructs a range iterator on a worksheet, cell pointing to the current row or column, range bounds, an order, and whether or not to skip null column/rows. -#### ```xlnt::const_range_iterator::const_range_iterator(const const_range_iterator &other)``` -Copy constructor. -#### ```const cell_vector xlnt::const_range_iterator::operator*() const``` -Dereferennce the iterator to return the current column/row. -#### ```const_range_iterator& xlnt::const_range_iterator::operator=(const const_range_iterator &)=default``` -Default assignment operator. -#### ```bool xlnt::const_range_iterator::operator==(const const_range_iterator &other) const``` -Returns true if this iterator is equivalent to other. -#### ```bool xlnt::const_range_iterator::operator!=(const const_range_iterator &other) const``` -Returns true if this iterator is not equivalent to other. -#### ```const_range_iterator& xlnt::const_range_iterator::operator--()``` -Pre-decrement the iterator to point to the next row/column. -#### ```const_range_iterator xlnt::const_range_iterator::operator--(int)``` -Post-decrement the iterator to point to the next row/column. -#### ```const_range_iterator& xlnt::const_range_iterator::operator++()``` -Pre-increment the iterator to point to the next row/column. -#### ```const_range_iterator xlnt::const_range_iterator::operator++(int)``` -Post-increment the iterator to point to the next row/column. -### range_reference -#### ```static range_reference xlnt::range_reference::make_absolute(const range_reference &relative_reference)``` -Converts relative reference coordinates to absolute coordinates (B12 -> $B$12) -#### ```xlnt::range_reference::range_reference()``` -Constructs a range reference equal to A1:A1 -#### ```xlnt::range_reference::range_reference(const std::string &range_string)``` -Constructs a range reference equivalent to the provided range_string in the form top_left:bottom_right. -#### ```xlnt::range_reference::range_reference(const char *range_string)``` -Constructs a range reference equivalent to the provided range_string in the form top_left:bottom_right. -#### ```xlnt::range_reference::range_reference(const std::pair< cell_reference, cell_reference > &reference_pair)``` -Constructs a range reference from a pair of cell references. -#### ```xlnt::range_reference::range_reference(const cell_reference &start, const cell_reference &end)``` -Constructs a range reference from cell references indicating top left and bottom right coordinates of the range. -#### ```xlnt::range_reference::range_reference(column_t column_index_start, row_t row_index_start, column_t column_index_end, row_t row_index_end)``` -Constructs a range reference from column and row indices. -#### ```bool xlnt::range_reference::is_single_cell() const``` -Returns true if the range has a width and height of 1 cell. -#### ```std::size_t xlnt::range_reference::width() const``` -Returns the number of columns encompassed by this range. -#### ```std::size_t xlnt::range_reference::height() const``` -Returns the number of rows encompassed by this range. -#### ```cell_reference xlnt::range_reference::top_left() const``` -Returns the coordinate of the top left cell of this range. -#### ```cell_reference xlnt::range_reference::top_right() const``` -Returns the coordinate of the top right cell of this range. -#### ```cell_reference xlnt::range_reference::bottom_left() const``` -Returns the coordinate of the bottom left cell of this range. -#### ```cell_reference xlnt::range_reference::bottom_right() const``` -Returns the coordinate of the bottom right cell of this range. -#### ```range_reference xlnt::range_reference::make_offset(int column_offset, int row_offset) const``` -Returns a new range reference with the same width and height as this range but shifted by the given number of columns and rows. -#### ```std::string xlnt::range_reference::to_string() const``` -Returns a string representation of this range. -#### ```bool xlnt::range_reference::operator==(const range_reference &comparand) const``` -Returns true if this range is equivalent to the other range. -#### ```bool xlnt::range_reference::operator==(const std::string &reference_string) const``` -Returns true if this range is equivalent to the string representation of the other range. -#### ```bool xlnt::range_reference::operator==(const char *reference_string) const``` -Returns true if this range is equivalent to the string representation of the other range. -#### ```bool xlnt::range_reference::operator!=(const range_reference &comparand) const``` -Returns true if this range is not equivalent to the other range. -#### ```bool xlnt::range_reference::operator!=(const std::string &reference_string) const``` -Returns true if this range is not equivalent to the string representation of the other range. -#### ```bool xlnt::range_reference::operator!=(const char *reference_string) const``` -Returns true if this range is not equivalent to the string representation of the other range. -### row_properties -#### ```optional xlnt::row_properties::heightundefined``` -Optional height -#### ```bool xlnt::row_properties::custom_heightundefined``` -Whether or not the height is different from the default -#### ```bool xlnt::row_properties::hiddenundefined``` -Whether or not the row should be hidden -#### ```optional xlnt::row_properties::styleundefined``` -The index to the style used by all cells in this row -### selection -#### ```bool xlnt::selection::has_active_cell() const``` -Returns true if this selection has a defined active cell. -#### ```cell_reference xlnt::selection::active_cell() const``` -Returns the cell reference of the active cell. -#### ```void xlnt::selection::active_cell(const cell_reference &ref)``` -Sets the active cell to that pointed to by ref. -#### ```range_reference xlnt::selection::sqref() const``` -Returns the range encompassed by this selection. -#### ```pane_corner xlnt::selection::pane() const``` -Returns the sheet quadrant of this selection. -#### ```void xlnt::selection::pane(pane_corner corner)``` -Sets the sheet quadrant of this selection to corner. -#### ```bool xlnt::selection::operator==(const selection &rhs) const``` -Returns true if this selection is equal to rhs based on its active cell, sqref, and pane. -### sheet_protection -#### ```static std::string xlnt::sheet_protection::hash_password(const std::string &password)``` -Calculates and returns the hash of the given protection password. -#### ```void xlnt::sheet_protection::password(const std::string &password)``` -Sets the protection password to password. -#### ```std::string xlnt::sheet_protection::hashed_password() const``` -Returns the hash of the password set for this sheet protection. -### sheet_view -#### ```void xlnt::sheet_view::id(std::size_t new_id)``` -Sets the ID of this view to new_id. -#### ```std::size_t xlnt::sheet_view::id() const``` -Returns the ID of this view. -#### ```bool xlnt::sheet_view::has_pane() const``` -Returns true if this view has a pane defined. -#### ```struct pane& xlnt::sheet_view::pane()``` -Returns a reference to this view's pane. -#### ```const struct pane& xlnt::sheet_view::pane() const``` -Returns a reference to this view's pane. -#### ```void xlnt::sheet_view::clear_pane()``` -Removes the defined pane from this view. -#### ```void xlnt::sheet_view::pane(const struct pane &new_pane)``` -Sets the pane of this view to new_pane. -#### ```bool xlnt::sheet_view::has_selections() const``` -Returns true if this view has any selections. -#### ```void xlnt::sheet_view::add_selection(const class selection &new_selection)``` -Adds the given selection to the collection of selections. -#### ```void xlnt::sheet_view::clear_selections()``` -Removes all selections. -#### ```std::vector xlnt::sheet_view::selections() const``` -Returns the collection of selections as a vector. -#### ```class xlnt::selection& xlnt::sheet_view::selection(std::size_t index)``` -Returns the selection at the given index. -#### ```void xlnt::sheet_view::show_grid_lines(bool show)``` -If show is true, grid lines will be shown for sheets using this view. -#### ```bool xlnt::sheet_view::show_grid_lines() const``` -Returns true if grid lines will be shown for sheets using this view. -#### ```void xlnt::sheet_view::default_grid_color(bool is_default)``` -If is_default is true, the default grid color will be used. -#### ```bool xlnt::sheet_view::default_grid_color() const``` -Returns true if the default grid color will be used. -#### ```void xlnt::sheet_view::type(sheet_view_type new_type)``` -Sets the type of this view. -#### ```sheet_view_type xlnt::sheet_view::type() const``` -Returns the type of this view. -#### ```bool xlnt::sheet_view::operator==(const sheet_view &rhs) const``` -Returns true if this view is requal to rhs based on its id, grid lines setting, default grid color, pane, and selections. -### worksheet -#### ```using xlnt::worksheet::iterator = range_iteratorundefined``` -Iterate over a non-const worksheet with an iterator of this type. -#### ```using xlnt::worksheet::const_iterator = const_range_iteratorundefined``` -Iterate over a non-const worksheet with an iterator of this type. -#### ```using xlnt::worksheet::reverse_iterator = std::reverse_iteratorundefined``` -Iterate in reverse over a non-const worksheet with an iterator of this type. -#### ```using xlnt::worksheet::const_reverse_iterator = std::reverse_iteratorundefined``` -Iterate in reverse order over a const worksheet with an iterator of this type. -#### ```friend class detail::xlsx_consumerundefined``` -#### ```friend class detail::xlsx_producerundefined``` -#### ```xlnt::worksheet::worksheet()``` -Construct a null worksheet. No methods should be called on such a worksheet. -#### ```xlnt::worksheet::worksheet(const worksheet &rhs)``` -Copy constructor. This worksheet will point to the same memory as rhs's worksheet. -#### ```class workbook& xlnt::worksheet::workbook()``` -Returns a reference to the workbook this worksheet is owned by. -#### ```const class workbook& xlnt::worksheet::workbook() const``` -Returns a reference to the workbook this worksheet is owned by. -#### ```void xlnt::worksheet::garbage_collect()``` -Deletes data held in the worksheet that does not affect the internal data or display. For example, unreference styles and empty cells will be removed. -#### ```std::size_t xlnt::worksheet::id() const``` -Returns the unique numeric identifier of this worksheet. This will sometimes but not necessarily be the index of the worksheet in the workbook. -#### ```void xlnt::worksheet::id(std::size_t id)``` -Set the unique numeric identifier. The id defaults to the lowest unused id in the workbook so this should not be called without a good reason. -#### ```std::string xlnt::worksheet::title() const``` -Returns the title of this sheet. -#### ```void xlnt::worksheet::title(const std::string &title)``` -Sets the title of this sheet. -#### ```cell_reference xlnt::worksheet::frozen_panes() const``` -Returns the top left corner of the region above and to the left of which panes are frozen. -#### ```void xlnt::worksheet::freeze_panes(cell top_left_cell)``` -Freeze panes above and to the left of top_left_cell. -#### ```void xlnt::worksheet::freeze_panes(const cell_reference &top_left_coordinate)``` -Freeze panes above and to the left of top_left_coordinate. -#### ```void xlnt::worksheet::unfreeze_panes()``` -Remove frozen panes. The data in those panes will be unaffectedthis affects only the view. -#### ```bool xlnt::worksheet::has_frozen_panes() const``` -Returns true if this sheet has a frozen row, frozen column, or both. -#### ```bool xlnt::worksheet::has_cell(const cell_reference &reference) const``` -Returns true if this sheet has an initialized cell at the given reference. -#### ```class cell xlnt::worksheet::cell(const cell_reference &reference)``` -Returns the cell at the given reference. If the cell doesn't exist, it will be initialized to null before being returned. -#### ```const class cell xlnt::worksheet::cell(const cell_reference &reference) const``` -Returns the cell at the given reference. If the cell doesn't exist, an invalid_parameter exception will be thrown. -#### ```class cell xlnt::worksheet::cell(column_t column, row_t row)``` -Returns the cell at the given column and row. If the cell doesn't exist, it will be initialized to null before being returned. -#### ```const class cell xlnt::worksheet::cell(column_t column, row_t row) const``` -Returns the cell at the given column and row. If the cell doesn't exist, an invalid_parameter exception will be thrown. -#### ```class range xlnt::worksheet::range(const std::string &reference_string)``` -Returns the range defined by reference string. If reference string is the name of a previously-defined named range in the sheet, it will be returned. -#### ```const class range xlnt::worksheet::range(const std::string &reference_string) const``` -Returns the range defined by reference string. If reference string is the name of a previously-defined named range in the sheet, it will be returned. -#### ```class range xlnt::worksheet::range(const range_reference &reference)``` -Returns the range defined by reference. -#### ```const class range xlnt::worksheet::range(const range_reference &reference) const``` -Returns the range defined by reference. -#### ```class range xlnt::worksheet::rows(bool skip_null=true)``` -Returns a range encompassing all cells in this sheet which will be iterated upon in row-major order. If skip_null is true (default), empty rows and cells will be skipped during iteration of the range. -#### ```const class range xlnt::worksheet::rows(bool skip_null=true) const``` -Returns a range encompassing all cells in this sheet which will be iterated upon in row-major order. If skip_null is true (default), empty rows and cells will be skipped during iteration of the range. -#### ```class range xlnt::worksheet::columns(bool skip_null=true)``` -Returns a range ecompassing all cells in this sheet which will be iterated upon in column-major order. If skip_null is true (default), empty columns and cells will be skipped during iteration of the range. -#### ```const class range xlnt::worksheet::columns(bool skip_null=true) const``` -Returns a range ecompassing all cells in this sheet which will be iterated upon in column-major order. If skip_null is true (default), empty columns and cells will be skipped during iteration of the range. -#### ```xlnt::column_properties& xlnt::worksheet::column_properties(column_t column)``` -Returns the column properties for the given column. -#### ```const xlnt::column_properties& xlnt::worksheet::column_properties(column_t column) const``` -Returns the column properties for the given column. -#### ```bool xlnt::worksheet::has_column_properties(column_t column) const``` -Returns true if column properties have been set for the given column. -#### ```void xlnt::worksheet::add_column_properties(column_t column, const class column_properties &props)``` -Sets column properties for the given column to props. -#### ```double xlnt::worksheet::column_width(column_t column) const``` -Calculates the width of the given column. This will be the default column width if a custom width is not set on this column's column_properties. -#### ```xlnt::row_properties& xlnt::worksheet::row_properties(row_t row)``` -Returns the row properties for the given row. -#### ```const xlnt::row_properties& xlnt::worksheet::row_properties(row_t row) const``` -Returns the row properties for the given row. -#### ```bool xlnt::worksheet::has_row_properties(row_t row) const``` -Returns true if row properties have been set for the given row. -#### ```void xlnt::worksheet::add_row_properties(row_t row, const class row_properties &props)``` -Sets row properties for the given row to props. -#### ```double xlnt::worksheet::row_height(row_t row) const``` -Calculate the height of the given row. This will be the default row height if a custom height is not set on this row's row_properties. -#### ```cell_reference xlnt::worksheet::point_pos(int left, int top) const``` -Returns a reference to the cell at the given point coordinates. -#### ```void xlnt::worksheet::create_named_range(const std::string &name, const std::string &reference_string)``` -Creates a new named range with the given name encompassing the string representing a range. -#### ```void xlnt::worksheet::create_named_range(const std::string &name, const range_reference &reference)``` -Creates a new named range with the given name encompassing the given range reference. -#### ```bool xlnt::worksheet::has_named_range(const std::string &name) const``` -Returns true if this worksheet contains a named range with the given name. -#### ```class range xlnt::worksheet::named_range(const std::string &name)``` -Returns the named range with the given name. Throws key_not_found exception if the named range doesn't exist. -#### ```const class range xlnt::worksheet::named_range(const std::string &name) const``` -Returns the named range with the given name. Throws key_not_found exception if the named range doesn't exist. -#### ```void xlnt::worksheet::remove_named_range(const std::string &name)``` -Removes a named range with the given name. -#### ```row_t xlnt::worksheet::lowest_row() const``` -Returns the row of the first non-empty cell in the worksheet. -#### ```row_t xlnt::worksheet::highest_row() const``` -Returns the row of the last non-empty cell in the worksheet. -#### ```row_t xlnt::worksheet::next_row() const``` -Returns the row directly below the last non-empty cell in the worksheet. -#### ```column_t xlnt::worksheet::lowest_column() const``` -Returns the column of the first non-empty cell in the worksheet. -#### ```column_t xlnt::worksheet::highest_column() const``` -Returns the column of the last non-empty cell in the worksheet. -#### ```range_reference xlnt::worksheet::calculate_dimension() const``` -Returns a range_reference pointing to the full range of non-empty cells in the worksheet. -#### ```void xlnt::worksheet::merge_cells(const std::string &reference_string)``` -Merges the cells within the range represented by the given string. -#### ```void xlnt::worksheet::merge_cells(const range_reference &reference)``` -Merges the cells within the given range. -#### ```void xlnt::worksheet::unmerge_cells(const std::string &reference_string)``` -Removes the merging of the cells in the range represented by the given string. -#### ```void xlnt::worksheet::unmerge_cells(const range_reference &reference)``` -Removes the merging of the cells in the given range. -#### ```std::vector xlnt::worksheet::merged_ranges() const``` -Returns a vector of references of all merged ranges in the worksheet. -#### ```bool xlnt::worksheet::operator==(const worksheet &other) const``` -Returns true if this worksheet refers to the same worksheet as other. -#### ```bool xlnt::worksheet::operator!=(const worksheet &other) const``` -Returns true if this worksheet doesn't refer to the same worksheet as other. -#### ```bool xlnt::worksheet::operator==(std::nullptr_t) const``` -Returns true if this worksheet is null. -#### ```bool xlnt::worksheet::operator!=(std::nullptr_t) const``` -Returns true if this worksheet is not null. -#### ```void xlnt::worksheet::operator=(const worksheet &other)``` -Sets the internal pointer of this worksheet object to point to other. -#### ```class cell xlnt::worksheet::operator[](const cell_reference &reference)``` -Convenience method for worksheet::cell method. -#### ```const class cell xlnt::worksheet::operator[](const cell_reference &reference) const``` -Convenience method for worksheet::cell method. -#### ```bool xlnt::worksheet::compare(const worksheet &other, bool reference) const``` -Returns true if this worksheet is equal to other. If reference is true, the comparison will only check that both worksheets point to the same sheet in the same workbook. -#### ```bool xlnt::worksheet::has_page_setup() const``` -Returns true if this worksheet has a page setup. -#### ```xlnt::page_setup xlnt::worksheet::page_setup() const``` -Returns the page setup for this sheet. -#### ```void xlnt::worksheet::page_setup(const struct page_setup &setup)``` -Sets the page setup for this sheet to setup. -#### ```bool xlnt::worksheet::has_page_margins() const``` -Returns true if this page has margins. -#### ```xlnt::page_margins xlnt::worksheet::page_margins() const``` -Returns the margins of this sheet. -#### ```void xlnt::worksheet::page_margins(const class page_margins &margins)``` -Sets the margins of this sheet to margins. -#### ```range_reference xlnt::worksheet::auto_filter() const``` -Returns the current auto-filter of this sheet. -#### ```void xlnt::worksheet::auto_filter(const std::string &range_string)``` -Sets the auto-filter of this sheet to the range defined by range_string. -#### ```void xlnt::worksheet::auto_filter(const xlnt::range &range)``` -Sets the auto-filter of this sheet to the given range. -#### ```void xlnt::worksheet::auto_filter(const range_reference &reference)``` -Sets the auto-filter of this sheet to the range defined by reference. -#### ```void xlnt::worksheet::clear_auto_filter()``` -Clear the auto-filter from this sheet. -#### ```bool xlnt::worksheet::has_auto_filter() const``` -Returns true if this sheet has an auto-filter set. -#### ```void xlnt::worksheet::reserve(std::size_t n)``` -Reserve n rows. This can be optionally called before adding many rows to improve performance. -#### ```bool xlnt::worksheet::has_header_footer() const``` -Returns true if this sheet has a header/footer. -#### ```class header_footer xlnt::worksheet::header_footer() const``` -Returns the header/footer of this sheet. -#### ```void xlnt::worksheet::header_footer(const class header_footer &new_header_footer)``` -Sets the header/footer of this sheet to new_header_footer. -#### ```xlnt::sheet_state xlnt::worksheet::sheet_state() const``` -Returns the sheet state of this sheet. -#### ```void xlnt::worksheet::sheet_state(xlnt::sheet_state state)``` -Sets the sheet state of this sheet. -#### ```iterator xlnt::worksheet::begin()``` -Returns an iterator to the first row in this sheet. -#### ```iterator xlnt::worksheet::end()``` -Returns an iterator one past the last row in this sheet. -#### ```const_iterator xlnt::worksheet::begin() const``` -Return a constant iterator to the first row in this sheet. -#### ```const_iterator xlnt::worksheet::end() const``` -Returns a constant iterator to one past the last row in this sheet. -#### ```const_iterator xlnt::worksheet::cbegin() const``` -Return a constant iterator to the first row in this sheet. -#### ```const_iterator xlnt::worksheet::cend() const``` -Returns a constant iterator to one past the last row in this sheet. -#### ```void xlnt::worksheet::print_title_rows(row_t first_row, row_t last_row)``` -Sets rows to repeat at top during printing. -#### ```void xlnt::worksheet::print_title_rows(row_t last_row)``` -Sets rows to repeat at top during printing. -#### ```void xlnt::worksheet::print_title_cols(column_t first_column, column_t last_column)``` -Sets columns to repeat at left during printing. -#### ```void xlnt::worksheet::print_title_cols(column_t last_column)``` -Sets columns to repeat at left during printing. -#### ```std::string xlnt::worksheet::print_titles() const``` -Returns a string representation of the defined print titles. -#### ```void xlnt::worksheet::print_area(const std::string &print_area)``` -Sets the print area of this sheet to print_area. -#### ```range_reference xlnt::worksheet::print_area() const``` -Returns the print area defined for this sheet. -#### ```bool xlnt::worksheet::has_view() const``` -Returns true if this sheet has any number of views defined. -#### ```sheet_view xlnt::worksheet::view(std::size_t index=0) const``` -Returns the view at the given index. -#### ```void xlnt::worksheet::add_view(const sheet_view &new_view)``` -Adds new_view to the set of available views for this sheet. -#### ```void xlnt::worksheet::clear_page_breaks()``` -Remove all manual column and row page breaks (represented as dashed blue lines in the page view in Excel). -#### ```const std::vector& xlnt::worksheet::page_break_rows() const``` -Returns vector where each element represents a row which will break a page below it. -#### ```void xlnt::worksheet::page_break_at_row(row_t row)``` -Add a page break at the given row. -#### ```const std::vector& xlnt::worksheet::page_break_columns() const``` -Returns vector where each element represents a column which will break a page to the right. -#### ```void xlnt::worksheet::page_break_at_column(column_t column)``` -Add a page break at the given column. diff --git a/docs/source/includes/_contributing.md b/docs/source/includes/_contributing.md deleted file mode 100644 index 29f07242..00000000 --- a/docs/source/includes/_contributing.md +++ /dev/null @@ -1,31 +0,0 @@ -# Contributing to xlnt - -xlnt welcomes contributions from everyone regardless of skill level (provided you can write C++ or documentation). - -## Getting Started - -Look through the list of issues to find something interesting to work on. Help is appreciated with any issues, but important timely issues are labeled as "help wanted". Issues labeled "docs" might be good for those who want to contribute without having to know too much C++. You might also find something that the code is missing without an associated issue. That's fine to work on to, but it might be best to make an issue first in case someone else is working on it. - -## Contributions - -Contributions to xlnt should be made in the form of pull requests on GitHub. Each pull request will be reviewed and either merged into the current development branch or given feedback for changes that would be required to do so. - -All code in this repository is under the MIT License. You should agree to these terms before submitting any code to xlnt. - -## Pull Request Checklist - -- Branch from the head of the current development branch. Until version 1.0 is released, this the master branch. - -- Commits should be as small as possible, while ensuring that each commit is correct independently (i.e. each commit should compile and pass all tests). Commits that don't follow the coding style indicated in .clang-format (e.g. indentation) are less likely to be accepted until they are fixed. - -- If your pull request is not getting reviewed or you need a specific person to review it, you can @-reply a reviewer asking for a review in the pull request or a comment. - -- Add tests relevant to the fixed defect or new feature. It's best to do this before making any changes, make sure that the tests fail, then make changes ensuring that it ultimately passes the tests (i.e. TDD). xlnt uses cxxtest for testing. Tests are contained in a tests directory inside each module (e.g. source/workbook/tests/test_workbook.hpp) in the form of a header file. Each test is a separate function with a name that starts like "test_". See http://cxxtest.com/guide.html for information about CxxTest or take a look at existing tests. - -## Conduct - -Just try to be nice--we're all volunteers here. - -## Communication - -Add a comment to an existing issue on GitHub, open a new issue for defects or feature requests, or contact @tfussell if you want. diff --git a/docs/source/includes/_getting_started.md b/docs/source/includes/_getting_started.md deleted file mode 100644 index 6dacb5ac..00000000 --- a/docs/source/includes/_getting_started.md +++ /dev/null @@ -1,56 +0,0 @@ - -# Getting Started - -## Getting xlnt - -### Binaries - -### Homebrew - -### Arch - -### vcpkg - -## Compiling from Source - -xlnt uses continous integration (thanks [Travis CI](https://travis-ci.org/) and [AppVeyor](https://www.appveyor.com/)!) and passes all 270+ tests in GCC 4, GCC 5, VS2015 U3, and Clang (using Apple LLVM 8.0). Build configurations for Visual Studio 2015, GNU Make, and Xcode can be created using [cmake](https://cmake.org/) v3.1+. A full list of cmake generators can be found [here](https://cmake.org/cmake/help/v3.0/manual/cmake-generators.7.html). A basic build would look like (starting in the root xlnt directory): - -```bash -mkdir build -cd build -cmake .. -make -j8 -``` - -The resulting shared (e.g. libxlnt.dylib) library would be found in the build/lib directory. Other cmake configuration options for xlnt can be found using "cmake -LH". These options include building a static library instead of shared and whether to build sample executables or not. An example of building a static library with an Xcode project: - -```bash -mkdir build -cd build -cmake -D STATIC=ON -G Xcode .. -cmake --build . -cd bin && ./xlnt.test -``` -*Note for Windows: cmake defaults to building a 32-bit library project. To build a 64-bit library, use the Win64 generator* -```bash -cmake -G "Visual Studio 14 2015 Win64" .. -``` - -### Dependencies -xlnt requires the following libraries which are all distributed under permissive open source licenses. All libraries are included in the source tree as [git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules#Cloning-a-Project-with-Submodules) for convenience except for pole and partio's zip component which have been modified and reside in xlnt/source/detail: -- [zlib v1.2.8](http://zlib.net/) (zlib License) -- [libstudxml v1.1.0](http://www.codesynthesis.com/projects/libstudxml/) (MIT license) -- [utfcpp v2.3.4](http://utfcpp.sourceforge.net/) (Boost Software License, Version 1.0) -- [Crypto++ v5.6.5](https://www.cryptopp.com/) (Boost Software License, Version 1.0) -- [pole v0.5](https://github.com/catlan/pole) (BSD 2-Clause License) -- [partio v1.1.0](https://github.com/wdas/partio) (BSD 3-Clause License with specific non-attribution clause) - -Additionally, the xlnt test suite (bin/xlnt.test) requires an extra testing library. This test executable is separate from the main xlnt library assembly so the terms of this library's license should not apply to users of solely the xlnt library: -- [cxxtest v4.4](http://cxxtest.com/) (LGPLv3 License) - -Initialize the submodules from the HEAD of their respective Git repositories with this command called from the xlnt root directory: -```bash -git submodule update --init --remote -``` - -### Static vs. Dynamic diff --git a/docs/source/includes/_license.md b/docs/source/includes/_license.md deleted file mode 100644 index 1d53fc4b..00000000 --- a/docs/source/includes/_license.md +++ /dev/null @@ -1,360 +0,0 @@ -# License - -## [xlnt](https://github.com/tfussell/xlnt) - ->[MIT License](https://github.com/tfussell/xlnt/blob/master/LICENSE.md) - -``` -Copyright (c) 2014-2017 Thomas Fussell - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -``` - -## [POLE](http://www.dimin.net/software/pole/) - ->[BSD 2-Clause License](https://bitbucket.org/dimin/pole/src/c15e513bdce4c3a52b3dbc925d4d2bb520dc71d8/pole/LICENSE) - -``` -POLE - Portable C++ library to access OLE Storage -Copyright (C) 2002-2007 Ariya Hidayat (ariya@kde.org). All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -``` - -## [libstudxml](http://www.codesynthesis.com/projects/libstudxml/) - ->[MIT License](http://www.codesynthesis.com/licenses/mit.txt) - -``` -Summary: Everything is licensed under the MIT License (text below). - -Code found in the xml/details/expat/ directory is distributed under -the MIT License (see the xml/details/expat/LICENSE file for copyright -information). - -Code found in the xml/details/genx/ directory is distributed under -the MIT License (see the xml/details/genx/LICENSE file for copyright -information). - -The rest is Copyright (c) 2013-2014 Code Synthesis Tools CC and is -distributed under the MIT License: - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -``` - -## [CxxTest](http://cxxtest.com/) - ->[LGPL License](https://github.com/CxxTest/cxxtest/blob/master/COPYING) - -``` - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser 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 -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. -``` - -## [PartIO](https://www.disneyanimation.com/technology/partio.html) - ->[BSD 3-Clause License (with specific non-attribution clause)](https://github.com/wdas/partio/blob/master/src/lib/io/ZIP.h) - -``` -Copyright 2010 Disney Enterprises, Inc. All rights reserved - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in -the documentation and/or other materials provided with the -distribution. - -* The names "Disney", "Walt Disney Pictures", "Walt Disney Animation -Studios" or the names of its contributors may NOT be used to -endorse or promote products derived from this software without -specific prior written permission from Walt Disney Pictures. - -Disclaimer: THIS SOFTWARE IS PROVIDED BY WALT DISNEY PICTURES AND -CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE, NONINFRINGEMENT AND TITLE ARE DISCLAIMED. -IN NO EVENT SHALL WALT DISNEY PICTURES, THE COPYRIGHT HOLDER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND BASED ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -``` - -## [miniz](https://github.com/richgel999/miniz) - ->[Public Domain/MIT License](https://github.com/richgel999/miniz/blob/master/LICENSE) -================================================================================== - -``` -This is free and unencumbered software released into the public domain. - -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. - -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -For more information, please refer to - -Copyright 2013-2014 RAD Game Tools and Valve Software -Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -``` diff --git a/docs/source/index.html.md b/docs/source/index.html.md deleted file mode 100644 index 8cc7d244..00000000 --- a/docs/source/index.html.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: API Reference - -toc_footers: - - GitHub Repo - -includes: - - introduction - - getting_started - - memory_model - - formatting - - properties - - api_reference - - license - -search: true ---- diff --git a/docs/source/javascripts/all.js b/docs/source/javascripts/all.js deleted file mode 100644 index ffaa9b01..00000000 --- a/docs/source/javascripts/all.js +++ /dev/null @@ -1,4 +0,0 @@ -//= require ./lib/_energize -//= require ./app/_lang -//= require ./app/_search -//= require ./app/_toc diff --git a/docs/source/javascripts/all_nosearch.js b/docs/source/javascripts/all_nosearch.js deleted file mode 100644 index 818bc4e5..00000000 --- a/docs/source/javascripts/all_nosearch.js +++ /dev/null @@ -1,3 +0,0 @@ -//= require ./lib/_energize -//= require ./app/_lang -//= require ./app/_toc diff --git a/docs/source/javascripts/app/_lang.js b/docs/source/javascripts/app/_lang.js deleted file mode 100644 index 4c73da6e..00000000 --- a/docs/source/javascripts/app/_lang.js +++ /dev/null @@ -1,166 +0,0 @@ -//= require ../lib/_jquery - -/* -Copyright 2008-2013 Concur Technologies, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); you may -not use this file except in compliance with the License. You may obtain -a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -License for the specific language governing permissions and limitations -under the License. -*/ -(function (global) { - 'use strict'; - - var languages = []; - - global.setupLanguages = setupLanguages; - global.activateLanguage = activateLanguage; - - function activateLanguage(language) { - if (!language) return; - if (language === "") return; - - $(".lang-selector a").removeClass('active'); - $(".lang-selector a[data-language-name='" + language + "']").addClass('active'); - for (var i=0; i < languages.length; i++) { - $(".highlight." + languages[i]).hide(); - $(".lang-specific." + languages[i]).hide(); - } - $(".highlight." + language).show(); - $(".lang-specific." + language).show(); - - global.toc.calculateHeights(); - - // scroll to the new location of the position - if ($(window.location.hash).get(0)) { - $(window.location.hash).get(0).scrollIntoView(true); - } - } - - // parseURL and stringifyURL are from https://github.com/sindresorhus/query-string - // MIT licensed - // https://github.com/sindresorhus/query-string/blob/7bee64c16f2da1a326579e96977b9227bf6da9e6/license - function parseURL(str) { - if (typeof str !== 'string') { - return {}; - } - - str = str.trim().replace(/^(\?|#|&)/, ''); - - if (!str) { - return {}; - } - - return str.split('&').reduce(function (ret, param) { - var parts = param.replace(/\+/g, ' ').split('='); - var key = parts[0]; - var val = parts[1]; - - key = decodeURIComponent(key); - // missing `=` should be `null`: - // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters - val = val === undefined ? null : decodeURIComponent(val); - - if (!ret.hasOwnProperty(key)) { - ret[key] = val; - } else if (Array.isArray(ret[key])) { - ret[key].push(val); - } else { - ret[key] = [ret[key], val]; - } - - return ret; - }, {}); - }; - - function stringifyURL(obj) { - return obj ? Object.keys(obj).sort().map(function (key) { - var val = obj[key]; - - if (Array.isArray(val)) { - return val.sort().map(function (val2) { - return encodeURIComponent(key) + '=' + encodeURIComponent(val2); - }).join('&'); - } - - return encodeURIComponent(key) + '=' + encodeURIComponent(val); - }).join('&') : ''; - }; - - // gets the language set in the query string - function getLanguageFromQueryString() { - if (location.search.length >= 1) { - var language = parseURL(location.search).language - if (language) { - return language; - } else if (jQuery.inArray(location.search.substr(1), languages) != -1) { - return location.search.substr(1); - } - } - - return false; - } - - // returns a new query string with the new language in it - function generateNewQueryString(language) { - var url = parseURL(location.search); - if (url.language) { - url.language = language; - return stringifyURL(url); - } - return language; - } - - // if a button is clicked, add the state to the history - function pushURL(language) { - if (!history) { return; } - var hash = window.location.hash; - if (hash) { - hash = hash.replace(/^#+/, ''); - } - history.pushState({}, '', '?' + generateNewQueryString(language) + '#' + hash); - - // save language as next default - localStorage.setItem("language", language); - } - - function setupLanguages(l) { - var defaultLanguage = localStorage.getItem("language"); - - languages = l; - - var presetLanguage = getLanguageFromQueryString(); - if (presetLanguage) { - // the language is in the URL, so use that language! - activateLanguage(presetLanguage); - - localStorage.setItem("language", presetLanguage); - } else if ((defaultLanguage !== null) && (jQuery.inArray(defaultLanguage, languages) != -1)) { - // the language was the last selected one saved in localstorage, so use that language! - activateLanguage(defaultLanguage); - } else { - // no language selected, so use the default - activateLanguage(languages[0]); - } - } - - // if we click on a language tab, activate that language - $(function() { - $(".lang-selector a").on("click", function() { - var language = $(this).data("language-name"); - pushURL(language); - activateLanguage(language); - return false; - }); - window.onpopstate = function() { - activateLanguage(getLanguageFromQueryString()); - }; - }); -})(window); diff --git a/docs/source/javascripts/app/_search.js b/docs/source/javascripts/app/_search.js deleted file mode 100644 index 4dfcdefa..00000000 --- a/docs/source/javascripts/app/_search.js +++ /dev/null @@ -1,75 +0,0 @@ -//= require ../lib/_lunr -//= require ../lib/_jquery -//= require ../lib/_jquery.highlight -(function () { - 'use strict'; - - var content, searchResults; - var highlightOpts = { element: 'span', className: 'search-highlight' }; - - var index = new lunr.Index(); - - index.ref('id'); - index.field('title', { boost: 10 }); - index.field('body'); - index.pipeline.add(lunr.trimmer, lunr.stopWordFilter); - - $(populate); - $(bind); - - function populate() { - $('h1, h2, h3').each(function() { - var title = $(this); - var body = title.nextUntil('h1, h2, h3'); - index.add({ - id: title.prop('id'), - title: title.text(), - body: body.text() - }); - }); - } - - function bind() { - content = $('.content'); - searchResults = $('.search-results'); - - $('#input-search').on('keyup', search); - } - - function search(event) { - unhighlight(); - searchResults.addClass('visible'); - - // ESC clears the field - if (event.keyCode === 27) this.value = ''; - - if (this.value) { - var results = index.search(this.value).filter(function(r) { - return r.score > 0.0001; - }); - - if (results.length) { - searchResults.empty(); - $.each(results, function (index, result) { - var elem = document.getElementById(result.ref); - searchResults.append("
  • " + $(elem).text() + "
  • "); - }); - highlight.call(this); - } else { - searchResults.html('
  • '); - $('.search-results li').text('No Results Found for "' + this.value + '"'); - } - } else { - unhighlight(); - searchResults.removeClass('visible'); - } - } - - function highlight() { - if (this.value) content.highlight(this.value, highlightOpts); - } - - function unhighlight() { - content.unhighlight(highlightOpts); - } -})(); diff --git a/docs/source/javascripts/app/_toc.js b/docs/source/javascripts/app/_toc.js deleted file mode 100644 index fd3bbd05..00000000 --- a/docs/source/javascripts/app/_toc.js +++ /dev/null @@ -1,57 +0,0 @@ -//= require ../lib/_jquery -//= require ../lib/_jquery_ui -//= require ../lib/_jquery.tocify -//= require ../lib/_imagesloaded.min -(function (global) { - 'use strict'; - - var closeToc = function() { - $(".tocify-wrapper").removeClass('open'); - $("#nav-button").removeClass('open'); - }; - - var makeToc = function() { - global.toc = $("#toc").tocify({ - selectors: 'h1, h2, h3, h4', - extendPage: false, - theme: 'none', - smoothScroll: false, - showEffectSpeed: 0, - hideEffectSpeed: 180, - ignoreSelector: '.toc-ignore', - highlightOffset: 60, - scrollTo: -1, - scrollHistory: true, - hashGenerator: function (text, element) { - return element.prop('id'); - } - }).data('toc-tocify'); - - $("#nav-button").click(function() { - $(".tocify-wrapper").toggleClass('open'); - $("#nav-button").toggleClass('open'); - return false; - }); - - $(".page-wrapper").click(closeToc); - $(".tocify-item").click(closeToc); - }; - - // Hack to make already open sections to start opened, - // instead of displaying an ugly animation - function animate() { - setTimeout(function() { - toc.setOption('showEffectSpeed', 180); - }, 50); - } - - $(function() { - makeToc(); - animate(); - setupLanguages($('body').data('languages')); - $('.content').imagesLoaded( function() { - global.toc.calculateHeights(); - }); - }); -})(window); - diff --git a/docs/source/javascripts/lib/_energize.js b/docs/source/javascripts/lib/_energize.js deleted file mode 100755 index 6798f3c0..00000000 --- a/docs/source/javascripts/lib/_energize.js +++ /dev/null @@ -1,169 +0,0 @@ -/** - * energize.js v0.1.0 - * - * Speeds up click events on mobile devices. - * https://github.com/davidcalhoun/energize.js - */ - -(function() { // Sandbox - /** - * Don't add to non-touch devices, which don't need to be sped up - */ - if(!('ontouchstart' in window)) return; - - var lastClick = {}, - isThresholdReached, touchstart, touchmove, touchend, - click, closest; - - /** - * isThresholdReached - * - * Compare touchstart with touchend xy coordinates, - * and only fire simulated click event if the coordinates - * are nearby. (don't want clicking to be confused with a swipe) - */ - isThresholdReached = function(startXY, xy) { - return Math.abs(startXY[0] - xy[0]) > 5 || Math.abs(startXY[1] - xy[1]) > 5; - }; - - /** - * touchstart - * - * Save xy coordinates when the user starts touching the screen - */ - touchstart = function(e) { - this.startXY = [e.touches[0].clientX, e.touches[0].clientY]; - this.threshold = false; - }; - - /** - * touchmove - * - * Check if the user is scrolling past the threshold. - * Have to check here because touchend will not always fire - * on some tested devices (Kindle Fire?) - */ - touchmove = function(e) { - // NOOP if the threshold has already been reached - if(this.threshold) return false; - - this.threshold = isThresholdReached(this.startXY, [e.touches[0].clientX, e.touches[0].clientY]); - }; - - /** - * touchend - * - * If the user didn't scroll past the threshold between - * touchstart and touchend, fire a simulated click. - * - * (This will fire before a native click) - */ - touchend = function(e) { - // Don't fire a click if the user scrolled past the threshold - if(this.threshold || isThresholdReached(this.startXY, [e.changedTouches[0].clientX, e.changedTouches[0].clientY])) { - return; - } - - /** - * Create and fire a click event on the target element - * https://developer.mozilla.org/en/DOM/event.initMouseEvent - */ - var touch = e.changedTouches[0], - evt = document.createEvent('MouseEvents'); - evt.initMouseEvent('click', true, true, window, 0, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null); - evt.simulated = true; // distinguish from a normal (nonsimulated) click - e.target.dispatchEvent(evt); - }; - - /** - * click - * - * Because we've already fired a click event in touchend, - * we need to listed for all native click events here - * and suppress them as necessary. - */ - click = function(e) { - /** - * Prevent ghost clicks by only allowing clicks we created - * in the click event we fired (look for e.simulated) - */ - var time = Date.now(), - timeDiff = time - lastClick.time, - x = e.clientX, - y = e.clientY, - xyDiff = [Math.abs(lastClick.x - x), Math.abs(lastClick.y - y)], - target = closest(e.target, 'A') || e.target, // needed for standalone apps - nodeName = target.nodeName, - isLink = nodeName === 'A', - standAlone = window.navigator.standalone && isLink && e.target.getAttribute("href"); - - lastClick.time = time; - lastClick.x = x; - lastClick.y = y; - - /** - * Unfortunately Android sometimes fires click events without touch events (seen on Kindle Fire), - * so we have to add more logic to determine the time of the last click. Not perfect... - * - * Older, simpler check: if((!e.simulated) || standAlone) - */ - if((!e.simulated && (timeDiff < 500 || (timeDiff < 1500 && xyDiff[0] < 50 && xyDiff[1] < 50))) || standAlone) { - e.preventDefault(); - e.stopPropagation(); - if(!standAlone) return false; - } - - /** - * Special logic for standalone web apps - * See http://stackoverflow.com/questions/2898740/iphone-safari-web-app-opens-links-in-new-window - */ - if(standAlone) { - window.location = target.getAttribute("href"); - } - - /** - * Add an energize-focus class to the targeted link (mimics :focus behavior) - * TODO: test and/or remove? Does this work? - */ - if(!target || !target.classList) return; - target.classList.add("energize-focus"); - window.setTimeout(function(){ - target.classList.remove("energize-focus"); - }, 150); - }; - - /** - * closest - * @param {HTMLElement} node current node to start searching from. - * @param {string} tagName the (uppercase) name of the tag you're looking for. - * - * Find the closest ancestor tag of a given node. - * - * Starts at node and goes up the DOM tree looking for a - * matching nodeName, continuing until hitting document.body - */ - closest = function(node, tagName){ - var curNode = node; - - while(curNode !== document.body) { // go up the dom until we find the tag we're after - if(!curNode || curNode.nodeName === tagName) { return curNode; } // found - curNode = curNode.parentNode; // not found, so keep going up - } - - return null; // not found - }; - - /** - * Add all delegated event listeners - * - * All the events we care about bubble up to document, - * so we can take advantage of event delegation. - * - * Note: no need to wait for DOMContentLoaded here - */ - document.addEventListener('touchstart', touchstart, false); - document.addEventListener('touchmove', touchmove, false); - document.addEventListener('touchend', touchend, false); - document.addEventListener('click', click, true); // TODO: why does this use capture? - -})(); \ No newline at end of file diff --git a/docs/source/javascripts/lib/_imagesloaded.min.js b/docs/source/javascripts/lib/_imagesloaded.min.js deleted file mode 100755 index d66f6589..00000000 --- a/docs/source/javascripts/lib/_imagesloaded.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * imagesLoaded PACKAGED v3.1.8 - * JavaScript is all like "You images are done yet or what?" - * MIT License - */ - -(function(){function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,o=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;e.length>t;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,n){var i,r=this.getListenersAsObject(e),o="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&-1===t(r[i],n)&&r[i].push(o?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,n){var i,r,o=this.getListenersAsObject(e);for(r in o)o.hasOwnProperty(r)&&(i=t(o[r],n),-1!==i&&o[r].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var i,r,o=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)o.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?o.call(this,i,r):s.call(this,i,r));return this},i.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(e,t){var n,i,r,o,s=this.getListenersAsObject(e);for(r in s)if(s.hasOwnProperty(r))for(i=s[r].length;i--;)n=s[r][i],n.once===!0&&this.removeListener(e,n.listener),o=n.listener.apply(this,t||[]),o===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return r.EventEmitter=o,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(i=function(e,n,i){e[n+i]=i.handleEvent?function(){var n=t(e);i.handleEvent.call(i,n)}:function(){var n=t(e);i.call(e,n)},e.attachEvent("on"+n,e[n+i])});var r=function(){};n.removeEventListener?r=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(r=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var o={bind:i,unbind:r};"function"==typeof define&&define.amd?define("eventie/eventie",o):e.eventie=o}(this),function(e,t){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,i){return t(e,n,i)}):"object"==typeof exports?module.exports=t(e,require("wolfy87-eventemitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(window,function(e,t,n){function i(e,t){for(var n in t)e[n]=t[n];return e}function r(e){return"[object Array]"===d.call(e)}function o(e){var t=[];if(r(e))t=e;else if("number"==typeof e.length)for(var n=0,i=e.length;i>n;n++)t.push(e[n]);else t.push(e);return t}function s(e,t,n){if(!(this instanceof s))return new s(e,t);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=o(e),this.options=i({},this.options),"function"==typeof t?n=t:i(this.options,t),n&&this.on("always",n),this.getImages(),a&&(this.jqDeferred=new a.Deferred);var r=this;setTimeout(function(){r.check()})}function f(e){this.img=e}function c(e){this.src=e,v[e]=this}var a=e.jQuery,u=e.console,h=u!==void 0,d=Object.prototype.toString;s.prototype=new t,s.prototype.options={},s.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var n=this.elements[e];"IMG"===n.nodeName&&this.addImage(n);var i=n.nodeType;if(i&&(1===i||9===i||11===i))for(var r=n.querySelectorAll("img"),o=0,s=r.length;s>o;o++){var f=r[o];this.addImage(f)}}},s.prototype.addImage=function(e){var t=new f(e);this.images.push(t)},s.prototype.check=function(){function e(e,r){return t.options.debug&&h&&u.log("confirm",e,r),t.progress(e),n++,n===i&&t.complete(),!0}var t=this,n=0,i=this.images.length;if(this.hasAnyBroken=!1,!i)return this.complete(),void 0;for(var r=0;i>r;r++){var o=this.images[r];o.on("confirm",e),o.check()}},s.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify&&t.jqDeferred.notify(t,e)})},s.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var n=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[n](t)}})},a&&(a.fn.imagesLoaded=function(e,t){var n=new s(this,e,t);return n.jqDeferred.promise(a(this))}),f.prototype=new t,f.prototype.check=function(){var e=v[this.img.src]||new c(this.img.src);if(e.isConfirmed)return this.confirm(e.isLoaded,"cached was confirmed"),void 0;if(this.img.complete&&void 0!==this.img.naturalWidth)return this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0;var t=this;e.on("confirm",function(e,n){return t.confirm(e.isLoaded,n),!0}),e.check()},f.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("confirm",this,t)};var v={};return c.prototype=new t,c.prototype.check=function(){if(!this.isChecked){var e=new Image;n.bind(e,"load",this),n.bind(e,"error",this),e.src=this.src,this.isChecked=!0}},c.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},c.prototype.onload=function(e){this.confirm(!0,"onload"),this.unbindProxyEvents(e)},c.prototype.onerror=function(e){this.confirm(!1,"onerror"),this.unbindProxyEvents(e)},c.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit("confirm",this,t)},c.prototype.unbindProxyEvents=function(e){n.unbind(e.target,"load",this),n.unbind(e.target,"error",this)},s}); \ No newline at end of file diff --git a/docs/source/javascripts/lib/_jquery.highlight.js b/docs/source/javascripts/lib/_jquery.highlight.js deleted file mode 100755 index 9dcf3c7a..00000000 --- a/docs/source/javascripts/lib/_jquery.highlight.js +++ /dev/null @@ -1,108 +0,0 @@ -/* - * jQuery Highlight plugin - * - * Based on highlight v3 by Johann Burkard - * http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html - * - * Code a little bit refactored and cleaned (in my humble opinion). - * Most important changes: - * - has an option to highlight only entire words (wordsOnly - false by default), - * - has an option to be case sensitive (caseSensitive - false by default) - * - highlight element tag and class names can be specified in options - * - * Usage: - * // wrap every occurrance of text 'lorem' in content - * // with (default options) - * $('#content').highlight('lorem'); - * - * // search for and highlight more terms at once - * // so you can save some time on traversing DOM - * $('#content').highlight(['lorem', 'ipsum']); - * $('#content').highlight('lorem ipsum'); - * - * // search only for entire word 'lorem' - * $('#content').highlight('lorem', { wordsOnly: true }); - * - * // don't ignore case during search of term 'lorem' - * $('#content').highlight('lorem', { caseSensitive: true }); - * - * // wrap every occurrance of term 'ipsum' in content - * // with - * $('#content').highlight('ipsum', { element: 'em', className: 'important' }); - * - * // remove default highlight - * $('#content').unhighlight(); - * - * // remove custom highlight - * $('#content').unhighlight({ element: 'em', className: 'important' }); - * - * - * Copyright (c) 2009 Bartek Szopka - * - * Licensed under MIT license. - * - */ - -jQuery.extend({ - highlight: function (node, re, nodeName, className) { - if (node.nodeType === 3) { - var match = node.data.match(re); - if (match) { - var highlight = document.createElement(nodeName || 'span'); - highlight.className = className || 'highlight'; - var wordNode = node.splitText(match.index); - wordNode.splitText(match[0].length); - var wordClone = wordNode.cloneNode(true); - highlight.appendChild(wordClone); - wordNode.parentNode.replaceChild(highlight, wordNode); - return 1; //skip added node in parent - } - } else if ((node.nodeType === 1 && node.childNodes) && // only element nodes that have children - !/(script|style)/i.test(node.tagName) && // ignore script and style nodes - !(node.tagName === nodeName.toUpperCase() && node.className === className)) { // skip if already highlighted - for (var i = 0; i < node.childNodes.length; i++) { - i += jQuery.highlight(node.childNodes[i], re, nodeName, className); - } - } - return 0; - } -}); - -jQuery.fn.unhighlight = function (options) { - var settings = { className: 'highlight', element: 'span' }; - jQuery.extend(settings, options); - - return this.find(settings.element + "." + settings.className).each(function () { - var parent = this.parentNode; - parent.replaceChild(this.firstChild, this); - parent.normalize(); - }).end(); -}; - -jQuery.fn.highlight = function (words, options) { - var settings = { className: 'highlight', element: 'span', caseSensitive: false, wordsOnly: false }; - jQuery.extend(settings, options); - - if (words.constructor === String) { - words = [words]; - } - words = jQuery.grep(words, function(word, i){ - return word != ''; - }); - words = jQuery.map(words, function(word, i) { - return word.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - }); - if (words.length == 0) { return this; }; - - var flag = settings.caseSensitive ? "" : "i"; - var pattern = "(" + words.join("|") + ")"; - if (settings.wordsOnly) { - pattern = "\\b" + pattern + "\\b"; - } - var re = new RegExp(pattern, flag); - - return this.each(function () { - jQuery.highlight(this, re, settings.element, settings.className); - }); -}; - diff --git a/docs/source/javascripts/lib/_jquery.js b/docs/source/javascripts/lib/_jquery.js deleted file mode 100755 index b78120e6..00000000 --- a/docs/source/javascripts/lib/_jquery.js +++ /dev/null @@ -1,9831 +0,0 @@ -/*! - * jQuery JavaScript Library v2.2.0 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2016-01-08T20:02Z - */ - -(function( global, factory ) { - - if ( typeof module === "object" && typeof module.exports === "object" ) { - // For CommonJS and CommonJS-like environments where a proper `window` - // is present, execute the factory and get jQuery. - // For environments that do not have a `window` with a `document` - // (such as Node.js), expose a factory as module.exports. - // This accentuates the need for the creation of a real `window`. - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info. - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } - -// Pass this if window is not defined yet -}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - -// Support: Firefox 18+ -// Can't be in strict mode, several libs including ASP.NET trace -// the stack via arguments.caller.callee and Firefox dies if -// you try to trace through "use strict" call chains. (#13335) -//"use strict"; -var arr = []; - -var document = window.document; - -var slice = arr.slice; - -var concat = arr.concat; - -var push = arr.push; - -var indexOf = arr.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var support = {}; - - - -var - version = "2.2.0", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }, - - // Support: Android<4.1 - // Make sure we trim BOM and NBSP - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }; - -jQuery.fn = jQuery.prototype = { - - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // Start with an empty selector - selector: "", - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num != null ? - - // Return just the one element from the set - ( num < 0 ? this[ num + this.length ] : this[ num ] ) : - - // Return all the elements in a clean array - slice.call( this ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - ret.context = this.context; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - each: function( callback ) { - return jQuery.each( this, callback ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map( this, function( elem, i ) { - return callback.call( elem, i, elem ); - } ) ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: arr.sort, - splice: arr.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[ 0 ] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // Skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction( target ) ) { - target = {}; - } - - // Extend jQuery itself if only one argument is passed - if ( i === length ) { - target = this; - i--; - } - - for ( ; i < length; i++ ) { - - // Only deal with non-null/undefined values - if ( ( options = arguments[ i ] ) != null ) { - - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject( copy ) || - ( copyIsArray = jQuery.isArray( copy ) ) ) ) { - - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray( src ) ? src : []; - - } else { - clone = src && jQuery.isPlainObject( src ) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend( { - - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - isFunction: function( obj ) { - return jQuery.type( obj ) === "function"; - }, - - isArray: Array.isArray, - - isWindow: function( obj ) { - return obj != null && obj === obj.window; - }, - - isNumeric: function( obj ) { - - // parseFloat NaNs numeric-cast false positives (null|true|false|"") - // ...but misinterprets leading-number strings, particularly hex literals ("0x...") - // subtraction forces infinities to NaN - // adding 1 corrects loss of precision from parseFloat (#15100) - var realStringObj = obj && obj.toString(); - return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0; - }, - - isPlainObject: function( obj ) { - - // Not plain objects: - // - Any object or value whose internal [[Class]] property is not "[object Object]" - // - DOM nodes - // - window - if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.constructor && - !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) { - return false; - } - - // If the function hasn't returned already, we're confident that - // |obj| is a plain object, created by {} or constructed with new Object - return true; - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - type: function( obj ) { - if ( obj == null ) { - return obj + ""; - } - - // Support: Android<4.0, iOS<6 (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call( obj ) ] || "object" : - typeof obj; - }, - - // Evaluates a script in a global context - globalEval: function( code ) { - var script, - indirect = eval; - - code = jQuery.trim( code ); - - if ( code ) { - - // If the code includes a valid, prologue position - // strict mode pragma, execute code by injecting a - // script tag into the document. - if ( code.indexOf( "use strict" ) === 1 ) { - script = document.createElement( "script" ); - script.text = code; - document.head.appendChild( script ).parentNode.removeChild( script ); - } else { - - // Otherwise, avoid the DOM node creation, insertion - // and removal by using an indirect global eval - - indirect( code ); - } - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Support: IE9-11+ - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - each: function( obj, callback ) { - var length, i = 0; - - if ( isArrayLike( obj ) ) { - length = obj.length; - for ( ; i < length; i++ ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } else { - for ( i in obj ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } - - return obj; - }, - - // Support: Android<4.1 - trim: function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArrayLike( Object( arr ) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - return arr == null ? -1 : indexOf.call( arr, elem, i ); - }, - - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - for ( ; j < len; j++ ) { - first[ i++ ] = second[ j ]; - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var length, value, - i = 0, - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArrayLike( elems ) ) { - length = elems.length; - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - now: Date.now, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -} ); - -// JSHint would error on this code due to the Symbol not being defined in ES5. -// Defining this global in .jshintrc would create a danger of using the global -// unguarded in another place, it seems safer to just disable JSHint for these -// three lines. -/* jshint ignore: start */ -if ( typeof Symbol === "function" ) { - jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; -} -/* jshint ignore: end */ - -// Populate the class2type map -jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), -function( i, name ) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -} ); - -function isArrayLike( obj ) { - - // Support: iOS 8.2 (not reproducible in simulator) - // `in` check used to prevent JIT error (gh-2145) - // hasOwn isn't used here due to false negatives - // regarding Nodelist length in IE - var length = !!obj && "length" in obj && obj.length, - type = jQuery.type( obj ); - - if ( type === "function" || jQuery.isWindow( obj ) ) { - return false; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v2.2.1 - * http://sizzlejs.com/ - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2015-10-17 - */ -(function( window ) { - -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + 1 * new Date(), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // General-purpose constants - MAX_NEGATIVE = 1 << 31, - - // Instance methods - hasOwn = ({}).hasOwnProperty, - arr = [], - pop = arr.pop, - push_native = arr.push, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf as it's faster than native - // http://jsperf.com/thor-indexof-vs-for/5 - indexOf = function( list, elem ) { - var i = 0, - len = list.length; - for ( ; i < len; i++ ) { - if ( list[i] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - - // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + - "*\\]", - - pseudos = ":(" + identifier + ")(?:\\((" + - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rwhitespace = new RegExp( whitespace + "+", "g" ), - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - - rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + identifier + ")" ), - "CLASS": new RegExp( "^\\.(" + identifier + ")" ), - "TAG": new RegExp( "^(" + identifier + "|[*])" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - rescape = /'|\\/g, - - // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox<24 - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - high < 0 ? - // BMP codepoint - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }, - - // Used for iframes - // See setDocument() - // Removing the function wrapper causes a "Permission Denied" - // error in IE - unloadHandler = function() { - setDocument(); - }; - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - (arr = slice.call( preferredDoc.childNodes )), - preferredDoc.childNodes - ); - // Support: Android<4.0 - // Detect silently failing push.apply - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - push_native.apply( target, slice.call(els) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var m, i, elem, nid, nidselect, match, groups, newSelector, - newContext = context && context.ownerDocument, - - // nodeType defaults to 9, since context defaults to document - nodeType = context ? context.nodeType : 9; - - results = results || []; - - // Return early from calls with invalid selector or context - if ( typeof selector !== "string" || !selector || - nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { - - return results; - } - - // Try to shortcut find operations (as opposed to filters) in HTML documents - if ( !seed ) { - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - context = context || document; - - if ( documentIsHTML ) { - - // If the selector is sufficiently simple, try using a "get*By*" DOM method - // (excepting DocumentFragment context, where the methods don't exist) - if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { - - // ID selector - if ( (m = match[1]) ) { - - // Document context - if ( nodeType === 9 ) { - if ( (elem = context.getElementById( m )) ) { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - - // Element context - } else { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( newContext && (elem = newContext.getElementById( m )) && - contains( context, elem ) && - elem.id === m ) { - - results.push( elem ); - return results; - } - } - - // Type selector - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Class selector - } else if ( (m = match[3]) && support.getElementsByClassName && - context.getElementsByClassName ) { - - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // Take advantage of querySelectorAll - if ( support.qsa && - !compilerCache[ selector + " " ] && - (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - - if ( nodeType !== 1 ) { - newContext = context; - newSelector = selector; - - // qSA looks outside Element context, which is not what we want - // Thanks to Andrew Dupont for this workaround technique - // Support: IE <=8 - // Exclude object elements - } else if ( context.nodeName.toLowerCase() !== "object" ) { - - // Capture the context ID, setting it first if necessary - if ( (nid = context.getAttribute( "id" )) ) { - nid = nid.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", (nid = expando) ); - } - - // Prefix every selector in the list - groups = tokenize( selector ); - i = groups.length; - nidselect = ridentifier.test( nid ) ? "#" + nid : "[id='" + nid + "']"; - while ( i-- ) { - groups[i] = nidselect + " " + toSelector( groups[i] ); - } - newSelector = groups.join( "," ); - - // Expand context for sibling selectors - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || - context; - } - - if ( newSelector ) { - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch ( qsaError ) { - } finally { - if ( nid === expando ) { - context.removeAttribute( "id" ); - } - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {function(string, object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key + " " ] = value); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created div and expects a boolean result - */ -function assert( fn ) { - var div = document.createElement("div"); - - try { - return !!fn( div ); - } catch (e) { - return false; - } finally { - // Remove from its parent by default - if ( div.parentNode ) { - div.parentNode.removeChild( div ); - } - // release memory in IE - div = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split("|"), - i = arr.length; - - while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - ( ~b.sourceIndex || MAX_NEGATIVE ) - - ( ~a.sourceIndex || MAX_NEGATIVE ); - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Checks a node for validity as a Sizzle context - * @param {Element|Object=} context - * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value - */ -function testContext( context ) { - return context && typeof context.getElementsByTagName !== "undefined" && context; -} - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Detects XML nodes - * @param {Element|Object} elem An element or a document - * @returns {Boolean} True iff elem is a non-HTML XML node - */ -isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, parent, - doc = node ? node.ownerDocument || node : preferredDoc; - - // Return early if doc is invalid or already selected - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Update global variables - document = doc; - docElem = document.documentElement; - documentIsHTML = !isXML( document ); - - // Support: IE 9-11, Edge - // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) - if ( (parent = document.defaultView) && parent.top !== parent ) { - // Support: IE 11 - if ( parent.addEventListener ) { - parent.addEventListener( "unload", unloadHandler, false ); - - // Support: IE 9 - 10 only - } else if ( parent.attachEvent ) { - parent.attachEvent( "onunload", unloadHandler ); - } - } - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties - // (excepting IE8 booleans) - support.attributes = assert(function( div ) { - div.className = "i"; - return !div.getAttribute("className"); - }); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert(function( div ) { - div.appendChild( document.createComment("") ); - return !div.getElementsByTagName("*").length; - }); - - // Support: IE<9 - support.getElementsByClassName = rnative.test( document.getElementsByClassName ); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert(function( div ) { - docElem.appendChild( div ).id = expando; - return !document.getElementsByName || !document.getElementsByName( expando ).length; - }); - - // ID find and filter - if ( support.getById ) { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var m = context.getElementById( id ); - return m ? [ m ] : []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - } else { - // Support: IE6/7 - // getElementById is not reliable as a find shortcut - delete Expr.find["ID"]; - - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== "undefined" && - elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - } - - // Tag - Expr.find["TAG"] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( tag ); - - // DocumentFragment nodes don't have gEBTN - } else if ( support.qsa ) { - return context.querySelectorAll( tag ); - } - } : - - function( tag, context ) { - var elem, - tmp = [], - i = 0, - // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( (elem = results[i++]) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See http://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // http://bugs.jquery.com/ticket/12359 - docElem.appendChild( div ).innerHTML = "" + - ""; - - // Support: IE8, Opera 11-12.16 - // Nothing should be selected when empty strings follow ^= or $= or *= - // The test attribute must be unknown in Opera but "safe" for WinRT - // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( div.querySelectorAll("[msallowcapture^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ - if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) { - rbuggyQSA.push("~="); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - - // Support: Safari 8+, iOS 8+ - // https://bugs.webkit.org/show_bug.cgi?id=136851 - // In-page `selector#id sibing-combinator selector` fails - if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) { - rbuggyQSA.push(".#.+[+~]"); - } - }); - - assert(function( div ) { - // Support: Windows 8 Native Apps - // The type and name attributes are restricted during .innerHTML assignment - var input = document.createElement("input"); - input.setAttribute( "type", "hidden" ); - div.appendChild( input ).setAttribute( "name", "D" ); - - // Support: IE8 - // Enforce case-sensitivity of name attribute - if ( div.querySelectorAll("[name=d]").length ) { - rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - div.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || - docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( div, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); - - /* Contains - ---------------------------------------------------------------------- */ - hasCompare = rnative.test( docElem.compareDocumentPosition ); - - // Element contains another - // Purposefully self-exclusive - // As in, an element does not contain itself - contains = hasCompare || rnative.test( docElem.contains ) ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = hasCompare ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - // Sort on method existence if only one input has compareDocumentPosition - var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; - if ( compare ) { - return compare; - } - - // Calculate position if both inputs belong to the same document - compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? - a.compareDocumentPosition( b ) : - - // Otherwise we know they are disconnected - 1; - - // Disconnected nodes - if ( compare & 1 || - (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { - - // Choose the first element that is related to our preferred document - if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { - return -1; - } - if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } : - function( a, b ) { - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Parentless nodes are either documents or disconnected - if ( !aup || !bup ) { - return a === document ? -1 : - b === document ? 1 : - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - return document; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - if ( support.matchesSelector && documentIsHTML && - !compilerCache[ expr + " " ] && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch (e) {} - } - - return Sizzle( expr, document, null, [ elem ] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val !== undefined ? - val : - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - (val = elem.getAttributeNode(name)) && val.specified ? - val.value : - null; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( (elem = results[i++]) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - // Clear input after sorting to release objects - // See https://github.com/jquery/sizzle/pull/225 - sortInput = null; - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - while ( (node = elem[i++]) ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (jQuery #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[6] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[3] ) { - match[2] = match[4] || match[5] || ""; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { return true; } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, uniqueCache, outerCache, node, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType, - diff = false; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) { - - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - - // Seek `elem` from a previously-cached index - - // ...in a gzip-friendly way - node = parent; - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex && cache[ 2 ]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - } else { - // Use previously-cached element index if available - if ( useCache ) { - // ...in a gzip-friendly way - node = elem; - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex; - } - - // xml :nth-child(...) - // or :nth-last-child(...) or :nth(-last)?-of-type(...) - if ( diff === false ) { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) && - ++diff ) { - - // Cache the index of each encountered element - if ( useCache ) { - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - uniqueCache[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - // Don't keep the element (issue #299) - input[0] = null; - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - text = text.replace( runescape, funescape ); - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifier - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), - // but not by others (comment: 8; processing instruction: 7; etc.) - // nodeType < 6 works because attributes (2) do not appear as children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeType < 6 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - - // Support: IE<8 - // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -tokenize = Sizzle.tokenize = function( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( (tokens = []) ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push({ - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - }); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push({ - value: matched, - type: type, - matches: match - }); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -}; - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - checkNonElements = base && dir === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var oldCache, uniqueCache, outerCache, - newCache = [ dirruns, doneName ]; - - // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); - - if ( (oldCache = uniqueCache[ dir ]) && - oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { - - // Assign to newCache so results back-propagate to previous elements - return (newCache[ 2 ] = oldCache[ 2 ]); - } else { - // Reuse newcache so results back-propagate to previous elements - uniqueCache[ dir ] = newCache; - - // A match means we're done; a fail means we have to keep checking - if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { - return true; - } - } - } - } - } - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - // Avoid hanging onto element (issue #299) - checkContext = null; - return ret; - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - var bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, outermost ) { - var elem, j, matcher, - matchedCount = 0, - i = "0", - unmatched = seed && [], - setMatched = [], - contextBackup = outermostContext, - // We must always have either seed elements or outermost context - elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), - len = elems.length; - - if ( outermost ) { - outermostContext = context === document || context || outermost; - } - - // Add elements passing elementMatchers directly to results - // Support: IE<9, Safari - // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id - for ( ; i !== len && (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - if ( !context && elem.ownerDocument !== document ) { - setDocument( elem ); - xml = !documentIsHTML; - } - while ( (matcher = elementMatchers[j++]) ) { - if ( matcher( elem, context || document, xml) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // `i` is now the count of elements visited above, and adding it to `matchedCount` - // makes the latter nonnegative. - matchedCount += i; - - // Apply set filters to unmatched elements - // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` - // equals `i`), unless we didn't visit _any_ elements in the above loop because we have - // no element matchers and no seed. - // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that - // case, which will result in a "00" `matchedCount` that differs from `i` but is also - // numerically zero. - if ( bySet && i !== matchedCount ) { - j = 0; - while ( (matcher = setMatchers[j++]) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !match ) { - match = tokenize( selector ); - } - i = match.length; - while ( i-- ) { - cached = matcherFromTokens( match[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - - // Save selector and tokenization - cached.selector = selector; - } - return cached; -}; - -/** - * A low-level selection function that works with Sizzle's compiled - * selector functions - * @param {String|Function} selector A selector or a pre-compiled - * selector function built with Sizzle.compile - * @param {Element} context - * @param {Array} [results] - * @param {Array} [seed] A set of elements to match against - */ -select = Sizzle.select = function( selector, context, results, seed ) { - var i, tokens, token, type, find, - compiled = typeof selector === "function" && selector, - match = !seed && tokenize( (selector = compiled.selector || selector) ); - - results = results || []; - - // Try to minimize operations if there is only one selector in the list and no seed - // (the latter of which guarantees us context) - if ( match.length === 1 ) { - - // Reduce context if the leading compound selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - support.getById && context.nodeType === 9 && documentIsHTML && - Expr.relative[ tokens[1].type ] ) { - - context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; - if ( !context ) { - return results; - - // Precompiled matchers will still verify ancestry, so step up a level - } else if ( compiled ) { - context = context.parentNode; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - - // Compile and execute a filtering function if one is not provided - // Provide `match` to avoid retokenization if we modified the selector above - ( compiled || compile( selector, match ) )( - seed, - context, - !documentIsHTML, - results, - !context || rsibling.test( selector ) && testContext( context.parentNode ) || context - ); - return results; -}; - -// One-time assignments - -// Sort stability -support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; - -// Support: Chrome 14-35+ -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = !!hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert(function( div1 ) { - // Should return 1, but returns 4 (following) - return div1.compareDocumentPosition( document.createElement("div") ) & 1; -}); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert(function( div ) { - div.innerHTML = ""; - return div.firstChild.getAttribute("href") === "#" ; -}) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - }); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert(function( div ) { - div.innerHTML = ""; - div.firstChild.setAttribute( "value", "" ); - return div.firstChild.getAttribute( "value" ) === ""; -}) ) { - addHandle( "value", function( elem, name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - }); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert(function( div ) { - return div.getAttribute("disabled") == null; -}) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return elem[ name ] === true ? name.toLowerCase() : - (val = elem.getAttributeNode( name )) && val.specified ? - val.value : - null; - } - }); -} - -return Sizzle; - -})( window ); - - - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[ ":" ] = jQuery.expr.pseudos; -jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - - -var dir = function( elem, dir, until ) { - var matched = [], - truncate = until !== undefined; - - while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { - if ( elem.nodeType === 1 ) { - if ( truncate && jQuery( elem ).is( until ) ) { - break; - } - matched.push( elem ); - } - } - return matched; -}; - - -var siblings = function( n, elem ) { - var matched = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - matched.push( n ); - } - } - - return matched; -}; - - -var rneedsContext = jQuery.expr.match.needsContext; - -var rsingleTag = ( /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/ ); - - - -var risSimple = /^.[^:#\[\.,]*$/; - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - /* jshint -W018 */ - return !!qualifier.call( elem, i, elem ) !== not; - } ); - - } - - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - } ); - - } - - if ( typeof qualifier === "string" ) { - if ( risSimple.test( qualifier ) ) { - return jQuery.filter( qualifier, elements, not ); - } - - qualifier = jQuery.filter( qualifier, elements ); - } - - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) > -1 ) !== not; - } ); -} - -jQuery.filter = function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 && elem.nodeType === 1 ? - jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : - jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - } ) ); -}; - -jQuery.fn.extend( { - find: function( selector ) { - var i, - len = this.length, - ret = [], - self = this; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter( function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - } ) ); - } - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - // Needed because $( selector, context ) becomes $( context ).find( selector ) - ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); - ret.selector = this.selector ? this.selector + " " + selector : selector; - return ret; - }, - filter: function( selector ) { - return this.pushStack( winnow( this, selector || [], false ) ); - }, - not: function( selector ) { - return this.pushStack( winnow( this, selector || [], true ) ); - }, - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - } -} ); - - -// Initialize a jQuery object - - -// A central reference to the root jQuery(document) -var rootjQuery, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, - - init = jQuery.fn.init = function( selector, context, root ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Method init() accepts an alternate rootjQuery - // so migrate can support jQuery.sub (gh-2101) - root = root || rootjQuery; - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector[ 0 ] === "<" && - selector[ selector.length - 1 ] === ">" && - selector.length >= 3 ) { - - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && ( match[ 1 ] || !context ) ) { - - // HANDLE: $(html) -> $(array) - if ( match[ 1 ] ) { - context = context instanceof jQuery ? context[ 0 ] : context; - - // Option to run scripts is true for back-compat - // Intentionally let the error be thrown if parseHTML is not present - jQuery.merge( this, jQuery.parseHTML( - match[ 1 ], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - - // Properties of context are called as methods if possible - if ( jQuery.isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[ 2 ] ); - - // Support: Blackberry 4.6 - // gEBID returns nodes no longer in the document (#6963) - if ( elem && elem.parentNode ) { - - // Inject the element directly into the jQuery object - this.length = 1; - this[ 0 ] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || root ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this.context = this[ 0 ] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return root.ready !== undefined ? - root.ready( selector ) : - - // Execute immediately if ready is not present - selector( jQuery ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }; - -// Give the init function the jQuery prototype for later instantiation -init.prototype = jQuery.fn; - -// Initialize central reference -rootjQuery = jQuery( document ); - - -var rparentsprev = /^(?:parents|prev(?:Until|All))/, - - // Methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend( { - has: function( target ) { - var targets = jQuery( target, this ), - l = targets.length; - - return this.filter( function() { - var i = 0; - for ( ; i < l; i++ ) { - if ( jQuery.contains( this, targets[ i ] ) ) { - return true; - } - } - } ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - matched = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { - - // Always skip document fragments - if ( cur.nodeType < 11 && ( pos ? - pos.index( cur ) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector( cur, selectors ) ) ) { - - matched.push( cur ); - break; - } - } - } - - return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); - }, - - // Determine the position of an element within the set - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; - } - - // Index in selector - if ( typeof elem === "string" ) { - return indexOf.call( jQuery( elem ), this[ 0 ] ); - } - - // Locate the position of the desired element - return indexOf.call( this, - - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[ 0 ] : elem - ); - }, - - add: function( selector, context ) { - return this.pushStack( - jQuery.uniqueSort( - jQuery.merge( this.get(), jQuery( selector, context ) ) - ) - ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - } -} ); - -function sibling( cur, dir ) { - while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} - return cur; -} - -jQuery.each( { - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return siblings( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return siblings( elem.firstChild ); - }, - contents: function( elem ) { - return elem.contentDocument || jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var matched = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - matched = jQuery.filter( selector, matched ); - } - - if ( this.length > 1 ) { - - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - jQuery.uniqueSort( matched ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - matched.reverse(); - } - } - - return this.pushStack( matched ); - }; -} ); -var rnotwhite = ( /\S+/g ); - - - -// Convert String-formatted options into Object-formatted ones -function createOptions( options ) { - var object = {}; - jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { - object[ flag ] = true; - } ); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - createOptions( options ) : - jQuery.extend( {}, options ); - - var // Flag to know if list is currently firing - firing, - - // Last fire value for non-forgettable lists - memory, - - // Flag to know if list was already fired - fired, - - // Flag to prevent firing - locked, - - // Actual callback list - list = [], - - // Queue of execution data for repeatable lists - queue = [], - - // Index of currently firing callback (modified by add/remove as needed) - firingIndex = -1, - - // Fire callbacks - fire = function() { - - // Enforce single-firing - locked = options.once; - - // Execute callbacks for all pending executions, - // respecting firingIndex overrides and runtime changes - fired = firing = true; - for ( ; queue.length; firingIndex = -1 ) { - memory = queue.shift(); - while ( ++firingIndex < list.length ) { - - // Run callback and check for early termination - if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && - options.stopOnFalse ) { - - // Jump to end and forget the data so .add doesn't re-fire - firingIndex = list.length; - memory = false; - } - } - } - - // Forget the data if we're done with it - if ( !options.memory ) { - memory = false; - } - - firing = false; - - // Clean up if we're done firing for good - if ( locked ) { - - // Keep an empty list if we have data for future add calls - if ( memory ) { - list = []; - - // Otherwise, this object is spent - } else { - list = ""; - } - } - }, - - // Actual Callbacks object - self = { - - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - - // If we have memory from a past run, we should fire after adding - if ( memory && !firing ) { - firingIndex = list.length - 1; - queue.push( memory ); - } - - ( function add( args ) { - jQuery.each( args, function( _, arg ) { - if ( jQuery.isFunction( arg ) ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) { - - // Inspect recursively - add( arg ); - } - } ); - } )( arguments ); - - if ( memory && !firing ) { - fire(); - } - } - return this; - }, - - // Remove a callback from the list - remove: function() { - jQuery.each( arguments, function( _, arg ) { - var index; - while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - - // Handle firing indexes - if ( index <= firingIndex ) { - firingIndex--; - } - } - } ); - return this; - }, - - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? - jQuery.inArray( fn, list ) > -1 : - list.length > 0; - }, - - // Remove all callbacks from the list - empty: function() { - if ( list ) { - list = []; - } - return this; - }, - - // Disable .fire and .add - // Abort any current/pending executions - // Clear all callbacks and values - disable: function() { - locked = queue = []; - list = memory = ""; - return this; - }, - disabled: function() { - return !list; - }, - - // Disable .fire - // Also disable .add unless we have memory (since it would have no effect) - // Abort any pending executions - lock: function() { - locked = queue = []; - if ( !memory ) { - list = memory = ""; - } - return this; - }, - locked: function() { - return !!locked; - }, - - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( !locked ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - queue.push( args ); - if ( !firing ) { - fire(); - } - } - return this; - }, - - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; - - -jQuery.extend( { - - Deferred: function( func ) { - var tuples = [ - - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ], - [ "reject", "fail", jQuery.Callbacks( "once memory" ), "rejected" ], - [ "notify", "progress", jQuery.Callbacks( "memory" ) ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred( function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; - - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[ 1 ] ]( function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .progress( newDefer.notify ) - .done( newDefer.resolve ) - .fail( newDefer.reject ); - } else { - newDefer[ tuple[ 0 ] + "With" ]( - this === promise ? newDefer.promise() : this, - fn ? [ returned ] : arguments - ); - } - } ); - } ); - fns = null; - } ).promise(); - }, - - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[ 1 ] ] = list.add; - - // Handle state - if ( stateString ) { - list.add( function() { - - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] - deferred[ tuple[ 0 ] ] = function() { - deferred[ tuple[ 0 ] + "With" ]( this === deferred ? promise : this, arguments ); - return this; - }; - deferred[ tuple[ 0 ] + "With" ] = list.fireWith; - } ); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || - ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. - // If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; - if ( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // Add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .progress( updateFunc( i, progressContexts, progressValues ) ) - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ); - } else { - --remaining; - } - } - } - - // If we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -} ); - - -// The deferred used on DOM ready -var readyList; - -jQuery.fn.ready = function( fn ) { - - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; -}; - -jQuery.extend( { - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.triggerHandler ) { - jQuery( document ).triggerHandler( "ready" ); - jQuery( document ).off( "ready" ); - } - } -} ); - -/** - * The ready event handler and self cleanup method - */ -function completed() { - document.removeEventListener( "DOMContentLoaded", completed ); - window.removeEventListener( "load", completed ); - jQuery.ready(); -} - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called - // after the browser event has already occurred. - // Support: IE9-10 only - // Older IE sometimes signals "interactive" too soon - if ( document.readyState === "complete" || - ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { - - // Handle it asynchronously to allow scripts the opportunity to delay ready - window.setTimeout( jQuery.ready ); - - } else { - - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed ); - } - } - return readyList.promise( obj ); -}; - -// Kick off the DOM ready check even if the user does not -jQuery.ready.promise(); - - - - -// Multifunctional method to get and set values of a collection -// The value/s can optionally be executed if it's a function -var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - len = elems.length, - bulk = key == null; - - // Sets many values - if ( jQuery.type( key ) === "object" ) { - chainable = true; - for ( i in key ) { - access( elems, fn, i, key[ i ], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !jQuery.isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < len; i++ ) { - fn( - elems[ i ], key, raw ? - value : - value.call( elems[ i ], i, fn( elems[ i ], key ) ) - ); - } - } - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - len ? fn( elems[ 0 ], key ) : emptyGet; -}; -var acceptData = function( owner ) { - - // Accepts only: - // - Node - // - Node.ELEMENT_NODE - // - Node.DOCUMENT_NODE - // - Object - // - Any - /* jshint -W018 */ - return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); -}; - - - - -function Data() { - this.expando = jQuery.expando + Data.uid++; -} - -Data.uid = 1; - -Data.prototype = { - - register: function( owner, initial ) { - var value = initial || {}; - - // If it is a node unlikely to be stringify-ed or looped over - // use plain assignment - if ( owner.nodeType ) { - owner[ this.expando ] = value; - - // Otherwise secure it in a non-enumerable, non-writable property - // configurability must be true to allow the property to be - // deleted with the delete operator - } else { - Object.defineProperty( owner, this.expando, { - value: value, - writable: true, - configurable: true - } ); - } - return owner[ this.expando ]; - }, - cache: function( owner ) { - - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return an empty object. - if ( !acceptData( owner ) ) { - return {}; - } - - // Check if the owner object already has a cache - var value = owner[ this.expando ]; - - // If not, create one - if ( !value ) { - value = {}; - - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return an empty object. - if ( acceptData( owner ) ) { - - // If it is a node unlikely to be stringify-ed or looped over - // use plain assignment - if ( owner.nodeType ) { - owner[ this.expando ] = value; - - // Otherwise secure it in a non-enumerable property - // configurable must be true to allow the property to be - // deleted when data is removed - } else { - Object.defineProperty( owner, this.expando, { - value: value, - configurable: true - } ); - } - } - } - - return value; - }, - set: function( owner, data, value ) { - var prop, - cache = this.cache( owner ); - - // Handle: [ owner, key, value ] args - if ( typeof data === "string" ) { - cache[ data ] = value; - - // Handle: [ owner, { properties } ] args - } else { - - // Copy the properties one-by-one to the cache object - for ( prop in data ) { - cache[ prop ] = data[ prop ]; - } - } - return cache; - }, - get: function( owner, key ) { - return key === undefined ? - this.cache( owner ) : - owner[ this.expando ] && owner[ this.expando ][ key ]; - }, - access: function( owner, key, value ) { - var stored; - - // In cases where either: - // - // 1. No key was specified - // 2. A string key was specified, but no value provided - // - // Take the "read" path and allow the get method to determine - // which value to return, respectively either: - // - // 1. The entire cache object - // 2. The data stored at the key - // - if ( key === undefined || - ( ( key && typeof key === "string" ) && value === undefined ) ) { - - stored = this.get( owner, key ); - - return stored !== undefined ? - stored : this.get( owner, jQuery.camelCase( key ) ); - } - - // When the key is not a string, or both a key and value - // are specified, set or extend (existing objects) with either: - // - // 1. An object of properties - // 2. A key and value - // - this.set( owner, key, value ); - - // Since the "set" path can have two possible entry points - // return the expected data based on which path was taken[*] - return value !== undefined ? value : key; - }, - remove: function( owner, key ) { - var i, name, camel, - cache = owner[ this.expando ]; - - if ( cache === undefined ) { - return; - } - - if ( key === undefined ) { - this.register( owner ); - - } else { - - // Support array or space separated string of keys - if ( jQuery.isArray( key ) ) { - - // If "name" is an array of keys... - // When data is initially created, via ("key", "val") signature, - // keys will be converted to camelCase. - // Since there is no way to tell _how_ a key was added, remove - // both plain key and camelCase key. #12786 - // This will only penalize the array argument path. - name = key.concat( key.map( jQuery.camelCase ) ); - } else { - camel = jQuery.camelCase( key ); - - // Try the string as a key before any manipulation - if ( key in cache ) { - name = [ key, camel ]; - } else { - - // If a key with the spaces exists, use it. - // Otherwise, create an array by matching non-whitespace - name = camel; - name = name in cache ? - [ name ] : ( name.match( rnotwhite ) || [] ); - } - } - - i = name.length; - - while ( i-- ) { - delete cache[ name[ i ] ]; - } - } - - // Remove the expando if there's no more data - if ( key === undefined || jQuery.isEmptyObject( cache ) ) { - - // Support: Chrome <= 35-45+ - // Webkit & Blink performance suffers when deleting properties - // from DOM nodes, so set to undefined instead - // https://code.google.com/p/chromium/issues/detail?id=378607 - if ( owner.nodeType ) { - owner[ this.expando ] = undefined; - } else { - delete owner[ this.expando ]; - } - } - }, - hasData: function( owner ) { - var cache = owner[ this.expando ]; - return cache !== undefined && !jQuery.isEmptyObject( cache ); - } -}; -var dataPriv = new Data(); - -var dataUser = new Data(); - - - -// Implementation Summary -// -// 1. Enforce API surface and semantic compatibility with 1.9.x branch -// 2. Improve the module's maintainability by reducing the storage -// paths to a single mechanism. -// 3. Use the same single mechanism to support "private" and "user" data. -// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) -// 5. Avoid exposing implementation details on user objects (eg. expando properties) -// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 - -var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, - rmultiDash = /[A-Z]/g; - -function dataAttr( elem, key, data ) { - var name; - - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch ( e ) {} - - // Make sure we set the data so it isn't changed later - dataUser.set( elem, key, data ); - } else { - data = undefined; - } - } - return data; -} - -jQuery.extend( { - hasData: function( elem ) { - return dataUser.hasData( elem ) || dataPriv.hasData( elem ); - }, - - data: function( elem, name, data ) { - return dataUser.access( elem, name, data ); - }, - - removeData: function( elem, name ) { - dataUser.remove( elem, name ); - }, - - // TODO: Now that all calls to _data and _removeData have been replaced - // with direct calls to dataPriv methods, these can be deprecated. - _data: function( elem, name, data ) { - return dataPriv.access( elem, name, data ); - }, - - _removeData: function( elem, name ) { - dataPriv.remove( elem, name ); - } -} ); - -jQuery.fn.extend( { - data: function( key, value ) { - var i, name, data, - elem = this[ 0 ], - attrs = elem && elem.attributes; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = dataUser.get( elem ); - - if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { - i = attrs.length; - while ( i-- ) { - - // Support: IE11+ - // The attrs elements can be null (#14894) - if ( attrs[ i ] ) { - name = attrs[ i ].name; - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.slice( 5 ) ); - dataAttr( elem, name, data[ name ] ); - } - } - } - dataPriv.set( elem, "hasDataAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each( function() { - dataUser.set( this, key ); - } ); - } - - return access( this, function( value ) { - var data, camelKey; - - // The calling jQuery object (element matches) is not empty - // (and therefore has an element appears at this[ 0 ]) and the - // `value` parameter was not undefined. An empty jQuery object - // will result in `undefined` for elem = this[ 0 ] which will - // throw an exception if an attempt to read a data cache is made. - if ( elem && value === undefined ) { - - // Attempt to get data from the cache - // with the key as-is - data = dataUser.get( elem, key ) || - - // Try to find dashed key if it exists (gh-2779) - // This is for 2.2.x only - dataUser.get( elem, key.replace( rmultiDash, "-$&" ).toLowerCase() ); - - if ( data !== undefined ) { - return data; - } - - camelKey = jQuery.camelCase( key ); - - // Attempt to get data from the cache - // with the key camelized - data = dataUser.get( elem, camelKey ); - if ( data !== undefined ) { - return data; - } - - // Attempt to "discover" the data in - // HTML5 custom data-* attrs - data = dataAttr( elem, camelKey, undefined ); - if ( data !== undefined ) { - return data; - } - - // We tried really hard, but the data doesn't exist. - return; - } - - // Set the data... - camelKey = jQuery.camelCase( key ); - this.each( function() { - - // First, attempt to store a copy or reference of any - // data that might've been store with a camelCased key. - var data = dataUser.get( this, camelKey ); - - // For HTML5 data-* attribute interop, we have to - // store property names with dashes in a camelCase form. - // This might not apply to all properties...* - dataUser.set( this, camelKey, value ); - - // *... In the case of properties that might _actually_ - // have dashes, we need to also store a copy of that - // unchanged property. - if ( key.indexOf( "-" ) > -1 && data !== undefined ) { - dataUser.set( this, key, value ); - } - } ); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each( function() { - dataUser.remove( this, key ); - } ); - } -} ); - - -jQuery.extend( { - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = dataPriv.get( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray( data ) ) { - queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // Clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // Not public - generate a queueHooks object, or return the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { - empty: jQuery.Callbacks( "once memory" ).add( function() { - dataPriv.remove( elem, [ type + "queue", key ] ); - } ) - } ); - } -} ); - -jQuery.fn.extend( { - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[ 0 ], type ); - } - - return data === undefined ? - this : - this.each( function() { - var queue = jQuery.queue( this, type, data ); - - // Ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - } ); - }, - dequeue: function( type ) { - return this.each( function() { - jQuery.dequeue( this, type ); - } ); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while ( i-- ) { - tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -} ); -var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; - -var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); - - -var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; - -var isHidden = function( elem, el ) { - - // isHidden might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || - !jQuery.contains( elem.ownerDocument, elem ); - }; - - - -function adjustCSS( elem, prop, valueParts, tween ) { - var adjusted, - scale = 1, - maxIterations = 20, - currentValue = tween ? - function() { return tween.cur(); } : - function() { return jQuery.css( elem, prop, "" ); }, - initial = currentValue(), - unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), - - // Starting value computation is required for potential unit mismatches - initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && - rcssNum.exec( jQuery.css( elem, prop ) ); - - if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { - - // Trust units reported by jQuery.css - unit = unit || initialInUnit[ 3 ]; - - // Make sure we update the tween properties later on - valueParts = valueParts || []; - - // Iteratively approximate from a nonzero starting point - initialInUnit = +initial || 1; - - do { - - // If previous iteration zeroed out, double until we get *something*. - // Use string for doubling so we don't accidentally see scale as unchanged below - scale = scale || ".5"; - - // Adjust and apply - initialInUnit = initialInUnit / scale; - jQuery.style( elem, prop, initialInUnit + unit ); - - // Update scale, tolerating zero or NaN from tween.cur() - // Break the loop if scale is unchanged or perfect, or if we've just had enough. - } while ( - scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations - ); - } - - if ( valueParts ) { - initialInUnit = +initialInUnit || +initial || 0; - - // Apply relative offset (+=/-=) if specified - adjusted = valueParts[ 1 ] ? - initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : - +valueParts[ 2 ]; - if ( tween ) { - tween.unit = unit; - tween.start = initialInUnit; - tween.end = adjusted; - } - } - return adjusted; -} -var rcheckableType = ( /^(?:checkbox|radio)$/i ); - -var rtagName = ( /<([\w:-]+)/ ); - -var rscriptType = ( /^$|\/(?:java|ecma)script/i ); - - - -// We have to close these tags to support XHTML (#13200) -var wrapMap = { - - // Support: IE9 - option: [ 1, "" ], - - // XHTML parsers do not magically insert elements in the - // same way that tag soup parsers do. So we cannot shorten - // this by omitting or other required elements. - thead: [ 1, "", "
    " ], - col: [ 2, "", "
    " ], - tr: [ 2, "", "
    " ], - td: [ 3, "", "
    " ], - - _default: [ 0, "", "" ] -}; - -// Support: IE9 -wrapMap.optgroup = wrapMap.option; - -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - - -function getAll( context, tag ) { - - // Support: IE9-11+ - // Use typeof to avoid zero-argument method invocation on host objects (#15151) - var ret = typeof context.getElementsByTagName !== "undefined" ? - context.getElementsByTagName( tag || "*" ) : - typeof context.querySelectorAll !== "undefined" ? - context.querySelectorAll( tag || "*" ) : - []; - - return tag === undefined || tag && jQuery.nodeName( context, tag ) ? - jQuery.merge( [ context ], ret ) : - ret; -} - - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - dataPriv.set( - elems[ i ], - "globalEval", - !refElements || dataPriv.get( refElements[ i ], "globalEval" ) - ); - } -} - - -var rhtml = /<|&#?\w+;/; - -function buildFragment( elems, context, scripts, selection, ignored ) { - var elem, tmp, tag, wrap, contains, j, - fragment = context.createDocumentFragment(), - nodes = [], - i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { - - // Support: Android<4.1, PhantomJS<2 - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; - - // Descend through wrappers to the right content - j = wrap[ 0 ]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Support: Android<4.1, PhantomJS<2 - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, tmp.childNodes ); - - // Remember the top-level container - tmp = fragment.firstChild; - - // Ensure the created nodes are orphaned (#12392) - tmp.textContent = ""; - } - } - } - - // Remove wrapper from fragment - fragment.textContent = ""; - - i = 0; - while ( ( elem = nodes[ i++ ] ) ) { - - // Skip elements already in the context collection (trac-4087) - if ( selection && jQuery.inArray( elem, selection ) > -1 ) { - if ( ignored ) { - ignored.push( elem ); - } - continue; - } - - contains = jQuery.contains( elem.ownerDocument, elem ); - - // Append to fragment - tmp = getAll( fragment.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( contains ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( ( elem = tmp[ j++ ] ) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - return fragment; -} - - -( function() { - var fragment = document.createDocumentFragment(), - div = fragment.appendChild( document.createElement( "div" ) ), - input = document.createElement( "input" ); - - // Support: Android 4.0-4.3, Safari<=5.1 - // Check state lost if the name is set (#11217) - // Support: Windows Web Apps (WWA) - // `name` and `type` must use .setAttribute for WWA (#14901) - input.setAttribute( "type", "radio" ); - input.setAttribute( "checked", "checked" ); - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - - // Support: Safari<=5.1, Android<4.2 - // Older WebKit doesn't clone checked state correctly in fragments - support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE<=11+ - // Make sure textarea (and checkbox) defaultValue is properly cloned - div.innerHTML = ""; - support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; -} )(); - - -var - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -// Support: IE9 -// See #13393 for more info -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -function on( elem, types, selector, data, fn, one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - on( elem, type, selector, data, types[ type ], one ); - } - return elem; - } - - if ( data == null && fn == null ) { - - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return elem.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - } ); -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - - var handleObjIn, eventHandle, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.get( elem ); - - // Don't attach events to noData or text/comment nodes (but allow plain objects) - if ( !elemData ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !( events = elemData.events ) ) { - events = elemData.events = {}; - } - if ( !( eventHandle = elemData.handle ) ) { - eventHandle = elemData.handle = function( e ) { - - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? - jQuery.event.dispatch.apply( elem, arguments ) : undefined; - }; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( rnotwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend( { - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join( "." ) - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !( handlers = events[ type ] ) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener if the special events handler returns false - if ( !special.setup || - special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var j, origCount, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); - - if ( !elemData || !( events = elemData.events ) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( rnotwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[ 2 ] && - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || - selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || - special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove data and the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - dataPriv.remove( elem, "handle events" ); - } - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event ); - - var i, j, ret, matched, handleObj, - handlerQueue = [], - args = slice.call( arguments ), - handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[ 0 ] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( ( handleObj = matched.handlers[ j++ ] ) && - !event.isImmediatePropagationStopped() ) { - - // Triggered event must either 1) have no namespace, or 2) have namespace(s) - // a subset or equal to those in the bound event (both can have no namespace). - if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || - handleObj.handler ).apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( ( event.result = ret ) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var i, matches, sel, handleObj, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Support (at least): Chrome, IE9 - // Find delegate handlers - // Black-hole SVG instance trees (#13180) - // - // Support: Firefox<=42+ - // Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343) - if ( delegateCount && cur.nodeType && - ( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) { - - for ( ; cur !== this; cur = cur.parentNode || this ) { - - // Don't check non-elements (#13208) - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== "click" ) ) { - matches = []; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matches[ sel ] === undefined ) { - matches[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) > -1 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matches[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push( { elem: cur, handlers: matches } ); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( delegateCount < handlers.length ) { - handlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } ); - } - - return handlerQueue; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - props: ( "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " + - "metaKey relatedTarget shiftKey target timeStamp view which" ).split( " " ), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split( " " ), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: ( "button buttons clientX clientY offsetX offsetY pageX pageY " + - "screenX screenY toElement" ).split( " " ), - filter: function( event, original ) { - var eventDoc, doc, body, - button = original.button; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + - ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + - ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, copy, - type = event.type, - originalEvent = event, - fixHook = this.fixHooks[ type ]; - - if ( !fixHook ) { - this.fixHooks[ type ] = fixHook = - rmouseEvent.test( type ) ? this.mouseHooks : - rkeyEvent.test( type ) ? this.keyHooks : - {}; - } - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = new jQuery.Event( originalEvent ); - - i = copy.length; - while ( i-- ) { - prop = copy[ i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Support: Cordova 2.5 (WebKit) (#13255) - // All events should have a target; Cordova deviceready doesn't - if ( !event.target ) { - event.target = document; - } - - // Support: Safari 6.0+, Chrome<28 - // Target should not be a text node (#504, #13143) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; - }, - - special: { - load: { - - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - focus: { - - // Fire native event if possible so blur/focus sequence is correct - trigger: function() { - if ( this !== safeActiveElement() && this.focus ) { - this.focus(); - return false; - } - }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if ( this === safeActiveElement() && this.blur ) { - this.blur(); - return false; - } - }, - delegateType: "focusout" - }, - click: { - - // For checkbox, fire native event so checked state will be right - trigger: function() { - if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) { - this.click(); - return false; - } - }, - - // For cross-browser consistency, don't fire native .click() on links - _default: function( event ) { - return jQuery.nodeName( event.target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Support: Firefox 20+ - // Firefox doesn't alert if the returnValue field is not set. - if ( event.result !== undefined && event.originalEvent ) { - event.originalEvent.returnValue = event.result; - } - } - } - } -}; - -jQuery.removeEvent = function( elem, type, handle ) { - - // This "if" is needed for plain objects - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle ); - } -}; - -jQuery.Event = function( src, props ) { - - // Allow instantiation without the 'new' keyword - if ( !( this instanceof jQuery.Event ) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = src.defaultPrevented || - src.defaultPrevented === undefined && - - // Support: Android<4.0 - src.returnValue === false ? - returnTrue : - returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - constructor: jQuery.Event, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - - if ( e ) { - e.preventDefault(); - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - - if ( e ) { - e.stopPropagation(); - } - }, - stopImmediatePropagation: function() { - var e = this.originalEvent; - - this.isImmediatePropagationStopped = returnTrue; - - if ( e ) { - e.stopImmediatePropagation(); - } - - this.stopPropagation(); - } -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -// so that event delegation works in jQuery. -// Do the same for pointerenter/pointerleave and pointerover/pointerout -// -// Support: Safari 7 only -// Safari sends mouseenter too often; see: -// https://code.google.com/p/chromium/issues/detail?id=470258 -// for the description of the bug (it existed in older Chrome versions as well). -jQuery.each( { - mouseenter: "mouseover", - mouseleave: "mouseout", - pointerenter: "pointerover", - pointerleave: "pointerout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mouseenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -} ); - -jQuery.fn.extend( { - on: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn ); - }, - one: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? - handleObj.origType + "." + handleObj.namespace : - handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each( function() { - jQuery.event.remove( this, types, fn, selector ); - } ); - } -} ); - - -var - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, - - // Support: IE 10-11, Edge 10240+ - // In IE/Edge using regex groups here causes severe slowdowns. - // See https://connect.microsoft.com/IE/feedback/details/1736512/ - rnoInnerhtml = /\s*$/g; - -function manipulationTarget( elem, content ) { - if ( jQuery.nodeName( elem, "table" ) && - jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { - - return elem.getElementsByTagName( "tbody" )[ 0 ] || elem; - } - - return elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - var match = rscriptTypeMasked.exec( elem.type ); - - if ( match ) { - elem.type = match[ 1 ]; - } else { - elem.removeAttribute( "type" ); - } - - return elem; -} - -function cloneCopyEvent( src, dest ) { - var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; - - if ( dest.nodeType !== 1 ) { - return; - } - - // 1. Copy private data: events, handlers, etc. - if ( dataPriv.hasData( src ) ) { - pdataOld = dataPriv.access( src ); - pdataCur = dataPriv.set( dest, pdataOld ); - events = pdataOld.events; - - if ( events ) { - delete pdataCur.handle; - pdataCur.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - } - - // 2. Copy user data - if ( dataUser.hasData( src ) ) { - udataOld = dataUser.access( src ); - udataCur = jQuery.extend( {}, udataOld ); - - dataUser.set( dest, udataCur ); - } -} - -// Fix IE bugs, see support tests -function fixInput( src, dest ) { - var nodeName = dest.nodeName.toLowerCase(); - - // Fails to persist the checked state of a cloned checkbox or radio button. - if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - dest.checked = src.checked; - - // Fails to return the selected option to the default selected state when cloning options - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -function domManip( collection, args, callback, ignored ) { - - // Flatten any nested arrays - args = concat.apply( [], args ); - - var fragment, first, scripts, hasScripts, node, doc, - i = 0, - l = collection.length, - iNoClone = l - 1, - value = args[ 0 ], - isFunction = jQuery.isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( isFunction || - ( l > 1 && typeof value === "string" && - !support.checkClone && rchecked.test( value ) ) ) { - return collection.each( function( index ) { - var self = collection.eq( index ); - if ( isFunction ) { - args[ 0 ] = value.call( this, index, self.html() ); - } - domManip( self, args, callback, ignored ); - } ); - } - - if ( l ) { - fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - // Require either new content or an interest in ignored elements to invoke the callback - if ( first || ignored ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item - // instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - - // Support: Android<4.1, PhantomJS<2 - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( collection[ i ], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !dataPriv.access( node, "globalEval" ) && - jQuery.contains( doc, node ) ) { - - if ( node.src ) { - - // Optional AJAX dependency, but won't run scripts if not present - if ( jQuery._evalUrl ) { - jQuery._evalUrl( node.src ); - } - } else { - jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) ); - } - } - } - } - } - } - - return collection; -} - -function remove( elem, selector, keepData ) { - var node, - nodes = selector ? jQuery.filter( selector, elem ) : elem, - i = 0; - - for ( ; ( node = nodes[ i ] ) != null; i++ ) { - if ( !keepData && node.nodeType === 1 ) { - jQuery.cleanData( getAll( node ) ); - } - - if ( node.parentNode ) { - if ( keepData && jQuery.contains( node.ownerDocument, node ) ) { - setGlobalEval( getAll( node, "script" ) ); - } - node.parentNode.removeChild( node ); - } - } - - return elem; -} - -jQuery.extend( { - htmlPrefilter: function( html ) { - return html.replace( rxhtmlTag, "<$1>" ); - }, - - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var i, l, srcElements, destElements, - clone = elem.cloneNode( true ), - inPage = jQuery.contains( elem.ownerDocument, elem ); - - // Fix IE cloning issues - if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && - !jQuery.isXMLDoc( elem ) ) { - - // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - fixInput( srcElements[ i ], destElements[ i ] ); - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - cloneCopyEvent( srcElements[ i ], destElements[ i ] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - // Return the cloned set - return clone; - }, - - cleanData: function( elems ) { - var data, elem, type, - special = jQuery.event.special, - i = 0; - - for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { - if ( acceptData( elem ) ) { - if ( ( data = elem[ dataPriv.expando ] ) ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Support: Chrome <= 35-45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataPriv.expando ] = undefined; - } - if ( elem[ dataUser.expando ] ) { - - // Support: Chrome <= 35-45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataUser.expando ] = undefined; - } - } - } - } -} ); - -jQuery.fn.extend( { - - // Keep domManip exposed until 3.0 (gh-2225) - domManip: domManip, - - detach: function( selector ) { - return remove( this, selector, true ); - }, - - remove: function( selector ) { - return remove( this, selector ); - }, - - text: function( value ) { - return access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().each( function() { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.textContent = value; - } - } ); - }, null, value, arguments.length ); - }, - - append: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - } ); - }, - - prepend: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - } ); - }, - - before: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - } ); - }, - - after: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - } ); - }, - - empty: function() { - var elem, - i = 0; - - for ( ; ( elem = this[ i ] ) != null; i++ ) { - if ( elem.nodeType === 1 ) { - - // Prevent memory leaks - jQuery.cleanData( getAll( elem, false ) ); - - // Remove any remaining nodes - elem.textContent = ""; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function() { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - } ); - }, - - html: function( value ) { - return access( this, function( value ) { - var elem = this[ 0 ] || {}, - i = 0, - l = this.length; - - if ( value === undefined && elem.nodeType === 1 ) { - return elem.innerHTML; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { - - value = jQuery.htmlPrefilter( value ); - - try { - for ( ; i < l; i++ ) { - elem = this[ i ] || {}; - - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch ( e ) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var ignored = []; - - // Make the changes, replacing each non-ignored context element with the new content - return domManip( this, arguments, function( elem ) { - var parent = this.parentNode; - - if ( jQuery.inArray( this, ignored ) < 0 ) { - jQuery.cleanData( getAll( this ) ); - if ( parent ) { - parent.replaceChild( elem, this ); - } - } - - // Force callback invocation - }, ignored ); - } -} ); - -jQuery.each( { - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1, - i = 0; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone( true ); - jQuery( insert[ i ] )[ original ]( elems ); - - // Support: QtWebKit - // .get() because push.apply(_, arraylike) throws - push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -} ); - - -var iframe, - elemdisplay = { - - // Support: Firefox - // We have to pre-define these values for FF (#10227) - HTML: "block", - BODY: "block" - }; - -/** - * Retrieve the actual display of a element - * @param {String} name nodeName of the element - * @param {Object} doc Document object - */ - -// Called only from within defaultDisplay -function actualDisplay( name, doc ) { - var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), - - display = jQuery.css( elem[ 0 ], "display" ); - - // We don't have any data stored on the element, - // so use "detach" method as fast way to get rid of the element - elem.detach(); - - return display; -} - -/** - * Try to determine the default display value of an element - * @param {String} nodeName - */ -function defaultDisplay( nodeName ) { - var doc = document, - display = elemdisplay[ nodeName ]; - - if ( !display ) { - display = actualDisplay( nodeName, doc ); - - // If the simple way fails, read from inside an iframe - if ( display === "none" || !display ) { - - // Use the already-created iframe if possible - iframe = ( iframe || jQuery( "