diff --git a/.gitignore b/.gitignore index 6ba24cd..6ec8020 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +_site/ bin/ composer.lock composer.phar diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 8f7a03b..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,14 +0,0 @@ -CHANGELOG -========= - -0.1.1 (2013-05-14) ------------------- - -* Updated Guzzle version requirement -* Fixed Composer example in README.md - - -0.1.0 (2013-05-13) ------------------- - -* Initial release diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 5ab7695..0000000 --- a/LICENSE +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. 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 not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the 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 -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..6003f08 --- /dev/null +++ b/_config.yml @@ -0,0 +1,5 @@ +auto: true +pygments: false +lsi: true +markdown: redcarpet +permalink: /title.html diff --git a/README.md b/_includes/README.md similarity index 100% rename from README.md rename to _includes/README.md diff --git a/_layouts/default.html b/_layouts/default.html new file mode 100644 index 0000000..0b78ac5 --- /dev/null +++ b/_layouts/default.html @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + {{ page.title }} + + + +
+
+
+ + + +
+
+ + + {{ content }} +
+ + + + diff --git a/composer.json b/composer.json deleted file mode 100644 index bad733f..0000000 --- a/composer.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "geoip2/geoip2", - "description": "MaxMind GeoIP2 PHP API", - "keywords": [ "geoip", "geolocation", "maxmind" ], - "homepage": "https://github.com/maxmind/GeoIP2-php", - "type": "library", - "license": "LGPL-2.1+", - "authors": [ - { - "name": "Gregory J. Oschwald", - "email": "goschwald@maxmind.com", - "homepage": "http://www.maxmind.com/" - } - ], - "require": { - "guzzle/guzzle": "3.*", - "php": ">=5.3.1" - }, - "require-dev": { - "phpunit/phpunit": "3.7.*", - "satooshi/php-coveralls": "dev-master" - }, - "autoload": { - "psr-0": { "GeoIP2": "src/" } - } -} diff --git a/doc/v0.1.0/404.html b/doc/v0.1.0/404.html new file mode 100644 index 0000000..182ec7d --- /dev/null +++ b/doc/v0.1.0/404.html @@ -0,0 +1,123 @@ + + + + + + + + Page not found + + + + + + + + + + +
+ + + + diff --git a/doc/v0.1.0/class-Exception.html b/doc/v0.1.0/class-Exception.html new file mode 100644 index 0000000..90f27c0 --- /dev/null +++ b/doc/v0.1.0/class-Exception.html @@ -0,0 +1,506 @@ + + + + + + + Class Exception + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/class-GeoIP2.Exception.GeoIP2Exception.html b/doc/v0.1.0/class-GeoIP2.Exception.GeoIP2Exception.html new file mode 100644 index 0000000..02c005e --- /dev/null +++ b/doc/v0.1.0/class-GeoIP2.Exception.GeoIP2Exception.html @@ -0,0 +1,194 @@ + + + + + + + Class GeoIP2\Exception\GeoIP2Exception + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/class-GeoIP2.Exception.HttpException.html b/doc/v0.1.0/class-GeoIP2.Exception.HttpException.html new file mode 100644 index 0000000..a55c65f --- /dev/null +++ b/doc/v0.1.0/class-GeoIP2.Exception.HttpException.html @@ -0,0 +1,260 @@ + + + + + + + Class GeoIP2\Exception\HttpException + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/class-GeoIP2.Exception.WebServiceException.html b/doc/v0.1.0/class-GeoIP2.Exception.WebServiceException.html new file mode 100644 index 0000000..52463a4 --- /dev/null +++ b/doc/v0.1.0/class-GeoIP2.Exception.WebServiceException.html @@ -0,0 +1,271 @@ + + + + + + + Class GeoIP2\Exception\WebServiceException + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/class-GeoIP2.Model.City.html b/doc/v0.1.0/class-GeoIP2.Model.City.html new file mode 100644 index 0000000..a9f7211 --- /dev/null +++ b/doc/v0.1.0/class-GeoIP2.Model.City.html @@ -0,0 +1,459 @@ + + + + + + + Class GeoIP2\Model\City + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/class-GeoIP2.Model.CityIspOrg.html b/doc/v0.1.0/class-GeoIP2.Model.CityIspOrg.html new file mode 100644 index 0000000..75f5586 --- /dev/null +++ b/doc/v0.1.0/class-GeoIP2.Model.CityIspOrg.html @@ -0,0 +1,462 @@ + + + + + + + Class GeoIP2\Model\CityIspOrg + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/class-GeoIP2.Model.Country.html b/doc/v0.1.0/class-GeoIP2.Model.Country.html new file mode 100644 index 0000000..2269869 --- /dev/null +++ b/doc/v0.1.0/class-GeoIP2.Model.Country.html @@ -0,0 +1,330 @@ + + + + + + + Class GeoIP2\Model\Country + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/class-GeoIP2.Model.Omni.html b/doc/v0.1.0/class-GeoIP2.Model.Omni.html new file mode 100644 index 0000000..ffee962 --- /dev/null +++ b/doc/v0.1.0/class-GeoIP2.Model.Omni.html @@ -0,0 +1,465 @@ + + + + + + + Class GeoIP2\Model\Omni + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/class-GeoIP2.Record.AbstractPlaceRecord.html b/doc/v0.1.0/class-GeoIP2.Record.AbstractPlaceRecord.html new file mode 100644 index 0000000..dcd9bc1 --- /dev/null +++ b/doc/v0.1.0/class-GeoIP2.Record.AbstractPlaceRecord.html @@ -0,0 +1,173 @@ + + + + + + + Class GeoIP2\Record\AbstractPlaceRecord + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/class-GeoIP2.Record.AbstractRecord.html b/doc/v0.1.0/class-GeoIP2.Record.AbstractRecord.html new file mode 100644 index 0000000..60c38cf --- /dev/null +++ b/doc/v0.1.0/class-GeoIP2.Record.AbstractRecord.html @@ -0,0 +1,164 @@ + + + + + + + Class GeoIP2\Record\AbstractRecord + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/class-GeoIP2.Record.City.html b/doc/v0.1.0/class-GeoIP2.Record.City.html new file mode 100644 index 0000000..6b604de --- /dev/null +++ b/doc/v0.1.0/class-GeoIP2.Record.City.html @@ -0,0 +1,292 @@ + + + + + + + Class GeoIP2\Record\City + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/class-GeoIP2.Record.Continent.html b/doc/v0.1.0/class-GeoIP2.Record.Continent.html new file mode 100644 index 0000000..c1b1e6d --- /dev/null +++ b/doc/v0.1.0/class-GeoIP2.Record.Continent.html @@ -0,0 +1,291 @@ + + + + + + + Class GeoIP2\Record\Continent + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/class-GeoIP2.Record.Country.html b/doc/v0.1.0/class-GeoIP2.Record.Country.html new file mode 100644 index 0000000..baadaf5 --- /dev/null +++ b/doc/v0.1.0/class-GeoIP2.Record.Country.html @@ -0,0 +1,323 @@ + + + + + + + Class GeoIP2\Record\Country + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/class-GeoIP2.Record.Location.html b/doc/v0.1.0/class-GeoIP2.Record.Location.html new file mode 100644 index 0000000..b02d261 --- /dev/null +++ b/doc/v0.1.0/class-GeoIP2.Record.Location.html @@ -0,0 +1,317 @@ + + + + + + + Class GeoIP2\Record\Location + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/class-GeoIP2.Record.MaxMind.html b/doc/v0.1.0/class-GeoIP2.Record.MaxMind.html new file mode 100644 index 0000000..a58bcc2 --- /dev/null +++ b/doc/v0.1.0/class-GeoIP2.Record.MaxMind.html @@ -0,0 +1,200 @@ + + + + + + + Class GeoIP2\Record\MaxMind + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/class-GeoIP2.Record.Postal.html b/doc/v0.1.0/class-GeoIP2.Record.Postal.html new file mode 100644 index 0000000..85eec28 --- /dev/null +++ b/doc/v0.1.0/class-GeoIP2.Record.Postal.html @@ -0,0 +1,231 @@ + + + + + + + Class GeoIP2\Record\Postal + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/class-GeoIP2.Record.RepresentedCountry.html b/doc/v0.1.0/class-GeoIP2.Record.RepresentedCountry.html new file mode 100644 index 0000000..abe29dc --- /dev/null +++ b/doc/v0.1.0/class-GeoIP2.Record.RepresentedCountry.html @@ -0,0 +1,362 @@ + + + + + + + Class GeoIP2\Record\RepresentedCountry + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/class-GeoIP2.Record.Subdivision.html b/doc/v0.1.0/class-GeoIP2.Record.Subdivision.html new file mode 100644 index 0000000..6b629ca --- /dev/null +++ b/doc/v0.1.0/class-GeoIP2.Record.Subdivision.html @@ -0,0 +1,324 @@ + + + + + + + Class GeoIP2\Record\Subdivision + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/class-GeoIP2.Record.Traits.html b/doc/v0.1.0/class-GeoIP2.Record.Traits.html new file mode 100644 index 0000000..bd237ae --- /dev/null +++ b/doc/v0.1.0/class-GeoIP2.Record.Traits.html @@ -0,0 +1,500 @@ + + + + + + + Class GeoIP2\Record\Traits + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/class-GeoIP2.WebService.Client.html b/doc/v0.1.0/class-GeoIP2.WebService.Client.html new file mode 100644 index 0000000..4ee5639 --- /dev/null +++ b/doc/v0.1.0/class-GeoIP2.WebService.Client.html @@ -0,0 +1,436 @@ + + + + + + + Class GeoIP2\WebService\Client + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/elementlist.js b/doc/v0.1.0/elementlist.js new file mode 100644 index 0000000..7a54ea2 --- /dev/null +++ b/doc/v0.1.0/elementlist.js @@ -0,0 +1,3 @@ + +var ApiGen = ApiGen || {}; +ApiGen.elements = [["c","Exception"],["c","GeoIP2\\Exception\\GeoIP2Exception"],["c","GeoIP2\\Exception\\HttpException"],["c","GeoIP2\\Exception\\WebServiceException"],["c","GeoIP2\\Model\\City"],["c","GeoIP2\\Model\\CityIspOrg"],["c","GeoIP2\\Model\\Country"],["c","GeoIP2\\Model\\Omni"],["c","GeoIP2\\Record\\AbstractPlaceRecord"],["c","GeoIP2\\Record\\AbstractRecord"],["c","GeoIP2\\Record\\City"],["c","GeoIP2\\Record\\Continent"],["c","GeoIP2\\Record\\Country"],["c","GeoIP2\\Record\\Location"],["c","GeoIP2\\Record\\MaxMind"],["c","GeoIP2\\Record\\Postal"],["c","GeoIP2\\Record\\RepresentedCountry"],["c","GeoIP2\\Record\\Subdivision"],["c","GeoIP2\\Record\\Traits"],["c","GeoIP2\\WebService\\Client"]]; diff --git a/doc/v0.1.0/index.html b/doc/v0.1.0/index.html new file mode 100644 index 0000000..34fdb03 --- /dev/null +++ b/doc/v0.1.0/index.html @@ -0,0 +1,142 @@ + + + + + + + Overview + + + + + + + + + + +
+ + + + diff --git a/doc/v0.1.0/namespace-GeoIP2.Exception.html b/doc/v0.1.0/namespace-GeoIP2.Exception.html new file mode 100644 index 0000000..593aa0e --- /dev/null +++ b/doc/v0.1.0/namespace-GeoIP2.Exception.html @@ -0,0 +1,123 @@ + + + + + + + Namespace GeoIP2\Exception + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/namespace-GeoIP2.Model.html b/doc/v0.1.0/namespace-GeoIP2.Model.html new file mode 100644 index 0000000..0e8c561 --- /dev/null +++ b/doc/v0.1.0/namespace-GeoIP2.Model.html @@ -0,0 +1,129 @@ + + + + + + + Namespace GeoIP2\Model + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/namespace-GeoIP2.Record.html b/doc/v0.1.0/namespace-GeoIP2.Record.html new file mode 100644 index 0000000..a600cd8 --- /dev/null +++ b/doc/v0.1.0/namespace-GeoIP2.Record.html @@ -0,0 +1,162 @@ + + + + + + + Namespace GeoIP2\Record + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/namespace-GeoIP2.WebService.html b/doc/v0.1.0/namespace-GeoIP2.WebService.html new file mode 100644 index 0000000..c472372 --- /dev/null +++ b/doc/v0.1.0/namespace-GeoIP2.WebService.html @@ -0,0 +1,115 @@ + + + + + + + Namespace GeoIP2\WebService + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/namespace-GeoIP2.html b/doc/v0.1.0/namespace-GeoIP2.html new file mode 100644 index 0000000..41db657 --- /dev/null +++ b/doc/v0.1.0/namespace-GeoIP2.html @@ -0,0 +1,115 @@ + + + + + + + Namespace GeoIP2 + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/namespace-PHP.html b/doc/v0.1.0/namespace-PHP.html new file mode 100644 index 0000000..a2f83fd --- /dev/null +++ b/doc/v0.1.0/namespace-PHP.html @@ -0,0 +1,112 @@ + + + + + + + Namespace PHP + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/resources/collapsed.png b/doc/v0.1.0/resources/collapsed.png new file mode 100644 index 0000000..56e7323 Binary files /dev/null and b/doc/v0.1.0/resources/collapsed.png differ diff --git a/doc/v0.1.0/resources/combined.js b/doc/v0.1.0/resources/combined.js new file mode 100644 index 0000000..5bfe66b --- /dev/null +++ b/doc/v0.1.0/resources/combined.js @@ -0,0 +1,1264 @@ + +var ApiGen = ApiGen || {}; +ApiGen.config = {"require":{"min":"2.8.0"},"resources":{"resources":"resources"},"templates":{"common":{"overview.latte":"index.html","combined.js.latte":"resources\/combined.js","elementlist.js.latte":"elementlist.js","404.latte":"404.html"},"optional":{"sitemap":{"filename":"sitemap.xml","template":"sitemap.xml.latte"},"opensearch":{"filename":"opensearch.xml","template":"opensearch.xml.latte"},"robots":{"filename":"robots.txt","template":"robots.txt.latte"}},"main":{"package":{"filename":"package-%s.html","template":"package.latte"},"namespace":{"filename":"namespace-%s.html","template":"namespace.latte"},"class":{"filename":"class-%s.html","template":"class.latte"},"constant":{"filename":"constant-%s.html","template":"constant.latte"},"function":{"filename":"function-%s.html","template":"function.latte"},"source":{"filename":"source-%s.html","template":"source.latte"},"tree":{"filename":"tree.html","template":"tree.latte"},"deprecated":{"filename":"deprecated.html","template":"deprecated.latte"},"todo":{"filename":"todo.html","template":"todo.latte"}}},"options":{"elementDetailsCollapsed":true,"elementsOrder":"natural"},"config":"\/usr\/share\/php\/data\/ApiGen\/templates\/default\/config.neon"}; + + +/*! jQuery v1.7 jquery.com | jquery.org/license */ +(function(a,b){function cA(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cx(a){if(!cm[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cn||(cn=c.createElement("iframe"),cn.frameBorder=cn.width=cn.height=0),b.appendChild(cn);if(!co||!cn.createElement)co=(cn.contentWindow||cn.contentDocument).document,co.write((c.compatMode==="CSS1Compat"?"":"")+""),co.close();d=co.createElement(a),co.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cn)}cm[a]=e}return cm[a]}function cw(a,b){var c={};f.each(cs.concat.apply([],cs.slice(0,b)),function(){c[this]=a});return c}function cv(){ct=b}function cu(){setTimeout(cv,0);return ct=f.now()}function cl(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ck(){try{return new a.XMLHttpRequest}catch(b){}}function ce(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bB(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function br(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bi,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bq(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bp(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bp)}function bp(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bo(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bn(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bm(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(){return!0}function M(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.add(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;B.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return a!=null&&m.test(a)&&!isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,unknownElems:!!a.getElementsByTagName("nav").length,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",enctype:!!c.createElement("form").enctype,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.lastChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-999px",top:"-999px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
t
",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;f(function(){var a,b,d,e,g,h,i=1,j="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",l="visibility:hidden;border:0;",n="style='"+j+"border:5px solid #000;padding:0;'",p="
"+""+"
";m=c.getElementsByTagName("body")[0];!m||(a=c.createElement("div"),a.style.cssText=l+"width:0;height:0;position:static;top:0;margin-top:"+i+"px",m.insertBefore(a,m.firstChild),o=c.createElement("div"),o.style.cssText=j+l,o.innerHTML=p,a.appendChild(o),b=o.firstChild,d=b.firstChild,g=b.nextSibling.firstChild.firstChild,h={doesNotAddBorder:d.offsetTop!==5,doesAddBorderForTableAndCells:g.offsetTop===5},d.style.position="fixed",d.style.top="20px",h.fixedPosition=d.offsetTop===20||d.offsetTop===15,d.style.position=d.style.top="",b.style.overflow="hidden",b.style.position="relative",h.subtractsBorderForOverflowNotVisible=d.offsetTop===-5,h.doesNotIncludeMarginInBodyOffset=m.offsetTop!==i,m.removeChild(a),o=a=null,f.extend(k,h))}),o.innerHTML="",n.removeChild(o),o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[f.expando]:a[f.expando]&&f.expando,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[f.expando]=n=++f.uuid:n=f.expando),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[f.expando]:f.expando;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)?b=b:b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" "));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];if(!arguments.length){if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}return b}e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!a||j===3||j===8||j===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g},removeAttr:function(a,b){var c,d,e,g,h=0;if(a.nodeType===1){d=(b||"").split(p),g=d.length;for(;h=0}})});var z=/\.(.*)$/,A=/^(?:textarea|input|select)$/i,B=/\./g,C=/ /g,D=/[^\w\s.|`]/g,E=/^([^\.]*)?(?:\.(.+))?$/,F=/\bhover(\.\S+)?/,G=/^key/,H=/^(?:mouse|contextmenu)|click/,I=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,J=function(a){var b=I.exec(a);b&& +(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},K=function(a,b){return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||a.id===b[2])&&(!b[3]||b[3].test(a.className))},L=function(a){return f.event.special.hover?a:a.replace(F,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=L(c).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"",(g||!e)&&c.preventDefault();if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,n=null;for(m=e.parentNode;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l=0:t===b&&(t=o[s]=r.quick?K(m,r.quick):f(m).is(s)),t&&q.push(r);q.length&&j.push({elem:m,matches:q})}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),G.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),H.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var Y="abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",Z=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,_=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,ba=/<([\w:]+)/,bb=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bk=X(c);bj.optgroup=bj.option,bj.tbody=bj.tfoot=bj.colgroup=bj.caption=bj.thead,bj.th=bj.td,f.support.htmlSerialize||(bj._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after" +,arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Z,""):null;if(typeof a=="string"&&!bd.test(a)&&(f.support.leadingWhitespace||!$.test(a))&&!bj[(ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(_,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bn(a,d),e=bo(a),g=bo(d);for(h=0;e[h];++h)g[h]&&bn(e[h],g[h])}if(b){bm(a,d);if(c){e=bo(a),g=bo(d);for(h=0;e[h];++h)bm(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!bc.test(k))k=b.createTextNode(k);else{k=k.replace(_,"<$1>");var l=(ba.exec(k)||["",""])[1].toLowerCase(),m=bj[l]||bj._default,n=m[0],o=b.createElement("div");b===c?bk.appendChild(o):X(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=bb.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&$.test(k)&&o.insertBefore(b.createTextNode($.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bt.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bs,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bs.test(g)?g.replace(bs,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bB(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bC=function(a,c){var d,e,g;c=c.replace(bu,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bD=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bv.test(f)&&bw.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bB=bC||bD,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bF=/%20/g,bG=/\[\]$/,bH=/\r?\n/g,bI=/#.*$/,bJ=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bK=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bL=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bM=/^(?:GET|HEAD)$/,bN=/^\/\//,bO=/\?/,bP=/)<[^<]*)*<\/script>/gi,bQ=/^(?:select|textarea)/i,bR=/\s+/,bS=/([?&])_=[^&]*/,bT=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bU=f.fn.load,bV={},bW={},bX,bY,bZ=["*/"]+["*"];try{bX=e.href}catch(b$){bX=c.createElement("a"),bX.href="",bX=bX.href}bY=bT.exec(bX.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bU)return bU.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bP,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bQ.test(this.nodeName)||bK.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bH,"\r\n")}}):{name:b.name,value:c.replace(bH,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?cb(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),cb(a,b);return a},ajaxSettings:{url:bX,isLocal:bL.test(bY[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bZ},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:b_(bV),ajaxTransport:b_(bW),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cd(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=ce(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bJ.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bI,"").replace(bN,bY[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bR),d.crossDomain==null&&(r=bT.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bY[1]&&r[2]==bY[2]&&(r[3]||(r[1]==="http:"?80:443))==(bY[3]||(bY[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),ca(bV,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bM.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bO.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bS,"$1_="+x);d.url=y+(y===d.url?(bO.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bZ+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=ca(bW,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){s<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)cc(g,a[g],c,e);return d.join("&").replace(bF,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cf=f.now(),cg=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cf++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cg.test(b.url)||e&&cg.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cg,l),b.url===j&&(e&&(k=k.replace(cg,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ch=a.ActiveXObject?function(){for(var a in cj)cj[a](0,1)}:!1,ci=0,cj;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ck()||cl()}:ck,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ch&&delete cj[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++ci,ch&&(cj||(cj={},f(a).unload(ch)),cj[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cm={},cn,co,cp=/^(?:toggle|show|hide)$/,cq=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cr,cs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],ct;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cw("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cz.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cz.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cA(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cA(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); +/** + * Cookie plugin + * + * Copyright (c) 2006 Klaus Hartl (stilbuero.de) + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + */ + +/** + * Create a cookie with the given name and value and other optional parameters. + * + * @example $.cookie('the_cookie', 'the_value'); + * @desc Set the value of a cookie. + * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true }); + * @desc Create a cookie with all available options. + * @example $.cookie('the_cookie', 'the_value'); + * @desc Create a session cookie. + * @example $.cookie('the_cookie', null); + * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain + * used when the cookie was set. + * + * @param String name The name of the cookie. + * @param String value The value of the cookie. + * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. + * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. + * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. + * If set to null or omitted, the cookie will be a session cookie and will not be retained + * when the the browser exits. + * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). + * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). + * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will + * require a secure protocol (like HTTPS). + * @type undefined + * + * @name $.cookie + * @cat Plugins/Cookie + * @author Klaus Hartl/klaus.hartl@stilbuero.de + */ + +/** + * Get the value of a cookie with the given name. + * + * @example $.cookie('the_cookie'); + * @desc Get the value of a cookie. + * + * @param String name The name of the cookie. + * @return The value of the cookie. + * @type String + * + * @name $.cookie + * @cat Plugins/Cookie + * @author Klaus Hartl/klaus.hartl@stilbuero.de + */ +jQuery.cookie = function(name, value, options) { + if (typeof value != 'undefined') { // name and value given, set cookie + options = options || {}; + if (value === null) { + value = ''; + options.expires = -1; + } + var expires = ''; + if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { + var date; + if (typeof options.expires == 'number') { + date = new Date(); + date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); + } else { + date = options.expires; + } + expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE + } + // CAUTION: Needed to parenthesize options.path and options.domain + // in the following expressions, otherwise they evaluate to undefined + // in the packed version for some reason... + var path = options.path ? '; path=' + (options.path) : ''; + var domain = options.domain ? '; domain=' + (options.domain) : ''; + var secure = options.secure ? '; secure' : ''; + document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); + } else { // only name given, get cookie + var cookieValue = null; + if (document.cookie && document.cookie != '') { + var cookies = document.cookie.split(';'); + for (var i = 0; i < cookies.length; i++) { + var cookie = jQuery.trim(cookies[i]); + // Does this cookie string begin with the name we want? + if (cookie.substring(0, name.length + 1) == (name + '=')) { + cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); + break; + } + } + } + return cookieValue; + } +}; +/*! + * sprintf and vsprintf for jQuery + * somewhat based on http://jan.moesen.nu/code/javascript/sprintf-and-printf-in-javascript/ + * Copyright (c) 2008 Sabin Iacob (m0n5t3r) + * @license http://www.gnu.org/licenses/gpl.html + * @project jquery.sprintf + */ +(function(d){var a={b:function(e){return parseInt(e,10).toString(2)},c:function(e){return String.fromCharCode(parseInt(e,10))},d:function(e){return parseInt(e,10)},u:function(e){return Math.abs(e)},f:function(f,e){e=parseInt(e,10);f=parseFloat(f);if(isNaN(e&&f)){return NaN}return e&&f.toFixed(e)||f},o:function(e){return parseInt(e,10).toString(8)},s:function(e){return e},x:function(e){return(""+parseInt(e,10).toString(16)).toLowerCase()},X:function(e){return(""+parseInt(e,10).toString(16)).toUpperCase()}};var c=/%(?:(\d+)?(?:\.(\d+))?|\(([^)]+)\))([%bcdufosxX])/g;var b=function(f){if(f.length==1&&typeof f[0]=="object"){f=f[0];return function(i,h,k,j,g,m,l){return a[g](f[j])}}else{var e=0;return function(i,h,k,j,g,m,l){if(g=="%"){return"%"}return a[g](f[e++],k)}}};d.extend({sprintf:function(f){var e=Array.apply(null,arguments).slice(1);return f.replace(c,b(e))},vsprintf:function(f,e){return f.replace(c,b(e))}})})(jQuery); + +/*! + * jQuery Autocomplete plugin 1.1 + * + * Copyright (c) 2009 Jörn Zaefferer + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * Revision: $Id: jquery.autocomplete.js 15 2009-08-22 10:30:27Z joern.zaefferer $ + */ + +;(function($) { + +$.fn.extend({ + autocomplete: function(urlOrData, options) { + var isUrl = typeof urlOrData == "string"; + options = $.extend({}, $.Autocompleter.defaults, { + url: isUrl ? urlOrData : null, + data: isUrl ? null : urlOrData, + delay: isUrl ? $.Autocompleter.defaults.delay : 10, + max: options && !options.scroll ? 10 : 150 + }, options); + + // if highlight is set to false, replace it with a do-nothing function + options.highlight = options.highlight || function(value) { return value; }; + + // if the formatMatch option is not specified, then use formatItem for backwards compatibility + options.formatMatch = options.formatMatch || options.formatItem; + + options.show = options.show || function(list) {}; + + return this.each(function() { + new $.Autocompleter(this, options); + }); + }, + result: function(handler) { + return this.bind("result", handler); + }, + search: function(handler) { + return this.trigger("search", [handler]); + }, + flushCache: function() { + return this.trigger("flushCache"); + }, + setOptions: function(options){ + return this.trigger("setOptions", [options]); + }, + unautocomplete: function() { + return this.trigger("unautocomplete"); + } +}); + +$.Autocompleter = function(input, options) { + + var KEY = { + UP: 38, + DOWN: 40, + DEL: 46, + TAB: 9, + RETURN: 13, + ESC: 27, + COMMA: 188, + PAGEUP: 33, + PAGEDOWN: 34, + BACKSPACE: 8 + }; + + // Create $ object for input element + var $input = $(input).attr("autocomplete", "off").addClass(options.inputClass); + + var timeout; + var previousValue = ""; + var cache = $.Autocompleter.Cache(options); + var hasFocus = 0; + var lastKeyPressCode; + var config = { + mouseDownOnSelect: false + }; + var select = $.Autocompleter.Select(options, input, selectCurrent, config); + + // only opera doesn't trigger keydown multiple times while pressed, others don't work with keypress at all + $input.bind(($.browser.opera ? "keypress" : "keydown") + ".autocomplete", function(event) { + // a keypress means the input has focus + // avoids issue where input had focus before the autocomplete was applied + hasFocus = 1; + // track last key pressed + lastKeyPressCode = event.keyCode; + switch(event.keyCode) { + + case KEY.UP: + event.preventDefault(); + if ( select.visible() ) { + select.prev(); + } else { + onChange(0, true); + } + break; + + case KEY.DOWN: + event.preventDefault(); + if ( select.visible() ) { + select.next(); + } else { + onChange(0, true); + } + break; + + case KEY.PAGEUP: + event.preventDefault(); + if ( select.visible() ) { + select.pageUp(); + } else { + onChange(0, true); + } + break; + + case KEY.PAGEDOWN: + event.preventDefault(); + if ( select.visible() ) { + select.pageDown(); + } else { + onChange(0, true); + } + break; + + // matches also semicolon + case options.multiple && $.trim(options.multipleSeparator) == "," && KEY.COMMA: + case KEY.TAB: + case KEY.RETURN: + if( selectCurrent() ) { + //event.preventDefault(); + //return false; + } + break; + + case KEY.ESC: + select.hide(); + break; + + default: + clearTimeout(timeout); + timeout = setTimeout(onChange, options.delay); + break; + } + }).focus(function(){ + // track whether the field has focus, we shouldn't process any + // results if the field no longer has focus + hasFocus++; + }).blur(function() { + hasFocus = 0; + if (!config.mouseDownOnSelect) { + hideResults(); + } + }).click(function() { + // show select when clicking in a focused field + if ( hasFocus++ > 1 && !select.visible() ) { + onChange(0, true); + } + }).bind("search", function() { + // TODO why not just specifying both arguments? + var fn = (arguments.length > 1) ? arguments[1] : null; + function findValueCallback(q, data) { + var result; + if( data && data.length ) { + for (var i=0; i < data.length; i++) { + if( data[i].result.toLowerCase() == q.toLowerCase() ) { + result = data[i]; + break; + } + } + } + if( typeof fn == "function" ) fn(result); + else $input.trigger("result", result && [result.data, result.value]); + } + $.each(trimWords($input.val()), function(i, value) { + request(value, findValueCallback, findValueCallback); + }); + }).bind("flushCache", function() { + cache.flush(); + }).bind("setOptions", function() { + $.extend(options, arguments[1]); + // if we've updated the data, repopulate + if ( "data" in arguments[1] ) + cache.populate(); + }).bind("unautocomplete", function() { + select.unbind(); + $input.unbind(); + $(input.form).unbind(".autocomplete"); + }); + + + function selectCurrent() { + var selected = select.selected(); + if( !selected ) + return false; + + var v = selected.result; + previousValue = v; + + if ( options.multiple ) { + var words = trimWords($input.val()); + if ( words.length > 1 ) { + var seperator = options.multipleSeparator.length; + var cursorAt = $(input).selection().start; + var wordAt, progress = 0; + $.each(words, function(i, word) { + progress += word.length; + if (cursorAt <= progress) { + wordAt = i; + return false; + } + progress += seperator; + }); + words[wordAt] = v; + // TODO this should set the cursor to the right position, but it gets overriden somewhere + //$.Autocompleter.Selection(input, progress + seperator, progress + seperator); + v = words.join( options.multipleSeparator ); + } + v += options.multipleSeparator; + } + + $input.val(v); + hideResultsNow(); + $input.trigger("result", [selected.data, selected.value]); + return true; + } + + function onChange(crap, skipPrevCheck) { + if( lastKeyPressCode == KEY.DEL ) { + select.hide(); + return; + } + + var currentValue = $input.val(); + + if ( !skipPrevCheck && currentValue == previousValue ) + return; + + previousValue = currentValue; + + currentValue = lastWord(currentValue); + if ( currentValue.length >= options.minChars) { + $input.addClass(options.loadingClass); + if (!options.matchCase) + currentValue = currentValue.toLowerCase(); + request(currentValue, receiveData, hideResultsNow); + } else { + stopLoading(); + select.hide(); + } + }; + + function trimWords(value) { + if (!value) + return [""]; + if (!options.multiple) + return [$.trim(value)]; + return $.map(value.split(options.multipleSeparator), function(word) { + return $.trim(value).length ? $.trim(word) : null; + }); + } + + function lastWord(value) { + if ( !options.multiple ) + return value; + var words = trimWords(value); + if (words.length == 1) + return words[0]; + var cursorAt = $(input).selection().start; + if (cursorAt == value.length) { + words = trimWords(value) + } else { + words = trimWords(value.replace(value.substring(cursorAt), "")); + } + return words[words.length - 1]; + } + + // fills in the input box w/the first match (assumed to be the best match) + // q: the term entered + // sValue: the first matching result + function autoFill(q, sValue){ + // autofill in the complete box w/the first match as long as the user hasn't entered in more data + // if the last user key pressed was backspace, don't autofill + if( options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastKeyPressCode != KEY.BACKSPACE ) { + // fill in the value (keep the case the user has typed) + $input.val($input.val() + sValue.substring(lastWord(previousValue).length)); + // select the portion of the value not typed by the user (so the next character will erase) + $(input).selection(previousValue.length, previousValue.length + sValue.length); + } + }; + + function hideResults() { + clearTimeout(timeout); + timeout = setTimeout(hideResultsNow, 200); + }; + + function hideResultsNow() { + var wasVisible = select.visible(); + select.hide(); + clearTimeout(timeout); + stopLoading(); + if (options.mustMatch) { + // call search and run callback + $input.search( + function (result){ + // if no value found, clear the input box + if( !result ) { + if (options.multiple) { + var words = trimWords($input.val()).slice(0, -1); + $input.val( words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator : "") ); + } + else { + $input.val( "" ); + $input.trigger("result", null); + } + } + } + ); + } + }; + + function receiveData(q, data) { + if ( data && data.length && hasFocus ) { + stopLoading(); + select.display(data, q); + autoFill(q, data[0].value); + select.show(); + } else { + hideResultsNow(); + } + }; + + function request(term, success, failure) { + if (!options.matchCase) + term = term.toLowerCase(); + var data = cache.load(term); + // recieve the cached data + if (data && data.length) { + success(term, data); + // if an AJAX url has been supplied, try loading the data now + } else if( (typeof options.url == "string") && (options.url.length > 0) ){ + + var extraParams = { + timestamp: +new Date() + }; + $.each(options.extraParams, function(key, param) { + extraParams[key] = typeof param == "function" ? param() : param; + }); + + $.ajax({ + // try to leverage ajaxQueue plugin to abort previous requests + mode: "abort", + // limit abortion to this input + port: "autocomplete" + input.name, + dataType: options.dataType, + url: options.url, + data: $.extend({ + q: lastWord(term), + limit: options.max + }, extraParams), + success: function(data) { + var parsed = options.parse && options.parse(data) || parse(data); + cache.add(term, parsed); + success(term, parsed); + } + }); + } else { + // if we have a failure, we need to empty the list -- this prevents the the [TAB] key from selecting the last successful match + select.emptyList(); + failure(term); + } + }; + + function parse(data) { + var parsed = []; + var rows = data.split("\n"); + for (var i=0; i < rows.length; i++) { + var row = $.trim(rows[i]); + if (row) { + row = row.split("|"); + parsed[parsed.length] = { + data: row, + value: row[0], + result: options.formatResult && options.formatResult(row, row[0]) || row[0] + }; + } + } + return parsed; + }; + + function stopLoading() { + $input.removeClass(options.loadingClass); + }; + +}; + +$.Autocompleter.defaults = { + inputClass: "ac_input", + resultsClass: "ac_results", + loadingClass: "ac_loading", + minChars: 1, + delay: 400, + matchCase: false, + matchSubset: true, + matchContains: false, + cacheLength: 10, + max: 100, + mustMatch: false, + extraParams: {}, + selectFirst: true, + formatItem: function(row) { return row[0]; }, + formatMatch: null, + autoFill: false, + width: 0, + multiple: false, + multipleSeparator: ", ", + highlight: function(value, term) { + return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "$1"); + }, + scroll: true, + scrollHeight: 180 +}; + +$.Autocompleter.Cache = function(options) { + + var data = {}; + var length = 0; + + function matchSubset(s, sub) { + if (!options.matchCase) + s = s.toLowerCase(); + var i = s.indexOf(sub); + if (options.matchContains == "word"){ + i = s.toLowerCase().search("\\b" + sub.toLowerCase()); + } + if (i == -1) return false; + return i == 0 || options.matchContains; + }; + + function add(q, value) { + if (length > options.cacheLength){ + flush(); + } + if (!data[q]){ + length++; + } + data[q] = value; + } + + function populate(){ + if( !options.data ) return false; + // track the matches + var stMatchSets = {}, + nullData = 0; + + // no url was specified, we need to adjust the cache length to make sure it fits the local data store + if( !options.url ) options.cacheLength = 1; + + // track all options for minChars = 0 + stMatchSets[""] = []; + + // loop through the array and create a lookup structure + for ( var i = 0, ol = options.data.length; i < ol; i++ ) { + var rawValue = options.data[i]; + // if rawValue is a string, make an array otherwise just reference the array + rawValue = (typeof rawValue == "string") ? [rawValue] : rawValue; + + var value = options.formatMatch(rawValue, i+1, options.data.length); + if ( value === false ) + continue; + + var firstChar = value.charAt(0).toLowerCase(); + // if no lookup array for this character exists, look it up now + if( !stMatchSets[firstChar] ) + stMatchSets[firstChar] = []; + + // if the match is a string + var row = { + value: value, + data: rawValue, + result: options.formatResult && options.formatResult(rawValue) || value + }; + + // push the current match into the set list + stMatchSets[firstChar].push(row); + + // keep track of minChars zero items + if ( nullData++ < options.max ) { + stMatchSets[""].push(row); + } + }; + + // add the data items to the cache + $.each(stMatchSets, function(i, value) { + // increase the cache size + options.cacheLength++; + // add to the cache + add(i, value); + }); + } + + // populate any existing data + setTimeout(populate, 25); + + function flush(){ + data = {}; + length = 0; + } + + return { + flush: flush, + add: add, + populate: populate, + load: function(q) { + if (!options.cacheLength || !length) + return null; + /* + * if dealing w/local data and matchContains than we must make sure + * to loop through all the data collections looking for matches + */ + if( !options.url && options.matchContains ){ + // track all matches + var csub = []; + // loop through all the data grids for matches + for( var k in data ){ + // don't search through the stMatchSets[""] (minChars: 0) cache + // this prevents duplicates + if( k.length > 0 ){ + var c = data[k]; + $.each(c, function(i, x) { + // if we've got a match, add it to the array + if (matchSubset(x.value, q)) { + csub.push(x); + } + }); + } + } + return csub; + } else + // if the exact item exists, use it + if (data[q]){ + return data[q]; + } else + if (options.matchSubset) { + for (var i = q.length - 1; i >= options.minChars; i--) { + var c = data[q.substr(0, i)]; + if (c) { + var csub = []; + $.each(c, function(i, x) { + if (matchSubset(x.value, q)) { + csub[csub.length] = x; + } + }); + return csub; + } + } + } + return null; + } + }; +}; + +$.Autocompleter.Select = function (options, input, select, config) { + var CLASSES = { + ACTIVE: "ac_over" + }; + + var listItems, + active = -1, + data, + term = "", + needsInit = true, + element, + list; + + // Create results + function init() { + if (!needsInit) + return; + element = $("
") + .hide() + .addClass(options.resultsClass) + .css("position", "absolute") + .appendTo(document.body); + + list = $("
    ").appendTo(element).mouseover( function(event) { + if(target(event).nodeName && target(event).nodeName.toUpperCase() == 'LI') { + active = $("li", list).removeClass(CLASSES.ACTIVE).index(target(event)); + $(target(event)).addClass(CLASSES.ACTIVE); + } + }).click(function(event) { + $(target(event)).addClass(CLASSES.ACTIVE); + select(); + // TODO provide option to avoid setting focus again after selection? useful for cleanup-on-focus + input.focus(); + return false; + }).mousedown(function() { + config.mouseDownOnSelect = true; + }).mouseup(function() { + config.mouseDownOnSelect = false; + }); + + if( options.width > 0 ) + element.css("width", options.width); + + needsInit = false; + } + + function target(event) { + var element = event.target; + while(element && element.tagName != "LI") + element = element.parentNode; + // more fun with IE, sometimes event.target is empty, just ignore it then + if(!element) + return []; + return element; + } + + function moveSelect(step) { + listItems.slice(active, active + 1).removeClass(CLASSES.ACTIVE); + movePosition(step); + var activeItem = listItems.slice(active, active + 1).addClass(CLASSES.ACTIVE); + if(options.scroll) { + var offset = 0; + listItems.slice(0, active).each(function() { + offset += this.offsetHeight; + }); + if((offset + activeItem[0].offsetHeight - list.scrollTop()) > list[0].clientHeight) { + list.scrollTop(offset + activeItem[0].offsetHeight - list.innerHeight()); + } else if(offset < list.scrollTop()) { + list.scrollTop(offset); + } + } + }; + + function movePosition(step) { + active += step; + if (active < 0) { + active = listItems.size() - 1; + } else if (active >= listItems.size()) { + active = 0; + } + } + + function limitNumberOfItems(available) { + return options.max && options.max < available + ? options.max + : available; + } + + function fillList() { + list.empty(); + var max = limitNumberOfItems(data.length); + for (var i=0; i < max; i++) { + if (!data[i]) + continue; + var formatted = options.formatItem(data[i].data, i+1, max, data[i].value, term); + if ( formatted === false ) + continue; + var li = $("
  • ").html( options.highlight(formatted, term) ).addClass(i%2 == 0 ? "ac_even" : "ac_odd").appendTo(list)[0]; + $.data(li, "ac_data", data[i]); + } + listItems = list.find("li"); + if ( options.selectFirst ) { + listItems.slice(0, 1).addClass(CLASSES.ACTIVE); + active = 0; + } + // apply bgiframe if available + if ( $.fn.bgiframe ) + list.bgiframe(); + } + + return { + display: function(d, q) { + init(); + data = d; + term = q; + fillList(); + }, + next: function() { + moveSelect(1); + }, + prev: function() { + moveSelect(-1); + }, + pageUp: function() { + if (active != 0 && active - 8 < 0) { + moveSelect( -active ); + } else { + moveSelect(-8); + } + }, + pageDown: function() { + if (active != listItems.size() - 1 && active + 8 > listItems.size()) { + moveSelect( listItems.size() - 1 - active ); + } else { + moveSelect(8); + } + }, + hide: function() { + element && element.hide(); + listItems && listItems.removeClass(CLASSES.ACTIVE); + active = -1; + }, + visible : function() { + return element && element.is(":visible"); + }, + current: function() { + return this.visible() && (listItems.filter("." + CLASSES.ACTIVE)[0] || options.selectFirst && listItems[0]); + }, + show: function() { + var offset = $(input).offset(); + element.css({ + width: typeof options.width == "string" || options.width > 0 ? options.width : $(input).innerWidth(), + top: offset.top + input.offsetHeight, + left: offset.left + }).show(); + options.show(element); + if(options.scroll) { + list.scrollTop(0); + list.css({ + maxHeight: options.scrollHeight, + overflow: 'auto' + }); + + if($.browser.msie && typeof document.body.style.maxHeight === "undefined") { + var listHeight = 0; + listItems.each(function() { + listHeight += this.offsetHeight; + }); + var scrollbarsVisible = listHeight > options.scrollHeight; + list.css('height', scrollbarsVisible ? options.scrollHeight : listHeight ); + if (!scrollbarsVisible) { + // IE doesn't recalculate width when scrollbar disappears + listItems.width( list.width() - parseInt(listItems.css("padding-left")) - parseInt(listItems.css("padding-right")) ); + } + } + + } + }, + selected: function() { + var selected = listItems && listItems.filter("." + CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE); + return selected && selected.length && $.data(selected[0], "ac_data"); + }, + emptyList: function (){ + list && list.empty(); + }, + unbind: function() { + element && element.remove(); + } + }; +}; + +$.fn.selection = function(start, end) { + if (start !== undefined) { + return this.each(function() { + if( this.createTextRange ){ + var selRange = this.createTextRange(); + if (end === undefined || start == end) { + selRange.move("character", start); + selRange.select(); + } else { + selRange.collapse(true); + selRange.moveStart("character", start); + selRange.moveEnd("character", end); + selRange.select(); + } + } else if( this.setSelectionRange ){ + this.setSelectionRange(start, end); + } else if( this.selectionStart ){ + this.selectionStart = start; + this.selectionEnd = end; + } + }); + } + var field = this[0]; + if ( field.createTextRange ) { + var range = document.selection.createRange(), + orig = field.value, + teststring = "<->", + textLength = range.text.length; + range.text = teststring; + var caretAt = field.value.indexOf(teststring); + field.value = orig; + this.selection(caretAt, caretAt + textLength); + return { + start: caretAt, + end: caretAt + textLength + } + } else if( field.selectionStart !== undefined ){ + return { + start: field.selectionStart, + end: field.selectionEnd + } + } +}; + +})(jQuery); +/** + * jQuery.fn.sortElements + * -------------- + * @author James Padolsey (http://james.padolsey.com) + * @version 0.11 + * @updated 18-MAR-2010 + * -------------- + * @param Function comparator: + * Exactly the same behaviour as [1,2,3].sort(comparator) + * + * @param Function getSortable + * A function that should return the element that is + * to be sorted. The comparator will run on the + * current collection, but you may want the actual + * resulting sort to occur on a parent or another + * associated element. + * + * E.g. $('td').sortElements(comparator, function(){ + * return this.parentNode; + * }) + * + * The
) will be sorted instead + * of the ",""],legend:[1,"
","
"],thead:[1,"
's parent (
itself. + */ +jQuery.fn.sortElements = (function(){ + + var sort = [].sort; + + return function(comparator, getSortable) { + + getSortable = getSortable || function(){return this;}; + + var placements = this.map(function(){ + + var sortElement = getSortable.call(this), + parentNode = sortElement.parentNode, + + // Since the element itself will change position, we have + // to have some way of storing it's original position in + // the DOM. The easiest way is to have a 'flag' node: + nextSibling = parentNode.insertBefore( + document.createTextNode(''), + sortElement.nextSibling + ); + + return function() { + + if (parentNode === this) { + throw new Error( + "You can't sort elements if any one is a descendant of another." + ); + } + + // Insert before flag: + parentNode.insertBefore(this, nextSibling); + // Remove flag: + parentNode.removeChild(nextSibling); + + }; + + }); + + return sort.call(this, comparator).each(function(i){ + placements[i].call(getSortable.call(this)); + }); + + }; + +})(); +/*! + * ApiGen 2.8.0 - API documentation generator for PHP 5.3+ + * + * Copyright (c) 2010-2011 David Grudl (http://davidgrudl.com) + * Copyright (c) 2011-2012 Jaroslav Hanslík (https://github.com/kukulich) + * Copyright (c) 2011-2012 Ondřej Nešpor (https://github.com/Andrewsville) + * + * For the full copyright and license information, please view + * the file LICENSE.md that was distributed with this source code. + */ + +$(function() { + var $document = $(document); + var $left = $('#left'); + var $right = $('#right'); + var $rightInner = $('#rightInner'); + var $splitter = $('#splitter'); + var $groups = $('#groups'); + var $content = $('#content'); + + // Menu + + // Hide deep packages and namespaces + $('ul span', $groups).click(function(event) { + event.preventDefault(); + event.stopPropagation(); + $(this) + .toggleClass('collapsed') + .parent() + .next('ul') + .toggleClass('collapsed'); + }).click(); + + $active = $('ul li.active', $groups); + if ($active.length > 0) { + // Open active + $('> a > span', $active).click(); + } else { + $main = $('> ul > li.main', $groups); + if ($main.length > 0) { + // Open first level of the main project + $('> a > span', $main).click(); + } else { + // Open first level of all + $('> ul > li > a > span', $groups).click(); + } + } + + // Content + + // Search autocompletion + var autocompleteFound = false; + var autocompleteFiles = {'c': 'class', 'co': 'constant', 'f': 'function', 'm': 'class', 'mm': 'class', 'p': 'class', 'mp': 'class', 'cc': 'class'}; + var $search = $('#search input[name=q]'); + $search + .autocomplete(ApiGen.elements, { + matchContains: true, + scrollHeight: 200, + max: 20, + formatItem: function(data) { + return data[1].replace(/^(.+\\)(.+)$/, '$1$2'); + }, + formatMatch: function(data) { + return data[1]; + }, + formatResult: function(data) { + return data[1]; + }, + show: function($list) { + var $items = $('li span', $list); + var maxWidth = Math.max.apply(null, $items.map(function() { + return $(this).width(); + })); + // 10px padding + $list + .width(Math.max(maxWidth + 10, $search.innerWidth())) + .css('left', $search.offset().left + $search.outerWidth() - $list.outerWidth()); + } + }).result(function(event, data) { + autocompleteFound = true; + var location = window.location.href.split('/'); + location.pop(); + var parts = data[1].split(/::|$/); + var file = $.sprintf(ApiGen.config.templates.main[autocompleteFiles[data[0]]].filename, parts[0].replace(/[^\w]/g, '.')); + if (parts[1]) { + file += '#' + ('mm' === data[0] || 'mp' === data[0] ? 'm' : '') + parts[1].replace(/([\w]+)\(\)/, '_$1'); + } + location.push(file); + window.location = location.join('/'); + + // Workaround for Opera bug + $(this).closest('form').attr('action', location.join('/')); + }).closest('form') + .submit(function() { + var query = $search.val(); + if ('' === query) { + return false; + } + + var label = $('#search input[name=more]').val(); + if (!autocompleteFound && label && -1 === query.indexOf('more:')) { + $search.val(query + ' more:' + label); + } + + return !autocompleteFound && '' !== $('#search input[name=cx]').val(); + }); + + // Save natural order + $('table.summary tr[data-order]', $content).each(function(index) { + do { + index = '0' + index; + } while (index.length < 3); + $(this).attr('data-order-natural', index); + }); + + // Switch between natural and alphabetical order + var $caption = $('table.summary', $content) + .filter(':has(tr[data-order])') + .find('caption'); + $caption + .click(function() { + var $this = $(this); + var order = $this.data('order') || 'natural'; + order = 'natural' === order ? 'alphabetical' : 'natural'; + $this.data('order', order); + $.cookie('order', order, {expires: 365}); + var attr = 'alphabetical' === order ? 'data-order' : 'data-order-natural'; + $this + .closest('table') + .find('tr').sortElements(function(a, b) { + return $(a).attr(attr) > $(b).attr(attr) ? 1 : -1; + }); + return false; + }) + .addClass('switchable') + .attr('title', 'Switch between natural and alphabetical order'); + if ((null === $.cookie('order') && 'alphabetical' === ApiGen.config.options.elementsOrder) || 'alphabetical' === $.cookie('order')) { + $caption.click(); + } + + // Open details + if (ApiGen.config.options.elementDetailsCollapsed) { + $('tr', $content).filter(':has(.detailed)') + .click(function() { + var $this = $(this); + $('.short', $this).hide(); + $('.detailed', $this).show(); + }); + } + + // Splitter + var splitterWidth = $splitter.width(); + function setSplitterPosition(position) + { + $left.width(position); + $right.css('margin-left', position + splitterWidth); + $splitter.css('left', position); + } + function setNavigationPosition() + { + var width = $rightInner.width(); + $rightInner + .toggleClass('medium', width <= 960) + .toggleClass('small', width <= 650); + } + $splitter.mousedown(function() { + $splitter.addClass('active'); + + $document.mousemove(function(event) { + if (event.pageX >= 230 && $document.width() - event.pageX >= 600 + splitterWidth) { + setSplitterPosition(event.pageX); + setNavigationPosition(); + } + }); + + $() + .add($splitter) + .add($document) + .mouseup(function() { + $splitter + .removeClass('active') + .unbind('mouseup'); + $document + .unbind('mousemove') + .unbind('mouseup'); + + $.cookie('splitter', parseInt($splitter.css('left')), {expires: 365}); + }); + + return false; + }); + var splitterPosition = $.cookie('splitter'); + if (null !== splitterPosition) { + setSplitterPosition(parseInt(splitterPosition)); + } + setNavigationPosition(); + $(window).resize(setNavigationPosition); + + // Select selected lines + var matches = window.location.hash.substr(1).match(/^\d+(?:-\d+)?(?:,\d+(?:-\d+)?)*$/); + if (null !== matches) { + var lists = matches[0].split(','); + for (var i = 0; i < lists.length; i++) { + var lines = lists[i].split('-'); + lines[1] = lines[1] || lines[0]; + for (var j = lines[0]; j <= lines[1]; j++) { + $('#' + j).addClass('selected'); + } + } + + var $firstLine = $('#' + parseInt(matches[0])); + if ($firstLine.length > 0) { + $right.scrollTop($firstLine.offset().top); + } + } + + // Save selected lines + var lastLine; + $('a.l').click(function(event) { + event.preventDefault(); + + var $selectedLine = $(this).parent(); + var selectedLine = parseInt($selectedLine.attr('id')); + + if (event.shiftKey) { + if (lastLine) { + for (var i = Math.min(selectedLine, lastLine); i <= Math.max(selectedLine, lastLine); i++) { + $('#' + i).addClass('selected'); + } + } else { + $selectedLine.addClass('selected'); + } + } else if (event.ctrlKey) { + $selectedLine.toggleClass('selected'); + } else { + var $selected = $('.l.selected') + .not($selectedLine) + .removeClass('selected'); + if ($selected.length > 0) { + $selectedLine.addClass('selected'); + } else { + $selectedLine.toggleClass('selected'); + } + } + + lastLine = $selectedLine.hasClass('selected') ? selectedLine : null; + + // Update hash + var lines = $('.l.selected') + .map(function() { + return parseInt($(this).attr('id')); + }) + .get() + .sort(function(a, b) { + return a - b; + }); + + var hash = []; + var list = []; + for (var j = 0; j < lines.length; j++) { + if (0 === j && j + 1 === lines.length) { + hash.push(lines[j]); + } else if (0 === j) { + list[0] = lines[j]; + } else if (lines[j - 1] + 1 !== lines[j] && j + 1 === lines.length) { + hash.push(list.join('-')); + hash.push(lines[j]); + } else if (lines[j - 1] + 1 !== lines[j]) { + hash.push(list.join('-')); + list = [lines[j]]; + } else if (j + 1 === lines.length) { + list[1] = lines[j]; + hash.push(list.join('-')); + } else { + list[1] = lines[j]; + } + } + + window.location.hash = hash.join(','); + }); +}); + diff --git a/doc/v0.1.0/resources/footer.png b/doc/v0.1.0/resources/footer.png new file mode 100644 index 0000000..51f4a7f Binary files /dev/null and b/doc/v0.1.0/resources/footer.png differ diff --git a/doc/v0.1.0/resources/inherit.png b/doc/v0.1.0/resources/inherit.png new file mode 100644 index 0000000..957079b Binary files /dev/null and b/doc/v0.1.0/resources/inherit.png differ diff --git a/doc/v0.1.0/resources/resize.png b/doc/v0.1.0/resources/resize.png new file mode 100644 index 0000000..fb98a7a Binary files /dev/null and b/doc/v0.1.0/resources/resize.png differ diff --git a/doc/v0.1.0/resources/sort.png b/doc/v0.1.0/resources/sort.png new file mode 100644 index 0000000..0d0fea1 Binary files /dev/null and b/doc/v0.1.0/resources/sort.png differ diff --git a/doc/v0.1.0/resources/style.css b/doc/v0.1.0/resources/style.css new file mode 100644 index 0000000..f361474 --- /dev/null +++ b/doc/v0.1.0/resources/style.css @@ -0,0 +1,608 @@ +/*! + * ApiGen 2.8.0 - API documentation generator for PHP 5.3+ + * + * Copyright (c) 2010-2011 David Grudl (http://davidgrudl.com) + * Copyright (c) 2011-2012 Jaroslav Hanslík (https://github.com/kukulich) + * Copyright (c) 2011-2012 Ondřej Nešpor (https://github.com/Andrewsville) + * + * For the full copyright and license information, please view + * the file LICENSE.md that was distributed with this source code. + */ + +body { + font: 13px/1.5 Verdana, 'Geneva CE', lucida, sans-serif; + margin: 0; + padding: 0; + background: #ffffff; + color: #333333; +} + +h1, h2, h3, h4, caption { + font-family: 'Trebuchet MS', 'Geneva CE', lucida, sans-serif; + color: #053368; +} + +h1 { + color: #1e5eb6; + font-size: 230%; + font-weight: normal; + margin: .3em 0; +} + +h2 { + color: #1e5eb6; + font-size: 150%; + font-weight: normal; + margin: -.3em 0 .3em 0; +} + +h3 { + font-size: 1.6em; + font-weight: normal; + margin-bottom: 2px; +} + +h4 { + font-size: 100%; + font-weight: bold; + padding: 0; + margin: 0; +} + +caption { + border: 1px solid #cccccc; + background: #ecede5; + font-weight: bold; + font-size: 1.2em; + padding: 3px 5px; + text-align: left; + margin-bottom: 0; +} + +p { + margin: .7em 0 1em; + padding: 0; +} + +hr { + margin: 2em 0 1em; + border: none; + border-top: 1px solid #cccccc; + height: 0; +} + +a { + color: #006aeb; + padding: 3px 1px; + text-decoration: none; +} + +h1 a { + color: #1e5eb6; +} + +a:hover, a:active, a:focus, a:hover b, a:hover var { + background-color: #006aeb; + color: #ffffff !important; +} + +code, var, pre { + font-family: monospace; +} + +var { + font-weight: bold; + font-style: normal; + color: #ca8a04; +} + +pre { + margin: 0; +} + +code a b { + color: #000000; +} + +.deprecated { + text-decoration: line-through; +} + +.invalid { + color: #e71818; +} + +.hidden { + display: none; +} + +/* Left side */ +#left { + overflow: auto; + width: 270px; + height: 100%; + position: fixed; +} + +/* Menu */ +#menu { + padding: 10px; +} + +#menu ul { + list-style: none; + padding: 0; + margin: 0; +} + +#menu ul ul { + padding-left: 10px; +} + +#menu li { + white-space: nowrap; + position: relative; +} + +#menu a { + display: block; + padding: 0 2px; +} + +#menu .active > a, #menu > span { + color: #333333; + background: none; + font-weight: bold; +} + +#menu .active > a.invalid { + color: #e71818; +} + +#menu .active > a:hover, #menu .active > a:active, #menu .active > a:focus { + background-color: #006aeb; +} + +#menu #groups span { + position: absolute; + top: 4px; + right: 2px; + cursor: pointer; + display: block; + width: 12px; + height: 12px; + background: url('collapsed.png') transparent 0 0 no-repeat; +} + +#menu #groups span:hover { + background-position: -12px 0; +} + +#menu #groups span.collapsed { + background-position: 0 -12px; +} + +#menu #groups span.collapsed:hover { + background-position: -12px -12px; +} + +#menu #groups ul.collapsed { + display: none; +} + +/* Right side */ +#right { + overflow: auto; + margin-left: 275px; + height: 100%; + position: fixed; + left: 0; + right: 0; +} + +#rightInner { + max-width: 1000px; + min-width: 350px; +} + +/* Search */ +#search { + float: right; + margin: 3px 8px; +} + +#search input.text { + padding: 3px 5px; + width: 250px; +} + +/* Autocomplete */ +.ac_results { + padding: 0; + border: 1px solid #cccccc; + background-color: #ffffff; + overflow: hidden; + z-index: 99999; +} + +.ac_results ul { + width: 100%; + list-style-position: outside; + list-style: none; + padding: 0; + margin: 0; +} + +.ac_results li { + margin: 0; + padding: 2px 5px; + cursor: default; + display: block; + font: 12px 'Trebuchet MS', 'Geneva CE', lucida, sans-serif; + line-height: 16px; + overflow: hidden; + white-space: nowrap; +} + +.ac_results li strong { + color: #000000; +} + +.ac_odd { + background-color: #eeeeee; +} + +.ac_over { + background-color: #006aeb; + color: #ffffff; +} + +.ac_results li.ac_over strong { + color: #ffffff; +} + +/* Navigation */ +#navigation { + padding: 3px 8px; + background-color: #f6f6f4; + height: 26px; +} + +#navigation ul { + list-style: none; + margin: 0 8px 4px 0; + padding: 0; + overflow: hidden; + float: left; +} + +#navigation ul + ul { + border-left: 1px solid #000000; + padding-left: 8px; +} + +#navigation ul li { + float: left; + margin: 2px; + padding: 0 3px; + font-family: Verdana, 'Geneva CE', lucida, sans-serif; + color: #808080; +} + +#navigation ul li.active { + background-color: #053368; + color: #ffffff; + font-weight: bold; +} + +#navigation ul li a { + color: #000000; + font-weight: bold; + padding: 0; +} + +#navigation ul li span { + float: left; + padding: 0 3px; +} + +#navigation ul li a:hover span, #navigation ul li a:active span, #navigation ul li a:focus span { + background-color: #006aeb; +} + +/* Content */ +#content { + clear: both; + padding: 5px 15px; +} + +.description pre { + padding: .6em; + background: #fcfcf7; +} + +#content > .description { + background: #ecede5; + padding: 1px 8px; + margin: 1.2em 0; +} + +#content > .description pre { + margin: .5em 0; +} + +dl.tree { + margin: 1.2em 0; +} + +dl.tree dd { + margin: 0; + padding: 0; +} + +.info { + margin: 1.2em 0; +} + +.summary { + border: 1px solid #cccccc; + border-collapse: collapse; + font-size: 1em; + width: 100%; + margin: 1.2em 0 2.4em; +} + +.summary caption { + border-width: 1px 1px 0; +} + +.summary caption.switchable { + background: #ecede5 url('sort.png') no-repeat center right; + cursor: pointer; +} + +.summary td { + border: 1px solid #cccccc; + margin: 0; + padding: 3px 10px; + font-size: 1em; + vertical-align: top; +} + +.summary td:first-child { + text-align: right; +} + +#packages.summary td:first-child, #namespaces.summary td:first-child, .inherited.summary td:first-child, .used.summary td:first-child { + text-align: left; +} + +.summary tr:hover td { + background: #f6f6f4; +} + +.summary .description pre { + border: .5em solid #ecede5; +} + +.summary .description p { + margin: 0; +} + +.summary .description p + p, .summary .description ul { + margin: 3px 0 0 0; +} + +.summary .description.detailed h4 { + margin-top: 3px; +} + +.summary dl { + margin: 0; +} + +.summary dd { + margin: 0 0 0 25px; +} + +.name, .attributes { + white-space: nowrap; +} + +.value { + white-space: pre-wrap; +} + +td.name, td.attributes { + width: 1%; +} + +.class #methods .name { + width: auto; + white-space: normal; +} + +.class #methods .name > div > code { + white-space: pre-wrap; +} + +.class #methods .name > div > code span, .function .value > code { + white-space: nowrap; +} + +.class #methods td.name > div, .class td.description > div { + position: relative; + padding-right: 1em; +} + +.anchor { + position: absolute; + top: 0; + right: 0; + line-height: 1; + font-size: 85%; + margin: 0; + color: #006aeb !important; +} + +.list { + margin: 0 0 5px 25px; +} + +div.invalid { + background-color: #fae4e0; + padding: 10px; +} + +/* Splitter */ +#splitter { + position: fixed; + height: 100%; + width: 5px; + left: 270px; + background: #1e5eb6 url('resize.png') left center no-repeat; + cursor: e-resize; +} + +#splitter.active { + opacity: .5; +} + +/* Footer */ +#footer { + border-top: 1px solid #e9eeef; + clear: both; + color: #a7a7a7; + font-size: 8pt; + text-align: center; + padding: 20px 0 0; + margin: 3em 0 0; + height: 90px; + background: #ffffff url('footer.png') no-repeat center top; +} + +/* Tree */ +div.tree ul { + list-style: none; + background: url('tree-vertical.png') left repeat-y; + padding: 0; + margin-left: 20px; +} + +div.tree li { + margin: 0; + padding: 0; +} + +div.tree div { + padding-left: 30px; +} + +div.tree div.notlast { + background: url('tree-hasnext.png') left 10px no-repeat; +} + +div.tree div.last { + background: url('tree-last.png') left -240px no-repeat; +} + +div.tree li.last { + background: url('tree-cleaner.png') left center repeat-y; +} + +div.tree span.padding { + padding-left: 15px; +} + +/* Source code */ +.php-keyword1 { + color: #e71818; + font-weight: bold; +} + +.php-keyword2 { + font-weight: bold; +} + +.php-var { + color: #d59401; + font-weight: bold; +} + +.php-num { + color: #cd0673; +} + +.php-quote { + color: #008000; +} + +.php-comment { + color: #929292; +} + +.xlang { + color: #ff0000; + font-weight: bold; +} + +span.l { + display: block; +} + +span.l.selected { + background: #f6f6f4; +} + +span.l a { + color: #333333; +} + +span.l a:hover, div.l a:active, div.l a:focus { + background: transparent; + color: #333333 !important; +} + +span.l .php-var a { + color: #d59401; +} + +span.l .php-var a:hover, span.l .php-var a:active, span.l .php-var a:focus { + color: #d59401 !important; +} + +span.l a.l { + padding-left: 2px; + color: #c0c0c0; +} + +span.l a.l:hover, span.l a.l:active, span.l a.l:focus { + background: transparent; + color: #c0c0c0 !important; +} + +#rightInner.medium #navigation { + height: 52px; +} + +#rightInner.medium #navigation ul:first-child + ul { + clear: left; + border: none; + padding: 0; +} + +#rightInner.medium .name, #rightInner.medium .attributes { + white-space: normal; +} + +#rightInner.small #search { + float: left; +} + +#rightInner.small #navigation { + height: 78px; +} + +#rightInner.small #navigation ul:first-child { + clear: both; +} diff --git a/doc/v0.1.0/resources/tree-cleaner.png b/doc/v0.1.0/resources/tree-cleaner.png new file mode 100644 index 0000000..2eb9085 Binary files /dev/null and b/doc/v0.1.0/resources/tree-cleaner.png differ diff --git a/doc/v0.1.0/resources/tree-hasnext.png b/doc/v0.1.0/resources/tree-hasnext.png new file mode 100644 index 0000000..91d6b79 Binary files /dev/null and b/doc/v0.1.0/resources/tree-hasnext.png differ diff --git a/doc/v0.1.0/resources/tree-last.png b/doc/v0.1.0/resources/tree-last.png new file mode 100644 index 0000000..7f319f8 Binary files /dev/null and b/doc/v0.1.0/resources/tree-last.png differ diff --git a/doc/v0.1.0/resources/tree-vertical.png b/doc/v0.1.0/resources/tree-vertical.png new file mode 100644 index 0000000..384908b Binary files /dev/null and b/doc/v0.1.0/resources/tree-vertical.png differ diff --git a/doc/v0.1.0/source-class-GeoIP2.Exception.GeoIP2Exception.html b/doc/v0.1.0/source-class-GeoIP2.Exception.GeoIP2Exception.html new file mode 100644 index 0000000..c2d1105 --- /dev/null +++ b/doc/v0.1.0/source-class-GeoIP2.Exception.GeoIP2Exception.html @@ -0,0 +1,110 @@ + + + + + + + + File GeoIP2/Exception/GeoIP2Exception.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/source-class-GeoIP2.Exception.HttpException.html b/doc/v0.1.0/source-class-GeoIP2.Exception.HttpException.html new file mode 100644 index 0000000..38de9ac --- /dev/null +++ b/doc/v0.1.0/source-class-GeoIP2.Exception.HttpException.html @@ -0,0 +1,125 @@ + + + + + + + + File GeoIP2/Exception/HttpException.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/source-class-GeoIP2.Exception.WebServiceException.html b/doc/v0.1.0/source-class-GeoIP2.Exception.WebServiceException.html new file mode 100644 index 0000000..5d16199 --- /dev/null +++ b/doc/v0.1.0/source-class-GeoIP2.Exception.WebServiceException.html @@ -0,0 +1,126 @@ + + + + + + + + File GeoIP2/Exception/WebServiceException.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/source-class-GeoIP2.Model.City.html b/doc/v0.1.0/source-class-GeoIP2.Model.City.html new file mode 100644 index 0000000..1f103f2 --- /dev/null +++ b/doc/v0.1.0/source-class-GeoIP2.Model.City.html @@ -0,0 +1,221 @@ + + + + + + + + File GeoIP2/Model/City.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/source-class-GeoIP2.Model.CityIspOrg.html b/doc/v0.1.0/source-class-GeoIP2.Model.CityIspOrg.html new file mode 100644 index 0000000..416fe01 --- /dev/null +++ b/doc/v0.1.0/source-class-GeoIP2.Model.CityIspOrg.html @@ -0,0 +1,158 @@ + + + + + + + + File GeoIP2/Model/CityIspOrg.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/source-class-GeoIP2.Model.Country.html b/doc/v0.1.0/source-class-GeoIP2.Model.Country.html new file mode 100644 index 0000000..461b1dd --- /dev/null +++ b/doc/v0.1.0/source-class-GeoIP2.Model.Country.html @@ -0,0 +1,196 @@ + + + + + + + + File GeoIP2/Model/Country.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/source-class-GeoIP2.Model.Omni.html b/doc/v0.1.0/source-class-GeoIP2.Model.Omni.html new file mode 100644 index 0000000..78ed9f1 --- /dev/null +++ b/doc/v0.1.0/source-class-GeoIP2.Model.Omni.html @@ -0,0 +1,158 @@ + + + + + + + + File GeoIP2/Model/Omni.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/source-class-GeoIP2.Record.AbstractPlaceRecord.html b/doc/v0.1.0/source-class-GeoIP2.Record.AbstractPlaceRecord.html new file mode 100644 index 0000000..df57266 --- /dev/null +++ b/doc/v0.1.0/source-class-GeoIP2.Record.AbstractPlaceRecord.html @@ -0,0 +1,146 @@ + + + + + + + + File GeoIP2/Record/AbstractPlaceRecord.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/source-class-GeoIP2.Record.AbstractRecord.html b/doc/v0.1.0/source-class-GeoIP2.Record.AbstractRecord.html new file mode 100644 index 0000000..ffb2528 --- /dev/null +++ b/doc/v0.1.0/source-class-GeoIP2.Record.AbstractRecord.html @@ -0,0 +1,142 @@ + + + + + + + + File GeoIP2/Record/AbstractRecord.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/source-class-GeoIP2.Record.City.html b/doc/v0.1.0/source-class-GeoIP2.Record.City.html new file mode 100644 index 0000000..098708a --- /dev/null +++ b/doc/v0.1.0/source-class-GeoIP2.Record.City.html @@ -0,0 +1,137 @@ + + + + + + + + File GeoIP2/Record/City.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/source-class-GeoIP2.Record.Continent.html b/doc/v0.1.0/source-class-GeoIP2.Record.Continent.html new file mode 100644 index 0000000..12e6958 --- /dev/null +++ b/doc/v0.1.0/source-class-GeoIP2.Record.Continent.html @@ -0,0 +1,141 @@ + + + + + + + + File GeoIP2/Record/Continent.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/source-class-GeoIP2.Record.Country.html b/doc/v0.1.0/source-class-GeoIP2.Record.Country.html new file mode 100644 index 0000000..90ee118 --- /dev/null +++ b/doc/v0.1.0/source-class-GeoIP2.Record.Country.html @@ -0,0 +1,146 @@ + + + + + + + + File GeoIP2/Record/Country.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/source-class-GeoIP2.Record.Location.html b/doc/v0.1.0/source-class-GeoIP2.Record.Location.html new file mode 100644 index 0000000..ae66bfe --- /dev/null +++ b/doc/v0.1.0/source-class-GeoIP2.Record.Location.html @@ -0,0 +1,156 @@ + + + + + + + + File GeoIP2/Record/Location.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/source-class-GeoIP2.Record.MaxMind.html b/doc/v0.1.0/source-class-GeoIP2.Record.MaxMind.html new file mode 100644 index 0000000..52e5180 --- /dev/null +++ b/doc/v0.1.0/source-class-GeoIP2.Record.MaxMind.html @@ -0,0 +1,127 @@ + + + + + + + + File GeoIP2/Record/MaxMind.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/source-class-GeoIP2.Record.Postal.html b/doc/v0.1.0/source-class-GeoIP2.Record.Postal.html new file mode 100644 index 0000000..88d1430 --- /dev/null +++ b/doc/v0.1.0/source-class-GeoIP2.Record.Postal.html @@ -0,0 +1,133 @@ + + + + + + + + File GeoIP2/Record/Postal.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/source-class-GeoIP2.Record.RepresentedCountry.html b/doc/v0.1.0/source-class-GeoIP2.Record.RepresentedCountry.html new file mode 100644 index 0000000..411b580 --- /dev/null +++ b/doc/v0.1.0/source-class-GeoIP2.Record.RepresentedCountry.html @@ -0,0 +1,153 @@ + + + + + + + + File GeoIP2/Record/RepresentedCountry.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/source-class-GeoIP2.Record.Subdivision.html b/doc/v0.1.0/source-class-GeoIP2.Record.Subdivision.html new file mode 100644 index 0000000..e1b6cac --- /dev/null +++ b/doc/v0.1.0/source-class-GeoIP2.Record.Subdivision.html @@ -0,0 +1,150 @@ + + + + + + + + File GeoIP2/Record/Subdivision.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/source-class-GeoIP2.Record.Traits.html b/doc/v0.1.0/source-class-GeoIP2.Record.Traits.html new file mode 100644 index 0000000..c6b5eff --- /dev/null +++ b/doc/v0.1.0/source-class-GeoIP2.Record.Traits.html @@ -0,0 +1,195 @@ + + + + + + + + File GeoIP2/Record/Traits.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/source-class-GeoIP2.WebService.Client.html b/doc/v0.1.0/source-class-GeoIP2.WebService.Client.html new file mode 100644 index 0000000..010873a --- /dev/null +++ b/doc/v0.1.0/source-class-GeoIP2.WebService.Client.html @@ -0,0 +1,410 @@ + + + + + + + + File GeoIP2/WebService/Client.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.0/tree.html b/doc/v0.1.0/tree.html new file mode 100644 index 0000000..92a9d05 --- /dev/null +++ b/doc/v0.1.0/tree.html @@ -0,0 +1,274 @@ + + + + + + + Tree + + + + + + + + + + +
+ + + + diff --git a/doc/v0.1.1/404.html b/doc/v0.1.1/404.html new file mode 100644 index 0000000..182ec7d --- /dev/null +++ b/doc/v0.1.1/404.html @@ -0,0 +1,123 @@ + + + + + + + + Page not found + + + + + + + + + + +
+ + + + diff --git a/doc/v0.1.1/class-Exception.html b/doc/v0.1.1/class-Exception.html new file mode 100644 index 0000000..90f27c0 --- /dev/null +++ b/doc/v0.1.1/class-Exception.html @@ -0,0 +1,506 @@ + + + + + + + Class Exception + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/class-GeoIP2.Exception.GeoIP2Exception.html b/doc/v0.1.1/class-GeoIP2.Exception.GeoIP2Exception.html new file mode 100644 index 0000000..02c005e --- /dev/null +++ b/doc/v0.1.1/class-GeoIP2.Exception.GeoIP2Exception.html @@ -0,0 +1,194 @@ + + + + + + + Class GeoIP2\Exception\GeoIP2Exception + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/class-GeoIP2.Exception.HttpException.html b/doc/v0.1.1/class-GeoIP2.Exception.HttpException.html new file mode 100644 index 0000000..a55c65f --- /dev/null +++ b/doc/v0.1.1/class-GeoIP2.Exception.HttpException.html @@ -0,0 +1,260 @@ + + + + + + + Class GeoIP2\Exception\HttpException + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/class-GeoIP2.Exception.WebServiceException.html b/doc/v0.1.1/class-GeoIP2.Exception.WebServiceException.html new file mode 100644 index 0000000..52463a4 --- /dev/null +++ b/doc/v0.1.1/class-GeoIP2.Exception.WebServiceException.html @@ -0,0 +1,271 @@ + + + + + + + Class GeoIP2\Exception\WebServiceException + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/class-GeoIP2.Model.City.html b/doc/v0.1.1/class-GeoIP2.Model.City.html new file mode 100644 index 0000000..a9f7211 --- /dev/null +++ b/doc/v0.1.1/class-GeoIP2.Model.City.html @@ -0,0 +1,459 @@ + + + + + + + Class GeoIP2\Model\City + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/class-GeoIP2.Model.CityIspOrg.html b/doc/v0.1.1/class-GeoIP2.Model.CityIspOrg.html new file mode 100644 index 0000000..75f5586 --- /dev/null +++ b/doc/v0.1.1/class-GeoIP2.Model.CityIspOrg.html @@ -0,0 +1,462 @@ + + + + + + + Class GeoIP2\Model\CityIspOrg + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/class-GeoIP2.Model.Country.html b/doc/v0.1.1/class-GeoIP2.Model.Country.html new file mode 100644 index 0000000..2269869 --- /dev/null +++ b/doc/v0.1.1/class-GeoIP2.Model.Country.html @@ -0,0 +1,330 @@ + + + + + + + Class GeoIP2\Model\Country + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/class-GeoIP2.Model.Omni.html b/doc/v0.1.1/class-GeoIP2.Model.Omni.html new file mode 100644 index 0000000..ffee962 --- /dev/null +++ b/doc/v0.1.1/class-GeoIP2.Model.Omni.html @@ -0,0 +1,465 @@ + + + + + + + Class GeoIP2\Model\Omni + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/class-GeoIP2.Record.AbstractPlaceRecord.html b/doc/v0.1.1/class-GeoIP2.Record.AbstractPlaceRecord.html new file mode 100644 index 0000000..dcd9bc1 --- /dev/null +++ b/doc/v0.1.1/class-GeoIP2.Record.AbstractPlaceRecord.html @@ -0,0 +1,173 @@ + + + + + + + Class GeoIP2\Record\AbstractPlaceRecord + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/class-GeoIP2.Record.AbstractRecord.html b/doc/v0.1.1/class-GeoIP2.Record.AbstractRecord.html new file mode 100644 index 0000000..60c38cf --- /dev/null +++ b/doc/v0.1.1/class-GeoIP2.Record.AbstractRecord.html @@ -0,0 +1,164 @@ + + + + + + + Class GeoIP2\Record\AbstractRecord + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/class-GeoIP2.Record.City.html b/doc/v0.1.1/class-GeoIP2.Record.City.html new file mode 100644 index 0000000..6b604de --- /dev/null +++ b/doc/v0.1.1/class-GeoIP2.Record.City.html @@ -0,0 +1,292 @@ + + + + + + + Class GeoIP2\Record\City + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/class-GeoIP2.Record.Continent.html b/doc/v0.1.1/class-GeoIP2.Record.Continent.html new file mode 100644 index 0000000..c1b1e6d --- /dev/null +++ b/doc/v0.1.1/class-GeoIP2.Record.Continent.html @@ -0,0 +1,291 @@ + + + + + + + Class GeoIP2\Record\Continent + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/class-GeoIP2.Record.Country.html b/doc/v0.1.1/class-GeoIP2.Record.Country.html new file mode 100644 index 0000000..baadaf5 --- /dev/null +++ b/doc/v0.1.1/class-GeoIP2.Record.Country.html @@ -0,0 +1,323 @@ + + + + + + + Class GeoIP2\Record\Country + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/class-GeoIP2.Record.Location.html b/doc/v0.1.1/class-GeoIP2.Record.Location.html new file mode 100644 index 0000000..b02d261 --- /dev/null +++ b/doc/v0.1.1/class-GeoIP2.Record.Location.html @@ -0,0 +1,317 @@ + + + + + + + Class GeoIP2\Record\Location + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/class-GeoIP2.Record.MaxMind.html b/doc/v0.1.1/class-GeoIP2.Record.MaxMind.html new file mode 100644 index 0000000..a58bcc2 --- /dev/null +++ b/doc/v0.1.1/class-GeoIP2.Record.MaxMind.html @@ -0,0 +1,200 @@ + + + + + + + Class GeoIP2\Record\MaxMind + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/class-GeoIP2.Record.Postal.html b/doc/v0.1.1/class-GeoIP2.Record.Postal.html new file mode 100644 index 0000000..85eec28 --- /dev/null +++ b/doc/v0.1.1/class-GeoIP2.Record.Postal.html @@ -0,0 +1,231 @@ + + + + + + + Class GeoIP2\Record\Postal + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/class-GeoIP2.Record.RepresentedCountry.html b/doc/v0.1.1/class-GeoIP2.Record.RepresentedCountry.html new file mode 100644 index 0000000..abe29dc --- /dev/null +++ b/doc/v0.1.1/class-GeoIP2.Record.RepresentedCountry.html @@ -0,0 +1,362 @@ + + + + + + + Class GeoIP2\Record\RepresentedCountry + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/class-GeoIP2.Record.Subdivision.html b/doc/v0.1.1/class-GeoIP2.Record.Subdivision.html new file mode 100644 index 0000000..6b629ca --- /dev/null +++ b/doc/v0.1.1/class-GeoIP2.Record.Subdivision.html @@ -0,0 +1,324 @@ + + + + + + + Class GeoIP2\Record\Subdivision + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/class-GeoIP2.Record.Traits.html b/doc/v0.1.1/class-GeoIP2.Record.Traits.html new file mode 100644 index 0000000..bd237ae --- /dev/null +++ b/doc/v0.1.1/class-GeoIP2.Record.Traits.html @@ -0,0 +1,500 @@ + + + + + + + Class GeoIP2\Record\Traits + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/class-GeoIP2.WebService.Client.html b/doc/v0.1.1/class-GeoIP2.WebService.Client.html new file mode 100644 index 0000000..4ee5639 --- /dev/null +++ b/doc/v0.1.1/class-GeoIP2.WebService.Client.html @@ -0,0 +1,436 @@ + + + + + + + Class GeoIP2\WebService\Client + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/elementlist.js b/doc/v0.1.1/elementlist.js new file mode 100644 index 0000000..7a54ea2 --- /dev/null +++ b/doc/v0.1.1/elementlist.js @@ -0,0 +1,3 @@ + +var ApiGen = ApiGen || {}; +ApiGen.elements = [["c","Exception"],["c","GeoIP2\\Exception\\GeoIP2Exception"],["c","GeoIP2\\Exception\\HttpException"],["c","GeoIP2\\Exception\\WebServiceException"],["c","GeoIP2\\Model\\City"],["c","GeoIP2\\Model\\CityIspOrg"],["c","GeoIP2\\Model\\Country"],["c","GeoIP2\\Model\\Omni"],["c","GeoIP2\\Record\\AbstractPlaceRecord"],["c","GeoIP2\\Record\\AbstractRecord"],["c","GeoIP2\\Record\\City"],["c","GeoIP2\\Record\\Continent"],["c","GeoIP2\\Record\\Country"],["c","GeoIP2\\Record\\Location"],["c","GeoIP2\\Record\\MaxMind"],["c","GeoIP2\\Record\\Postal"],["c","GeoIP2\\Record\\RepresentedCountry"],["c","GeoIP2\\Record\\Subdivision"],["c","GeoIP2\\Record\\Traits"],["c","GeoIP2\\WebService\\Client"]]; diff --git a/doc/v0.1.1/index.html b/doc/v0.1.1/index.html new file mode 100644 index 0000000..34fdb03 --- /dev/null +++ b/doc/v0.1.1/index.html @@ -0,0 +1,142 @@ + + + + + + + Overview + + + + + + + + + + +
+ + + + diff --git a/doc/v0.1.1/namespace-GeoIP2.Exception.html b/doc/v0.1.1/namespace-GeoIP2.Exception.html new file mode 100644 index 0000000..593aa0e --- /dev/null +++ b/doc/v0.1.1/namespace-GeoIP2.Exception.html @@ -0,0 +1,123 @@ + + + + + + + Namespace GeoIP2\Exception + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/namespace-GeoIP2.Model.html b/doc/v0.1.1/namespace-GeoIP2.Model.html new file mode 100644 index 0000000..0e8c561 --- /dev/null +++ b/doc/v0.1.1/namespace-GeoIP2.Model.html @@ -0,0 +1,129 @@ + + + + + + + Namespace GeoIP2\Model + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/namespace-GeoIP2.Record.html b/doc/v0.1.1/namespace-GeoIP2.Record.html new file mode 100644 index 0000000..a600cd8 --- /dev/null +++ b/doc/v0.1.1/namespace-GeoIP2.Record.html @@ -0,0 +1,162 @@ + + + + + + + Namespace GeoIP2\Record + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/namespace-GeoIP2.WebService.html b/doc/v0.1.1/namespace-GeoIP2.WebService.html new file mode 100644 index 0000000..c472372 --- /dev/null +++ b/doc/v0.1.1/namespace-GeoIP2.WebService.html @@ -0,0 +1,115 @@ + + + + + + + Namespace GeoIP2\WebService + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/namespace-GeoIP2.html b/doc/v0.1.1/namespace-GeoIP2.html new file mode 100644 index 0000000..41db657 --- /dev/null +++ b/doc/v0.1.1/namespace-GeoIP2.html @@ -0,0 +1,115 @@ + + + + + + + Namespace GeoIP2 + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/namespace-PHP.html b/doc/v0.1.1/namespace-PHP.html new file mode 100644 index 0000000..a2f83fd --- /dev/null +++ b/doc/v0.1.1/namespace-PHP.html @@ -0,0 +1,112 @@ + + + + + + + Namespace PHP + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/resources/collapsed.png b/doc/v0.1.1/resources/collapsed.png new file mode 100644 index 0000000..56e7323 Binary files /dev/null and b/doc/v0.1.1/resources/collapsed.png differ diff --git a/doc/v0.1.1/resources/combined.js b/doc/v0.1.1/resources/combined.js new file mode 100644 index 0000000..5bfe66b --- /dev/null +++ b/doc/v0.1.1/resources/combined.js @@ -0,0 +1,1264 @@ + +var ApiGen = ApiGen || {}; +ApiGen.config = {"require":{"min":"2.8.0"},"resources":{"resources":"resources"},"templates":{"common":{"overview.latte":"index.html","combined.js.latte":"resources\/combined.js","elementlist.js.latte":"elementlist.js","404.latte":"404.html"},"optional":{"sitemap":{"filename":"sitemap.xml","template":"sitemap.xml.latte"},"opensearch":{"filename":"opensearch.xml","template":"opensearch.xml.latte"},"robots":{"filename":"robots.txt","template":"robots.txt.latte"}},"main":{"package":{"filename":"package-%s.html","template":"package.latte"},"namespace":{"filename":"namespace-%s.html","template":"namespace.latte"},"class":{"filename":"class-%s.html","template":"class.latte"},"constant":{"filename":"constant-%s.html","template":"constant.latte"},"function":{"filename":"function-%s.html","template":"function.latte"},"source":{"filename":"source-%s.html","template":"source.latte"},"tree":{"filename":"tree.html","template":"tree.latte"},"deprecated":{"filename":"deprecated.html","template":"deprecated.latte"},"todo":{"filename":"todo.html","template":"todo.latte"}}},"options":{"elementDetailsCollapsed":true,"elementsOrder":"natural"},"config":"\/usr\/share\/php\/data\/ApiGen\/templates\/default\/config.neon"}; + + +/*! jQuery v1.7 jquery.com | jquery.org/license */ +(function(a,b){function cA(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cx(a){if(!cm[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cn||(cn=c.createElement("iframe"),cn.frameBorder=cn.width=cn.height=0),b.appendChild(cn);if(!co||!cn.createElement)co=(cn.contentWindow||cn.contentDocument).document,co.write((c.compatMode==="CSS1Compat"?"":"")+""),co.close();d=co.createElement(a),co.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cn)}cm[a]=e}return cm[a]}function cw(a,b){var c={};f.each(cs.concat.apply([],cs.slice(0,b)),function(){c[this]=a});return c}function cv(){ct=b}function cu(){setTimeout(cv,0);return ct=f.now()}function cl(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ck(){try{return new a.XMLHttpRequest}catch(b){}}function ce(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bB(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function br(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bi,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bq(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bp(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bp)}function bp(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bo(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bn(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bm(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(){return!0}function M(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.add(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;B.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return a!=null&&m.test(a)&&!isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,unknownElems:!!a.getElementsByTagName("nav").length,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",enctype:!!c.createElement("form").enctype,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.lastChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-999px",top:"-999px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
t
",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;f(function(){var a,b,d,e,g,h,i=1,j="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",l="visibility:hidden;border:0;",n="style='"+j+"border:5px solid #000;padding:0;'",p="
"+""+"
";m=c.getElementsByTagName("body")[0];!m||(a=c.createElement("div"),a.style.cssText=l+"width:0;height:0;position:static;top:0;margin-top:"+i+"px",m.insertBefore(a,m.firstChild),o=c.createElement("div"),o.style.cssText=j+l,o.innerHTML=p,a.appendChild(o),b=o.firstChild,d=b.firstChild,g=b.nextSibling.firstChild.firstChild,h={doesNotAddBorder:d.offsetTop!==5,doesAddBorderForTableAndCells:g.offsetTop===5},d.style.position="fixed",d.style.top="20px",h.fixedPosition=d.offsetTop===20||d.offsetTop===15,d.style.position=d.style.top="",b.style.overflow="hidden",b.style.position="relative",h.subtractsBorderForOverflowNotVisible=d.offsetTop===-5,h.doesNotIncludeMarginInBodyOffset=m.offsetTop!==i,m.removeChild(a),o=a=null,f.extend(k,h))}),o.innerHTML="",n.removeChild(o),o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[f.expando]:a[f.expando]&&f.expando,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[f.expando]=n=++f.uuid:n=f.expando),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[f.expando]:f.expando;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)?b=b:b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" "));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];if(!arguments.length){if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}return b}e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!a||j===3||j===8||j===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g},removeAttr:function(a,b){var c,d,e,g,h=0;if(a.nodeType===1){d=(b||"").split(p),g=d.length;for(;h=0}})});var z=/\.(.*)$/,A=/^(?:textarea|input|select)$/i,B=/\./g,C=/ /g,D=/[^\w\s.|`]/g,E=/^([^\.]*)?(?:\.(.+))?$/,F=/\bhover(\.\S+)?/,G=/^key/,H=/^(?:mouse|contextmenu)|click/,I=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,J=function(a){var b=I.exec(a);b&& +(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},K=function(a,b){return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||a.id===b[2])&&(!b[3]||b[3].test(a.className))},L=function(a){return f.event.special.hover?a:a.replace(F,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=L(c).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"",(g||!e)&&c.preventDefault();if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,n=null;for(m=e.parentNode;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l=0:t===b&&(t=o[s]=r.quick?K(m,r.quick):f(m).is(s)),t&&q.push(r);q.length&&j.push({elem:m,matches:q})}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),G.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),H.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var Y="abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",Z=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,_=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,ba=/<([\w:]+)/,bb=/
","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bk=X(c);bj.optgroup=bj.option,bj.tbody=bj.tfoot=bj.colgroup=bj.caption=bj.thead,bj.th=bj.td,f.support.htmlSerialize||(bj._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after" +,arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Z,""):null;if(typeof a=="string"&&!bd.test(a)&&(f.support.leadingWhitespace||!$.test(a))&&!bj[(ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(_,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bn(a,d),e=bo(a),g=bo(d);for(h=0;e[h];++h)g[h]&&bn(e[h],g[h])}if(b){bm(a,d);if(c){e=bo(a),g=bo(d);for(h=0;e[h];++h)bm(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!bc.test(k))k=b.createTextNode(k);else{k=k.replace(_,"<$1>");var l=(ba.exec(k)||["",""])[1].toLowerCase(),m=bj[l]||bj._default,n=m[0],o=b.createElement("div");b===c?bk.appendChild(o):X(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=bb.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&$.test(k)&&o.insertBefore(b.createTextNode($.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bt.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bs,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bs.test(g)?g.replace(bs,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bB(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bC=function(a,c){var d,e,g;c=c.replace(bu,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bD=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bv.test(f)&&bw.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bB=bC||bD,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bF=/%20/g,bG=/\[\]$/,bH=/\r?\n/g,bI=/#.*$/,bJ=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bK=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bL=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bM=/^(?:GET|HEAD)$/,bN=/^\/\//,bO=/\?/,bP=/)<[^<]*)*<\/script>/gi,bQ=/^(?:select|textarea)/i,bR=/\s+/,bS=/([?&])_=[^&]*/,bT=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bU=f.fn.load,bV={},bW={},bX,bY,bZ=["*/"]+["*"];try{bX=e.href}catch(b$){bX=c.createElement("a"),bX.href="",bX=bX.href}bY=bT.exec(bX.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bU)return bU.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bP,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bQ.test(this.nodeName)||bK.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bH,"\r\n")}}):{name:b.name,value:c.replace(bH,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?cb(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),cb(a,b);return a},ajaxSettings:{url:bX,isLocal:bL.test(bY[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bZ},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:b_(bV),ajaxTransport:b_(bW),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cd(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=ce(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bJ.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bI,"").replace(bN,bY[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bR),d.crossDomain==null&&(r=bT.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bY[1]&&r[2]==bY[2]&&(r[3]||(r[1]==="http:"?80:443))==(bY[3]||(bY[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),ca(bV,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bM.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bO.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bS,"$1_="+x);d.url=y+(y===d.url?(bO.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bZ+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=ca(bW,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){s<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)cc(g,a[g],c,e);return d.join("&").replace(bF,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cf=f.now(),cg=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cf++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cg.test(b.url)||e&&cg.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cg,l),b.url===j&&(e&&(k=k.replace(cg,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ch=a.ActiveXObject?function(){for(var a in cj)cj[a](0,1)}:!1,ci=0,cj;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ck()||cl()}:ck,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ch&&delete cj[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++ci,ch&&(cj||(cj={},f(a).unload(ch)),cj[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cm={},cn,co,cp=/^(?:toggle|show|hide)$/,cq=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cr,cs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],ct;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cw("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cz.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cz.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cA(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cA(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); +/** + * Cookie plugin + * + * Copyright (c) 2006 Klaus Hartl (stilbuero.de) + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + */ + +/** + * Create a cookie with the given name and value and other optional parameters. + * + * @example $.cookie('the_cookie', 'the_value'); + * @desc Set the value of a cookie. + * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true }); + * @desc Create a cookie with all available options. + * @example $.cookie('the_cookie', 'the_value'); + * @desc Create a session cookie. + * @example $.cookie('the_cookie', null); + * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain + * used when the cookie was set. + * + * @param String name The name of the cookie. + * @param String value The value of the cookie. + * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. + * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. + * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. + * If set to null or omitted, the cookie will be a session cookie and will not be retained + * when the the browser exits. + * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). + * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). + * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will + * require a secure protocol (like HTTPS). + * @type undefined + * + * @name $.cookie + * @cat Plugins/Cookie + * @author Klaus Hartl/klaus.hartl@stilbuero.de + */ + +/** + * Get the value of a cookie with the given name. + * + * @example $.cookie('the_cookie'); + * @desc Get the value of a cookie. + * + * @param String name The name of the cookie. + * @return The value of the cookie. + * @type String + * + * @name $.cookie + * @cat Plugins/Cookie + * @author Klaus Hartl/klaus.hartl@stilbuero.de + */ +jQuery.cookie = function(name, value, options) { + if (typeof value != 'undefined') { // name and value given, set cookie + options = options || {}; + if (value === null) { + value = ''; + options.expires = -1; + } + var expires = ''; + if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { + var date; + if (typeof options.expires == 'number') { + date = new Date(); + date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); + } else { + date = options.expires; + } + expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE + } + // CAUTION: Needed to parenthesize options.path and options.domain + // in the following expressions, otherwise they evaluate to undefined + // in the packed version for some reason... + var path = options.path ? '; path=' + (options.path) : ''; + var domain = options.domain ? '; domain=' + (options.domain) : ''; + var secure = options.secure ? '; secure' : ''; + document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); + } else { // only name given, get cookie + var cookieValue = null; + if (document.cookie && document.cookie != '') { + var cookies = document.cookie.split(';'); + for (var i = 0; i < cookies.length; i++) { + var cookie = jQuery.trim(cookies[i]); + // Does this cookie string begin with the name we want? + if (cookie.substring(0, name.length + 1) == (name + '=')) { + cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); + break; + } + } + } + return cookieValue; + } +}; +/*! + * sprintf and vsprintf for jQuery + * somewhat based on http://jan.moesen.nu/code/javascript/sprintf-and-printf-in-javascript/ + * Copyright (c) 2008 Sabin Iacob (m0n5t3r) + * @license http://www.gnu.org/licenses/gpl.html + * @project jquery.sprintf + */ +(function(d){var a={b:function(e){return parseInt(e,10).toString(2)},c:function(e){return String.fromCharCode(parseInt(e,10))},d:function(e){return parseInt(e,10)},u:function(e){return Math.abs(e)},f:function(f,e){e=parseInt(e,10);f=parseFloat(f);if(isNaN(e&&f)){return NaN}return e&&f.toFixed(e)||f},o:function(e){return parseInt(e,10).toString(8)},s:function(e){return e},x:function(e){return(""+parseInt(e,10).toString(16)).toLowerCase()},X:function(e){return(""+parseInt(e,10).toString(16)).toUpperCase()}};var c=/%(?:(\d+)?(?:\.(\d+))?|\(([^)]+)\))([%bcdufosxX])/g;var b=function(f){if(f.length==1&&typeof f[0]=="object"){f=f[0];return function(i,h,k,j,g,m,l){return a[g](f[j])}}else{var e=0;return function(i,h,k,j,g,m,l){if(g=="%"){return"%"}return a[g](f[e++],k)}}};d.extend({sprintf:function(f){var e=Array.apply(null,arguments).slice(1);return f.replace(c,b(e))},vsprintf:function(f,e){return f.replace(c,b(e))}})})(jQuery); + +/*! + * jQuery Autocomplete plugin 1.1 + * + * Copyright (c) 2009 Jörn Zaefferer + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * Revision: $Id: jquery.autocomplete.js 15 2009-08-22 10:30:27Z joern.zaefferer $ + */ + +;(function($) { + +$.fn.extend({ + autocomplete: function(urlOrData, options) { + var isUrl = typeof urlOrData == "string"; + options = $.extend({}, $.Autocompleter.defaults, { + url: isUrl ? urlOrData : null, + data: isUrl ? null : urlOrData, + delay: isUrl ? $.Autocompleter.defaults.delay : 10, + max: options && !options.scroll ? 10 : 150 + }, options); + + // if highlight is set to false, replace it with a do-nothing function + options.highlight = options.highlight || function(value) { return value; }; + + // if the formatMatch option is not specified, then use formatItem for backwards compatibility + options.formatMatch = options.formatMatch || options.formatItem; + + options.show = options.show || function(list) {}; + + return this.each(function() { + new $.Autocompleter(this, options); + }); + }, + result: function(handler) { + return this.bind("result", handler); + }, + search: function(handler) { + return this.trigger("search", [handler]); + }, + flushCache: function() { + return this.trigger("flushCache"); + }, + setOptions: function(options){ + return this.trigger("setOptions", [options]); + }, + unautocomplete: function() { + return this.trigger("unautocomplete"); + } +}); + +$.Autocompleter = function(input, options) { + + var KEY = { + UP: 38, + DOWN: 40, + DEL: 46, + TAB: 9, + RETURN: 13, + ESC: 27, + COMMA: 188, + PAGEUP: 33, + PAGEDOWN: 34, + BACKSPACE: 8 + }; + + // Create $ object for input element + var $input = $(input).attr("autocomplete", "off").addClass(options.inputClass); + + var timeout; + var previousValue = ""; + var cache = $.Autocompleter.Cache(options); + var hasFocus = 0; + var lastKeyPressCode; + var config = { + mouseDownOnSelect: false + }; + var select = $.Autocompleter.Select(options, input, selectCurrent, config); + + // only opera doesn't trigger keydown multiple times while pressed, others don't work with keypress at all + $input.bind(($.browser.opera ? "keypress" : "keydown") + ".autocomplete", function(event) { + // a keypress means the input has focus + // avoids issue where input had focus before the autocomplete was applied + hasFocus = 1; + // track last key pressed + lastKeyPressCode = event.keyCode; + switch(event.keyCode) { + + case KEY.UP: + event.preventDefault(); + if ( select.visible() ) { + select.prev(); + } else { + onChange(0, true); + } + break; + + case KEY.DOWN: + event.preventDefault(); + if ( select.visible() ) { + select.next(); + } else { + onChange(0, true); + } + break; + + case KEY.PAGEUP: + event.preventDefault(); + if ( select.visible() ) { + select.pageUp(); + } else { + onChange(0, true); + } + break; + + case KEY.PAGEDOWN: + event.preventDefault(); + if ( select.visible() ) { + select.pageDown(); + } else { + onChange(0, true); + } + break; + + // matches also semicolon + case options.multiple && $.trim(options.multipleSeparator) == "," && KEY.COMMA: + case KEY.TAB: + case KEY.RETURN: + if( selectCurrent() ) { + //event.preventDefault(); + //return false; + } + break; + + case KEY.ESC: + select.hide(); + break; + + default: + clearTimeout(timeout); + timeout = setTimeout(onChange, options.delay); + break; + } + }).focus(function(){ + // track whether the field has focus, we shouldn't process any + // results if the field no longer has focus + hasFocus++; + }).blur(function() { + hasFocus = 0; + if (!config.mouseDownOnSelect) { + hideResults(); + } + }).click(function() { + // show select when clicking in a focused field + if ( hasFocus++ > 1 && !select.visible() ) { + onChange(0, true); + } + }).bind("search", function() { + // TODO why not just specifying both arguments? + var fn = (arguments.length > 1) ? arguments[1] : null; + function findValueCallback(q, data) { + var result; + if( data && data.length ) { + for (var i=0; i < data.length; i++) { + if( data[i].result.toLowerCase() == q.toLowerCase() ) { + result = data[i]; + break; + } + } + } + if( typeof fn == "function" ) fn(result); + else $input.trigger("result", result && [result.data, result.value]); + } + $.each(trimWords($input.val()), function(i, value) { + request(value, findValueCallback, findValueCallback); + }); + }).bind("flushCache", function() { + cache.flush(); + }).bind("setOptions", function() { + $.extend(options, arguments[1]); + // if we've updated the data, repopulate + if ( "data" in arguments[1] ) + cache.populate(); + }).bind("unautocomplete", function() { + select.unbind(); + $input.unbind(); + $(input.form).unbind(".autocomplete"); + }); + + + function selectCurrent() { + var selected = select.selected(); + if( !selected ) + return false; + + var v = selected.result; + previousValue = v; + + if ( options.multiple ) { + var words = trimWords($input.val()); + if ( words.length > 1 ) { + var seperator = options.multipleSeparator.length; + var cursorAt = $(input).selection().start; + var wordAt, progress = 0; + $.each(words, function(i, word) { + progress += word.length; + if (cursorAt <= progress) { + wordAt = i; + return false; + } + progress += seperator; + }); + words[wordAt] = v; + // TODO this should set the cursor to the right position, but it gets overriden somewhere + //$.Autocompleter.Selection(input, progress + seperator, progress + seperator); + v = words.join( options.multipleSeparator ); + } + v += options.multipleSeparator; + } + + $input.val(v); + hideResultsNow(); + $input.trigger("result", [selected.data, selected.value]); + return true; + } + + function onChange(crap, skipPrevCheck) { + if( lastKeyPressCode == KEY.DEL ) { + select.hide(); + return; + } + + var currentValue = $input.val(); + + if ( !skipPrevCheck && currentValue == previousValue ) + return; + + previousValue = currentValue; + + currentValue = lastWord(currentValue); + if ( currentValue.length >= options.minChars) { + $input.addClass(options.loadingClass); + if (!options.matchCase) + currentValue = currentValue.toLowerCase(); + request(currentValue, receiveData, hideResultsNow); + } else { + stopLoading(); + select.hide(); + } + }; + + function trimWords(value) { + if (!value) + return [""]; + if (!options.multiple) + return [$.trim(value)]; + return $.map(value.split(options.multipleSeparator), function(word) { + return $.trim(value).length ? $.trim(word) : null; + }); + } + + function lastWord(value) { + if ( !options.multiple ) + return value; + var words = trimWords(value); + if (words.length == 1) + return words[0]; + var cursorAt = $(input).selection().start; + if (cursorAt == value.length) { + words = trimWords(value) + } else { + words = trimWords(value.replace(value.substring(cursorAt), "")); + } + return words[words.length - 1]; + } + + // fills in the input box w/the first match (assumed to be the best match) + // q: the term entered + // sValue: the first matching result + function autoFill(q, sValue){ + // autofill in the complete box w/the first match as long as the user hasn't entered in more data + // if the last user key pressed was backspace, don't autofill + if( options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastKeyPressCode != KEY.BACKSPACE ) { + // fill in the value (keep the case the user has typed) + $input.val($input.val() + sValue.substring(lastWord(previousValue).length)); + // select the portion of the value not typed by the user (so the next character will erase) + $(input).selection(previousValue.length, previousValue.length + sValue.length); + } + }; + + function hideResults() { + clearTimeout(timeout); + timeout = setTimeout(hideResultsNow, 200); + }; + + function hideResultsNow() { + var wasVisible = select.visible(); + select.hide(); + clearTimeout(timeout); + stopLoading(); + if (options.mustMatch) { + // call search and run callback + $input.search( + function (result){ + // if no value found, clear the input box + if( !result ) { + if (options.multiple) { + var words = trimWords($input.val()).slice(0, -1); + $input.val( words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator : "") ); + } + else { + $input.val( "" ); + $input.trigger("result", null); + } + } + } + ); + } + }; + + function receiveData(q, data) { + if ( data && data.length && hasFocus ) { + stopLoading(); + select.display(data, q); + autoFill(q, data[0].value); + select.show(); + } else { + hideResultsNow(); + } + }; + + function request(term, success, failure) { + if (!options.matchCase) + term = term.toLowerCase(); + var data = cache.load(term); + // recieve the cached data + if (data && data.length) { + success(term, data); + // if an AJAX url has been supplied, try loading the data now + } else if( (typeof options.url == "string") && (options.url.length > 0) ){ + + var extraParams = { + timestamp: +new Date() + }; + $.each(options.extraParams, function(key, param) { + extraParams[key] = typeof param == "function" ? param() : param; + }); + + $.ajax({ + // try to leverage ajaxQueue plugin to abort previous requests + mode: "abort", + // limit abortion to this input + port: "autocomplete" + input.name, + dataType: options.dataType, + url: options.url, + data: $.extend({ + q: lastWord(term), + limit: options.max + }, extraParams), + success: function(data) { + var parsed = options.parse && options.parse(data) || parse(data); + cache.add(term, parsed); + success(term, parsed); + } + }); + } else { + // if we have a failure, we need to empty the list -- this prevents the the [TAB] key from selecting the last successful match + select.emptyList(); + failure(term); + } + }; + + function parse(data) { + var parsed = []; + var rows = data.split("\n"); + for (var i=0; i < rows.length; i++) { + var row = $.trim(rows[i]); + if (row) { + row = row.split("|"); + parsed[parsed.length] = { + data: row, + value: row[0], + result: options.formatResult && options.formatResult(row, row[0]) || row[0] + }; + } + } + return parsed; + }; + + function stopLoading() { + $input.removeClass(options.loadingClass); + }; + +}; + +$.Autocompleter.defaults = { + inputClass: "ac_input", + resultsClass: "ac_results", + loadingClass: "ac_loading", + minChars: 1, + delay: 400, + matchCase: false, + matchSubset: true, + matchContains: false, + cacheLength: 10, + max: 100, + mustMatch: false, + extraParams: {}, + selectFirst: true, + formatItem: function(row) { return row[0]; }, + formatMatch: null, + autoFill: false, + width: 0, + multiple: false, + multipleSeparator: ", ", + highlight: function(value, term) { + return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "$1"); + }, + scroll: true, + scrollHeight: 180 +}; + +$.Autocompleter.Cache = function(options) { + + var data = {}; + var length = 0; + + function matchSubset(s, sub) { + if (!options.matchCase) + s = s.toLowerCase(); + var i = s.indexOf(sub); + if (options.matchContains == "word"){ + i = s.toLowerCase().search("\\b" + sub.toLowerCase()); + } + if (i == -1) return false; + return i == 0 || options.matchContains; + }; + + function add(q, value) { + if (length > options.cacheLength){ + flush(); + } + if (!data[q]){ + length++; + } + data[q] = value; + } + + function populate(){ + if( !options.data ) return false; + // track the matches + var stMatchSets = {}, + nullData = 0; + + // no url was specified, we need to adjust the cache length to make sure it fits the local data store + if( !options.url ) options.cacheLength = 1; + + // track all options for minChars = 0 + stMatchSets[""] = []; + + // loop through the array and create a lookup structure + for ( var i = 0, ol = options.data.length; i < ol; i++ ) { + var rawValue = options.data[i]; + // if rawValue is a string, make an array otherwise just reference the array + rawValue = (typeof rawValue == "string") ? [rawValue] : rawValue; + + var value = options.formatMatch(rawValue, i+1, options.data.length); + if ( value === false ) + continue; + + var firstChar = value.charAt(0).toLowerCase(); + // if no lookup array for this character exists, look it up now + if( !stMatchSets[firstChar] ) + stMatchSets[firstChar] = []; + + // if the match is a string + var row = { + value: value, + data: rawValue, + result: options.formatResult && options.formatResult(rawValue) || value + }; + + // push the current match into the set list + stMatchSets[firstChar].push(row); + + // keep track of minChars zero items + if ( nullData++ < options.max ) { + stMatchSets[""].push(row); + } + }; + + // add the data items to the cache + $.each(stMatchSets, function(i, value) { + // increase the cache size + options.cacheLength++; + // add to the cache + add(i, value); + }); + } + + // populate any existing data + setTimeout(populate, 25); + + function flush(){ + data = {}; + length = 0; + } + + return { + flush: flush, + add: add, + populate: populate, + load: function(q) { + if (!options.cacheLength || !length) + return null; + /* + * if dealing w/local data and matchContains than we must make sure + * to loop through all the data collections looking for matches + */ + if( !options.url && options.matchContains ){ + // track all matches + var csub = []; + // loop through all the data grids for matches + for( var k in data ){ + // don't search through the stMatchSets[""] (minChars: 0) cache + // this prevents duplicates + if( k.length > 0 ){ + var c = data[k]; + $.each(c, function(i, x) { + // if we've got a match, add it to the array + if (matchSubset(x.value, q)) { + csub.push(x); + } + }); + } + } + return csub; + } else + // if the exact item exists, use it + if (data[q]){ + return data[q]; + } else + if (options.matchSubset) { + for (var i = q.length - 1; i >= options.minChars; i--) { + var c = data[q.substr(0, i)]; + if (c) { + var csub = []; + $.each(c, function(i, x) { + if (matchSubset(x.value, q)) { + csub[csub.length] = x; + } + }); + return csub; + } + } + } + return null; + } + }; +}; + +$.Autocompleter.Select = function (options, input, select, config) { + var CLASSES = { + ACTIVE: "ac_over" + }; + + var listItems, + active = -1, + data, + term = "", + needsInit = true, + element, + list; + + // Create results + function init() { + if (!needsInit) + return; + element = $("
") + .hide() + .addClass(options.resultsClass) + .css("position", "absolute") + .appendTo(document.body); + + list = $("
    ").appendTo(element).mouseover( function(event) { + if(target(event).nodeName && target(event).nodeName.toUpperCase() == 'LI') { + active = $("li", list).removeClass(CLASSES.ACTIVE).index(target(event)); + $(target(event)).addClass(CLASSES.ACTIVE); + } + }).click(function(event) { + $(target(event)).addClass(CLASSES.ACTIVE); + select(); + // TODO provide option to avoid setting focus again after selection? useful for cleanup-on-focus + input.focus(); + return false; + }).mousedown(function() { + config.mouseDownOnSelect = true; + }).mouseup(function() { + config.mouseDownOnSelect = false; + }); + + if( options.width > 0 ) + element.css("width", options.width); + + needsInit = false; + } + + function target(event) { + var element = event.target; + while(element && element.tagName != "LI") + element = element.parentNode; + // more fun with IE, sometimes event.target is empty, just ignore it then + if(!element) + return []; + return element; + } + + function moveSelect(step) { + listItems.slice(active, active + 1).removeClass(CLASSES.ACTIVE); + movePosition(step); + var activeItem = listItems.slice(active, active + 1).addClass(CLASSES.ACTIVE); + if(options.scroll) { + var offset = 0; + listItems.slice(0, active).each(function() { + offset += this.offsetHeight; + }); + if((offset + activeItem[0].offsetHeight - list.scrollTop()) > list[0].clientHeight) { + list.scrollTop(offset + activeItem[0].offsetHeight - list.innerHeight()); + } else if(offset < list.scrollTop()) { + list.scrollTop(offset); + } + } + }; + + function movePosition(step) { + active += step; + if (active < 0) { + active = listItems.size() - 1; + } else if (active >= listItems.size()) { + active = 0; + } + } + + function limitNumberOfItems(available) { + return options.max && options.max < available + ? options.max + : available; + } + + function fillList() { + list.empty(); + var max = limitNumberOfItems(data.length); + for (var i=0; i < max; i++) { + if (!data[i]) + continue; + var formatted = options.formatItem(data[i].data, i+1, max, data[i].value, term); + if ( formatted === false ) + continue; + var li = $("
  • ").html( options.highlight(formatted, term) ).addClass(i%2 == 0 ? "ac_even" : "ac_odd").appendTo(list)[0]; + $.data(li, "ac_data", data[i]); + } + listItems = list.find("li"); + if ( options.selectFirst ) { + listItems.slice(0, 1).addClass(CLASSES.ACTIVE); + active = 0; + } + // apply bgiframe if available + if ( $.fn.bgiframe ) + list.bgiframe(); + } + + return { + display: function(d, q) { + init(); + data = d; + term = q; + fillList(); + }, + next: function() { + moveSelect(1); + }, + prev: function() { + moveSelect(-1); + }, + pageUp: function() { + if (active != 0 && active - 8 < 0) { + moveSelect( -active ); + } else { + moveSelect(-8); + } + }, + pageDown: function() { + if (active != listItems.size() - 1 && active + 8 > listItems.size()) { + moveSelect( listItems.size() - 1 - active ); + } else { + moveSelect(8); + } + }, + hide: function() { + element && element.hide(); + listItems && listItems.removeClass(CLASSES.ACTIVE); + active = -1; + }, + visible : function() { + return element && element.is(":visible"); + }, + current: function() { + return this.visible() && (listItems.filter("." + CLASSES.ACTIVE)[0] || options.selectFirst && listItems[0]); + }, + show: function() { + var offset = $(input).offset(); + element.css({ + width: typeof options.width == "string" || options.width > 0 ? options.width : $(input).innerWidth(), + top: offset.top + input.offsetHeight, + left: offset.left + }).show(); + options.show(element); + if(options.scroll) { + list.scrollTop(0); + list.css({ + maxHeight: options.scrollHeight, + overflow: 'auto' + }); + + if($.browser.msie && typeof document.body.style.maxHeight === "undefined") { + var listHeight = 0; + listItems.each(function() { + listHeight += this.offsetHeight; + }); + var scrollbarsVisible = listHeight > options.scrollHeight; + list.css('height', scrollbarsVisible ? options.scrollHeight : listHeight ); + if (!scrollbarsVisible) { + // IE doesn't recalculate width when scrollbar disappears + listItems.width( list.width() - parseInt(listItems.css("padding-left")) - parseInt(listItems.css("padding-right")) ); + } + } + + } + }, + selected: function() { + var selected = listItems && listItems.filter("." + CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE); + return selected && selected.length && $.data(selected[0], "ac_data"); + }, + emptyList: function (){ + list && list.empty(); + }, + unbind: function() { + element && element.remove(); + } + }; +}; + +$.fn.selection = function(start, end) { + if (start !== undefined) { + return this.each(function() { + if( this.createTextRange ){ + var selRange = this.createTextRange(); + if (end === undefined || start == end) { + selRange.move("character", start); + selRange.select(); + } else { + selRange.collapse(true); + selRange.moveStart("character", start); + selRange.moveEnd("character", end); + selRange.select(); + } + } else if( this.setSelectionRange ){ + this.setSelectionRange(start, end); + } else if( this.selectionStart ){ + this.selectionStart = start; + this.selectionEnd = end; + } + }); + } + var field = this[0]; + if ( field.createTextRange ) { + var range = document.selection.createRange(), + orig = field.value, + teststring = "<->", + textLength = range.text.length; + range.text = teststring; + var caretAt = field.value.indexOf(teststring); + field.value = orig; + this.selection(caretAt, caretAt + textLength); + return { + start: caretAt, + end: caretAt + textLength + } + } else if( field.selectionStart !== undefined ){ + return { + start: field.selectionStart, + end: field.selectionEnd + } + } +}; + +})(jQuery); +/** + * jQuery.fn.sortElements + * -------------- + * @author James Padolsey (http://james.padolsey.com) + * @version 0.11 + * @updated 18-MAR-2010 + * -------------- + * @param Function comparator: + * Exactly the same behaviour as [1,2,3].sort(comparator) + * + * @param Function getSortable + * A function that should return the element that is + * to be sorted. The comparator will run on the + * current collection, but you may want the actual + * resulting sort to occur on a parent or another + * associated element. + * + * E.g. $('td').sortElements(comparator, function(){ + * return this.parentNode; + * }) + * + * The
) will be sorted instead + * of the
's parent (
itself. + */ +jQuery.fn.sortElements = (function(){ + + var sort = [].sort; + + return function(comparator, getSortable) { + + getSortable = getSortable || function(){return this;}; + + var placements = this.map(function(){ + + var sortElement = getSortable.call(this), + parentNode = sortElement.parentNode, + + // Since the element itself will change position, we have + // to have some way of storing it's original position in + // the DOM. The easiest way is to have a 'flag' node: + nextSibling = parentNode.insertBefore( + document.createTextNode(''), + sortElement.nextSibling + ); + + return function() { + + if (parentNode === this) { + throw new Error( + "You can't sort elements if any one is a descendant of another." + ); + } + + // Insert before flag: + parentNode.insertBefore(this, nextSibling); + // Remove flag: + parentNode.removeChild(nextSibling); + + }; + + }); + + return sort.call(this, comparator).each(function(i){ + placements[i].call(getSortable.call(this)); + }); + + }; + +})(); +/*! + * ApiGen 2.8.0 - API documentation generator for PHP 5.3+ + * + * Copyright (c) 2010-2011 David Grudl (http://davidgrudl.com) + * Copyright (c) 2011-2012 Jaroslav Hanslík (https://github.com/kukulich) + * Copyright (c) 2011-2012 Ondřej Nešpor (https://github.com/Andrewsville) + * + * For the full copyright and license information, please view + * the file LICENSE.md that was distributed with this source code. + */ + +$(function() { + var $document = $(document); + var $left = $('#left'); + var $right = $('#right'); + var $rightInner = $('#rightInner'); + var $splitter = $('#splitter'); + var $groups = $('#groups'); + var $content = $('#content'); + + // Menu + + // Hide deep packages and namespaces + $('ul span', $groups).click(function(event) { + event.preventDefault(); + event.stopPropagation(); + $(this) + .toggleClass('collapsed') + .parent() + .next('ul') + .toggleClass('collapsed'); + }).click(); + + $active = $('ul li.active', $groups); + if ($active.length > 0) { + // Open active + $('> a > span', $active).click(); + } else { + $main = $('> ul > li.main', $groups); + if ($main.length > 0) { + // Open first level of the main project + $('> a > span', $main).click(); + } else { + // Open first level of all + $('> ul > li > a > span', $groups).click(); + } + } + + // Content + + // Search autocompletion + var autocompleteFound = false; + var autocompleteFiles = {'c': 'class', 'co': 'constant', 'f': 'function', 'm': 'class', 'mm': 'class', 'p': 'class', 'mp': 'class', 'cc': 'class'}; + var $search = $('#search input[name=q]'); + $search + .autocomplete(ApiGen.elements, { + matchContains: true, + scrollHeight: 200, + max: 20, + formatItem: function(data) { + return data[1].replace(/^(.+\\)(.+)$/, '$1$2'); + }, + formatMatch: function(data) { + return data[1]; + }, + formatResult: function(data) { + return data[1]; + }, + show: function($list) { + var $items = $('li span', $list); + var maxWidth = Math.max.apply(null, $items.map(function() { + return $(this).width(); + })); + // 10px padding + $list + .width(Math.max(maxWidth + 10, $search.innerWidth())) + .css('left', $search.offset().left + $search.outerWidth() - $list.outerWidth()); + } + }).result(function(event, data) { + autocompleteFound = true; + var location = window.location.href.split('/'); + location.pop(); + var parts = data[1].split(/::|$/); + var file = $.sprintf(ApiGen.config.templates.main[autocompleteFiles[data[0]]].filename, parts[0].replace(/[^\w]/g, '.')); + if (parts[1]) { + file += '#' + ('mm' === data[0] || 'mp' === data[0] ? 'm' : '') + parts[1].replace(/([\w]+)\(\)/, '_$1'); + } + location.push(file); + window.location = location.join('/'); + + // Workaround for Opera bug + $(this).closest('form').attr('action', location.join('/')); + }).closest('form') + .submit(function() { + var query = $search.val(); + if ('' === query) { + return false; + } + + var label = $('#search input[name=more]').val(); + if (!autocompleteFound && label && -1 === query.indexOf('more:')) { + $search.val(query + ' more:' + label); + } + + return !autocompleteFound && '' !== $('#search input[name=cx]').val(); + }); + + // Save natural order + $('table.summary tr[data-order]', $content).each(function(index) { + do { + index = '0' + index; + } while (index.length < 3); + $(this).attr('data-order-natural', index); + }); + + // Switch between natural and alphabetical order + var $caption = $('table.summary', $content) + .filter(':has(tr[data-order])') + .find('caption'); + $caption + .click(function() { + var $this = $(this); + var order = $this.data('order') || 'natural'; + order = 'natural' === order ? 'alphabetical' : 'natural'; + $this.data('order', order); + $.cookie('order', order, {expires: 365}); + var attr = 'alphabetical' === order ? 'data-order' : 'data-order-natural'; + $this + .closest('table') + .find('tr').sortElements(function(a, b) { + return $(a).attr(attr) > $(b).attr(attr) ? 1 : -1; + }); + return false; + }) + .addClass('switchable') + .attr('title', 'Switch between natural and alphabetical order'); + if ((null === $.cookie('order') && 'alphabetical' === ApiGen.config.options.elementsOrder) || 'alphabetical' === $.cookie('order')) { + $caption.click(); + } + + // Open details + if (ApiGen.config.options.elementDetailsCollapsed) { + $('tr', $content).filter(':has(.detailed)') + .click(function() { + var $this = $(this); + $('.short', $this).hide(); + $('.detailed', $this).show(); + }); + } + + // Splitter + var splitterWidth = $splitter.width(); + function setSplitterPosition(position) + { + $left.width(position); + $right.css('margin-left', position + splitterWidth); + $splitter.css('left', position); + } + function setNavigationPosition() + { + var width = $rightInner.width(); + $rightInner + .toggleClass('medium', width <= 960) + .toggleClass('small', width <= 650); + } + $splitter.mousedown(function() { + $splitter.addClass('active'); + + $document.mousemove(function(event) { + if (event.pageX >= 230 && $document.width() - event.pageX >= 600 + splitterWidth) { + setSplitterPosition(event.pageX); + setNavigationPosition(); + } + }); + + $() + .add($splitter) + .add($document) + .mouseup(function() { + $splitter + .removeClass('active') + .unbind('mouseup'); + $document + .unbind('mousemove') + .unbind('mouseup'); + + $.cookie('splitter', parseInt($splitter.css('left')), {expires: 365}); + }); + + return false; + }); + var splitterPosition = $.cookie('splitter'); + if (null !== splitterPosition) { + setSplitterPosition(parseInt(splitterPosition)); + } + setNavigationPosition(); + $(window).resize(setNavigationPosition); + + // Select selected lines + var matches = window.location.hash.substr(1).match(/^\d+(?:-\d+)?(?:,\d+(?:-\d+)?)*$/); + if (null !== matches) { + var lists = matches[0].split(','); + for (var i = 0; i < lists.length; i++) { + var lines = lists[i].split('-'); + lines[1] = lines[1] || lines[0]; + for (var j = lines[0]; j <= lines[1]; j++) { + $('#' + j).addClass('selected'); + } + } + + var $firstLine = $('#' + parseInt(matches[0])); + if ($firstLine.length > 0) { + $right.scrollTop($firstLine.offset().top); + } + } + + // Save selected lines + var lastLine; + $('a.l').click(function(event) { + event.preventDefault(); + + var $selectedLine = $(this).parent(); + var selectedLine = parseInt($selectedLine.attr('id')); + + if (event.shiftKey) { + if (lastLine) { + for (var i = Math.min(selectedLine, lastLine); i <= Math.max(selectedLine, lastLine); i++) { + $('#' + i).addClass('selected'); + } + } else { + $selectedLine.addClass('selected'); + } + } else if (event.ctrlKey) { + $selectedLine.toggleClass('selected'); + } else { + var $selected = $('.l.selected') + .not($selectedLine) + .removeClass('selected'); + if ($selected.length > 0) { + $selectedLine.addClass('selected'); + } else { + $selectedLine.toggleClass('selected'); + } + } + + lastLine = $selectedLine.hasClass('selected') ? selectedLine : null; + + // Update hash + var lines = $('.l.selected') + .map(function() { + return parseInt($(this).attr('id')); + }) + .get() + .sort(function(a, b) { + return a - b; + }); + + var hash = []; + var list = []; + for (var j = 0; j < lines.length; j++) { + if (0 === j && j + 1 === lines.length) { + hash.push(lines[j]); + } else if (0 === j) { + list[0] = lines[j]; + } else if (lines[j - 1] + 1 !== lines[j] && j + 1 === lines.length) { + hash.push(list.join('-')); + hash.push(lines[j]); + } else if (lines[j - 1] + 1 !== lines[j]) { + hash.push(list.join('-')); + list = [lines[j]]; + } else if (j + 1 === lines.length) { + list[1] = lines[j]; + hash.push(list.join('-')); + } else { + list[1] = lines[j]; + } + } + + window.location.hash = hash.join(','); + }); +}); + diff --git a/doc/v0.1.1/resources/footer.png b/doc/v0.1.1/resources/footer.png new file mode 100644 index 0000000..51f4a7f Binary files /dev/null and b/doc/v0.1.1/resources/footer.png differ diff --git a/doc/v0.1.1/resources/inherit.png b/doc/v0.1.1/resources/inherit.png new file mode 100644 index 0000000..957079b Binary files /dev/null and b/doc/v0.1.1/resources/inherit.png differ diff --git a/doc/v0.1.1/resources/resize.png b/doc/v0.1.1/resources/resize.png new file mode 100644 index 0000000..fb98a7a Binary files /dev/null and b/doc/v0.1.1/resources/resize.png differ diff --git a/doc/v0.1.1/resources/sort.png b/doc/v0.1.1/resources/sort.png new file mode 100644 index 0000000..0d0fea1 Binary files /dev/null and b/doc/v0.1.1/resources/sort.png differ diff --git a/doc/v0.1.1/resources/style.css b/doc/v0.1.1/resources/style.css new file mode 100644 index 0000000..f361474 --- /dev/null +++ b/doc/v0.1.1/resources/style.css @@ -0,0 +1,608 @@ +/*! + * ApiGen 2.8.0 - API documentation generator for PHP 5.3+ + * + * Copyright (c) 2010-2011 David Grudl (http://davidgrudl.com) + * Copyright (c) 2011-2012 Jaroslav Hanslík (https://github.com/kukulich) + * Copyright (c) 2011-2012 Ondřej Nešpor (https://github.com/Andrewsville) + * + * For the full copyright and license information, please view + * the file LICENSE.md that was distributed with this source code. + */ + +body { + font: 13px/1.5 Verdana, 'Geneva CE', lucida, sans-serif; + margin: 0; + padding: 0; + background: #ffffff; + color: #333333; +} + +h1, h2, h3, h4, caption { + font-family: 'Trebuchet MS', 'Geneva CE', lucida, sans-serif; + color: #053368; +} + +h1 { + color: #1e5eb6; + font-size: 230%; + font-weight: normal; + margin: .3em 0; +} + +h2 { + color: #1e5eb6; + font-size: 150%; + font-weight: normal; + margin: -.3em 0 .3em 0; +} + +h3 { + font-size: 1.6em; + font-weight: normal; + margin-bottom: 2px; +} + +h4 { + font-size: 100%; + font-weight: bold; + padding: 0; + margin: 0; +} + +caption { + border: 1px solid #cccccc; + background: #ecede5; + font-weight: bold; + font-size: 1.2em; + padding: 3px 5px; + text-align: left; + margin-bottom: 0; +} + +p { + margin: .7em 0 1em; + padding: 0; +} + +hr { + margin: 2em 0 1em; + border: none; + border-top: 1px solid #cccccc; + height: 0; +} + +a { + color: #006aeb; + padding: 3px 1px; + text-decoration: none; +} + +h1 a { + color: #1e5eb6; +} + +a:hover, a:active, a:focus, a:hover b, a:hover var { + background-color: #006aeb; + color: #ffffff !important; +} + +code, var, pre { + font-family: monospace; +} + +var { + font-weight: bold; + font-style: normal; + color: #ca8a04; +} + +pre { + margin: 0; +} + +code a b { + color: #000000; +} + +.deprecated { + text-decoration: line-through; +} + +.invalid { + color: #e71818; +} + +.hidden { + display: none; +} + +/* Left side */ +#left { + overflow: auto; + width: 270px; + height: 100%; + position: fixed; +} + +/* Menu */ +#menu { + padding: 10px; +} + +#menu ul { + list-style: none; + padding: 0; + margin: 0; +} + +#menu ul ul { + padding-left: 10px; +} + +#menu li { + white-space: nowrap; + position: relative; +} + +#menu a { + display: block; + padding: 0 2px; +} + +#menu .active > a, #menu > span { + color: #333333; + background: none; + font-weight: bold; +} + +#menu .active > a.invalid { + color: #e71818; +} + +#menu .active > a:hover, #menu .active > a:active, #menu .active > a:focus { + background-color: #006aeb; +} + +#menu #groups span { + position: absolute; + top: 4px; + right: 2px; + cursor: pointer; + display: block; + width: 12px; + height: 12px; + background: url('collapsed.png') transparent 0 0 no-repeat; +} + +#menu #groups span:hover { + background-position: -12px 0; +} + +#menu #groups span.collapsed { + background-position: 0 -12px; +} + +#menu #groups span.collapsed:hover { + background-position: -12px -12px; +} + +#menu #groups ul.collapsed { + display: none; +} + +/* Right side */ +#right { + overflow: auto; + margin-left: 275px; + height: 100%; + position: fixed; + left: 0; + right: 0; +} + +#rightInner { + max-width: 1000px; + min-width: 350px; +} + +/* Search */ +#search { + float: right; + margin: 3px 8px; +} + +#search input.text { + padding: 3px 5px; + width: 250px; +} + +/* Autocomplete */ +.ac_results { + padding: 0; + border: 1px solid #cccccc; + background-color: #ffffff; + overflow: hidden; + z-index: 99999; +} + +.ac_results ul { + width: 100%; + list-style-position: outside; + list-style: none; + padding: 0; + margin: 0; +} + +.ac_results li { + margin: 0; + padding: 2px 5px; + cursor: default; + display: block; + font: 12px 'Trebuchet MS', 'Geneva CE', lucida, sans-serif; + line-height: 16px; + overflow: hidden; + white-space: nowrap; +} + +.ac_results li strong { + color: #000000; +} + +.ac_odd { + background-color: #eeeeee; +} + +.ac_over { + background-color: #006aeb; + color: #ffffff; +} + +.ac_results li.ac_over strong { + color: #ffffff; +} + +/* Navigation */ +#navigation { + padding: 3px 8px; + background-color: #f6f6f4; + height: 26px; +} + +#navigation ul { + list-style: none; + margin: 0 8px 4px 0; + padding: 0; + overflow: hidden; + float: left; +} + +#navigation ul + ul { + border-left: 1px solid #000000; + padding-left: 8px; +} + +#navigation ul li { + float: left; + margin: 2px; + padding: 0 3px; + font-family: Verdana, 'Geneva CE', lucida, sans-serif; + color: #808080; +} + +#navigation ul li.active { + background-color: #053368; + color: #ffffff; + font-weight: bold; +} + +#navigation ul li a { + color: #000000; + font-weight: bold; + padding: 0; +} + +#navigation ul li span { + float: left; + padding: 0 3px; +} + +#navigation ul li a:hover span, #navigation ul li a:active span, #navigation ul li a:focus span { + background-color: #006aeb; +} + +/* Content */ +#content { + clear: both; + padding: 5px 15px; +} + +.description pre { + padding: .6em; + background: #fcfcf7; +} + +#content > .description { + background: #ecede5; + padding: 1px 8px; + margin: 1.2em 0; +} + +#content > .description pre { + margin: .5em 0; +} + +dl.tree { + margin: 1.2em 0; +} + +dl.tree dd { + margin: 0; + padding: 0; +} + +.info { + margin: 1.2em 0; +} + +.summary { + border: 1px solid #cccccc; + border-collapse: collapse; + font-size: 1em; + width: 100%; + margin: 1.2em 0 2.4em; +} + +.summary caption { + border-width: 1px 1px 0; +} + +.summary caption.switchable { + background: #ecede5 url('sort.png') no-repeat center right; + cursor: pointer; +} + +.summary td { + border: 1px solid #cccccc; + margin: 0; + padding: 3px 10px; + font-size: 1em; + vertical-align: top; +} + +.summary td:first-child { + text-align: right; +} + +#packages.summary td:first-child, #namespaces.summary td:first-child, .inherited.summary td:first-child, .used.summary td:first-child { + text-align: left; +} + +.summary tr:hover td { + background: #f6f6f4; +} + +.summary .description pre { + border: .5em solid #ecede5; +} + +.summary .description p { + margin: 0; +} + +.summary .description p + p, .summary .description ul { + margin: 3px 0 0 0; +} + +.summary .description.detailed h4 { + margin-top: 3px; +} + +.summary dl { + margin: 0; +} + +.summary dd { + margin: 0 0 0 25px; +} + +.name, .attributes { + white-space: nowrap; +} + +.value { + white-space: pre-wrap; +} + +td.name, td.attributes { + width: 1%; +} + +.class #methods .name { + width: auto; + white-space: normal; +} + +.class #methods .name > div > code { + white-space: pre-wrap; +} + +.class #methods .name > div > code span, .function .value > code { + white-space: nowrap; +} + +.class #methods td.name > div, .class td.description > div { + position: relative; + padding-right: 1em; +} + +.anchor { + position: absolute; + top: 0; + right: 0; + line-height: 1; + font-size: 85%; + margin: 0; + color: #006aeb !important; +} + +.list { + margin: 0 0 5px 25px; +} + +div.invalid { + background-color: #fae4e0; + padding: 10px; +} + +/* Splitter */ +#splitter { + position: fixed; + height: 100%; + width: 5px; + left: 270px; + background: #1e5eb6 url('resize.png') left center no-repeat; + cursor: e-resize; +} + +#splitter.active { + opacity: .5; +} + +/* Footer */ +#footer { + border-top: 1px solid #e9eeef; + clear: both; + color: #a7a7a7; + font-size: 8pt; + text-align: center; + padding: 20px 0 0; + margin: 3em 0 0; + height: 90px; + background: #ffffff url('footer.png') no-repeat center top; +} + +/* Tree */ +div.tree ul { + list-style: none; + background: url('tree-vertical.png') left repeat-y; + padding: 0; + margin-left: 20px; +} + +div.tree li { + margin: 0; + padding: 0; +} + +div.tree div { + padding-left: 30px; +} + +div.tree div.notlast { + background: url('tree-hasnext.png') left 10px no-repeat; +} + +div.tree div.last { + background: url('tree-last.png') left -240px no-repeat; +} + +div.tree li.last { + background: url('tree-cleaner.png') left center repeat-y; +} + +div.tree span.padding { + padding-left: 15px; +} + +/* Source code */ +.php-keyword1 { + color: #e71818; + font-weight: bold; +} + +.php-keyword2 { + font-weight: bold; +} + +.php-var { + color: #d59401; + font-weight: bold; +} + +.php-num { + color: #cd0673; +} + +.php-quote { + color: #008000; +} + +.php-comment { + color: #929292; +} + +.xlang { + color: #ff0000; + font-weight: bold; +} + +span.l { + display: block; +} + +span.l.selected { + background: #f6f6f4; +} + +span.l a { + color: #333333; +} + +span.l a:hover, div.l a:active, div.l a:focus { + background: transparent; + color: #333333 !important; +} + +span.l .php-var a { + color: #d59401; +} + +span.l .php-var a:hover, span.l .php-var a:active, span.l .php-var a:focus { + color: #d59401 !important; +} + +span.l a.l { + padding-left: 2px; + color: #c0c0c0; +} + +span.l a.l:hover, span.l a.l:active, span.l a.l:focus { + background: transparent; + color: #c0c0c0 !important; +} + +#rightInner.medium #navigation { + height: 52px; +} + +#rightInner.medium #navigation ul:first-child + ul { + clear: left; + border: none; + padding: 0; +} + +#rightInner.medium .name, #rightInner.medium .attributes { + white-space: normal; +} + +#rightInner.small #search { + float: left; +} + +#rightInner.small #navigation { + height: 78px; +} + +#rightInner.small #navigation ul:first-child { + clear: both; +} diff --git a/doc/v0.1.1/resources/tree-cleaner.png b/doc/v0.1.1/resources/tree-cleaner.png new file mode 100644 index 0000000..2eb9085 Binary files /dev/null and b/doc/v0.1.1/resources/tree-cleaner.png differ diff --git a/doc/v0.1.1/resources/tree-hasnext.png b/doc/v0.1.1/resources/tree-hasnext.png new file mode 100644 index 0000000..91d6b79 Binary files /dev/null and b/doc/v0.1.1/resources/tree-hasnext.png differ diff --git a/doc/v0.1.1/resources/tree-last.png b/doc/v0.1.1/resources/tree-last.png new file mode 100644 index 0000000..7f319f8 Binary files /dev/null and b/doc/v0.1.1/resources/tree-last.png differ diff --git a/doc/v0.1.1/resources/tree-vertical.png b/doc/v0.1.1/resources/tree-vertical.png new file mode 100644 index 0000000..384908b Binary files /dev/null and b/doc/v0.1.1/resources/tree-vertical.png differ diff --git a/doc/v0.1.1/source-class-GeoIP2.Exception.GeoIP2Exception.html b/doc/v0.1.1/source-class-GeoIP2.Exception.GeoIP2Exception.html new file mode 100644 index 0000000..c2d1105 --- /dev/null +++ b/doc/v0.1.1/source-class-GeoIP2.Exception.GeoIP2Exception.html @@ -0,0 +1,110 @@ + + + + + + + + File GeoIP2/Exception/GeoIP2Exception.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/source-class-GeoIP2.Exception.HttpException.html b/doc/v0.1.1/source-class-GeoIP2.Exception.HttpException.html new file mode 100644 index 0000000..38de9ac --- /dev/null +++ b/doc/v0.1.1/source-class-GeoIP2.Exception.HttpException.html @@ -0,0 +1,125 @@ + + + + + + + + File GeoIP2/Exception/HttpException.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/source-class-GeoIP2.Exception.WebServiceException.html b/doc/v0.1.1/source-class-GeoIP2.Exception.WebServiceException.html new file mode 100644 index 0000000..5d16199 --- /dev/null +++ b/doc/v0.1.1/source-class-GeoIP2.Exception.WebServiceException.html @@ -0,0 +1,126 @@ + + + + + + + + File GeoIP2/Exception/WebServiceException.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/source-class-GeoIP2.Model.City.html b/doc/v0.1.1/source-class-GeoIP2.Model.City.html new file mode 100644 index 0000000..1f103f2 --- /dev/null +++ b/doc/v0.1.1/source-class-GeoIP2.Model.City.html @@ -0,0 +1,221 @@ + + + + + + + + File GeoIP2/Model/City.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/source-class-GeoIP2.Model.CityIspOrg.html b/doc/v0.1.1/source-class-GeoIP2.Model.CityIspOrg.html new file mode 100644 index 0000000..416fe01 --- /dev/null +++ b/doc/v0.1.1/source-class-GeoIP2.Model.CityIspOrg.html @@ -0,0 +1,158 @@ + + + + + + + + File GeoIP2/Model/CityIspOrg.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/source-class-GeoIP2.Model.Country.html b/doc/v0.1.1/source-class-GeoIP2.Model.Country.html new file mode 100644 index 0000000..461b1dd --- /dev/null +++ b/doc/v0.1.1/source-class-GeoIP2.Model.Country.html @@ -0,0 +1,196 @@ + + + + + + + + File GeoIP2/Model/Country.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/source-class-GeoIP2.Model.Omni.html b/doc/v0.1.1/source-class-GeoIP2.Model.Omni.html new file mode 100644 index 0000000..78ed9f1 --- /dev/null +++ b/doc/v0.1.1/source-class-GeoIP2.Model.Omni.html @@ -0,0 +1,158 @@ + + + + + + + + File GeoIP2/Model/Omni.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/source-class-GeoIP2.Record.AbstractPlaceRecord.html b/doc/v0.1.1/source-class-GeoIP2.Record.AbstractPlaceRecord.html new file mode 100644 index 0000000..df57266 --- /dev/null +++ b/doc/v0.1.1/source-class-GeoIP2.Record.AbstractPlaceRecord.html @@ -0,0 +1,146 @@ + + + + + + + + File GeoIP2/Record/AbstractPlaceRecord.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/source-class-GeoIP2.Record.AbstractRecord.html b/doc/v0.1.1/source-class-GeoIP2.Record.AbstractRecord.html new file mode 100644 index 0000000..ffb2528 --- /dev/null +++ b/doc/v0.1.1/source-class-GeoIP2.Record.AbstractRecord.html @@ -0,0 +1,142 @@ + + + + + + + + File GeoIP2/Record/AbstractRecord.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/source-class-GeoIP2.Record.City.html b/doc/v0.1.1/source-class-GeoIP2.Record.City.html new file mode 100644 index 0000000..098708a --- /dev/null +++ b/doc/v0.1.1/source-class-GeoIP2.Record.City.html @@ -0,0 +1,137 @@ + + + + + + + + File GeoIP2/Record/City.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/source-class-GeoIP2.Record.Continent.html b/doc/v0.1.1/source-class-GeoIP2.Record.Continent.html new file mode 100644 index 0000000..12e6958 --- /dev/null +++ b/doc/v0.1.1/source-class-GeoIP2.Record.Continent.html @@ -0,0 +1,141 @@ + + + + + + + + File GeoIP2/Record/Continent.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/source-class-GeoIP2.Record.Country.html b/doc/v0.1.1/source-class-GeoIP2.Record.Country.html new file mode 100644 index 0000000..90ee118 --- /dev/null +++ b/doc/v0.1.1/source-class-GeoIP2.Record.Country.html @@ -0,0 +1,146 @@ + + + + + + + + File GeoIP2/Record/Country.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/source-class-GeoIP2.Record.Location.html b/doc/v0.1.1/source-class-GeoIP2.Record.Location.html new file mode 100644 index 0000000..ae66bfe --- /dev/null +++ b/doc/v0.1.1/source-class-GeoIP2.Record.Location.html @@ -0,0 +1,156 @@ + + + + + + + + File GeoIP2/Record/Location.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/source-class-GeoIP2.Record.MaxMind.html b/doc/v0.1.1/source-class-GeoIP2.Record.MaxMind.html new file mode 100644 index 0000000..52e5180 --- /dev/null +++ b/doc/v0.1.1/source-class-GeoIP2.Record.MaxMind.html @@ -0,0 +1,127 @@ + + + + + + + + File GeoIP2/Record/MaxMind.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/source-class-GeoIP2.Record.Postal.html b/doc/v0.1.1/source-class-GeoIP2.Record.Postal.html new file mode 100644 index 0000000..88d1430 --- /dev/null +++ b/doc/v0.1.1/source-class-GeoIP2.Record.Postal.html @@ -0,0 +1,133 @@ + + + + + + + + File GeoIP2/Record/Postal.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/source-class-GeoIP2.Record.RepresentedCountry.html b/doc/v0.1.1/source-class-GeoIP2.Record.RepresentedCountry.html new file mode 100644 index 0000000..411b580 --- /dev/null +++ b/doc/v0.1.1/source-class-GeoIP2.Record.RepresentedCountry.html @@ -0,0 +1,153 @@ + + + + + + + + File GeoIP2/Record/RepresentedCountry.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/source-class-GeoIP2.Record.Subdivision.html b/doc/v0.1.1/source-class-GeoIP2.Record.Subdivision.html new file mode 100644 index 0000000..e1b6cac --- /dev/null +++ b/doc/v0.1.1/source-class-GeoIP2.Record.Subdivision.html @@ -0,0 +1,150 @@ + + + + + + + + File GeoIP2/Record/Subdivision.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/source-class-GeoIP2.Record.Traits.html b/doc/v0.1.1/source-class-GeoIP2.Record.Traits.html new file mode 100644 index 0000000..c6b5eff --- /dev/null +++ b/doc/v0.1.1/source-class-GeoIP2.Record.Traits.html @@ -0,0 +1,195 @@ + + + + + + + + File GeoIP2/Record/Traits.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/source-class-GeoIP2.WebService.Client.html b/doc/v0.1.1/source-class-GeoIP2.WebService.Client.html new file mode 100644 index 0000000..010873a --- /dev/null +++ b/doc/v0.1.1/source-class-GeoIP2.WebService.Client.html @@ -0,0 +1,410 @@ + + + + + + + + File GeoIP2/WebService/Client.php + + + + + + + + +
+ +
+ +
+ + + + diff --git a/doc/v0.1.1/tree.html b/doc/v0.1.1/tree.html new file mode 100644 index 0000000..92a9d05 --- /dev/null +++ b/doc/v0.1.1/tree.html @@ -0,0 +1,274 @@ + + + + + + + Tree + + + + + + + + + + +
+ + + + diff --git a/index.md b/index.md new file mode 100644 index 0000000..21087bf --- /dev/null +++ b/index.md @@ -0,0 +1,6 @@ +--- +layout: default +title: MaxMind GeoIP2 PHP API +--- + +{%include README.md%} diff --git a/phpunit.xml.dist b/phpunit.xml.dist deleted file mode 100644 index e935730..0000000 --- a/phpunit.xml.dist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - ./tests/GeoIP2/Test/ - - - - - - ./src/GeoIP2/ - - - - - - - - diff --git a/src/GeoIP2/Exception/GeoIP2Exception.php b/src/GeoIP2/Exception/GeoIP2Exception.php deleted file mode 100644 index 1e0c9a6..0000000 --- a/src/GeoIP2/Exception/GeoIP2Exception.php +++ /dev/null @@ -1,10 +0,0 @@ -uri = $uri; - parent::__construct($message, $httpStatus, $previous); - } -} diff --git a/src/GeoIP2/Exception/WebServiceException.php b/src/GeoIP2/Exception/WebServiceException.php deleted file mode 100644 index e74c9ee..0000000 --- a/src/GeoIP2/Exception/WebServiceException.php +++ /dev/null @@ -1,26 +0,0 @@ -error = $error; - parent::__construct($message, $httpStatus, $uri, $previous); - } -} diff --git a/src/GeoIP2/Model/City.php b/src/GeoIP2/Model/City.php deleted file mode 100644 index f01fa4d..0000000 --- a/src/GeoIP2/Model/City.php +++ /dev/null @@ -1,120 +0,0 @@ -city = new \GeoIP2\Record\City($this->get('city'), $languages); - $this->location = new \GeoIP2\Record\Location($this->get('location')); - $this->postal = new \GeoIP2\Record\Postal($this->get('postal')); - - $this->createSubdivisions($raw, $languages); - } - - private function createSubdivisions($raw, $languages) - { - if (!isset($raw['subdivisions'])) { - return; - } - - foreach ($raw['subdivisions'] as $sub) { - array_push( - $this->subdivisions, - new \GeoIP2\Record\Subdivision($sub, $languages) - ); - } - } - - /** - * @ignore - */ - public function __get($attr) - { - if ($attr == 'mostSpecificSubdivision') { - return $this->$attr(); - } else { - return parent::__get($attr); - } - } - - private function mostSpecificSubdivision() - { - return empty($this->subdivisions)? - new \GeoIP2\Record\Subdivision(array(), $this->languages): - end($this->subdivisions); - } -} diff --git a/src/GeoIP2/Model/CityIspOrg.php b/src/GeoIP2/Model/CityIspOrg.php deleted file mode 100644 index 834130d..0000000 --- a/src/GeoIP2/Model/CityIspOrg.php +++ /dev/null @@ -1,57 +0,0 @@ -raw = $raw; - - $this->continent = new \GeoIP2\Record\Continent( - $this->get('continent'), - $languages - ); - $this->country = new \GeoIP2\Record\Country( - $this->get('country'), - $languages - ); - $this->maxmind = new \GeoIP2\Record\MaxMind($this->get('maxmind')); - $this->registeredCountry = new \GeoIP2\Record\Country( - $this->get('registered_country'), - $languages - ); - $this->representedCountry = new \GeoIP2\Record\RepresentedCountry( - $this->get('represented_country'), - $languages - ); - $this->traits = new \GeoIP2\Record\Traits($this->get('traits')); - - $this->languages = $languages; - } - - /** - * @ignore - */ - protected function get($field) - { - return isset($this->raw[$field]) ? $this->raw[$field] : array(); - } - - /** - * @ignore - */ - public function __get ($attr) - { - if ($attr != "instance" && isset($this->$attr)) { - return $this->$attr; - } - - throw new \RuntimeException("Unknown attribute: $attr"); - } -} diff --git a/src/GeoIP2/Model/Omni.php b/src/GeoIP2/Model/Omni.php deleted file mode 100644 index 909b5f2..0000000 --- a/src/GeoIP2/Model/Omni.php +++ /dev/null @@ -1,57 +0,0 @@ -languages = $languages; - parent::__construct($record); - } - - /** - * @ignore - */ - public function __get($attr) - { - if ($attr == 'name') { - return $this->name(); - } else { - return parent::__get($attr); - } - } - - private function name() - { - foreach ($this->languages as $language) { - if (isset($this->names[$language])) { - return $this->names[$language]; - } - } - } -} diff --git a/src/GeoIP2/Record/AbstractRecord.php b/src/GeoIP2/Record/AbstractRecord.php deleted file mode 100644 index b2c0721..0000000 --- a/src/GeoIP2/Record/AbstractRecord.php +++ /dev/null @@ -1,34 +0,0 @@ -record = $record; - } - - /** - * @ignore - */ - public function __get($attr) - { - $valid = in_array($attr, $this->validAttributes); - // XXX - kind of ugly but greatly reduces boilerplate code - $key = strtolower(preg_replace('/([A-Z])/', '_\1', $attr)); - - if ($valid && isset($this->record[$key])) { - return $this->record[$key]; - } elseif ($valid) { - return null; - } else { - throw new \RuntimeException("Unknown attribute: $attr"); - } - } -} diff --git a/src/GeoIP2/Record/City.php b/src/GeoIP2/Record/City.php deleted file mode 100644 index 804942c..0000000 --- a/src/GeoIP2/Record/City.php +++ /dev/null @@ -1,29 +0,0 @@ -military - * but this could expand to include other types such as embassy - * in the future. Returned by all endpoints. - */ -class RepresentedCountry extends Country -{ - protected $validAttributes = array( - 'confidence', - 'geonameId', - 'isoCode', - 'namespace', - 'type' - ); -} diff --git a/src/GeoIP2/Record/Subdivision.php b/src/GeoIP2/Record/Subdivision.php deleted file mode 100644 index 342b2d8..0000000 --- a/src/GeoIP2/Record/Subdivision.php +++ /dev/null @@ -1,42 +0,0 @@ -The user type associated with the IP - * address. This can be one of the following values:

- *
    - *
  • business - *
  • cafe - *
  • cellular - *
  • college - *
  • content_delivery_network - *
  • dialup - *
  • government - *
  • hosting - *
  • library - *
  • military - *
  • residential - *
  • router - *
  • school - *
  • search_engine_spider - *
  • traveler - *
- *

This attribute is only available from the Omni end point.

- */ -class Traits extends AbstractRecord -{ - /** - * @ignore - */ - protected $validAttributes = array( - 'autonomousSystemNumber', - 'autonomousSystemOrganization', - 'domain', - 'isAnonymousProxy', - 'isSatelliteProvider', - 'isp', - 'ipAddress', - 'organization', - 'userType' - ); -} diff --git a/src/GeoIP2/WebService/Client.php b/src/GeoIP2/WebService/Client.php deleted file mode 100644 index 9581bee..0000000 --- a/src/GeoIP2/WebService/Client.php +++ /dev/null @@ -1,312 +0,0 @@ -$userId and $licenseKey, then you call the method - * corresponding to a specific end point, passing it the IP address you want - * to look up. - * - * If the request succeeds, the method call will return a model class for - * the end point you called. This model in turn contains multiple record - * classes, each of which represents part of the data returned by the web - * service. - * - * If the request fails, the client class throws an exception. - * - * **Exceptions** - * - * For details on the possible errors returned by the web service itself, see - * {@link http://dev.maxmind.com/geoip2/geoip/web-services the GeoIP2 web - * service docs}. - * - * If the web service returns an explicit error document, this is thrown as a - * {@link \GeoIP2\Exception\WebServiceException}. If some other sort of - * transport error occurs, this is thrown as a {@link - * \GeoIP2\Exception\HttpException}. The difference is that the web service - * error includes an error message and error code delivered by the web - * service. The latter is thrown when some sort of unanticipated error occurs, - * such as the web service returning a 500 or an invalid error document. - * - * If the web service returns any status code besides 200, 4xx, or 5xx, this - * also becomes a {@link \GeoIP2\Exception\HttpException}. - * - * Finally, if the web service returns a 200 but the body is invalid, the - * client throws a {@link \GeoIP2\Exception\GeoIP2Exception}. - */ -class Client -{ - private $userId; - private $licenseKey; - private $languages; - private $host; - private $guzzleClient; - - /** - * Constructor. - * - * @param int $userId Your MaxMind user ID - * @param string $licenseKey Your MaxMind license key - * @param array $languages List of language codes to use in name property - * from most preferred to least preferred. - * @param string $host Optional host parameter - * @param object $guzzleClient Optional Guzzle client to use (to facilitate - * unit testing). - */ - public function __construct( - $userId, - $licenseKey, - $languages = array('en'), - $host = 'geoip.maxmind.com', - $guzzleClient = null - ) { - $this->userId = $userId; - $this->licenseKey = $licenseKey; - $this->languages = $languages; - $this->host = $host; - // To enable unit testing - $this->guzzleClient = $guzzleClient; - } - - /** - * This method calls the GeoIP2 City endpoint. - * - * @param string $ipAddress IPv4 or IPv6 address as a string. If no - * address is provided, the address that the web service is called - * from will be used. - * - * @return \GeoIP2\Model\City - * - * @throws \GeoIP2\Exception\GeoIP2Exception if there was a generic - * error processing your request. - * @throws \GeoIP2\Exception\HttpException if there was an HTTP transport - * error. - * @throws \GeoIP2\Exception\WebServiceException if an error was returned - * by MaxMind's GeoIP2 web service. - */ - public function city($ipAddress = 'me') - { - return $this->responseFor('city', 'City', $ipAddress); - } - - /** - * This method calls the GeoIP2 Country endpoint. - * - * @param string $ipAddress IPv4 or IPv6 address as a string. If no - * address is provided, the address that the web service is called - * from will be used. - * - * @return \GeoIP2\Model\Country - * - * @throws \GeoIP2\Exception\GeoIP2Exception if there was a generic - * error processing your request. - * @throws \GeoIP2\Exception\HttpException if there was an HTTP transport - * error. - * @throws \GeoIP2\Exception\WebServiceException if an error was returned - * by MaxMind's GeoIP2 web service. - */ - public function country($ipAddress = 'me') - { - return $this->responseFor('country', 'Country', $ipAddress); - } - - /** - * This method calls the GeoIP2 City/ISP/Org endpoint. - * - * @param string $ipAddress IPv4 or IPv6 address as a string. If no - * address is provided, the address that the web service is called - * from will be used. - * - * @return \GeoIP2\Model\CityIspOrg - * - * @throws \GeoIP2\Exception\GeoIP2Exception if there was a generic - * error processing your request. - * @throws \GeoIP2\Exception\HttpException if there was an HTTP transport - * error. - * @throws \GeoIP2\Exception\WebServiceException if an error was returned - * by MaxMind's GeoIP2 web service. - */ - public function cityIspOrg($ipAddress = 'me') - { - return $this->responseFor('city_isp_org', 'CityIspOrg', $ipAddress); - } - - /** - * This method calls the GeoIP2 Omni endpoint. - * - * @param string $ipAddress IPv4 or IPv6 address as a string. If no - * address is provided, the address that the web service is called - * from will be used. - * - * @return \GeoIP2\Model\Omni - * - * @throws \GeoIP2\Exception\GeoIP2Exception if there was a generic - * error processing your request. - * @throws \GeoIP2\Exception\HttpException if there was an HTTP transport - * error. - * @throws \GeoIP2\Exception\WebServiceException if an error was returned - * by MaxMind's GeoIP2 web service. - */ - public function omni($ipAddress = 'me') - { - return $this->responseFor('omni', 'Omni', $ipAddress); - } - - private function responseFor($endpoint, $class, $ipAddress) - { - $uri = implode('/', array($this->baseUri(), $endpoint, $ipAddress)); - - $client = $this->guzzleClient ? - $this->guzzleClient : new GuzzleClient(); - $request = $client->get($uri, array('Accept' => 'application/json')); - $request->setAuth($this->userId, $this->licenseKey); - $ua = $request->getHeader('User-Agent'); - $ua = "GeoIP2 PHP API ($ua)"; - $request->setHeader('User-Agent', $ua); - - $response = null; - try { - $response = $request->send(); - } catch (ClientErrorResponseException $e) { - $this->handle4xx($e->getResponse(), $uri); - } catch (ServerErrorResponseException $e) { - $this->handle5xx($e->getResponse(), $uri); - } - - if ($response && $response->isSuccessful()) { - $body = $this->handleSuccess($response, $uri); - $class = "GeoIP2\\Model\\" . $class; - return new $class($body, $this->languages); - } else { - $this->handleNon200($response, $uri); - } - } - - private function handleSuccess($response, $uri) - { - if ($response->getContentLength() == 0) { - throw new GeoIP2Exception( - "Received a 200 response for $uri but did not " . - "receive a HTTP body." - ); - } - - try { - return $response->json(); - } catch (RuntimeException $e) { - throw new GeoIP2Exception( - "Received a 200 response for $uri but could not decode " . - "the response as JSON: " . $e->getMessage() - ); - - } - } - - private function handle4xx($response, $uri) - { - $status = $response->getStatusCode(); - - $body = array(); - - if ($response->getContentLength() > 0) { - if (strstr($response->getContentType(), 'json')) { - try { - $body = $response->json(); - if (!isset($body['code']) || !isset($body['error'])) { - throw new GeoIP2Exception( - 'Response contains JSON but it does not specify ' . - 'code or error keys: ' . $response->getBody() - ); - } - } catch (RuntimeException $e) { - throw new HttpException( - "Received a $status error for $uri but it did not " . - "include the expected JSON body: " . - $e->getMessage(), - $status, - $uri - ); - } - } else { - throw new HttpException( - "Received a $status error for $uri with the " . - "following body: " . $response->getBody(), - $status, - $uri - ); - } - } else { - throw new HttpException( - "Received a $status error for $uri with no body", - $status, - $uri - ); - } - - throw new WebServiceException( - $body['error'], - $body['code'], - $status, - $uri - ); - } - - private function handle5xx($response, $uri) - { - $status = $response->getStatusCode(); - - throw new HttpException( - "Received a server error ($status) for $uri", - $status, - $uri - ); - } - - private function handleNon200($response, $uri) - { - $status = $response->getStatusCode(); - - throw new HttpException( - "Received a very surprising HTTP status " . - "($status) for $uri", - $status, - $uri - ); - } - - private function baseUri() - { - return 'https://' . $this->host . '/geoip/v2.0'; - } -} diff --git a/tests/GeoIP2/Test/Model/CountryTest.php b/tests/GeoIP2/Test/Model/CountryTest.php deleted file mode 100644 index f456aa4..0000000 --- a/tests/GeoIP2/Test/Model/CountryTest.php +++ /dev/null @@ -1,162 +0,0 @@ - array( - 'code' => 'NA', - 'geoname_id' => 42, - 'names' => array( 'en' => 'North America' ), - ), - 'country' => array( - 'geoname_id' => 1, - 'iso_code' => 'US', - 'names' => array( 'en' => 'United States of America' ), - ), - 'registered_country' => array( - 'geoname_id' => 2, - 'iso_code' => 'CA', - 'names' => array( 'en' => 'Canada' ), - ), - 'traits' => array( - 'ip_address' => '1.2.3.4', - ), - ); - - private $model; - - public function setUp () - { - $this->model = new Country($this->raw, array('en')); - } - - public function testObjects () - { - $this->assertInstanceOf( - 'GeoIP2\Model\Country', - $this->model, - 'minimal GeoIP2::Model::Country object' - ); - $this->assertInstanceOf( - 'GeoIP2\Record\Continent', - $this->model->continent - ); - $this->assertInstanceOf( - 'GeoIP2\Record\Country', - $this->model->country - ); - $this->assertInstanceOf( - 'GeoIP2\Record\Country', - $this->model->registeredCountry - ); - $this->assertInstanceOf( - 'GeoIP2\Record\RepresentedCountry', - $this->model->representedCountry - ); - $this->assertInstanceOf( - 'GeoIP2\Record\Traits', - $this->model->traits - ); - } - - public function testValues() - { - - $this->assertEquals( - 42, - $this->model->continent->geonameId, - 'continent geoname_id is 42' - ); - - $this->assertEquals( - 'NA', - $this->model->continent->code, - 'continent code is NA' - ); - - $this->assertEquals( - array( 'en' => 'North America' ), - $this->model->continent->names, - 'continent names' - ); - - $this->assertEquals( - 'North America', - $this->model->continent->name, - 'continent name is North America' - ); - - $this->assertEquals( - 1, - $this->model->country->geonameId, - 'country geoname_id is 1' - ); - - $this->assertEquals( - 'US', - $this->model->country->isoCode, - 'country iso_code is US' - ); - - $this->assertEquals( - array( 'en' => 'United States of America' ), - $this->model->country->names, - 'country name' - ); - - $this->assertEquals( - $this->model->country->name, - 'United States of America', - 'country name is United States of America' - ); - - $this->assertEquals( - null, - $this->model->country->confidence, - 'country confidence is undef' - ); - - $this->assertEquals( - 2, - $this->model->registeredCountry->geonameId, - 'registered_country geoname_id is 2' - ); - - $this->assertEquals( - 'CA', - $this->model->registeredCountry->isoCode, - 'registered_country iso_code is CA' - ); - - $this->assertEquals( - array( 'en' => 'Canada' ), - $this->model->registeredCountry->names, - 'registered_country names' - ); - - $this->assertEquals( - 'Canada', - $this->model->registeredCountry->name, - 'registered_country name is Canada' - ); - - foreach (array( 'isAnonymousProxy', 'isSatelliteProvider' ) as $meth) { - $this->assertEquals( - 0, - $this->model->traits->$meth, - "traits $meth returns 0 by default" - ); - } - - $this->assertEquals( - $this->raw, - $this->model->raw, - 'raw method returns raw input' - ); - } -} diff --git a/tests/GeoIP2/Test/Model/NameTest.php b/tests/GeoIP2/Test/Model/NameTest.php deleted file mode 100644 index c34686d..0000000 --- a/tests/GeoIP2/Test/Model/NameTest.php +++ /dev/null @@ -1,81 +0,0 @@ - array( - 'code' => 'NA', - 'geoname_id' => 42, - 'names' => array( - 'en' => 'North America', - 'zh-CN' => '北美洲', - ), - ), - 'country' => array( - 'geoname_id' => 1, - 'iso_code' => 'US', - 'names' => array( - 'en' => 'United States of America', - 'ru' => 'объединяет государства', - 'zh-CN' => '美国', - ), - ), - 'traits' => array( - 'ip_address' => '1.2.3.4', - ), - ); - - public function testFallback() - { - $model = new Country($this->raw, array( 'ru', 'zh-CN', 'en' )); - - $this->assertEquals( - '北美洲', - $model->continent->name, - 'continent name is in Chinese (no Russian available)' - ); - - $this->assertEquals( - 'объединяет государства', - $model->country->name, - 'country name is in Russian' - ); - } - - public function testTwoFallbacks() { - $model = new Country($this->raw, array('ru', 'ja')); - - $this->assertEquals( - null, - $model->continent->name, - 'continent name is undef (no Russian or Japanese available)' - ); - - $this->assertEquals( - 'объединяет государства', - $model->country->name, - 'country name is in Russian' - ); - } - - public function testNoFallbacks() - { - $model = new Country($this->raw, array('ja')); - - $this->assertEquals( - null, - $model->continent->name, - 'continent name is undef (no Japanese available) ' - ); - - $this->assertEquals( - null, - $model->country->name, - 'country name is undef (no Japanese available) ' - ); - } -} diff --git a/tests/GeoIP2/Test/Model/OmniTest.php b/tests/GeoIP2/Test/Model/OmniTest.php deleted file mode 100644 index 00dc5d3..0000000 --- a/tests/GeoIP2/Test/Model/OmniTest.php +++ /dev/null @@ -1,248 +0,0 @@ - array( - 'confidence' => 76, - 'geoname_id' => 9876, - 'names' => array( 'en' => 'Minneapolis' ), - ), - 'continent' => array( - 'code' => 'NA', - 'geoname_id' => 42, - 'names' => array( 'en' => 'North America' ), - ), - 'country' => array( - 'confidence' => 99, - 'geoname_id' => 1, - 'iso_code' => 'US', - 'names' => array( 'en' => 'United States of America' ), - ), - 'location' => array( - 'accuracy_radius' => 1500, - 'latitude' => 44.98, - 'longitude' => 93.2636, - 'metro_code' => 765, - 'postal_code' => '55401', - 'postal_confidence' => 33, - 'time_zone' => 'America/Chicago', - ), - 'maxmind' => array( - 'queries_remaining' => 22, - ), - 'registered_country' => array( - 'geoname_id' => 2, - 'iso_code' => 'CA', - 'names' => array( 'en' => 'Canada' ), - ), - 'represented_country' => array( - 'geoname_id' => 3, - 'iso_code' => 'GB', - 'names' => array( 'en' => 'United Kingdom' ), - ), - 'subdivisions' => array( - array( - 'confidence' => 88, - 'geoname_id' => 574635, - 'iso_code' => 'MN', - 'names' => array( 'en' => 'Minnesota' ), - ) - ), - 'traits' => array( - 'autonomous_system_number' => 1234, - 'autonomous_system_organization' => 'AS Organization', - 'domain' => 'example.com', - 'ip_address' => '1.2.3.4', - 'is_satellite_provider' => 1, - 'isp' => 'Comcast', - 'organization' => 'Blorg', - 'user_type' => 'college', - ), - ); - - $model = new Omni($raw, array('en')); - - $this->assertInstanceOf( - 'GeoIP2\Model\Omni', - $model, - 'GeoIP2\Model\Omni object' - ); - - $this->assertInstanceOf( - 'GeoIP2\Record\City', - $model->city, - '$model->city' - ); - - $this->assertInstanceOf( - 'GeoIP2\Record\Continent', - $model->continent, - '$model->continent' - ); - - $this->assertInstanceOf( - 'GeoIP2\Record\Country', - $model->country, - '$model->country' - ); - - $this->assertInstanceOf( - 'GeoIP2\Record\Location', - $model->location, - '$model->location' - ); - - $this->assertInstanceOf( - 'GeoIP2\Record\Country', - $model->registeredCountry, - '$model->registeredCountry' - ); - - $this->assertInstanceOf( - 'GeoIP2\Record\RepresentedCountry', - $model->representedCountry, - '$model->representedCountry' - ); - - $subdivisions = $model->subdivisions; - foreach ($subdivisions as $subdiv) { - $this->assertInstanceOf('GeoIP2\Record\Subdivision', $subdiv); - } - - $this->assertInstanceOf( - 'GeoIP2\Record\Subdivision', - $model->mostSpecificSubdivision, - '$model->mostSpecificSubdivision' - ); - - $this->assertInstanceOf( - 'GeoIP2\Record\Traits', - $model->traits, - '$model->traits' - ); - - $this->assertEquals( - 22, - $model->maxmind->queriesRemaining, - 'queriesRemaining is correct' - ); - - $this->assertEquals( - $raw, - $model->raw, - 'raw method returns raw input' - ); - } - - public function testEmptyObjects() - { - $raw = array( 'traits' => array( 'ip_address' => '5.6.7.8' ) ); - - $model = new Omni($raw, array('en')); - - $this->assertInstanceOf( - 'GeoIP2\Model\Omni', - $model, - 'GeoIP2\Model\Omni object with no data except traits.ipAddress' - ); - - $this->assertInstanceOf( - 'GeoIP2\Record\City', - $model->city, - '$model->city' - ); - - $this->assertInstanceOf( - 'GeoIP2\Record\Continent', - $model->continent, - '$model->continent' - ); - - $this->assertInstanceOf( - 'GeoIP2\Record\Country', - $model->country, - '$model->country' - ); - - $this->assertInstanceOf( - 'GeoIP2\Record\Location', - $model->location, - '$model->location' - ); - - $this->assertInstanceOf( - 'GeoIP2\Record\Country', - $model->registeredCountry, - '$model->registeredCountry' - ); - - $this->assertInstanceOf( - 'GeoIP2\Record\RepresentedCountry', - $model->representedCountry, - '$model->representedCountry' - ); - - $this->assertCount( - 0, - $model->subdivisions, - '$model->subdivisions returns an empty list' - ); - - $this->assertInstanceOf( - 'GeoIP2\Record\Subdivision', - $model->mostSpecificSubdivision, - '$model->mostSpecificSubdivision' - ); - - $this->assertInstanceOf( - 'GeoIP2\Record\Traits', - $model->traits, - '$model->traits' - ); - - $this->assertEquals( - $raw, - $model->raw, - 'raw method returns raw input with no added empty values' - ); - } - - - public function testUnknown() - { - $raw = array( - 'new_top_level' => array( 'foo' => 42 ), - 'city' => array( - 'confidence' => 76, - 'geoname_id_id' => 9876, - 'names' => array( 'en' => 'Minneapolis' ), - 'population' => 50, - ), - 'traits' => array( 'ip_address' => '5.6.7.8' ) - ); - - // checking whether there are exceptions with unknown keys - $model = new Omni($raw, array('en')); - - $this->assertInstanceOf( - 'GeoIP2\Model\Omni', - $model, - 'no exception when Omni model gets raw data with unknown keys' - ); - - $this->assertEquals( - $raw, - $model->raw, - 'raw method returns raw input' - ); - } -} diff --git a/tests/GeoIP2/Test/WebService/ClientTest.php b/tests/GeoIP2/Test/WebService/ClientTest.php deleted file mode 100644 index 8b0f4a9..0000000 --- a/tests/GeoIP2/Test/WebService/ClientTest.php +++ /dev/null @@ -1,388 +0,0 @@ - array( - 'code' => 'NA', - 'geoname_id' => 42, - 'names' => array( 'en' => 'North America' ), - ), - 'country' => array( - 'geoname_id' => 1, - 'iso_code' => 'US', - 'names' => array( 'en' => 'United States of America' ), - ), - 'maxmind' => array('queries_remaining' => 11), - 'traits' => array( - 'ip_address' => '1.2.3.4', - ), - ); - - - private function getResponse($ip) - { - $responses = array( - '1.2.3.4' => $this->response( - 'country', - 200, - $this->country - ), - 'me' => $this->response( - 'country', - 200, - $this->country - ), - '1.2.3.5' => $this->response('country', 200), - '2.2.3.5' => $this->response('country', 200, 'bad body'), - '1.2.3.6'=> $this->response( - 'error', - 400, - array( - 'code' => 'IP_ADDRESS_INVALID', - 'error' => 'The value "1.2.3" is not a valid ip address' - ) - ), - '1.2.3.7' => $this->response( - 'error', - 400 - ), - '1.2.3.8' => $this->response( - 'error', - 400, - array( 'weird' => 42 ) - ), - '1.2.3.9' => $this->response( - 'error', - 400, - null, - 'bad body' - ), - '1.2.3.10' => $this->response( - null, - 500 - ), - '1.2.3.11' => $this->response( - null, - 300 - ), - '1.2.3.12' => $this->response( - 'error', - 406, - 'Cannot satisfy your Accept-Charset requirements', - null, - 'text/plain' - ), - ); - return $responses[$ip]; - } - - public function testCountry() - { - $country = $this->client($this->getResponse('1.2.3.4')) - ->country('1.2.3.4'); - - $this->assertInstanceOf('GeoIP2\Model\Country', $country); - - $this->assertEquals( - 42, - $country->continent->geonameId, - 'continent geoname_id is 42' - ); - - $this->assertEquals( - 'NA', - $country->continent->code, - 'continent code is NA' - ); - - $this->assertEquals( - array('en' => 'North America'), - $country->continent->names, - 'continent names' - ); - - $this->assertEquals( - 'North America', - $country->continent->name, - 'continent name is North America' - ); - - $this->assertEquals( - 1, - $country->country->geonameId, - 'country geoname_id is 1' - ); - - $this->assertEquals( - 'US', - $country->country->isoCode, - 'country iso_code is US' - ); - - $this->assertEquals( - array( 'en' => 'United States of America' ), - $country->country->names, - 'country names' - ); - - $this->assertEquals( - 'United States of America', - $country->country->name, - 'country name is United States of America' - ); - - $this->assertEquals( - 11, - $country->maxmind->queriesRemaining, - 'queriesRemaining is correct' - ); - - } - - - public function testOmni() - { - $omni = $this->client($this->getResponse('1.2.3.4')) - ->omni('1.2.3.4'); - - $this->assertInstanceOf('GeoIP2\Model\Omni', $omni); - - $this->assertEquals( - 42, - $omni->continent->geonameId, - 'continent geoname_id is 42' - ); - } - - public function testCity() - { - $city = $this->client($this->getResponse('1.2.3.4')) - ->city('1.2.3.4'); - - $this->assertInstanceOf('GeoIP2\Model\City', $city); - } - - public function testMe() - { - $client = $this->client($this->getResponse('me')); - - $this->assertInstanceOf( - 'GeoIP2\Model\CityIspOrg', - $client->cityIspOrg('me'), - 'can set ip parameter to me' - ); - } - - /** - * @expectedException GeoIP2\Exception\GeoIP2Exception - * @expectedExceptionMessage Received a 200 response for https://geoip.maxmind.com/geoip/v2.0/country/1.2.3.5 but did not receive a HTTP body. - */ - public function testNoBodyException() - { - $client = $this->client($this->getResponse('1.2.3.5')); - - $client->country('1.2.3.5'); - } - - /** - * @expectedException GeoIP2\Exception\GeoIP2Exception - * @expectedExceptionMessage Received a 200 response for https://geoip.maxmind.com/geoip/v2.0/country/2.2.3.5 but could not decode the response as JSON: - */ - public function testBadBodyException() - { - $client = $this->client($this->getResponse('2.2.3.5')); - - $client->country('2.2.3.5'); - } - - - /** - * @expectedException GeoIP2\Exception\WebServiceException - * @expectedExceptionCode 400 - * @expectedExceptionMessage The value "1.2.3" is not a valid ip address - */ - public function testInvalidIPException() - { - $client = $this->client($this->getResponse('1.2.3.6')); - - $client->country('1.2.3.6'); - - } - - /** - * @expectedException GeoIP2\Exception\HttpException - * @expectedExceptionCode 400 - * @expectedExceptionMessage with no body - */ - public function testNoErrorBodyIPException() - { - $client = $this->client($this->getResponse('1.2.3.7')); - - $client->country('1.2.3.7'); - } - - /** - * @expectedException GeoIP2\Exception\GeoIP2Exception - * @expectedExceptionMessage Response contains JSON but it does not specify code or error keys - */ - public function testWeirdErrorBodyIPException() - { - $client = $this->client($this->getResponse('1.2.3.8')); - - $client->country('1.2.3.8'); - - } - - /** - * @expectedException GeoIP2\Exception\HttpException - * @expectedExceptionCode 400 - * @expectedExceptionMessage did not include the expected JSON body - */ - public function testInvalidErrorBodyIPException() - { - $client = $this->client($this->getResponse('1.2.3.9')); - - $client->country('1.2.3.9'); - - } - - /** - * @expectedException GeoIP2\Exception\HttpException - * @expectedExceptionCode 500 - * @expectedExceptionMessage Received a server error (500) - */ - public function test500PException() - { - $client = $this->client($this->getResponse('1.2.3.10')); - - $client->country('1.2.3.10'); - - } - - /** - * @expectedException GeoIP2\Exception\HttpException - * @expectedExceptionCode 300 - * @expectedExceptionMessage Received a very surprising HTTP status (300) - */ - public function test3xxException() - { - $client = $this->client($this->getResponse('1.2.3.11')); - - $client->country('1.2.3.11'); - - } - - /** - * @expectedException GeoIP2\Exception\HttpException - * @expectedExceptionCode 406 - * @expectedExceptionMessage Received a 406 error for https://geoip.maxmind.com/geoip/v2.0/country/1.2.3.12 with the following body: Cannot satisfy your Accept-Charset requirements - */ - public function test406Exception() - { - $client = $this->client($this->getResponse('1.2.3.12')); - $client->country('1.2.3.12'); - } - - public function testParams() - { - $plugin = new MockPlugin(); - $plugin->addResponse($this->getResponse('1.2.3.4')); - $guzzleClient = new GuzzleClient(); - $guzzleClient->addSubscriber($plugin); - - $client = new Client( - 42, - 'abcdef123456', - array('en'), - 'geoip.maxmind.com', - $guzzleClient - ); - $client->country('1.2.3.4'); - - $all_requests = $plugin->getReceivedRequests(); - $request = $all_requests[0]; - - $this->assertEquals( - 'https://geoip.maxmind.com/geoip/v2.0/country/1.2.3.4', - $request->getUrl(), - 'got expected URI for Country request' - ); - $this->assertEquals( - 'GET', - $request->getMethod(), - 'request is a GET' - ); - - $this->assertEquals( - 'application/json', - $request->getHeader('Accept'), - 'request sets Accept header to application/json' - ); - - $this->assertStringMatchesFormat( - 'GeoIP2 PHP API (Guzzle%s)', - $request->getHeader('User-Agent') . '', - 'request sets Accept header to application/json' - ); - } - - - private function client($response, $languages = array('en')) - { - $plugin = new MockPlugin(); - $plugin->addResponse($response); - $guzzleClient = new GuzzleClient(); - $guzzleClient->addSubscriber($plugin); - - $client = new Client( - 42, - 'abcdef123456', - $languages, - 'geoip.maxmind.com', - $guzzleClient - ); - - return $client; - } - - private function response( - $endpoint, - $status, - $body = null, - $bad = null, - $contentType = null - ) { - $headers = array(); - if ($contentType) { - $headers['Content-Type'] = $contentType; - } elseif ($status == 200 || ( $status >= 400 && $status < 500 )) { - $headers['Content-Type'] = 'application/vnd.maxmind.com-' - . $endpoint . '+json; charset=UTF-8; version=1.0;'; - } - - if ($bad) { - $body = '{ invalid: }'; - } elseif (is_array($body)) { - $body = json_encode($body); - } - - $headers['Content-Length'] = strlen($body); - - return new Response($status, $headers, $body); - } - - public function testTest() - { - $this->assertEquals(1, 1); - } -} diff --git a/tests/bootstrap.php b/tests/bootstrap.php deleted file mode 100644 index 55b6856..0000000 --- a/tests/bootstrap.php +++ /dev/null @@ -1,7 +0,0 @@ -add('GeoIP2\Test', __DIR__);