diff --git a/docs/.sass-cache/da8f905890b670eaeac88b3ab0c25ae30453bd7f/_changes.scssc b/docs/.sass-cache/da8f905890b670eaeac88b3ab0c25ae30453bd7f/_changes.scssc new file mode 100644 index 0000000..f2ab5e8 Binary files /dev/null and b/docs/.sass-cache/da8f905890b670eaeac88b3ab0c25ae30453bd7f/_changes.scssc differ diff --git a/docs/.sass-cache/da8f905890b670eaeac88b3ab0c25ae30453bd7f/_functions.scssc b/docs/.sass-cache/da8f905890b670eaeac88b3ab0c25ae30453bd7f/_functions.scssc index 7cad304..677958b 100644 Binary files a/docs/.sass-cache/da8f905890b670eaeac88b3ab0c25ae30453bd7f/_functions.scssc and b/docs/.sass-cache/da8f905890b670eaeac88b3ab0c25ae30453bd7f/_functions.scssc differ diff --git a/docs/.sass-cache/da8f905890b670eaeac88b3ab0c25ae30453bd7f/_mixins.scssc b/docs/.sass-cache/da8f905890b670eaeac88b3ab0c25ae30453bd7f/_mixins.scssc index f57a5f4..8a68811 100644 Binary files a/docs/.sass-cache/da8f905890b670eaeac88b3ab0c25ae30453bd7f/_mixins.scssc and b/docs/.sass-cache/da8f905890b670eaeac88b3ab0c25ae30453bd7f/_mixins.scssc differ diff --git a/docs/.sass-cache/da8f905890b670eaeac88b3ab0c25ae30453bd7f/_skel.scssc b/docs/.sass-cache/da8f905890b670eaeac88b3ab0c25ae30453bd7f/_skel.scssc index d8efd2d..edeb12c 100644 Binary files a/docs/.sass-cache/da8f905890b670eaeac88b3ab0c25ae30453bd7f/_skel.scssc and b/docs/.sass-cache/da8f905890b670eaeac88b3ab0c25ae30453bd7f/_skel.scssc differ diff --git a/docs/.sass-cache/da8f905890b670eaeac88b3ab0c25ae30453bd7f/_vars.scssc b/docs/.sass-cache/da8f905890b670eaeac88b3ab0c25ae30453bd7f/_vars.scssc index fc73664..e78b03a 100644 Binary files a/docs/.sass-cache/da8f905890b670eaeac88b3ab0c25ae30453bd7f/_vars.scssc and b/docs/.sass-cache/da8f905890b670eaeac88b3ab0c25ae30453bd7f/_vars.scssc differ diff --git a/docs/_sass/libs/_changes.scss b/docs/_sass/libs/_changes.scss index 8df2b5b..f8339ce 100644 --- a/docs/_sass/libs/_changes.scss +++ b/docs/_sass/libs/_changes.scss @@ -32,6 +32,16 @@ twentytwenty-wrapper img { width: 100%; } +.features { + li { + padding: 3em 3em 1em 3em; + + h3, + p { + text-align: left; + } + } +} /* Section Three */ #three .inner { diff --git a/docs/_site/Gemfile b/docs/_site/Gemfile new file mode 100644 index 0000000..e7e2130 --- /dev/null +++ b/docs/_site/Gemfile @@ -0,0 +1,5 @@ +# frozen_string_literal: true +source "https://rubygems.org" + +gem "jekyll" +gem "spectral" diff --git a/docs/_site/Gemfile.lock b/docs/_site/Gemfile.lock new file mode 100644 index 0000000..3de2171 --- /dev/null +++ b/docs/_site/Gemfile.lock @@ -0,0 +1,49 @@ +GEM + remote: https://rubygems.org/ + specs: + addressable (2.5.1) + public_suffix (~> 2.0, >= 2.0.2) + colorator (1.1.0) + ffi (1.9.18) + forwardable-extended (2.6.0) + jekyll (3.3.1) + addressable (~> 2.4) + colorator (~> 1.0) + jekyll-sass-converter (~> 1.0) + jekyll-watch (~> 1.1) + kramdown (~> 1.3) + liquid (~> 3.0) + mercenary (~> 0.3.3) + pathutil (~> 0.9) + rouge (~> 1.7) + safe_yaml (~> 1.0) + jekyll-sass-converter (1.5.0) + sass (~> 3.4) + jekyll-watch (1.5.0) + listen (~> 3.0, < 3.1) + kramdown (1.13.2) + liquid (3.0.6) + listen (3.0.8) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + mercenary (0.3.6) + pathutil (0.14.0) + forwardable-extended (~> 2.6) + public_suffix (2.0.5) + rb-fsevent (0.9.8) + rb-inotify (0.9.8) + ffi (>= 0.5.0) + rouge (1.11.1) + safe_yaml (1.0.4) + sass (3.4.24) + spectral (0.0.0) + +PLATFORMS + ruby + +DEPENDENCIES + jekyll + spectral + +BUNDLED WITH + 1.15.1 diff --git a/docs/_site/LICENSE.txt b/docs/_site/LICENSE.txt new file mode 100755 index 0000000..856b578 --- /dev/null +++ b/docs/_site/LICENSE.txt @@ -0,0 +1,63 @@ +Creative Commons Attribution 3.0 Unported +http://creativecommons.org/licenses/by/3.0/ + +License + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. + +1. Definitions + + 1. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License. + 2. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License. + 3. "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership. + 4. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License. + 5. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast. + 6. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work. + 7. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. + 8. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images. + 9. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium. + +2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws. + +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: + + 1. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; + 2. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified."; + 3. to Distribute and Publicly Perform the Work including as incorporated in Collections; and, + 4. to Distribute and Publicly Perform Adaptations. + 5. + + For the avoidance of doubt: + 1. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; + 2. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and, + 3. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License. + +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved. + +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: + + 1. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(b), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(b), as requested. + 2. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with Section 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4 (b) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties. + 3. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise. + +5. Representations, Warranties and Disclaimer + +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. + +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Termination + + 1. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. + 2. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. + +8. Miscellaneous + + 1. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. + 2. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. + 3. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + 4. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. + 5. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. + 6. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law. diff --git a/docs/_site/README.txt b/docs/_site/README.txt new file mode 100755 index 0000000..de1f3e5 --- /dev/null +++ b/docs/_site/README.txt @@ -0,0 +1,61 @@ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +A Jekyll port of the Spectral theme by HTML5 UP. +Find the original non-jekyll theme at: http://html5up.net/ +Note: @arkadianriver is in no way associated with @n33co + other than I really like his _style_! get it? +Below is @n33co's readme from the original pure HTML theme +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Spectral by HTML5 UP +html5up.net | @n33co +Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) + + +A big, modern, blocky affair with a mobile-style menu, fully responsive styling, +and an assortment of pre-styled elements. So, pretty much what you were expecting +-- except, of course, for how it's put together, specifically: + +- It's built on Skel 3*, a leaner, more modular rewrite of my responsive framework. + + (* = still in development as of this writing) + +- It uses flexbox*, which eliminates all kinds of terrible hacks and clunky layout + stopgaps (like CSS grid systems). + + (* = not supported on IE8/9, but non-flexbox fallbacks are included) + +- It uses Sass* a lot more intelligently, thanks in part to several new mixins + and functions I've been working on (as well as a few by @HugoGiraudel). + + (* = still entirely optional if you prefer vanilla CSS :) + +- A ton of other stuff. + +In short, Spectral's the culmination of several new things I'm working on/trying out, +so please, let me know what you think :) + +Demo images* courtesy of Unsplash, a radtastic collection of CC0 (public domain) images +you can use for pretty much whatever. + +(* = not included) + +AJ +n33.co @n33co dribbble.com/n33 + + +Credits: + + Demo Images: + Unsplash (unsplash.com) + + Icons: + Font Awesome (fortawesome.github.com/Font-Awesome) + + Other: + jQuery (jquery.com) + html5shiv.js (@afarkas @jdalton @jon_neal @rem) + background-size polyfill (github.com/louisremi) + Misc. Sass functions (@HugoGiraudel) + Respond.js (j.mp/respondjs) + Skel (skel.io) \ No newline at end of file diff --git a/docs/_site/autoritario.html b/docs/_site/autoritario.html new file mode 100644 index 0000000..2913cc0 --- /dev/null +++ b/docs/_site/autoritario.html @@ -0,0 +1,180 @@ + + + + + + + + El Estado autoritario + + + + + + + + + + + + + +
+ + + + + +
+ +
+

El Estado autoritario

+

+
+ +
+
+

Fascismo Agrario y contrarreforma agraria durante el primer franquismo. Existe un amplio consenso por el que se nombra como contrarreforma agraria toda la política estatal que perseguía desmantelar cualquier cambio llevado a cabo en el ámbito rural durante la Segunda República. Carlos Barciela profundiza sobre la contrarreforma agraria y la política de colonización del primer franquismo y explicita que

+
+

La guerra civil de 1936 a 1939 supuso, entre otras cosas, el final traumático de una etapa de lento, pero persistente, progreso y modernización de la agricultura española. Progreso en los sistemas de cultivo, en la especialización y en la producción agraria. Progreso también, aunque más limitado, en la solución de los viejos problemas sociales agrarios, ya que tras una etapa marcada por una débil actuación (y por mucha literatura) hasta 1930, la Segunda República había significado el comienzo efectivo de una reforma agraria finalmente abortada por la sublevación militar de 1936.

+
+ +

Una vez trazado el objetivo de restituir el orden social agrario anterior, de forma contundente y efectiva diferentes mecanismos operarán a favor de la devolución de tierras expropiadas a sus antiguos propietarios y en la disolución de las comunidades campesinas establecidas sobre las tierras expropiadas; proceso que se iniciaría ya durante la guerra civil en zonas controladas por los sublevados. Significativa es también la represión sufrida por los sectores agrarios que habían apoyado a la República en el proceso reformista. Por todo esto algunos autores hablan de una primera fase del franquismo como fascismo agrario o fascismo rural. Así lo corrobora Cristóbal G. Benito cuando señala que el referente directo del Instituto Nacional de Colonización (INC) es el Servicio Nacional de Reforma Económica y Social de la Tierra (SNREST).

+
+

La génesis inmediata de la política de colonización del “Nuevo Estado” hay que situarla en el período 1936-1939, en plena guerra civil. En la zona controlada por los sublevados y bajo el control de la Junta de Defensa Nacional primero y después del llamado Gobierno de Burgos (1938-1939), de forma inmediata se procede a neutralizar y liquidar la reforma agraria de la República, para lo cual se crearon el Servicio Nacional de Reforma Económica y Social de la Tierra (SNREST) y el Servicio de Recuperación Agrícola (SRA), dependiente de aquel. Los cometidos básicos encomendados al SNREST son dos: Liquidar definitivamente el programa de reforma agraria de la República, y dotar de un mínimo contenido práctico el lema joseantoniano de “reforma económica y social de la tierra” del que toma el nombre el propio organismo.

+
+ +

Con motivo de la aprobación de la Ley de Recuperación Agrícola de 3 de mayo de 1938, desde el Servicio de Reforma Agrícola (SRA) se enviará una primera circular titulada Mensaje a García. Mediante este documento se dictará, tirando de anecdotario, la norma que intentará orientar el trabajo del personal técnico y administrativo, y que también permeará como uno de los requisitos en el proceso de selección del colono cuando se produce debate inicial sobre la idoneidad y la eficiencia dependiendo del perfil de los beneficiarios, agricultores sin tierra o jornaleros. También será definitorio de un estado autárquico cuyo fracaso se temporaliza en 1949 con Ley sobre Colonización y Distribución de la propiedad de las Zonas Regables, a juicio de Cristóbal G. Benito la norma más importante de la política colonizadora.

+ + +
+
+ +
+ + + + + + + + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/docs/_site/colono-ciudadano.html b/docs/_site/colono-ciudadano.html new file mode 100644 index 0000000..10ec6a8 --- /dev/null +++ b/docs/_site/colono-ciudadano.html @@ -0,0 +1,169 @@ + + + + + + + + De colonos a ciudadanos + + + + + + + + + + + + + +
+ + + + + +
+ +
+

De colonos a ciudadanos

+

+
+ +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/docs/_site/colono.html b/docs/_site/colono.html new file mode 100644 index 0000000..f68f4bb --- /dev/null +++ b/docs/_site/colono.html @@ -0,0 +1,201 @@ + + + + + + + + El colono + + + + + + + + + + + + + +
+ + + + + +
+ +
+

El colono

+

+
+ +
+
+

El buen colono. La selección del colono es uno de los aspectos centrales del proceso de colonización, éste conlleva el establecimiento de unos critrerios de selección básicos que aparecerán enumerados en la Ley de 1949 sobre colonización y distribución de la propiedad de las zonas regables y que dependiendo de los emplazamientos introducirían matices. Así por ejemplo para el Plan Badajoz las prioridades de acceso al programa que se establecieron formalmente fueron:

+
+ +
+
    +
  1. Arrendatarios o aparceros de tierras afectadas por la transformación en regadío, siempre que no sean propietarios de otras tierras con superficie suficiente para el mantenimiento de una familia.
  2. +
  3. Colonos o braceros de las comarcas o términos municipales de la provincia de Badajoz en que del estudio económico social efectuado por el INC se deduzca la necesidad de traslado de parte de la población rural a las zonas regables.
  4. +
  5. Propietarios arrendadores de la zona que no tengan derecho a reserva y lo soliciten de acuerdo con los artículos noveno y doce de la ley de 1949.
  6. +
  7. Colonos o labradores modestos de otras comarcas españolas con medios de producción y conocimientos del cultivo de regadío, que habrán de demostrar, mediante las pruebas correspondientes, ante el personal técnico del INC. Del total de labradores que con arreglo a las presentes normas se instalen, el veinte por ciento habrá de ser elegido precisamente entre los que el Instituto, previas las pruebas pertinentes, considere que cuentan con conocimientos de las prácticas de regadío. Si dentro del ámbito provincial no se alcanza el indicado porcentaje, se complementará con los colonos o labradores del grupo cuarto.
  8. +
+ +

Los requisitos indispensables vinculados directamente con la situación personal del candidato se repetían, y aunque con algunas variaciones, mantenían unos criterios muy similares:

+ +
    +
  1. Ser mayor de 23 años, licenciado del ejército o exento del servicio militar.
  2. +
  3. Acreditar una préctica agrícola reciente de 2 años al menos.
  4. +
  5. Acreditar unas dotes de moralidad y conducta aceptables
  6. +
+

Además se priorizarían los que a su vez los que:

+
    +
  1. Poseyeran conocimientos de regadío.
  2. +
  3. Estuvieran casados o fueran viudos con hijos.
  4. +
  5. Tuvieran el mayor número de hijos.
  6. +
  7. Supieran leer y escribir. Los analfabetos que resulten admitidos están obligados a aprender a leer y escribir en un plazo de tres años pudiendo ser expulsado por la Dirección General de Colonización si no cumpliera con el compromiso.
  8. +
  9. Tuvieran menos de cincuenta años.
  10. +
+

Las condiciones serán modificadas a partir de 1958, o al menos así sucede para la Delegación de Talavera de la Reina, donde serán las unidades familiares del trabajo las que definan con más precisión el acceso.

+ +

No podemos dejar de señalar el rol que la iglesia católica tiene tanto en el proceso de selección como en el acompañamiento doctrinal en estos nuevos espacios construidos. Las referencias son numerosas, pero destacaremos el artículo aparecido en el principal medio propagandístico con el que el INC contaba, la revista Colonización y que encaja con el modelo paternalista que el Estado promueve.

+ +
+

Un colono que tenga una primaria fe religiosa, un elemental concepto del deber y honradez, que se encuentre sano de cuerpo, sin tristes taras hereditarias, con una elemental instrucción, será el germen que asegure un desenvolvimiento próspero del núcleo de población creado. -ESCARDÓ PEINADOR, G. El hombre, factor básico de la colonización. Colonización , nº 9, 1949

+
+ +
+
+ +
+ + + + + + + + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/docs/_site/contexto.html b/docs/_site/contexto.html new file mode 100644 index 0000000..5acfbab --- /dev/null +++ b/docs/_site/contexto.html @@ -0,0 +1,173 @@ + + + + + + + + Raíces de la colonización agraria + + + + + + + + + + + + + +
+ + + + + +
+ +
+

Raíces de la colonización agraria

+

+
+ +
+
+

El proyecto y políticas de colonización agraria del Estado +franquista desplegadas por el Instituto Nacional de Colonización (1939-1973) no +surgen de la nada. Siguiendo a Cristóbal Gómez Benito en ella confluyen las políticas históricas repobladoras y de colonización, la +de reforma agraria y la política hidráulica.  

+ + +
+
+ +
+ + + + + + + + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/docs/_site/css/font-awesome.min.css b/docs/_site/css/font-awesome.min.css new file mode 100755 index 0000000..ee4e978 --- /dev/null +++ b/docs/_site/css/font-awesome.min.css @@ -0,0 +1,4 @@ +/*! + * Font Awesome 4.4.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.4.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.4.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.4.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.4.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.4.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.4.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"} diff --git a/docs/_site/css/ie8.css b/docs/_site/css/ie8.css new file mode 100644 index 0000000..a0b1cb1 --- /dev/null +++ b/docs/_site/css/ie8.css @@ -0,0 +1,66 @@ +/* + Spectral by HTML5 UP + html5up.net | @n33co + Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) +*/ +/* Icon */ +.icon.major { + border: none; } + .icon.major:before { + font-size: 3em; } + +/* Form */ +label { + color: #2E3842; } + +input[type="text"], +input[type="password"], +input[type="email"], +select, +textarea { + border: solid 1px #dfdfdf; } + +/* Button */ +input[type="submit"], +input[type="reset"], +input[type="button"], +button, +.button { + border: solid 2px #dfdfdf; } + input[type="submit"].special, + input[type="reset"].special, + input[type="button"].special, + button.special, + .button.special { + border: 0 !important; } + +/* Page Wrapper + Menu */ +#menu { + display: none; } + +body.is-menu-visible #menu { + display: block; } + +/* Header */ +#header nav > ul > li > a.menuToggle:after { + display: none; } + +/* Banner + Wrapper (style4) */ +#banner, +.wrapper.style4 { + -ms-behavior: url("js/ie/backgroundsize.min.htc"); } + #banner:before, + .wrapper.style4:before { + display: none; } + +/* Banner */ +#banner .more { + height: 4em; } + #banner .more:after { + display: none; } + +/* Main */ +#main > header { + -ms-behavior: url("js/ie/backgroundsize.min.htc"); } + #main > header:before { + display: none; } diff --git a/docs/_site/css/ie9.css b/docs/_site/css/ie9.css new file mode 100644 index 0000000..c91e88e --- /dev/null +++ b/docs/_site/css/ie9.css @@ -0,0 +1,88 @@ +/* + Spectral by HTML5 UP + html5up.net | @n33co + Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) +*/ +/* Spotlight */ +.spotlight { + display: block; } + .spotlight .image { + display: inline-block; + vertical-align: top; } + .spotlight .content { + padding: 4em 4em 2em 4em ; + display: inline-block; } + .spotlight:after { + clear: both; + content: ''; + display: block; } + +/* Features */ +.features { + display: block; } + .features li { + float: left; } + .features:after { + content: ''; + display: block; + clear: both; } + +/* Banner + Wrapper (style4) */ +#banner, +.wrapper.style4 { + background-image: url("../../images/banner.jpg"); + background-position: center center; + background-repeat: no-repeat; + background-size: cover; + position: relative; } + #banner:before, + .wrapper.style4:before { + background: #000000; + content: ''; + height: 100%; + left: 0; + opacity: 0.5; + position: absolute; + top: 0; + width: 100%; } + #banner .inner, + .wrapper.style4 .inner { + position: relative; + z-index: 1; } + +/* Banner */ +#banner { + padding: 14em 0 12em 0 ; + height: auto; } + #banner:after { + display: none; } + +/* CTA */ +#cta .inner header { + float: left; } +#cta .inner .actions { + float: left; } +#cta .inner:after { + clear: both; + content: ''; + display: block; } + +/* Main */ +#main > header { + background-image: url("../../images/banner.jpg"); + background-position: center center; + background-repeat: no-repeat; + background-size: cover; + position: relative; } + #main > header:before { + background: #000000; + content: ''; + height: 100%; + left: 0; + opacity: 0.5; + position: absolute; + top: 0; + width: 100%; } + #main > header > * { + position: relative; + z-index: 1; } diff --git a/docs/_site/css/images/arrow.svg b/docs/_site/css/images/arrow.svg new file mode 100755 index 0000000..a76c07e --- /dev/null +++ b/docs/_site/css/images/arrow.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/docs/_site/css/images/bars.svg b/docs/_site/css/images/bars.svg new file mode 100755 index 0000000..467fb97 --- /dev/null +++ b/docs/_site/css/images/bars.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/docs/_site/css/images/close.svg b/docs/_site/css/images/close.svg new file mode 100755 index 0000000..f80a2a3 --- /dev/null +++ b/docs/_site/css/images/close.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/docs/_site/css/images/inc-logo.png b/docs/_site/css/images/inc-logo.png new file mode 100644 index 0000000..38db12b Binary files /dev/null and b/docs/_site/css/images/inc-logo.png differ diff --git a/docs/_site/css/main.css b/docs/_site/css/main.css new file mode 100644 index 0000000..e89c4dd --- /dev/null +++ b/docs/_site/css/main.css @@ -0,0 +1,2717 @@ +@import url(font-awesome.min.css); +@import url("//fonts.googleapis.com/css?family=PT+Serif:400,400i,700"); +/* + Spectral by HTML5 UP + html5up.net | @n33co + Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) +*/ +/* Reset */ +html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; } + +article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { + display: block; } + +body { + line-height: 1; } + +ol, ul { + list-style: none; } + +blockquote, q { + quotes: none; } + +blockquote:before, blockquote:after, q:before, q:after { + content: ''; + content: none; } + +table { + border-collapse: collapse; + border-spacing: 0; } + +body { + -webkit-text-size-adjust: none; } + +/* Box Model */ +*, *:before, *:after { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; } + +/* Grid */ +.row { + border-bottom: solid 1px transparent; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; } + +.row > * { + float: left; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; } + +.row:after, .row:before { + content: ''; + display: block; + clear: both; + height: 0; } + +.row.uniform > * > :first-child { + margin-top: 0; } + +.row.uniform > * > :last-child { + margin-bottom: 0; } + +.row.\30 \25 > * { + padding: 0 0 0 0em; } + +.row.\30 \25 { + margin: 0 0 -1px 0em; } + +.row.uniform.\30 \25 > * { + padding: 0em 0 0 0em; } + +.row.uniform.\30 \25 { + margin: 0em 0 -1px 0em; } + +.row > * { + padding: 0 0 0 1.5em; } + +.row { + margin: 0 0 -1px -1.5em; } + +.row.uniform > * { + padding: 1.5em 0 0 1.5em; } + +.row.uniform { + margin: -1.5em 0 -1px -1.5em; } + +.row.\32 00\25 > * { + padding: 0 0 0 3em; } + +.row.\32 00\25 { + margin: 0 0 -1px -3em; } + +.row.uniform.\32 00\25 > * { + padding: 3em 0 0 3em; } + +.row.uniform.\32 00\25 { + margin: -3em 0 -1px -3em; } + +.row.\31 50\25 > * { + padding: 0 0 0 2.25em; } + +.row.\31 50\25 { + margin: 0 0 -1px -2.25em; } + +.row.uniform.\31 50\25 > * { + padding: 2.25em 0 0 2.25em; } + +.row.uniform.\31 50\25 { + margin: -2.25em 0 -1px -2.25em; } + +.row.\35 0\25 > * { + padding: 0 0 0 0.75em; } + +.row.\35 0\25 { + margin: 0 0 -1px -0.75em; } + +.row.uniform.\35 0\25 > * { + padding: 0.75em 0 0 0.75em; } + +.row.uniform.\35 0\25 { + margin: -0.75em 0 -1px -0.75em; } + +.row.\32 5\25 > * { + padding: 0 0 0 0.375em; } + +.row.\32 5\25 { + margin: 0 0 -1px -0.375em; } + +.row.uniform.\32 5\25 > * { + padding: 0.375em 0 0 0.375em; } + +.row.uniform.\32 5\25 { + margin: -0.375em 0 -1px -0.375em; } + +.\31 2u, .\31 2u\24 { + width: 100%; + clear: none; + margin-left: 0; } + +.\31 1u, .\31 1u\24 { + width: 91.6666666667%; + clear: none; + margin-left: 0; } + +.\31 0u, .\31 0u\24 { + width: 83.3333333333%; + clear: none; + margin-left: 0; } + +.\39 u, .\39 u\24 { + width: 75%; + clear: none; + margin-left: 0; } + +.\38 u, .\38 u\24 { + width: 66.6666666667%; + clear: none; + margin-left: 0; } + +.\37 u, .\37 u\24 { + width: 58.3333333333%; + clear: none; + margin-left: 0; } + +.\36 u, .\36 u\24 { + width: 50%; + clear: none; + margin-left: 0; } + +.\35 u, .\35 u\24 { + width: 41.6666666667%; + clear: none; + margin-left: 0; } + +.\34 u, .\34 u\24 { + width: 33.3333333333%; + clear: none; + margin-left: 0; } + +.\33 u, .\33 u\24 { + width: 25%; + clear: none; + margin-left: 0; } + +.\32 u, .\32 u\24 { + width: 16.6666666667%; + clear: none; + margin-left: 0; } + +.\31 u, .\31 u\24 { + width: 8.3333333333%; + clear: none; + margin-left: 0; } + +.\31 2u\24 + *, +.\31 1u\24 + *, +.\31 0u\24 + *, +.\39 u\24 + *, +.\38 u\24 + *, +.\37 u\24 + *, +.\36 u\24 + *, +.\35 u\24 + *, +.\34 u\24 + *, +.\33 u\24 + *, +.\32 u\24 + *, +.\31 u\24 + * { + clear: left; } + +.\-11u { + margin-left: 91.66667%; } + +.\-10u { + margin-left: 83.33333%; } + +.\-9u { + margin-left: 75%; } + +.\-8u { + margin-left: 66.66667%; } + +.\-7u { + margin-left: 58.33333%; } + +.\-6u { + margin-left: 50%; } + +.\-5u { + margin-left: 41.66667%; } + +.\-4u { + margin-left: 33.33333%; } + +.\-3u { + margin-left: 25%; } + +.\-2u { + margin-left: 16.66667%; } + +.\-1u { + margin-left: 8.33333%; } + +@media screen and (max-width: 1680px) { + .row > * { + padding: 0 0 0 1.5em; } + + .row { + margin: 0 0 -1px -1.5em; } + + .row.uniform > * { + padding: 1.5em 0 0 1.5em; } + + .row.uniform { + margin: -1.5em 0 -1px -1.5em; } + + .row.\32 00\25 > * { + padding: 0 0 0 3em; } + + .row.\32 00\25 { + margin: 0 0 -1px -3em; } + + .row.uniform.\32 00\25 > * { + padding: 3em 0 0 3em; } + + .row.uniform.\32 00\25 { + margin: -3em 0 -1px -3em; } + + .row.\31 50\25 > * { + padding: 0 0 0 2.25em; } + + .row.\31 50\25 { + margin: 0 0 -1px -2.25em; } + + .row.uniform.\31 50\25 > * { + padding: 2.25em 0 0 2.25em; } + + .row.uniform.\31 50\25 { + margin: -2.25em 0 -1px -2.25em; } + + .row.\35 0\25 > * { + padding: 0 0 0 0.75em; } + + .row.\35 0\25 { + margin: 0 0 -1px -0.75em; } + + .row.uniform.\35 0\25 > * { + padding: 0.75em 0 0 0.75em; } + + .row.uniform.\35 0\25 { + margin: -0.75em 0 -1px -0.75em; } + + .row.\32 5\25 > * { + padding: 0 0 0 0.375em; } + + .row.\32 5\25 { + margin: 0 0 -1px -0.375em; } + + .row.uniform.\32 5\25 > * { + padding: 0.375em 0 0 0.375em; } + + .row.uniform.\32 5\25 { + margin: -0.375em 0 -1px -0.375em; } + + .\31 2u\28xlarge\29, .\31 2u\24\28xlarge\29 { + width: 100%; + clear: none; + margin-left: 0; } + + .\31 1u\28xlarge\29, .\31 1u\24\28xlarge\29 { + width: 91.6666666667%; + clear: none; + margin-left: 0; } + + .\31 0u\28xlarge\29, .\31 0u\24\28xlarge\29 { + width: 83.3333333333%; + clear: none; + margin-left: 0; } + + .\39 u\28xlarge\29, .\39 u\24\28xlarge\29 { + width: 75%; + clear: none; + margin-left: 0; } + + .\38 u\28xlarge\29, .\38 u\24\28xlarge\29 { + width: 66.6666666667%; + clear: none; + margin-left: 0; } + + .\37 u\28xlarge\29, .\37 u\24\28xlarge\29 { + width: 58.3333333333%; + clear: none; + margin-left: 0; } + + .\36 u\28xlarge\29, .\36 u\24\28xlarge\29 { + width: 50%; + clear: none; + margin-left: 0; } + + .\35 u\28xlarge\29, .\35 u\24\28xlarge\29 { + width: 41.6666666667%; + clear: none; + margin-left: 0; } + + .\34 u\28xlarge\29, .\34 u\24\28xlarge\29 { + width: 33.3333333333%; + clear: none; + margin-left: 0; } + + .\33 u\28xlarge\29, .\33 u\24\28xlarge\29 { + width: 25%; + clear: none; + margin-left: 0; } + + .\32 u\28xlarge\29, .\32 u\24\28xlarge\29 { + width: 16.6666666667%; + clear: none; + margin-left: 0; } + + .\31 u\28xlarge\29, .\31 u\24\28xlarge\29 { + width: 8.3333333333%; + clear: none; + margin-left: 0; } + + .\31 2u\24\28xlarge\29 + *, + .\31 1u\24\28xlarge\29 + *, + .\31 0u\24\28xlarge\29 + *, + .\39 u\24\28xlarge\29 + *, + .\38 u\24\28xlarge\29 + *, + .\37 u\24\28xlarge\29 + *, + .\36 u\24\28xlarge\29 + *, + .\35 u\24\28xlarge\29 + *, + .\34 u\24\28xlarge\29 + *, + .\33 u\24\28xlarge\29 + *, + .\32 u\24\28xlarge\29 + *, + .\31 u\24\28xlarge\29 + * { + clear: left; } + + .\-11u\28xlarge\29 { + margin-left: 91.66667%; } + + .\-10u\28xlarge\29 { + margin-left: 83.33333%; } + + .\-9u\28xlarge\29 { + margin-left: 75%; } + + .\-8u\28xlarge\29 { + margin-left: 66.66667%; } + + .\-7u\28xlarge\29 { + margin-left: 58.33333%; } + + .\-6u\28xlarge\29 { + margin-left: 50%; } + + .\-5u\28xlarge\29 { + margin-left: 41.66667%; } + + .\-4u\28xlarge\29 { + margin-left: 33.33333%; } + + .\-3u\28xlarge\29 { + margin-left: 25%; } + + .\-2u\28xlarge\29 { + margin-left: 16.66667%; } + + .\-1u\28xlarge\29 { + margin-left: 8.33333%; } } +@media screen and (max-width: 1280px) { + .row > * { + padding: 0 0 0 1.5em; } + + .row { + margin: 0 0 -1px -1.5em; } + + .row.uniform > * { + padding: 1.5em 0 0 1.5em; } + + .row.uniform { + margin: -1.5em 0 -1px -1.5em; } + + .row.\32 00\25 > * { + padding: 0 0 0 3em; } + + .row.\32 00\25 { + margin: 0 0 -1px -3em; } + + .row.uniform.\32 00\25 > * { + padding: 3em 0 0 3em; } + + .row.uniform.\32 00\25 { + margin: -3em 0 -1px -3em; } + + .row.\31 50\25 > * { + padding: 0 0 0 2.25em; } + + .row.\31 50\25 { + margin: 0 0 -1px -2.25em; } + + .row.uniform.\31 50\25 > * { + padding: 2.25em 0 0 2.25em; } + + .row.uniform.\31 50\25 { + margin: -2.25em 0 -1px -2.25em; } + + .row.\35 0\25 > * { + padding: 0 0 0 0.75em; } + + .row.\35 0\25 { + margin: 0 0 -1px -0.75em; } + + .row.uniform.\35 0\25 > * { + padding: 0.75em 0 0 0.75em; } + + .row.uniform.\35 0\25 { + margin: -0.75em 0 -1px -0.75em; } + + .row.\32 5\25 > * { + padding: 0 0 0 0.375em; } + + .row.\32 5\25 { + margin: 0 0 -1px -0.375em; } + + .row.uniform.\32 5\25 > * { + padding: 0.375em 0 0 0.375em; } + + .row.uniform.\32 5\25 { + margin: -0.375em 0 -1px -0.375em; } + + .\31 2u\28large\29, .\31 2u\24\28large\29 { + width: 100%; + clear: none; + margin-left: 0; } + + .\31 1u\28large\29, .\31 1u\24\28large\29 { + width: 91.6666666667%; + clear: none; + margin-left: 0; } + + .\31 0u\28large\29, .\31 0u\24\28large\29 { + width: 83.3333333333%; + clear: none; + margin-left: 0; } + + .\39 u\28large\29, .\39 u\24\28large\29 { + width: 75%; + clear: none; + margin-left: 0; } + + .\38 u\28large\29, .\38 u\24\28large\29 { + width: 66.6666666667%; + clear: none; + margin-left: 0; } + + .\37 u\28large\29, .\37 u\24\28large\29 { + width: 58.3333333333%; + clear: none; + margin-left: 0; } + + .\36 u\28large\29, .\36 u\24\28large\29 { + width: 50%; + clear: none; + margin-left: 0; } + + .\35 u\28large\29, .\35 u\24\28large\29 { + width: 41.6666666667%; + clear: none; + margin-left: 0; } + + .\34 u\28large\29, .\34 u\24\28large\29 { + width: 33.3333333333%; + clear: none; + margin-left: 0; } + + .\33 u\28large\29, .\33 u\24\28large\29 { + width: 25%; + clear: none; + margin-left: 0; } + + .\32 u\28large\29, .\32 u\24\28large\29 { + width: 16.6666666667%; + clear: none; + margin-left: 0; } + + .\31 u\28large\29, .\31 u\24\28large\29 { + width: 8.3333333333%; + clear: none; + margin-left: 0; } + + .\31 2u\24\28large\29 + *, + .\31 1u\24\28large\29 + *, + .\31 0u\24\28large\29 + *, + .\39 u\24\28large\29 + *, + .\38 u\24\28large\29 + *, + .\37 u\24\28large\29 + *, + .\36 u\24\28large\29 + *, + .\35 u\24\28large\29 + *, + .\34 u\24\28large\29 + *, + .\33 u\24\28large\29 + *, + .\32 u\24\28large\29 + *, + .\31 u\24\28large\29 + * { + clear: left; } + + .\-11u\28large\29 { + margin-left: 91.66667%; } + + .\-10u\28large\29 { + margin-left: 83.33333%; } + + .\-9u\28large\29 { + margin-left: 75%; } + + .\-8u\28large\29 { + margin-left: 66.66667%; } + + .\-7u\28large\29 { + margin-left: 58.33333%; } + + .\-6u\28large\29 { + margin-left: 50%; } + + .\-5u\28large\29 { + margin-left: 41.66667%; } + + .\-4u\28large\29 { + margin-left: 33.33333%; } + + .\-3u\28large\29 { + margin-left: 25%; } + + .\-2u\28large\29 { + margin-left: 16.66667%; } + + .\-1u\28large\29 { + margin-left: 8.33333%; } } +@media screen and (max-width: 980px) { + .row > * { + padding: 0 0 0 1.5em; } + + .row { + margin: 0 0 -1px -1.5em; } + + .row.uniform > * { + padding: 1.5em 0 0 1.5em; } + + .row.uniform { + margin: -1.5em 0 -1px -1.5em; } + + .row.\32 00\25 > * { + padding: 0 0 0 3em; } + + .row.\32 00\25 { + margin: 0 0 -1px -3em; } + + .row.uniform.\32 00\25 > * { + padding: 3em 0 0 3em; } + + .row.uniform.\32 00\25 { + margin: -3em 0 -1px -3em; } + + .row.\31 50\25 > * { + padding: 0 0 0 2.25em; } + + .row.\31 50\25 { + margin: 0 0 -1px -2.25em; } + + .row.uniform.\31 50\25 > * { + padding: 2.25em 0 0 2.25em; } + + .row.uniform.\31 50\25 { + margin: -2.25em 0 -1px -2.25em; } + + .row.\35 0\25 > * { + padding: 0 0 0 0.75em; } + + .row.\35 0\25 { + margin: 0 0 -1px -0.75em; } + + .row.uniform.\35 0\25 > * { + padding: 0.75em 0 0 0.75em; } + + .row.uniform.\35 0\25 { + margin: -0.75em 0 -1px -0.75em; } + + .row.\32 5\25 > * { + padding: 0 0 0 0.375em; } + + .row.\32 5\25 { + margin: 0 0 -1px -0.375em; } + + .row.uniform.\32 5\25 > * { + padding: 0.375em 0 0 0.375em; } + + .row.uniform.\32 5\25 { + margin: -0.375em 0 -1px -0.375em; } + + .\31 2u\28medium\29, .\31 2u\24\28medium\29 { + width: 100%; + clear: none; + margin-left: 0; } + + .\31 1u\28medium\29, .\31 1u\24\28medium\29 { + width: 91.6666666667%; + clear: none; + margin-left: 0; } + + .\31 0u\28medium\29, .\31 0u\24\28medium\29 { + width: 83.3333333333%; + clear: none; + margin-left: 0; } + + .\39 u\28medium\29, .\39 u\24\28medium\29 { + width: 75%; + clear: none; + margin-left: 0; } + + .\38 u\28medium\29, .\38 u\24\28medium\29 { + width: 66.6666666667%; + clear: none; + margin-left: 0; } + + .\37 u\28medium\29, .\37 u\24\28medium\29 { + width: 58.3333333333%; + clear: none; + margin-left: 0; } + + .\36 u\28medium\29, .\36 u\24\28medium\29 { + width: 50%; + clear: none; + margin-left: 0; } + + .\35 u\28medium\29, .\35 u\24\28medium\29 { + width: 41.6666666667%; + clear: none; + margin-left: 0; } + + .\34 u\28medium\29, .\34 u\24\28medium\29 { + width: 33.3333333333%; + clear: none; + margin-left: 0; } + + .\33 u\28medium\29, .\33 u\24\28medium\29 { + width: 25%; + clear: none; + margin-left: 0; } + + .\32 u\28medium\29, .\32 u\24\28medium\29 { + width: 16.6666666667%; + clear: none; + margin-left: 0; } + + .\31 u\28medium\29, .\31 u\24\28medium\29 { + width: 8.3333333333%; + clear: none; + margin-left: 0; } + + .\31 2u\24\28medium\29 + *, + .\31 1u\24\28medium\29 + *, + .\31 0u\24\28medium\29 + *, + .\39 u\24\28medium\29 + *, + .\38 u\24\28medium\29 + *, + .\37 u\24\28medium\29 + *, + .\36 u\24\28medium\29 + *, + .\35 u\24\28medium\29 + *, + .\34 u\24\28medium\29 + *, + .\33 u\24\28medium\29 + *, + .\32 u\24\28medium\29 + *, + .\31 u\24\28medium\29 + * { + clear: left; } + + .\-11u\28medium\29 { + margin-left: 91.66667%; } + + .\-10u\28medium\29 { + margin-left: 83.33333%; } + + .\-9u\28medium\29 { + margin-left: 75%; } + + .\-8u\28medium\29 { + margin-left: 66.66667%; } + + .\-7u\28medium\29 { + margin-left: 58.33333%; } + + .\-6u\28medium\29 { + margin-left: 50%; } + + .\-5u\28medium\29 { + margin-left: 41.66667%; } + + .\-4u\28medium\29 { + margin-left: 33.33333%; } + + .\-3u\28medium\29 { + margin-left: 25%; } + + .\-2u\28medium\29 { + margin-left: 16.66667%; } + + .\-1u\28medium\29 { + margin-left: 8.33333%; } } +@media screen and (max-width: 736px) { + .row > * { + padding: 0 0 0 1.5em; } + + .row { + margin: 0 0 -1px -1.5em; } + + .row.uniform > * { + padding: 1.5em 0 0 1.5em; } + + .row.uniform { + margin: -1.5em 0 -1px -1.5em; } + + .row.\32 00\25 > * { + padding: 0 0 0 3em; } + + .row.\32 00\25 { + margin: 0 0 -1px -3em; } + + .row.uniform.\32 00\25 > * { + padding: 3em 0 0 3em; } + + .row.uniform.\32 00\25 { + margin: -3em 0 -1px -3em; } + + .row.\31 50\25 > * { + padding: 0 0 0 2.25em; } + + .row.\31 50\25 { + margin: 0 0 -1px -2.25em; } + + .row.uniform.\31 50\25 > * { + padding: 2.25em 0 0 2.25em; } + + .row.uniform.\31 50\25 { + margin: -2.25em 0 -1px -2.25em; } + + .row.\35 0\25 > * { + padding: 0 0 0 0.75em; } + + .row.\35 0\25 { + margin: 0 0 -1px -0.75em; } + + .row.uniform.\35 0\25 > * { + padding: 0.75em 0 0 0.75em; } + + .row.uniform.\35 0\25 { + margin: -0.75em 0 -1px -0.75em; } + + .row.\32 5\25 > * { + padding: 0 0 0 0.375em; } + + .row.\32 5\25 { + margin: 0 0 -1px -0.375em; } + + .row.uniform.\32 5\25 > * { + padding: 0.375em 0 0 0.375em; } + + .row.uniform.\32 5\25 { + margin: -0.375em 0 -1px -0.375em; } + + .\31 2u\28small\29, .\31 2u\24\28small\29 { + width: 100%; + clear: none; + margin-left: 0; } + + .\31 1u\28small\29, .\31 1u\24\28small\29 { + width: 91.6666666667%; + clear: none; + margin-left: 0; } + + .\31 0u\28small\29, .\31 0u\24\28small\29 { + width: 83.3333333333%; + clear: none; + margin-left: 0; } + + .\39 u\28small\29, .\39 u\24\28small\29 { + width: 75%; + clear: none; + margin-left: 0; } + + .\38 u\28small\29, .\38 u\24\28small\29 { + width: 66.6666666667%; + clear: none; + margin-left: 0; } + + .\37 u\28small\29, .\37 u\24\28small\29 { + width: 58.3333333333%; + clear: none; + margin-left: 0; } + + .\36 u\28small\29, .\36 u\24\28small\29 { + width: 50%; + clear: none; + margin-left: 0; } + + .\35 u\28small\29, .\35 u\24\28small\29 { + width: 41.6666666667%; + clear: none; + margin-left: 0; } + + .\34 u\28small\29, .\34 u\24\28small\29 { + width: 33.3333333333%; + clear: none; + margin-left: 0; } + + .\33 u\28small\29, .\33 u\24\28small\29 { + width: 25%; + clear: none; + margin-left: 0; } + + .\32 u\28small\29, .\32 u\24\28small\29 { + width: 16.6666666667%; + clear: none; + margin-left: 0; } + + .\31 u\28small\29, .\31 u\24\28small\29 { + width: 8.3333333333%; + clear: none; + margin-left: 0; } + + .\31 2u\24\28small\29 + *, + .\31 1u\24\28small\29 + *, + .\31 0u\24\28small\29 + *, + .\39 u\24\28small\29 + *, + .\38 u\24\28small\29 + *, + .\37 u\24\28small\29 + *, + .\36 u\24\28small\29 + *, + .\35 u\24\28small\29 + *, + .\34 u\24\28small\29 + *, + .\33 u\24\28small\29 + *, + .\32 u\24\28small\29 + *, + .\31 u\24\28small\29 + * { + clear: left; } + + .\-11u\28small\29 { + margin-left: 91.66667%; } + + .\-10u\28small\29 { + margin-left: 83.33333%; } + + .\-9u\28small\29 { + margin-left: 75%; } + + .\-8u\28small\29 { + margin-left: 66.66667%; } + + .\-7u\28small\29 { + margin-left: 58.33333%; } + + .\-6u\28small\29 { + margin-left: 50%; } + + .\-5u\28small\29 { + margin-left: 41.66667%; } + + .\-4u\28small\29 { + margin-left: 33.33333%; } + + .\-3u\28small\29 { + margin-left: 25%; } + + .\-2u\28small\29 { + margin-left: 16.66667%; } + + .\-1u\28small\29 { + margin-left: 8.33333%; } } +@media screen and (max-width: 480px) { + .row > * { + padding: 0 0 0 1.5em; } + + .row { + margin: 0 0 -1px -1.5em; } + + .row.uniform > * { + padding: 1.5em 0 0 1.5em; } + + .row.uniform { + margin: -1.5em 0 -1px -1.5em; } + + .row.\32 00\25 > * { + padding: 0 0 0 3em; } + + .row.\32 00\25 { + margin: 0 0 -1px -3em; } + + .row.uniform.\32 00\25 > * { + padding: 3em 0 0 3em; } + + .row.uniform.\32 00\25 { + margin: -3em 0 -1px -3em; } + + .row.\31 50\25 > * { + padding: 0 0 0 2.25em; } + + .row.\31 50\25 { + margin: 0 0 -1px -2.25em; } + + .row.uniform.\31 50\25 > * { + padding: 2.25em 0 0 2.25em; } + + .row.uniform.\31 50\25 { + margin: -2.25em 0 -1px -2.25em; } + + .row.\35 0\25 > * { + padding: 0 0 0 0.75em; } + + .row.\35 0\25 { + margin: 0 0 -1px -0.75em; } + + .row.uniform.\35 0\25 > * { + padding: 0.75em 0 0 0.75em; } + + .row.uniform.\35 0\25 { + margin: -0.75em 0 -1px -0.75em; } + + .row.\32 5\25 > * { + padding: 0 0 0 0.375em; } + + .row.\32 5\25 { + margin: 0 0 -1px -0.375em; } + + .row.uniform.\32 5\25 > * { + padding: 0.375em 0 0 0.375em; } + + .row.uniform.\32 5\25 { + margin: -0.375em 0 -1px -0.375em; } + + .\31 2u\28xsmall\29, .\31 2u\24\28xsmall\29 { + width: 100%; + clear: none; + margin-left: 0; } + + .\31 1u\28xsmall\29, .\31 1u\24\28xsmall\29 { + width: 91.6666666667%; + clear: none; + margin-left: 0; } + + .\31 0u\28xsmall\29, .\31 0u\24\28xsmall\29 { + width: 83.3333333333%; + clear: none; + margin-left: 0; } + + .\39 u\28xsmall\29, .\39 u\24\28xsmall\29 { + width: 75%; + clear: none; + margin-left: 0; } + + .\38 u\28xsmall\29, .\38 u\24\28xsmall\29 { + width: 66.6666666667%; + clear: none; + margin-left: 0; } + + .\37 u\28xsmall\29, .\37 u\24\28xsmall\29 { + width: 58.3333333333%; + clear: none; + margin-left: 0; } + + .\36 u\28xsmall\29, .\36 u\24\28xsmall\29 { + width: 50%; + clear: none; + margin-left: 0; } + + .\35 u\28xsmall\29, .\35 u\24\28xsmall\29 { + width: 41.6666666667%; + clear: none; + margin-left: 0; } + + .\34 u\28xsmall\29, .\34 u\24\28xsmall\29 { + width: 33.3333333333%; + clear: none; + margin-left: 0; } + + .\33 u\28xsmall\29, .\33 u\24\28xsmall\29 { + width: 25%; + clear: none; + margin-left: 0; } + + .\32 u\28xsmall\29, .\32 u\24\28xsmall\29 { + width: 16.6666666667%; + clear: none; + margin-left: 0; } + + .\31 u\28xsmall\29, .\31 u\24\28xsmall\29 { + width: 8.3333333333%; + clear: none; + margin-left: 0; } + + .\31 2u\24\28xsmall\29 + *, + .\31 1u\24\28xsmall\29 + *, + .\31 0u\24\28xsmall\29 + *, + .\39 u\24\28xsmall\29 + *, + .\38 u\24\28xsmall\29 + *, + .\37 u\24\28xsmall\29 + *, + .\36 u\24\28xsmall\29 + *, + .\35 u\24\28xsmall\29 + *, + .\34 u\24\28xsmall\29 + *, + .\33 u\24\28xsmall\29 + *, + .\32 u\24\28xsmall\29 + *, + .\31 u\24\28xsmall\29 + * { + clear: left; } + + .\-11u\28xsmall\29 { + margin-left: 91.66667%; } + + .\-10u\28xsmall\29 { + margin-left: 83.33333%; } + + .\-9u\28xsmall\29 { + margin-left: 75%; } + + .\-8u\28xsmall\29 { + margin-left: 66.66667%; } + + .\-7u\28xsmall\29 { + margin-left: 58.33333%; } + + .\-6u\28xsmall\29 { + margin-left: 50%; } + + .\-5u\28xsmall\29 { + margin-left: 41.66667%; } + + .\-4u\28xsmall\29 { + margin-left: 33.33333%; } + + .\-3u\28xsmall\29 { + margin-left: 25%; } + + .\-2u\28xsmall\29 { + margin-left: 16.66667%; } + + .\-1u\28xsmall\29 { + margin-left: 8.33333%; } } +/* Basic */ +@-ms-viewport { + width: device-width; } +body { + background: #2e3842; } + body.is-loading *, body.is-loading *:before, body.is-loading *:after { + -moz-animation: none !important; + -webkit-animation: none !important; + -ms-animation: none !important; + animation: none !important; + -moz-transition: none !important; + -webkit-transition: none !important; + -ms-transition: none !important; + transition: none !important; } + +body, input, select, textarea { + color: #fff; + font-family: "PT Serif", serif; + font-size: 15pt; + font-weight: 400; + letter-spacing: 0.075em; + line-height: 1.65em; } + @media screen and (max-width: 1680px) { + body, input, select, textarea { + font-size: 13pt; } } + @media screen and (max-width: 1280px) { + body, input, select, textarea { + font-size: 13pt; } } + @media screen and (max-width: 736px) { + body, input, select, textarea { + font-size: 13pt; + letter-spacing: 0.0375em; } } + +a { + -moz-transition: color 0.2s ease, border-bottom-color 0.2s ease; + -webkit-transition: color 0.2s ease, border-bottom-color 0.2s ease; + -ms-transition: color 0.2s ease, border-bottom-color 0.2s ease; + transition: color 0.2s ease, border-bottom-color 0.2s ease; + border-bottom: dotted 1px; + color: inherit; + text-decoration: none; } + a:hover { + border-bottom-color: blue; } + +strong, b { + color: #fff; + font-weight: 700; } + +em, i { + font-style: italic; } + +p { + margin: 0 auto 2em auto; } + +h1, h2, h3, h4, h5, h6 { + color: #fff; + letter-spacing: 0.225em; + line-height: 1em; + margin: 0 0 1em 0; + text-transform: uppercase; } + h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { + color: inherit; + text-decoration: none; } + +h2 { + font-size: 1.35em; + line-height: 1.75em; } + @media screen and (max-width: 736px) { + h2 { + font-size: 1.1em; + line-height: 1.65em; } } + +h3 { + font-size: 1.15em; + line-height: 1.75em; } + @media screen and (max-width: 736px) { + h3 { + font-size: 1em; + line-height: 1.65em; } } + +h4 { + font-size: 1em; + line-height: 1.5em; } + +h5 { + font-size: 0.8em; + line-height: 1.5em; } + +h6 { + font-size: 0.7em; + line-height: 1.5em; } + +sub { + font-size: 0.8em; + position: relative; + top: 0.5em; } + +sup { + font-size: 0.8em; + position: relative; + top: -0.5em; } + +hr { + border: 0; + border-bottom: solid 2px #fff; + margin: 3em 0; } + hr.major { + margin: 4.5em 0; } + +blockquote { + border-left: solid 4px #fff; + font-style: italic; + margin: 0 0 2em 0; + padding: 0.5em 0 0.5em 2em; } + +code { + background: rgba(144, 144, 144, 0.25); + border-radius: 3px; + font-family: "Courier New", monospace; + font-size: 0.9em; + letter-spacing: 0; + margin: 0 0.25em; + padding: 0.25em 0.65em; } + +pre { + -webkit-overflow-scrolling: touch; + font-family: "Courier New", monospace; + font-size: 0.9em; + margin: 0 0 2em 0; } + pre code { + display: block; + line-height: 1.75em; + padding: 1em 1.5em; + overflow-x: auto; } + +.align-left { + text-align: left; } + +.align-center { + text-align: center; } + +.align-right { + text-align: right; } + +/* Section/Article */ +section.special, article.special { + text-align: center; } + +header p { + color: rgba(255, 255, 255, 0.5); + position: relative; + top: -0.25em; } +header h3 + p { + font-size: 1.1em; } +header h4 + p, +header h5 + p, +header h6 + p { + font-size: 0.9em; } +header.major { + margin: 0 0 3.5em 1.5em; } + header.major h2, header.major h3, header.major h4, header.major h5, header.major h6 { + border-bottom: solid 2px #fff; + display: inline-block; + padding-bottom: 1em; + position: relative; } + header.major h2:after, header.major h3:after, header.major h4:after, header.major h5:after, header.major h6:after { + content: ''; + display: block; + height: 1px; } + header.major p { + color: #fff; + top: 0; } + @media screen and (max-width: 736px) { + header.major { + margin: 0 0 2em 1.5em; } } +@media screen and (max-width: 980px) { + header br { + display: none; } } + +/* Form */ +form { + margin: 0 0 2em 0; } + +label { + color: #fff; + display: block; + font-size: 0.9em; + font-weight: 700; + margin: 0 0 1em 0; } + +input[type="text"], +input[type="password"], +input[type="email"], +select, +textarea { + -moz-appearance: none; + -webkit-appearance: none; + -ms-appearance: none; + appearance: none; + background: rgba(144, 144, 144, 0.25); + border-radius: 3px; + border: none; + color: inherit; + display: block; + outline: 0; + padding: 0 1em; + text-decoration: none; + width: 100%; } + input[type="text"]:invalid, + input[type="password"]:invalid, + input[type="email"]:invalid, + select:invalid, + textarea:invalid { + box-shadow: none; } + input[type="text"]:focus, + input[type="password"]:focus, + input[type="email"]:focus, + select:focus, + textarea:focus { + box-shadow: 0 0 0 2px #21b2a6; } + +.select-wrapper { + text-decoration: none; + display: block; + position: relative; } + .select-wrapper:before { + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + font-family: FontAwesome; + font-style: normal; + font-weight: normal; + text-transform: none !important; } + .select-wrapper:before { + -moz-pointer-events: none; + -webkit-pointer-events: none; + -ms-pointer-events: none; + pointer-events: none; + color: #fff; + content: '\f078'; + display: block; + height: 2.75em; + line-height: 2.75em; + position: absolute; + right: 0; + text-align: center; + top: 0; + width: 2.75em; } + .select-wrapper select::-ms-expand { + display: none; } + +input[type="text"], +input[type="password"], +input[type="email"], +select { + height: 2.75em; } + +textarea { + padding: 0.75em 1em; } + +input[type="checkbox"], +input[type="radio"] { + -moz-appearance: none; + -webkit-appearance: none; + -ms-appearance: none; + appearance: none; + display: block; + float: left; + margin-right: -2em; + opacity: 0; + width: 1em; + z-index: -1; } + input[type="checkbox"] + label, + input[type="radio"] + label { + text-decoration: none; + color: #fff; + cursor: pointer; + display: inline-block; + font-size: 1em; + font-weight: 400; + padding-left: 2.4em; + padding-right: 0.75em; + position: relative; } + input[type="checkbox"] + label:before, + input[type="radio"] + label:before { + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + font-family: FontAwesome; + font-style: normal; + font-weight: normal; + text-transform: none !important; } + input[type="checkbox"] + label:before, + input[type="radio"] + label:before { + background: rgba(144, 144, 144, 0.25); + border-radius: 3px; + content: ''; + display: inline-block; + height: 1.65em; + left: 0; + line-height: 1.58125em; + position: absolute; + text-align: center; + top: 0; + width: 1.65em; } + input[type="checkbox"]:checked + label:before, + input[type="radio"]:checked + label:before { + background: #2e3842; + color: #fff; + content: '\f00c'; } + input[type="checkbox"]:focus + label:before, + input[type="radio"]:focus + label:before { + box-shadow: 0 0 0 2px #21b2a6; } + +input[type="checkbox"] + label:before { + border-radius: 3px; } + +input[type="radio"] + label:before { + border-radius: 100%; } + +::-webkit-input-placeholder { + color: rgba(255, 255, 255, 0.5) !important; + opacity: 1.0; } + +:-moz-placeholder { + color: rgba(255, 255, 255, 0.5) !important; + opacity: 1.0; } + +::-moz-placeholder { + color: rgba(255, 255, 255, 0.5) !important; + opacity: 1.0; } + +:-ms-input-placeholder { + color: rgba(255, 255, 255, 0.5) !important; + opacity: 1.0; } + +.formerize-placeholder { + color: rgba(255, 255, 255, 0.5) !important; + opacity: 1.0; } + +/* Box */ +.box { + border-radius: 3px; + border: solid 2px #fff; + margin-bottom: 2em; + padding: 1.5em; } + .box > :last-child, + .box > :last-child > :last-child, + .box > :last-child > :last-child > :last-child { + margin-bottom: 0; } + .box.alt { + border: 0; + border-radius: 0; + padding: 0; } + +/* Icon */ +.icon { + text-decoration: none; + border-bottom: none; + position: relative; } + .icon:before { + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + font-family: FontAwesome; + font-style: normal; + font-weight: normal; + text-transform: none !important; } + .icon > .label { + display: none; } + .icon.major { + -moz-transform: rotate(-45deg); + -webkit-transform: rotate(-45deg); + -ms-transform: rotate(-45deg); + transform: rotate(-45deg); + border-radius: 3px; + border: solid 2px #fff; + display: inline-block; + font-size: 1.35em; + height: calc(3em + 2px); + line-height: 3em; + text-align: center; + width: calc(3em + 2px); } + .icon.major:before { + -moz-transform: rotate(45deg); + -webkit-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); + display: inline-block; + font-size: 1.5em; } + @media screen and (max-width: 736px) { + .icon.major { + font-size: 1em; } } + .icon.style1 { + color: #00ffcc; } + .icon.style2 { + color: #00f0ff; } + .icon.style3 { + color: #76ddff; } + +/* Image */ +.image { + border-radius: 3px; + border: 0; + display: inline-block; + position: relative; } + .image img { + border-radius: 3px; + display: block; } + .image.left { + float: left; + margin: 0 2em 2em 0; + top: 0.25em; } + .image.right { + float: right; + margin: 0 0 2em 2em; + top: 0.25em; } + .image.left, .image.right { + max-width: 40%; } + .image.left img, .image.right img { + width: 100%; } + .image.fit { + display: block; + margin: 0 0 2em 0; + width: 100%; } + .image.fit img { + width: 100%; } + +/* List */ +ol { + list-style: decimal; + margin: 0 0 2em 0; + padding-left: 1.25em; } + ol li { + padding-left: 0.25em; } + +ul { + list-style: disc; + margin: 0 0 2em 0; + padding-left: 1em; } + ul li { + padding-left: 0.5em; } + ul.alt { + list-style: none; + padding-left: 0; } + ul.alt li { + border-top: solid 1px #fff; + padding: 0.5em 0; } + ul.alt li:first-child { + border-top: 0; + padding-top: 0; } + ul.icons { + cursor: default; + list-style: none; + padding-left: 0; } + ul.icons li { + display: inline-block; + padding: 0 1em 0 0; } + ul.icons li:last-child { + padding-right: 0 !important; } + ul.icons.major { + padding: 1em 0; } + ul.icons.major li { + padding-right: 3.5em; } + @media screen and (max-width: 736px) { + ul.icons.major li { + padding: 0 1em !important; } } + ul.actions { + cursor: default; + list-style: none; + padding-left: 0; } + ul.actions li { + display: inline-block; + padding: 0 1.5em 0 0; + vertical-align: middle; } + ul.actions li:last-child { + padding-right: 0; } + ul.actions.small li { + padding: 0 0.75em 0 0; } + ul.actions.vertical li { + display: block; + padding: 1.5em 0 0 0; } + ul.actions.vertical li:first-child { + padding-top: 0; } + ul.actions.vertical li > * { + margin-bottom: 0; } + ul.actions.vertical.small li { + padding: 0.75em 0 0 0; } + ul.actions.vertical.small li:first-child { + padding-top: 0; } + ul.actions.fit { + display: table; + margin-left: -1.5em; + padding: 0; + table-layout: fixed; + width: calc(100% + 1.5em); } + ul.actions.fit li { + display: table-cell; + padding: 0 0 0 1.5em; } + ul.actions.fit li > * { + margin-bottom: 0; } + ul.actions.fit.small { + margin-left: -0.75em; + width: calc(100% + 0.75em); } + ul.actions.fit.small li { + padding: 0 0 0 0.75em; } + @media screen and (max-width: 736px) { + ul.actions li { + display: block; + padding: 1em 0 0 0; + text-align: center; + width: 100%; } + ul.actions li:first-child { + padding-top: 0; } + ul.actions li > * { + margin: 0 auto !important; + max-width: 30em; + width: 100%; } + ul.actions li > *.icon:before { + margin-left: -1em; } + ul.actions.small li { + padding: 0.5em 0 0 0; } + ul.actions.small li:first-child { + padding-top: 0; } } + +dl { + margin: 0 0 2em 0; } + +/* Table */ +.table-wrapper { + -webkit-overflow-scrolling: touch; + overflow-x: auto; } + +table { + margin: 0 0 2em 0; + width: 100%; } + table tbody tr { + border: solid 1px #fff; + border-left: 0; + border-right: 0; } + table tbody tr:nth-child(2n + 1) { + background-color: rgba(144, 144, 144, 0.25); } + table td { + padding: 0.75em 0.75em; } + table th { + color: #fff; + font-size: 0.9em; + font-weight: 700; + padding: 0 0.75em 0.75em 0.75em; + text-align: left; } + table thead { + border-bottom: solid 2px #fff; } + table tfoot { + border-top: solid 2px #fff; } + table.alt { + border-collapse: separate; } + table.alt tbody tr td { + border: solid 1px #fff; + border-left-width: 0; + border-top-width: 0; } + table.alt tbody tr td:first-child { + border-left-width: 1px; } + table.alt tbody tr:first-child td { + border-top-width: 1px; } + table.alt thead { + border-bottom: 0; } + table.alt tfoot { + border-top: 0; } + +/* Button */ +input[type="submit"], +input[type="reset"], +input[type="button"], +button, +.button { + -moz-appearance: none; + -webkit-appearance: none; + -ms-appearance: none; + appearance: none; + -moz-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; + -webkit-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; + -ms-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; + transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; + background-color: transparent; + border-radius: 3px; + border: 0; + box-shadow: inset 0 0 0 2px #fff; + color: #fff; + cursor: pointer; + display: inline-block; + font-size: 0.8em; + font-weight: 700; + height: 3.125em; + letter-spacing: 0.225em; + line-height: 3.125em; + padding: 0 2.75em; + text-align: center; + text-decoration: none; + text-transform: uppercase; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } + input[type="submit"]:hover, + input[type="reset"]:hover, + input[type="button"]:hover, + button:hover, + .button:hover { + background-color: rgba(144, 144, 144, 0.25); } + input[type="submit"]:active, + input[type="reset"]:active, + input[type="button"]:active, + button:active, + .button:active { + background-color: rgba(144, 144, 144, 0.5); } + input[type="submit"].icon:before, + input[type="reset"].icon:before, + input[type="button"].icon:before, + button.icon:before, + .button.icon:before { + margin-right: 0.5em; } + input[type="submit"].fit, + input[type="reset"].fit, + input[type="button"].fit, + button.fit, + .button.fit { + display: block; + margin: 0 0 1em 0; + width: 100%; } + input[type="submit"].small, + input[type="reset"].small, + input[type="button"].small, + button.small, + .button.small { + font-size: 0.8em; } + input[type="submit"].big, + input[type="reset"].big, + input[type="button"].big, + button.big, + .button.big { + font-size: 1.35em; } + input[type="submit"].special, + input[type="reset"].special, + input[type="button"].special, + button.special, + .button.special { + background-color: #ed4933; + box-shadow: none !important; + color: #ffffff !important; } + input[type="submit"].special:hover, + input[type="reset"].special:hover, + input[type="button"].special:hover, + button.special:hover, + .button.special:hover { + background-color: #ef5e4a !important; } + input[type="submit"].special:active, + input[type="reset"].special:active, + input[type="button"].special:active, + button.special:active, + .button.special:active { + background-color: #eb341c !important; } + input[type="submit"].disabled, input[type="submit"]:disabled, + input[type="reset"].disabled, + input[type="reset"]:disabled, + input[type="button"].disabled, + input[type="button"]:disabled, + button.disabled, + button:disabled, + .button.disabled, + .button:disabled { + -moz-pointer-events: none; + -webkit-pointer-events: none; + -ms-pointer-events: none; + pointer-events: none; + opacity: 0.25; } + @media screen and (max-width: 736px) { + input[type="submit"], + input[type="reset"], + input[type="button"], + button, + .button { + height: 3.75em; + line-height: 3.75em; } } + +/* Features */ +.features { + display: -moz-flex; + display: -webkit-flex; + display: -ms-flex; + display: flex; + -moz-flex-wrap: wrap; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -moz-justify-content: center; + -webkit-justify-content: center; + -ms-justify-content: center; + justify-content: center; + list-style: none; + padding: 0; + width: 100%; } + .features li { + padding: 4em 4em 2em 6em ; + display: block; + position: relative; + text-align: left; + width: 50%; } + .features li:nth-child(1) { + background-color: rgba(0, 0, 0, 0.035); } + .features li:nth-child(2) { + background-color: rgba(0, 0, 0, 0.07); } + .features li:nth-child(3) { + background-color: rgba(0, 0, 0, 0.105); } + .features li:nth-child(4) { + background-color: rgba(0, 0, 0, 0.14); } + .features li:nth-child(5) { + background-color: rgba(0, 0, 0, 0.175); } + .features li:nth-child(6) { + background-color: rgba(0, 0, 0, 0.21); } + .features li:nth-child(7) { + background-color: rgba(0, 0, 0, 0.245); } + .features li:nth-child(8) { + background-color: rgba(0, 0, 0, 0.28); } + .features li:nth-child(9) { + background-color: rgba(0, 0, 0, 0.315); } + .features li:nth-child(10) { + background-color: rgba(0, 0, 0, 0.35); } + .features li:before { + display: block; + /*color: _palette(accent2, bg);*/ + color: transparent; + background-image: url("images/inc-logo.png"); + position: absolute; + left: 1.75em; + top: 2.75em; + font-size: 1.5em; + width: 33px; + height: 50px; } + .features li:nth-child(1) { + border-top-left-radius: 3px; } + .features li:nth-child(2) { + border-top-right-radius: 3px; } + .features li:nth-last-child(1) { + border-bottom-right-radius: 3px; } + .features li:nth-last-child(2) { + border-bottom-left-radius: 3px; } + @media screen and (max-width: 980px) { + .features li { + padding: 3em 2em 1em 2em ; + text-align: center; } + .features li:before { + left: 0; + margin: 0 0 1em 0; + position: relative; + top: 0; } } + @media screen and (max-width: 736px) { + .features li { + padding: 3em 0 1em 0 ; + background-color: transparent !important; + border-top: solid 2px #fff; + width: 100%; } + .features li:first-child { + border-top: 0; } } + +/* Spotlight */ +.spotlight { + -moz-align-items: center; + -webkit-align-items: center; + -ms-align-items: center; + align-items: center; + display: -moz-flex; + display: -webkit-flex; + display: -ms-flex; + display: flex; } + .spotlight .image { + -moz-order: 1; + -webkit-order: 1; + -ms-order: 1; + order: 1; + border-radius: 0; + width: 40%; } + .spotlight .image img { + border-radius: 0; + width: 100%; } + .spotlight .content { + padding: 2em 4em 0.1em 4em ; + -moz-order: 2; + -webkit-order: 2; + -ms-order: 2; + order: 2; + max-width: 48em; + width: 60%; } + .spotlight:nth-child(2n) { + -moz-flex-direction: row-reverse; + -webkit-flex-direction: row-reverse; + -ms-flex-direction: row-reverse; + flex-direction: row-reverse; } + .spotlight:nth-child(1) { + background-color: rgba(0, 0, 0, 0.075); } + .spotlight:nth-child(2) { + background-color: rgba(0, 0, 0, 0.15); } + .spotlight:nth-child(3) { + background-color: rgba(0, 0, 0, 0.225); } + .spotlight:nth-child(4) { + background-color: rgba(0, 0, 0, 0.3); } + .spotlight:nth-child(5) { + background-color: rgba(0, 0, 0, 0.375); } + .spotlight:nth-child(6) { + background-color: rgba(0, 0, 0, 0.45); } + .spotlight:nth-child(7) { + background-color: rgba(0, 0, 0, 0.525); } + .spotlight:nth-child(8) { + background-color: rgba(0, 0, 0, 0.6); } + .spotlight:nth-child(9) { + background-color: rgba(0, 0, 0, 0.675); } + .spotlight:nth-child(10) { + background-color: rgba(0, 0, 0, 0.75); } + @media screen and (max-width: 1280px) { + .spotlight .image { + width: 45%; } + .spotlight .content { + width: 55%; } } + @media screen and (max-width: 980px) { + .spotlight { + display: block; } + .spotlight br { + display: none; } + .spotlight .image { + width: 100%; } + .spotlight .content { + padding: 4em 3em 2em 3em ; + max-width: none; + text-align: center; + width: 100%; } } + @media screen and (max-width: 736px) { + .spotlight .content { + padding: 3em 2em 1em 2em ; } } + +/* Wrapper */ +.wrapper { + padding: 6em 0 4em 0 ; } + .wrapper.alt { + padding: 0; } + .wrapper.style1 { + background-color: #21b2a6; + color: #c8ece9; } + .wrapper.style1 strong, .wrapper.style1 b { + color: #ffffff; } + .wrapper.style1 h2, .wrapper.style1 h3, .wrapper.style1 h4, .wrapper.style1 h5, .wrapper.style1 h6 { + color: #ffffff; } + .wrapper.style1 hr { + border-color: rgba(0, 0, 0, 0.125); } + .wrapper.style1 blockquote { + border-color: rgba(0, 0, 0, 0.125); } + .wrapper.style1 code { + background: rgba(255, 255, 255, 0.075); } + .wrapper.style1 header p { + color: #a6e0db; } + .wrapper.style1 header.major h2, .wrapper.style1 header.major h3, .wrapper.style1 header.major h4, .wrapper.style1 header.major h5, .wrapper.style1 header.major h6 { + border-color: rgba(0, 0, 0, 0.125); } + .wrapper.style1 header.major p { + color: #c8ece9; } + .wrapper.style1 label { + color: #ffffff; } + .wrapper.style1 input[type="text"], + .wrapper.style1 input[type="password"], + .wrapper.style1 input[type="email"], + .wrapper.style1 select, + .wrapper.style1 textarea { + background: rgba(255, 255, 255, 0.075); } + .wrapper.style1 .select-wrapper:before { + color: rgba(0, 0, 0, 0.125); } + .wrapper.style1 input[type="checkbox"] + label, + .wrapper.style1 input[type="radio"] + label { + color: #c8ece9; } + .wrapper.style1 input[type="checkbox"] + label:before, + .wrapper.style1 input[type="radio"] + label:before { + background: rgba(255, 255, 255, 0.075); } + .wrapper.style1 input[type="checkbox"]:checked + label:before, + .wrapper.style1 input[type="radio"]:checked + label:before { + background: #ffffff; + color: #21b2a6; } + .wrapper.style1 ::-webkit-input-placeholder { + color: #a6e0db !important; } + .wrapper.style1 :-moz-placeholder { + color: #a6e0db !important; } + .wrapper.style1 ::-moz-placeholder { + color: #a6e0db !important; } + .wrapper.style1 :-ms-input-placeholder { + color: #a6e0db !important; } + .wrapper.style1 .formerize-placeholder { + color: #a6e0db !important; } + .wrapper.style1 .icon.major { + border-color: rgba(0, 0, 0, 0.125); } + .wrapper.style1 ul.alt li { + border-color: rgba(0, 0, 0, 0.125); } + .wrapper.style1 table tbody tr { + border-color: rgba(0, 0, 0, 0.125); } + .wrapper.style1 table tbody tr:nth-child(2n + 1) { + background-color: rgba(255, 255, 255, 0.075); } + .wrapper.style1 table th { + color: #ffffff; } + .wrapper.style1 table thead { + border-color: rgba(0, 0, 0, 0.125); } + .wrapper.style1 table tfoot { + border-color: rgba(0, 0, 0, 0.125); } + .wrapper.style1 table.alt tbody tr td { + border-color: rgba(0, 0, 0, 0.125); } + .wrapper.style1 input[type="submit"], + .wrapper.style1 input[type="reset"], + .wrapper.style1 input[type="button"], + .wrapper.style1 button, + .wrapper.style1 .button { + box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.125); + color: #ffffff; } + .wrapper.style1 input[type="submit"]:hover, + .wrapper.style1 input[type="reset"]:hover, + .wrapper.style1 input[type="button"]:hover, + .wrapper.style1 button:hover, + .wrapper.style1 .button:hover { + background-color: rgba(255, 255, 255, 0.075); } + .wrapper.style1 input[type="submit"]:active, + .wrapper.style1 input[type="reset"]:active, + .wrapper.style1 input[type="button"]:active, + .wrapper.style1 button:active, + .wrapper.style1 .button:active { + background-color: rgba(255, 255, 255, 0.2); } + @media screen and (max-width: 736px) { + .wrapper.style1 .features li { + border-top-color: rgba(0, 0, 0, 0.125); } } + .wrapper.style2 { + background-color: #2e3842; } + .wrapper.style3 { + background-color: #505393; + color: #d3d4e4; } + .wrapper.style3 strong, .wrapper.style3 b { + color: #ffffff; } + .wrapper.style3 h2, .wrapper.style3 h3, .wrapper.style3 h4, .wrapper.style3 h5, .wrapper.style3 h6 { + color: #ffffff; } + .wrapper.style3 hr { + border-color: rgba(0, 0, 0, 0.125); } + .wrapper.style3 blockquote { + border-color: rgba(0, 0, 0, 0.125); } + .wrapper.style3 code { + background: rgba(255, 255, 255, 0.075); } + .wrapper.style3 header p { + color: #b9bad4; } + .wrapper.style3 header.major h2, .wrapper.style3 header.major h3, .wrapper.style3 header.major h4, .wrapper.style3 header.major h5, .wrapper.style3 header.major h6 { + border-color: rgba(0, 0, 0, 0.125); } + .wrapper.style3 header.major p { + color: #d3d4e4; } + .wrapper.style3 label { + color: #ffffff; } + .wrapper.style3 input[type="text"], + .wrapper.style3 input[type="password"], + .wrapper.style3 input[type="email"], + .wrapper.style3 select, + .wrapper.style3 textarea { + background: rgba(255, 255, 255, 0.075); } + .wrapper.style3 .select-wrapper:before { + color: rgba(0, 0, 0, 0.125); } + .wrapper.style3 input[type="checkbox"] + label, + .wrapper.style3 input[type="radio"] + label { + color: #d3d4e4; } + .wrapper.style3 input[type="checkbox"] + label:before, + .wrapper.style3 input[type="radio"] + label:before { + background: rgba(255, 255, 255, 0.075); } + .wrapper.style3 input[type="checkbox"]:checked + label:before, + .wrapper.style3 input[type="radio"]:checked + label:before { + background: #ffffff; + color: #505393; } + .wrapper.style3 ::-webkit-input-placeholder { + color: #b9bad4 !important; } + .wrapper.style3 :-moz-placeholder { + color: #b9bad4 !important; } + .wrapper.style3 ::-moz-placeholder { + color: #b9bad4 !important; } + .wrapper.style3 :-ms-input-placeholder { + color: #b9bad4 !important; } + .wrapper.style3 .formerize-placeholder { + color: #b9bad4 !important; } + .wrapper.style3 .icon.major { + border-color: rgba(0, 0, 0, 0.125); } + .wrapper.style3 ul.alt li { + border-color: rgba(0, 0, 0, 0.125); } + .wrapper.style3 table tbody tr { + border-color: rgba(0, 0, 0, 0.125); } + .wrapper.style3 table tbody tr:nth-child(2n + 1) { + background-color: rgba(255, 255, 255, 0.075); } + .wrapper.style3 table th { + color: #ffffff; } + .wrapper.style3 table thead { + border-color: rgba(0, 0, 0, 0.125); } + .wrapper.style3 table tfoot { + border-color: rgba(0, 0, 0, 0.125); } + .wrapper.style3 table.alt tbody tr td { + border-color: rgba(0, 0, 0, 0.125); } + .wrapper.style3 input[type="submit"], + .wrapper.style3 input[type="reset"], + .wrapper.style3 input[type="button"], + .wrapper.style3 button, + .wrapper.style3 .button { + box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.125); + color: #ffffff; } + .wrapper.style3 input[type="submit"]:hover, + .wrapper.style3 input[type="reset"]:hover, + .wrapper.style3 input[type="button"]:hover, + .wrapper.style3 button:hover, + .wrapper.style3 .button:hover { + background-color: rgba(255, 255, 255, 0.075); } + .wrapper.style3 input[type="submit"]:active, + .wrapper.style3 input[type="reset"]:active, + .wrapper.style3 input[type="button"]:active, + .wrapper.style3 button:active, + .wrapper.style3 .button:active { + background-color: rgba(255, 255, 255, 0.2); } + @media screen and (max-width: 736px) { + .wrapper.style3 .features li { + border-top-color: rgba(0, 0, 0, 0.125); } } + .wrapper.style4 { + background-color: transparent; } + .wrapper.style5 { + background-color: #ffffff; + color: #4E4852; } + .wrapper.style5 strong, .wrapper.style5 b { + color: #2E3842; } + .wrapper.style5 h2, .wrapper.style5 h3, .wrapper.style5 h4, .wrapper.style5 h5, .wrapper.style5 h6 { + color: #2E3842; } + .wrapper.style5 hr { + border-color: #dfdfdf; } + .wrapper.style5 blockquote { + border-color: #dfdfdf; } + .wrapper.style5 code { + background: rgba(0, 0, 0, 0.0375); } + .wrapper.style5 header p { + color: #8E8892; } + .wrapper.style5 header.major h2, .wrapper.style5 header.major h3, .wrapper.style5 header.major h4, .wrapper.style5 header.major h5, .wrapper.style5 header.major h6 { + border-color: #dfdfdf; } + .wrapper.style5 header.major p { + color: #4E4852; } + .wrapper.style5 label { + color: #2E3842; } + .wrapper.style5 input[type="text"], + .wrapper.style5 input[type="password"], + .wrapper.style5 input[type="email"], + .wrapper.style5 select, + .wrapper.style5 textarea { + background: rgba(0, 0, 0, 0.0375); } + .wrapper.style5 .select-wrapper:before { + color: #dfdfdf; } + .wrapper.style5 input[type="checkbox"] + label, + .wrapper.style5 input[type="radio"] + label { + color: #4E4852; } + .wrapper.style5 input[type="checkbox"] + label:before, + .wrapper.style5 input[type="radio"] + label:before { + background: rgba(0, 0, 0, 0.0375); } + .wrapper.style5 input[type="checkbox"]:checked + label:before, + .wrapper.style5 input[type="radio"]:checked + label:before { + background: #2E3842; + color: #ffffff; } + .wrapper.style5 ::-webkit-input-placeholder { + color: #8E8892 !important; } + .wrapper.style5 :-moz-placeholder { + color: #8E8892 !important; } + .wrapper.style5 ::-moz-placeholder { + color: #8E8892 !important; } + .wrapper.style5 :-ms-input-placeholder { + color: #8E8892 !important; } + .wrapper.style5 .formerize-placeholder { + color: #8E8892 !important; } + .wrapper.style5 .icon.major { + border-color: #dfdfdf; } + .wrapper.style5 ul.alt li { + border-color: #dfdfdf; } + .wrapper.style5 table tbody tr { + border-color: #dfdfdf; } + .wrapper.style5 table tbody tr:nth-child(2n + 1) { + background-color: rgba(0, 0, 0, 0.0375); } + .wrapper.style5 table th { + color: #2E3842; } + .wrapper.style5 table thead { + border-color: #dfdfdf; } + .wrapper.style5 table tfoot { + border-color: #dfdfdf; } + .wrapper.style5 table.alt tbody tr td { + border-color: #dfdfdf; } + .wrapper.style5 input[type="submit"], + .wrapper.style5 input[type="reset"], + .wrapper.style5 input[type="button"], + .wrapper.style5 button, + .wrapper.style5 .button { + box-shadow: inset 0 0 0 2px #dfdfdf; + color: #2E3842; } + .wrapper.style5 input[type="submit"]:hover, + .wrapper.style5 input[type="reset"]:hover, + .wrapper.style5 input[type="button"]:hover, + .wrapper.style5 button:hover, + .wrapper.style5 .button:hover { + background-color: rgba(0, 0, 0, 0.0375); } + .wrapper.style5 input[type="submit"]:active, + .wrapper.style5 input[type="reset"]:active, + .wrapper.style5 input[type="button"]:active, + .wrapper.style5 button:active, + .wrapper.style5 .button:active { + background-color: rgba(0, 0, 0, 0.1); } + @media screen and (max-width: 736px) { + .wrapper.style5 .features li { + border-top-color: #dfdfdf; } } + @media screen and (max-width: 980px) { + .wrapper { + padding: 4em 3em 2em 3em ; } } + @media screen and (max-width: 736px) { + .wrapper { + padding: 3em 2em 1em 2em ; } } + +/* Page Wrapper + Menu */ +#page-wrapper { + -moz-transition: opacity 0.5s ease; + -webkit-transition: opacity 0.5s ease; + -ms-transition: opacity 0.5s ease; + transition: opacity 0.5s ease; + opacity: 1; + padding-top: 3em; } + #page-wrapper:before { + background: transparent; + content: ''; + display: block; + display: none; + height: 100%; + left: 0; + position: fixed; + top: 0; + width: 100%; + z-index: 10001; } + +#menu { + -moz-transform: translateX(20em); + -webkit-transform: translateX(20em); + -ms-transform: translateX(20em); + transform: translateX(20em); + -moz-transition: -moz-transform 0.5s ease; + -webkit-transition: -webkit-transform 0.5s ease; + -ms-transition: -ms-transform 0.5s ease; + transition: transform 0.5s ease; + -webkit-overflow-scrolling: touch; + background: #21b2a6; + color: #ffffff; + height: 100%; + max-width: 80%; + overflow-y: auto; + padding: 3em 2em; + position: fixed; + right: 0; + top: 0; + width: 20em; + z-index: 10002; } + #menu ul { + list-style: none; + padding: 0; } + #menu ul > li { + border-top: solid 1px rgba(0, 0, 0, 0.125); + margin: 0.5em 0 0 0; + padding: 0.5em 0 0 0; } + #menu ul > li:first-child { + border-top: 0 !important; + margin-top: 0 !important; + padding-top: 0 !important; } + #menu ul > li > a { + border: 0; + color: inherit; + display: block; + font-size: 0.8em; + letter-spacing: 0.225em; + outline: 0; + text-decoration: none; + text-transform: uppercase; } + @media screen and (max-width: 736px) { + #menu ul > li > a { + line-height: 3em; } } + #menu .close { + background-image: url("images/close.svg"); + background-position: 4.85em 1em; + background-repeat: no-repeat; + border: 0; + cursor: pointer; + display: block; + height: 3em; + position: absolute; + right: 0; + top: 0; + vertical-align: middle; + width: 7em; } + @media screen and (max-width: 736px) { + #menu { + padding: 3em 1.5em; } } + +body.is-menu-visible #page-wrapper { + opacity: 0.35; } + body.is-menu-visible #page-wrapper:before { + display: block; } +body.is-menu-visible #menu { + -moz-transform: translateX(0); + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); } + +/* Header */ +#header { + -moz-transition: background-color 0.2s ease; + -webkit-transition: background-color 0.2s ease; + -ms-transition: background-color 0.2s ease; + transition: background-color 0.2s ease; + background: #2e3842; + height: 3em; + left: 0; + line-height: 3em; + position: fixed; + top: 0; + width: 100%; + z-index: 10000; } + #header h1 { + -moz-transition: opacity 0.2s ease; + -webkit-transition: opacity 0.2s ease; + -ms-transition: opacity 0.2s ease; + transition: opacity 0.2s ease; + height: inherit; + left: 1.25em; + line-height: inherit; + position: absolute; + top: 0; } + #header h1 a { + border: 0; + display: block; + height: inherit; + line-height: inherit; } + @media screen and (max-width: 736px) { + #header h1 a { + font-size: 0.8em; } } + #header nav { + height: inherit; + line-height: inherit; + position: absolute; + right: 0; + top: 0; } + #header nav > ul { + list-style: none; + margin: 0; + padding: 0; + white-space: nowrap; } + #header nav > ul > li { + display: inline-block; + padding: 0; } + #header nav > ul > li > a { + border: 0; + color: #fff; + display: block; + font-size: 0.8em; + letter-spacing: 0.225em; + padding: 0 1.5em; + text-transform: uppercase; } + #header nav > ul > li > a.menuToggle { + outline: 0; + position: relative; } + #header nav > ul > li > a.menuToggle:after { + background-image: url("images/bars.svg"); + background-position: right center; + background-repeat: no-repeat; + content: ''; + display: inline-block; + height: 3.75em; + vertical-align: top; + width: 2em; } + @media screen and (max-width: 736px) { + #header nav > ul > li > a.menuToggle { + padding: 0 1.5em; } + #header nav > ul > li > a.menuToggle span { + display: none; } } + @media screen and (max-width: 736px) { + #header nav > ul > li > a { + padding: 0 0 0 1.5em; } } + #header nav > ul > li:first-child { + margin-left: 0; } + #header.alt { + background: transparent; } + #header.alt h1 { + -moz-pointer-events: none; + -webkit-pointer-events: none; + -ms-pointer-events: none; + pointer-events: none; + opacity: 0; } + +/* Banner */ +#banner { + display: -moz-flex; + display: -webkit-flex; + display: -ms-flex; + display: flex; + -moz-flex-direction: column; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -moz-justify-content: center; + -webkit-justify-content: center; + -ms-justify-content: center; + justify-content: center; + cursor: default; + height: 100vh; + min-height: 35em; + overflow: hidden; + position: relative; + text-align: center; } + #banner h2 { + -moz-transform: scale(1); + -webkit-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + -moz-transition: -moz-transform 0.5s ease, opacity 0.5s ease; + -webkit-transition: -webkit-transform 0.5s ease, opacity 0.5s ease; + -ms-transition: -ms-transform 0.5s ease, opacity 0.5s ease; + transition: transform 0.5s ease, opacity 0.5s ease; + display: inline-block; + font-size: 1.75em; + opacity: 1; + padding: 0.35em 1em; + position: relative; + z-index: 1; } + #banner h2:before, #banner h2:after { + -moz-transition: width 0.85s ease; + -webkit-transition: width 0.85s ease; + -ms-transition: width 0.85s ease; + transition: width 0.85s ease; + -moz-transition-delay: 0.25s; + -webkit-transition-delay: 0.25s; + -ms-transition-delay: 0.25s; + transition-delay: 0.25s; + background: #fff; + content: ''; + display: block; + height: 2px; + position: absolute; + width: 100%; } + #banner h2:before { + top: 0; + left: 0; } + #banner h2:after { + bottom: 0; + right: 0; } + #banner p { + letter-spacing: 0.225em; + text-transform: uppercase; } + #banner p a { + color: inherit; } + #banner .more { + -moz-transition: -moz-transform 0.75s ease, opacity 0.75s ease; + -webkit-transition: -webkit-transform 0.75s ease, opacity 0.75s ease; + -ms-transition: -ms-transform 0.75s ease, opacity 0.75s ease; + transition: transform 0.75s ease, opacity 0.75s ease; + -moz-transition-delay: 3.5s; + -webkit-transition-delay: 3.5s; + -ms-transition-delay: 3.5s; + transition-delay: 3.5s; + -moz-transform: translateY(0); + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + border: none; + bottom: 0; + color: inherit; + font-size: 0.8em; + height: 8.5em; + left: 50%; + letter-spacing: 0.225em; + margin-left: -8.5em; + opacity: 1; + outline: 0; + padding-left: 0.225em; + position: absolute; + text-align: center; + text-transform: uppercase; + width: 16em; + z-index: 1; } + #banner .more:after { + background-image: url("images/arrow.svg"); + background-position: center; + background-repeat: no-repeat; + background-size: contain; + bottom: 4em; + content: ''; + display: block; + height: 1.5em; + left: 50%; + margin: 0 0 0 -0.75em; + position: absolute; + width: 1.5em; } + #banner:after { + -moz-pointer-events: none; + -webkit-pointer-events: none; + -ms-pointer-events: none; + pointer-events: none; + -moz-transition: opacity 3s ease-in-out; + -webkit-transition: opacity 3s ease-in-out; + -ms-transition: opacity 3s ease-in-out; + transition: opacity 3s ease-in-out; + -moz-transition-delay: 1.25s; + -webkit-transition-delay: 1.25s; + -ms-transition-delay: 1.25s; + transition-delay: 1.25s; + content: ''; + background: #2e3842; + display: block; + width: 100%; + height: 100%; + position: absolute; + left: 0; + top: 0; + opacity: 0; } + @media screen and (max-width: 736px) { + #banner { + padding: 7em 3em 5em 3em ; + height: auto; + min-height: 0; } + #banner h2 { + font-size: 1.25em; } + #banner br { + display: none; } + #banner .more { + display: none; } } + +body.is-loading #banner h2 { + -moz-transform: scale(0.95); + -webkit-transform: scale(0.95); + -ms-transform: scale(0.95); + transform: scale(0.95); + opacity: 0; } + body.is-loading #banner h2:before, body.is-loading #banner h2:after { + width: 0; } +body.is-loading #banner .more { + -moz-transform: translateY(8.5em); + -webkit-transform: translateY(8.5em); + -ms-transform: translateY(8.5em); + transform: translateY(8.5em); + opacity: 0; } +body.is-loading #banner:after { + opacity: 1; } + +/* CTA */ +#cta .inner { + display: -moz-flex; + display: -webkit-flex; + display: -ms-flex; + display: flex; + max-width: 40em; } + #cta .inner header { + -moz-order: 1; + -webkit-order: 1; + -ms-order: 1; + order: 1; + padding-right: 3em; + width: 70%; } + #cta .inner header p { + color: inherit; } + #cta .inner .actions { + -moz-order: 2; + -webkit-order: 2; + -ms-order: 2; + order: 2; + width: 30%; } + @media screen and (max-width: 980px) { + #cta .inner { + display: block; + text-align: center; } + #cta .inner header { + padding-right: 0; + width: 100%; } + #cta .inner .actions { + margin-left: auto; + margin-right: auto; + max-width: 20em; + width: 100%; } } + @media screen and (max-width: 736px) { + #cta .inner .actions { + max-width: none; } } + +/* Main */ +#main > header, .main > header { + padding: 12em 0 10em 0 ; + background-image: -moz-linear-gradient(top, rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url("/poblados-colonizacion-colonias-penitenciarias/images/banner.jpg"); + background-image: -webkit-linear-gradient(top, rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url("/poblados-colonizacion-colonias-penitenciarias/images/banner.jpg"); + background-image: -ms-linear-gradient(top, rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url("/poblados-colonizacion-colonias-penitenciarias/images/banner.jpg"); + background-image: linear-gradient(top, rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url("/poblados-colonizacion-colonias-penitenciarias/images/banner.jpg"); + background-attachment: fixed; + background-position: center center; + background-repeat: no-repeat; + background-size: cover; + text-align: center; } + #main > header h2, .main > header h2 { + font-size: 1.75em; + margin: 0 0 0.5em 0; } + #main > header p, .main > header p { + color: inherit; + letter-spacing: 0.225em; + text-transform: uppercase; + top: 0; } + #main > header p a, .main > header p a { + color: inherit; } + @media screen and (max-width: 1680px) { + #main > header, .main > header { + padding: 10em 0 8em 0 ; } } + @media screen and (max-width: 1280px) { + #main > header, .main > header { + padding: 8em 3em 6em 3em ; } } + @media screen and (max-width: 980px) { + #main > header, .main > header { + padding: 10em 3em 8em 3em ; } } + @media screen and (max-width: 736px) { + #main > header, .main > header { + padding: 5em 3em 3em 3em ; } + #main > header h2, .main > header h2 { + font-size: 1.25em; + margin: 0 0 1em 0; } } + +body.is-mobile #main > header, body.is-mobile .main > header { + background-attachment: scroll; } + +/* Footer */ +#footer { + padding: 6em 0 4em 0 ; + background-color: #1d242a; + text-align: center; } + #footer .icons { + font-size: 1.25em; } + #footer .icons a { + color: rgba(255, 255, 255, 0.5); } + #footer .icons a:hover { + color: #fff; } + #footer .copyright { + color: rgba(255, 255, 255, 0.5); + font-size: 0.8em; + letter-spacing: 0.225em; + list-style: none; + padding: 0; + text-transform: uppercase; } + #footer .copyright li { + border-left: solid 1px rgba(255, 255, 255, 0.5); + display: inline-block; + line-height: 1em; + margin-left: 1em; + padding-left: 1em; } + #footer .copyright li:first-child { + border-left: 0; + margin-left: 0; + padding-left: 0; } + #footer .copyright li a { + color: inherit; } + #footer .copyright li a:hover { + color: #fff; } + @media screen and (max-width: 480px) { + #footer .copyright li { + border: 0; + display: block; + line-height: 1.65em; + margin: 0; + padding: 0.5em 0; } } + @media screen and (max-width: 980px) { + #footer { + padding: 4em 3em 2em 3em ; } } + @media screen and (max-width: 736px) { + #footer { + padding: 3em 2em 1em 2em ; } } + +/* Landing */ +body.landing #page-wrapper { + background-image: -moz-linear-gradient(top, rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url("/poblados-colonizacion-colonias-penitenciarias/images/banner.jpg"); + background-image: -webkit-linear-gradient(top, rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url("/poblados-colonizacion-colonias-penitenciarias/images/banner.jpg"); + background-image: -ms-linear-gradient(top, rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url("/poblados-colonizacion-colonias-penitenciarias/images/banner.jpg"); + background-image: linear-gradient(top, rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url("/poblados-colonizacion-colonias-penitenciarias/images/banner.jpg"); + background-attachment: fixed; + background-position: center center; + background-repeat: no-repeat; + background-size: cover; + padding-top: 0; } +body.landing #footer { + background-color: rgba(29, 36, 42, 0.9); } + +body.is-mobile.landing #page-wrapper { + background: none; } +body.is-mobile.landing #banner, +body.is-mobile.landing .wrapper.style4 { + background-image: -moz-linear-gradient(top, rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url("/poblados-colonizacion-colonias-penitenciarias/images/banner.jpg"); + background-image: -webkit-linear-gradient(top, rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url("/poblados-colonizacion-colonias-penitenciarias/images/banner.jpg"); + background-image: -ms-linear-gradient(top, rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url("/poblados-colonizacion-colonias-penitenciarias/images/banner.jpg"); + background-image: linear-gradient(top, rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url("/poblados-colonizacion-colonias-penitenciarias/images/banner.jpg"); + background-position: center center; + background-repeat: no-repeat; + background-size: cover; } +body.is-mobile.landing #footer { + background-color: #1d242a; } + +@media screen and (max-width: 736px) { + .wrapper { + padding: 2em 0 0.1em 0 ; } } +.wrapper > .inner { + width: 55em; + margin: 0 auto; } + @media screen and (max-width: 1280px) { + .wrapper > .inner { + width: 90%; } } + @media screen and (max-width: 980px) { + .wrapper > .inner { + width: 100%; } } + .wrapper > .inner > p { + width: 40em; } + @media screen and (max-width: 1280px) { + .wrapper > .inner > p { + width: 45em; } } + @media screen and (max-width: 980px) { + .wrapper > .inner > p { + width: 90%; } } + +twentytwenty-wrapper img { + width: 100%; } + +.features li { + padding: 3em 3em 1em 3em; } + .features li h3, + .features li p { + text-align: left; } + +/* Section Three */ +#three .inner { + width: 60em; } + @media screen and (max-width: 1280px) { + #three .inner { + width: 100%; } } + @media screen and (max-width: 980px) { + #three .inner { + width: 100%; } } diff --git a/docs/_site/cultivos.html b/docs/_site/cultivos.html new file mode 100644 index 0000000..8d9df51 --- /dev/null +++ b/docs/_site/cultivos.html @@ -0,0 +1,169 @@ + + + + + + + + Tipos de cultivo y producción + + + + + + + + + + + + + +
+ + + + + +
+ +
+

Tipos de cultivo y producción

+

+
+ +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/docs/_site/feed.xml b/docs/_site/feed.xml new file mode 100644 index 0000000..a98cdb4 --- /dev/null +++ b/docs/_site/feed.xml @@ -0,0 +1,14 @@ + + + + TÍTULO + Descripción breve del proyecto + + http://localhost:4000/poblados-colonizacion-colonias-penitenciarias/ + + Sat, 17 Jun 2017 18:08:56 +0200 + Sat, 17 Jun 2017 18:08:56 +0200 + Jekyll v3.3.1 + + + diff --git a/docs/_site/fonts/FontAwesome.otf b/docs/_site/fonts/FontAwesome.otf new file mode 100755 index 0000000..681bdd4 Binary files /dev/null and b/docs/_site/fonts/FontAwesome.otf differ diff --git a/docs/_site/fonts/fontawesome-webfont.eot b/docs/_site/fonts/fontawesome-webfont.eot new file mode 100755 index 0000000..a30335d Binary files /dev/null and b/docs/_site/fonts/fontawesome-webfont.eot differ diff --git a/docs/_site/fonts/fontawesome-webfont.svg b/docs/_site/fonts/fontawesome-webfont.svg new file mode 100755 index 0000000..6fd19ab --- /dev/null +++ b/docs/_site/fonts/fontawesome-webfont.svg @@ -0,0 +1,640 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_site/fonts/fontawesome-webfont.ttf b/docs/_site/fonts/fontawesome-webfont.ttf new file mode 100755 index 0000000..d7994e1 Binary files /dev/null and b/docs/_site/fonts/fontawesome-webfont.ttf differ diff --git a/docs/_site/fonts/fontawesome-webfont.woff b/docs/_site/fonts/fontawesome-webfont.woff new file mode 100755 index 0000000..6fd4ede Binary files /dev/null and b/docs/_site/fonts/fontawesome-webfont.woff differ diff --git a/docs/_site/fonts/fontawesome-webfont.woff2 b/docs/_site/fonts/fontawesome-webfont.woff2 new file mode 100755 index 0000000..5560193 Binary files /dev/null and b/docs/_site/fonts/fontawesome-webfont.woff2 differ diff --git a/docs/_site/graficos/data/alberche.png b/docs/_site/graficos/data/alberche.png new file mode 100644 index 0000000..740ab0b Binary files /dev/null and b/docs/_site/graficos/data/alberche.png differ diff --git a/docs/_site/graficos/data/aragon_cataluna.png b/docs/_site/graficos/data/aragon_cataluna.png new file mode 100644 index 0000000..f9a9740 Binary files /dev/null and b/docs/_site/graficos/data/aragon_cataluna.png differ diff --git a/docs/_site/graficos/data/bajo_guadalquivir.png b/docs/_site/graficos/data/bajo_guadalquivir.png new file mode 100644 index 0000000..fe78351 Binary files /dev/null and b/docs/_site/graficos/data/bajo_guadalquivir.png differ diff --git a/docs/_site/graficos/data/baleares.png b/docs/_site/graficos/data/baleares.png new file mode 100644 index 0000000..aa19e04 Binary files /dev/null and b/docs/_site/graficos/data/baleares.png differ diff --git a/docs/_site/graficos/data/capa-0.png b/docs/_site/graficos/data/capa-0.png new file mode 100644 index 0000000..801ebbd Binary files /dev/null and b/docs/_site/graficos/data/capa-0.png differ diff --git a/docs/_site/graficos/data/capa-1.png b/docs/_site/graficos/data/capa-1.png new file mode 100644 index 0000000..1ed7eb7 Binary files /dev/null and b/docs/_site/graficos/data/capa-1.png differ diff --git a/docs/_site/graficos/data/capa-10.png b/docs/_site/graficos/data/capa-10.png new file mode 100644 index 0000000..de0b838 Binary files /dev/null and b/docs/_site/graficos/data/capa-10.png differ diff --git a/docs/_site/graficos/data/capa-2.png b/docs/_site/graficos/data/capa-2.png new file mode 100644 index 0000000..9f3bf39 Binary files /dev/null and b/docs/_site/graficos/data/capa-2.png differ diff --git a/docs/_site/graficos/data/capa-3.png b/docs/_site/graficos/data/capa-3.png new file mode 100644 index 0000000..de0b838 Binary files /dev/null and b/docs/_site/graficos/data/capa-3.png differ diff --git a/docs/_site/graficos/data/capa-4.png b/docs/_site/graficos/data/capa-4.png new file mode 100644 index 0000000..c532612 Binary files /dev/null and b/docs/_site/graficos/data/capa-4.png differ diff --git a/docs/_site/graficos/data/capa-5.png b/docs/_site/graficos/data/capa-5.png new file mode 100644 index 0000000..9aadb93 Binary files /dev/null and b/docs/_site/graficos/data/capa-5.png differ diff --git a/docs/_site/graficos/data/capa-6.png b/docs/_site/graficos/data/capa-6.png new file mode 100644 index 0000000..c89afb1 Binary files /dev/null and b/docs/_site/graficos/data/capa-6.png differ diff --git a/docs/_site/graficos/data/capa-7.png b/docs/_site/graficos/data/capa-7.png new file mode 100644 index 0000000..b3f3031 Binary files /dev/null and b/docs/_site/graficos/data/capa-7.png differ diff --git a/docs/_site/graficos/data/capa-8.png b/docs/_site/graficos/data/capa-8.png new file mode 100644 index 0000000..9d2adba Binary files /dev/null and b/docs/_site/graficos/data/capa-8.png differ diff --git a/docs/_site/graficos/data/capa-9.png b/docs/_site/graficos/data/capa-9.png new file mode 100644 index 0000000..ff66ce3 Binary files /dev/null and b/docs/_site/graficos/data/capa-9.png differ diff --git a/docs/_site/graficos/data/capa-PGC-0.png b/docs/_site/graficos/data/capa-PGC-0.png new file mode 100644 index 0000000..2043ede Binary files /dev/null and b/docs/_site/graficos/data/capa-PGC-0.png differ diff --git a/docs/_site/graficos/data/capa-PGC-1.png b/docs/_site/graficos/data/capa-PGC-1.png new file mode 100644 index 0000000..154f4f6 Binary files /dev/null and b/docs/_site/graficos/data/capa-PGC-1.png differ diff --git a/docs/_site/graficos/data/capa-PGC-10.png b/docs/_site/graficos/data/capa-PGC-10.png new file mode 100644 index 0000000..eb9d5b9 Binary files /dev/null and b/docs/_site/graficos/data/capa-PGC-10.png differ diff --git a/docs/_site/graficos/data/capa-PGC-2.png b/docs/_site/graficos/data/capa-PGC-2.png new file mode 100644 index 0000000..00796b5 Binary files /dev/null and b/docs/_site/graficos/data/capa-PGC-2.png differ diff --git a/docs/_site/graficos/data/capa-PGC-3.png b/docs/_site/graficos/data/capa-PGC-3.png new file mode 100644 index 0000000..6042dc4 Binary files /dev/null and b/docs/_site/graficos/data/capa-PGC-3.png differ diff --git a/docs/_site/graficos/data/capa-PGC-4.png b/docs/_site/graficos/data/capa-PGC-4.png new file mode 100644 index 0000000..7a819bd Binary files /dev/null and b/docs/_site/graficos/data/capa-PGC-4.png differ diff --git a/docs/_site/graficos/data/capa-PGC-5.png b/docs/_site/graficos/data/capa-PGC-5.png new file mode 100644 index 0000000..113fc4f Binary files /dev/null and b/docs/_site/graficos/data/capa-PGC-5.png differ diff --git a/docs/_site/graficos/data/capa-PGC-6.png b/docs/_site/graficos/data/capa-PGC-6.png new file mode 100644 index 0000000..cff3082 Binary files /dev/null and b/docs/_site/graficos/data/capa-PGC-6.png differ diff --git a/docs/_site/graficos/data/capa-PGC-7.png b/docs/_site/graficos/data/capa-PGC-7.png new file mode 100644 index 0000000..2280d1f Binary files /dev/null and b/docs/_site/graficos/data/capa-PGC-7.png differ diff --git a/docs/_site/graficos/data/capa-PGC-8.png b/docs/_site/graficos/data/capa-PGC-8.png new file mode 100644 index 0000000..18b939b Binary files /dev/null and b/docs/_site/graficos/data/capa-PGC-8.png differ diff --git a/docs/_site/graficos/data/capa-PGC-9.png b/docs/_site/graficos/data/capa-PGC-9.png new file mode 100644 index 0000000..2761ea9 Binary files /dev/null and b/docs/_site/graficos/data/capa-PGC-9.png differ diff --git a/docs/_site/graficos/data/cmap-cuencas.png b/docs/_site/graficos/data/cmap-cuencas.png new file mode 100644 index 0000000..010b4af Binary files /dev/null and b/docs/_site/graficos/data/cmap-cuencas.png differ diff --git a/docs/_site/graficos/data/cuencas.png b/docs/_site/graficos/data/cuencas.png new file mode 100644 index 0000000..faef82f Binary files /dev/null and b/docs/_site/graficos/data/cuencas.png differ diff --git a/docs/_site/graficos/data/datos_grafico_presos.csv b/docs/_site/graficos/data/datos_grafico_presos.csv new file mode 100644 index 0000000..b8753d7 --- /dev/null +++ b/docs/_site/graficos/data/datos_grafico_presos.csv @@ -0,0 +1,10 @@ +CH,AGRUPACION,ENTIDAD,MUNICIPIO,ANYO INICIO,ANYO FINAL,X ETRS89 UTM 30,Y,DESCRIPCION +guadalquivir,SCPM1,La Corchuela,Dos Hermanas,1939,1944,235974,4127991,Canal del Bajo Guadalquivir +guadalquivir,SCPM1,Los Merinales,Dos Hermanas,1944,1960,237303,4132469,Canal del Bajo Guadalquivir/Riegos del Salado del Morón +guadiana,SCPM2,La Colonia,Montijo,1941,1957,188429,4313814,Canal del Montijo/Obras del INC para el Plan Badajoz +tajo,SCPM3,Campamento de la Sal,Talavera de la Reina,1940,1953,352377,4430639,Canal del Bajo Alberche +tajo,SCPM3bis,,Madrigal de la Vera,1953,1959,300052,4443243,Canal del Rio Tietar +tajo,SCPM4,,Añover del Tajo,1940,1944,438074,4430598,Real Acequia del Jarama +tajo,SCPM4,,Navalmoral de la Mata,1950,1953,282823,4419263,Pantano de Rosarito rio Tiétar +guadalquivir,SCPM6,Los Merinales,Dos Hermanas,1942,1944,237303,4132469,Canal del Bajo Guadalquivir y + +ebro,SCMP7,,Vilanova de la Barca,?,1956,810191,4622084,Canal de Aragón y Cataluña/Canal de la Violada diff --git a/docs/_site/graficos/data/duero.png b/docs/_site/graficos/data/duero.png new file mode 100644 index 0000000..63e50f3 Binary files /dev/null and b/docs/_site/graficos/data/duero.png differ diff --git a/docs/_site/graficos/data/ebro.png b/docs/_site/graficos/data/ebro.png new file mode 100644 index 0000000..d1e4f4b Binary files /dev/null and b/docs/_site/graficos/data/ebro.png differ diff --git a/docs/_site/graficos/data/guadalquivir-presos.png b/docs/_site/graficos/data/guadalquivir-presos.png new file mode 100644 index 0000000..887a54b Binary files /dev/null and b/docs/_site/graficos/data/guadalquivir-presos.png differ diff --git a/docs/_site/graficos/data/guadalquivir.png b/docs/_site/graficos/data/guadalquivir.png new file mode 100644 index 0000000..6ad7965 Binary files /dev/null and b/docs/_site/graficos/data/guadalquivir.png differ diff --git a/docs/_site/graficos/data/guadiana.png b/docs/_site/graficos/data/guadiana.png new file mode 100644 index 0000000..aad789d Binary files /dev/null and b/docs/_site/graficos/data/guadiana.png differ diff --git a/docs/_site/graficos/data/harvester_1046427_cc.png b/docs/_site/graficos/data/harvester_1046427_cc.png new file mode 100644 index 0000000..25e6207 Binary files /dev/null and b/docs/_site/graficos/data/harvester_1046427_cc.png differ diff --git a/docs/_site/graficos/data/harvester_1046427_cc_p.png b/docs/_site/graficos/data/harvester_1046427_cc_p.png new file mode 100644 index 0000000..21a3b6e Binary files /dev/null and b/docs/_site/graficos/data/harvester_1046427_cc_p.png differ diff --git a/docs/_site/graficos/data/jarama.png b/docs/_site/graficos/data/jarama.png new file mode 100644 index 0000000..074a331 Binary files /dev/null and b/docs/_site/graficos/data/jarama.png differ diff --git a/docs/_site/graficos/data/jucar.png b/docs/_site/graficos/data/jucar.png new file mode 100644 index 0000000..55d34d8 Binary files /dev/null and b/docs/_site/graficos/data/jucar.png differ diff --git a/docs/_site/graficos/data/la_mancha.png b/docs/_site/graficos/data/la_mancha.png new file mode 100644 index 0000000..8726b16 Binary files /dev/null and b/docs/_site/graficos/data/la_mancha.png differ diff --git a/docs/_site/graficos/data/montijo.png b/docs/_site/graficos/data/montijo.png new file mode 100644 index 0000000..8b57a63 Binary files /dev/null and b/docs/_site/graficos/data/montijo.png differ diff --git a/docs/_site/graficos/data/norte.png b/docs/_site/graficos/data/norte.png new file mode 100644 index 0000000..65a33d8 Binary files /dev/null and b/docs/_site/graficos/data/norte.png differ diff --git a/docs/_site/graficos/data/pirineo.png b/docs/_site/graficos/data/pirineo.png new file mode 100644 index 0000000..01871c0 Binary files /dev/null and b/docs/_site/graficos/data/pirineo.png differ diff --git a/docs/_site/graficos/data/rosarito.png b/docs/_site/graficos/data/rosarito.png new file mode 100644 index 0000000..3c6e4da Binary files /dev/null and b/docs/_site/graficos/data/rosarito.png differ diff --git a/docs/_site/graficos/data/segura.png b/docs/_site/graficos/data/segura.png new file mode 100644 index 0000000..34e0954 Binary files /dev/null and b/docs/_site/graficos/data/segura.png differ diff --git a/docs/_site/graficos/data/sur.png b/docs/_site/graficos/data/sur.png new file mode 100644 index 0000000..a7eca00 Binary files /dev/null and b/docs/_site/graficos/data/sur.png differ diff --git a/docs/_site/graficos/data/tajo.png b/docs/_site/graficos/data/tajo.png new file mode 100644 index 0000000..e134a4c Binary files /dev/null and b/docs/_site/graficos/data/tajo.png differ diff --git a/docs/_site/graficos/data/tarrega.png b/docs/_site/graficos/data/tarrega.png new file mode 100644 index 0000000..7ae5817 Binary files /dev/null and b/docs/_site/graficos/data/tarrega.png differ diff --git a/docs/_site/graficos/data/tractor_792349_cc.png b/docs/_site/graficos/data/tractor_792349_cc.png new file mode 100644 index 0000000..5577a2e Binary files /dev/null and b/docs/_site/graficos/data/tractor_792349_cc.png differ diff --git a/docs/_site/graficos/data/tractor_792349_cc_p.png b/docs/_site/graficos/data/tractor_792349_cc_p.png new file mode 100644 index 0000000..e87df14 Binary files /dev/null and b/docs/_site/graficos/data/tractor_792349_cc_p.png differ diff --git a/docs/_site/graficos/data/viar.png b/docs/_site/graficos/data/viar.png new file mode 100644 index 0000000..52b6ff1 Binary files /dev/null and b/docs/_site/graficos/data/viar.png differ diff --git a/docs/_site/graficos/data/violada.png b/docs/_site/graficos/data/violada.png new file mode 100644 index 0000000..040b032 Binary files /dev/null and b/docs/_site/graficos/data/violada.png differ diff --git a/docs/_site/graficos/expropiacion.html b/docs/_site/graficos/expropiacion.html new file mode 100644 index 0000000..cc7a5d0 --- /dev/null +++ b/docs/_site/graficos/expropiacion.html @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/docs/_site/graficos/expropiacion.js b/docs/_site/graficos/expropiacion.js new file mode 100644 index 0000000..58d6953 --- /dev/null +++ b/docs/_site/graficos/expropiacion.js @@ -0,0 +1,64 @@ +var exceso, reserva, exceptuadas; +var nombres; +var plot; + +function setup() { + createCanvas(800,519); + nombres = new Array("Norte","Duero","Ebro","Pirineo","Jucar","Tajo","Guadiana","Guadalquivir","Sur", "Segura", "Islas"); + exceso = new Array(15267,35628,136465,3466,19615,64179,81809,148193,13326,35075,3235); + reserva = new Array(12251,62730,131128,24433,54545,68854,82052,140453,20980,131042,5985); + exceptuadas = new Array(7094,31194,128457,3289,15734,39460,21419,68830,23782,68386,15675); + + var pointSizes = []; + var points = []; + + for (var n = 0; n < nombres.length; n++) { + points[n] = new GPoint(exceso[n], exceptuadas[n], nombres[n]); + pointSizes[n] = map(reserva[n],5000,141000,5,100); + } + + // Creamos el plot + plot = new GPlot(this); + plot.setDim(width-230, height-100); + plot.setTitleText("Tierras en exceso, reserva y exceptuadas por cuenca hidrografica segun PGC"); + plot.getXAxis().setAxisLabelText("Tierras en exceso (Has)"); + plot.getYAxis().setAxisLabelText("Tierras exceptuadas (Has)"); + plot.setPoints(points); + plot.setPointSizes(pointSizes); + plot.setPointColor(color(255,0,0,50)); + plot.setLineColor(color(0)); + plot.setLabelBgColor(color(255,0)); +} + + +function draw() { + background(255); + + // Draw the plot + plot.beginDraw(); + plot.drawBox(); + plot.drawXAxis(); + plot.drawYAxis(); + plot.drawTitle(); + plot.drawGridLines(GPlot.BOTH); + plot.drawPoints(); + plot.drawLabels(); + plot.drawAllLabels(); + plot.endDraw(); + + textFont("Helvetica"); + textSize(11); + fill(0); + textAlign(LEFT); + text("Tierras en reserva (Has)", 660, 330); + textAlign(CENTER); + stroke(100); + noFill(); + ellipse(720, 390, 100, 100); + fill(0); + text("140000", 720, 390); + noFill(); + ellipse(720, 455, 10, 10); + fill(0); + text("14000", 720, 475); +} diff --git a/docs/_site/graficos/grafica-0.1.0-mod.js b/docs/_site/graficos/grafica-0.1.0-mod.js new file mode 100644 index 0000000..032f690 --- /dev/null +++ b/docs/_site/graficos/grafica-0.1.0-mod.js @@ -0,0 +1,5444 @@ +/* + * Point class. A GPoint is composed of two coordinates (x, y) and a text label + */ +function GPoint() { + var x, y, label; + + if (arguments.length === 3) { + x = arguments[0]; + y = arguments[1]; + label = arguments[2]; + } else if (arguments.length === 2 && arguments[0] instanceof p5.Vector) { + x = arguments[0].x; + y = arguments[0].y; + label = arguments[1]; + } else if (arguments.length === 2) { + x = arguments[0]; + y = arguments[1]; + label = ""; + } else if (arguments.length === 1 && arguments[0] instanceof GPoint) { + x = arguments[0].getX(); + y = arguments[0].getY(); + label = arguments[0].getLabel(); + } else if (arguments.length === 1 && arguments[0] instanceof p5.Vector) { + x = arguments[0].x; + y = arguments[0].y; + label = ""; + } else if (arguments.length === 0) { + x = 0; + y = 0; + label = ""; + } else { + throw new Error("GPoint constructor: signature not supported"); + } + + this.x = x; + this.y = y; + this.label = label; + this.valid = this.isValidNumber(this.x) && this.isValidNumber(this.y); +} + +GPoint.prototype.isValidNumber = function(number) { + return !isNaN(number) && isFinite(number); +}; + +GPoint.prototype.set = function() { + var x, y, label; + + if (arguments.length === 3) { + x = arguments[0]; + y = arguments[1]; + label = arguments[2]; + } else if (arguments.length === 2 && arguments[0] instanceof p5.Vector) { + x = arguments[0].x; + y = arguments[0].y; + label = arguments[1]; + } else if (arguments.length === 2) { + x = arguments[0]; + y = arguments[1]; + label = ""; + } else if (arguments.length === 1 && arguments[0] instanceof GPoint) { + x = arguments[0].getX(); + y = arguments[0].getY(); + label = arguments[0].getLabel(); + } else if (arguments.length === 1 && arguments[0] instanceof p5.Vector) { + x = arguments[0].x; + y = arguments[0].y; + label = ""; + } else { + throw new Error("GPoint.set(): signature not supported"); + } + + this.x = x; + this.y = y; + this.label = label; + this.valid = this.isValidNumber(this.x) && this.isValidNumber(this.y); +}; + +GPoint.prototype.setX = function(x) { + this.x = x; + this.valid = this.isValidNumber(this.x) && this.isValidNumber(this.y); +}; + +GPoint.prototype.setY = function(y) { + this.y = y; + this.valid = this.isValidNumber(this.x) && this.isValidNumber(this.y); +}; + +GPoint.prototype.setLabel = function(label) { + this.label = label; +}; + +GPoint.prototype.setXY = function() { + var x, y; + + if (arguments.length === 2) { + x = arguments[0]; + y = arguments[1]; + } else if (arguments.length === 1 && arguments[0] instanceof GPoint) { + x = arguments[0].getX(); + y = arguments[0].getY(); + } else if (arguments.length === 1 && arguments[0] instanceof p5.Vector) { + x = arguments[0].x; + y = arguments[0].y; + } else { + throw new Error("GPoint.setXY(): signature not supported"); + } + + this.x = x; + this.y = y; + this.valid = this.isValidNumber(this.x) && this.isValidNumber(this.y); +}; + +GPoint.prototype.getX = function() { + return this.x; +}; + +GPoint.prototype.getY = function() { + return this.y; +}; + +GPoint.prototype.getLabel = function() { + return this.label; +}; + +GPoint.prototype.getValid = function() { + return this.valid; +}; + +GPoint.prototype.isValid = function() { + return this.valid; +}; +/* + * Title class. + */ +function GTitle(parent, dim) { + // The parent processing object + this.parent = parent; + + // General properties + this.dim = dim.slice(); + this.relativePos = 0.5; + this.plotPos = this.relativePos * this.dim[0]; + this.offset = 10; + + // Text properties + this.text = ""; + this.textAlignment = this.parent.CENTER; + this.fontName = "Helvetica"; + this.fontColor = this.parent.color(100); + this.fontStyle = this.parent.BOLD; + this.fontSize = 13; +} + +GTitle.prototype.draw = function() { + this.parent.push(); + this.parent.textFont(this.fontName); + this.parent.textStyle(this.fontStyle); + this.parent.textSize(this.fontSize); + this.parent.fill(this.fontColor); + this.parent.noStroke(); + this.parent.textAlign(this.textAlignment, this.parent.BOTTOM); + this.parent.text(this.text, this.plotPos, -this.offset - this.dim[1]); + + // There seems to be a bug in p5.js + this.parent.textStyle(this.parent.NORMAL); + this.parent.pop(); +}; + +GTitle.prototype.setDim = function() { + var xDim, yDim; + + if (arguments.length === 2) { + xDim = arguments[0]; + yDim = arguments[1]; + } else if (arguments.length === 1) { + xDim = arguments[0][0]; + yDim = arguments[0][1]; + } else { + throw new Error("GTitle.setDim(): signature not supported"); + } + + if (xDim > 0 && yDim > 0) { + this.dim[0] = xDim; + this.dim[1] = yDim; + this.plotPos = this.relativePos * this.dim[0]; + } +}; + +GTitle.prototype.setRelativePos = function(relativePos) { + this.relativePos = relativePos; + this.plotPos = this.relativePos * this.dim[0]; +}; + +GTitle.prototype.setOffset = function(offset) { + this.offset = offset; +}; + +GTitle.prototype.setText = function(text) { + this.text = text; +}; + +GTitle.prototype.setTextAlignment = function(textAlignment) { + if (textAlignment === this.parent.CENTER || textAlignment === this.parent.LEFT || textAlignment === this.parent.RIGHT) { + this.textAlignment = textAlignment; + } +}; + +GTitle.prototype.setFontName = function(fontName) { + this.fontName = fontName; +}; + +GTitle.prototype.setFontColor = function(fontColor) { + this.fontColor = fontColor; +}; + +GTitle.prototype.setFontStyle = function(fontStyle) { + this.fontStyle = fontStyle; +}; + +GTitle.prototype.setFontSize = function(fontSize) { + if (fontSize > 0) { + this.fontSize = fontSize; + } +}; + +GTitle.prototype.setFontProperties = function(fontName, fontColor, fontSize) { + if (fontSize > 0) { + this.fontName = fontName; + this.fontColor = fontColor; + this.fontSize = fontSize; + } +}; +/* + * Axis label class. + */ +function GAxisLabel(parent, type, dim) { + // The parent processing object + this.parent = parent; + + // General properties + this.type = (type === this.parent.BOTTOM || type === this.parent.TOP || type === this.parent.LEFT || type === this.parent.RIGHT) ? type : this.parent.BOTTOM; + this.dim = dim.slice(); + this.relativePos = 0.5; + this.plotPos = (this.type === this.parent.BOTTOM || this.type === this.parent.TOP) ? this.relativePos * this.dim[0] : -this.relativePos * this.dim[1]; + this.offset = 35; + this.rotate = (this.type === this.parent.BOTTOM || this.type === this.parent.TOP) ? false : true; + + // Text properties + this.text = ""; + this.textAlignment = this.parent.CENTER; + this.fontName = "Helvetica"; + this.fontColor = this.parent.color(0); + this.fontSize = 13; +} + +GAxisLabel.prototype.draw = function() { + switch (this.type) { + case this.parent.BOTTOM: + this.drawAsXLabel(); + break; + case this.parent.LEFT: + this.drawAsYLabel(); + break; + case this.parent.TOP: + this.drawAsTopLabel(); + break; + case this.parent.RIGHT: + this.drawAsRightLabel(); + break; + } +}; + +GAxisLabel.prototype.drawAsXLabel = function() { + this.parent.push(); + this.parent.textFont(this.fontName); + this.parent.textSize(this.fontSize); + this.parent.fill(this.fontColor); + this.parent.noStroke(); + + if (this.rotate) { + this.parent.textAlign(this.parent.RIGHT, this.parent.CENTER); + this.parent.translate(this.plotPos, this.offset); + this.parent.rotate(-0.5 * Math.PI); + this.parent.text(this.text, 0, 0); + } else { + this.parent.textAlign(this.textAlignment, this.parent.TOP); + this.parent.text(this.text, this.plotPos, this.offset); + } + + this.parent.pop(); +}; + +GAxisLabel.prototype.drawAsYLabel = function() { + this.parent.push(); + this.parent.textFont(this.fontName); + this.parent.textSize(this.fontSize); + this.parent.fill(this.fontColor); + this.parent.noStroke(); + + if (this.rotate) { + this.parent.textAlign(this.textAlignment, this.parent.BOTTOM); + this.parent.translate(-this.offset, this.plotPos); + this.parent.rotate(-0.5 * Math.PI); + this.parent.text(this.text, 0, 0); + } else { + this.parent.textAlign(this.parent.RIGHT, this.parent.CENTER); + this.parent.text(this.text, -this.offset, this.plotPos); + } + + this.parent.pop(); +}; + +GAxisLabel.prototype.drawAsTopLabel = function() { + this.parent.push(); + this.parent.textFont(this.fontName); + this.parent.textSize(this.fontSize); + this.parent.fill(this.fontColor); + this.parent.noStroke(); + + if (this.rotate) { + this.parent.textAlign(this.parent.LEFT, this.parent.CENTER); + this.parent.translate(this.plotPos, -this.offset - this.dim[1]); + this.parent.rotate(-0.5 * Math.PI); + this.parent.text(this.text, 0, 0); + } else { + this.parent.textAlign(this.textAlignment, this.parent.BOTTOM); + this.parent.text(this.text, this.plotPos, -this.offset - this.dim[1]); + } + + this.parent.pop(); +}; + +GAxisLabel.prototype.drawAsRightLabel = function() { + this.parent.push(); + this.parent.textFont(this.fontName); + this.parent.textSize(this.fontSize); + this.parent.fill(this.fontColor); + this.parent.noStroke(); + + if (this.rotate) { + this.parent.textAlign(this.textAlignment, this.parent.TOP); + this.parent.translate(this.offset + this.dim[0], this.plotPos); + this.parent.rotate(-0.5 * Math.PI); + this.parent.text(this.text, 0, 0); + } else { + this.parent.textAlign(this.parent.LEFT, this.parent.CENTER); + this.parent.text(this.text, this.offset + this.dim[0], this.plotPos); + } + + this.parent.pop(); +}; + +GAxisLabel.prototype.setDim = function() { + var xDim, yDim; + + if (arguments.length === 2) { + xDim = arguments[0]; + yDim = arguments[1]; + } else if (arguments.length === 1) { + xDim = arguments[0][0]; + yDim = arguments[0][1]; + } else { + throw new Error("GAxisLabel.setDim(): signature not supported"); + } + + if (xDim > 0 && yDim > 0) { + this.dim[0] = xDim; + this.dim[1] = yDim; + this.plotPos = (this.type === this.parent.BOTTOM || this.type === this.parent.TOP) ? this.relativePos * this.dim[0] : -this.relativePos * this.dim[1]; + } +}; + +GAxisLabel.prototype.setRelativePos = function(relativePos) { + this.relativePos = relativePos; + this.plotPos = (this.type === this.parent.BOTTOM || this.type === this.parent.TOP) ? this.relativePos * this.dim[0] : -this.relativePos * this.dim[1]; +}; + +GAxisLabel.prototype.setOffset = function(offset) { + this.offset = offset; +}; + +GAxisLabel.prototype.setRotate = function(rotate) { + this.rotate = rotate; +}; + +GAxisLabel.prototype.setText = function(text) { + this.text = text; +}; + +GAxisLabel.prototype.setTextAlignment = function(textAlignment) { + if (textAlignment === this.parent.CENTER || textAlignment === this.parent.LEFT || textAlignment === this.parent.RIGHT) { + this.textAlignment = textAlignment; + } +}; + +GAxisLabel.prototype.setFontName = function(fontName) { + this.fontName = fontName; +}; + +GAxisLabel.prototype.setFontColor = function(fontColor) { + this.fontColor = fontColor; +}; + +GAxisLabel.prototype.setFontSize = function(fontSize) { + if (fontSize > 0) { + this.fontSize = fontSize; + } +}; + +GAxisLabel.prototype.setFontProperties = function(fontName, fontColor, fontSize) { + if (fontSize > 0) { + this.fontName = fontName; + this.fontColor = fontColor; + this.fontSize = fontSize; + } +}; +/* + * Axis class. + */ +function GAxis(parent, type, dim, lim, log) { + // The parent processing object + this.parent = parent; + + // General properties + this.type = (type === this.parent.BOTTOM || type === this.parent.TOP || type === this.parent.LEFT || type === this.parent.RIGHT) ? type : this.parent.BOTTOM; + this.dim = dim.slice(); + this.lim = lim.slice(); + this.log = log; + + // Do some sanity checks + if (this.log && (this.lim[0] <= 0 || this.lim[1] <= 0)) { + console.log("The limits are negative. This is not allowed in logarithmic scale."); + console.log("Will set them to (0.1, 10)"); + + if (this.lim[1] > this.lim[0]) { + this.lim[0] = 0.1; + this.lim[1] = 10; + } else { + this.lim[0] = 10; + this.lim[1] = 0.1; + } + } + + // Format properties + this.offset = 5; + this.lineColor = this.parent.color(0); + this.lineWidth = 1; + + // Ticks properties + this.nTicks = 5; + this.ticksSeparation = -1; + this.ticks = []; + this.plotTicks = []; + this.ticksInside = []; + this.tickLabels = []; + this.fixedTicks = false; + this.tickLength = 3; + this.smallTickLength = 2; + this.expTickLabels = false; + this.rotateTickLabels = (this.type === this.parent.BOTTOM || this.type === this.parent.TOP) ? false : true; + this.drawTickLabels = (this.type === this.parent.BOTTOM || this.type === this.parent.LEFT) ? true : false; + this.tickLabelOffset = 7; + this.ticksPrecision = undefined; + + // Label properties + this.lab = new GAxisLabel(this.parent, this.type, this.dim); + this.drawAxisLabel = true; + + // Text properties + this.fontName = "Helvetica"; + this.fontColor = this.parent.color(0); + this.fontSize = 11; + + // Update the arrays + this.updateTicks(); + this.updatePlotTicks(); + this.updateTicksInside(); + this.updateTickLabels(); +} + +GAxis.prototype.obtainSigDigits = function(number) { + return Math.round(-Math.log(0.5 * Math.abs(number)) / Math.LN10); +}; + +GAxis.prototype.roundPlus = function(number, sigDigits) { + // Old way of doing it + // var bd = new BigDecimal(number); + // roundedNumber = parseFloat(bd.setScale(sigDigits, RoundingMode.HALF_UP()).longValue().toFixed(sigDigits)); + + number = Math.round(number * Math.pow(10, sigDigits)) / Math.pow(10, sigDigits); + + if (sigDigits <= 0) { + number = Math.round(number); + } + + return number; +}; + +GAxis.prototype.adaptSize = function(a, n) { + if (n < a.length) { + a.splice(n, Number.MAX_VALUE); + } +}; + +GAxis.prototype.updateTicks = function() { + if (this.log) { + this.obtainLogarithmicTicks(); + } else { + this.obtainLinearTicks(); + } +}; + +GAxis.prototype.obtainLogarithmicTicks = function() { + // Get the exponents of the first and last ticks in increasing order + var firstExp, lastExp; + + if (this.lim[1] > this.lim[0]) { + firstExp = Math.floor(Math.log(this.lim[0]) / Math.LN10); + lastExp = Math.ceil(Math.log(this.lim[1]) / Math.LN10); + } else { + firstExp = Math.floor(Math.log(this.lim[1]) / Math.LN10); + lastExp = Math.ceil(Math.log(this.lim[0]) / Math.LN10); + } + + // Calculate the ticks + var n = (lastExp - firstExp) * 9 + 1; + this.adaptSize(this.ticks, n); + + for (var exp = firstExp; exp < lastExp; exp++) { + var base = this.roundPlus(Math.exp(exp * Math.LN10), -exp); + + for (var i = 0; i < 9; i++) { + this.ticks[(exp - firstExp) * 9 + i] = (i + 1) * base; + } + + } + + this.ticks[this.ticks.length - 1] = this.roundPlus(Math.exp(lastExp * Math.LN10), -exp); + + // Change the ticks order if necessary + if (this.lim[1] < this.lim[0]) { + this.ticks.reverse(); + } +}; + +GAxis.prototype.obtainLinearTicks = function() { + // Obtain the required precision for the ticks + var step = 0; + var nSteps = 0; + var sigDigits = 0; + + if (this.ticksSeparation > 0) { + step = (this.lim[1] > this.lim[0]) ? this.ticksSeparation : -this.ticksSeparation; + sigDigits = this.obtainSigDigits(step); + + while (this.roundPlus(step, sigDigits) - step !== 0) { + sigDigits++; + } + + nSteps = Math.floor((this.lim[1] - this.lim[0]) / step); + } else if (this.nTicks > 0) { + step = (this.lim[1] - this.lim[0]) / this.nTicks; + sigDigits = this.obtainSigDigits(step); + step = this.roundPlus(step, sigDigits); + + if (step === 0 || Math.abs(step) > Math.abs(this.lim[1] - this.lim[0])) { + sigDigits++; + step = this.roundPlus((this.lim[1] - this.lim[0]) / this.nTicks, sigDigits); + } + + nSteps = Math.floor((this.lim[1] - this.lim[0]) / step); + } + + // Calculate the linear ticks + if (nSteps > 0) { + // Obtain the first tick + var firstTick = this.lim[0] + ((this.lim[1] - this.lim[0]) - nSteps * step) / 2; + + // Subtract some steps to be sure we have all + firstTick = this.roundPlus(firstTick - 2 * step, sigDigits); + + while ((this.lim[1] - firstTick) * (this.lim[0] - firstTick) > 0) { + firstTick = this.roundPlus(firstTick + step, sigDigits); + } + + // Calculate the rest of the ticks + var n = Math.floor(Math.abs((this.lim[1] - firstTick) / step)) + 1; + this.adaptSize(this.ticks, n); + this.ticks[0] = firstTick; + + for (var i = 1; i < n; i++) { + this.ticks[i] = this.roundPlus(this.ticks[i - 1] + step, sigDigits); + } + + // Save the ticks precision + this.ticksPrecision = sigDigits; + } else { + this.ticks = []; + } +}; + +GAxis.prototype.updatePlotTicks = function() { + var scaleFactor, i; + var n = this.ticks.length; + this.adaptSize(this.plotTicks, n); + + if (this.log) { + if (this.type === this.parent.BOTTOM || this.type === this.parent.TOP) { + scaleFactor = this.dim[0] / Math.log(this.lim[1] / this.lim[0]); + } else { + scaleFactor = -this.dim[1] / Math.log(this.lim[1] / this.lim[0]); + } + + for ( i = 0; i < n; i++) { + this.plotTicks[i] = Math.log(this.ticks[i] / this.lim[0]) * scaleFactor; + } + } else { + if (this.type === this.parent.BOTTOM || this.type === this.parent.TOP) { + scaleFactor = this.dim[0] / (this.lim[1] - this.lim[0]); + } else { + scaleFactor = -this.dim[1] / (this.lim[1] - this.lim[0]); + } + + for ( i = 0; i < n; i++) { + this.plotTicks[i] = (this.ticks[i] - this.lim[0]) * scaleFactor; + } + } +}; + +GAxis.prototype.updateTicksInside = function() { + var i; + var n = this.ticks.length; + this.adaptSize(this.ticksInside, n); + + if (this.type === this.parent.BOTTOM || this.type === this.parent.TOP) { + for ( i = 0; i < n; i++) { + this.ticksInside[i] = (this.plotTicks[i] >= 0) && (this.plotTicks[i] <= this.dim[0]); + } + } else { + for ( i = 0; i < n; i++) { + this.ticksInside[i] = (-this.plotTicks[i] >= 0) && (-this.plotTicks[i] <= this.dim[1]); + } + } +}; + +GAxis.prototype.updateTickLabels = function() { + var tick, logValue, isExactLogValue, i; + var n = this.ticks.length; + this.adaptSize(this.tickLabels, n); + + if (this.log) { + for ( i = 0; i < n; i++) { + tick = this.ticks[i]; + + if (tick > 0) { + logValue = Math.log(tick) / Math.LN10; + isExactLogValue = Math.abs(logValue - Math.round(logValue)) < 0.0001; + + if (isExactLogValue) { + logValue = Math.round(logValue); + + if (this.expTickLabels) { + this.tickLabels[i] = "1e" + logValue; + } else { + if (logValue > -3.1 && logValue < 3.1) { + this.tickLabels[i] = (logValue >= 0) ? "" + Math.round(tick) : "" + tick; + } else { + this.tickLabels[i] = "1e" + logValue; + } + } + } else { + this.tickLabels[i] = ""; + } + } else { + this.tickLabels[i] = ""; + } + } + } else { + for ( i = 0; i < n; i++) { + tick = this.ticks[i]; + + if (tick % 1 === 0) { + this.tickLabels[i] = "" + Math.round(tick); + } else if ( typeof this.ticksPrecision !== "undefined" && this.ticksPrecision >= 0) { + this.tickLabels[i] = "" + parseFloat(tick).toFixed(this.ticksPrecision); + } else { + this.tickLabels[i] = "" + tick; + } + } + } +}; + +GAxis.prototype.moveLim = function(newLim) { + if (newLim[1] !== newLim[0]) { + // Check that the new limit makes sense + if (this.log && (newLim[0] <= 0 || newLim[1] <= 0)) { + console.log("The limits are negative. This is not allowed in logarithmic scale."); + } else { + this.lim[0] = newLim[0]; + this.lim[1] = newLim[1]; + + // Calculate the new ticks if they are not fixed + if (!this.fixedTicks) { + var n = this.ticks.length; + + if (this.log) { + this.obtainLogarithmicTicks(); + } else if (n > 0) { + // Obtain the ticks precision and the tick separation + var step = 0; + var sigDigits = 0; + + if (this.ticksSeparation > 0) { + step = (this.lim[1] > this.lim[0]) ? this.ticksSeparation : -this.ticksSeparation; + sigDigits = this.obtainSigDigits(step); + + while (this.roundPlus(step, sigDigits) - step !== 0) { + sigDigits++; + } + } else { + step = (n === 1) ? this.lim[1] - this.lim[0] : this.ticks[1] - this.ticks[0]; + sigDigits = this.obtainSigDigits(step); + step = this.roundPlus(step, sigDigits); + + if (step === 0 || Math.abs(step) > Math.abs(this.lim[1] - this.lim[0])) { + sigDigits++; + step = (n === 1) ? this.lim[1] - this.lim[0] : this.ticks[1] - this.ticks[0]; + step = this.roundPlus(step, sigDigits); + } + + step = (this.lim[1] > this.lim[0]) ? Math.abs(step) : -Math.abs(step); + } + + // Obtain the first tick + var firstTick = this.ticks[0] + step * Math.ceil((this.lim[0] - this.ticks[0]) / step); + firstTick = this.roundPlus(firstTick, sigDigits); + + if ((this.lim[1] - firstTick) * (this.lim[0] - firstTick) > 0) { + firstTick = this.ticks[0] + step * Math.floor((this.lim[0] - this.ticks[0]) / step); + firstTick = this.roundPlus(firstTick, sigDigits); + } + + // Calculate the rest of the ticks + n = Math.floor(Math.abs((this.lim[1] - firstTick) / step)) + 1; + this.adaptSize(this.ticks, n); + this.ticks[0] = firstTick; + + for (var i = 1; i < n; i++) { + this.ticks[i] = this.roundPlus(this.ticks[i - 1] + step, sigDigits); + } + + // A sanity check + if (this.ticksPrecision !== sigDigits) { + console.log("There is a problem in the axis ticks precision calculation"); + } + } + + // Obtain the new tick labels + this.updateTickLabels(); + } + + // Update the rest of the arrays + this.updatePlotTicks(); + this.updateTicksInside(); + } + } +}; + +GAxis.prototype.draw = function() { + switch (this.type) { + case this.parent.BOTTOM: + this.drawAsXAxis(); + break; + case this.parent.LEFT: + this.drawAsYAxis(); + break; + case this.parent.TOP: + this.drawAsTopAxis(); + break; + case this.parent.RIGHT: + this.drawAsRightAxis(); + break; + } + + if (this.drawAxisLabel) { + this.lab.draw(); + } +}; + +GAxis.prototype.drawAsXAxis = function() { + var i; + + // Draw the ticks + this.parent.push(); + this.parent.stroke(this.lineColor); + this.parent.strokeWeight(this.lineWidth); + this.parent.strokeCap(this.parent.SQUARE); + + this.parent.line(0, this.offset, this.dim[0], this.offset); + + for ( i = 0; i < this.plotTicks.length; i++) { + if (this.ticksInside[i]) { + if (this.log && this.tickLabels[i] === "") { + this.parent.line(this.plotTicks[i], this.offset, this.plotTicks[i], this.offset + this.smallTickLength); + } else { + this.parent.line(this.plotTicks[i], this.offset, this.plotTicks[i], this.offset + this.tickLength); + } + } + } + + this.parent.pop(); + + // Draw the tick labels + if (this.drawTickLabels) { + this.parent.push(); + this.parent.textFont(this.fontName); + this.parent.textSize(this.fontSize); + this.parent.fill(this.fontColor); + this.parent.noStroke(); + + if (this.rotateTickLabels) { + var halfPI = 0.5 * Math.PI; + this.parent.textAlign(this.parent.RIGHT, this.parent.CENTER); + + for ( i = 0; i < this.plotTicks.length; i++) { + if (this.ticksInside[i] && this.tickLabels[i] !== "") { + this.parent.push(); + this.parent.translate(this.plotTicks[i], this.offset + this.tickLabelOffset); + this.parent.rotate(-halfPI); + this.parent.text(this.tickLabels[i], 0, 0); + this.parent.pop(); + } + } + } else { + this.parent.textAlign(this.parent.CENTER, this.parent.TOP); + + for ( i = 0; i < this.plotTicks.length; i++) { + if (this.ticksInside[i] && this.tickLabels[i] !== "") { + this.parent.text(this.tickLabels[i], this.plotTicks[i], this.offset + this.tickLabelOffset); + } + } + } + + this.parent.pop(); + } +}; + +GAxis.prototype.drawAsYAxis = function() { + var i; + + // Draw the ticks + this.parent.push(); + this.parent.stroke(this.lineColor); + this.parent.strokeWeight(this.lineWidth); + this.parent.strokeCap(this.parent.SQUARE); + + this.parent.line(-this.offset, 0, -this.offset, -this.dim[1]); + + for ( i = 0; i < this.plotTicks.length; i++) { + if (this.ticksInside[i]) { + if (this.log && this.tickLabels[i] === "") { + this.parent.line(-this.offset, this.plotTicks[i], -this.offset - this.smallTickLength, this.plotTicks[i]); + } else { + this.parent.line(-this.offset, this.plotTicks[i], -this.offset - this.tickLength, this.plotTicks[i]); + } + } + } + + this.parent.pop(); + + // Draw the tick labels + if (this.drawTickLabels) { + this.parent.push(); + this.parent.textFont(this.fontName); + this.parent.textSize(this.fontSize); + this.parent.fill(this.fontColor); + this.parent.noStroke(); + + if (this.rotateTickLabels) { + var halfPI = 0.5 * Math.PI; + this.parent.textAlign(this.parent.CENTER, this.parent.BOTTOM); + + for ( i = 0; i < this.plotTicks.length; i++) { + if (this.ticksInside[i] && this.tickLabels[i] !== "") { + this.parent.push(); + this.parent.translate(-this.offset - this.tickLabelOffset, this.plotTicks[i]); + this.parent.rotate(-halfPI); + this.parent.text(this.tickLabels[i], 0, 0); + this.parent.pop(); + } + } + } else { + this.parent.textAlign(this.parent.RIGHT, this.parent.CENTER); + + for ( i = 0; i < this.plotTicks.length; i++) { + if (this.ticksInside[i] && this.tickLabels[i] !== "") { + this.parent.text(this.tickLabels[i], -this.offset - this.tickLabelOffset, this.plotTicks[i]); + } + } + } + + this.parent.pop(); + } +}; + +GAxis.prototype.drawAsTopAxis = function() { + var i; + + // Draw the ticks + this.parent.push(); + this.parent.stroke(this.lineColor); + this.parent.strokeWeight(this.lineWidth); + this.parent.strokeCap(this.parent.SQUARE); + this.parent.translate(0, -this.dim[1]); + + this.parent.line(0, -this.offset, this.dim[0], -this.offset); + + for ( i = 0; i < this.plotTicks.length; i++) { + if (this.ticksInside[i]) { + if (this.log && this.tickLabels[i] === "") { + this.parent.line(this.plotTicks[i], -this.offset, this.plotTicks[i], -this.offset - this.smallTickLength); + } else { + this.parent.line(this.plotTicks[i], -this.offset, this.plotTicks[i], -this.offset - this.tickLength); + } + } + } + + this.parent.pop(); + + // Draw the tick labels + if (this.drawTickLabels) { + this.parent.push(); + this.parent.textFont(this.fontName); + this.parent.textSize(this.fontSize); + this.parent.fill(this.fontColor); + this.parent.noStroke(); + this.parent.translate(0, -this.dim[1]); + + if (this.rotateTickLabels) { + var halfPI = 0.5 * Math.PI; + this.parent.textAlign(this.parent.LEFT, this.parent.CENTER); + + for ( i = 0; i < this.plotTicks.length; i++) { + if (this.ticksInside[i] && this.tickLabels[i] !== "") { + this.parent.push(); + this.parent.translate(this.plotTicks[i], -this.offset - this.tickLabelOffset); + this.parent.rotate(-halfPI); + this.parent.text(this.tickLabels[i], 0, 0); + this.parent.pop(); + } + } + } else { + this.parent.textAlign(this.parent.CENTER, this.parent.BOTTOM); + + for ( i = 0; i < this.plotTicks.length; i++) { + if (this.ticksInside[i] && this.tickLabels[i] !== "") { + this.parent.text(this.tickLabels[i], this.plotTicks[i], -this.offset - this.tickLabelOffset); + } + } + } + + this.parent.pop(); + } +}; + +GAxis.prototype.drawAsRightAxis = function() { + var i; + + // Draw the ticks + this.parent.push(); + this.parent.stroke(this.lineColor); + this.parent.strokeWeight(this.lineWidth); + this.parent.strokeCap(this.parent.SQUARE); + this.parent.translate(this.dim[0], 0); + + this.parent.line(this.offset, 0, this.offset, -this.dim[1]); + + for ( i = 0; i < this.plotTicks.length; i++) { + if (this.ticksInside[i]) { + if (this.log && this.tickLabels[i] === "") { + this.parent.line(this.offset, this.plotTicks[i], this.offset + this.smallTickLength, this.plotTicks[i]); + } else { + this.parent.line(this.offset, this.plotTicks[i], this.offset + this.tickLength, this.plotTicks[i]); + } + } + } + + this.parent.pop(); + + // Draw the tick labels + if (this.drawTickLabels) { + this.parent.push(); + this.parent.textFont(this.fontName); + this.parent.textSize(this.fontSize); + this.parent.fill(this.fontColor); + this.parent.noStroke(); + this.parent.translate(this.dim[0], 0); + + if (this.rotateTickLabels) { + var halfPI = 0.5 * Math.PI; + this.parent.textAlign(this.parent.CENTER, this.parent.TOP); + + for ( i = 0; i < this.plotTicks.length; i++) { + if (this.ticksInside[i] && this.tickLabels[i] !== "") { + this.parent.push(); + this.parent.translate(this.offset + this.tickLabelOffset, this.plotTicks[i]); + this.parent.rotate(-halfPI); + this.parent.text(this.tickLabels[i], 0, 0); + this.parent.pop(); + } + } + } else { + this.parent.textAlign(this.parent.LEFT, this.parent.CENTER); + + for ( i = 0; i < this.plotTicks.length; i++) { + if (this.ticksInside[i] && this.tickLabels[i] !== "") { + this.parent.text(this.tickLabels[i], this.offset + this.tickLabelOffset, this.plotTicks[i]); + } + } + } + + this.parent.pop(); + } +}; + +GAxis.prototype.setDim = function() { + var xDim, yDim; + + if (arguments.length === 2) { + xDim = arguments[0]; + yDim = arguments[1]; + } else if (arguments.length === 1) { + xDim = arguments[0][0]; + yDim = arguments[0][1]; + } else { + throw new Error("GAxis.setDim(): signature not supported"); + } + + if (xDim > 0 && yDim > 0) { + this.dim[0] = xDim; + this.dim[1] = yDim; + this.updatePlotTicks(); + this.lab.setDim(this.dim); + } +}; + +GAxis.prototype.setLim = function(lim) { + if (lim[1] !== lim[0]) { + // Make sure the new limits makes sense + if (this.log && (lim[0] <= 0 || lim[1] <= 0)) { + console.log("One of the limits is negative. This is not allowed in logarithmic scale."); + } else { + this.lim[0] = lim[0]; + this.lim[1] = lim[1]; + + if (!this.fixedTicks) { + this.updateTicks(); + this.updateTickLabels(); + } + + this.updatePlotTicks(); + this.updateTicksInside(); + } + } +}; + +GAxis.prototype.setLimAndLog = function(lim, log) { + if (lim[1] !== lim[0]) { + // Make sure the new limits makes sense + if (log && (lim[0] <= 0 || lim[1] <= 0)) { + console.log("One of the limits is negative. This is not allowed in logarithmic scale."); + } else { + this.lim[0] = lim[0]; + this.lim[1] = lim[1]; + this.log = log; + + if (!this.fixedTicks) { + this.updateTicks(); + this.updateTickLabels(); + } + + this.updatePlotTicks(); + this.updateTicksInside(); + } + } +}; + +GAxis.prototype.setLog = function(log) { + if (log !== this.log) { + this.log = log; + + // Check if the old limits still make sense + if (this.log && (this.lim[0] <= 0 || this.lim[1] <= 0)) { + console.log("The limits are negative. This is not allowed in logarithmic scale."); + console.log("Will set them to (0.1, 10)"); + + if (this.lim[1] > this.lim[0]) { + this.lim[0] = 0.1; + this.lim[1] = 10; + } else { + this.lim[0] = 10; + this.lim[1] = 0.1; + } + } + + if (!this.fixedTicks) { + this.updateTicks(); + this.updateTickLabels(); + } + + this.updatePlotTicks(); + this.updateTicksInside(); + } +}; + +GAxis.prototype.setOffset = function(offset) { + this.offset = offset; +}; + +GAxis.prototype.setLineColor = function(lineColor) { + this.lineColor = lineColor; +}; + +GAxis.prototype.setLineWidth = function(lineWidth) { + if (lineWidth > 0) { + this.lineWidth = lineWidth; + } +}; + +GAxis.prototype.setNTicks = function(nTicks) { + if (nTicks >= 0) { + this.nTicks = nTicks; + this.ticksSeparation = -1; + + if (!this.log) { + this.fixedTicks = false; + this.updateTicks(); + this.updatePlotTicks(); + this.updateTicksInside(); + this.updateTickLabels(); + } + } +}; + +GAxis.prototype.setTicksSeparation = function(ticksSeparation) { + this.ticksSeparation = ticksSeparation; + + if (!this.log) { + this.fixedTicks = false; + this.updateTicks(); + this.updatePlotTicks(); + this.updateTicksInside(); + this.updateTickLabels(); + } +}; + +GAxis.prototype.setTicks = function(ticks) { + var n = ticks.length; + this.adaptSize(this.ticks, n); + + for (var i = 0; i < n; i++) { + this.ticks[i] = ticks[i]; + } + + this.fixedTicks = true; + + // Set the tick precision to undefined + this.ticksPrecision = undefined; + + this.updatePlotTicks(); + this.updateTicksInside(); + this.updateTickLabels(); +}; + +GAxis.prototype.setTickLabels = function(tickLabels) { + if (tickLabels.length === this.tickLabels.length) { + for (var i = 0; i < this.tickLabels.length; i++) { + this.tickLabels[i] = tickLabels[i]; + } + + this.fixedTicks = true; + + // Set the tick precision to undefined + this.ticksPrecision = undefined; + } +}; + +GAxis.prototype.setFixedTicks = function(fixedTicks) { + if (fixedTicks !== this.fixedTicks) { + this.fixedTicks = fixedTicks; + + if (!this.fixedTicks) { + this.updateTicks(); + this.updatePlotTicks(); + this.updateTicksInside(); + this.updateTickLabels(); + } + } +}; + +GAxis.prototype.setTickLength = function(tickLength) { + this.tickLength = tickLength; +}; + +GAxis.prototype.setSmallTickLength = function(smallTickLength) { + this.smallTickLength = smallTickLength; +}; + +GAxis.prototype.setExpTickLabels = function(expTickLabels) { + if (expTickLabels !== this.expTickLabels) { + this.expTickLabels = expTickLabels; + this.updateTickLabels(); + } +}; + +GAxis.prototype.setRotateTickLabels = function(rotateTickLabels) { + this.rotateTickLabels = rotateTickLabels; +}; + +GAxis.prototype.setDrawTickLabels = function(drawTickLabels) { + this.drawTickLabels = drawTickLabels; +}; + +GAxis.prototype.setTickLabelOffset = function(tickLabelOffset) { + this.tickLabelOffset = tickLabelOffset; +}; + +GAxis.prototype.setDrawAxisLabel = function(drawAxisLabel) { + this.drawAxisLabel = drawAxisLabel; +}; + +GAxis.prototype.setAxisLabelText = function(axisLabelText) { + this.lab.setText(axisLabelText); +}; + +GAxis.prototype.setFontName = function(fontName) { + this.fontName = fontName; +}; + +GAxis.prototype.setFontColor = function(fontColor) { + this.fontColor = fontColor; +}; + +GAxis.prototype.setFontSize = function(fontSize) { + if (fontSize > 0) { + this.fontSize = fontSize; + } +}; + +GAxis.prototype.setFontProperties = function(fontName, fontColor, fontSize) { + if (fontSize > 0) { + this.fontName = fontName; + this.fontColor = fontColor; + this.fontSize = fontSize; + } +}; + +GAxis.prototype.setAllFontProperties = function(fontName, fontColor, fontSize) { + this.setFontProperties(fontName, fontColor, fontSize); + this.lab.setFontProperties(fontName, fontColor, fontSize); +}; + +GAxis.prototype.getTicks = function() { + if (this.fixedTicks) { + return this.ticks.slice(); + } else { + // Return only the ticks that are visible + var validTicks = []; + var counter = 0; + + for (var i = 0; i < this.ticksInside.length; i++) { + if (this.ticksInside[i]) { + validTicks[counter] = this.ticks[i]; + counter++; + } + } + + return validTicks; + } +}; + +GAxis.prototype.getTicksRef = function() { + return this.ticks; +}; + +GAxis.prototype.getPlotTicks = function() { + if (this.fixedTicks) { + return this.plotTicks.slice(); + } else { + var validPlotTicks = []; + var counter = 0; + + for (var i = 0; i < this.ticksInside.length; i++) { + if (this.ticksInside[i]) { + validPlotTicks[counter] = this.plotTicks[i]; + counter++; + } + } + + return validPlotTicks; + } +}; + +GAxis.prototype.getPlotTicksRef = function() { + return this.plotTicks; +}; + +GAxis.prototype.getAxisLabel = function() { + return this.lab; +}; +/* + * Histogram class. + */ +function GHistogram(parent, type, dim, plotPoints) { + // The parent processing object + this.parent = parent; + + // General properties + this.type = (type === GPlot.VERTICAL || type === GPlot.HORIZONTAL) ? type : GPlot.VERTICAL; + this.dim = dim.slice(); + this.plotPoints = []; + + // Copy the plot points + for (var i = 0; i < plotPoints.length; i++) { + this.plotPoints[i] = new GPoint(plotPoints[i]); + } + + this.visible = true; + this.separations = [2]; + this.bgColors = [this.parent.color(150, 150, 255)]; + this.lineColors = [this.parent.color(100, 100, 255)]; + this.lineWidths = [1]; + this.differences = []; + this.leftSides = []; + this.rightSides = []; + this.updateArrays(); + + // Labels properties + this.labelsOffset = 8; + this.drawLabels = false; + this.rotateLabels = false; + this.fontName = "Helvetica"; + this.fontColor = this.parent.color(0); + this.fontSize = 11; +} + +GHistogram.prototype.updateArrays = function() { + var i; + var nPoints = this.plotPoints.length; + + // Remove unused points + if (this.differences.length > nPoints) { + this.differences.splice(nPoints, Number.MAX_VALUE); + this.leftSides.splice(nPoints, Number.MAX_VALUE); + this.rightSides.splice(nPoints, Number.MAX_VALUE); + } + + // Update the arrays + if (nPoints === 1) { + this.leftSides[0] = (this.type === GPlot.VERTICAL) ? 0.2 * this.dim[0] : 0.2 * this.dim[1]; + this.rightSides[0] = this.leftSides[0]; + } else if (nPoints > 1) { + // Calculate the differences between consecutive points + for ( i = 0; i < nPoints - 1; i++) { + if (this.plotPoints[i].isValid() && this.plotPoints[i + 1].isValid()) { + var separation = this.separations[i % this.separations.length]; + var diff; + + if (this.type === GPlot.VERTICAL) { + diff = this.plotPoints[i + 1].getX() - this.plotPoints[i].getX(); + } else { + diff = this.plotPoints[i + 1].getY() - this.plotPoints[i].getY(); + } + + if (diff > 0) { + this.differences[i] = (diff - separation) / 2; + } else { + this.differences[i] = (diff + separation) / 2; + } + } else { + this.differences[i] = 0; + } + } + + // Fill the leftSides and rightSides arrays + this.leftSides[0] = this.differences[0]; + this.rightSides[0] = this.differences[0]; + + for ( i = 1; i < nPoints - 1; i++) { + this.leftSides[i] = this.differences[i - 1]; + this.rightSides[i] = this.differences[i]; + } + + this.leftSides[nPoints - 1] = this.differences[nPoints - 2]; + this.rightSides[nPoints - 1] = this.differences[nPoints - 2]; + } +}; + +GHistogram.prototype.draw = function(plotBasePoint) { + if (this.visible) { + // Calculate the baseline for the histogram + var baseline = 0; + + if (plotBasePoint.isValid()) { + baseline = (this.type === GPlot.VERTICAL) ? plotBasePoint.getY() : plotBasePoint.getX(); + } + + // Draw the rectangles + var point, x1, x2, y1, y2, lw; + var nPoints = this.plotPoints.length; + + this.parent.push(); + this.parent.rectMode(this.parent.CORNERS); + this.parent.strokeCap(this.parent.SQUARE); + + for (var i = 0; i < nPoints; i++) { + point = this.plotPoints[i]; + + if (point.isValid()) { + // Obtain the corners + if (this.type === GPlot.VERTICAL) { + x1 = point.getX() - this.leftSides[i]; + x2 = point.getX() + this.rightSides[i]; + y1 = point.getY(); + y2 = baseline; + } else { + x1 = baseline; + x2 = point.getX(); + y1 = point.getY() - this.leftSides[i]; + y2 = point.getY() + this.rightSides[i]; + } + + if (x1 < 0) { + x1 = 0; + } else if (x1 > this.dim[0]) { + x1 = this.dim[0]; + } + + if (-y1 < 0) { + y1 = 0; + } else if (-y1 > this.dim[1]) { + y1 = -this.dim[1]; + } + + if (x2 < 0) { + x2 = 0; + } else if (x2 > this.dim[0]) { + x2 = this.dim[0]; + } + + if (-y2 < 0) { + y2 = 0; + } else if (-y2 > this.dim[1]) { + y2 = -this.dim[1]; + } + + // Draw the rectangle + lw = this.lineWidths[i % this.lineWidths.length]; + this.parent.fill(this.bgColors[i % this.bgColors.length]); + this.parent.stroke(this.lineColors[i % this.lineColors.length]); + this.parent.strokeWeight(lw); + + if (Math.abs(x2 - x1) > 2 * lw && Math.abs(y2 - y1) > 2 * lw) { + this.parent.rect(x1, y1, x2, y2); + } else if ((this.type === GPlot.VERTICAL && x2 !== x1 && !(y1 === y2 && (y1 === 0 || y1 === -this.dim[1]))) || (this.type === GPlot.HORIZONTAL && y2 !== y1 && !(x1 === x2 && (x1 === 0 || x1 === this.dim[0])))) { + this.parent.rect(x1, y1, x2, y2); + this.parent.line(x1, y1, x1, y2); + this.parent.line(x2, y1, x2, y2); + this.parent.line(x1, y1, x2, y1); + this.parent.line(x1, y2, x2, y2); + } + } + } + + this.parent.pop(); + + // Draw the labels + if (this.drawLabels) { + this.drawHistLabels(); + } + } +}; + +GHistogram.prototype.drawHistLabels = function() { + var point, i; + var nPoints = this.plotPoints.length; + var halfPI = 0.5 * Math.PI; + + this.parent.push(); + this.parent.textFont(this.fontName); + this.parent.textSize(this.fontSize); + this.parent.fill(this.fontColor); + this.parent.noStroke(); + + if (this.type === GPlot.VERTICAL) { + if (this.rotateLabels) { + this.parent.textAlign(this.parent.RIGHT, this.parent.CENTER); + + for ( i = 0; i < nPoints; i++) { + point = this.plotPoints[i]; + + if (point.isValid() && point.getX() >= 0 && point.getX() <= this.dim[0]) { + this.parent.push(); + this.parent.translate(point.getX(), this.labelsOffset); + this.parent.rotate(-halfPI); + this.parent.text(point.getLabel(), 0, 0); + this.parent.pop(); + } + } + } else { + this.parent.textAlign(this.parent.CENTER, this.parent.TOP); + + for ( i = 0; i < nPoints; i++) { + point = this.plotPoints[i]; + + if (point.isValid() && point.getX() >= 0 && point.getX() <= this.dim[0]) { + this.parent.text(point.getLabel(), point.getX(), this.labelsOffset); + } + } + } + } else { + if (this.rotateLabels) { + this.parent.textAlign(this.parent.CENTER, this.parent.BOTTOM); + + for ( i = 0; i < nPoints; i++) { + point = this.plotPoints[i]; + + if (point.isValid() && -point.getY() >= 0 && -point.getY() <= this.dim[1]) { + this.parent.push(); + this.parent.translate(-this.labelsOffset, point.getY()); + this.parent.rotate(-halfPI); + this.parent.text(point.getLabel(), 0, 0); + this.parent.pop(); + } + } + } else { + this.parent.textAlign(this.parent.RIGHT, this.parent.CENTER); + + for ( i = 0; i < nPoints; i++) { + point = this.plotPoints[i]; + + if (point.isValid() && -point.getY() >= 0 && -point.getY() <= this.dim[1]) { + this.parent.text(point.getLabel(), -this.labelsOffset, point.getY()); + } + } + } + } + + this.parent.pop(); +}; + +GHistogram.prototype.setType = function(type) { + if (type !== this.type && (type === GPlot.VERTICAL || type === GPlot.HORIZONTAL)) { + this.type = type; + this.updateArrays(); + } +}; + +GHistogram.prototype.setDim = function() { + var xDim, yDim; + + if (arguments.length === 2) { + xDim = arguments[0]; + yDim = arguments[1]; + } else if (arguments.length === 1) { + xDim = arguments[0][0]; + yDim = arguments[0][1]; + } else { + throw new Error("GHistogram.setDim(): signature not supported"); + } + + if (xDim > 0 && yDim > 0) { + this.dim[0] = xDim; + this.dim[1] = yDim; + this.updateArrays(); + } +}; + +GHistogram.prototype.setPlotPoints = function(plotPoints) { + var i; + var nPoints = plotPoints.length; + + if (this.plotPoints.length === nPoints) { + for ( i = 0; i < nPoints; i++) { + this.plotPoints[i].set(plotPoints[i]); + } + } else if (this.plotPoints.length > nPoints) { + for ( i = 0; i < nPoints; i++) { + this.plotPoints[i].set(plotPoints[i]); + } + + this.plotPoints.splice(nPoints, Number.MAX_VALUE); + } else { + for ( i = 0; i < this.plotPoints.length; i++) { + this.plotPoints[i].set(plotPoints[i]); + } + + for ( i = this.plotPoints.lengh; i < nPoints; i++) { + this.plotPoints[i] = new GPoint(plotPoints[i]); + } + } + + this.updateArrays(); +}; + +GHistogram.prototype.setPlotPoint = function(index, plotPoint) { + if (index < this.plotPoints.length) { + this.plotPoints[index].set(plotPoint); + } else if (index === this.plotPoints.length) { + this.plotPoints[index] = new GPoint(plotPoint); + } else { + throw new Error("GHistogram.setPlotPoint(): the index position is outside the array size"); + } + + this.updateArrays(); +}; + +GHistogram.prototype.addPlotPoint = function() { + if (arguments.length === 2) { + this.plotPoints.push(new GPoint(arguments[0], arguments[1])); + } else if (arguments.length === 1) { + this.plotPoints.push(new GPoint(arguments[0])); + } else { + throw new Error("GHistogram.addPlotPoint(): signature not supported"); + } + + this.updateArrays(); +}; + +GHistogram.prototype.removePlotPoint = function(index) { + if (index < this.plotPoints.length) { + this.plotPoints.splice(index, 1); + } else { + throw new Error("GHistogram.removePlotPoint(): the index position is outside the array size"); + } + + this.updateArrays(); +}; + +GHistogram.prototype.setSeparations = function(separations) { + this.separations = separations.slice(); + this.updateArrays(); +}; + +GHistogram.prototype.setBgColors = function(bgColors) { + this.bgColors = bgColors.slice(); +}; + +GHistogram.prototype.setLineColors = function(lineColors) { + this.lineColors = lineColors.slice(); +}; + +GHistogram.prototype.setLineWidths = function(lineWidths) { + this.lineWidths = lineWidths.slice(); +}; + +GHistogram.prototype.setVisible = function(visible) { + this.visible = visible; +}; + +GHistogram.prototype.setLabelsOffset = function(labelsOffset) { + this.labelsOffset = labelsOffset; +}; + +GHistogram.prototype.setDrawLabels = function(drawLabels) { + this.drawLabels = drawLabels; +}; + +GHistogram.prototype.setRotateLabels = function(rotateLabels) { + this.rotateLabels = rotateLabels; +}; + +GHistogram.prototype.setFontName = function(fontName) { + this.fontName = fontName; +}; + +GHistogram.prototype.setFontColor = function(fontColor) { + this.fontColor = fontColor; +}; + +GHistogram.prototype.setFontSize = function(fontSize) { + if (fontSize > 0) { + this.fontSize = fontSize; + } +}; + +GHistogram.prototype.setFontProperties = function(fontName, fontColor, fontSize) { + if (fontSize > 0) { + this.fontName = fontName; + this.fontColor = fontColor; + this.fontSize = fontSize; + } +}; +/* + * Layer class. A GLayer usually contains an array of points and a histogram + */ +function GLayer(parent, id, dim, xLim, yLim, xLog, yLog) { + // The parent processing object + this.parent = parent; + + // General properties + this.id = id; + this.dim = dim.slice(); + this.xLim = xLim.slice(); + this.yLim = yLim.slice(); + this.xLog = xLog; + this.yLog = yLog; + + // Do some sanity checks + if (this.xLog && (this.xLim[0] <= 0 || this.xLim[1] <= 0)) { + console.log("One of the limits is negative. This is not allowed in logarithmic scale."); + console.log("Will set horizontal limits to (0.1, 10)"); + this.xLim[0] = 0.1; + this.xLim[1] = 10; + } + + if (this.yLog && (this.yLim[0] <= 0 || this.yLim[1] <= 0)) { + console.log("One of the limits is negative. This is not allowed in logarithmic scale."); + console.log("Will set vertical limits to (0.1, 10)"); + this.yLim[0] = 0.1; + this.yLim[1] = 10; + } + + // Points properties + this.points = []; + this.plotPoints = []; + this.inside = []; + this.pointColors = [this.parent.color(255, 0, 0, 150)]; + this.pointSizes = [7]; + + // Line properties + this.lineColor = this.parent.color(0, 150); + this.lineWidth = 1; + + // Histogram properties + this.hist = undefined; + this.histBasePoint = new GPoint(0, 0); + + // Labels properties + this.labelBgColor = this.parent.color(255, 200); + this.labelSeparation = [7, 7]; + this.fontName = "Helvetica"; + this.fontColor = this.parent.color(0); + this.fontSize = 11; + + // Helper variable + this.cuts = [[0, 0], [0, 0], [0, 0], [0, 0]]; +} + +GLayer.prototype.isValidNumber = function(number) { + return !isNaN(number) && isFinite(number); +}; + +GLayer.prototype.isId = function(someId) { + return this.id === someId; +}; + +GLayer.prototype.valueToXPlot = function(x) { + if (this.xLog) { + return this.dim[0] * Math.log(x / this.xLim[0]) / Math.log(this.xLim[1] / this.xLim[0]); + } else { + return this.dim[0] * (x - this.xLim[0]) / (this.xLim[1] - this.xLim[0]); + } +}; + +GLayer.prototype.valueToYPlot = function(y) { + if (this.yLog) { + return -this.dim[1] * Math.log(y / this.yLim[0]) / Math.log(this.yLim[1] / this.yLim[0]); + } else { + return -this.dim[1] * (y - this.yLim[0]) / (this.yLim[1] - this.yLim[0]); + } +}; + +GLayer.prototype.valueToPlot = function() { + if (arguments.length === 2) { + return [this.valueToXPlot(arguments[0]), this.valueToYPlot(arguments[1])]; + } else if (arguments.length === 1 && arguments[0] instanceof GPoint) { + return new GPoint(this.valueToXPlot(arguments[0].getX()), this.valueToYPlot(arguments[0].getY()), arguments[0].getLabel()); + } else if (arguments.length === 1 && arguments[0] instanceof Array && arguments[0][0] instanceof GPoint) { + var xScalingFactor, yScalingFactor, point, xPlot, yPlot, i; + var nPoints = arguments[0].length; + var plotPts = []; + + // Go case by case. More code, but it's faster + if (this.xLog && this.yLog) { + xScalingFactor = this.dim[0] / Math.log(this.xLim[1] / this.xLim[0]); + yScalingFactor = -this.dim[1] / Math.log(this.yLim[1] / this.yLim[0]); + + for ( i = 0; i < nPoints; i++) { + point = arguments[0][i]; + xPlot = Math.log(point.getX() / this.xLim[0]) * xScalingFactor; + yPlot = Math.log(point.getY() / this.yLim[0]) * yScalingFactor; + plotPts[i] = new GPoint(xPlot, yPlot, point.getLabel()); + } + } else if (this.xLog) { + xScalingFactor = this.dim[0] / Math.log(this.xLim[1] / this.xLim[0]); + yScalingFactor = -this.dim[1] / (this.yLim[1] - this.yLim[0]); + + for ( i = 0; i < nPoints; i++) { + point = arguments[0][i]; + xPlot = Math.log(point.getX() / this.xLim[0]) * xScalingFactor; + yPlot = (point.getY() - this.yLim[0]) * yScalingFactor; + plotPts[i] = new GPoint(xPlot, yPlot, point.getLabel()); + } + } else if (this.yLog) { + xScalingFactor = this.dim[0] / (this.xLim[1] - this.xLim[0]); + yScalingFactor = -this.dim[1] / Math.log(this.yLim[1] / this.yLim[0]); + + for ( i = 0; i < nPoints; i++) { + point = arguments[0][i]; + xPlot = (point.getX() - this.xLim[0]) * xScalingFactor; + yPlot = Math.log(point.getY() / this.yLim[0]) * yScalingFactor; + plotPts[i] = new GPoint(xPlot, yPlot, point.getLabel()); + } + } else { + xScalingFactor = this.dim[0] / (this.xLim[1] - this.xLim[0]); + yScalingFactor = -this.dim[1] / (this.yLim[1] - this.yLim[0]); + + for ( i = 0; i < nPoints; i++) { + point = arguments[0][i]; + xPlot = (point.getX() - this.xLim[0]) * xScalingFactor; + yPlot = (point.getY() - this.yLim[0]) * yScalingFactor; + plotPts[i] = new GPoint(xPlot, yPlot, point.getLabel()); + } + } + + return plotPts; + } else { + throw new Error("GLayer.valueToPlot(): signature not supported"); + } +}; + +GLayer.prototype.updatePlotPoints = function() { + var xScalingFactor, yScalingFactor, point, xPlot, yPlot, i; + var nPoints = this.points.length; + + // Update the plotPoints array size if necessary + if (this.plotPoints.length < nPoints) { + for ( i = this.plotPoints.length; i < nPoints; i++) { + this.plotPoints[i] = new GPoint(); + } + } else if (this.plotPoints.length > nPoints) { + this.plotPoints.splice(nPoints, Number.MAX_VALUE); + } + + // Go case by case. More code, but it should be faster + if (this.xLog && this.yLog) { + xScalingFactor = this.dim[0] / Math.log(this.xLim[1] / this.xLim[0]); + yScalingFactor = -this.dim[1] / Math.log(this.yLim[1] / this.yLim[0]); + + for ( i = 0; i < nPoints; i++) { + point = this.points[i]; + xPlot = Math.log(point.getX() / this.xLim[0]) * xScalingFactor; + yPlot = Math.log(point.getY() / this.yLim[0]) * yScalingFactor; + this.plotPoints[i].set(xPlot, yPlot, point.getLabel()); + } + } else if (this.xLog) { + xScalingFactor = this.dim[0] / Math.log(this.xLim[1] / this.xLim[0]); + yScalingFactor = -this.dim[1] / (this.yLim[1] - this.yLim[0]); + + for ( i = 0; i < nPoints; i++) { + point = this.points[i]; + xPlot = Math.log(point.getX() / this.xLim[0]) * xScalingFactor; + yPlot = (point.getY() - this.yLim[0]) * yScalingFactor; + this.plotPoints[i].set(xPlot, yPlot, point.getLabel()); + } + } else if (this.yLog) { + xScalingFactor = this.dim[0] / (this.xLim[1] - this.xLim[0]); + yScalingFactor = -this.dim[1] / Math.log(this.yLim[1] / this.yLim[0]); + + for ( i = 0; i < nPoints; i++) { + point = this.points[i]; + xPlot = (point.getX() - this.xLim[0]) * xScalingFactor; + yPlot = Math.log(point.getY() / this.yLim[0]) * yScalingFactor; + this.plotPoints[i].set(xPlot, yPlot, point.getLabel()); + } + } else { + xScalingFactor = this.dim[0] / (this.xLim[1] - this.xLim[0]); + yScalingFactor = -this.dim[1] / (this.yLim[1] - this.yLim[0]); + + for ( i = 0; i < nPoints; i++) { + point = this.points[i]; + xPlot = (point.getX() - this.xLim[0]) * xScalingFactor; + yPlot = (point.getY() - this.yLim[0]) * yScalingFactor; + this.plotPoints[i].set(xPlot, yPlot, point.getLabel()); + } + } +}; + +GLayer.prototype.xPlotToValue = function(xPlot) { + if (this.xLog) { + return Math.exp(Math.log(this.xLim[0]) + Math.log(this.xLim[1] / this.xLim[0]) * xPlot / this.dim[0]); + } else { + return this.xLim[0] + (this.xLim[1] - this.xLim[0]) * xPlot / this.dim[0]; + } +}; + +GLayer.prototype.yPlotToValue = function(yPlot) { + if (this.yLog) { + return Math.exp(Math.log(this.yLim[0]) - Math.log(this.yLim[1] / this.yLim[0]) * yPlot / this.dim[1]); + } else { + return this.yLim[0] - (this.yLim[1] - this.yLim[0]) * yPlot / this.dim[1]; + } +}; + +GLayer.prototype.plotToValue = function(xPlot, yPlot) { + return [this.xPlotToValue(xPlot), this.yPlotToValue(yPlot)]; +}; + +GLayer.prototype.isInside = function() { + var xPlot, yPlot, valid; + + if (arguments.length === 2) { + xPlot = arguments[0]; + yPlot = arguments[1]; + valid = this.isValidNumber(xPlot) && this.isValidNumber(yPlot); + } else if (arguments.length === 1 && arguments[0] instanceof GPoint) { + xPlot = arguments[0].getX(); + yPlot = arguments[0].getY(); + valid = arguments[0].isValid(); + } else { + throw new Error("GLayer.isInside(): signature not supported"); + } + + return (valid) ? (xPlot >= 0) && (xPlot <= this.dim[0]) && (-yPlot >= 0) && (-yPlot <= this.dim[1]) : false; +}; + +GLayer.prototype.updateInsideList = function() { + var point; + var nPoints = this.plotPoints.length; + + for (var i = 0; i < nPoints; i++) { + point = this.plotPoints[i]; + this.inside[i] = (point.isValid()) ? (point.getX() >= 0) && (point.getX() <= this.dim[0]) && (-point.getY() >= 0) && (-point.getY() <= this.dim[1]) : false; + } + + // Remove the unused elements + if (this.inside.length > nPoints) { + this.inside.splice(nPoints, Number.MAX_VALUE); + } +}; + +GLayer.prototype.getPointIndexAtPlotPos = function(xPlot, yPlot) { + var pointIndex; + + if (this.isInside(xPlot, yPlot)) { + var point, distSq; + var minDistSq = 25; + var nPoints = this.plotPoints.length; + + for (var i = 0; i < nPoints; i++) { + if (this.inside[i]) { + point = this.plotPoints[i]; + distSq = Math.pow(point.getX() - xPlot, 2) + Math.pow(point.getY() - yPlot, 2); + + if (distSq < minDistSq) { + minDistSq = distSq; + pointIndex = i; + } + } + } + } + + return pointIndex; +}; + +GLayer.prototype.getPointAtPlotPos = function(xPlot, yPlot) { + return this.points[this.getPointIndexAtPlotPos(xPlot, yPlot)]; +}; + +GLayer.prototype.obtainBoxIntersections = function(plotPoint1, plotPoint2) { + var nCuts = 0; + + if (plotPoint1.isValid() && plotPoint2.isValid()) { + var x1 = plotPoint1.getX(); + var y1 = plotPoint1.getY(); + var x2 = plotPoint2.getX(); + var y2 = plotPoint2.getY(); + var inside1 = this.isInside(x1, y1); + var inside2 = this.isInside(x2, y2); + + // Check if the line between the two points could cut the box borders + var dontCut = (inside1 && inside2) || (x1 < 0 && x2 < 0) || (x1 > this.dim[0] && x2 > this.dim[0]) || (-y1 < 0 && -y2 < 0) || (-y1 > this.dim[1] && -y2 > this.dim[1]); + + if (!dontCut) { + // Obtain the axis cuts of the line that cross the two points + var deltaX = x2 - x1; + var deltaY = y2 - y1; + + if (deltaX === 0) { + nCuts = 2; + this.cuts[0][0] = x1; + this.cuts[0][1] = 0; + this.cuts[1][0] = x1; + this.cuts[1][1] = -this.dim[1]; + } else if (deltaY === 0) { + nCuts = 2; + this.cuts[0][0] = 0; + this.cuts[0][1] = y1; + this.cuts[1][0] = this.dim[0]; + this.cuts[1][1] = y1; + } else { + // Obtain the straight line (y = yCut + slope*x) that + // crosses the two points + var slope = deltaY / deltaX; + var yCut = y1 - slope * x1; + + // Calculate the axis cuts of that line + nCuts = 4; + this.cuts[0][0] = -yCut / slope; + this.cuts[0][1] = 0; + this.cuts[1][0] = (-this.dim[1] - yCut) / slope; + this.cuts[1][1] = -this.dim[1]; + this.cuts[2][0] = 0; + this.cuts[2][1] = yCut; + this.cuts[3][0] = this.dim[0]; + this.cuts[3][1] = yCut + slope * this.dim[0]; + } + + // Select only the cuts that fall inside the box and are located + // between the two points + nCuts = this.getValidCuts(this.cuts, nCuts, plotPoint1, plotPoint2); + + // Make sure we have the correct number of cuts + if (inside1 || inside2) { + // One of the points is inside. We should have one cut only + if (nCuts !== 1) { + var pointInside = (inside1) ? plotPoint1 : plotPoint2; + + // If too many cuts + if (nCuts > 1) { + nCuts = this.removeDuplicatedCuts(this.cuts, nCuts, 0); + + if (nCuts > 1) { + nCuts = this.removePointFromCuts(this.cuts, nCuts, pointInside, 0); + + // In case of rounding number errors + if (nCuts > 1) { + nCuts = this.removeDuplicatedCuts(this.cuts, nCuts, 0.001); + + if (nCuts > 1) { + nCuts = this.removePointFromCuts(this.cuts, nCuts, pointInside, 0.001); + } + } + } + } + + // If the cut is missing, then it must be equal to the point + // inside + if (nCuts === 0) { + nCuts = 1; + this.cuts[0][0] = pointInside.getX(); + this.cuts[1][0] = pointInside.getY(); + } + } + } else { + // Both points are outside. We should have either two cuts or + // none + if (nCuts > 2) { + nCuts = this.removeDuplicatedCuts(this.cuts, nCuts, 0); + + // In case of rounding number errors + if (nCuts > 2) { + nCuts = this.removeDuplicatedCuts(this.cuts, nCuts, 0.001); + } + } + + // If we have two cuts, order them (the closest to the first + // point goes first) + if (nCuts === 2) { + if ((Math.pow(this.cuts[0][0] - x1, 2) + Math.pow(this.cuts[0][1] - y1), 2) > (Math.pow(this.cuts[1][0] - x1, 2) + Math.pow(this.cuts[1][1] - y1, 2))) { + this.cuts[2][0] = this.cuts[0][0]; + this.cuts[2][1] = this.cuts[0][1]; + this.cuts[0][0] = this.cuts[1][0]; + this.cuts[0][1] = this.cuts[1][1]; + this.cuts[1][0] = this.cuts[2][0]; + this.cuts[1][1] = this.cuts[2][1]; + } + } + + // If one cut is missing, add the same one twice + if (nCuts === 1) { + nCuts = 2; + this.cuts[1][0] = this.cuts[0][0]; + this.cuts[1][1] = this.cuts[0][1]; + } + } + + // Some sanity checks + if ((inside1 || inside2) && nCuts !== 1) { + console.log("There should be one cut!!!"); + } else if (!inside1 && !inside2 && nCuts !== 0 && nCuts !== 2) { + console.log("There should be either 0 or 2 cuts!!! " + nCuts + " were found"); + } + } + } + + return nCuts; +}; + +GLayer.prototype.getValidCuts = function(cuts, nCuts, plotPoint1, plotPoint2) { + var x1 = plotPoint1.getX(); + var y1 = plotPoint1.getY(); + var x2 = plotPoint2.getX(); + var y2 = plotPoint2.getY(); + var deltaX = Math.abs(x2 - x1); + var deltaY = Math.abs(y2 - y1); + var counter = 0; + + for (var i = 0; i < nCuts; i++) { + // Check that the cut is inside the inner plotting area + if (this.isInside(cuts[i][0], cuts[i][1])) { + // Check that the cut falls between the two points + if (Math.abs(cuts[i][0] - x1) <= deltaX && Math.abs(cuts[i][1] - y1) <= deltaY && Math.abs(cuts[i][0] - x2) <= deltaX && Math.abs(cuts[i][1] - y2) <= deltaY) { + cuts[counter][0] = cuts[i][0]; + cuts[counter][1] = cuts[i][1]; + counter++; + } + } + } + + return counter; +}; + +GLayer.prototype.removeDuplicatedCuts = function(cuts, nCuts, tolerance) { + var repeated; + var counter = 0; + + for (var i = 0; i < nCuts; i++) { + repeated = false; + + for (var j = 0; j < counter; j++) { + if (Math.abs(cuts[j][0] - cuts[i][0]) <= tolerance && Math.abs(cuts[j][1] - cuts[i][1]) <= tolerance) { + repeated = true; + break; + } + } + + if (!repeated) { + cuts[counter][0] = cuts[i][0]; + cuts[counter][1] = cuts[i][1]; + counter++; + } + } + + return counter; +}; + +GLayer.prototype.removePointFromCuts = function(cuts, nCuts, plotPoint, tolerance) { + var x = plotPoint.getX(); + var y = plotPoint.getY(); + var counter = 0; + + for (var i = 0; i < nCuts; i++) { + if (Math.abs(cuts[i][0] - x) > tolerance || Math.abs(cuts[i][1] - y) > tolerance) { + cuts[counter][0] = cuts[i][0]; + cuts[counter][1] = cuts[i][1]; + counter++; + } + } + + return counter; +}; + +GLayer.prototype.startHistogram = function(histType) { + this.hist = new GHistogram(this.parent, histType, this.dim, this.plotPoints); +}; + +GLayer.prototype.drawPoints = function() { + var nPoints, i; + + if (arguments.length === 0) { + nPoints = this.plotPoints.length; + var nColors = this.pointColors.length; + var nSizes = this.pointSizes.length; + + this.parent.push(); + this.parent.ellipseMode(this.parent.CENTER); + this.parent.stroke(50); + + if (nColors === 1 && nSizes === 1) { + this.parent.fill(this.pointColors[0]); + + for ( i = 0; i < nPoints; i++) { + if (this.inside[i]) { + this.parent.ellipse(this.plotPoints[i].getX(), this.plotPoints[i].getY(), this.pointSizes[0], this.pointSizes[0]); + } + } + } else if (nColors === 1) { + this.parent.fill(this.pointColors[0]); + + for ( i = 0; i < nPoints; i++) { + if (this.inside[i]) { + this.parent.fill(0); + this.parent.noStroke(); + this.parent.ellipse(this.plotPoints[i].getX(), this.plotPoints[i].getY(),4,4); + this.parent.stroke(100); + this.parent.fill(this.pointColors[0]); + this.parent.ellipse(this.plotPoints[i].getX(), this.plotPoints[i].getY(), this.pointSizes[i % nSizes], this.pointSizes[i % nSizes]); + } + } + } else if (nSizes === 1) { + for ( i = 0; i < nPoints; i++) { + if (this.inside[i]) { + this.parent.fill(this.pointColors[i % nColors]); + this.parent.ellipse(this.plotPoints[i].getX(), this.plotPoints[i].getY(), this.pointSizes[0], this.pointSizes[0]); + } + } + } else { + for ( i = 0; i < nPoints; i++) { + if (this.inside[i]) { + this.parent.fill(this.pointColors[i % nColors]); + this.parent.ellipse(this.plotPoints[i].getX(), this.plotPoints[i].getY(), this.pointSizes[i % nSizes], this.pointSizes[i % nSizes]); + } + } + } + + this.parent.pop(); + } else if (arguments.length === 1 && arguments[0] instanceof p5.Image) { + nPoints = this.plotPoints.length; + + this.parent.push(); + this.parent.imageMode(this.parent.CENTER); + + for ( i = 0; i < nPoints; i++) { + if (this.inside[i]) { + this.parent.image(arguments[0], this.plotPoints[i].getX(), this.plotPoints[i].getY()); + } + } + + this.parent.pop(); + } else { + throw new Error("GLayer.drawPoints(): signature not supported"); + } +}; + +GLayer.prototype.drawPoint = function() { + var point, pointColor, pointSize, pointImg; + + if (arguments.length === 3) { + point = arguments[0]; + pointColor = arguments[1]; + pointSize = arguments[2]; + } else if (arguments.length === 2 && arguments[1] instanceof p5.Image) { + point = arguments[0]; + pointImg = arguments[1]; + } else if (arguments.length === 1) { + point = arguments[0]; + pointColor = this.pointColors[0]; + pointSize = this.pointSizes[0]; + } else { + throw new Error("GLayer.drawPoint(): signature not supported"); + } + + var xPlot = this.valueToXPlot(point.getX()); + var yPlot = this.valueToYPlot(point.getY()); + + if (this.isInside(xPlot, yPlot)) { + this.parent.push(); + + if ( typeof pointImg !== "undefined") { + this.parent.imageMode(this.parent.CENTER); + this.parent.image(pointImg, xPlot, yPlot); + } else { + this.parent.ellipseMode(this.parent.CENTER); + this.parent.fill(pointColor); + this.parent.noStroke(); + this.parent.ellipse(xPlot, yPlot, pointSize, pointSize); + } + + this.parent.pop(); + } +}; + +GLayer.prototype.drawLines = function() { + var nPoints = this.plotPoints.length; + + this.parent.push(); + this.parent.noFill(); + this.parent.stroke(this.lineColor); + this.parent.strokeWeight(this.lineWidth); + this.parent.strokeCap(this.parent.SQUARE); + + for (var i = 0; i < nPoints - 1; i++) { + if (this.inside[i] && this.inside[i + 1]) { + this.parent.line(this.plotPoints[i].getX(), this.plotPoints[i].getY(), this.plotPoints[i + 1].getX(), this.plotPoints[i + 1].getY()); + } else if (this.plotPoints[i].isValid() && this.plotPoints[i + 1].isValid()) { + // At least one of the points is outside the inner region. + // Obtain the valid line box intersections + var nCuts = this.obtainBoxIntersections(this.plotPoints[i], this.plotPoints[i + 1]); + + if (this.inside[i]) { + this.parent.line(this.plotPoints[i].getX(), this.plotPoints[i].getY(), this.cuts[0][0], this.cuts[0][1]); + } else if (this.inside[i + 1]) { + this.parent.line(this.cuts[0][0], this.cuts[0][1], this.plotPoints[i + 1].getX(), this.plotPoints[i + 1].getY()); + } else if (nCuts >= 2) { + this.parent.line(this.cuts[0][0], this.cuts[0][1], this.cuts[1][0], this.cuts[1][1]); + } + } + } + + this.parent.pop(); +}; + +GLayer.prototype.drawLine = function() { + var point1, point2, lc, lw, slope, ycut; + + if (arguments.length === 4 && arguments[0] instanceof GPoint) { + point1 = arguments[0]; + point2 = arguments[1]; + lc = arguments[2]; + lw = arguments[3]; + } else if (arguments.length === 4) { + slope = arguments[0]; + ycut = arguments[1]; + lc = arguments[2]; + lw = arguments[3]; + } else if (arguments.length === 2 && arguments[0] instanceof GPoint) { + point1 = arguments[0]; + point2 = arguments[1]; + lc = this.lineColor; + lw = this.lineWidth; + } else if (arguments.length === 2) { + slope = arguments[0]; + ycut = arguments[1]; + lc = this.lineColor; + lw = this.lineWidth; + } else { + throw new Error("GLayer.drawLine(): signature not supported"); + } + + if ( typeof slope !== "undefined") { + if (this.xLog && this.yLog) { + point1 = new GPoint(this.xLim[0], Math.pow(10, slope * Math.log(this.xLim[0]) / Math.LN10 + yCut)); + point2 = new GPoint(this.xLim[1], Math.pow(10, slope * Math.log(this.xLim[1]) / Math.LN10 + yCut)); + } else if (this.xLog) { + point1 = new GPoint(this.xLim[0], slope * Math.log(this.xLim[0]) / Math.LN10 + yCut); + point2 = new GPoint(this.xLim[1], slope * Math.log(this.xLim[1]) / Math.LN10 + yCut); + } else if (this.yLog) { + point1 = new GPoint(this.xLim[0], Math.pow(10, slope * this.xLim[0] + yCut)); + point2 = new GPoint(this.xLim[1], Math.pow(10, slope * this.xLim[1] + yCut)); + } else { + point1 = new GPoint(this.xLim[0], slope * this.xLim[0] + yCut); + point2 = new GPoint(this.xLim[1], slope * this.xLim[1] + yCut); + } + } + + var plotPoint1 = this.valueToPlot(point1); + var plotPoint2 = this.valueToPlot(point2); + + if (plotPoint1.isValid() && plotPoint2.isValid()) { + var inside1 = this.isInside(plotPoint1); + var inside2 = this.isInside(plotPoint2); + + this.parent.push(); + this.parent.noFill(); + this.parent.stroke(lc); + this.parent.strokeWeight(lw); + this.parent.strokeCap(this.parent.SQUARE); + + if (inside1 && inside2) { + this.parent.line(plotPoint1.getX(), plotPoint1.getY(), plotPoint2.getX(), plotPoint2.getY()); + } else { + // At least one of the points is outside the inner region. + // Obtain the valid line box intersections + var nCuts = this.obtainBoxIntersections(plotPoint1, plotPoint2); + + if (inside1) { + this.parent.line(plotPoint1.getX(), plotPoint1.getY(), this.cuts[0][0], this.cuts[0][1]); + } else if (inside2) { + this.parent.line(this.cuts[0][0], this.cuts[0][1], plotPoint2.getX(), plotPoint2.getY()); + } else if (nCuts >= 2) { + this.parent.line(this.cuts[0][0], this.cuts[0][1], this.cuts[1][0], this.cuts[1][1]); + } + } + + this.parent.pop(); + } +}; + +GLayer.prototype.drawHorizontalLine = function() { + var value, lc, lw; + + if (arguments.length === 3) { + value = arguments[0]; + lc = arguments[1]; + lw = arguments[2]; + } else if (arguments.length === 1) { + value = arguments[0]; + lc = this.lineColor; + lw = this.lineWidth; + } else { + throw new Error("GLayer.drawHorizontalLine(): signature not supported"); + } + + var yPlot = this.valueToYPlot(value); + + if (this.isValidNumber(yPlot) && -yPlot >= 0 && -yPlot <= this.dim[1]) { + this.parent.push(); + this.parent.noFill(); + this.parent.stroke(lc); + this.parent.strokeWeight(lw); + this.parent.strokeCap(this.parent.SQUARE); + this.parent.line(0, yPlot, this.dim[0], yPlot); + this.parent.pop(); + } +}; + +GLayer.prototype.drawVerticalLine = function() { + var value, lc, lw; + + if (arguments.length === 3) { + value = arguments[0]; + lc = arguments[1]; + lw = arguments[2]; + } else if (arguments.length === 1) { + value = arguments[0]; + lc = this.lineColor; + lw = this.lineWidth; + } else { + throw new Error("GLayer.drawVerticalLine(): signature not supported"); + } + + var xPlot = this.valueToXPlot(value); + + if (this.isValidNumber(xPlot) && xPlot >= 0 && xPlot <= this.dim[0]) { + this.parent.push(); + this.parent.noFill(); + this.parent.stroke(lc); + this.parent.strokeWeight(lw); + this.parent.strokeCap(this.parent.SQUARE); + this.parent.line(xPlot, 0, xPlot, -this.dim[1]); + this.parent.pop(); + } +}; + +GLayer.prototype.drawFilledContour = function(contourType, referenceValue) { + // Get the points that compose the shape + var shapePoints; + + if (contourType === GPlot.HORIZONTAL) { + shapePoints = this.getHorizontalShape(referenceValue); + } else if (contourType === GPlot.VERTICAL) { + shapePoints = this.getVerticalShape(referenceValue); + } + + // Draw the shape + if ( typeof shapePoints !== "undefined" && shapePoints.length > 0) { + this.parent.push(); + this.parent.fill(this.lineColor); + this.parent.noStroke(); + this.parent.beginShape(); + + for (var i = 0; i < shapePoints.length; i++) { + if (shapePoints[i].isValid()) { + this.parent.vertex(shapePoints[i].getX(), shapePoints[i].getY()); + } + } + + this.parent.endShape(this.parent.CLOSE); + this.parent.pop(); + } +}; + +GLayer.prototype.getHorizontalShape = function(referenceValue) { + // Collect the points and cuts inside the box + var point, addedPoints, nextIndex; + var nPoints = this.plotPoints.length; + var shapePoints = []; + var indexFirstPoint = -1; + var indexLastPoint = -1; + + for (var i = 0; i < nPoints; i++) { + point = this.plotPoints[i]; + + if (point.isValid()) { + addedPoints = false; + + // Add the point if it's inside the box + if (this.inside[i]) { + shapePoints.push(new GPoint(point.getX(), point.getY(), "normal point")); + addedPoints = true; + } else if (point.getX() >= 0 && point.getX() <= this.dim[0]) { + // If it's outside, add the projection of the point on the + // horizontal axes + if (-point.getY() < 0) { + shapePoints.push(new GPoint(point.getX(), 0, "projection")); + addedPoints = true; + } else { + shapePoints.push(new GPoint(point.getX(), -this.dim[1], "projection")); + addedPoints = true; + } + } + + // Add the box cuts if there is any + nextIndex = i + 1; + + while (nextIndex < nPoints - 1 && !this.plotPoints[nextIndex].isValid()) { + nextIndex++; + } + + if (nextIndex < nPoints && this.plotPoints[nextIndex].isValid()) { + var nCuts = this.obtainBoxIntersections(point, this.plotPoints[nextIndex]); + + for (var j = 0; j < nCuts; j++) { + shapePoints.push(new GPoint(this.cuts[j][0], this.cuts[j][1], "cut")); + addedPoints = true; + } + } + + if (addedPoints) { + if (indexFirstPoint < 0) { + indexFirstPoint = i; + } + + indexLastPoint = i; + } + } + } + + // Continue if there are points in the shape + if (shapePoints.length > 0) { + // Calculate the starting point + var startPoint = new GPoint(shapePoints[0]); + + if (startPoint.getX() !== 0 && startPoint.getX() !== this.dim[0]) { + if (startPoint.getLabel() === "cut") { + if (this.plotPoints[indexFirstPoint].getX() < 0) { + startPoint.setX(0); + startPoint.setLabel("extreme"); + } else { + startPoint.setX(this.dim[0]); + startPoint.setLabel("extreme"); + } + } else if (indexFirstPoint !== 0) { + // Get the previous valid point + var prevIndex = indexFirstPoint - 1; + + while (prevIndex > 0 && !this.plotPoints[prevIndex].isValid()) { + prevIndex--; + } + + if (this.plotPoints[prevIndex].isValid()) { + if (this.plotPoints[prevIndex].getX() < 0) { + startPoint.setX(0); + startPoint.setLabel("extreme"); + } else { + startPoint.setX(this.dim[0]); + startPoint.setLabel("extreme"); + } + } + } + } + + // Calculate the end point + var endPoint = new GPoint(shapePoints[shapePoints.length - 1]); + + if (endPoint.getX() !== 0 && endPoint.getX() !== this.dim[0] && indexLastPoint !== nPoints - 1) { + nextIndex = indexLastPoint + 1; + + while (nextIndex < nPoints - 1 && !this.plotPoints[nextIndex].isValid()) { + nextIndex++; + } + + if (this.plotPoints[nextIndex].isValid()) { + if (this.plotPoints[nextIndex].getX() < 0) { + endPoint.setX(0); + endPoint.setLabel("extreme"); + } else { + endPoint.setX(this.dim[0]); + endPoint.setLabel("extreme"); + } + } + } + + // Add the end point if it's a new extreme + if (endPoint.getLabel() === "extreme") { + shapePoints.push(endPoint); + } + + // Add the reference connections + if (this.yLog && referenceValue <= 0) { + referenceValue = Math.min(this.yLim[0], this.yLim[1]); + } + + var plotReference = this.valueToPlot(1, referenceValue); + + if (-plotReference[1] < 0) { + shapePoints.push(new GPoint(endPoint.getX(), 0)); + shapePoints.push(new GPoint(startPoint.getX(), 0)); + } else if (-plotReference[1] > this.dim[1]) { + shapePoints.push(new GPoint(endPoint.getX(), -this.dim[1])); + shapePoints.push(new GPoint(startPoint.getX(), -this.dim[1])); + } else { + shapePoints.push(new GPoint(endPoint.getX(), plotReference[1])); + shapePoints.push(new GPoint(startPoint.getX(), plotReference[1])); + } + + // Add the starting point if it's a new extreme + if (startPoint.getLabel() === "extreme") { + shapePoints.push(startPoint); + } + } + + return shapePoints; +}; + +GLayer.prototype.getVerticalShape = function(referenceValue) { + // Collect the points and cuts inside the box + var point, addedPoints, nextIndex; + var nPoints = this.plotPoints.length; + var shapePoints = []; + var indexFirstPoint = -1; + var indexLastPoint = -1; + + for (var i = 0; i < nPoints; i++) { + point = this.plotPoints[i]; + + if (point.isValid()) { + addedPoints = false; + + // Add the point if it's inside the box + if (this.inside[i]) { + shapePoints.push(new GPoint(point.getX(), point.getY(), "normal point")); + addedPoints = true; + } else if (-point.getY() >= 0 && -point.getY() <= this.dim[1]) { + // If it's outside, add the projection of the point on the + // vertical axes + if (point.getX() < 0) { + shapePoints.push(new GPoint(0, point.getY(), "projection")); + addedPoints = true; + } else { + shapePoints.push(new GPoint(this.dim[0], point.getY(), "projection")); + addedPoints = true; + } + } + + // Add the box cuts if there is any + nextIndex = i + 1; + + while (nextIndex < nPoints - 1 && !this.plotPoints[nextIndex].isValid()) { + nextIndex++; + } + + if (nextIndex < nPoints && this.plotPoints[nextIndex].isValid()) { + var nCuts = this.obtainBoxIntersections(point, this.plotPoints[nextIndex]); + + for (var j = 0; j < nCuts; j++) { + shapePoints.push(new GPoint(this.cuts[j][0], this.cuts[j][1], "cut")); + addedPoints = true; + } + } + + if (addedPoints) { + if (indexFirstPoint < 0) { + indexFirstPoint = i; + } + + indexLastPoint = i; + } + } + } + + // Continue if there are points in the shape + if (shapePoints.length > 0) { + // Calculate the starting point + var startPoint = new GPoint(shapePoints[0]); + + if (startPoint.getY() !== 0 && startPoint.getY() !== -this.dim[1]) { + if (startPoint.getLabel() === "cut") { + if (-this.plotPoints[indexFirstPoint].getY() < 0) { + startPoint.setY(0); + startPoint.setLabel("extreme"); + } else { + startPoint.setY(-this.dim[1]); + startPoint.setLabel("extreme"); + } + } else if (indexFirstPoint !== 0) { + // Get the previous valid point + var prevIndex = indexFirstPoint - 1; + + while (prevIndex > 0 && !this.plotPoints[prevIndex].isValid()) { + prevIndex--; + } + + if (this.plotPoints[prevIndex].isValid()) { + if (-this.plotPoints[prevIndex].getY() < 0) { + startPoint.setY(0); + startPoint.setLabel("extreme"); + } else { + startPoint.setY(-this.dim[1]); + startPoint.setLabel("extreme"); + } + } + } + } + + // Calculate the end point + var endPoint = new GPoint(shapePoints[shapePoints.length - 1]); + + if (endPoint.getY() !== 0 && endPoint.getY() !== -this.dim[1] && indexLastPoint !== nPoints - 1) { + nextIndex = indexLastPoint + 1; + + while (nextIndex < nPoints - 1 && !this.plotPoints[nextIndex].isValid()) { + nextIndex++; + } + + if (this.plotPoints[nextIndex].isValid()) { + if (-this.plotPoints[nextIndex].getY() < 0) { + endPoint.setY(0); + endPoint.setLabel("extreme"); + } else { + endPoint.setY(-this.dim[1]); + endPoint.setLabel("extreme"); + } + } + } + + // Add the end point if it's a new extreme + if (endPoint.getLabel() === "extreme") { + shapePoints.push(endPoint); + } + + // Add the reference connections + if (this.xLog && referenceValue <= 0) { + referenceValue = Math.min(this.xLim[0], this.xLim[1]); + } + + var plotReference = this.valueToPlot(referenceValue, 1); + + if (plotReference[0] < 0) { + shapePoints.push(new GPoint(0, endPoint.getY())); + shapePoints.push(new GPoint(0, startPoint.getY())); + } else if (plotReference[0] > this.dim[0]) { + shapePoints.push(new GPoint(this.dim[0], endPoint.getY())); + shapePoints.push(new GPoint(this.dim[0], startPoint.getY())); + } else { + shapePoints.push(new GPoint(plotReference[0], endPoint.getY())); + shapePoints.push(new GPoint(plotReference[0], startPoint.getY())); + } + + // Add the starting point if it's a new extreme + if (startPoint.getLabel() === "extreme") { + shapePoints.push(startPoint); + } + } + + return shapePoints; +}; + +GLayer.prototype.drawAllLabels = function() { + for (var n = 0; n < this.points.length; n++) { + this.drawLabel(this.points[n]); + } +} + +GLayer.prototype.drawLabel = function(point) { + var xPlot = this.valueToXPlot(point.getX()); + var yPlot = this.valueToYPlot(point.getY()); + + if (this.isValidNumber(xPlot) && this.isValidNumber(yPlot)) { + var xLabelPos = xPlot + this.labelSeparation[0]; + var yLabelPos = yPlot - 0*this.labelSeparation[1] + 6; + var delta = this.fontSize / 4; + + this.parent.push(); + this.parent.rectMode(this.parent.CORNER); + this.parent.noStroke(); + this.parent.textFont(this.fontName); + this.parent.textSize(this.fontSize); + this.parent.textAlign(this.parent.LEFT, this.parent.BOTTOM); + + // Draw the background + this.parent.fill(this.labelBgColor); + this.parent.rect(xLabelPos - delta, yLabelPos - this.fontSize - delta, this.parent.textWidth(point.getLabel()) + 2 * delta, this.fontSize + 2 * delta); + + // Draw the text + this.parent.fill(this.fontColor); + this.parent.text(point.getLabel(), xLabelPos, yLabelPos); + this.parent.pop(); + } +}; + +GLayer.prototype.drawLabelAtPlotPos = function(xPlot, yPlot) { + var point = this.getPointAtPlotPos(xPlot, yPlot); + + if ( typeof point !== "undefined") { + this.drawLabel(point); + } +}; + +GLayer.prototype.drawHistogram = function() { + if ( typeof this.hist !== "undefined") { + this.hist.draw(this.valueToPlot(this.histBasePoint)); + } +}; + +GLayer.prototype.drawPolygon = function(polygonPoints, polygonColor) { + var i; + + if (polygonPoints.length > 2) { + // Remove the polygon invalid points + var plotPolygonPoints = this.valueToPlot(polygonPoints); + var counter = 0; + + for ( i = 0; i < plotPolygonPoints.length; i++) { + if (plotPolygonPoints[i].isValid()) { + plotPolygonPoints[counter] = plotPolygonPoints[i]; + counter++; + } + } + + plotPolygonPoints.splice(counter, Number.MAX_VALUE); + + // Create a temporal array with the points inside the plotting area + // and the valid box cuts + var point; + var nPoints = plotPolygonPoints.length; + var tmp = []; + + for ( i = 0; i < nPoints; i++) { + point = plotPolygonPoints[i]; + + if (this.isInside(point)) { + tmp.push(new GPoint(point.getX(), point.getY(), "normal point")); + } + + // Obtain the cuts with the next point + var nextIndex = (i + 1 < nPoints) ? i + 1 : 0; + var nCuts = this.obtainBoxIntersections(point, plotPolygonPoints[nextIndex]); + + if (nCuts === 1) { + tmp.push(new GPoint(this.cuts[0][0], this.cuts[0][1], "single cut")); + } else if (nCuts > 1) { + tmp.push(new GPoint(this.cuts[0][0], this.cuts[0][1], "double cut")); + tmp.push(new GPoint(this.cuts[1][0], this.cuts[1][1], "double cut")); + } + } + + // Final version of the polygon + nPoints = tmp.length; + var croppedPoly = []; + + for ( i = 0; i < nPoints; i++) { + // Add the point + croppedPoly.push(tmp[i]); + + // Add new points in case we have two consecutive cuts, one of + // them is single, and they are in consecutive axes + var next = (i + 1 < nPoints) ? i + 1 : 0; + var label = tmp[i].getLabel(); + var nextLabel = tmp[next].getLabel(); + + var cond = (label === "single cut" && nextLabel === "single cut") || (label === "single cut" && nextLabel === "double cut") || (label === "double cut" && nextLabel === "single cut"); + + if (cond) { + var x1 = tmp[i].getX(); + var y1 = tmp[i].getY(); + var x2 = tmp[next].getX(); + var y2 = tmp[next].getY(); + var deltaX = Math.abs(x2 - x1); + var deltaY = Math.abs(y2 - y1); + + // Check that they come from consecutive axes + if (deltaX > 0 && deltaY > 0 && deltaX !== this.dim[0] && deltaY !== this.dim[1]) { + var x = (x1 === 0 || x1 === this.dim[0]) ? x1 : x2; + var y = (y1 === 0 || y1 === -this.dim[1]) ? y1 : y2; + croppedPoly.push(new GPoint(x, y, "special cut")); + } + } + } + + // Draw the cropped polygon + if (croppedPoly.length > 2) { + this.parent.push(); + this.parent.fill(polygonColor); + this.parent.noStroke(); + this.parent.beginShape(); + + for ( i = 0; i < croppedPoly.length; i++) { + this.parent.vertex(croppedPoly[i].getX(), croppedPoly[i].getY()); + } + + this.parent.endShape(this.parent.CLOSE); + this.parent.pop(); + } + } +}; + +GLayer.prototype.drawAnnotation = function(text, x, y, horAlign, verAlign) { + var xPlot = this.valueToXPlot(x); + var yPlot = this.valueToYPlot(y); + + if (this.isValidNumber(xPlot) && this.isValidNumber(yPlot) && this.isInside(xPlot, yPlot)) { + if (horAlign !== this.parent.CENTER && horAlign !== this.parent.RIGHT && horAlign !== this.parent.LEFT) { + horAlign = this.parent.LEFT; + } + + if (verAlign !== this.parent.CENTER && verAlign !== this.parent.TOP && verAlign !== this.parent.BOTTOM) { + verAlign = this.parent.CENTER; + } + + // A trick to really center the text vertically + if (verAlign === this.parent.CENTER) { + verAlign = this.parent.BOTTOM; + yPlot += this.fontSize / 2; + } + + this.parent.push(); + this.parent.textFont(this.fontName); + this.parent.textSize(this.fontSize); + this.parent.fill(this.fontColor); + this.parent.textAlign(horAlign, verAlign); + this.parent.text(text, xPlot, yPlot); + this.parent.pop(); + } +}; + +GLayer.prototype.setDim = function() { + var xDim, yDim; + + if (arguments.length === 2) { + xDim = arguments[0]; + yDim = arguments[1]; + } else if (arguments.length === 1) { + xDim = arguments[0][0]; + yDim = arguments[0][1]; + } else { + throw new Error("GLayer.setDim(): signature not supported"); + } + + if (xDim > 0 && yDim > 0) { + this.dim[0] = xDim; + this.dim[1] = yDim; + this.updatePlotPoints(); + + if ( typeof this.hist !== "undefined") { + this.hist.setDim(this.dim); + this.hist.setPlotPoints(this.plotPoints); + } + } +}; + +GLayer.prototype.setXLim = function() { + var xMin, xMax; + + if (arguments.length === 2) { + xMin = arguments[0]; + xMax = arguments[1]; + } else if (arguments.length === 1) { + xMin = arguments[0][0]; + xMax = arguments[0][1]; + } else { + throw new Error("GLayer.setXLim(): signature not supported"); + } + + if (xMin !== xMax && this.isValidNumber(xMin) && this.isValidNumber(xMax)) { + // Make sure the new limits makes sense + if (this.xLog && (xMin <= 0 || xMax <= 0)) { + console.log("One of the limits is negative. This is not allowed in logarithmic scale."); + } else { + this.xLim[0] = xMin; + this.xLim[1] = xMax; + this.updatePlotPoints(); + this.updateInsideList(); + + if ( typeof this.hist !== "undefined") { + this.hist.setPlotPoints(this.plotPoints); + } + } + } +}; + +GLayer.prototype.setYLim = function() { + var yMin, yMax; + + if (arguments.length === 2) { + yMin = arguments[0]; + yMax = arguments[1]; + } else if (arguments.length === 1) { + yMin = arguments[0][0]; + yMax = arguments[0][1]; + } else { + throw new Error("GLayer.setYLim(): signature not supported"); + } + + if (yMin !== yMax && this.isValidNumber(yMin) && this.isValidNumber(yMax)) { + // Make sure the new limits makes sense + if (this.yLog && (yMin <= 0 || yMax <= 0)) { + console.log("One of the limits is negative. This is not allowed in logarithmic scale."); + } else { + this.yLim[0] = yMin; + this.yLim[1] = yMax; + this.updatePlotPoints(); + this.updateInsideList(); + + if ( typeof this.hist !== "undefined") { + this.hist.setPlotPoints(this.plotPoints); + } + } + } +}; + +GLayer.prototype.setXYLim = function() { + var xMin, xMax, yMin, yMax; + + if (arguments.length === 4) { + xMin = arguments[0]; + xMax = arguments[1]; + yMin = arguments[2]; + yMax = arguments[3]; + } else if (arguments.length === 2) { + xMin = arguments[0][0]; + xMax = arguments[0][1]; + yMin = arguments[1][0]; + yMax = arguments[1][1]; + } else { + throw new Error("GLayer.setXYLim(): signature not supported"); + } + + if (xMin !== xMax && yMin !== yMax && this.isValidNumber(xMin) && this.isValidNumber(xMax) && this.isValidNumber(yMin) && this.isValidNumber(yMax)) { + // Make sure the new limits make sense + if (this.xLog && (xMin <= 0 || xMax <= 0)) { + console.log("One of the limits is negative. This is not allowed in logarithmic scale."); + } else { + this.xLim[0] = xMin; + this.xLim[1] = xMax; + } + + if (this.yLog && (yMin <= 0 || yMax <= 0)) { + console.log("One of the limits is negative. This is not allowed in logarithmic scale."); + } else { + this.yLim[0] = yMin; + this.yLim[1] = yMax; + } + + this.updatePlotPoints(); + this.updateInsideList(); + + if ( typeof this.hist !== "undefined") { + this.hist.setPlotPoints(this.plotPoints); + } + } +}; + +GLayer.prototype.setLimAndLog = function() { + var xMin, xMax, yMin, yMax, xLog, yLog; + + if (arguments.length === 6) { + xMin = arguments[0]; + xMax = arguments[1]; + yMin = arguments[2]; + yMax = arguments[3]; + xLog = arguments[4]; + yLog = arguments[5]; + } else if (arguments.length === 4) { + xMin = arguments[0][0]; + xMax = arguments[0][1]; + yMin = arguments[1][0]; + yMax = arguments[1][1]; + xLog = arguments[2]; + yLog = arguments[3]; + } else { + throw new Error("GLayer.setLimAndLog(): signature not supported"); + } + + if (xMin !== xMax && yMin !== yMax && this.isValidNumber(xMin) && this.isValidNumber(xMax) && this.isValidNumber(yMin) && this.isValidNumber(yMax)) { + // Make sure the new limits make sense + if (xLog && (xMin <= 0 || xMax <= 0)) { + console.log("One of the limits is negative. This is not allowed in logarithmic scale."); + } else { + this.xLim[0] = xMin; + this.yLim[1] = xMax; + this.xLog = xLog; + } + + if (yLog && (yMin <= 0 || yMax <= 0)) { + console.log("One of the limits is negative. This is not allowed in logarithmic scale."); + } else { + this.yLim[0] = yMin; + this.yLim[1] = yMax; + this.yLog = yLog; + } + + this.updatePlotPoints(); + this.updateInsideList(); + + if ( typeof this.hist !== "undefined") { + this.hist.setPlotPoints(this.plotPoints); + } + } +}; + +GLayer.prototype.setXLog = function(xLog) { + if (xLog !== this.xLog) { + if (xLog && (this.xLim[0] <= 0 || this.xLim[1] <= 0)) { + console.log("One of the limits is negative. This is not allowed in logarithmic scale."); + console.log("Will set horizontal limits to (0.1, 10)"); + this.xLim[0] = 0.1; + this.xLim[1] = 10; + } + + this.xLog = xLog; + this.updatePlotPoints(); + this.updateInsideList(); + + if ( typeof this.hist !== "undefined") { + this.hist.setPlotPoints(this.plotPoints); + } + } +}; + +GLayer.prototype.setYLog = function(yLog) { + if (yLog !== this.yLog) { + if (yLog && (this.yLim[0] <= 0 || this.yLim[1] <= 0)) { + console.log("One of the limits is negative. This is not allowed in logarithmic scale."); + console.log("Will set horizontal limits to (0.1, 10)"); + this.yLim[0] = 0.1; + this.yLim[1] = 10; + } + + this.yLog = yLog; + this.updatePlotPoints(); + this.updateInsideList(); + + if ( typeof this.hist !== "undefined") { + this.hist.setPlotPoints(this.plotPoints); + } + } +}; + +GLayer.prototype.setPoints = function(points) { + var i; + var nPoints = points.length; + + if (this.points.length > nPoints) { + this.points.splice(nPoints, Number.MAX_VALUE); + } else { + for ( i = this.points.length; i < nPoints; i++) { + this.points[i] = new GPoint(); + } + } + + for ( i = 0; i < nPoints; i++) { + this.points[i].set(points[i]); + } + + this.updatePlotPoints(); + this.updateInsideList(); + + if ( typeof this.hist !== "undefined") { + this.hist.setPlotPoints(this.plotPoints); + } +}; + +GLayer.prototype.setPoint = function() { + var index, x, y, label; + var nPoints = this.points.length; + + if (arguments.length === 4) { + index = arguments[0]; + x = arguments[1]; + y = arguments[2]; + label = arguments[3]; + } else if (arguments.length === 3) { + index = arguments[0]; + x = arguments[1]; + y = arguments[2]; + label = (index < nPoins) ? this.points[index].getLabel() : ""; + } else if (arguments.length === 2) { + index = arguments[0]; + x = arguments[1].getX(); + y = arguments[1].getY(); + label = arguments[1].getLabel(); + } else { + throw new Error("GLayer.setPoint(): signature not supported"); + } + + if (index < nPoints) { + this.points[index].set(x, y, label); + this.plotPoints[index].set(this.valueToXPlot(x), this.valueToYPlot(y), label); + this.inside[index] = this.isInside(this.plotPoints[index]); + } else if (index === nPoints) { + this.points[index] = new GPoint(x, y, label); + this.plotPoints[index] = new GPoint(this.valueToXPlot(x), this.valueToYPlot(y), label); + this.inside[index] = this.isInside(this.plotPoints[index]); + } else { + throw new Error("GLayer.setPoint(): the index position is outside the array size"); + } + + if ( typeof this.hist !== "undefined") { + this.hist.setPlotPoint(index, this.plotPoints[index]); + } +}; + +GLayer.prototype.addPoint = function() { + var x, y, label; + + if (arguments.length === 3) { + x = arguments[0]; + y = arguments[1]; + label = arguments[2]; + } else if (arguments.length === 2) { + x = arguments[0]; + y = arguments[1]; + label = ""; + } else if (arguments.length === 1) { + x = arguments[0].getX(); + y = arguments[0].getY(); + label = arguments[0].getLabel(); + } else { + throw new Error("GLayer.addPoint(): signature not supported"); + } + + this.points.push(new GPoint(x, y, label)); + this.plotPoints.push(new GPoint(this.valueToXPlot(x), this.valueToYPlot(y), label)); + this.inside.push(this.isInside(this.plotPoints[this.plotPoints.length - 1])); + + if ( typeof this.hist !== "undefined") { + this.hist.addPlotPoint(this.plotPoints[this.plotPoints.length - 1]); + } +}; + +GLayer.prototype.addPoints = function(newPoints) { + var newPoint; + var nNewPoints = newPoints.length; + + for (var i = 0; i < nNewPoints; i++) { + newPoint = newPoints[i]; + this.points.push(new GPoint(newPoint)); + this.plotPoints.push(new GPoint(this.valueToXPlot(newPoint.getX()), this.valueToYPlot(newPoint.getY()), newPoint.getLabel())); + this.inside.push(this.isInside(this.plotPoints[this.plotPoints.length - 1])); + } + + if ( typeof this.hist !== "undefined") { + this.hist.setPlotPoints(this.plotPoints); + } +}; + +GLayer.prototype.addPointAtIndexPos = function() { + var index, x, y, label; + + if (arguments.length === 4) { + index = arguments[0]; + x = arguments[1]; + y = arguments[2]; + label = arguments[3]; + } else if (arguments.length === 3) { + index = arguments[0]; + x = arguments[1]; + y = arguments[2]; + label = ""; + } else if (arguments.length === 2) { + index = arguments[0]; + x = arguments[1].getX(); + y = arguments[1].getY(); + label = arguments[1].getLabel(); + } else { + throw new Error("GLayer.addPointAtIndexPos(): signature not supported"); + } + + if (index <= this.points.length) { + this.points.splice(index, 0, new GPoint(x, y, label)); + this.plotPoints.splice(index, 0, new GPoint(this.valueToXPlot(x), this.valueToYPlot(y), label)); + this.inside.splice(index, 0, this.isInside(this.plotPoints[0])); + + if ( typeof this.hist !== "undefined") { + this.hist.setPlotPoints(this.plotPoints); + } + } +}; + +GLayer.prototype.removePoint = function(index) { + if (index < this.points.length) { + this.points.splice(index, 1); + this.plotPoints.splice(index, 1); + this.inside.splice(index, 1); + + if ( typeof this.hist !== "undefined") { + this.hist.removePlotPoint(index); + } + } +}; + +GLayer.prototype.setInside = function(inside) { + if (inside.length === this.inside.length) { + this.inside = inside.slice(); + } +}; + +GLayer.prototype.setPointColors = function(pointColors) { + if (pointColors.length > 0) { + this.pointColors = pointColors.slice(); + } +}; + +GLayer.prototype.setPointColor = function(pointColor) { + this.pointColors = [pointColor]; +}; + +GLayer.prototype.setPointSizes = function(pointSizes) { + if (pointSizes.length > 0) { + this.pointSizes = pointSizes.slice(); + } +}; + +GLayer.prototype.setPointSize = function(pointSize) { + this.pointSizes = [pointSize]; +}; + +GLayer.prototype.setLineColor = function(lineColor) { + this.lineColor = lineColor; +}; + +GLayer.prototype.setLineWidth = function(lineWidth) { + if (lineWidth > 0) { + this.lineWidth = lineWidth; + } +}; + +GLayer.prototype.setHistBasePoint = function(histBasePoint) { + this.histBasePoint.set(histBasePoint); +}; + +GLayer.prototype.setHistType = function(histType) { + if ( typeof this.hist !== "undefined") { + this.hist.setType(histType); + } +}; + +GLayer.prototype.setHistVisible = function(visible) { + if ( typeof this.hist !== "undefined") { + this.hist.setVisible(visible); + } +}; + +GLayer.prototype.setDrawHistLabels = function(drawHistLabels) { + if ( typeof this.hist !== "undefined") { + this.hist.setDrawLabels(drawHistLabels); + } +}; + +GLayer.prototype.setLabelBgColor = function(labelBgColor) { + this.labelBgColor = labelBgColor; +}; + +GLayer.prototype.setLabelSeparation = function(labelSeparation) { + this.labelSeparation[0] = labelSeparation[0]; + this.labelSeparation[1] = labelSeparation[1]; +}; + +GLayer.prototype.setFontName = function(fontName) { + this.fontName = fontName; +}; + +GLayer.prototype.setFontColor = function(fontColor) { + this.fontColor = fontColor; +}; + +GLayer.prototype.setFontSize = function(fontSize) { + if (fontSize > 0) { + this.fontSize = fontSize; + } +}; + +GLayer.prototype.setFontProperties = function(fontName, fontColor, fontSize) { + if (fontSize > 0) { + this.fontName = fontName; + this.fontColor = fontColor; + this.fontSize = fontSize; + } +}; + +GLayer.prototype.setAllFontProperties = function(fontName, fontColor, fontSize) { + this.setFontProperties(fontName, fontColor, fontSize); + + if ( typeof this.hist !== "undefined") { + this.hist.setFontProperties(fontName, fontColor, fontSize); + } +}; + +GLayer.prototype.getId = function() { + return this.id; +}; + +GLayer.prototype.getDim = function() { + return this.dim.slice(); +}; + +GLayer.prototype.getXLim = function() { + return this.xLim.slice(); +}; + +GLayer.prototype.getYLim = function() { + return this.yLim.slice(); +}; + +GLayer.prototype.getXLog = function() { + return this.xLog; +}; + +GLayer.prototype.getYLog = function() { + return this.yLog; +}; + +GLayer.prototype.getPoints = function() { + var points = []; + + for (var i = 0; i < this.points.length; i++) { + points[i] = new GPoint(this.points[i]); + } + + return points; +}; + +GLayer.prototype.getPointsRef = function() { + return this.points; +}; + +GLayer.prototype.getPointColors = function() { + return this.pointColors.slice(); +}; + +GLayer.prototype.getPointSizes = function() { + return this.pointSizes.slice(); +}; + +GLayer.prototype.getLineColor = function() { + return this.lineColor; +}; + +GLayer.prototype.getLineWidth = function() { + return this.lineWidth; +}; + +GLayer.prototype.getHistogram = function() { + return this.hist; +}; +/* + * Plot class. It controls the rest of the graphical elements (layers, axes, + * title, limits). + */ +function GPlot() { + var parent, xPos, yPos, plotWidth, plotHeight; + + if (arguments.length === 5) { + parent = arguments[0]; + xPos = arguments[1]; + yPos = arguments[2]; + plotWidth = arguments[3]; + plotHeight = arguments[4]; + } else if (arguments.length === 3) { + parent = arguments[0]; + xPos = arguments[1]; + yPos = arguments[2]; + plotWidth = 450; + plotHeight = 300; + } else if (arguments.length === 1) { + parent = arguments[0]; + xPos = 0; + yPos = 0; + plotWidth = 450; + plotHeight = 300; + } else { + throw new Error("GPlot constructor: signature not supported"); + } + + // The parent processing object + this.parent = parent; + + // General properties + this.pos = [xPos, yPos]; + this.outerDim = [plotWidth, plotHeight]; + this.mar = [60, 70, 40, 30]; + this.dim = [this.outerDim[0] - this.mar[1] - this.mar[3], this.outerDim[1] - this.mar[0] - this.mar[2]]; + this.xLim = [0, 1]; + this.yLim = [0, 1]; + this.fixedXLim = false; + this.fixedYLim = false; + this.xLog = false; + this.yLog = false; + this.invertedXScale = false; + this.invertedYScale = false; + this.includeAllLayersInLim = true; + this.expandLimFactor = 0.1; + + // Format properties + this.bgColor = this.parent.color(255); + this.boxBgColor = this.parent.color(245); + this.boxLineColor = this.parent.color(210); + this.boxLineWidth = 1; + this.gridLineColor = this.parent.color(210); + this.gridLineWidth = 1; + + // Layers + this.mainLayer = new GLayer(this.parent, GPlot.MAINLAYERID, this.dim, this.xLim, this.yLim, this.xLog, this.yLog); + this.layerList = []; + + // Axes and title + this.xAxis = new GAxis(this.parent, this.parent.BOTTOM, this.dim, this.xLim, this.xLog); + this.topAxis = new GAxis(this.parent, this.parent.TOP, this.dim, this.xLim, this.xLog); + this.yAxis = new GAxis(this.parent, this.parent.LEFT, this.dim, this.yLim, this.yLog); + this.rightAxis = new GAxis(this.parent, this.parent.RIGHT, this.dim, this.yLim, this.yLog); + this.title = new GTitle(this.parent, this.dim); + + // Setup for the mouse events + this.zoomingIsActive = false; + this.zoomFactor = 1.3; + this.increaseZoomButton = this.parent.LEFT; + this.decreaseZoomButton = this.parent.RIGHT; + this.increaseZoomKeyModifier = GPlot.NONE; + this.decreaseZoomKeyModifier = GPlot.NONE; + this.centeringIsActive = false; + this.centeringButton = this.parent.LEFT; + this.centeringKeyModifier = GPlot.NONE; + this.panningIsActive = false; + this.panningButton = this.parent.LEFT; + this.panningKeyModifier = GPlot.NONE; + this.panningReferencePoint = undefined; + this.panningIntervalId = undefined; + this.labelingIsActive = false; + this.labelingButton = this.parent.LEFT; + this.labelingKeyModifier = GPlot.NONE; + this.mousePos = undefined; + this.resetIsActive = false; + this.resetButton = this.parent.RIGHT; + this.resetKeyModifier = this.parent.CONTROL; + this.xLimReset = undefined; + this.yLimReset = undefined; + + // Add the event listeners + window.addEventListener("click", this.clickEvent.bind(this), false); + window.addEventListener("mousedown", this.mouseDownEvent.bind(this), false); + window.addEventListener("touchstart", this.mouseDownEvent.bind(this), false); + window.addEventListener("mouseup", this.mouseUpEvent.bind(this), false); + window.addEventListener("touchend", this.mouseUpEvent.bind(this), false); + window.addEventListener("wheel", this.wheelEvent.bind(this), false); +} + +// Constants +GPlot.MAINLAYERID = "main layer"; +GPlot.VERTICAL = 0; +GPlot.HORIZONTAL = 1; +GPlot.BOTH = 2; +GPlot.NONE = 0; + +GPlot.prototype.addLayer = function() { + var id, layer; + + if (arguments.length === 2) { + id = arguments[0]; + layer = new GLayer(this.parent, id, this.dim, this.xLim, this.yLim, this.xLog, this.yLog); + layer.setPoints(arguments[1]); + } else if (arguments.length === 1) { + id = arguments[0].getId(); + layer = arguments[0]; + } else { + throw new Error("GPlot.addLayer(): signature not supported"); + } + + // Check that it is the only layer with that id + var sameId = false; + + if (this.mainLayer.isId(id)) { + sameId = true; + } else { + for (var i = 0; i < this.layerList.length; i++) { + if (this.layerList[i].isId(id)) { + sameId = true; + break; + } + } + } + + // Add the layer to the list + if (!sameId) { + layer.setDim(this.dim); + layer.setLimAndLog(this.xLim, this.yLim, this.xLog, this.yLog); + this.layerList.push(layer); + + // Calculate and update the new plot limits if necessary + if (this.includeAllLayersInLim) { + this.updateLimits(); + } + } else { + console.log("A layer with the same id exists. Please change the id and try to add it again."); + } +}; + +GPlot.prototype.removeLayer = function(id) { + var index; + + for (var i = 0; i < this.layerList.length; i++) { + if (this.layerList[i].isId(id)) { + index = i; + break; + } + } + + if ( typeof index !== "undefined") { + this.layerList.splice(index, 1); + + // Calculate and update the new plot limits if necessary + if (this.includeAllLayersInLim) { + this.updateLimits(); + } + } else { + console.log("Couldn't find a layer in the plot with id = " + id); + } +}; + +GPlot.prototype.getPlotPosAt = function(xScreen, yScreen) { + var xPlot = xScreen - (this.pos[0] + this.mar[1]); + var yPlot = yScreen - (this.pos[1] + this.mar[2] + this.dim[1]); + + return [xPlot, yPlot]; +}; + +GPlot.prototype.getScreenPosAtValue = function(xValue, yValue) { + var xScreen = this.mainLayer.valueToXPlot(xValue) + (this.pos[0] + this.mar[1]); + var yScreen = this.mainLayer.valueToYPlot(yValue) + (this.pos[1] + this.mar[2] + this.dim[1]); + + return [xScreen, yScreen]; +}; + +GPlot.prototype.getPointAt = function() { + var xScreen, yScreen, layer; + + if (arguments.length === 3) { + xScreen = arguments[0]; + yScreen = arguments[1]; + layer = this.getLayer(arguments[2]); + } else if (arguments.length === 2) { + xScreen = arguments[0]; + yScreen = arguments[1]; + layer = this.mainLayer; + } else { + throw new Error("GPlot.getPointAt(): signature not supported"); + } + + var plotPos = this.getPlotPosAt(xScreen, yScreen); + return layer.getPointAtPlotPos(plotPos[0], plotPos[1]); +}; + +GPlot.prototype.addPointAt = function() { + var xScreen, yScreen, layerId; + + if (arguments.length === 3) { + xScreen = arguments[0]; + yScreen = arguments[1]; + layerId = arguments[2]; + } else if (arguments.length === 2) { + xScreen = arguments[0]; + yScreen = arguments[1]; + layerId = GPlot.MAINLAYERID; + } else { + throw new Error("GPlot.addPointAt(): signature not supported"); + } + + var value = this.getValueAt(xScreen, yScreen); + this.addPoint(value[0], value[1], "", layerId); +}; + +GPlot.prototype.removePointAt = function() { + var xScreen, yScreen, layerId; + + if (arguments.length === 3) { + xScreen = arguments[0]; + yScreen = arguments[1]; + layerId = arguments[2]; + } else if (arguments.length === 2) { + xScreen = arguments[0]; + yScreen = arguments[1]; + layerId = GPlot.MAINLAYERID; + } else { + throw new Error("GPlot.removePointAt(): signature not supported"); + } + + var plotPos = this.getPlotPosAt(xScreen, yScreen); + var pointIndex = this.getLayer(layerId).getPointIndexAtPlotPos(plotPos[0], plotPos[1]); + + if ( typeof pointIndex !== "undefined") { + this.removePoint(pointIndex, layerId); + } +}; + +GPlot.prototype.getValueAt = function(xScreen, yScreen) { + var plotPos = this.getPlotPosAt(xScreen, yScreen); + return this.mainLayer.plotToValue(plotPos[0], plotPos[1]); +}; + +GPlot.prototype.getRelativePlotPosAt = function(xScreen, yScreen) { + var plotPos = this.getPlotPosAt(xScreen, yScreen); + return [plotPos[0] / this.dim[0], -plotPos[1] / this.dim[1]]; +}; + +GPlot.prototype.isOverPlot = function() { + var xScreen, yScreen; + + if (arguments.length === 2) { + xScreen = arguments[0]; + yScreen = arguments[1]; + } else if (arguments.length === 0) { + xScreen = this.parent.mouseX; + yScreen = this.parent.mouseY; + } else { + throw new Error("GPlot.isOverPlot(): signature not supported"); + } + + return (xScreen >= this.pos[0]) && (xScreen <= this.pos[0] + this.outerDim[0]) && (yScreen >= this.pos[1]) && (yScreen <= this.pos[1] + this.outerDim[1]); +}; + +GPlot.prototype.isOverBox = function() { + var xScreen, yScreen; + + if (arguments.length === 2) { + xScreen = arguments[0]; + yScreen = arguments[1]; + } else if (arguments.length === 0) { + xScreen = this.parent.mouseX; + yScreen = this.parent.mouseY; + } else { + throw new Error("GPlot.isOverBox(): signature not supported"); + } + + return (xScreen >= this.pos[0] + this.mar[1]) && (xScreen <= this.pos[0] + this.outerDim[0] - this.mar[3]) && (yScreen >= this.pos[1] + this.mar[2]) && (yScreen <= this.pos[1] + this.outerDim[1] - this.mar[0]); +}; + +GPlot.prototype.updateLimits = function() { + // Calculate the new limits and update the axes if needed + if (!this.fixedXLim) { + this.xLim = this.calculatePlotXLim(); + this.xAxis.setLim(this.xLim); + this.topAxis.setLim(this.xLim); + } + + if (!this.fixedYLim) { + this.yLim = this.calculatePlotYLim(); + this.yAxis.setLim(this.yLim); + this.rightAxis.setLim(this.yLim); + } + + // Update the layers + this.mainLayer.setXYLim(this.xLim, this.yLim); + + for (var i = 0; i < this.layerList.length; i++) { + this.layerList[i].setXYLim(this.xLim, this.yLim); + } +}; + +GPlot.prototype.calculatePlotXLim = function() { + // Find the limits for the main layer + var lim = this.calculatePointsXLim(this.mainLayer.getPointsRef()); + + // Include the other layers in the limit calculation if necessary + if (this.includeAllLayersInLim) { + for (var i = 0; i < this.layerList.length; i++) { + var newLim = this.calculatePointsXLim(this.layerList[i].getPointsRef()); + + if ( typeof newLim !== "undefined") { + if ( typeof lim !== "undefined") { + lim[0] = Math.min(lim[0], newLim[0]); + lim[1] = Math.max(lim[1], newLim[1]); + } else { + lim = newLim; + } + } + } + } + + if ( typeof lim !== "undefined") { + // Expand the axis limits a bit + var delta = (lim[0] === 0) ? 0.1 : 0.1 * lim[0]; + + if (this.xLog) { + if (lim[0] !== lim[1]) { + delta = Math.exp(this.expandLimFactor * Math.log(lim[1] / lim[0])); + } + + lim[0] = lim[0] / delta; + lim[1] = lim[1] * delta; + } else { + if (lim[0] !== lim[1]) { + delta = this.expandLimFactor * (lim[1] - lim[0]); + } + + lim[0] = lim[0] - delta; + lim[1] = lim[1] + delta; + } + } else { + if (this.xLog && (this.xLim[0] <= 0 || this.xLim[1] <= 0)) { + lim = [0.1, 10]; + } else { + lim = this.xLim.slice(); + } + } + + // Invert the limits if necessary + if (this.invertedXScale && lim[0] < lim[1]) { + lim = [lim[1], lim[0]]; + } + + return lim; +}; + +GPlot.prototype.calculatePlotYLim = function() { + // Find the limits for the main layer + var lim = this.calculatePointsYLim(this.mainLayer.getPointsRef()); + + // Include the other layers in the limit calculation if necessary + if (this.includeAllLayersInLim) { + for (var i = 0; i < this.layerList.length; i++) { + var newLim = this.calculatePointsYLim(this.layerList[i].getPointsRef()); + + if ( typeof newLim !== "undefined") { + if ( typeof lim !== "undefined") { + lim[0] = Math.min(lim[0], newLim[0]); + lim[1] = Math.max(lim[1], newLim[1]); + } else { + lim = newLim; + } + } + } + } + + if ( typeof lim !== "undefined") { + // Expand the axis limits a bit + var delta = (lim[0] === 0) ? 0.1 : 0.1 * lim[0]; + + if (this.yLog) { + if (lim[0] !== lim[1]) { + delta = Math.exp(this.expandLimFactor * Math.log(lim[1] / lim[0])); + } + + lim[0] = lim[0] / delta; + lim[1] = lim[1] * delta; + } else { + if (lim[0] !== lim[1]) { + delta = this.expandLimFactor * (lim[1] - lim[0]); + } + + lim[0] = lim[0] - delta; + lim[1] = lim[1] + delta; + } + } else { + if (this.yLog && (this.yLim[0] <= 0 || this.yLim[1] <= 0)) { + lim = [0.1, 10]; + } else { + lim = this.yLim.slice(); + } + } + + // Invert the limits if necessary + if (this.invertedYScale && lim[0] < lim[1]) { + lim = [lim[1], lim[0]]; + } + + return lim; +}; + +GPlot.prototype.calculatePointsXLim = function(points) { + // Find the points limits + var lim = [Number.MAX_VALUE, -Number.MAX_VALUE]; + + for (var i = 0; i < points.length; i++) { + if (points[i].isValid()) { + // Use the point if it's inside, and it's not negative if + // the scale is logarithmic + var x = points[i].getX(); + var y = points[i].getY(); + var isInside = true; + + if (this.fixedYLim) { + isInside = ((this.yLim[1] >= this.yLim[0]) && (y >= this.yLim[0]) && (y <= this.yLim[1])) || ((this.yLim[1] < this.yLim[0]) && (y <= this.yLim[0]) && (y >= this.yLim[1])); + } + + if (isInside && !(this.xLog && x <= 0)) { + if (x < lim[0]) { + lim[0] = x; + } + + if (x > lim[1]) { + lim[1] = x; + } + } + } + } + + // Check that the new limits make sense + if (lim[1] < lim[0]) { + lim = undefined; + } + + return lim; +}; + +GPlot.prototype.calculatePointsYLim = function(points) { + // Find the points limits + var lim = [Number.MAX_VALUE, -Number.MAX_VALUE]; + + for (var i = 0; i < points.length; i++) { + if (points[i].isValid()) { + // Use the point if it's inside, and it's not negative if + // the scale is logarithmic + var x = points[i].getX(); + var y = points[i].getY(); + var isInside = true; + + if (this.fixedXLim) { + isInside = ((this.xLim[1] >= this.xLim[0]) && (x >= this.xLim[0]) && (x <= this.xLim[1])) || ((this.xLim[1] < this.xLim[0]) && (x <= this.xLim[0]) && (x >= this.xLim[1])); + } + + if (isInside && !(this.yLog && y <= 0)) { + if (y < lim[0]) { + lim[0] = y; + } + if (y > lim[1]) { + lim[1] = y; + } + } + } + } + + // Check that the new limits make sense + if (lim[1] < lim[0]) { + lim = undefined; + } + + return lim; +}; + +GPlot.prototype.moveHorizontalAxesLim = function(delta) { + // Obtain the new x limits + var deltaLim; + + if (this.xLog) { + deltaLim = Math.exp(Math.log(this.xLim[1] / this.xLim[0]) * delta / this.dim[0]); + this.xLim[0] *= deltaLim; + this.xLim[1] *= deltaLim; + } else { + deltaLim = (this.xLim[1] - this.xLim[0]) * delta / this.dim[0]; + this.xLim[0] += deltaLim; + this.xLim[1] += deltaLim; + } + + // Fix the limits + this.fixedXLim = true; + + // Move the horizontal axes + this.xAxis.moveLim(this.xLim); + this.topAxis.moveLim(this.xLim); + + // Update the plot limits + this.updateLimits(); +}; + +GPlot.prototype.moveVerticalAxesLim = function(delta) { + // Obtain the new y limits + var deltaLim; + + if (this.yLog) { + deltaLim = Math.exp(Math.log(this.yLim[1] / this.yLim[0]) * delta / this.dim[1]); + this.yLim[0] *= deltaLim; + this.yLim[1] *= deltaLim; + } else { + deltaLim = (this.yLim[1] - this.yLim[0]) * delta / this.dim[1]; + this.yLim[0] += deltaLim; + this.yLim[1] += deltaLim; + } + + // Fix the limits + this.fixedYLim = true; + + // Move the vertical axes + this.yAxis.moveLim(this.yLim); + this.rightAxis.moveLim(this.yLim); + + // Update the plot limits + this.updateLimits(); +}; + +GPlot.prototype.centerAndZoom = function(factor, xValue, yValue) { + // Calculate the new limits + var deltaLim; + + if (this.xLog) { + deltaLim = Math.exp(Math.log(this.xLim[1] / this.xLim[0]) / (2 * factor)); + this.xLim = [xValue / deltaLim, xValue * deltaLim]; + } else { + deltaLim = (this.xLim[1] - this.xLim[0]) / (2 * factor); + this.xLim = [xValue - deltaLim, xValue + deltaLim]; + } + + if (this.yLog) { + deltaLim = Math.exp(Math.log(this.yLim[1] / this.yLim[0]) / (2 * factor)); + this.yLim = [yValue / deltaLim, yValue * deltaLim]; + } else { + deltaLim = (this.yLim[1] - this.yLim[0]) / (2 * factor); + this.yLim = [yValue - deltaLim, yValue + deltaLim]; + } + + // Fix the limits + this.fixedXLim = true; + this.fixedYLim = true; + + // Update the horizontal and vertical axes + this.xAxis.setLim(this.xLim); + this.topAxis.setLim(this.xLim); + this.yAxis.setLim(this.yLim); + this.rightAxis.setLim(yLim); + + // Update the plot limits (the layers, because the limits are fixed) + this.updateLimits(); +}; + +GPlot.prototype.zoom = function() { + var factor, deltaLim, offset; + + if (arguments.length === 3) { + factor = arguments[0]; + var xScreen = arguments[1]; + var yScreen = arguments[2]; + + var plotPos = this.getPlotPosAt(xScreen, yScreen); + var value = this.mainLayer.plotToValue(plotPos[0], plotPos[1]); + + if (this.xLog) { + deltaLim = Math.exp(Math.log(this.xLim[1] / this.xLim[0]) / (2 * factor)); + offset = Math.exp((Math.log(this.xLim[1] / this.xLim[0]) / factor) * (0.5 - plotPos[0] / this.dim[0])); + this.xLim = [value[0] * offset / deltaLim, value[0] * offset * deltaLim]; + } else { + deltaLim = (this.xLim[1] - this.xLim[0]) / (2 * factor); + offset = 2 * deltaLim * (0.5 - plotPos[0] / this.dim[0]); + this.xLim = [value[0] + offset - deltaLim, value[0] + offset + deltaLim]; + } + + if (this.yLog) { + deltaLim = Math.exp(Math.log(this.yLim[1] / this.yLim[0]) / (2 * factor)); + offset = Math.exp((Math.log(this.yLim[1] / this.yLim[0]) / factor) * (0.5 + plotPos[1] / this.dim[1])); + this.yLim = [value[1] * offset / deltaLim, value[1] * offset * deltaLim]; + } else { + deltaLim = (this.yLim[1] - this.yLim[0]) / (2 * factor); + offset = 2 * deltaLim * (0.5 + plotPos[1] / this.dim[1]); + this.yLim = [value[1] + offset - deltaLim, value[1] + offset + deltaLim]; + } + + // Fix the limits + this.fixedXLim = true; + this.fixedYLim = true; + + // Update the horizontal and vertical axes + this.xAxis.setLim(this.xLim); + this.topAxis.setLim(this.xLim); + this.yAxis.setLim(this.yLim); + this.rightAxis.setLim(this.yLim); + + // Update the plot limits (the layers, because the limits are fixed) + this.updateLimits(); + } else if (arguments.length === 1) { + factor = arguments[0]; + var centerValue = this.mainLayer.plotToValue(this.dim[0] / 2, -this.dim[1] / 2); + this.centerAndZoom(factor, centerValue[0], centerValue[1]); + } else { + throw new Error("GPlot.zoom(): signature not supported"); + } +}; + +GPlot.prototype.shiftPlotPos = function(valuePlotPos, newPlotPos) { + // Calculate the new limits + var deltaLim; + var deltaXPlot = valuePlotPos[0] - newPlotPos[0]; + var deltaYPlot = valuePlotPos[1] - newPlotPos[1]; + + if (this.xLog) { + deltaLim = Math.exp(Math.log(this.xLim[1] / this.xLim[0]) * deltaXPlot / this.dim[0]); + this.xLim = [this.xLim[0] * deltaLim, this.xLim[1] * deltaLim]; + } else { + deltaLim = (this.xLim[1] - this.xLim[0]) * deltaXPlot / this.dim[0]; + this.xLim = [this.xLim[0] + deltaLim, this.xLim[1] + deltaLim]; + } + + if (this.yLog) { + deltaLim = Math.exp(-Math.log(this.yLim[1] / this.yLim[0]) * deltaYPlot / this.dim[1]); + this.yLim = [this.yLim[0] * deltaLim, this.yLim[1] * deltaLim]; + } else { + deltaLim = -(this.yLim[1] - this.yLim[0]) * deltaYPlot / this.dim[1]; + this.yLim = [this.yLim[0] + deltaLim, this.yLim[1] + deltaLim]; + } + + // Fix the limits + this.fixedXLim = true; + this.fixedYLim = true; + + // Move the horizontal and vertical axes + this.xAxis.moveLim(this.xLim); + this.topAxis.moveLim(this.xLim); + this.yAxis.moveLim(this.yLim); + this.rightAxis.moveLim(this.yLim); + + // Update the plot limits (the layers, because the limits are fixed) + this.updateLimits(); +}; + +GPlot.prototype.align = function() { + var xValue, yValue, xScreen, yScreen; + + if (arguments.length === 4) { + xValue = arguments[0]; + yValue = arguments[1]; + xScreen = arguments[2]; + yScreen = arguments[3]; + } else if (arguments.length === 3) { + xValue = arguments[0][0]; + yValue = arguments[0][1]; + xScreen = arguments[1]; + yScreen = arguments[2]; + } else { + throw new Error("GPlot.align(): signature not supported"); + } + + var valuePlotPos = this.mainLayer.valueToPlot(xValue, yValue); + var newPlotPos = this.getPlotPosAt(xScreen, yScreen); + this.shiftPlotPos(valuePlotPos, newPlotPos); +}; + +GPlot.prototype.center = function(xScreen, yScreen) { + var valuePlotPos = this.getPlotPosAt(xScreen, yScreen); + var newPlotPos = [this.dim[0] / 2, -this.dim[1] / 2]; + this.shiftPlotPos(valuePlotPos, newPlotPos); +}; + +GPlot.prototype.startHistograms = function(histType) { + this.mainLayer.startHistogram(histType); + + for (var i = 0; i < this.layerList.length; i++) { + this.layerList[i].startHistogram(histType); + } +}; + +GPlot.prototype.defaultDraw = function() { + this.beginDraw(); + this.drawBackground(); + this.drawBox(); + this.drawXAxis(); + this.drawYAxis(); + this.drawTitle(); + this.drawLines(); + this.drawPoints(); + this.endDraw(); +}; + +GPlot.prototype.beginDraw = function() { + this.parent.push(); + this.parent.translate(this.pos[0] + this.mar[1], this.pos[1] + this.mar[2] + this.dim[1]); +}; + +GPlot.prototype.endDraw = function() { + this.parent.pop(); +}; + +GPlot.prototype.drawBackground = function() { + this.parent.push(); + this.parent.rectMode(this.parent.CORNER); + this.parent.fill(this.bgColor); + this.parent.noStroke(); + this.parent.rect(-this.mar[1], -this.mar[2] - this.dim[1], this.outerDim[0], this.outerDim[1]); + this.parent.pop(); +}; + +GPlot.prototype.drawBox = function() { + this.parent.push(); + this.parent.rectMode(this.parent.CORNER); + this.parent.fill(this.boxBgColor); + this.parent.stroke(this.boxLineColor); + this.parent.strokeWeight(this.boxLineWidth); + this.parent.strokeCap(this.parent.SQUARE); + this.parent.rect(0, -this.dim[1], this.dim[0], this.dim[1]); + this.parent.pop(); +}; + +GPlot.prototype.drawXAxis = function() { + this.xAxis.draw(); +}; + +GPlot.prototype.drawYAxis = function() { + this.yAxis.draw(); +}; + +GPlot.prototype.drawTopAxis = function() { + this.topAxis.draw(); +}; + +GPlot.prototype.drawRightAxis = function() { + this.rightAxis.draw(); +}; + +GPlot.prototype.drawTitle = function() { + this.title.draw(); +}; + +GPlot.prototype.drawPoints = function() { + var i; + + if (arguments.length === 1) { + this.mainLayer.drawPoints(arguments[0]); + + for ( i = 0; i < this.layerList.length; i++) { + this.layerList[0].drawPoints(arguments[0]); + } + } else if (arguments.length === 0) { + this.mainLayer.drawPoints(); + + for ( i = 0; i < this.layerList.length; i++) { + this.layerList[i].drawPoints(); + } + } else { + throw new Error("GPlot.drawPoints(): signature not supported"); + } +}; + +GPlot.prototype.drawPoint = function() { + if (arguments.length === 3) { + this.mainLayer.drawPoint(arguments[0], arguments[1], arguments[2]); + } else if (arguments.length === 2) { + this.mainLayer.drawPoint(arguments[0], arguments[1]); + } else if (arguments.length === 1) { + this.mainLayer.drawPoint(arguments[0]); + } else { + throw new Error("GPlot.drawPoint(): signature not supported"); + } +}; + +GPlot.prototype.drawLines = function() { + this.mainLayer.drawLines(); + + for (var i = 0; i < this.layerList.length; i++) { + this.layerList[i].drawLines(); + } +}; + +GPlot.prototype.drawLine = function() { + if (arguments.length === 4) { + this.mainLayer.drawLine(arguments[0], arguments[1], arguments[2], arguments[3]); + } else if (arguments.length === 2) { + this.mainLayer.drawLine(arguments[0], arguments[1]); + } else { + throw new Error("GPlot.drawLine(): signature not supported"); + } +}; + +GPlot.prototype.drawHorizontalLine = function() { + if (arguments.length === 3) { + this.mainLayer.drawHorizontalLine(arguments[0], arguments[1], arguments[2]); + } else if (arguments.length === 1) { + this.mainLayer.drawHorizontalLine(arguments[0]); + } else { + throw new Error("GPlot.drawHorizontalLine(): signature not supported"); + } +}; + +GPlot.prototype.drawVerticalLine = function() { + if (arguments.length === 3) { + this.mainLayer.drawVerticalLine(arguments[0], arguments[1], arguments[2]); + } else if (arguments.length === 1) { + this.mainLayer.drawVerticalLine(arguments[0]); + } else { + throw new Error("GPlot.drawVerticalLine(): signature not supported"); + } +}; + +GPlot.prototype.drawFilledContours = function(contourType, referenceValue) { + this.mainLayer.drawFilledContour(contourType, referenceValue); + + for (var i = 0; i < this.layerList.length; i++) { + this.layerList[i].drawFilledContour(contourType, referenceValue); + } +}; + +GPlot.prototype.drawAllLabels = function() { + this.mainLayer.drawAllLabels(); +}; + +GPlot.prototype.drawLabel = function(point) { + this.mainLayer.drawLabel(point); +}; + +GPlot.prototype.drawLabelsAt = function(xScreen, yScreen) { + var plotPos = this.getPlotPosAt(xScreen, yScreen); + this.mainLayer.drawLabelAtPlotPos(plotPos[0], plotPos[1]); + + for (var i = 0; i < this.layerList.length; i++) { + this.layerList[i].drawLabelAtPlotPos(plotPos[0], plotPos[1]); + } +}; + +GPlot.prototype.drawLabels = function() { + if (this.labelingIsActive && typeof this.mousePos !== "undefined") { + this.drawLabelsAt(this.mousePos[0], this.mousePos[1]); + } +}; + +GPlot.prototype.drawGridLines = function(gridType) { + var i; + + this.parent.push(); + this.parent.noFill(); + this.parent.stroke(this.gridLineColor); + this.parent.strokeWeight(this.gridLineWidth); + this.parent.strokeCap(this.parent.SQUARE); + + if (gridType === GPlot.BOTH || gridType === GPlot.VERTICAL) { + var xPlotTicks = this.xAxis.getPlotTicksRef(); + + for ( i = 0; i < xPlotTicks.length; i++) { + if (xPlotTicks[i] >= 0 && xPlotTicks[i] <= this.dim[0]) { + this.parent.line(xPlotTicks[i], 0, xPlotTicks[i], -this.dim[1]); + } + } + } + + if (gridType === GPlot.BOTH || gridType === GPlot.HORIZONTAL) { + var yPlotTicks = this.yAxis.getPlotTicksRef(); + + for ( i = 0; i < yPlotTicks.length; i++) { + if (-yPlotTicks[i] >= 0 && -yPlotTicks[i] <= this.dim[1]) { + this.parent.line(0, yPlotTicks[i], this.dim[0], yPlotTicks[i]); + } + } + } + + this.parent.pop(); +}; + +GPlot.prototype.drawHistograms = function() { + this.mainLayer.drawHistogram(); + + for (var i = 0; i < this.layerList.length; i++) { + this.layerList[i].drawHistogram(); + } +}; + +GPlot.prototype.drawPolygon = function(polygonPoints, polygonColor) { + this.mainLayer.drawPolygon(polygonPoints, polygonColor); +}; + +GPlot.prototype.drawAnnotation = function(text, x, y, horAlign, verAlign) { + this.mainLayer.drawAnnotation(text, x, y, horAlign, verAlign); +}; + +GPlot.prototype.drawLegend = function(text, xRelativePos, yRelativePos) { + var rectSize = 14; + + this.parent.push(); + this.parent.rectMode(this.parent.CENTER); + this.parent.noStroke(); + + for (var i = 0; i < text.length; i++) { + var plotPosition = [xRelativePos[i] * this.dim[0], -yRelativePos[i] * this.dim[1]]; + var position = this.mainLayer.plotToValue(plotPosition[0] + rectSize, plotPosition[1]); + + if (i === 0) { + this.parent.fill(this.mainLayer.getLineColor()); + this.parent.rect(plotPosition[0], plotPosition[1], rectSize, rectSize); + this.mainLayer.drawAnnotation(text[i], position[0], position[1], this.parent.LEFT, this.parent.CENTER); + } else { + this.parent.fill(this.layerList[i - 1].getLineColor()); + this.parent.rect(plotPosition[0], plotPosition[1], rectSize, rectSize); + this.layerList[i - i].drawAnnotation(text[i], position[0], position[1], this.parent.LEFT, this.parent.CENTER); + } + } + + this.parent.pop(); +}; + +GPlot.prototype.setPos = function() { + if (arguments.length === 2) { + this.pos[0] = arguments[0]; + this.pos[1] = arguments[1]; + } else if (arguments.length === 1) { + this.pos[0] = arguments[0][0]; + this.pos[1] = arguments[0][1]; + } else { + throw new Error("GPlot.setPos(): signature not supported"); + } +}; + +GPlot.prototype.setOuterDim = function() { + var xOuterDim, yOuterDim; + + if (arguments.length === 2) { + xOuterDim = arguments[0]; + yOuterDim = arguments[1]; + } else if (arguments.length === 1) { + xOuterDim = arguments[0][0]; + yOuterDim = arguments[0][1]; + } else { + throw new Error("GPlot.setOuterDim(): signature not supported"); + } + + if (xOuterDim > 0 && yOuterDim > 0) { + // Make sure that the new plot dimensions are positive + var xDim = xOuterDim - this.mar[1] - this.mar[3]; + var yDim = yOuterDim - this.mar[0] - this.mar[2]; + + if (xDim > 0 && yDim > 0) { + this.outerDim[0] = xOuterDim; + this.outerDim[1] = yOuterDim; + this.dim[0] = xDim; + this.dim[1] = yDim; + this.xAxis.setDim(this.dim); + this.topAxis.setDim(this.dim); + this.yAxis.setDim(this.dim); + this.rightAxis.setDim(this.dim); + this.title.setDim(this.dim); + + // Update the layers + this.mainLayer.setDim(this.dim); + + for (var i = 0; i < this.layerList.lenght; i++) { + this.layerList[i].setDim(this.dim); + } + } + } +}; + +GPlot.prototype.setMar = function() { + var bottomMargin, leftMargin, topMargin, rightMargin; + + if (arguments.length === 4) { + bottomMargin = arguments[0]; + leftMargin = arguments[1]; + topMargin = arguments[2]; + rightMargin = arguments[3]; + } else if (arguments.length === 1) { + bottomMargin = arguments[0][0]; + leftMargin = arguments[0][1]; + topMargin = arguments[0][2]; + rightMargin = arguments[0][3]; + } else { + throw new Error("GPlot.setMar(): signature not supported"); + } + + var xOuterDim = this.dim[0] + leftMargin + rightMargin; + var yOuterDim = this.dim[1] + bottomMargin + topMargin; + + if (xOuterDim > 0 && yOuterDim > 0) { + this.mar[0] = bottomMargin; + this.mar[1] = leftMargin; + this.mar[2] = topMargin; + this.mar[3] = rightMargin; + this.outerDim[0] = xOuterDim; + this.outerDim[1] = yOuterDim; + } +}; + +GPlot.prototype.setDim = function() { + var xDim, yDim; + + if (arguments.length === 2) { + xDim = arguments[0]; + yDim = arguments[1]; + } else if (arguments.length === 1) { + xDim = arguments[0][0]; + yDim = arguments[0][1]; + } else { + throw new Error("GPlot.setDim(): signature not supported"); + } + + if (xDim > 0 && yDim > 0) { + // Make sure that the new outer dimensions are positive + var xOuterDim = xDim + this.mar[1] + this.mar[3]; + var yOuterDim = yDim + this.mar[0] + this.mar[2]; + + if (xOuterDim > 0 && yOuterDim > 0) { + this.outerDim[0] = xOuterDim; + this.outerDim[1] = yOuterDim; + this.dim[0] = xDim; + this.dim[1] = yDim; + this.xAxis.setDim(this.dim); + this.topAxis.setDim(this.dim); + this.yAxis.setDim(this.dim); + this.rightAxis.setDim(this.dim); + this.title.setDim(this.dim); + + // Update the layers + this.mainLayer.setDim(this.dim); + + for (var i = 0; i < this.layerList.length; i++) { + this.layerList[i].setDim(this.dim); + } + } + } +}; + +GPlot.prototype.setXLim = function() { + var lowerLim, upperLim; + + if (arguments.length === 2) { + lowerLim = arguments[0]; + upperLim = arguments[1]; + } else if (arguments.length === 1) { + lowerLim = arguments[0][0]; + upperLim = arguments[0][1]; + } else { + throw new Error("GPlot.setXLim(): signature not supported"); + } + + if (lowerLim !== upperLim) { + // Make sure the new limits makes sense + if (this.xLog && (lowerLim <= 0 || upperLim <= 0)) { + console.log("One of the limits is negative. This is not allowed in logarithmic scale."); + } else { + this.xLim[0] = lowerLim; + this.xLim[1] = upperLim; + this.invertedXScale = this.xLim[0] > this.xLim[1]; + + // Fix the limits + this.fixedXLim = true; + + // Update the axes + this.xAxis.setLim(this.xLim); + this.topAxis.setLim(this.xLim); + + // Update the plot limits + this.updateLimits(); + } + } +}; + +GPlot.prototype.setYLim = function() { + var lowerLim, upperLim; + + if (arguments.length === 2) { + lowerLim = arguments[0]; + upperLim = arguments[1]; + } else if (arguments.length === 1) { + lowerLim = arguments[0][0]; + upperLim = arguments[0][1]; + } else { + throw new Error("GPlot.setYLim(): signature not supported"); + } + + if (lowerLim !== upperLim) { + // Make sure the new limits makes sense + if (this.yLog && (lowerLim <= 0 || upperLim <= 0)) { + console.log("One of the limits is negative. This is not allowed in logarithmic scale."); + } else { + this.yLim[0] = lowerLim; + this.yLim[1] = upperLim; + this.invertedYScale = this.yLim[0] > this.yLim[1]; + + // Fix the limits + this.fixedYLim = true; + + // Update the axes + this.yAxis.setLim(this.yLim); + this.rightAxis.setLim(this.yLim); + + // Update the plot limits + this.updateLimits(); + } + } +}; + +GPlot.prototype.setFixedXLim = function(fixedXLim) { + this.fixedXLim = fixedXLim; + + // Update the plot limits + this.updateLimits(); +}; + +GPlot.prototype.setFixedYLim = function(fixedYLim) { + this.fixedYLim = fixedYLim; + + // Update the plot limits + this.updateLimits(); +}; + +GPlot.prototype.setLogScale = function(logType) { + var newXLog = this.xLog; + var newYLog = this.yLog; + + if (logType === "xy" || logType === "yx") { + newXLog = true; + newYLog = true; + } else if (logType === "x") { + newXLog = true; + newYLog = false; + } else if (logType === "y") { + newXLog = false; + newYLog = true; + } else if (logType === "") { + newXLog = false; + newYLog = false; + } + + // Do something only if the scale changed + if (newXLog !== this.xLog || newYLog !== this.yLog) { + // Set the new log scales + this.xLog = newXLog; + this.yLog = newYLog; + + // Unfix the limits if the old ones don't make sense + if (this.xLog && this.fixedXLim && (this.xLim[0] <= 0 || this.xLim[1] <= 0)) { + this.fixedXLim = false; + } + + if (this.yLog && this.fixedYLim && (this.yLim[0] <= 0 || this.yLim[1] <= 0)) { + this.fixedYLim = false; + } + + // Calculate the new limits if needed + if (!this.fixedXLim) { + this.xLim = this.calculatePlotXLim(); + } + + if (!this.fixedYLim) { + this.yLim = this.calculatePlotYLim(); + } + + // Update the axes + this.xAxis.setLimAndLog(this.xLim, this.xLog); + this.topAxis.setLimAndLog(this.xLim, this.xLog); + this.yAxis.setLimAndLog(this.yLim, this.yLog); + this.rightAxis.setLimAndLog(this.yLim, this.yLog); + + // Update the layers + this.mainLayer.setLimAndLog(this.xLim, this.yLim, this.xLog, this.yLog); + + for (var i = 0; i < this.layerList.length; i++) { + this.layerList[i].setLimAndLog(this.xLim, this.yLim, this.xLog, this.yLog); + } + } +}; + +GPlot.prototype.setInvertedXScale = function(invertedXScale) { + if (invertedXScale !== this.invertedXScale) { + this.invertedXScale = invertedXScale; + var temp = this.xLim[0]; + this.xLim[0] = this.xLim[1]; + this.xLim[1] = temp; + + // Update the axes + this.xAxis.setLim(this.xLim); + this.topAxis.setLim(this.xLim); + + // Update the layers + this.mainLayer.setXLim(this.xLim); + + for (var i = 0; i < this.layerList.length; i++) { + this.layerList[i].setXLim(this.xLim); + } + } +}; + +GPlot.prototype.invertXScale = function() { + this.setInvertedXScale(!this.invertedXScale); +}; + +GPlot.prototype.setInvertedYScale = function(invertedYScale) { + if (invertedYScale !== this.invertedYScale) { + this.invertedYScale = invertedYScale; + var temp = this.yLim[0]; + this.yLim[0] = this.yLim[1]; + this.yLim[1] = temp; + + // Update the axes + this.yAxis.setLim(this.yLim); + this.rightAxis.setLim(this.yLim); + + // Update the layers + this.mainLayer.setYLim(this.yLim); + + for (var i = 0; i < this.layerList.length; i++) { + this.layerList[i].setYLim(this.yLim); + } + } +}; + +GPlot.prototype.invertYScale = function() { + this.setInvertedYScale(!this.invertedYScale); +}; + +GPlot.prototype.setIncludeAllLayersInLim = function(includeAllLayers) { + if (includeAllLayers !== this.includeAllLayersInLim) { + this.includeAllLayersInLim = includeAllLayers; + + // Update the plot limits + this.updateLimits(); + } +}; + +GPlot.prototype.setExpandLimFactor = function(expandFactor) { + if (expandFactor >= 0 && expandFactor !== this.expandLimFactor) { + this.expandLimFactor = expandFactor; + + // Update the plot limits + this.updateLimits(); + } +}; + +GPlot.prototype.setBgColor = function(bgColor) { + this.bgColor = bgColor; +}; + +GPlot.prototype.setBoxBgColor = function(boxBgColor) { + this.boxBgColor = boxBgColor; +}; + +GPlot.prototype.setBoxLineColor = function(boxLineColor) { + this.boxLineColor = boxLineColor; +}; + +GPlot.prototype.setBoxLineWidth = function(boxLineWidth) { + if (boxLineWidth > 0) { + this.boxLineWidth = boxLineWidth; + } +}; + +GPlot.prototype.setGridLineColor = function(gridLineColor) { + this.gridLineColor = gridLineColor; +}; + +GPlot.prototype.setGridLineWidth = function(gridLineWidth) { + if (gridLineWidth > 0) { + this.gridLineWidth = gridLineWidth; + } +}; + +GPlot.prototype.setPoints = function() { + if (arguments.length === 2) { + this.getLayer(arguments[1]).setPoints(arguments[0]); + } else if (arguments.length === 1) { + this.mainLayer.setPoints(arguments[0]); + } else { + throw new Error("GPlot.setPoints(): signature not supported"); + } + + this.updateLimits(); +}; + +GPlot.prototype.setPoint = function() { + if (arguments.length === 5) { + this.getLayer(arguments[4]).setPoint(arguments[0], arguments[1], arguments[2], arguments[3]); + } else if (arguments.length === 4) { + this.mainLayer.setPoint(arguments[0], arguments[1], arguments[2], arguments[3]); + } else if (arguments.length === 3 && arguments[1] instanceof GPoint) { + this.getLayer(arguments[2]).setPoint(arguments[0], arguments[1]); + } else if (arguments.length === 3) { + this.mainLayer.setPoint(arguments[0], arguments[1], arguments[2]); + } else if (arguments.length === 2) { + this.mainLayer.setPoint(arguments[0], arguments[1]); + } else { + throw new Error("GPlot.setPoint(): signature not supported"); + } + + this.updateLimits(); +}; + +GPlot.prototype.addPoint = function() { + if (arguments.length === 4) { + this.getLayer(arguments[3]).addPoint(arguments[0], arguments[1], arguments[2]); + } else if (arguments.length === 3) { + this.mainLayer.addPoint(arguments[0], arguments[1], arguments[2]); + } else if (arguments.length === 2 && arguments[0] instanceof GPoint) { + this.getLayer(arguments[1]).addPoint(arguments[0]); + } else if (arguments.length === 2) { + this.mainLayer.addPoint(arguments[0], arguments[1]); + } else if (arguments.length === 1) { + this.mainLayer.addPoint(arguments[0]); + } else { + throw new Error("GPlot.addPoint(): signature not supported"); + } + + this.updateLimits(); +}; + +GPlot.prototype.addPoints = function() { + if (arguments.length === 2) { + this.getLayer(arguments[1]).addPoints(arguments[0]); + } else if (arguments.length === 1) { + this.mainLayer.addPoints(arguments[0]); + } else { + throw new Error("GPlot.addPoints(): signature not supported"); + } + + this.updateLimits(); +}; + +GPlot.prototype.removePoint = function() { + if (arguments.length === 2) { + this.getLayer(arguments[1]).removePoint(arguments[0]); + } else if (arguments.length === 1) { + this.mainLayer.removePoint(arguments[0]); + } else { + throw new Error("GPlot.removePoint(): signature not supported"); + } + + this.updateLimits(); +}; + +GPlot.prototype.addPointAtIndexPos = function() { + if (arguments.length === 5) { + this.getLayer(arguments[4]).addPointAtIndexPos(arguments[0], arguments[1], arguments[2], arguments[3]); + } else if (arguments.length === 4) { + this.mainLayer.addPointAtIndexPos(arguments[0], arguments[1], arguments[2], arguments[3]); + } else if (arguments.length === 3 && arguments[1] instanceof GPoint) { + this.getLayer(arguments[2]).addPointAtIndexPos(arguments[0], arguments[1]); + } else if (arguments.length === 3) { + this.mainLayer.addPointAtIndexPos(arguments[0], arguments[1], arguments[2]); + } else if (arguments.length === 2) { + this.mainLayer.addPointAtIndexPos(arguments[0], arguments[1]); + } else { + throw new Error("GPlot.addPointAtIndexPos(): signature not supported"); + } + + this.updateLimits(); +}; + +GPlot.prototype.setPointColors = function(pointColors) { + this.mainLayer.setPointColors(pointColors); +}; + +GPlot.prototype.setPointColor = function(pointColor) { + this.mainLayer.setPointColor(pointColor); +}; + +GPlot.prototype.setPointSizes = function(pointSizes) { + this.mainLayer.setPointSizes(pointSizes); +}; + +GPlot.prototype.setPointSize = function(pointSize) { + this.mainLayer.setPointSize(pointSize); +}; + +GPlot.prototype.setLineColor = function(lineColor) { + this.mainLayer.setLineColor(lineColor); +}; + +GPlot.prototype.setLineWidth = function(lineWidth) { + this.mainLayer.setLineWidth(lineWidth); +}; + +GPlot.prototype.setHistBasePoint = function(basePoint) { + this.mainLayer.setHistBasePoint(basePoint); +}; + +GPlot.prototype.setHistType = function(histType) { + this.mainLayer.setHistType(histType); +}; + +GPlot.prototype.setHistVisible = function(histVisible) { + this.mainLayer.setHistVisible(histVisible); +}; + +GPlot.prototype.setDrawHistLabels = function(drawHistLabels) { + this.mainLayer.setDrawHistLabels(drawHistLabels); +}; + +GPlot.prototype.setLabelBgColor = function(labelBgColor) { + this.mainLayer.setLabelBgColor(labelBgColor); +}; + +GPlot.prototype.setLabelSeparation = function(labelSeparation) { + this.mainLayer.setLabelSeparation(labelSeparation); +}; + +GPlot.prototype.setTitleText = function(text) { + this.title.setText(text); +}; + +GPlot.prototype.setAxesOffset = function(offset) { + this.xAxis.setOffset(offset); + this.topAxis.setOffset(offset); + this.yAxis.setOffset(offset); + this.rightAxis.setOffset(offset); +}; + +GPlot.prototype.setTicksLength = function(tickLength) { + this.xAxis.setTickLength(tickLength); + this.topAxis.setTickLength(tickLength); + this.yAxis.setTickLength(tickLength); + this.rightAxis.setTickLength(tickLength); +}; + +GPlot.prototype.setHorizontalAxesNTicks = function(nTicks) { + this.xAxis.setNTicks(nTicks); + this.topAxis.setNTicks(nTicks); +}; + +GPlot.prototype.setHorizontalAxesTicksSeparation = function(ticksSeparation) { + this.xAxis.setTicksSeparation(ticksSeparation); + this.topAxis.setTicksSeparation(ticksSeparation); +}; + +GPlot.prototype.setHorizontalAxesTicks = function(ticks) { + this.xAxis.setTicks(ticks); + this.topAxis.setTicks(ticks); +}; + +GPlot.prototype.setVerticalAxesNTicks = function(nTicks) { + this.yAxis.setNTicks(nTicks); + this.rightAxis.setNTicks(nTicks); +}; + +GPlot.prototype.setVerticalAxesTicksSeparation = function(ticksSeparation) { + this.yAxis.setTicksSeparation(ticksSeparation); + this.rightAxis.setTicksSeparation(ticksSeparation); +}; + +GPlot.prototype.setVerticalAxesTicks = function(ticks) { + this.yAxis.setTicks(ticks); + this.rightAxis.setTicks(ticks); +}; + +GPlot.prototype.setFontName = function(fontName) { + this.maniLayer.setFontName(fontName); +}; + +GPlot.prototype.setFontColor = function(fontColor) { + this.maniLayer.setFontColor(fontColor); +}; + +GPlot.prototype.setFontSize = function(fontSize) { + this.maniLayer.setFontSize(fontSize); +}; + +GPlot.prototype.setFontProperties = function(fontName, fontColor, fontSize) { + this.maniLayer.setFontProperties(fontName, fontColor, fontSize); +}; + +GPlot.prototype.setAllFontProperties = function(fontName, fontColor, fontSize) { + this.xAxis.setAllFontProperties(fontName, fontColor, fontSize); + this.topAxis.setAllFontProperties(fontName, fontColor, fontSize); + this.yAxis.setAllFontProperties(fontName, fontColor, fontSize); + this.rightAxis.setAllFontProperties(fontName, fontColor, fontSize); + this.title.setFontProperties(fontName, fontColor, fontSize); + + this.mainLayer.setAllFontProperties(fontName, fontColor, fontSize); + + for (var i = 0; i < layerList.length; i++) { + this.layerList[i].setAllFontProperties(fontName, fontColor, fontSize); + } +}; + +GPlot.prototype.getPos = function() { + return this.pos.slice(); +}; + +GPlot.prototype.getOuterDim = function() { + return this.outerDim.slice(); +}; + +GPlot.prototype.getMar = function() { + return this.mar.slice(); +}; + +GPlot.prototype.getDim = function() { + return this.dim.slice(); +}; + +GPlot.prototype.getXLim = function() { + return this.xLim.slice(); +}; + +GPlot.prototype.getYLim = function() { + return this.yLim.slice(); +}; + +GPlot.prototype.getFixedXLim = function() { + return this.fixedXLim; +}; + +GPlot.prototype.getFixedYLim = function() { + return this.fixedYLim; +}; + +GPlot.prototype.getXLog = function() { + return this.xLog; +}; + +GPlot.prototype.getYLog = function() { + return this.yLog; +}; + +GPlot.prototype.getInvertedXScale = function() { + return this.invertedXScale; +}; + +GPlot.prototype.getInvertedYScale = function() { + return this.invertedYScale; +}; + +GPlot.prototype.getMainLayer = function() { + return this.mainLayer; +}; + +GPlot.prototype.getLayer = function(id) { + var layer; + + if (this.mainLayer.isId(id)) { + layer = this.mainLayer; + } else { + for (var i = 0; i < this.layerList.length; i++) { + if (this.layerList[i].isId(id)) { + layer = this.layerList[i]; + break; + } + } + } + + if ( typeof layer === "undefined") { + console.log("Couldn't find a layer in the plot with id = " + id); + } + + return layer; +}; + +GPlot.prototype.getXAxis = function() { + return this.xAxis; +}; + +GPlot.prototype.getYAxis = function() { + return this.yAxis; +}; + +GPlot.prototype.getTopAxis = function() { + return this.topAxis; +}; + +GPlot.prototype.getRightAxis = function() { + return this.rightAxis; +}; + +GPlot.prototype.getTitle = function() { + return this.title; +}; + +GPlot.prototype.getPoints = function() { + if (arguments.length === 1) { + return this.getLayer(arguments[0]).getPoints(); + } else if (arguments.length === 0) { + return this.mainLayer.getPoints(); + } else { + throw new Error("GPlot.getPoints(): signature not supported"); + } +}; + +GPlot.prototype.getPointsRef = function() { + if (arguments.length === 1) { + return this.getLayer(arguments[0]).getPointsRef(); + } else if (arguments.length === 0) { + return this.mainLayer.getPointsRef(); + } else { + throw new Error("GPlot.getPointsRef(): signature not supported"); + } +}; + +GPlot.prototype.getHistogram = function() { + if (arguments.length === 1) { + return this.getLayer(arguments[0]).getHistogram(); + } else if (arguments.length === 0) { + return this.mainLayer.getHistogram(); + } else { + throw new Error("GPlot.getHistogram(): signature not supported"); + } +}; + +GPlot.prototype.activateZooming = function() { + var zoomFactor, increaseButton, decreaseButton, increaseKeyModifier, decreaseKeyModifier; + + if (arguments.length === 5) { + zoomFactor = arguments[0]; + increaseButton = arguments[1]; + decreaseButton = arguments[2]; + increaseKeyModifier = arguments[3]; + decreaseKeyModifier = arguments[4]; + } else if (arguments.length === 3) { + zoomFactor = arguments[0]; + increaseButton = arguments[1]; + decreaseButton = arguments[2]; + increaseKeyModifier = GPlot.NONE; + decreaseKeyModifier = GPlot.NONE; + } else if (arguments.length === 1) { + zoomFactor = arguments[0]; + increaseButton = this.parent.LEFT; + decreaseButton = this.parent.RIGHT; + increaseKeyModifier = GPlot.NONE; + decreaseKeyModifier = GPlot.NONE; + } else if (arguments.length === 0) { + zoomFactor = 1.3; + increaseButton = this.parent.LEFT; + decreaseButton = this.parent.RIGHT; + increaseKeyModifier = GPlot.NONE; + decreaseKeyModifier = GPlot.NONE; + } else { + throw new Error("GPlot.activateZooming(): signature not supported"); + } + + this.zoomingIsActive = true; + + if (zoomFactor > 0) { + this.zoomFactor = zoomFactor; + } + + if (increaseButton === this.parent.LEFT || increaseButton === this.parent.RIGHT || increaseButton === this.parent.CENTER) { + this.increaseZoomButton = increaseButton; + } + + if (decreaseButton === this.parent.LEFT || decreaseButton === this.parent.RIGHT || decreaseButton === this.parent.CENTER) { + this.decreaseZoomButton = decreaseButton; + } + + if (increaseKeyModifier === this.parent.SHIFT || increaseKeyModifier === this.parent.CONTROL || increaseKeyModifier === this.parent.ALT || increaseKeyModifier === GPlot.NONE) { + this.increaseZoomKeyModifier = increaseKeyModifier; + } + + if (decreaseKeyModifier === this.parent.SHIFT || decreaseKeyModifier === this.parent.CONTROL || decreaseKeyModifier === this.parent.ALT || decreaseKeyModifier === GPlot.NONE) { + this.decreaseZoomKeyModifier = decreaseKeyModifier; + } +}; + +GPlot.prototype.deactivateZooming = function() { + this.zoomingIsActive = false; +}; + +GPlot.prototype.activateCentering = function() { + var button, keyModifier; + + if (arguments.length === 2) { + button = arguments[0]; + keyModifier = arguments[1]; + } else if (arguments.length === 1) { + button = arguments[0]; + keyModifier = GPlot.NONE; + } else if (arguments.length === 0) { + button = this.parent.LEFT; + keyModifier = GPlot.NONE; + } else { + throw new Error("GPlot.activateCentering(): signature not supported"); + } + + this.centeringIsActive = true; + + if (button === this.parent.LEFT || button === this.parent.RIGHT || button === this.parent.CENTER) { + this.centeringButton = button; + } + + if (keyModifier === this.parent.SHIFT || keyModifier === this.parent.CONTROL || keyModifier === this.parent.ALT || keyModifier === GPlot.NONE) { + this.centeringKeyModifier = keyModifier; + } +}; + +GPlot.prototype.deactivateCentering = function() { + this.centeringIsActive = false; +}; + +GPlot.prototype.activatePanning = function() { + var button, keyModifier; + + if (arguments.length === 2) { + button = arguments[0]; + keyModifier = arguments[1]; + } else if (arguments.length === 1) { + button = arguments[0]; + keyModifier = GPlot.NONE; + } else if (arguments.length === 0) { + button = this.parent.LEFT; + keyModifier = GPlot.NONE; + } else { + throw new Error("GPlot.activatePanning(): signature not supported"); + } + + this.panningIsActive = true; + + if (button === this.parent.LEFT || button === this.parent.RIGHT || button === this.parent.CENTER) { + this.panningButton = button; + } + + if (keyModifier === this.parent.SHIFT || keyModifier === this.parent.CONTROL || keyModifier === this.parent.ALT || keyModifier === GPlot.NONE) { + this.panningKeyModifier = keyModifier; + } +}; + +GPlot.prototype.deactivatePanning = function() { + this.panningIsActive = false; + this.panningReferencePoint = undefined; +}; + +GPlot.prototype.activatePointLabels = function() { + var button, keyModifier; + + if (arguments.length === 2) { + button = arguments[0]; + keyModifier = arguments[1]; + } else if (arguments.length === 1) { + button = arguments[0]; + keyModifier = GPlot.NONE; + } else if (arguments.length === 0) { + button = this.parent.LEFT; + keyModifier = GPlot.NONE; + } else { + throw new Error("GPlot.activatePointLabels(): signature not supported"); + } + + this.labelingIsActive = true; + + if (button === this.parent.LEFT || button === this.parent.RIGHT || button === this.parent.CENTER) { + this.labelingButton = button; + } + + if (keyModifier === this.parent.SHIFT || keyModifier === this.parent.CONTROL || keyModifier === this.parent.ALT || keyModifier === GPlot.NONE) { + this.labelingKeyModifier = keyModifier; + } +}; + +GPlot.prototype.deactivatePointLabels = function() { + this.labelingIsActive = false; + this.mousePos = undefined; +}; + +GPlot.prototype.activateReset = function() { + var button, keyModifier; + + if (arguments.length === 2) { + button = arguments[0]; + keyModifier = arguments[1]; + } else if (arguments.length === 1) { + button = arguments[0]; + keyModifier = GPlot.NONE; + } else if (arguments.length === 0) { + button = this.parent.RIGHT; + keyModifier = GPlot.NONE; + } else { + throw new Error("GPlot.activateReset(): signature not supported"); + } + + this.resetIsActive = true; + this.xLimReset = undefined; + this.yLimReset = undefined; + + if (button === this.parent.LEFT || button === this.parent.RIGHT || button === this.parent.CENTER) { + this.resetButton = button; + } + + if (keyModifier === this.parent.SHIFT || keyModifier === this.parent.CONTROL || keyModifier === this.parent.ALT || keyModifier === GPlot.NONE) { + this.resetKeyModifier = keyModifier; + } +}; + +GPlot.prototype.deactivateReset = function() { + this.resetIsActive = false; + this.xLimReset = undefined; + this.yLimReset = undefined; +}; + +GPlot.prototype.getButton = function(event) { + var button; + + if (event.button === 0) { + button = this.parent.LEFT; + } else if (event.button === 1) { + button = this.parent.CENTER; + } else if (event.button === 2) { + button = this.parent.RIGHT; + } else if ( typeof event.button === "undefined") { + button = this.parent.LEFT; + } + + return button; +}; + +GPlot.prototype.getModifier = function(event) { + var modifier; + + if (event.altKey) { + modifier = this.parent.ALT; + } else if (event.ctrlKey) { + modifier = this.parent.CONTROL; + } else if (event.shiftKey) { + modifier = this.parent.SHIFT; + } else { + modifier = GPlot.NONE; + } + + return modifier; +}; + +GPlot.prototype.saveResetLimits = function() { + if ( typeof this.xLimReset === "undefined" || typeof this.yLimReset === "undefined") { + this.xLimReset = this.xLim.slice(); + this.yLimReset = this.yLim.slice(); + } +}; + +GPlot.prototype.panningFunction = function() { + if ( typeof this.panningReferencePoint !== "undefined") { + this.align(this.panningReferencePoint, this.parent.mouseX, this.parent.mouseY); + } +}; + +GPlot.prototype.clickEvent = function(event) { + e = event || window.event; + + if (this.isOverBox()) { + var button = this.getButton(e); + var modifier = this.getModifier(e); + + if (this.zoomingIsActive) { + if (button === this.increaseZoomButton && modifier === this.increaseZoomKeyModifier) { + // Save the axes limits + if (this.resetIsActive) { + this.saveResetLimits(); + } + + this.zoom(this.zoomFactor, this.parent.mouseX, this.parent.mouseY); + } else if (button === this.decreaseZoomButton && modifier === this.decreaseZoomKeyModifier) { + // Save the axes limits + if (this.resetIsActive) { + this.saveResetLimits(); + } + + this.zoom(1 / this.zoomFactor, this.parent.mouseX, this.parent.mouseY); + } + } + + if (this.centeringIsActive && button === this.centeringButton && modifier === this.centeringKeyModifier) { + // Save the axes limits + if (this.resetIsActive) { + this.saveResetLimits(); + } + + this.center(this.parent.mouseX, this.parent.mouseY); + } + + if (this.resetIsActive && button === this.resetButton && modifier === this.resetKeyModifier) { + if ( typeof this.xLimReset !== "undefined" && typeof this.yLimReset !== "undefined") { + this.setXLim(this.xLimReset); + this.setYLim(this.yLimReset); + this.xLimReset = undefined; + this.yLimReset = undefined; + } + } + } +}; + +GPlot.prototype.mouseDownEvent = function(event) { + e = event || window.event; + + if (this.isOverBox()) { + var button = this.getButton(e); + var modifier = this.getModifier(e); + + if (this.panningIsActive && button === this.panningButton && modifier === this.panningKeyModifier) { + // Save the axes limits + if (this.resetIsActive) { + this.saveResetLimits(); + } + + // Calculate the panning reference point + this.panningReferencePoint = this.getValueAt(this.parent.mouseX, this.parent.mouseY); + + // Execute the panning function every 100ms + this.panningIntervalId = setInterval(this.panningFunction.bind(this), 100); + } + + if (this.labelingIsActive && button === this.labelingButton && modifier === this.labelingKeyModifier) { + this.mousePos = [this.parent.mouseX, this.parent.mouseY]; + } + } +}; + +GPlot.prototype.mouseUpEvent = function(event) { + e = event || window.event; + var button = this.getButton(e); + var modifier = this.getModifier(e); + + if (this.panningIsActive && button === this.panningButton && typeof this.panningIntervalId !== "undefined") { + // Stop executing the panning function + clearInterval(this.panningIntervalId); + + // Reset the panning variables + this.panningIntervalId = undefined; + this.panningReferencePoint = undefined; + } + + if (this.labelingIsActive && button === this.labelingButton) { + this.mousePos = undefined; + } + + if (button === this.parent.RIGHT) { + // This is a right click! + this.clickEvent(e); + } +}; + +GPlot.prototype.wheelEvent = function(event) { + e = event || window.event; + + if (this.isOverBox()) { + var deltaY = e.deltaY; + var button = this.parent.CENTER; + var modifier = this.getModifier(e); + + if (this.zoomingIsActive) { + if (button === this.increaseZoomButton && modifier === this.increaseZoomKeyModifier && deltaY > 0) { + // Save the axes limits + if (this.resetIsActive) { + this.saveResetLimits(); + } + + this.zoom(this.zoomFactor, this.parent.mouseX, this.parent.mouseY); + } else if (button === this.decreaseZoomButton && modifier === this.decreaseZoomKeyModifier && deltaY < 0) { + // Save the axes limits + if (this.resetIsActive) { + this.saveResetLimits(); + } + + this.zoom(1 / this.zoomFactor, this.parent.mouseX, this.parent.mouseY); + } + } + } +}; + +GPlot.prototype.preventDefaultEvent = function(event) { + e = event || window.event; + + if (this.isOverBox()) { + // Don't show the menu inside the plot area + if (e.preventDefault) { + e.preventDefault(); + } else { + e.returnValue = false; + } + } +}; + +GPlot.prototype.preventWheelDefault = function() { + window.addEventListener("wheel", this.preventDefaultEvent.bind(this), false); +}; + +GPlot.prototype.preventRightClickDefault = function() { + window.addEventListener("contextmenu", this.preventDefaultEvent.bind(this), false); +}; diff --git a/docs/_site/graficos/grafica-0.1.0-mod.min.js b/docs/_site/graficos/grafica-0.1.0-mod.min.js new file mode 100644 index 0000000..192dbac --- /dev/null +++ b/docs/_site/graficos/grafica-0.1.0-mod.min.js @@ -0,0 +1,5 @@ +/*! grafica.js (0.1.0): a library for p5.js. Author: Javier Graciá Carpio, license: LGPL-3.0, 2015-04-12 */ function GPoint(){var a,b,c;if(3===arguments.length)a=arguments[0],b=arguments[1],c=arguments[2];else if(2===arguments.length&&arguments[0]instanceof p5.Vector)a=arguments[0].x,b=arguments[0].y,c=arguments[1];else if(2===arguments.length)a=arguments[0],b=arguments[1],c="";else if(1===arguments.length&&arguments[0]instanceof GPoint)a=arguments[0].getX(),b=arguments[0].getY(),c=arguments[0].getLabel();else if(1===arguments.length&&arguments[0]instanceof p5.Vector)a=arguments[0].x,b=arguments[0].y,c="";else{if(0!==arguments.length)throw new Error("GPoint constructor: signature not supported");a=0,b=0,c=""}this.x=a,this.y=b,this.label=c,this.valid=this.isValidNumber(this.x)&&this.isValidNumber(this.y)}function GTitle(a,b){this.parent=a,this.dim=b.slice(),this.relativePos=.5,this.plotPos=this.relativePos*this.dim[0],this.offset=10,this.text="",this.textAlignment=this.parent.CENTER,this.fontName="Helvetica",this.fontColor=this.parent.color(100),this.fontStyle=this.parent.BOLD,this.fontSize=13}function GAxisLabel(a,b,c){this.parent=a,this.type=b===this.parent.BOTTOM||b===this.parent.TOP||b===this.parent.LEFT||b===this.parent.RIGHT?b:this.parent.BOTTOM,this.dim=c.slice(),this.relativePos=.5,this.plotPos=this.type===this.parent.BOTTOM||this.type===this.parent.TOP?this.relativePos*this.dim[0]:-this.relativePos*this.dim[1],this.offset=35,this.rotate=this.type===this.parent.BOTTOM||this.type===this.parent.TOP?!1:!0,this.text="",this.textAlignment=this.parent.CENTER,this.fontName="Helvetica",this.fontColor=this.parent.color(0),this.fontSize=13}function GAxis(a,b,c,d,e){this.parent=a,this.type=b===this.parent.BOTTOM||b===this.parent.TOP||b===this.parent.LEFT||b===this.parent.RIGHT?b:this.parent.BOTTOM,this.dim=c.slice(),this.lim=d.slice(),this.log=e,this.log&&(this.lim[0]<=0||this.lim[1]<=0)&&(console.log("The limits are negative. This is not allowed in logarithmic scale."),console.log("Will set them to (0.1, 10)"),this.lim[1]>this.lim[0]?(this.lim[0]=.1,this.lim[1]=10):(this.lim[0]=10,this.lim[1]=.1)),this.offset=5,this.lineColor=this.parent.color(0),this.lineWidth=1,this.nTicks=5,this.ticksSeparation=-1,this.ticks=[],this.plotTicks=[],this.ticksInside=[],this.tickLabels=[],this.fixedTicks=!1,this.tickLength=3,this.smallTickLength=2,this.expTickLabels=!1,this.rotateTickLabels=this.type===this.parent.BOTTOM||this.type===this.parent.TOP?!1:!0,this.drawTickLabels=this.type===this.parent.BOTTOM||this.type===this.parent.LEFT?!0:!1,this.tickLabelOffset=7,this.ticksPrecision=void 0,this.lab=new GAxisLabel(this.parent,this.type,this.dim),this.drawAxisLabel=!0,this.fontName="Helvetica",this.fontColor=this.parent.color(0),this.fontSize=11,this.updateTicks(),this.updatePlotTicks(),this.updateTicksInside(),this.updateTickLabels()}function GHistogram(a,b,c,d){this.parent=a,this.type=b===GPlot.VERTICAL||b===GPlot.HORIZONTAL?b:GPlot.VERTICAL,this.dim=c.slice(),this.plotPoints=[];for(var e=0;e0&&b>0&&(this.dim[0]=a,this.dim[1]=b,this.plotPos=this.relativePos*this.dim[0])},GTitle.prototype.setRelativePos=function(a){this.relativePos=a,this.plotPos=this.relativePos*this.dim[0]},GTitle.prototype.setOffset=function(a){this.offset=a},GTitle.prototype.setText=function(a){this.text=a},GTitle.prototype.setTextAlignment=function(a){(a===this.parent.CENTER||a===this.parent.LEFT||a===this.parent.RIGHT)&&(this.textAlignment=a)},GTitle.prototype.setFontName=function(a){this.fontName=a},GTitle.prototype.setFontColor=function(a){this.fontColor=a},GTitle.prototype.setFontStyle=function(a){this.fontStyle=a},GTitle.prototype.setFontSize=function(a){a>0&&(this.fontSize=a)},GTitle.prototype.setFontProperties=function(a,b,c){c>0&&(this.fontName=a,this.fontColor=b,this.fontSize=c)},GAxisLabel.prototype.draw=function(){switch(this.type){case this.parent.BOTTOM:this.drawAsXLabel();break;case this.parent.LEFT:this.drawAsYLabel();break;case this.parent.TOP:this.drawAsTopLabel();break;case this.parent.RIGHT:this.drawAsRightLabel()}},GAxisLabel.prototype.drawAsXLabel=function(){this.parent.push(),this.parent.textFont(this.fontName),this.parent.textSize(this.fontSize),this.parent.fill(this.fontColor),this.parent.noStroke(),this.rotate?(this.parent.textAlign(this.parent.RIGHT,this.parent.CENTER),this.parent.translate(this.plotPos,this.offset),this.parent.rotate(-.5*Math.PI),this.parent.text(this.text,0,0)):(this.parent.textAlign(this.textAlignment,this.parent.TOP),this.parent.text(this.text,this.plotPos,this.offset)),this.parent.pop()},GAxisLabel.prototype.drawAsYLabel=function(){this.parent.push(),this.parent.textFont(this.fontName),this.parent.textSize(this.fontSize),this.parent.fill(this.fontColor),this.parent.noStroke(),this.rotate?(this.parent.textAlign(this.textAlignment,this.parent.BOTTOM),this.parent.translate(-this.offset,this.plotPos),this.parent.rotate(-.5*Math.PI),this.parent.text(this.text,0,0)):(this.parent.textAlign(this.parent.RIGHT,this.parent.CENTER),this.parent.text(this.text,-this.offset,this.plotPos)),this.parent.pop()},GAxisLabel.prototype.drawAsTopLabel=function(){this.parent.push(),this.parent.textFont(this.fontName),this.parent.textSize(this.fontSize),this.parent.fill(this.fontColor),this.parent.noStroke(),this.rotate?(this.parent.textAlign(this.parent.LEFT,this.parent.CENTER),this.parent.translate(this.plotPos,-this.offset-this.dim[1]),this.parent.rotate(-.5*Math.PI),this.parent.text(this.text,0,0)):(this.parent.textAlign(this.textAlignment,this.parent.BOTTOM),this.parent.text(this.text,this.plotPos,-this.offset-this.dim[1])),this.parent.pop()},GAxisLabel.prototype.drawAsRightLabel=function(){this.parent.push(),this.parent.textFont(this.fontName),this.parent.textSize(this.fontSize),this.parent.fill(this.fontColor),this.parent.noStroke(),this.rotate?(this.parent.textAlign(this.textAlignment,this.parent.TOP),this.parent.translate(this.offset+this.dim[0],this.plotPos),this.parent.rotate(-.5*Math.PI),this.parent.text(this.text,0,0)):(this.parent.textAlign(this.parent.LEFT,this.parent.CENTER),this.parent.text(this.text,this.offset+this.dim[0],this.plotPos)),this.parent.pop()},GAxisLabel.prototype.setDim=function(){var a,b;if(2===arguments.length)a=arguments[0],b=arguments[1];else{if(1!==arguments.length)throw new Error("GAxisLabel.setDim(): signature not supported");a=arguments[0][0],b=arguments[0][1]}a>0&&b>0&&(this.dim[0]=a,this.dim[1]=b,this.plotPos=this.type===this.parent.BOTTOM||this.type===this.parent.TOP?this.relativePos*this.dim[0]:-this.relativePos*this.dim[1])},GAxisLabel.prototype.setRelativePos=function(a){this.relativePos=a,this.plotPos=this.type===this.parent.BOTTOM||this.type===this.parent.TOP?this.relativePos*this.dim[0]:-this.relativePos*this.dim[1]},GAxisLabel.prototype.setOffset=function(a){this.offset=a},GAxisLabel.prototype.setRotate=function(a){this.rotate=a},GAxisLabel.prototype.setText=function(a){this.text=a},GAxisLabel.prototype.setTextAlignment=function(a){(a===this.parent.CENTER||a===this.parent.LEFT||a===this.parent.RIGHT)&&(this.textAlignment=a)},GAxisLabel.prototype.setFontName=function(a){this.fontName=a},GAxisLabel.prototype.setFontColor=function(a){this.fontColor=a},GAxisLabel.prototype.setFontSize=function(a){a>0&&(this.fontSize=a)},GAxisLabel.prototype.setFontProperties=function(a,b,c){c>0&&(this.fontName=a,this.fontColor=b,this.fontSize=c)},GAxis.prototype.obtainSigDigits=function(a){return Math.round(-Math.log(.5*Math.abs(a))/Math.LN10)},GAxis.prototype.roundPlus=function(a,b){return a=Math.round(a*Math.pow(10,b))/Math.pow(10,b),0>=b&&(a=Math.round(a)),a},GAxis.prototype.adaptSize=function(a,b){bthis.lim[0]?(a=Math.floor(Math.log(this.lim[0])/Math.LN10),b=Math.ceil(Math.log(this.lim[1])/Math.LN10)):(a=Math.floor(Math.log(this.lim[1])/Math.LN10),b=Math.ceil(Math.log(this.lim[0])/Math.LN10));var c=9*(b-a)+1;this.adaptSize(this.ticks,c);for(var d=a;b>d;d++)for(var e=this.roundPlus(Math.exp(d*Math.LN10),-d),f=0;9>f;f++)this.ticks[9*(d-a)+f]=(f+1)*e;this.ticks[this.ticks.length-1]=this.roundPlus(Math.exp(b*Math.LN10),-d),this.lim[1]0){for(a=this.lim[1]>this.lim[0]?this.ticksSeparation:-this.ticksSeparation,c=this.obtainSigDigits(a);this.roundPlus(a,c)-a!==0;)c++;b=Math.floor((this.lim[1]-this.lim[0])/a)}else this.nTicks>0&&(a=(this.lim[1]-this.lim[0])/this.nTicks,c=this.obtainSigDigits(a),a=this.roundPlus(a,c),(0===a||Math.abs(a)>Math.abs(this.lim[1]-this.lim[0]))&&(c++,a=this.roundPlus((this.lim[1]-this.lim[0])/this.nTicks,c)),b=Math.floor((this.lim[1]-this.lim[0])/a));if(b>0){var d=this.lim[0]+(this.lim[1]-this.lim[0]-b*a)/2;for(d=this.roundPlus(d-2*a,c);(this.lim[1]-d)*(this.lim[0]-d)>0;)d=this.roundPlus(d+a,c);var e=Math.floor(Math.abs((this.lim[1]-d)/a))+1;this.adaptSize(this.ticks,e),this.ticks[0]=d;for(var f=1;e>f;f++)this.ticks[f]=this.roundPlus(this.ticks[f-1]+a,c);this.ticksPrecision=c}else this.ticks=[]},GAxis.prototype.updatePlotTicks=function(){var a,b,c=this.ticks.length;if(this.adaptSize(this.plotTicks,c),this.log)for(a=this.type===this.parent.BOTTOM||this.type===this.parent.TOP?this.dim[0]/Math.log(this.lim[1]/this.lim[0]):-this.dim[1]/Math.log(this.lim[1]/this.lim[0]),b=0;c>b;b++)this.plotTicks[b]=Math.log(this.ticks[b]/this.lim[0])*a;else for(a=this.type===this.parent.BOTTOM||this.type===this.parent.TOP?this.dim[0]/(this.lim[1]-this.lim[0]):-this.dim[1]/(this.lim[1]-this.lim[0]),b=0;c>b;b++)this.plotTicks[b]=(this.ticks[b]-this.lim[0])*a},GAxis.prototype.updateTicksInside=function(){var a,b=this.ticks.length;if(this.adaptSize(this.ticksInside,b),this.type===this.parent.BOTTOM||this.type===this.parent.TOP)for(a=0;b>a;a++)this.ticksInside[a]=this.plotTicks[a]>=0&&this.plotTicks[a]<=this.dim[0];else for(a=0;b>a;a++)this.ticksInside[a]=-this.plotTicks[a]>=0&&-this.plotTicks[a]<=this.dim[1]},GAxis.prototype.updateTickLabels=function(){var a,b,c,d,e=this.ticks.length;if(this.adaptSize(this.tickLabels,e),this.log)for(d=0;e>d;d++)a=this.ticks[d],a>0?(b=Math.log(a)/Math.LN10,c=Math.abs(b-Math.round(b))<1e-4,c?(b=Math.round(b),this.tickLabels[d]=this.expTickLabels?"1e"+b:b>-3.1&&3.1>b?b>=0?""+Math.round(a):""+a:"1e"+b):this.tickLabels[d]=""):this.tickLabels[d]="";else for(d=0;e>d;d++)a=this.ticks[d],this.tickLabels[d]=a%1===0?""+Math.round(a):"undefined"!=typeof this.ticksPrecision&&this.ticksPrecision>=0?""+parseFloat(a).toFixed(this.ticksPrecision):""+a},GAxis.prototype.moveLim=function(a){if(a[1]!==a[0])if(this.log&&(a[0]<=0||a[1]<=0))console.log("The limits are negative. This is not allowed in logarithmic scale.");else{if(this.lim[0]=a[0],this.lim[1]=a[1],!this.fixedTicks){var b=this.ticks.length;if(this.log)this.obtainLogarithmicTicks();else if(b>0){var c=0,d=0;if(this.ticksSeparation>0)for(c=this.lim[1]>this.lim[0]?this.ticksSeparation:-this.ticksSeparation,d=this.obtainSigDigits(c);this.roundPlus(c,d)-c!==0;)d++;else c=1===b?this.lim[1]-this.lim[0]:this.ticks[1]-this.ticks[0],d=this.obtainSigDigits(c),c=this.roundPlus(c,d),(0===c||Math.abs(c)>Math.abs(this.lim[1]-this.lim[0]))&&(d++,c=1===b?this.lim[1]-this.lim[0]:this.ticks[1]-this.ticks[0],c=this.roundPlus(c,d)),c=this.lim[1]>this.lim[0]?Math.abs(c):-Math.abs(c);var e=this.ticks[0]+c*Math.ceil((this.lim[0]-this.ticks[0])/c);e=this.roundPlus(e,d),(this.lim[1]-e)*(this.lim[0]-e)>0&&(e=this.ticks[0]+c*Math.floor((this.lim[0]-this.ticks[0])/c),e=this.roundPlus(e,d)),b=Math.floor(Math.abs((this.lim[1]-e)/c))+1,this.adaptSize(this.ticks,b),this.ticks[0]=e;for(var f=1;b>f;f++)this.ticks[f]=this.roundPlus(this.ticks[f-1]+c,d);this.ticksPrecision!==d&&console.log("There is a problem in the axis ticks precision calculation")}this.updateTickLabels()}this.updatePlotTicks(),this.updateTicksInside()}},GAxis.prototype.draw=function(){switch(this.type){case this.parent.BOTTOM:this.drawAsXAxis();break;case this.parent.LEFT:this.drawAsYAxis();break;case this.parent.TOP:this.drawAsTopAxis();break;case this.parent.RIGHT:this.drawAsRightAxis()}this.drawAxisLabel&&this.lab.draw()},GAxis.prototype.drawAsXAxis=function(){var a;for(this.parent.push(),this.parent.stroke(this.lineColor),this.parent.strokeWeight(this.lineWidth),this.parent.strokeCap(this.parent.SQUARE),this.parent.line(0,this.offset,this.dim[0],this.offset),a=0;a0&&b>0&&(this.dim[0]=a,this.dim[1]=b,this.updatePlotTicks(),this.lab.setDim(this.dim))},GAxis.prototype.setLim=function(a){a[1]!==a[0]&&(this.log&&(a[0]<=0||a[1]<=0)?console.log("One of the limits is negative. This is not allowed in logarithmic scale."):(this.lim[0]=a[0],this.lim[1]=a[1],this.fixedTicks||(this.updateTicks(),this.updateTickLabels()),this.updatePlotTicks(),this.updateTicksInside()))},GAxis.prototype.setLimAndLog=function(a,b){a[1]!==a[0]&&(b&&(a[0]<=0||a[1]<=0)?console.log("One of the limits is negative. This is not allowed in logarithmic scale."):(this.lim[0]=a[0],this.lim[1]=a[1],this.log=b,this.fixedTicks||(this.updateTicks(),this.updateTickLabels()),this.updatePlotTicks(),this.updateTicksInside()))},GAxis.prototype.setLog=function(a){a!==this.log&&(this.log=a,this.log&&(this.lim[0]<=0||this.lim[1]<=0)&&(console.log("The limits are negative. This is not allowed in logarithmic scale."),console.log("Will set them to (0.1, 10)"),this.lim[1]>this.lim[0]?(this.lim[0]=.1,this.lim[1]=10):(this.lim[0]=10,this.lim[1]=.1)),this.fixedTicks||(this.updateTicks(),this.updateTickLabels()),this.updatePlotTicks(),this.updateTicksInside())},GAxis.prototype.setOffset=function(a){this.offset=a},GAxis.prototype.setLineColor=function(a){this.lineColor=a},GAxis.prototype.setLineWidth=function(a){a>0&&(this.lineWidth=a)},GAxis.prototype.setNTicks=function(a){a>=0&&(this.nTicks=a,this.ticksSeparation=-1,this.log||(this.fixedTicks=!1,this.updateTicks(),this.updatePlotTicks(),this.updateTicksInside(),this.updateTickLabels()))},GAxis.prototype.setTicksSeparation=function(a){this.ticksSeparation=a,this.log||(this.fixedTicks=!1,this.updateTicks(),this.updatePlotTicks(),this.updateTicksInside(),this.updateTickLabels())},GAxis.prototype.setTicks=function(a){var b=a.length;this.adaptSize(this.ticks,b);for(var c=0;b>c;c++)this.ticks[c]=a[c];this.fixedTicks=!0,this.ticksPrecision=void 0,this.updatePlotTicks(),this.updateTicksInside(),this.updateTickLabels()},GAxis.prototype.setTickLabels=function(a){if(a.length===this.tickLabels.length){for(var b=0;b0&&(this.fontSize=a)},GAxis.prototype.setFontProperties=function(a,b,c){c>0&&(this.fontName=a,this.fontColor=b,this.fontSize=c)},GAxis.prototype.setAllFontProperties=function(a,b,c){this.setFontProperties(a,b,c),this.lab.setFontProperties(a,b,c)},GAxis.prototype.getTicks=function(){if(this.fixedTicks)return this.ticks.slice();for(var a=[],b=0,c=0;cb&&(this.differences.splice(b,Number.MAX_VALUE),this.leftSides.splice(b,Number.MAX_VALUE),this.rightSides.splice(b,Number.MAX_VALUE)),1===b)this.leftSides[0]=this.type===GPlot.VERTICAL?.2*this.dim[0]:.2*this.dim[1],this.rightSides[0]=this.leftSides[0];else if(b>1){for(a=0;b-1>a;a++)if(this.plotPoints[a].isValid()&&this.plotPoints[a+1].isValid()){var c,d=this.separations[a%this.separations.length];c=this.type===GPlot.VERTICAL?this.plotPoints[a+1].getX()-this.plotPoints[a].getX():this.plotPoints[a+1].getY()-this.plotPoints[a].getY(),this.differences[a]=c>0?(c-d)/2:(c+d)/2}else this.differences[a]=0;for(this.leftSides[0]=this.differences[0],this.rightSides[0]=this.differences[0],a=1;b-1>a;a++)this.leftSides[a]=this.differences[a-1],this.rightSides[a]=this.differences[a];this.leftSides[b-1]=this.differences[b-2],this.rightSides[b-1]=this.differences[b-2]}},GHistogram.prototype.draw=function(a){if(this.visible){var b=0;a.isValid()&&(b=this.type===GPlot.VERTICAL?a.getY():a.getX());var c,d,e,f,g,h,i=this.plotPoints.length;this.parent.push(),this.parent.rectMode(this.parent.CORNERS),this.parent.strokeCap(this.parent.SQUARE);for(var j=0;i>j;j++)c=this.plotPoints[j],c.isValid()&&(this.type===GPlot.VERTICAL?(d=c.getX()-this.leftSides[j],e=c.getX()+this.rightSides[j],f=c.getY(),g=b):(d=b,e=c.getX(),f=c.getY()-this.leftSides[j],g=c.getY()+this.rightSides[j]),0>d?d=0:d>this.dim[0]&&(d=this.dim[0]),0>-f?f=0:-f>this.dim[1]&&(f=-this.dim[1]),0>e?e=0:e>this.dim[0]&&(e=this.dim[0]),0>-g?g=0:-g>this.dim[1]&&(g=-this.dim[1]),h=this.lineWidths[j%this.lineWidths.length],this.parent.fill(this.bgColors[j%this.bgColors.length]),this.parent.stroke(this.lineColors[j%this.lineColors.length]),this.parent.strokeWeight(h),Math.abs(e-d)>2*h&&Math.abs(g-f)>2*h?this.parent.rect(d,f,e,g):(this.type===GPlot.VERTICAL&&e!==d&&(f!==g||0!==f&&f!==-this.dim[1])||this.type===GPlot.HORIZONTAL&&g!==f&&(d!==e||0!==d&&d!==this.dim[0]))&&(this.parent.rect(d,f,e,g),this.parent.line(d,f,d,g),this.parent.line(e,f,e,g),this.parent.line(d,f,e,f),this.parent.line(d,g,e,g)));this.parent.pop(),this.drawLabels&&this.drawHistLabels()}},GHistogram.prototype.drawHistLabels=function(){var a,b,c=this.plotPoints.length,d=.5*Math.PI;if(this.parent.push(),this.parent.textFont(this.fontName),this.parent.textSize(this.fontSize),this.parent.fill(this.fontColor),this.parent.noStroke(),this.type===GPlot.VERTICAL)if(this.rotateLabels)for(this.parent.textAlign(this.parent.RIGHT,this.parent.CENTER),b=0;c>b;b++)a=this.plotPoints[b],a.isValid()&&a.getX()>=0&&a.getX()<=this.dim[0]&&(this.parent.push(),this.parent.translate(a.getX(),this.labelsOffset),this.parent.rotate(-d),this.parent.text(a.getLabel(),0,0),this.parent.pop());else for(this.parent.textAlign(this.parent.CENTER,this.parent.TOP),b=0;c>b;b++)a=this.plotPoints[b],a.isValid()&&a.getX()>=0&&a.getX()<=this.dim[0]&&this.parent.text(a.getLabel(),a.getX(),this.labelsOffset);else if(this.rotateLabels)for(this.parent.textAlign(this.parent.CENTER,this.parent.BOTTOM),b=0;c>b;b++)a=this.plotPoints[b],a.isValid()&&-a.getY()>=0&&-a.getY()<=this.dim[1]&&(this.parent.push(),this.parent.translate(-this.labelsOffset,a.getY()),this.parent.rotate(-d),this.parent.text(a.getLabel(),0,0),this.parent.pop());else for(this.parent.textAlign(this.parent.RIGHT,this.parent.CENTER),b=0;c>b;b++)a=this.plotPoints[b],a.isValid()&&-a.getY()>=0&&-a.getY()<=this.dim[1]&&this.parent.text(a.getLabel(),-this.labelsOffset,a.getY());this.parent.pop()},GHistogram.prototype.setType=function(a){a===this.type||a!==GPlot.VERTICAL&&a!==GPlot.HORIZONTAL||(this.type=a,this.updateArrays())},GHistogram.prototype.setDim=function(){var a,b;if(2===arguments.length)a=arguments[0],b=arguments[1];else{if(1!==arguments.length)throw new Error("GHistogram.setDim(): signature not supported"); + +a=arguments[0][0],b=arguments[0][1]}a>0&&b>0&&(this.dim[0]=a,this.dim[1]=b,this.updateArrays())},GHistogram.prototype.setPlotPoints=function(a){var b,c=a.length;if(this.plotPoints.length===c)for(b=0;c>b;b++)this.plotPoints[b].set(a[b]);else if(this.plotPoints.length>c){for(b=0;c>b;b++)this.plotPoints[b].set(a[b]);this.plotPoints.splice(c,Number.MAX_VALUE)}else{for(b=0;bb;b++)this.plotPoints[b]=new GPoint(a[b])}this.updateArrays()},GHistogram.prototype.setPlotPoint=function(a,b){if(a0&&(this.fontSize=a)},GHistogram.prototype.setFontProperties=function(a,b,c){c>0&&(this.fontName=a,this.fontColor=b,this.fontSize=c)},GLayer.prototype.isValidNumber=function(a){return!isNaN(a)&&isFinite(a)},GLayer.prototype.isId=function(a){return this.id===a},GLayer.prototype.valueToXPlot=function(a){return this.xLog?this.dim[0]*Math.log(a/this.xLim[0])/Math.log(this.xLim[1]/this.xLim[0]):this.dim[0]*(a-this.xLim[0])/(this.xLim[1]-this.xLim[0])},GLayer.prototype.valueToYPlot=function(a){return this.yLog?-this.dim[1]*Math.log(a/this.yLim[0])/Math.log(this.yLim[1]/this.yLim[0]):-this.dim[1]*(a-this.yLim[0])/(this.yLim[1]-this.yLim[0])},GLayer.prototype.valueToPlot=function(){if(2===arguments.length)return[this.valueToXPlot(arguments[0]),this.valueToYPlot(arguments[1])];if(1===arguments.length&&arguments[0]instanceof GPoint)return new GPoint(this.valueToXPlot(arguments[0].getX()),this.valueToYPlot(arguments[0].getY()),arguments[0].getLabel());if(1===arguments.length&&arguments[0]instanceof Array&&arguments[0][0]instanceof GPoint){var a,b,c,d,e,f,g=arguments[0].length,h=[];if(this.xLog&&this.yLog)for(a=this.dim[0]/Math.log(this.xLim[1]/this.xLim[0]),b=-this.dim[1]/Math.log(this.yLim[1]/this.yLim[0]),f=0;g>f;f++)c=arguments[0][f],d=Math.log(c.getX()/this.xLim[0])*a,e=Math.log(c.getY()/this.yLim[0])*b,h[f]=new GPoint(d,e,c.getLabel());else if(this.xLog)for(a=this.dim[0]/Math.log(this.xLim[1]/this.xLim[0]),b=-this.dim[1]/(this.yLim[1]-this.yLim[0]),f=0;g>f;f++)c=arguments[0][f],d=Math.log(c.getX()/this.xLim[0])*a,e=(c.getY()-this.yLim[0])*b,h[f]=new GPoint(d,e,c.getLabel());else if(this.yLog)for(a=this.dim[0]/(this.xLim[1]-this.xLim[0]),b=-this.dim[1]/Math.log(this.yLim[1]/this.yLim[0]),f=0;g>f;f++)c=arguments[0][f],d=(c.getX()-this.xLim[0])*a,e=Math.log(c.getY()/this.yLim[0])*b,h[f]=new GPoint(d,e,c.getLabel());else for(a=this.dim[0]/(this.xLim[1]-this.xLim[0]),b=-this.dim[1]/(this.yLim[1]-this.yLim[0]),f=0;g>f;f++)c=arguments[0][f],d=(c.getX()-this.xLim[0])*a,e=(c.getY()-this.yLim[0])*b,h[f]=new GPoint(d,e,c.getLabel());return h}throw new Error("GLayer.valueToPlot(): signature not supported")},GLayer.prototype.updatePlotPoints=function(){var a,b,c,d,e,f,g=this.points.length;if(this.plotPoints.lengthf;f++)this.plotPoints[f]=new GPoint;else this.plotPoints.length>g&&this.plotPoints.splice(g,Number.MAX_VALUE);if(this.xLog&&this.yLog)for(a=this.dim[0]/Math.log(this.xLim[1]/this.xLim[0]),b=-this.dim[1]/Math.log(this.yLim[1]/this.yLim[0]),f=0;g>f;f++)c=this.points[f],d=Math.log(c.getX()/this.xLim[0])*a,e=Math.log(c.getY()/this.yLim[0])*b,this.plotPoints[f].set(d,e,c.getLabel());else if(this.xLog)for(a=this.dim[0]/Math.log(this.xLim[1]/this.xLim[0]),b=-this.dim[1]/(this.yLim[1]-this.yLim[0]),f=0;g>f;f++)c=this.points[f],d=Math.log(c.getX()/this.xLim[0])*a,e=(c.getY()-this.yLim[0])*b,this.plotPoints[f].set(d,e,c.getLabel());else if(this.yLog)for(a=this.dim[0]/(this.xLim[1]-this.xLim[0]),b=-this.dim[1]/Math.log(this.yLim[1]/this.yLim[0]),f=0;g>f;f++)c=this.points[f],d=(c.getX()-this.xLim[0])*a,e=Math.log(c.getY()/this.yLim[0])*b,this.plotPoints[f].set(d,e,c.getLabel());else for(a=this.dim[0]/(this.xLim[1]-this.xLim[0]),b=-this.dim[1]/(this.yLim[1]-this.yLim[0]),f=0;g>f;f++)c=this.points[f],d=(c.getX()-this.xLim[0])*a,e=(c.getY()-this.yLim[0])*b,this.plotPoints[f].set(d,e,c.getLabel())},GLayer.prototype.xPlotToValue=function(a){return this.xLog?Math.exp(Math.log(this.xLim[0])+Math.log(this.xLim[1]/this.xLim[0])*a/this.dim[0]):this.xLim[0]+(this.xLim[1]-this.xLim[0])*a/this.dim[0]},GLayer.prototype.yPlotToValue=function(a){return this.yLog?Math.exp(Math.log(this.yLim[0])-Math.log(this.yLim[1]/this.yLim[0])*a/this.dim[1]):this.yLim[0]-(this.yLim[1]-this.yLim[0])*a/this.dim[1]},GLayer.prototype.plotToValue=function(a,b){return[this.xPlotToValue(a),this.yPlotToValue(b)]},GLayer.prototype.isInside=function(){var a,b,c;if(2===arguments.length)a=arguments[0],b=arguments[1],c=this.isValidNumber(a)&&this.isValidNumber(b);else{if(!(1===arguments.length&&arguments[0]instanceof GPoint))throw new Error("GLayer.isInside(): signature not supported");a=arguments[0].getX(),b=arguments[0].getY(),c=arguments[0].isValid()}return c?a>=0&&a<=this.dim[0]&&-b>=0&&-b<=this.dim[1]:!1},GLayer.prototype.updateInsideList=function(){for(var a,b=this.plotPoints.length,c=0;b>c;c++)a=this.plotPoints[c],this.inside[c]=a.isValid()?a.getX()>=0&&a.getX()<=this.dim[0]&&-a.getY()>=0&&-a.getY()<=this.dim[1]:!1;this.inside.length>b&&this.inside.splice(b,Number.MAX_VALUE)},GLayer.prototype.getPointIndexAtPlotPos=function(a,b){var c;if(this.isInside(a,b))for(var d,e,f=25,g=this.plotPoints.length,h=0;g>h;h++)this.inside[h]&&(d=this.plotPoints[h],e=Math.pow(d.getX()-a,2)+Math.pow(d.getY()-b,2),f>e&&(f=e,c=h));return c},GLayer.prototype.getPointAtPlotPos=function(a,b){return this.points[this.getPointIndexAtPlotPos(a,b)]},GLayer.prototype.obtainBoxIntersections=function(a,b){var c=0;if(a.isValid()&&b.isValid()){var d=a.getX(),e=a.getY(),f=b.getX(),g=b.getY(),h=this.isInside(d,e),i=this.isInside(f,g),j=h&&i||0>d&&0>f||d>this.dim[0]&&f>this.dim[0]||0>-e&&0>-g||-e>this.dim[1]&&-g>this.dim[1];if(!j){var k=f-d,l=g-e;if(0===k)c=2,this.cuts[0][0]=d,this.cuts[0][1]=0,this.cuts[1][0]=d,this.cuts[1][1]=-this.dim[1];else if(0===l)c=2,this.cuts[0][0]=0,this.cuts[0][1]=e,this.cuts[1][0]=this.dim[0],this.cuts[1][1]=e;else{var m=l/k,n=e-m*d;c=4,this.cuts[0][0]=-n/m,this.cuts[0][1]=0,this.cuts[1][0]=(-this.dim[1]-n)/m,this.cuts[1][1]=-this.dim[1],this.cuts[2][0]=0,this.cuts[2][1]=n,this.cuts[3][0]=this.dim[0],this.cuts[3][1]=n+m*this.dim[0]}if(c=this.getValidCuts(this.cuts,c,a,b),h||i){if(1!==c){var o=h?a:b;c>1&&(c=this.removeDuplicatedCuts(this.cuts,c,0),c>1&&(c=this.removePointFromCuts(this.cuts,c,o,0),c>1&&(c=this.removeDuplicatedCuts(this.cuts,c,.001),c>1&&(c=this.removePointFromCuts(this.cuts,c,o,.001))))),0===c&&(c=1,this.cuts[0][0]=o.getX(),this.cuts[1][0]=o.getY())}}else c>2&&(c=this.removeDuplicatedCuts(this.cuts,c,0),c>2&&(c=this.removeDuplicatedCuts(this.cuts,c,.001))),2===c&&(Math.pow(this.cuts[0][0]-d,2)+Math.pow(this.cuts[0][1]-e),2>Math.pow(this.cuts[1][0]-d,2)+Math.pow(this.cuts[1][1]-e,2)&&(this.cuts[2][0]=this.cuts[0][0],this.cuts[2][1]=this.cuts[0][1],this.cuts[0][0]=this.cuts[1][0],this.cuts[0][1]=this.cuts[1][1],this.cuts[1][0]=this.cuts[2][0],this.cuts[1][1]=this.cuts[2][1])),1===c&&(c=2,this.cuts[1][0]=this.cuts[0][0],this.cuts[1][1]=this.cuts[0][1]);(h||i)&&1!==c?console.log("There should be one cut!!!"):h||i||0===c||2===c||console.log("There should be either 0 or 2 cuts!!! "+c+" were found")}}return c},GLayer.prototype.getValidCuts=function(a,b,c,d){for(var e=c.getX(),f=c.getY(),g=d.getX(),h=d.getY(),i=Math.abs(g-e),j=Math.abs(h-f),k=0,l=0;b>l;l++)this.isInside(a[l][0],a[l][1])&&Math.abs(a[l][0]-e)<=i&&Math.abs(a[l][1]-f)<=j&&Math.abs(a[l][0]-g)<=i&&Math.abs(a[l][1]-h)<=j&&(a[k][0]=a[l][0],a[k][1]=a[l][1],k++);return k},GLayer.prototype.removeDuplicatedCuts=function(a,b,c){for(var d,e=0,f=0;b>f;f++){d=!1;for(var g=0;e>g;g++)if(Math.abs(a[g][0]-a[f][0])<=c&&Math.abs(a[g][1]-a[f][1])<=c){d=!0;break}d||(a[e][0]=a[f][0],a[e][1]=a[f][1],e++)}return e},GLayer.prototype.removePointFromCuts=function(a,b,c,d){for(var e=c.getX(),f=c.getY(),g=0,h=0;b>h;h++)(Math.abs(a[h][0]-e)>d||Math.abs(a[h][1]-f)>d)&&(a[g][0]=a[h][0],a[g][1]=a[h][1],g++);return g},GLayer.prototype.startHistogram=function(a){this.hist=new GHistogram(this.parent,a,this.dim,this.plotPoints)},GLayer.prototype.drawPoints=function(){var a,b;if(0===arguments.length){a=this.plotPoints.length;var c=this.pointColors.length,d=this.pointSizes.length;if(this.parent.push(),this.parent.ellipseMode(this.parent.CENTER),this.parent.stroke(50),1===c&&1===d)for(this.parent.fill(this.pointColors[0]),b=0;a>b;b++)this.inside[b]&&this.parent.ellipse(this.plotPoints[b].getX(),this.plotPoints[b].getY(),this.pointSizes[0],this.pointSizes[0]);else if(1===c)for(this.parent.fill(this.pointColors[0]),b=0;a>b;b++)this.inside[b]&&this.parent.ellipse(this.plotPoints[b].getX(),this.plotPoints[b].getY(),this.pointSizes[b%d],this.pointSizes[b%d]);else if(1===d)for(b=0;a>b;b++)this.inside[b]&&(this.parent.fill(this.pointColors[b%c]),this.parent.ellipse(this.plotPoints[b].getX(),this.plotPoints[b].getY(),this.pointSizes[0],this.pointSizes[0]));else for(b=0;a>b;b++)this.inside[b]&&(this.parent.fill(this.pointColors[b%c]),this.parent.ellipse(this.plotPoints[b].getX(),this.plotPoints[b].getY(),this.pointSizes[b%d],this.pointSizes[b%d]));this.parent.pop()}else{if(!(1===arguments.length&&arguments[0]instanceof p5.Image))throw new Error("GLayer.drawPoints(): signature not supported");for(a=this.plotPoints.length,this.parent.push(),this.parent.imageMode(this.parent.CENTER),b=0;a>b;b++)this.inside[b]&&this.parent.image(arguments[0],this.plotPoints[b].getX(),this.plotPoints[b].getY());this.parent.pop()}},GLayer.prototype.drawPoint=function(){var a,b,c,d;if(3===arguments.length)a=arguments[0],b=arguments[1],c=arguments[2];else if(2===arguments.length&&arguments[1]instanceof p5.Image)a=arguments[0],d=arguments[1];else{if(1!==arguments.length)throw new Error("GLayer.drawPoint(): signature not supported");a=arguments[0],b=this.pointColors[0],c=this.pointSizes[0]}var e=this.valueToXPlot(a.getX()),f=this.valueToYPlot(a.getY());this.isInside(e,f)&&(this.parent.push(),"undefined"!=typeof d?(this.parent.imageMode(this.parent.CENTER),this.parent.image(d,e,f)):(this.parent.ellipseMode(this.parent.CENTER),this.parent.fill(b),this.parent.noStroke(),this.parent.ellipse(e,f,c,c)),this.parent.pop())},GLayer.prototype.drawLines=function(){var a=this.plotPoints.length;this.parent.push(),this.parent.noFill(),this.parent.stroke(this.lineColor),this.parent.strokeWeight(this.lineWidth),this.parent.strokeCap(this.parent.SQUARE);for(var b=0;a-1>b;b++)if(this.inside[b]&&this.inside[b+1])this.parent.line(this.plotPoints[b].getX(),this.plotPoints[b].getY(),this.plotPoints[b+1].getX(),this.plotPoints[b+1].getY());else if(this.plotPoints[b].isValid()&&this.plotPoints[b+1].isValid()){var c=this.obtainBoxIntersections(this.plotPoints[b],this.plotPoints[b+1]);this.inside[b]?this.parent.line(this.plotPoints[b].getX(),this.plotPoints[b].getY(),this.cuts[0][0],this.cuts[0][1]):this.inside[b+1]?this.parent.line(this.cuts[0][0],this.cuts[0][1],this.plotPoints[b+1].getX(),this.plotPoints[b+1].getY()):c>=2&&this.parent.line(this.cuts[0][0],this.cuts[0][1],this.cuts[1][0],this.cuts[1][1])}this.parent.pop()},GLayer.prototype.drawLine=function(){var a,b,c,d,e,f;if(4===arguments.length&&arguments[0]instanceof GPoint)a=arguments[0],b=arguments[1],c=arguments[2],d=arguments[3];else if(4===arguments.length)e=arguments[0],f=arguments[1],c=arguments[2],d=arguments[3];else if(2===arguments.length&&arguments[0]instanceof GPoint)a=arguments[0],b=arguments[1],c=this.lineColor,d=this.lineWidth;else{if(2!==arguments.length)throw new Error("GLayer.drawLine(): signature not supported");e=arguments[0],f=arguments[1],c=this.lineColor,d=this.lineWidth}"undefined"!=typeof e&&(this.xLog&&this.yLog?(a=new GPoint(this.xLim[0],Math.pow(10,e*Math.log(this.xLim[0])/Math.LN10+yCut)),b=new GPoint(this.xLim[1],Math.pow(10,e*Math.log(this.xLim[1])/Math.LN10+yCut))):this.xLog?(a=new GPoint(this.xLim[0],e*Math.log(this.xLim[0])/Math.LN10+yCut),b=new GPoint(this.xLim[1],e*Math.log(this.xLim[1])/Math.LN10+yCut)):this.yLog?(a=new GPoint(this.xLim[0],Math.pow(10,e*this.xLim[0]+yCut)),b=new GPoint(this.xLim[1],Math.pow(10,e*this.xLim[1]+yCut))):(a=new GPoint(this.xLim[0],e*this.xLim[0]+yCut),b=new GPoint(this.xLim[1],e*this.xLim[1]+yCut)));var g=this.valueToPlot(a),h=this.valueToPlot(b);if(g.isValid()&&h.isValid()){var i=this.isInside(g),j=this.isInside(h);if(this.parent.push(),this.parent.noFill(),this.parent.stroke(c),this.parent.strokeWeight(d),this.parent.strokeCap(this.parent.SQUARE),i&&j)this.parent.line(g.getX(),g.getY(),h.getX(),h.getY());else{var k=this.obtainBoxIntersections(g,h);i?this.parent.line(g.getX(),g.getY(),this.cuts[0][0],this.cuts[0][1]):j?this.parent.line(this.cuts[0][0],this.cuts[0][1],h.getX(),h.getY()):k>=2&&this.parent.line(this.cuts[0][0],this.cuts[0][1],this.cuts[1][0],this.cuts[1][1])}this.parent.pop()}},GLayer.prototype.drawHorizontalLine=function(){var a,b,c;if(3===arguments.length)a=arguments[0],b=arguments[1],c=arguments[2];else{if(1!==arguments.length)throw new Error("GLayer.drawHorizontalLine(): signature not supported");a=arguments[0],b=this.lineColor,c=this.lineWidth}var d=this.valueToYPlot(a);this.isValidNumber(d)&&-d>=0&&-d<=this.dim[1]&&(this.parent.push(),this.parent.noFill(),this.parent.stroke(b),this.parent.strokeWeight(c),this.parent.strokeCap(this.parent.SQUARE),this.parent.line(0,d,this.dim[0],d),this.parent.pop())},GLayer.prototype.drawVerticalLine=function(){var a,b,c;if(3===arguments.length)a=arguments[0],b=arguments[1],c=arguments[2];else{if(1!==arguments.length)throw new Error("GLayer.drawVerticalLine(): signature not supported");a=arguments[0],b=this.lineColor,c=this.lineWidth}var d=this.valueToXPlot(a);this.isValidNumber(d)&&d>=0&&d<=this.dim[0]&&(this.parent.push(),this.parent.noFill(),this.parent.stroke(b),this.parent.strokeWeight(c),this.parent.strokeCap(this.parent.SQUARE),this.parent.line(d,0,d,-this.dim[1]),this.parent.pop())},GLayer.prototype.drawFilledContour=function(a,b){var c;if(a===GPlot.HORIZONTAL?c=this.getHorizontalShape(b):a===GPlot.VERTICAL&&(c=this.getVerticalShape(b)),"undefined"!=typeof c&&c.length>0){this.parent.push(),this.parent.fill(this.lineColor),this.parent.noStroke(),this.parent.beginShape();for(var d=0;di;i++)if(b=this.plotPoints[i],b.isValid()){for(c=!1,this.inside[i]?(f.push(new GPoint(b.getX(),b.getY(),"normal point")),c=!0):b.getX()>=0&&b.getX()<=this.dim[0]&&(-b.getY()<0?(f.push(new GPoint(b.getX(),0,"projection")),c=!0):(f.push(new GPoint(b.getX(),-this.dim[1],"projection")),c=!0)),d=i+1;e-1>d&&!this.plotPoints[d].isValid();)d++;if(e>d&&this.plotPoints[d].isValid())for(var j=this.obtainBoxIntersections(b,this.plotPoints[d]),k=0;j>k;k++)f.push(new GPoint(this.cuts[k][0],this.cuts[k][1],"cut")),c=!0;c&&(0>g&&(g=i),h=i)}if(f.length>0){var l=new GPoint(f[0]);if(0!==l.getX()&&l.getX()!==this.dim[0])if("cut"===l.getLabel())this.plotPoints[g].getX()<0?(l.setX(0),l.setLabel("extreme")):(l.setX(this.dim[0]),l.setLabel("extreme"));else if(0!==g){for(var m=g-1;m>0&&!this.plotPoints[m].isValid();)m--;this.plotPoints[m].isValid()&&(this.plotPoints[m].getX()<0?(l.setX(0),l.setLabel("extreme")):(l.setX(this.dim[0]),l.setLabel("extreme")))}var n=new GPoint(f[f.length-1]);if(0!==n.getX()&&n.getX()!==this.dim[0]&&h!==e-1){for(d=h+1;e-1>d&&!this.plotPoints[d].isValid();)d++;this.plotPoints[d].isValid()&&(this.plotPoints[d].getX()<0?(n.setX(0),n.setLabel("extreme")):(n.setX(this.dim[0]),n.setLabel("extreme")))}"extreme"===n.getLabel()&&f.push(n),this.yLog&&0>=a&&(a=Math.min(this.yLim[0],this.yLim[1]));var o=this.valueToPlot(1,a);-o[1]<0?(f.push(new GPoint(n.getX(),0)),f.push(new GPoint(l.getX(),0))):-o[1]>this.dim[1]?(f.push(new GPoint(n.getX(),-this.dim[1])),f.push(new GPoint(l.getX(),-this.dim[1]))):(f.push(new GPoint(n.getX(),o[1])),f.push(new GPoint(l.getX(),o[1]))),"extreme"===l.getLabel()&&f.push(l)}return f},GLayer.prototype.getVerticalShape=function(a){for(var b,c,d,e=this.plotPoints.length,f=[],g=-1,h=-1,i=0;e>i;i++)if(b=this.plotPoints[i],b.isValid()){for(c=!1,this.inside[i]?(f.push(new GPoint(b.getX(),b.getY(),"normal point")),c=!0):-b.getY()>=0&&-b.getY()<=this.dim[1]&&(b.getX()<0?(f.push(new GPoint(0,b.getY(),"projection")),c=!0):(f.push(new GPoint(this.dim[0],b.getY(),"projection")),c=!0)),d=i+1;e-1>d&&!this.plotPoints[d].isValid();)d++;if(e>d&&this.plotPoints[d].isValid())for(var j=this.obtainBoxIntersections(b,this.plotPoints[d]),k=0;j>k;k++)f.push(new GPoint(this.cuts[k][0],this.cuts[k][1],"cut")),c=!0;c&&(0>g&&(g=i),h=i)}if(f.length>0){var l=new GPoint(f[0]);if(0!==l.getY()&&l.getY()!==-this.dim[1])if("cut"===l.getLabel())-this.plotPoints[g].getY()<0?(l.setY(0),l.setLabel("extreme")):(l.setY(-this.dim[1]),l.setLabel("extreme"));else if(0!==g){for(var m=g-1;m>0&&!this.plotPoints[m].isValid();)m--;this.plotPoints[m].isValid()&&(-this.plotPoints[m].getY()<0?(l.setY(0),l.setLabel("extreme")):(l.setY(-this.dim[1]),l.setLabel("extreme")))}var n=new GPoint(f[f.length-1]);if(0!==n.getY()&&n.getY()!==-this.dim[1]&&h!==e-1){for(d=h+1;e-1>d&&!this.plotPoints[d].isValid();)d++;this.plotPoints[d].isValid()&&(-this.plotPoints[d].getY()<0?(n.setY(0),n.setLabel("extreme")):(n.setY(-this.dim[1]),n.setLabel("extreme")))}"extreme"===n.getLabel()&&f.push(n),this.xLog&&0>=a&&(a=Math.min(this.xLim[0],this.xLim[1]));var o=this.valueToPlot(a,1);o[0]<0?(f.push(new GPoint(0,n.getY())),f.push(new GPoint(0,l.getY()))):o[0]>this.dim[0]?(f.push(new GPoint(this.dim[0],n.getY())),f.push(new GPoint(this.dim[0],l.getY()))):(f.push(new GPoint(o[0],n.getY())),f.push(new GPoint(o[0],l.getY()))),"extreme"===l.getLabel()&&f.push(l)}return f},GLayer.prototype.drawLabel=function(a){var b=this.valueToXPlot(a.getX()),c=this.valueToYPlot(a.getY());if(this.isValidNumber(b)&&this.isValidNumber(c)){var d=b+this.labelSeparation[0],e=c-this.labelSeparation[1],f=this.fontSize/4;this.parent.push(),this.parent.rectMode(this.parent.CORNER),this.parent.noStroke(),this.parent.textFont(this.fontName),this.parent.textSize(this.fontSize),this.parent.textAlign(this.parent.LEFT,this.parent.BOTTOM),this.parent.fill(this.labelBgColor),this.parent.rect(d-f,e-this.fontSize-f,this.parent.textWidth(a.getLabel())+2*f,this.fontSize+2*f),this.parent.fill(this.fontColor),this.parent.text(a.getLabel(),d,e),this.parent.pop()}},GLayer.prototype.drawLabelAtPlotPos=function(a,b){var c=this.getPointAtPlotPos(a,b);"undefined"!=typeof c&&this.drawLabel(c)},GLayer.prototype.drawHistogram=function(){"undefined"!=typeof this.hist&&this.hist.draw(this.valueToPlot(this.histBasePoint))},GLayer.prototype.drawPolygon=function(a,b){var c;if(a.length>2){var d=this.valueToPlot(a),e=0;for(c=0;cc;c++){f=d[c],this.isInside(f)&&h.push(new GPoint(f.getX(),f.getY(),"normal point"));var i=g>c+1?c+1:0,j=this.obtainBoxIntersections(f,d[i]);1===j?h.push(new GPoint(this.cuts[0][0],this.cuts[0][1],"single cut")):j>1&&(h.push(new GPoint(this.cuts[0][0],this.cuts[0][1],"double cut")),h.push(new GPoint(this.cuts[1][0],this.cuts[1][1],"double cut")))}g=h.length;var k=[];for(c=0;g>c;c++){k.push(h[c]);var l=g>c+1?c+1:0,m=h[c].getLabel(),n=h[l].getLabel(),o="single cut"===m&&"single cut"===n||"single cut"===m&&"double cut"===n||"double cut"===m&&"single cut"===n;if(o){var p=h[c].getX(),q=h[c].getY(),r=h[l].getX(),s=h[l].getY(),t=Math.abs(r-p),u=Math.abs(s-q);if(t>0&&u>0&&t!==this.dim[0]&&u!==this.dim[1]){var v=0===p||p===this.dim[0]?p:r,w=0===q||q===-this.dim[1]?q:s;k.push(new GPoint(v,w,"special cut"))}}}if(k.length>2){for(this.parent.push(),this.parent.fill(b),this.parent.noStroke(),this.parent.beginShape(),c=0;c0&&b>0&&(this.dim[0]=a,this.dim[1]=b,this.updatePlotPoints(),"undefined"!=typeof this.hist&&(this.hist.setDim(this.dim),this.hist.setPlotPoints(this.plotPoints)))},GLayer.prototype.setXLim=function(){var a,b;if(2===arguments.length)a=arguments[0],b=arguments[1];else{if(1!==arguments.length)throw new Error("GLayer.setXLim(): signature not supported");a=arguments[0][0],b=arguments[0][1]}a!==b&&this.isValidNumber(a)&&this.isValidNumber(b)&&(this.xLog&&(0>=a||0>=b)?console.log("One of the limits is negative. This is not allowed in logarithmic scale."):(this.xLim[0]=a,this.xLim[1]=b,this.updatePlotPoints(),this.updateInsideList(),"undefined"!=typeof this.hist&&this.hist.setPlotPoints(this.plotPoints)))},GLayer.prototype.setYLim=function(){var a,b;if(2===arguments.length)a=arguments[0],b=arguments[1];else{if(1!==arguments.length)throw new Error("GLayer.setYLim(): signature not supported");a=arguments[0][0],b=arguments[0][1]}a!==b&&this.isValidNumber(a)&&this.isValidNumber(b)&&(this.yLog&&(0>=a||0>=b)?console.log("One of the limits is negative. This is not allowed in logarithmic scale."):(this.yLim[0]=a,this.yLim[1]=b,this.updatePlotPoints(),this.updateInsideList(),"undefined"!=typeof this.hist&&this.hist.setPlotPoints(this.plotPoints)))},GLayer.prototype.setXYLim=function(){var a,b,c,d;if(4===arguments.length)a=arguments[0],b=arguments[1],c=arguments[2],d=arguments[3];else{if(2!==arguments.length)throw new Error("GLayer.setXYLim(): signature not supported");a=arguments[0][0],b=arguments[0][1],c=arguments[1][0],d=arguments[1][1]}a!==b&&c!==d&&this.isValidNumber(a)&&this.isValidNumber(b)&&this.isValidNumber(c)&&this.isValidNumber(d)&&(this.xLog&&(0>=a||0>=b)?console.log("One of the limits is negative. This is not allowed in logarithmic scale."):(this.xLim[0]=a,this.xLim[1]=b),this.yLog&&(0>=c||0>=d)?console.log("One of the limits is negative. This is not allowed in logarithmic scale."):(this.yLim[0]=c,this.yLim[1]=d),this.updatePlotPoints(),this.updateInsideList(),"undefined"!=typeof this.hist&&this.hist.setPlotPoints(this.plotPoints))},GLayer.prototype.setLimAndLog=function(){var a,b,c,d,e,f;if(6===arguments.length)a=arguments[0],b=arguments[1],c=arguments[2],d=arguments[3],e=arguments[4],f=arguments[5];else{if(4!==arguments.length)throw new Error("GLayer.setLimAndLog(): signature not supported");a=arguments[0][0],b=arguments[0][1],c=arguments[1][0],d=arguments[1][1],e=arguments[2],f=arguments[3]}a!==b&&c!==d&&this.isValidNumber(a)&&this.isValidNumber(b)&&this.isValidNumber(c)&&this.isValidNumber(d)&&(e&&(0>=a||0>=b)?console.log("One of the limits is negative. This is not allowed in logarithmic scale."):(this.xLim[0]=a,this.yLim[1]=b,this.xLog=e),f&&(0>=c||0>=d)?console.log("One of the limits is negative. This is not allowed in logarithmic scale."):(this.yLim[0]=c,this.yLim[1]=d,this.yLog=f),this.updatePlotPoints(),this.updateInsideList(),"undefined"!=typeof this.hist&&this.hist.setPlotPoints(this.plotPoints))},GLayer.prototype.setXLog=function(a){a!==this.xLog&&(a&&(this.xLim[0]<=0||this.xLim[1]<=0)&&(console.log("One of the limits is negative. This is not allowed in logarithmic scale."),console.log("Will set horizontal limits to (0.1, 10)"),this.xLim[0]=.1,this.xLim[1]=10),this.xLog=a,this.updatePlotPoints(),this.updateInsideList(),"undefined"!=typeof this.hist&&this.hist.setPlotPoints(this.plotPoints))},GLayer.prototype.setYLog=function(a){a!==this.yLog&&(a&&(this.yLim[0]<=0||this.yLim[1]<=0)&&(console.log("One of the limits is negative. This is not allowed in logarithmic scale."),console.log("Will set horizontal limits to (0.1, 10)"),this.yLim[0]=.1,this.yLim[1]=10),this.yLog=a,this.updatePlotPoints(),this.updateInsideList(),"undefined"!=typeof this.hist&&this.hist.setPlotPoints(this.plotPoints))},GLayer.prototype.setPoints=function(a){var b,c=a.length;if(this.points.length>c)this.points.splice(c,Number.MAX_VALUE);else for(b=this.points.length;c>b;b++)this.points[b]=new GPoint;for(b=0;c>b;b++)this.points[b].set(a[b]);this.updatePlotPoints(),this.updateInsideList(),"undefined"!=typeof this.hist&&this.hist.setPlotPoints(this.plotPoints)},GLayer.prototype.setPoint=function(){var a,b,c,d,e=this.points.length;if(4===arguments.length)a=arguments[0],b=arguments[1],c=arguments[2],d=arguments[3];else if(3===arguments.length)a=arguments[0],b=arguments[1],c=arguments[2],d=aa)this.points[a].set(b,c,d),this.plotPoints[a].set(this.valueToXPlot(b),this.valueToYPlot(c),d),this.inside[a]=this.isInside(this.plotPoints[a]);else{if(a!==e)throw new Error("GLayer.setPoint(): the index position is outside the array size");this.points[a]=new GPoint(b,c,d),this.plotPoints[a]=new GPoint(this.valueToXPlot(b),this.valueToYPlot(c),d),this.inside[a]=this.isInside(this.plotPoints[a])}"undefined"!=typeof this.hist&&this.hist.setPlotPoint(a,this.plotPoints[a])},GLayer.prototype.addPoint=function(){var a,b,c;if(3===arguments.length)a=arguments[0],b=arguments[1],c=arguments[2];else if(2===arguments.length)a=arguments[0],b=arguments[1],c="";else{if(1!==arguments.length)throw new Error("GLayer.addPoint(): signature not supported");a=arguments[0].getX(),b=arguments[0].getY(),c=arguments[0].getLabel()}this.points.push(new GPoint(a,b,c)),this.plotPoints.push(new GPoint(this.valueToXPlot(a),this.valueToYPlot(b),c)),this.inside.push(this.isInside(this.plotPoints[this.plotPoints.length-1])),"undefined"!=typeof this.hist&&this.hist.addPlotPoint(this.plotPoints[this.plotPoints.length-1])},GLayer.prototype.addPoints=function(a){for(var b,c=a.length,d=0;c>d;d++)b=a[d],this.points.push(new GPoint(b)),this.plotPoints.push(new GPoint(this.valueToXPlot(b.getX()),this.valueToYPlot(b.getY()),b.getLabel())),this.inside.push(this.isInside(this.plotPoints[this.plotPoints.length-1]));"undefined"!=typeof this.hist&&this.hist.setPlotPoints(this.plotPoints)},GLayer.prototype.addPointAtIndexPos=function(){var a,b,c,d;if(4===arguments.length)a=arguments[0],b=arguments[1],c=arguments[2],d=arguments[3];else if(3===arguments.length)a=arguments[0],b=arguments[1],c=arguments[2],d="";else{if(2!==arguments.length)throw new Error("GLayer.addPointAtIndexPos(): signature not supported");a=arguments[0],b=arguments[1].getX(),c=arguments[1].getY(),d=arguments[1].getLabel()}a<=this.points.length&&(this.points.splice(a,0,new GPoint(b,c,d)),this.plotPoints.splice(a,0,new GPoint(this.valueToXPlot(b),this.valueToYPlot(c),d)),this.inside.splice(a,0,this.isInside(this.plotPoints[0])),"undefined"!=typeof this.hist&&this.hist.setPlotPoints(this.plotPoints))},GLayer.prototype.removePoint=function(a){a0&&(this.pointColors=a.slice())},GLayer.prototype.setPointColor=function(a){this.pointColors=[a]},GLayer.prototype.setPointSizes=function(a){a.length>0&&(this.pointSizes=a.slice())},GLayer.prototype.setPointSize=function(a){this.pointSizes=[a]},GLayer.prototype.setLineColor=function(a){this.lineColor=a},GLayer.prototype.setLineWidth=function(a){a>0&&(this.lineWidth=a)},GLayer.prototype.setHistBasePoint=function(a){this.histBasePoint.set(a)},GLayer.prototype.setHistType=function(a){"undefined"!=typeof this.hist&&this.hist.setType(a)},GLayer.prototype.setHistVisible=function(a){"undefined"!=typeof this.hist&&this.hist.setVisible(a)},GLayer.prototype.setDrawHistLabels=function(a){"undefined"!=typeof this.hist&&this.hist.setDrawLabels(a)},GLayer.prototype.setLabelBgColor=function(a){this.labelBgColor=a},GLayer.prototype.setLabelSeparation=function(a){this.labelSeparation[0]=a[0],this.labelSeparation[1]=a[1]},GLayer.prototype.setFontName=function(a){this.fontName=a},GLayer.prototype.setFontColor=function(a){this.fontColor=a},GLayer.prototype.setFontSize=function(a){a>0&&(this.fontSize=a)},GLayer.prototype.setFontProperties=function(a,b,c){c>0&&(this.fontName=a,this.fontColor=b,this.fontSize=c)},GLayer.prototype.setAllFontProperties=function(a,b,c){this.setFontProperties(a,b,c),"undefined"!=typeof this.hist&&this.hist.setFontProperties(a,b,c)},GLayer.prototype.getId=function(){return this.id},GLayer.prototype.getDim=function(){return this.dim.slice()},GLayer.prototype.getXLim=function(){return this.xLim.slice()},GLayer.prototype.getYLim=function(){return this.yLim.slice()},GLayer.prototype.getXLog=function(){return this.xLog},GLayer.prototype.getYLog=function(){return this.yLog},GLayer.prototype.getPoints=function(){for(var a=[],b=0;b=this.pos[0]&&a<=this.pos[0]+this.outerDim[0]&&b>=this.pos[1]&&b<=this.pos[1]+this.outerDim[1]},GPlot.prototype.isOverBox=function(){var a,b;if(2===arguments.length)a=arguments[0],b=arguments[1];else{if(0!==arguments.length)throw new Error("GPlot.isOverBox(): signature not supported");a=this.parent.mouseX,b=this.parent.mouseY}return a>=this.pos[0]+this.mar[1]&&a<=this.pos[0]+this.outerDim[0]-this.mar[3]&&b>=this.pos[1]+this.mar[2]&&b<=this.pos[1]+this.outerDim[1]-this.mar[0]},GPlot.prototype.updateLimits=function(){this.fixedXLim||(this.xLim=this.calculatePlotXLim(),this.xAxis.setLim(this.xLim),this.topAxis.setLim(this.xLim)),this.fixedYLim||(this.yLim=this.calculatePlotYLim(),this.yAxis.setLim(this.yLim),this.rightAxis.setLim(this.yLim)),this.mainLayer.setXYLim(this.xLim,this.yLim);for(var a=0;a=this.yLim[0]&&e>=this.yLim[0]&&e<=this.yLim[1]||this.yLim[1]=this.yLim[1]),!f||this.xLog&&0>=d||(db[1]&&(b[1]=d))}return b[1]=this.xLim[0]&&d>=this.xLim[0]&&d<=this.xLim[1]||this.xLim[1]=this.xLim[1]),!f||this.yLog&&0>=e||(eb[1]&&(b[1]=e))}return b[1]=0&&c[b]<=this.dim[0]&&this.parent.line(c[b],0,c[b],-this.dim[1])}if(a===GPlot.BOTH||a===GPlot.HORIZONTAL){var d=this.yAxis.getPlotTicksRef();for(b=0;b=0&&-d[b]<=this.dim[1]&&this.parent.line(0,d[b],this.dim[0],d[b])}this.parent.pop()},GPlot.prototype.drawHistograms=function(){this.mainLayer.drawHistogram();for(var a=0;a0&&b>0){var c=a-this.mar[1]-this.mar[3],d=b-this.mar[0]-this.mar[2];if(c>0&&d>0){this.outerDim[0]=a,this.outerDim[1]=b,this.dim[0]=c,this.dim[1]=d,this.xAxis.setDim(this.dim),this.topAxis.setDim(this.dim),this.yAxis.setDim(this.dim),this.rightAxis.setDim(this.dim),this.title.setDim(this.dim),this.mainLayer.setDim(this.dim);for(var e=0;e0&&f>0&&(this.mar[0]=a,this.mar[1]=b,this.mar[2]=c,this.mar[3]=d,this.outerDim[0]=e,this.outerDim[1]=f)},GPlot.prototype.setDim=function(){var a,b;if(2===arguments.length)a=arguments[0],b=arguments[1];else{if(1!==arguments.length)throw new Error("GPlot.setDim(): signature not supported");a=arguments[0][0],b=arguments[0][1]}if(a>0&&b>0){var c=a+this.mar[1]+this.mar[3],d=b+this.mar[0]+this.mar[2];if(c>0&&d>0){this.outerDim[0]=c,this.outerDim[1]=d,this.dim[0]=a,this.dim[1]=b,this.xAxis.setDim(this.dim),this.topAxis.setDim(this.dim),this.yAxis.setDim(this.dim),this.rightAxis.setDim(this.dim),this.title.setDim(this.dim),this.mainLayer.setDim(this.dim);for(var e=0;e=a||0>=b)?console.log("One of the limits is negative. This is not allowed in logarithmic scale."):(this.xLim[0]=a,this.xLim[1]=b,this.invertedXScale=this.xLim[0]>this.xLim[1],this.fixedXLim=!0,this.xAxis.setLim(this.xLim),this.topAxis.setLim(this.xLim),this.updateLimits()))},GPlot.prototype.setYLim=function(){var a,b;if(2===arguments.length)a=arguments[0],b=arguments[1];else{if(1!==arguments.length)throw new Error("GPlot.setYLim(): signature not supported");a=arguments[0][0],b=arguments[0][1]}a!==b&&(this.yLog&&(0>=a||0>=b)?console.log("One of the limits is negative. This is not allowed in logarithmic scale."):(this.yLim[0]=a,this.yLim[1]=b,this.invertedYScale=this.yLim[0]>this.yLim[1],this.fixedYLim=!0,this.yAxis.setLim(this.yLim),this.rightAxis.setLim(this.yLim),this.updateLimits()))},GPlot.prototype.setFixedXLim=function(a){this.fixedXLim=a,this.updateLimits()},GPlot.prototype.setFixedYLim=function(a){this.fixedYLim=a,this.updateLimits()},GPlot.prototype.setLogScale=function(a){var b=this.xLog,c=this.yLog;if("xy"===a||"yx"===a?(b=!0,c=!0):"x"===a?(b=!0,c=!1):"y"===a?(b=!1,c=!0):""===a&&(b=!1,c=!1),b!==this.xLog||c!==this.yLog){this.xLog=b,this.yLog=c,this.xLog&&this.fixedXLim&&(this.xLim[0]<=0||this.xLim[1]<=0)&&(this.fixedXLim=!1),this.yLog&&this.fixedYLim&&(this.yLim[0]<=0||this.yLim[1]<=0)&&(this.fixedYLim=!1),this.fixedXLim||(this.xLim=this.calculatePlotXLim()),this.fixedYLim||(this.yLim=this.calculatePlotYLim()),this.xAxis.setLimAndLog(this.xLim,this.xLog),this.topAxis.setLimAndLog(this.xLim,this.xLog),this.yAxis.setLimAndLog(this.yLim,this.yLog),this.rightAxis.setLimAndLog(this.yLim,this.yLog),this.mainLayer.setLimAndLog(this.xLim,this.yLim,this.xLog,this.yLog);for(var d=0;d=0&&a!==this.expandLimFactor&&(this.expandLimFactor=a,this.updateLimits())},GPlot.prototype.setBgColor=function(a){this.bgColor=a},GPlot.prototype.setBoxBgColor=function(a){this.boxBgColor=a},GPlot.prototype.setBoxLineColor=function(a){this.boxLineColor=a},GPlot.prototype.setBoxLineWidth=function(a){a>0&&(this.boxLineWidth=a)},GPlot.prototype.setGridLineColor=function(a){this.gridLineColor=a},GPlot.prototype.setGridLineWidth=function(a){a>0&&(this.gridLineWidth=a)},GPlot.prototype.setPoints=function(){if(2===arguments.length)this.getLayer(arguments[1]).setPoints(arguments[0]);else{if(1!==arguments.length)throw new Error("GPlot.setPoints(): signature not supported");this.mainLayer.setPoints(arguments[0])}this.updateLimits()},GPlot.prototype.setPoint=function(){if(5===arguments.length)this.getLayer(arguments[4]).setPoint(arguments[0],arguments[1],arguments[2],arguments[3]);else if(4===arguments.length)this.mainLayer.setPoint(arguments[0],arguments[1],arguments[2],arguments[3]);else if(3===arguments.length&&arguments[1]instanceof GPoint)this.getLayer(arguments[2]).setPoint(arguments[0],arguments[1]);else if(3===arguments.length)this.mainLayer.setPoint(arguments[0],arguments[1],arguments[2]);else{if(2!==arguments.length)throw new Error("GPlot.setPoint(): signature not supported");this.mainLayer.setPoint(arguments[0],arguments[1])}this.updateLimits()},GPlot.prototype.addPoint=function(){if(4===arguments.length)this.getLayer(arguments[3]).addPoint(arguments[0],arguments[1],arguments[2]);else if(3===arguments.length)this.mainLayer.addPoint(arguments[0],arguments[1],arguments[2]);else if(2===arguments.length&&arguments[0]instanceof GPoint)this.getLayer(arguments[1]).addPoint(arguments[0]);else if(2===arguments.length)this.mainLayer.addPoint(arguments[0],arguments[1]);else{if(1!==arguments.length)throw new Error("GPlot.addPoint(): signature not supported");this.mainLayer.addPoint(arguments[0])}this.updateLimits()},GPlot.prototype.addPoints=function(){if(2===arguments.length)this.getLayer(arguments[1]).addPoints(arguments[0]);else{if(1!==arguments.length)throw new Error("GPlot.addPoints(): signature not supported");this.mainLayer.addPoints(arguments[0])}this.updateLimits()},GPlot.prototype.removePoint=function(){if(2===arguments.length)this.getLayer(arguments[1]).removePoint(arguments[0]);else{if(1!==arguments.length)throw new Error("GPlot.removePoint(): signature not supported");this.mainLayer.removePoint(arguments[0])}this.updateLimits()},GPlot.prototype.addPointAtIndexPos=function(){if(5===arguments.length)this.getLayer(arguments[4]).addPointAtIndexPos(arguments[0],arguments[1],arguments[2],arguments[3]);else if(4===arguments.length)this.mainLayer.addPointAtIndexPos(arguments[0],arguments[1],arguments[2],arguments[3]);else if(3===arguments.length&&arguments[1]instanceof GPoint)this.getLayer(arguments[2]).addPointAtIndexPos(arguments[0],arguments[1]);else if(3===arguments.length)this.mainLayer.addPointAtIndexPos(arguments[0],arguments[1],arguments[2]);else{if(2!==arguments.length)throw new Error("GPlot.addPointAtIndexPos(): signature not supported");this.mainLayer.addPointAtIndexPos(arguments[0],arguments[1])}this.updateLimits()},GPlot.prototype.setPointColors=function(a){this.mainLayer.setPointColors(a)},GPlot.prototype.setPointColor=function(a){this.mainLayer.setPointColor(a)},GPlot.prototype.setPointSizes=function(a){this.mainLayer.setPointSizes(a)},GPlot.prototype.setPointSize=function(a){this.mainLayer.setPointSize(a)},GPlot.prototype.setLineColor=function(a){this.mainLayer.setLineColor(a)},GPlot.prototype.setLineWidth=function(a){this.mainLayer.setLineWidth(a)},GPlot.prototype.setHistBasePoint=function(a){this.mainLayer.setHistBasePoint(a)},GPlot.prototype.setHistType=function(a){this.mainLayer.setHistType(a)},GPlot.prototype.setHistVisible=function(a){this.mainLayer.setHistVisible(a)},GPlot.prototype.setDrawHistLabels=function(a){this.mainLayer.setDrawHistLabels(a)},GPlot.prototype.setLabelBgColor=function(a){this.mainLayer.setLabelBgColor(a)},GPlot.prototype.setLabelSeparation=function(a){this.mainLayer.setLabelSeparation(a)},GPlot.prototype.setTitleText=function(a){this.title.setText(a)},GPlot.prototype.setAxesOffset=function(a){this.xAxis.setOffset(a),this.topAxis.setOffset(a),this.yAxis.setOffset(a),this.rightAxis.setOffset(a)},GPlot.prototype.setTicksLength=function(a){this.xAxis.setTickLength(a),this.topAxis.setTickLength(a),this.yAxis.setTickLength(a),this.rightAxis.setTickLength(a)},GPlot.prototype.setHorizontalAxesNTicks=function(a){this.xAxis.setNTicks(a),this.topAxis.setNTicks(a)},GPlot.prototype.setHorizontalAxesTicksSeparation=function(a){this.xAxis.setTicksSeparation(a),this.topAxis.setTicksSeparation(a)},GPlot.prototype.setHorizontalAxesTicks=function(a){this.xAxis.setTicks(a),this.topAxis.setTicks(a)},GPlot.prototype.setVerticalAxesNTicks=function(a){this.yAxis.setNTicks(a),this.rightAxis.setNTicks(a)},GPlot.prototype.setVerticalAxesTicksSeparation=function(a){this.yAxis.setTicksSeparation(a),this.rightAxis.setTicksSeparation(a)},GPlot.prototype.setVerticalAxesTicks=function(a){this.yAxis.setTicks(a),this.rightAxis.setTicks(a)},GPlot.prototype.setFontName=function(a){this.maniLayer.setFontName(a)},GPlot.prototype.setFontColor=function(a){this.maniLayer.setFontColor(a)},GPlot.prototype.setFontSize=function(a){this.maniLayer.setFontSize(a)},GPlot.prototype.setFontProperties=function(a,b,c){this.maniLayer.setFontProperties(a,b,c)},GPlot.prototype.setAllFontProperties=function(a,b,c){this.xAxis.setAllFontProperties(a,b,c),this.topAxis.setAllFontProperties(a,b,c),this.yAxis.setAllFontProperties(a,b,c),this.rightAxis.setAllFontProperties(a,b,c),this.title.setFontProperties(a,b,c),this.mainLayer.setAllFontProperties(a,b,c);for(var d=0;d0&&(this.zoomFactor=a),(b===this.parent.LEFT||b===this.parent.RIGHT||b===this.parent.CENTER)&&(this.increaseZoomButton=b),(c===this.parent.LEFT||c===this.parent.RIGHT||c===this.parent.CENTER)&&(this.decreaseZoomButton=c),(d===this.parent.SHIFT||d===this.parent.CONTROL||d===this.parent.ALT||d===GPlot.NONE)&&(this.increaseZoomKeyModifier=d),(e===this.parent.SHIFT||e===this.parent.CONTROL||e===this.parent.ALT||e===GPlot.NONE)&&(this.decreaseZoomKeyModifier=e)},GPlot.prototype.deactivateZooming=function(){this.zoomingIsActive=!1},GPlot.prototype.activateCentering=function(){var a,b;if(2===arguments.length)a=arguments[0],b=arguments[1];else if(1===arguments.length)a=arguments[0],b=GPlot.NONE;else{if(0!==arguments.length)throw new Error("GPlot.activateCentering(): signature not supported");a=this.parent.LEFT,b=GPlot.NONE}this.centeringIsActive=!0,(a===this.parent.LEFT||a===this.parent.RIGHT||a===this.parent.CENTER)&&(this.centeringButton=a),(b===this.parent.SHIFT||b===this.parent.CONTROL||b===this.parent.ALT||b===GPlot.NONE)&&(this.centeringKeyModifier=b)},GPlot.prototype.deactivateCentering=function(){this.centeringIsActive=!1},GPlot.prototype.activatePanning=function(){var a,b;if(2===arguments.length)a=arguments[0],b=arguments[1];else if(1===arguments.length)a=arguments[0],b=GPlot.NONE;else{if(0!==arguments.length)throw new Error("GPlot.activatePanning(): signature not supported");a=this.parent.LEFT,b=GPlot.NONE}this.panningIsActive=!0,(a===this.parent.LEFT||a===this.parent.RIGHT||a===this.parent.CENTER)&&(this.panningButton=a),(b===this.parent.SHIFT||b===this.parent.CONTROL||b===this.parent.ALT||b===GPlot.NONE)&&(this.panningKeyModifier=b)},GPlot.prototype.deactivatePanning=function(){this.panningIsActive=!1,this.panningReferencePoint=void 0},GPlot.prototype.activatePointLabels=function(){var a,b;if(2===arguments.length)a=arguments[0],b=arguments[1];else if(1===arguments.length)a=arguments[0],b=GPlot.NONE;else{if(0!==arguments.length)throw new Error("GPlot.activatePointLabels(): signature not supported");a=this.parent.LEFT,b=GPlot.NONE}this.labelingIsActive=!0,(a===this.parent.LEFT||a===this.parent.RIGHT||a===this.parent.CENTER)&&(this.labelingButton=a),(b===this.parent.SHIFT||b===this.parent.CONTROL||b===this.parent.ALT||b===GPlot.NONE)&&(this.labelingKeyModifier=b)},GPlot.prototype.deactivatePointLabels=function(){this.labelingIsActive=!1,this.mousePos=void 0},GPlot.prototype.activateReset=function(){var a,b;if(2===arguments.length)a=arguments[0],b=arguments[1];else if(1===arguments.length)a=arguments[0],b=GPlot.NONE;else{if(0!==arguments.length)throw new Error("GPlot.activateReset(): signature not supported");a=this.parent.RIGHT,b=GPlot.NONE}this.resetIsActive=!0,this.xLimReset=void 0,this.yLimReset=void 0,(a===this.parent.LEFT||a===this.parent.RIGHT||a===this.parent.CENTER)&&(this.resetButton=a),(b===this.parent.SHIFT||b===this.parent.CONTROL||b===this.parent.ALT||b===GPlot.NONE)&&(this.resetKeyModifier=b)},GPlot.prototype.deactivateReset=function(){this.resetIsActive=!1,this.xLimReset=void 0,this.yLimReset=void 0},GPlot.prototype.getButton=function(a){var b;return 0===a.button?b=this.parent.LEFT:1===a.button?b=this.parent.CENTER:2===a.button?b=this.parent.RIGHT:"undefined"==typeof a.button&&(b=this.parent.LEFT),b},GPlot.prototype.getModifier=function(a){var b;return b=a.altKey?this.parent.ALT:a.ctrlKey?this.parent.CONTROL:a.shiftKey?this.parent.SHIFT:GPlot.NONE},GPlot.prototype.saveResetLimits=function(){("undefined"==typeof this.xLimReset||"undefined"==typeof this.yLimReset)&&(this.xLimReset=this.xLim.slice(),this.yLimReset=this.yLim.slice())},GPlot.prototype.panningFunction=function(){"undefined"!=typeof this.panningReferencePoint&&this.align(this.panningReferencePoint,this.parent.mouseX,this.parent.mouseY)},GPlot.prototype.clickEvent=function(a){if(e=a||window.event,this.isOverBox()){var b=this.getButton(e),c=this.getModifier(e);this.zoomingIsActive&&(b===this.increaseZoomButton&&c===this.increaseZoomKeyModifier?(this.resetIsActive&&this.saveResetLimits(),this.zoom(this.zoomFactor,this.parent.mouseX,this.parent.mouseY)):b===this.decreaseZoomButton&&c===this.decreaseZoomKeyModifier&&(this.resetIsActive&&this.saveResetLimits(),this.zoom(1/this.zoomFactor,this.parent.mouseX,this.parent.mouseY))),this.centeringIsActive&&b===this.centeringButton&&c===this.centeringKeyModifier&&(this.resetIsActive&&this.saveResetLimits(), +this.center(this.parent.mouseX,this.parent.mouseY)),this.resetIsActive&&b===this.resetButton&&c===this.resetKeyModifier&&"undefined"!=typeof this.xLimReset&&"undefined"!=typeof this.yLimReset&&(this.setXLim(this.xLimReset),this.setYLim(this.yLimReset),this.xLimReset=void 0,this.yLimReset=void 0)}},GPlot.prototype.mouseDownEvent=function(a){if(e=a||window.event,this.isOverBox()){var b=this.getButton(e),c=this.getModifier(e);this.panningIsActive&&b===this.panningButton&&c===this.panningKeyModifier&&(this.resetIsActive&&this.saveResetLimits(),this.panningReferencePoint=this.getValueAt(this.parent.mouseX,this.parent.mouseY),this.panningIntervalId=setInterval(this.panningFunction.bind(this),100)),this.labelingIsActive&&b===this.labelingButton&&c===this.labelingKeyModifier&&(this.mousePos=[this.parent.mouseX,this.parent.mouseY])}},GPlot.prototype.mouseUpEvent=function(a){e=a||window.event;{var b=this.getButton(e);this.getModifier(e)}this.panningIsActive&&b===this.panningButton&&"undefined"!=typeof this.panningIntervalId&&(clearInterval(this.panningIntervalId),this.panningIntervalId=void 0,this.panningReferencePoint=void 0),this.labelingIsActive&&b===this.labelingButton&&(this.mousePos=void 0),b===this.parent.RIGHT&&this.clickEvent(e)},GPlot.prototype.wheelEvent=function(a){if(e=a||window.event,this.isOverBox()){var b=e.deltaY,c=this.parent.CENTER,d=this.getModifier(e);this.zoomingIsActive&&(c===this.increaseZoomButton&&d===this.increaseZoomKeyModifier&&b>0?(this.resetIsActive&&this.saveResetLimits(),this.zoom(this.zoomFactor,this.parent.mouseX,this.parent.mouseY)):c===this.decreaseZoomButton&&d===this.decreaseZoomKeyModifier&&0>b&&(this.resetIsActive&&this.saveResetLimits(),this.zoom(1/this.zoomFactor,this.parent.mouseX,this.parent.mouseY)))}},GPlot.prototype.preventDefaultEvent=function(a){e=a||window.event,this.isOverBox()&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},GPlot.prototype.preventWheelDefault=function(){window.addEventListener("wheel",this.preventDefaultEvent.bind(this),!1)},GPlot.prototype.preventRightClickDefault=function(){window.addEventListener("contextmenu",this.preventDefaultEvent.bind(this),!1)}; diff --git a/docs/_site/graficos/grafica-0.1.0.min.js b/docs/_site/graficos/grafica-0.1.0.min.js new file mode 100644 index 0000000..6e86b8a --- /dev/null +++ b/docs/_site/graficos/grafica-0.1.0.min.js @@ -0,0 +1,5 @@ +/*! grafica.js (0.1.0): a library for p5.js. Author: Javier Graciá Carpio, license: LGPL-3.0, 2015-04-12 */ function GPoint(){var a,b,c;if(3===arguments.length)a=arguments[0],b=arguments[1],c=arguments[2];else if(2===arguments.length&&arguments[0]instanceof p5.Vector)a=arguments[0].x,b=arguments[0].y,c=arguments[1];else if(2===arguments.length)a=arguments[0],b=arguments[1],c="";else if(1===arguments.length&&arguments[0]instanceof GPoint)a=arguments[0].getX(),b=arguments[0].getY(),c=arguments[0].getLabel();else if(1===arguments.length&&arguments[0]instanceof p5.Vector)a=arguments[0].x,b=arguments[0].y,c="";else{if(0!==arguments.length)throw new Error("GPoint constructor: signature not supported");a=0,b=0,c=""}this.x=a,this.y=b,this.label=c,this.valid=this.isValidNumber(this.x)&&this.isValidNumber(this.y)}function GTitle(a,b){this.parent=a,this.dim=b.slice(),this.relativePos=.5,this.plotPos=this.relativePos*this.dim[0],this.offset=10,this.text="",this.textAlignment=this.parent.CENTER,this.fontName="Helvetica",this.fontColor=this.parent.color(100),this.fontStyle=this.parent.BOLD,this.fontSize=13}function GAxisLabel(a,b,c){this.parent=a,this.type=b===this.parent.BOTTOM||b===this.parent.TOP||b===this.parent.LEFT||b===this.parent.RIGHT?b:this.parent.BOTTOM,this.dim=c.slice(),this.relativePos=.5,this.plotPos=this.type===this.parent.BOTTOM||this.type===this.parent.TOP?this.relativePos*this.dim[0]:-this.relativePos*this.dim[1],this.offset=35,this.rotate=this.type===this.parent.BOTTOM||this.type===this.parent.TOP?!1:!0,this.text="",this.textAlignment=this.parent.CENTER,this.fontName="Helvetica",this.fontColor=this.parent.color(0),this.fontSize=13}function GAxis(a,b,c,d,e){this.parent=a,this.type=b===this.parent.BOTTOM||b===this.parent.TOP||b===this.parent.LEFT||b===this.parent.RIGHT?b:this.parent.BOTTOM,this.dim=c.slice(),this.lim=d.slice(),this.log=e,this.log&&(this.lim[0]<=0||this.lim[1]<=0)&&(console.log("The limits are negative. This is not allowed in logarithmic scale."),console.log("Will set them to (0.1, 10)"),this.lim[1]>this.lim[0]?(this.lim[0]=.1,this.lim[1]=10):(this.lim[0]=10,this.lim[1]=.1)),this.offset=5,this.lineColor=this.parent.color(0),this.lineWidth=1,this.nTicks=5,this.ticksSeparation=-1,this.ticks=[],this.plotTicks=[],this.ticksInside=[],this.tickLabels=[],this.fixedTicks=!1,this.tickLength=3,this.smallTickLength=2,this.expTickLabels=!1,this.rotateTickLabels=this.type===this.parent.BOTTOM||this.type===this.parent.TOP?!1:!0,this.drawTickLabels=this.type===this.parent.BOTTOM||this.type===this.parent.LEFT?!0:!1,this.tickLabelOffset=7,this.ticksPrecision=void 0,this.lab=new GAxisLabel(this.parent,this.type,this.dim),this.drawAxisLabel=!0,this.fontName="Helvetica",this.fontColor=this.parent.color(0),this.fontSize=11,this.updateTicks(),this.updatePlotTicks(),this.updateTicksInside(),this.updateTickLabels()}function GHistogram(a,b,c,d){this.parent=a,this.type=b===GPlot.VERTICAL||b===GPlot.HORIZONTAL?b:GPlot.VERTICAL,this.dim=c.slice(),this.plotPoints=[];for(var e=0;e0&&b>0&&(this.dim[0]=a,this.dim[1]=b,this.plotPos=this.relativePos*this.dim[0])},GTitle.prototype.setRelativePos=function(a){this.relativePos=a,this.plotPos=this.relativePos*this.dim[0]},GTitle.prototype.setOffset=function(a){this.offset=a},GTitle.prototype.setText=function(a){this.text=a},GTitle.prototype.setTextAlignment=function(a){(a===this.parent.CENTER||a===this.parent.LEFT||a===this.parent.RIGHT)&&(this.textAlignment=a)},GTitle.prototype.setFontName=function(a){this.fontName=a},GTitle.prototype.setFontColor=function(a){this.fontColor=a},GTitle.prototype.setFontStyle=function(a){this.fontStyle=a},GTitle.prototype.setFontSize=function(a){a>0&&(this.fontSize=a)},GTitle.prototype.setFontProperties=function(a,b,c){c>0&&(this.fontName=a,this.fontColor=b,this.fontSize=c)},GAxisLabel.prototype.draw=function(){switch(this.type){case this.parent.BOTTOM:this.drawAsXLabel();break;case this.parent.LEFT:this.drawAsYLabel();break;case this.parent.TOP:this.drawAsTopLabel();break;case this.parent.RIGHT:this.drawAsRightLabel()}},GAxisLabel.prototype.drawAsXLabel=function(){this.parent.push(),this.parent.textFont(this.fontName),this.parent.textSize(this.fontSize),this.parent.fill(this.fontColor),this.parent.noStroke(),this.rotate?(this.parent.textAlign(this.parent.RIGHT,this.parent.CENTER),this.parent.translate(this.plotPos,this.offset),this.parent.rotate(-.5*Math.PI),this.parent.text(this.text,0,0)):(this.parent.textAlign(this.textAlignment,this.parent.TOP),this.parent.text(this.text,this.plotPos,this.offset)),this.parent.pop()},GAxisLabel.prototype.drawAsYLabel=function(){this.parent.push(),this.parent.textFont(this.fontName),this.parent.textSize(this.fontSize),this.parent.fill(this.fontColor),this.parent.noStroke(),this.rotate?(this.parent.textAlign(this.textAlignment,this.parent.BOTTOM),this.parent.translate(-this.offset,this.plotPos),this.parent.rotate(-.5*Math.PI),this.parent.text(this.text,0,0)):(this.parent.textAlign(this.parent.RIGHT,this.parent.CENTER),this.parent.text(this.text,-this.offset,this.plotPos)),this.parent.pop()},GAxisLabel.prototype.drawAsTopLabel=function(){this.parent.push(),this.parent.textFont(this.fontName),this.parent.textSize(this.fontSize),this.parent.fill(this.fontColor),this.parent.noStroke(),this.rotate?(this.parent.textAlign(this.parent.LEFT,this.parent.CENTER),this.parent.translate(this.plotPos,-this.offset-this.dim[1]),this.parent.rotate(-.5*Math.PI),this.parent.text(this.text,0,0)):(this.parent.textAlign(this.textAlignment,this.parent.BOTTOM),this.parent.text(this.text,this.plotPos,-this.offset-this.dim[1])),this.parent.pop()},GAxisLabel.prototype.drawAsRightLabel=function(){this.parent.push(),this.parent.textFont(this.fontName),this.parent.textSize(this.fontSize),this.parent.fill(this.fontColor),this.parent.noStroke(),this.rotate?(this.parent.textAlign(this.textAlignment,this.parent.TOP),this.parent.translate(this.offset+this.dim[0],this.plotPos),this.parent.rotate(-.5*Math.PI),this.parent.text(this.text,0,0)):(this.parent.textAlign(this.parent.LEFT,this.parent.CENTER),this.parent.text(this.text,this.offset+this.dim[0],this.plotPos)),this.parent.pop()},GAxisLabel.prototype.setDim=function(){var a,b;if(2===arguments.length)a=arguments[0],b=arguments[1];else{if(1!==arguments.length)throw new Error("GAxisLabel.setDim(): signature not supported");a=arguments[0][0],b=arguments[0][1]}a>0&&b>0&&(this.dim[0]=a,this.dim[1]=b,this.plotPos=this.type===this.parent.BOTTOM||this.type===this.parent.TOP?this.relativePos*this.dim[0]:-this.relativePos*this.dim[1])},GAxisLabel.prototype.setRelativePos=function(a){this.relativePos=a,this.plotPos=this.type===this.parent.BOTTOM||this.type===this.parent.TOP?this.relativePos*this.dim[0]:-this.relativePos*this.dim[1]},GAxisLabel.prototype.setOffset=function(a){this.offset=a},GAxisLabel.prototype.setRotate=function(a){this.rotate=a},GAxisLabel.prototype.setText=function(a){this.text=a},GAxisLabel.prototype.setTextAlignment=function(a){(a===this.parent.CENTER||a===this.parent.LEFT||a===this.parent.RIGHT)&&(this.textAlignment=a)},GAxisLabel.prototype.setFontName=function(a){this.fontName=a},GAxisLabel.prototype.setFontColor=function(a){this.fontColor=a},GAxisLabel.prototype.setFontSize=function(a){a>0&&(this.fontSize=a)},GAxisLabel.prototype.setFontProperties=function(a,b,c){c>0&&(this.fontName=a,this.fontColor=b,this.fontSize=c)},GAxis.prototype.obtainSigDigits=function(a){return Math.round(-Math.log(.5*Math.abs(a))/Math.LN10)},GAxis.prototype.roundPlus=function(a,b){return a=Math.round(a*Math.pow(10,b))/Math.pow(10,b),0>=b&&(a=Math.round(a)),a},GAxis.prototype.adaptSize=function(a,b){bthis.lim[0]?(a=Math.floor(Math.log(this.lim[0])/Math.LN10),b=Math.ceil(Math.log(this.lim[1])/Math.LN10)):(a=Math.floor(Math.log(this.lim[1])/Math.LN10),b=Math.ceil(Math.log(this.lim[0])/Math.LN10));var c=9*(b-a)+1;this.adaptSize(this.ticks,c);for(var d=a;b>d;d++)for(var e=this.roundPlus(Math.exp(d*Math.LN10),-d),f=0;9>f;f++)this.ticks[9*(d-a)+f]=(f+1)*e;this.ticks[this.ticks.length-1]=this.roundPlus(Math.exp(b*Math.LN10),-d),this.lim[1]0){for(a=this.lim[1]>this.lim[0]?this.ticksSeparation:-this.ticksSeparation,c=this.obtainSigDigits(a);this.roundPlus(a,c)-a!==0;)c++;b=Math.floor((this.lim[1]-this.lim[0])/a)}else this.nTicks>0&&(a=(this.lim[1]-this.lim[0])/this.nTicks,c=this.obtainSigDigits(a),a=this.roundPlus(a,c),(0===a||Math.abs(a)>Math.abs(this.lim[1]-this.lim[0]))&&(c++,a=this.roundPlus((this.lim[1]-this.lim[0])/this.nTicks,c)),b=Math.floor((this.lim[1]-this.lim[0])/a));if(b>0){var d=this.lim[0]+(this.lim[1]-this.lim[0]-b*a)/2;for(d=this.roundPlus(d-2*a,c);(this.lim[1]-d)*(this.lim[0]-d)>0;)d=this.roundPlus(d+a,c);var e=Math.floor(Math.abs((this.lim[1]-d)/a))+1;this.adaptSize(this.ticks,e),this.ticks[0]=d;for(var f=1;e>f;f++)this.ticks[f]=this.roundPlus(this.ticks[f-1]+a,c);this.ticksPrecision=c}else this.ticks=[]},GAxis.prototype.updatePlotTicks=function(){var a,b,c=this.ticks.length;if(this.adaptSize(this.plotTicks,c),this.log)for(a=this.type===this.parent.BOTTOM||this.type===this.parent.TOP?this.dim[0]/Math.log(this.lim[1]/this.lim[0]):-this.dim[1]/Math.log(this.lim[1]/this.lim[0]),b=0;c>b;b++)this.plotTicks[b]=Math.log(this.ticks[b]/this.lim[0])*a;else for(a=this.type===this.parent.BOTTOM||this.type===this.parent.TOP?this.dim[0]/(this.lim[1]-this.lim[0]):-this.dim[1]/(this.lim[1]-this.lim[0]),b=0;c>b;b++)this.plotTicks[b]=(this.ticks[b]-this.lim[0])*a},GAxis.prototype.updateTicksInside=function(){var a,b=this.ticks.length;if(this.adaptSize(this.ticksInside,b),this.type===this.parent.BOTTOM||this.type===this.parent.TOP)for(a=0;b>a;a++)this.ticksInside[a]=this.plotTicks[a]>=0&&this.plotTicks[a]<=this.dim[0];else for(a=0;b>a;a++)this.ticksInside[a]=-this.plotTicks[a]>=0&&-this.plotTicks[a]<=this.dim[1]},GAxis.prototype.updateTickLabels=function(){var a,b,c,d,e=this.ticks.length;if(this.adaptSize(this.tickLabels,e),this.log)for(d=0;e>d;d++)a=this.ticks[d],a>0?(b=Math.log(a)/Math.LN10,c=Math.abs(b-Math.round(b))<1e-4,c?(b=Math.round(b),this.tickLabels[d]=this.expTickLabels?"1e"+b:b>-3.1&&3.1>b?b>=0?""+Math.round(a):""+a:"1e"+b):this.tickLabels[d]=""):this.tickLabels[d]="";else for(d=0;e>d;d++)a=this.ticks[d],this.tickLabels[d]=a%1===0?""+Math.round(a):"undefined"!=typeof this.ticksPrecision&&this.ticksPrecision>=0?""+parseFloat(a).toFixed(this.ticksPrecision):""+a},GAxis.prototype.moveLim=function(a){if(a[1]!==a[0])if(this.log&&(a[0]<=0||a[1]<=0))console.log("The limits are negative. This is not allowed in logarithmic scale.");else{if(this.lim[0]=a[0],this.lim[1]=a[1],!this.fixedTicks){var b=this.ticks.length;if(this.log)this.obtainLogarithmicTicks();else if(b>0){var c=0,d=0;if(this.ticksSeparation>0)for(c=this.lim[1]>this.lim[0]?this.ticksSeparation:-this.ticksSeparation,d=this.obtainSigDigits(c);this.roundPlus(c,d)-c!==0;)d++;else c=1===b?this.lim[1]-this.lim[0]:this.ticks[1]-this.ticks[0],d=this.obtainSigDigits(c),c=this.roundPlus(c,d),(0===c||Math.abs(c)>Math.abs(this.lim[1]-this.lim[0]))&&(d++,c=1===b?this.lim[1]-this.lim[0]:this.ticks[1]-this.ticks[0],c=this.roundPlus(c,d)),c=this.lim[1]>this.lim[0]?Math.abs(c):-Math.abs(c);var e=this.ticks[0]+c*Math.ceil((this.lim[0]-this.ticks[0])/c);e=this.roundPlus(e,d),(this.lim[1]-e)*(this.lim[0]-e)>0&&(e=this.ticks[0]+c*Math.floor((this.lim[0]-this.ticks[0])/c),e=this.roundPlus(e,d)),b=Math.floor(Math.abs((this.lim[1]-e)/c))+1,this.adaptSize(this.ticks,b),this.ticks[0]=e;for(var f=1;b>f;f++)this.ticks[f]=this.roundPlus(this.ticks[f-1]+c,d);this.ticksPrecision!==d&&console.log("There is a problem in the axis ticks precision calculation")}this.updateTickLabels()}this.updatePlotTicks(),this.updateTicksInside()}},GAxis.prototype.draw=function(){switch(this.type){case this.parent.BOTTOM:this.drawAsXAxis();break;case this.parent.LEFT:this.drawAsYAxis();break;case this.parent.TOP:this.drawAsTopAxis();break;case this.parent.RIGHT:this.drawAsRightAxis()}this.drawAxisLabel&&this.lab.draw()},GAxis.prototype.drawAsXAxis=function(){var a;for(this.parent.push(),this.parent.stroke(this.lineColor),this.parent.strokeWeight(this.lineWidth),this.parent.strokeCap(this.parent.SQUARE),this.parent.line(0,this.offset,this.dim[0],this.offset),a=0;a0&&b>0&&(this.dim[0]=a,this.dim[1]=b,this.updatePlotTicks(),this.lab.setDim(this.dim))},GAxis.prototype.setLim=function(a){a[1]!==a[0]&&(this.log&&(a[0]<=0||a[1]<=0)?console.log("One of the limits is negative. This is not allowed in logarithmic scale."):(this.lim[0]=a[0],this.lim[1]=a[1],this.fixedTicks||(this.updateTicks(),this.updateTickLabels()),this.updatePlotTicks(),this.updateTicksInside()))},GAxis.prototype.setLimAndLog=function(a,b){a[1]!==a[0]&&(b&&(a[0]<=0||a[1]<=0)?console.log("One of the limits is negative. This is not allowed in logarithmic scale."):(this.lim[0]=a[0],this.lim[1]=a[1],this.log=b,this.fixedTicks||(this.updateTicks(),this.updateTickLabels()),this.updatePlotTicks(),this.updateTicksInside()))},GAxis.prototype.setLog=function(a){a!==this.log&&(this.log=a,this.log&&(this.lim[0]<=0||this.lim[1]<=0)&&(console.log("The limits are negative. This is not allowed in logarithmic scale."),console.log("Will set them to (0.1, 10)"),this.lim[1]>this.lim[0]?(this.lim[0]=.1,this.lim[1]=10):(this.lim[0]=10,this.lim[1]=.1)),this.fixedTicks||(this.updateTicks(),this.updateTickLabels()),this.updatePlotTicks(),this.updateTicksInside())},GAxis.prototype.setOffset=function(a){this.offset=a},GAxis.prototype.setLineColor=function(a){this.lineColor=a},GAxis.prototype.setLineWidth=function(a){a>0&&(this.lineWidth=a)},GAxis.prototype.setNTicks=function(a){a>=0&&(this.nTicks=a,this.ticksSeparation=-1,this.log||(this.fixedTicks=!1,this.updateTicks(),this.updatePlotTicks(),this.updateTicksInside(),this.updateTickLabels()))},GAxis.prototype.setTicksSeparation=function(a){this.ticksSeparation=a,this.log||(this.fixedTicks=!1,this.updateTicks(),this.updatePlotTicks(),this.updateTicksInside(),this.updateTickLabels())},GAxis.prototype.setTicks=function(a){var b=a.length;this.adaptSize(this.ticks,b);for(var c=0;b>c;c++)this.ticks[c]=a[c];this.fixedTicks=!0,this.ticksPrecision=void 0,this.updatePlotTicks(),this.updateTicksInside(),this.updateTickLabels()},GAxis.prototype.setTickLabels=function(a){if(a.length===this.tickLabels.length){for(var b=0;b0&&(this.fontSize=a)},GAxis.prototype.setFontProperties=function(a,b,c){c>0&&(this.fontName=a,this.fontColor=b,this.fontSize=c)},GAxis.prototype.setAllFontProperties=function(a,b,c){this.setFontProperties(a,b,c),this.lab.setFontProperties(a,b,c)},GAxis.prototype.getTicks=function(){if(this.fixedTicks)return this.ticks.slice();for(var a=[],b=0,c=0;cb&&(this.differences.splice(b,Number.MAX_VALUE),this.leftSides.splice(b,Number.MAX_VALUE),this.rightSides.splice(b,Number.MAX_VALUE)),1===b)this.leftSides[0]=this.type===GPlot.VERTICAL?.2*this.dim[0]:.2*this.dim[1],this.rightSides[0]=this.leftSides[0];else if(b>1){for(a=0;b-1>a;a++)if(this.plotPoints[a].isValid()&&this.plotPoints[a+1].isValid()){var c,d=this.separations[a%this.separations.length];c=this.type===GPlot.VERTICAL?this.plotPoints[a+1].getX()-this.plotPoints[a].getX():this.plotPoints[a+1].getY()-this.plotPoints[a].getY(),this.differences[a]=c>0?(c-d)/2:(c+d)/2}else this.differences[a]=0;for(this.leftSides[0]=this.differences[0],this.rightSides[0]=this.differences[0],a=1;b-1>a;a++)this.leftSides[a]=this.differences[a-1],this.rightSides[a]=this.differences[a];this.leftSides[b-1]=this.differences[b-2],this.rightSides[b-1]=this.differences[b-2]}},GHistogram.prototype.draw=function(a){if(this.visible){var b=0;a.isValid()&&(b=this.type===GPlot.VERTICAL?a.getY():a.getX());var c,d,e,f,g,h,i=this.plotPoints.length;this.parent.push(),this.parent.rectMode(this.parent.CORNERS),this.parent.strokeCap(this.parent.SQUARE);for(var j=0;i>j;j++)c=this.plotPoints[j],c.isValid()&&(this.type===GPlot.VERTICAL?(d=c.getX()-this.leftSides[j],e=c.getX()+this.rightSides[j],f=c.getY(),g=b):(d=b,e=c.getX(),f=c.getY()-this.leftSides[j],g=c.getY()+this.rightSides[j]),0>d?d=0:d>this.dim[0]&&(d=this.dim[0]),0>-f?f=0:-f>this.dim[1]&&(f=-this.dim[1]),0>e?e=0:e>this.dim[0]&&(e=this.dim[0]),0>-g?g=0:-g>this.dim[1]&&(g=-this.dim[1]),h=this.lineWidths[j%this.lineWidths.length],this.parent.fill(this.bgColors[j%this.bgColors.length]),this.parent.stroke(this.lineColors[j%this.lineColors.length]),this.parent.strokeWeight(h),Math.abs(e-d)>2*h&&Math.abs(g-f)>2*h?this.parent.rect(d,f,e,g):(this.type===GPlot.VERTICAL&&e!==d&&(f!==g||0!==f&&f!==-this.dim[1])||this.type===GPlot.HORIZONTAL&&g!==f&&(d!==e||0!==d&&d!==this.dim[0]))&&(this.parent.rect(d,f,e,g),this.parent.line(d,f,d,g),this.parent.line(e,f,e,g),this.parent.line(d,f,e,f),this.parent.line(d,g,e,g)));this.parent.pop(),this.drawLabels&&this.drawHistLabels()}},GHistogram.prototype.drawHistLabels=function(){var a,b,c=this.plotPoints.length,d=.5*Math.PI;if(this.parent.push(),this.parent.textFont(this.fontName),this.parent.textSize(this.fontSize),this.parent.fill(this.fontColor),this.parent.noStroke(),this.type===GPlot.VERTICAL)if(this.rotateLabels)for(this.parent.textAlign(this.parent.RIGHT,this.parent.CENTER),b=0;c>b;b++)a=this.plotPoints[b],a.isValid()&&a.getX()>=0&&a.getX()<=this.dim[0]&&(this.parent.push(),this.parent.translate(a.getX(),this.labelsOffset),this.parent.rotate(-d),this.parent.text(a.getLabel(),0,0),this.parent.pop());else for(this.parent.textAlign(this.parent.CENTER,this.parent.TOP),b=0;c>b;b++)a=this.plotPoints[b],a.isValid()&&a.getX()>=0&&a.getX()<=this.dim[0]&&this.parent.text(a.getLabel(),a.getX(),this.labelsOffset);else if(this.rotateLabels)for(this.parent.textAlign(this.parent.CENTER,this.parent.BOTTOM),b=0;c>b;b++)a=this.plotPoints[b],a.isValid()&&-a.getY()>=0&&-a.getY()<=this.dim[1]&&(this.parent.push(),this.parent.translate(-this.labelsOffset,a.getY()),this.parent.rotate(-d),this.parent.text(a.getLabel(),0,0),this.parent.pop());else for(this.parent.textAlign(this.parent.RIGHT,this.parent.CENTER),b=0;c>b;b++)a=this.plotPoints[b],a.isValid()&&-a.getY()>=0&&-a.getY()<=this.dim[1]&&this.parent.text(a.getLabel(),-this.labelsOffset,a.getY());this.parent.pop()},GHistogram.prototype.setType=function(a){a===this.type||a!==GPlot.VERTICAL&&a!==GPlot.HORIZONTAL||(this.type=a,this.updateArrays())},GHistogram.prototype.setDim=function(){var a,b;if(2===arguments.length)a=arguments[0],b=arguments[1];else{if(1!==arguments.length)throw new Error("GHistogram.setDim(): signature not supported"); + +a=arguments[0][0],b=arguments[0][1]}a>0&&b>0&&(this.dim[0]=a,this.dim[1]=b,this.updateArrays())},GHistogram.prototype.setPlotPoints=function(a){var b,c=a.length;if(this.plotPoints.length===c)for(b=0;c>b;b++)this.plotPoints[b].set(a[b]);else if(this.plotPoints.length>c){for(b=0;c>b;b++)this.plotPoints[b].set(a[b]);this.plotPoints.splice(c,Number.MAX_VALUE)}else{for(b=0;bb;b++)this.plotPoints[b]=new GPoint(a[b])}this.updateArrays()},GHistogram.prototype.setPlotPoint=function(a,b){if(a0&&(this.fontSize=a)},GHistogram.prototype.setFontProperties=function(a,b,c){c>0&&(this.fontName=a,this.fontColor=b,this.fontSize=c)},GLayer.prototype.isValidNumber=function(a){return!isNaN(a)&&isFinite(a)},GLayer.prototype.isId=function(a){return this.id===a},GLayer.prototype.valueToXPlot=function(a){return this.xLog?this.dim[0]*Math.log(a/this.xLim[0])/Math.log(this.xLim[1]/this.xLim[0]):this.dim[0]*(a-this.xLim[0])/(this.xLim[1]-this.xLim[0])},GLayer.prototype.valueToYPlot=function(a){return this.yLog?-this.dim[1]*Math.log(a/this.yLim[0])/Math.log(this.yLim[1]/this.yLim[0]):-this.dim[1]*(a-this.yLim[0])/(this.yLim[1]-this.yLim[0])},GLayer.prototype.valueToPlot=function(){if(2===arguments.length)return[this.valueToXPlot(arguments[0]),this.valueToYPlot(arguments[1])];if(1===arguments.length&&arguments[0]instanceof GPoint)return new GPoint(this.valueToXPlot(arguments[0].getX()),this.valueToYPlot(arguments[0].getY()),arguments[0].getLabel());if(1===arguments.length&&arguments[0]instanceof Array&&arguments[0][0]instanceof GPoint){var a,b,c,d,e,f,g=arguments[0].length,h=[];if(this.xLog&&this.yLog)for(a=this.dim[0]/Math.log(this.xLim[1]/this.xLim[0]),b=-this.dim[1]/Math.log(this.yLim[1]/this.yLim[0]),f=0;g>f;f++)c=arguments[0][f],d=Math.log(c.getX()/this.xLim[0])*a,e=Math.log(c.getY()/this.yLim[0])*b,h[f]=new GPoint(d,e,c.getLabel());else if(this.xLog)for(a=this.dim[0]/Math.log(this.xLim[1]/this.xLim[0]),b=-this.dim[1]/(this.yLim[1]-this.yLim[0]),f=0;g>f;f++)c=arguments[0][f],d=Math.log(c.getX()/this.xLim[0])*a,e=(c.getY()-this.yLim[0])*b,h[f]=new GPoint(d,e,c.getLabel());else if(this.yLog)for(a=this.dim[0]/(this.xLim[1]-this.xLim[0]),b=-this.dim[1]/Math.log(this.yLim[1]/this.yLim[0]),f=0;g>f;f++)c=arguments[0][f],d=(c.getX()-this.xLim[0])*a,e=Math.log(c.getY()/this.yLim[0])*b,h[f]=new GPoint(d,e,c.getLabel());else for(a=this.dim[0]/(this.xLim[1]-this.xLim[0]),b=-this.dim[1]/(this.yLim[1]-this.yLim[0]),f=0;g>f;f++)c=arguments[0][f],d=(c.getX()-this.xLim[0])*a,e=(c.getY()-this.yLim[0])*b,h[f]=new GPoint(d,e,c.getLabel());return h}throw new Error("GLayer.valueToPlot(): signature not supported")},GLayer.prototype.updatePlotPoints=function(){var a,b,c,d,e,f,g=this.points.length;if(this.plotPoints.lengthf;f++)this.plotPoints[f]=new GPoint;else this.plotPoints.length>g&&this.plotPoints.splice(g,Number.MAX_VALUE);if(this.xLog&&this.yLog)for(a=this.dim[0]/Math.log(this.xLim[1]/this.xLim[0]),b=-this.dim[1]/Math.log(this.yLim[1]/this.yLim[0]),f=0;g>f;f++)c=this.points[f],d=Math.log(c.getX()/this.xLim[0])*a,e=Math.log(c.getY()/this.yLim[0])*b,this.plotPoints[f].set(d,e,c.getLabel());else if(this.xLog)for(a=this.dim[0]/Math.log(this.xLim[1]/this.xLim[0]),b=-this.dim[1]/(this.yLim[1]-this.yLim[0]),f=0;g>f;f++)c=this.points[f],d=Math.log(c.getX()/this.xLim[0])*a,e=(c.getY()-this.yLim[0])*b,this.plotPoints[f].set(d,e,c.getLabel());else if(this.yLog)for(a=this.dim[0]/(this.xLim[1]-this.xLim[0]),b=-this.dim[1]/Math.log(this.yLim[1]/this.yLim[0]),f=0;g>f;f++)c=this.points[f],d=(c.getX()-this.xLim[0])*a,e=Math.log(c.getY()/this.yLim[0])*b,this.plotPoints[f].set(d,e,c.getLabel());else for(a=this.dim[0]/(this.xLim[1]-this.xLim[0]),b=-this.dim[1]/(this.yLim[1]-this.yLim[0]),f=0;g>f;f++)c=this.points[f],d=(c.getX()-this.xLim[0])*a,e=(c.getY()-this.yLim[0])*b,this.plotPoints[f].set(d,e,c.getLabel())},GLayer.prototype.xPlotToValue=function(a){return this.xLog?Math.exp(Math.log(this.xLim[0])+Math.log(this.xLim[1]/this.xLim[0])*a/this.dim[0]):this.xLim[0]+(this.xLim[1]-this.xLim[0])*a/this.dim[0]},GLayer.prototype.yPlotToValue=function(a){return this.yLog?Math.exp(Math.log(this.yLim[0])-Math.log(this.yLim[1]/this.yLim[0])*a/this.dim[1]):this.yLim[0]-(this.yLim[1]-this.yLim[0])*a/this.dim[1]},GLayer.prototype.plotToValue=function(a,b){return[this.xPlotToValue(a),this.yPlotToValue(b)]},GLayer.prototype.isInside=function(){var a,b,c;if(2===arguments.length)a=arguments[0],b=arguments[1],c=this.isValidNumber(a)&&this.isValidNumber(b);else{if(!(1===arguments.length&&arguments[0]instanceof GPoint))throw new Error("GLayer.isInside(): signature not supported");a=arguments[0].getX(),b=arguments[0].getY(),c=arguments[0].isValid()}return c?a>=0&&a<=this.dim[0]&&-b>=0&&-b<=this.dim[1]:!1},GLayer.prototype.updateInsideList=function(){for(var a,b=this.plotPoints.length,c=0;b>c;c++)a=this.plotPoints[c],this.inside[c]=a.isValid()?a.getX()>=0&&a.getX()<=this.dim[0]&&-a.getY()>=0&&-a.getY()<=this.dim[1]:!1;this.inside.length>b&&this.inside.splice(b,Number.MAX_VALUE)},GLayer.prototype.getPointIndexAtPlotPos=function(a,b){var c;if(this.isInside(a,b))for(var d,e,f=25,g=this.plotPoints.length,h=0;g>h;h++)this.inside[h]&&(d=this.plotPoints[h],e=Math.pow(d.getX()-a,2)+Math.pow(d.getY()-b,2),f>e&&(f=e,c=h));return c},GLayer.prototype.getPointAtPlotPos=function(a,b){return this.points[this.getPointIndexAtPlotPos(a,b)]},GLayer.prototype.obtainBoxIntersections=function(a,b){var c=0;if(a.isValid()&&b.isValid()){var d=a.getX(),e=a.getY(),f=b.getX(),g=b.getY(),h=this.isInside(d,e),i=this.isInside(f,g),j=h&&i||0>d&&0>f||d>this.dim[0]&&f>this.dim[0]||0>-e&&0>-g||-e>this.dim[1]&&-g>this.dim[1];if(!j){var k=f-d,l=g-e;if(0===k)c=2,this.cuts[0][0]=d,this.cuts[0][1]=0,this.cuts[1][0]=d,this.cuts[1][1]=-this.dim[1];else if(0===l)c=2,this.cuts[0][0]=0,this.cuts[0][1]=e,this.cuts[1][0]=this.dim[0],this.cuts[1][1]=e;else{var m=l/k,n=e-m*d;c=4,this.cuts[0][0]=-n/m,this.cuts[0][1]=0,this.cuts[1][0]=(-this.dim[1]-n)/m,this.cuts[1][1]=-this.dim[1],this.cuts[2][0]=0,this.cuts[2][1]=n,this.cuts[3][0]=this.dim[0],this.cuts[3][1]=n+m*this.dim[0]}if(c=this.getValidCuts(this.cuts,c,a,b),h||i){if(1!==c){var o=h?a:b;c>1&&(c=this.removeDuplicatedCuts(this.cuts,c,0),c>1&&(c=this.removePointFromCuts(this.cuts,c,o,0),c>1&&(c=this.removeDuplicatedCuts(this.cuts,c,.001),c>1&&(c=this.removePointFromCuts(this.cuts,c,o,.001))))),0===c&&(c=1,this.cuts[0][0]=o.getX(),this.cuts[1][0]=o.getY())}}else c>2&&(c=this.removeDuplicatedCuts(this.cuts,c,0),c>2&&(c=this.removeDuplicatedCuts(this.cuts,c,.001))),2===c&&(Math.pow(this.cuts[0][0]-d,2)+Math.pow(this.cuts[0][1]-e),2>Math.pow(this.cuts[1][0]-d,2)+Math.pow(this.cuts[1][1]-e,2)&&(this.cuts[2][0]=this.cuts[0][0],this.cuts[2][1]=this.cuts[0][1],this.cuts[0][0]=this.cuts[1][0],this.cuts[0][1]=this.cuts[1][1],this.cuts[1][0]=this.cuts[2][0],this.cuts[1][1]=this.cuts[2][1])),1===c&&(c=2,this.cuts[1][0]=this.cuts[0][0],this.cuts[1][1]=this.cuts[0][1]);(h||i)&&1!==c?console.log("There should be one cut!!!"):h||i||0===c||2===c||console.log("There should be either 0 or 2 cuts!!! "+c+" were found")}}return c},GLayer.prototype.getValidCuts=function(a,b,c,d){for(var e=c.getX(),f=c.getY(),g=d.getX(),h=d.getY(),i=Math.abs(g-e),j=Math.abs(h-f),k=0,l=0;b>l;l++)this.isInside(a[l][0],a[l][1])&&Math.abs(a[l][0]-e)<=i&&Math.abs(a[l][1]-f)<=j&&Math.abs(a[l][0]-g)<=i&&Math.abs(a[l][1]-h)<=j&&(a[k][0]=a[l][0],a[k][1]=a[l][1],k++);return k},GLayer.prototype.removeDuplicatedCuts=function(a,b,c){for(var d,e=0,f=0;b>f;f++){d=!1;for(var g=0;e>g;g++)if(Math.abs(a[g][0]-a[f][0])<=c&&Math.abs(a[g][1]-a[f][1])<=c){d=!0;break}d||(a[e][0]=a[f][0],a[e][1]=a[f][1],e++)}return e},GLayer.prototype.removePointFromCuts=function(a,b,c,d){for(var e=c.getX(),f=c.getY(),g=0,h=0;b>h;h++)(Math.abs(a[h][0]-e)>d||Math.abs(a[h][1]-f)>d)&&(a[g][0]=a[h][0],a[g][1]=a[h][1],g++);return g},GLayer.prototype.startHistogram=function(a){this.hist=new GHistogram(this.parent,a,this.dim,this.plotPoints)},GLayer.prototype.drawPoints=function(){var a,b;if(0===arguments.length){a=this.plotPoints.length;var c=this.pointColors.length,d=this.pointSizes.length;if(this.parent.push(),this.parent.ellipseMode(this.parent.CENTER),this.parent.noStroke(),1===c&&1===d)for(this.parent.fill(this.pointColors[0]),b=0;a>b;b++)this.inside[b]&&this.parent.ellipse(this.plotPoints[b].getX(),this.plotPoints[b].getY(),this.pointSizes[0],this.pointSizes[0]);else if(1===c)for(this.parent.fill(this.pointColors[0]),b=0;a>b;b++)this.inside[b]&&this.parent.ellipse(this.plotPoints[b].getX(),this.plotPoints[b].getY(),this.pointSizes[b%d],this.pointSizes[b%d]);else if(1===d)for(b=0;a>b;b++)this.inside[b]&&(this.parent.fill(this.pointColors[b%c]),this.parent.ellipse(this.plotPoints[b].getX(),this.plotPoints[b].getY(),this.pointSizes[0],this.pointSizes[0]));else for(b=0;a>b;b++)this.inside[b]&&(this.parent.fill(this.pointColors[b%c]),this.parent.ellipse(this.plotPoints[b].getX(),this.plotPoints[b].getY(),this.pointSizes[b%d],this.pointSizes[b%d]));this.parent.pop()}else{if(!(1===arguments.length&&arguments[0]instanceof p5.Image))throw new Error("GLayer.drawPoints(): signature not supported");for(a=this.plotPoints.length,this.parent.push(),this.parent.imageMode(this.parent.CENTER),b=0;a>b;b++)this.inside[b]&&this.parent.image(arguments[0],this.plotPoints[b].getX(),this.plotPoints[b].getY());this.parent.pop()}},GLayer.prototype.drawPoint=function(){var a,b,c,d;if(3===arguments.length)a=arguments[0],b=arguments[1],c=arguments[2];else if(2===arguments.length&&arguments[1]instanceof p5.Image)a=arguments[0],d=arguments[1];else{if(1!==arguments.length)throw new Error("GLayer.drawPoint(): signature not supported");a=arguments[0],b=this.pointColors[0],c=this.pointSizes[0]}var e=this.valueToXPlot(a.getX()),f=this.valueToYPlot(a.getY());this.isInside(e,f)&&(this.parent.push(),"undefined"!=typeof d?(this.parent.imageMode(this.parent.CENTER),this.parent.image(d,e,f)):(this.parent.ellipseMode(this.parent.CENTER),this.parent.fill(b),this.parent.noStroke(),this.parent.ellipse(e,f,c,c)),this.parent.pop())},GLayer.prototype.drawLines=function(){var a=this.plotPoints.length;this.parent.push(),this.parent.noFill(),this.parent.stroke(this.lineColor),this.parent.strokeWeight(this.lineWidth),this.parent.strokeCap(this.parent.SQUARE);for(var b=0;a-1>b;b++)if(this.inside[b]&&this.inside[b+1])this.parent.line(this.plotPoints[b].getX(),this.plotPoints[b].getY(),this.plotPoints[b+1].getX(),this.plotPoints[b+1].getY());else if(this.plotPoints[b].isValid()&&this.plotPoints[b+1].isValid()){var c=this.obtainBoxIntersections(this.plotPoints[b],this.plotPoints[b+1]);this.inside[b]?this.parent.line(this.plotPoints[b].getX(),this.plotPoints[b].getY(),this.cuts[0][0],this.cuts[0][1]):this.inside[b+1]?this.parent.line(this.cuts[0][0],this.cuts[0][1],this.plotPoints[b+1].getX(),this.plotPoints[b+1].getY()):c>=2&&this.parent.line(this.cuts[0][0],this.cuts[0][1],this.cuts[1][0],this.cuts[1][1])}this.parent.pop()},GLayer.prototype.drawLine=function(){var a,b,c,d,e,f;if(4===arguments.length&&arguments[0]instanceof GPoint)a=arguments[0],b=arguments[1],c=arguments[2],d=arguments[3];else if(4===arguments.length)e=arguments[0],f=arguments[1],c=arguments[2],d=arguments[3];else if(2===arguments.length&&arguments[0]instanceof GPoint)a=arguments[0],b=arguments[1],c=this.lineColor,d=this.lineWidth;else{if(2!==arguments.length)throw new Error("GLayer.drawLine(): signature not supported");e=arguments[0],f=arguments[1],c=this.lineColor,d=this.lineWidth}"undefined"!=typeof e&&(this.xLog&&this.yLog?(a=new GPoint(this.xLim[0],Math.pow(10,e*Math.log(this.xLim[0])/Math.LN10+yCut)),b=new GPoint(this.xLim[1],Math.pow(10,e*Math.log(this.xLim[1])/Math.LN10+yCut))):this.xLog?(a=new GPoint(this.xLim[0],e*Math.log(this.xLim[0])/Math.LN10+yCut),b=new GPoint(this.xLim[1],e*Math.log(this.xLim[1])/Math.LN10+yCut)):this.yLog?(a=new GPoint(this.xLim[0],Math.pow(10,e*this.xLim[0]+yCut)),b=new GPoint(this.xLim[1],Math.pow(10,e*this.xLim[1]+yCut))):(a=new GPoint(this.xLim[0],e*this.xLim[0]+yCut),b=new GPoint(this.xLim[1],e*this.xLim[1]+yCut)));var g=this.valueToPlot(a),h=this.valueToPlot(b);if(g.isValid()&&h.isValid()){var i=this.isInside(g),j=this.isInside(h);if(this.parent.push(),this.parent.noFill(),this.parent.stroke(c),this.parent.strokeWeight(d),this.parent.strokeCap(this.parent.SQUARE),i&&j)this.parent.line(g.getX(),g.getY(),h.getX(),h.getY());else{var k=this.obtainBoxIntersections(g,h);i?this.parent.line(g.getX(),g.getY(),this.cuts[0][0],this.cuts[0][1]):j?this.parent.line(this.cuts[0][0],this.cuts[0][1],h.getX(),h.getY()):k>=2&&this.parent.line(this.cuts[0][0],this.cuts[0][1],this.cuts[1][0],this.cuts[1][1])}this.parent.pop()}},GLayer.prototype.drawHorizontalLine=function(){var a,b,c;if(3===arguments.length)a=arguments[0],b=arguments[1],c=arguments[2];else{if(1!==arguments.length)throw new Error("GLayer.drawHorizontalLine(): signature not supported");a=arguments[0],b=this.lineColor,c=this.lineWidth}var d=this.valueToYPlot(a);this.isValidNumber(d)&&-d>=0&&-d<=this.dim[1]&&(this.parent.push(),this.parent.noFill(),this.parent.stroke(b),this.parent.strokeWeight(c),this.parent.strokeCap(this.parent.SQUARE),this.parent.line(0,d,this.dim[0],d),this.parent.pop())},GLayer.prototype.drawVerticalLine=function(){var a,b,c;if(3===arguments.length)a=arguments[0],b=arguments[1],c=arguments[2];else{if(1!==arguments.length)throw new Error("GLayer.drawVerticalLine(): signature not supported");a=arguments[0],b=this.lineColor,c=this.lineWidth}var d=this.valueToXPlot(a);this.isValidNumber(d)&&d>=0&&d<=this.dim[0]&&(this.parent.push(),this.parent.noFill(),this.parent.stroke(b),this.parent.strokeWeight(c),this.parent.strokeCap(this.parent.SQUARE),this.parent.line(d,0,d,-this.dim[1]),this.parent.pop())},GLayer.prototype.drawFilledContour=function(a,b){var c;if(a===GPlot.HORIZONTAL?c=this.getHorizontalShape(b):a===GPlot.VERTICAL&&(c=this.getVerticalShape(b)),"undefined"!=typeof c&&c.length>0){this.parent.push(),this.parent.fill(this.lineColor),this.parent.noStroke(),this.parent.beginShape();for(var d=0;di;i++)if(b=this.plotPoints[i],b.isValid()){for(c=!1,this.inside[i]?(f.push(new GPoint(b.getX(),b.getY(),"normal point")),c=!0):b.getX()>=0&&b.getX()<=this.dim[0]&&(-b.getY()<0?(f.push(new GPoint(b.getX(),0,"projection")),c=!0):(f.push(new GPoint(b.getX(),-this.dim[1],"projection")),c=!0)),d=i+1;e-1>d&&!this.plotPoints[d].isValid();)d++;if(e>d&&this.plotPoints[d].isValid())for(var j=this.obtainBoxIntersections(b,this.plotPoints[d]),k=0;j>k;k++)f.push(new GPoint(this.cuts[k][0],this.cuts[k][1],"cut")),c=!0;c&&(0>g&&(g=i),h=i)}if(f.length>0){var l=new GPoint(f[0]);if(0!==l.getX()&&l.getX()!==this.dim[0])if("cut"===l.getLabel())this.plotPoints[g].getX()<0?(l.setX(0),l.setLabel("extreme")):(l.setX(this.dim[0]),l.setLabel("extreme"));else if(0!==g){for(var m=g-1;m>0&&!this.plotPoints[m].isValid();)m--;this.plotPoints[m].isValid()&&(this.plotPoints[m].getX()<0?(l.setX(0),l.setLabel("extreme")):(l.setX(this.dim[0]),l.setLabel("extreme")))}var n=new GPoint(f[f.length-1]);if(0!==n.getX()&&n.getX()!==this.dim[0]&&h!==e-1){for(d=h+1;e-1>d&&!this.plotPoints[d].isValid();)d++;this.plotPoints[d].isValid()&&(this.plotPoints[d].getX()<0?(n.setX(0),n.setLabel("extreme")):(n.setX(this.dim[0]),n.setLabel("extreme")))}"extreme"===n.getLabel()&&f.push(n),this.yLog&&0>=a&&(a=Math.min(this.yLim[0],this.yLim[1]));var o=this.valueToPlot(1,a);-o[1]<0?(f.push(new GPoint(n.getX(),0)),f.push(new GPoint(l.getX(),0))):-o[1]>this.dim[1]?(f.push(new GPoint(n.getX(),-this.dim[1])),f.push(new GPoint(l.getX(),-this.dim[1]))):(f.push(new GPoint(n.getX(),o[1])),f.push(new GPoint(l.getX(),o[1]))),"extreme"===l.getLabel()&&f.push(l)}return f},GLayer.prototype.getVerticalShape=function(a){for(var b,c,d,e=this.plotPoints.length,f=[],g=-1,h=-1,i=0;e>i;i++)if(b=this.plotPoints[i],b.isValid()){for(c=!1,this.inside[i]?(f.push(new GPoint(b.getX(),b.getY(),"normal point")),c=!0):-b.getY()>=0&&-b.getY()<=this.dim[1]&&(b.getX()<0?(f.push(new GPoint(0,b.getY(),"projection")),c=!0):(f.push(new GPoint(this.dim[0],b.getY(),"projection")),c=!0)),d=i+1;e-1>d&&!this.plotPoints[d].isValid();)d++;if(e>d&&this.plotPoints[d].isValid())for(var j=this.obtainBoxIntersections(b,this.plotPoints[d]),k=0;j>k;k++)f.push(new GPoint(this.cuts[k][0],this.cuts[k][1],"cut")),c=!0;c&&(0>g&&(g=i),h=i)}if(f.length>0){var l=new GPoint(f[0]);if(0!==l.getY()&&l.getY()!==-this.dim[1])if("cut"===l.getLabel())-this.plotPoints[g].getY()<0?(l.setY(0),l.setLabel("extreme")):(l.setY(-this.dim[1]),l.setLabel("extreme"));else if(0!==g){for(var m=g-1;m>0&&!this.plotPoints[m].isValid();)m--;this.plotPoints[m].isValid()&&(-this.plotPoints[m].getY()<0?(l.setY(0),l.setLabel("extreme")):(l.setY(-this.dim[1]),l.setLabel("extreme")))}var n=new GPoint(f[f.length-1]);if(0!==n.getY()&&n.getY()!==-this.dim[1]&&h!==e-1){for(d=h+1;e-1>d&&!this.plotPoints[d].isValid();)d++;this.plotPoints[d].isValid()&&(-this.plotPoints[d].getY()<0?(n.setY(0),n.setLabel("extreme")):(n.setY(-this.dim[1]),n.setLabel("extreme")))}"extreme"===n.getLabel()&&f.push(n),this.xLog&&0>=a&&(a=Math.min(this.xLim[0],this.xLim[1]));var o=this.valueToPlot(a,1);o[0]<0?(f.push(new GPoint(0,n.getY())),f.push(new GPoint(0,l.getY()))):o[0]>this.dim[0]?(f.push(new GPoint(this.dim[0],n.getY())),f.push(new GPoint(this.dim[0],l.getY()))):(f.push(new GPoint(o[0],n.getY())),f.push(new GPoint(o[0],l.getY()))),"extreme"===l.getLabel()&&f.push(l)}return f},GLayer.prototype.drawLabel=function(a){var b=this.valueToXPlot(a.getX()),c=this.valueToYPlot(a.getY());if(this.isValidNumber(b)&&this.isValidNumber(c)){var d=b+this.labelSeparation[0],e=c-this.labelSeparation[1],f=this.fontSize/4;this.parent.push(),this.parent.rectMode(this.parent.CORNER),this.parent.noStroke(),this.parent.textFont(this.fontName),this.parent.textSize(this.fontSize),this.parent.textAlign(this.parent.LEFT,this.parent.BOTTOM),this.parent.fill(this.labelBgColor),this.parent.rect(d-f,e-this.fontSize-f,this.parent.textWidth(a.getLabel())+2*f,this.fontSize+2*f),this.parent.fill(this.fontColor),this.parent.text(a.getLabel(),d,e),this.parent.pop()}},GLayer.prototype.drawLabelAtPlotPos=function(a,b){var c=this.getPointAtPlotPos(a,b);"undefined"!=typeof c&&this.drawLabel(c)},GLayer.prototype.drawHistogram=function(){"undefined"!=typeof this.hist&&this.hist.draw(this.valueToPlot(this.histBasePoint))},GLayer.prototype.drawPolygon=function(a,b){var c;if(a.length>2){var d=this.valueToPlot(a),e=0;for(c=0;cc;c++){f=d[c],this.isInside(f)&&h.push(new GPoint(f.getX(),f.getY(),"normal point"));var i=g>c+1?c+1:0,j=this.obtainBoxIntersections(f,d[i]);1===j?h.push(new GPoint(this.cuts[0][0],this.cuts[0][1],"single cut")):j>1&&(h.push(new GPoint(this.cuts[0][0],this.cuts[0][1],"double cut")),h.push(new GPoint(this.cuts[1][0],this.cuts[1][1],"double cut")))}g=h.length;var k=[];for(c=0;g>c;c++){k.push(h[c]);var l=g>c+1?c+1:0,m=h[c].getLabel(),n=h[l].getLabel(),o="single cut"===m&&"single cut"===n||"single cut"===m&&"double cut"===n||"double cut"===m&&"single cut"===n;if(o){var p=h[c].getX(),q=h[c].getY(),r=h[l].getX(),s=h[l].getY(),t=Math.abs(r-p),u=Math.abs(s-q);if(t>0&&u>0&&t!==this.dim[0]&&u!==this.dim[1]){var v=0===p||p===this.dim[0]?p:r,w=0===q||q===-this.dim[1]?q:s;k.push(new GPoint(v,w,"special cut"))}}}if(k.length>2){for(this.parent.push(),this.parent.fill(b),this.parent.noStroke(),this.parent.beginShape(),c=0;c0&&b>0&&(this.dim[0]=a,this.dim[1]=b,this.updatePlotPoints(),"undefined"!=typeof this.hist&&(this.hist.setDim(this.dim),this.hist.setPlotPoints(this.plotPoints)))},GLayer.prototype.setXLim=function(){var a,b;if(2===arguments.length)a=arguments[0],b=arguments[1];else{if(1!==arguments.length)throw new Error("GLayer.setXLim(): signature not supported");a=arguments[0][0],b=arguments[0][1]}a!==b&&this.isValidNumber(a)&&this.isValidNumber(b)&&(this.xLog&&(0>=a||0>=b)?console.log("One of the limits is negative. This is not allowed in logarithmic scale."):(this.xLim[0]=a,this.xLim[1]=b,this.updatePlotPoints(),this.updateInsideList(),"undefined"!=typeof this.hist&&this.hist.setPlotPoints(this.plotPoints)))},GLayer.prototype.setYLim=function(){var a,b;if(2===arguments.length)a=arguments[0],b=arguments[1];else{if(1!==arguments.length)throw new Error("GLayer.setYLim(): signature not supported");a=arguments[0][0],b=arguments[0][1]}a!==b&&this.isValidNumber(a)&&this.isValidNumber(b)&&(this.yLog&&(0>=a||0>=b)?console.log("One of the limits is negative. This is not allowed in logarithmic scale."):(this.yLim[0]=a,this.yLim[1]=b,this.updatePlotPoints(),this.updateInsideList(),"undefined"!=typeof this.hist&&this.hist.setPlotPoints(this.plotPoints)))},GLayer.prototype.setXYLim=function(){var a,b,c,d;if(4===arguments.length)a=arguments[0],b=arguments[1],c=arguments[2],d=arguments[3];else{if(2!==arguments.length)throw new Error("GLayer.setXYLim(): signature not supported");a=arguments[0][0],b=arguments[0][1],c=arguments[1][0],d=arguments[1][1]}a!==b&&c!==d&&this.isValidNumber(a)&&this.isValidNumber(b)&&this.isValidNumber(c)&&this.isValidNumber(d)&&(this.xLog&&(0>=a||0>=b)?console.log("One of the limits is negative. This is not allowed in logarithmic scale."):(this.xLim[0]=a,this.xLim[1]=b),this.yLog&&(0>=c||0>=d)?console.log("One of the limits is negative. This is not allowed in logarithmic scale."):(this.yLim[0]=c,this.yLim[1]=d),this.updatePlotPoints(),this.updateInsideList(),"undefined"!=typeof this.hist&&this.hist.setPlotPoints(this.plotPoints))},GLayer.prototype.setLimAndLog=function(){var a,b,c,d,e,f;if(6===arguments.length)a=arguments[0],b=arguments[1],c=arguments[2],d=arguments[3],e=arguments[4],f=arguments[5];else{if(4!==arguments.length)throw new Error("GLayer.setLimAndLog(): signature not supported");a=arguments[0][0],b=arguments[0][1],c=arguments[1][0],d=arguments[1][1],e=arguments[2],f=arguments[3]}a!==b&&c!==d&&this.isValidNumber(a)&&this.isValidNumber(b)&&this.isValidNumber(c)&&this.isValidNumber(d)&&(e&&(0>=a||0>=b)?console.log("One of the limits is negative. This is not allowed in logarithmic scale."):(this.xLim[0]=a,this.yLim[1]=b,this.xLog=e),f&&(0>=c||0>=d)?console.log("One of the limits is negative. This is not allowed in logarithmic scale."):(this.yLim[0]=c,this.yLim[1]=d,this.yLog=f),this.updatePlotPoints(),this.updateInsideList(),"undefined"!=typeof this.hist&&this.hist.setPlotPoints(this.plotPoints))},GLayer.prototype.setXLog=function(a){a!==this.xLog&&(a&&(this.xLim[0]<=0||this.xLim[1]<=0)&&(console.log("One of the limits is negative. This is not allowed in logarithmic scale."),console.log("Will set horizontal limits to (0.1, 10)"),this.xLim[0]=.1,this.xLim[1]=10),this.xLog=a,this.updatePlotPoints(),this.updateInsideList(),"undefined"!=typeof this.hist&&this.hist.setPlotPoints(this.plotPoints))},GLayer.prototype.setYLog=function(a){a!==this.yLog&&(a&&(this.yLim[0]<=0||this.yLim[1]<=0)&&(console.log("One of the limits is negative. This is not allowed in logarithmic scale."),console.log("Will set horizontal limits to (0.1, 10)"),this.yLim[0]=.1,this.yLim[1]=10),this.yLog=a,this.updatePlotPoints(),this.updateInsideList(),"undefined"!=typeof this.hist&&this.hist.setPlotPoints(this.plotPoints))},GLayer.prototype.setPoints=function(a){var b,c=a.length;if(this.points.length>c)this.points.splice(c,Number.MAX_VALUE);else for(b=this.points.length;c>b;b++)this.points[b]=new GPoint;for(b=0;c>b;b++)this.points[b].set(a[b]);this.updatePlotPoints(),this.updateInsideList(),"undefined"!=typeof this.hist&&this.hist.setPlotPoints(this.plotPoints)},GLayer.prototype.setPoint=function(){var a,b,c,d,e=this.points.length;if(4===arguments.length)a=arguments[0],b=arguments[1],c=arguments[2],d=arguments[3];else if(3===arguments.length)a=arguments[0],b=arguments[1],c=arguments[2],d=aa)this.points[a].set(b,c,d),this.plotPoints[a].set(this.valueToXPlot(b),this.valueToYPlot(c),d),this.inside[a]=this.isInside(this.plotPoints[a]);else{if(a!==e)throw new Error("GLayer.setPoint(): the index position is outside the array size");this.points[a]=new GPoint(b,c,d),this.plotPoints[a]=new GPoint(this.valueToXPlot(b),this.valueToYPlot(c),d),this.inside[a]=this.isInside(this.plotPoints[a])}"undefined"!=typeof this.hist&&this.hist.setPlotPoint(a,this.plotPoints[a])},GLayer.prototype.addPoint=function(){var a,b,c;if(3===arguments.length)a=arguments[0],b=arguments[1],c=arguments[2];else if(2===arguments.length)a=arguments[0],b=arguments[1],c="";else{if(1!==arguments.length)throw new Error("GLayer.addPoint(): signature not supported");a=arguments[0].getX(),b=arguments[0].getY(),c=arguments[0].getLabel()}this.points.push(new GPoint(a,b,c)),this.plotPoints.push(new GPoint(this.valueToXPlot(a),this.valueToYPlot(b),c)),this.inside.push(this.isInside(this.plotPoints[this.plotPoints.length-1])),"undefined"!=typeof this.hist&&this.hist.addPlotPoint(this.plotPoints[this.plotPoints.length-1])},GLayer.prototype.addPoints=function(a){for(var b,c=a.length,d=0;c>d;d++)b=a[d],this.points.push(new GPoint(b)),this.plotPoints.push(new GPoint(this.valueToXPlot(b.getX()),this.valueToYPlot(b.getY()),b.getLabel())),this.inside.push(this.isInside(this.plotPoints[this.plotPoints.length-1]));"undefined"!=typeof this.hist&&this.hist.setPlotPoints(this.plotPoints)},GLayer.prototype.addPointAtIndexPos=function(){var a,b,c,d;if(4===arguments.length)a=arguments[0],b=arguments[1],c=arguments[2],d=arguments[3];else if(3===arguments.length)a=arguments[0],b=arguments[1],c=arguments[2],d="";else{if(2!==arguments.length)throw new Error("GLayer.addPointAtIndexPos(): signature not supported");a=arguments[0],b=arguments[1].getX(),c=arguments[1].getY(),d=arguments[1].getLabel()}a<=this.points.length&&(this.points.splice(a,0,new GPoint(b,c,d)),this.plotPoints.splice(a,0,new GPoint(this.valueToXPlot(b),this.valueToYPlot(c),d)),this.inside.splice(a,0,this.isInside(this.plotPoints[0])),"undefined"!=typeof this.hist&&this.hist.setPlotPoints(this.plotPoints))},GLayer.prototype.removePoint=function(a){a0&&(this.pointColors=a.slice())},GLayer.prototype.setPointColor=function(a){this.pointColors=[a]},GLayer.prototype.setPointSizes=function(a){a.length>0&&(this.pointSizes=a.slice())},GLayer.prototype.setPointSize=function(a){this.pointSizes=[a]},GLayer.prototype.setLineColor=function(a){this.lineColor=a},GLayer.prototype.setLineWidth=function(a){a>0&&(this.lineWidth=a)},GLayer.prototype.setHistBasePoint=function(a){this.histBasePoint.set(a)},GLayer.prototype.setHistType=function(a){"undefined"!=typeof this.hist&&this.hist.setType(a)},GLayer.prototype.setHistVisible=function(a){"undefined"!=typeof this.hist&&this.hist.setVisible(a)},GLayer.prototype.setDrawHistLabels=function(a){"undefined"!=typeof this.hist&&this.hist.setDrawLabels(a)},GLayer.prototype.setLabelBgColor=function(a){this.labelBgColor=a},GLayer.prototype.setLabelSeparation=function(a){this.labelSeparation[0]=a[0],this.labelSeparation[1]=a[1]},GLayer.prototype.setFontName=function(a){this.fontName=a},GLayer.prototype.setFontColor=function(a){this.fontColor=a},GLayer.prototype.setFontSize=function(a){a>0&&(this.fontSize=a)},GLayer.prototype.setFontProperties=function(a,b,c){c>0&&(this.fontName=a,this.fontColor=b,this.fontSize=c)},GLayer.prototype.setAllFontProperties=function(a,b,c){this.setFontProperties(a,b,c),"undefined"!=typeof this.hist&&this.hist.setFontProperties(a,b,c)},GLayer.prototype.getId=function(){return this.id},GLayer.prototype.getDim=function(){return this.dim.slice()},GLayer.prototype.getXLim=function(){return this.xLim.slice()},GLayer.prototype.getYLim=function(){return this.yLim.slice()},GLayer.prototype.getXLog=function(){return this.xLog},GLayer.prototype.getYLog=function(){return this.yLog},GLayer.prototype.getPoints=function(){for(var a=[],b=0;b=this.pos[0]&&a<=this.pos[0]+this.outerDim[0]&&b>=this.pos[1]&&b<=this.pos[1]+this.outerDim[1]},GPlot.prototype.isOverBox=function(){var a,b;if(2===arguments.length)a=arguments[0],b=arguments[1];else{if(0!==arguments.length)throw new Error("GPlot.isOverBox(): signature not supported");a=this.parent.mouseX,b=this.parent.mouseY}return a>=this.pos[0]+this.mar[1]&&a<=this.pos[0]+this.outerDim[0]-this.mar[3]&&b>=this.pos[1]+this.mar[2]&&b<=this.pos[1]+this.outerDim[1]-this.mar[0]},GPlot.prototype.updateLimits=function(){this.fixedXLim||(this.xLim=this.calculatePlotXLim(),this.xAxis.setLim(this.xLim),this.topAxis.setLim(this.xLim)),this.fixedYLim||(this.yLim=this.calculatePlotYLim(),this.yAxis.setLim(this.yLim),this.rightAxis.setLim(this.yLim)),this.mainLayer.setXYLim(this.xLim,this.yLim);for(var a=0;a=this.yLim[0]&&e>=this.yLim[0]&&e<=this.yLim[1]||this.yLim[1]=this.yLim[1]),!f||this.xLog&&0>=d||(db[1]&&(b[1]=d))}return b[1]=this.xLim[0]&&d>=this.xLim[0]&&d<=this.xLim[1]||this.xLim[1]=this.xLim[1]),!f||this.yLog&&0>=e||(eb[1]&&(b[1]=e))}return b[1]=0&&c[b]<=this.dim[0]&&this.parent.line(c[b],0,c[b],-this.dim[1])}if(a===GPlot.BOTH||a===GPlot.HORIZONTAL){var d=this.yAxis.getPlotTicksRef();for(b=0;b=0&&-d[b]<=this.dim[1]&&this.parent.line(0,d[b],this.dim[0],d[b])}this.parent.pop()},GPlot.prototype.drawHistograms=function(){this.mainLayer.drawHistogram();for(var a=0;a0&&b>0){var c=a-this.mar[1]-this.mar[3],d=b-this.mar[0]-this.mar[2];if(c>0&&d>0){this.outerDim[0]=a,this.outerDim[1]=b,this.dim[0]=c,this.dim[1]=d,this.xAxis.setDim(this.dim),this.topAxis.setDim(this.dim),this.yAxis.setDim(this.dim),this.rightAxis.setDim(this.dim),this.title.setDim(this.dim),this.mainLayer.setDim(this.dim);for(var e=0;e0&&f>0&&(this.mar[0]=a,this.mar[1]=b,this.mar[2]=c,this.mar[3]=d,this.outerDim[0]=e,this.outerDim[1]=f)},GPlot.prototype.setDim=function(){var a,b;if(2===arguments.length)a=arguments[0],b=arguments[1];else{if(1!==arguments.length)throw new Error("GPlot.setDim(): signature not supported");a=arguments[0][0],b=arguments[0][1]}if(a>0&&b>0){var c=a+this.mar[1]+this.mar[3],d=b+this.mar[0]+this.mar[2];if(c>0&&d>0){this.outerDim[0]=c,this.outerDim[1]=d,this.dim[0]=a,this.dim[1]=b,this.xAxis.setDim(this.dim),this.topAxis.setDim(this.dim),this.yAxis.setDim(this.dim),this.rightAxis.setDim(this.dim),this.title.setDim(this.dim),this.mainLayer.setDim(this.dim);for(var e=0;e=a||0>=b)?console.log("One of the limits is negative. This is not allowed in logarithmic scale."):(this.xLim[0]=a,this.xLim[1]=b,this.invertedXScale=this.xLim[0]>this.xLim[1],this.fixedXLim=!0,this.xAxis.setLim(this.xLim),this.topAxis.setLim(this.xLim),this.updateLimits()))},GPlot.prototype.setYLim=function(){var a,b;if(2===arguments.length)a=arguments[0],b=arguments[1];else{if(1!==arguments.length)throw new Error("GPlot.setYLim(): signature not supported");a=arguments[0][0],b=arguments[0][1]}a!==b&&(this.yLog&&(0>=a||0>=b)?console.log("One of the limits is negative. This is not allowed in logarithmic scale."):(this.yLim[0]=a,this.yLim[1]=b,this.invertedYScale=this.yLim[0]>this.yLim[1],this.fixedYLim=!0,this.yAxis.setLim(this.yLim),this.rightAxis.setLim(this.yLim),this.updateLimits()))},GPlot.prototype.setFixedXLim=function(a){this.fixedXLim=a,this.updateLimits()},GPlot.prototype.setFixedYLim=function(a){this.fixedYLim=a,this.updateLimits()},GPlot.prototype.setLogScale=function(a){var b=this.xLog,c=this.yLog;if("xy"===a||"yx"===a?(b=!0,c=!0):"x"===a?(b=!0,c=!1):"y"===a?(b=!1,c=!0):""===a&&(b=!1,c=!1),b!==this.xLog||c!==this.yLog){this.xLog=b,this.yLog=c,this.xLog&&this.fixedXLim&&(this.xLim[0]<=0||this.xLim[1]<=0)&&(this.fixedXLim=!1),this.yLog&&this.fixedYLim&&(this.yLim[0]<=0||this.yLim[1]<=0)&&(this.fixedYLim=!1),this.fixedXLim||(this.xLim=this.calculatePlotXLim()),this.fixedYLim||(this.yLim=this.calculatePlotYLim()),this.xAxis.setLimAndLog(this.xLim,this.xLog),this.topAxis.setLimAndLog(this.xLim,this.xLog),this.yAxis.setLimAndLog(this.yLim,this.yLog),this.rightAxis.setLimAndLog(this.yLim,this.yLog),this.mainLayer.setLimAndLog(this.xLim,this.yLim,this.xLog,this.yLog);for(var d=0;d=0&&a!==this.expandLimFactor&&(this.expandLimFactor=a,this.updateLimits())},GPlot.prototype.setBgColor=function(a){this.bgColor=a},GPlot.prototype.setBoxBgColor=function(a){this.boxBgColor=a},GPlot.prototype.setBoxLineColor=function(a){this.boxLineColor=a},GPlot.prototype.setBoxLineWidth=function(a){a>0&&(this.boxLineWidth=a)},GPlot.prototype.setGridLineColor=function(a){this.gridLineColor=a},GPlot.prototype.setGridLineWidth=function(a){a>0&&(this.gridLineWidth=a)},GPlot.prototype.setPoints=function(){if(2===arguments.length)this.getLayer(arguments[1]).setPoints(arguments[0]);else{if(1!==arguments.length)throw new Error("GPlot.setPoints(): signature not supported");this.mainLayer.setPoints(arguments[0])}this.updateLimits()},GPlot.prototype.setPoint=function(){if(5===arguments.length)this.getLayer(arguments[4]).setPoint(arguments[0],arguments[1],arguments[2],arguments[3]);else if(4===arguments.length)this.mainLayer.setPoint(arguments[0],arguments[1],arguments[2],arguments[3]);else if(3===arguments.length&&arguments[1]instanceof GPoint)this.getLayer(arguments[2]).setPoint(arguments[0],arguments[1]);else if(3===arguments.length)this.mainLayer.setPoint(arguments[0],arguments[1],arguments[2]);else{if(2!==arguments.length)throw new Error("GPlot.setPoint(): signature not supported");this.mainLayer.setPoint(arguments[0],arguments[1])}this.updateLimits()},GPlot.prototype.addPoint=function(){if(4===arguments.length)this.getLayer(arguments[3]).addPoint(arguments[0],arguments[1],arguments[2]);else if(3===arguments.length)this.mainLayer.addPoint(arguments[0],arguments[1],arguments[2]);else if(2===arguments.length&&arguments[0]instanceof GPoint)this.getLayer(arguments[1]).addPoint(arguments[0]);else if(2===arguments.length)this.mainLayer.addPoint(arguments[0],arguments[1]);else{if(1!==arguments.length)throw new Error("GPlot.addPoint(): signature not supported");this.mainLayer.addPoint(arguments[0])}this.updateLimits()},GPlot.prototype.addPoints=function(){if(2===arguments.length)this.getLayer(arguments[1]).addPoints(arguments[0]);else{if(1!==arguments.length)throw new Error("GPlot.addPoints(): signature not supported");this.mainLayer.addPoints(arguments[0])}this.updateLimits()},GPlot.prototype.removePoint=function(){if(2===arguments.length)this.getLayer(arguments[1]).removePoint(arguments[0]);else{if(1!==arguments.length)throw new Error("GPlot.removePoint(): signature not supported");this.mainLayer.removePoint(arguments[0])}this.updateLimits()},GPlot.prototype.addPointAtIndexPos=function(){if(5===arguments.length)this.getLayer(arguments[4]).addPointAtIndexPos(arguments[0],arguments[1],arguments[2],arguments[3]);else if(4===arguments.length)this.mainLayer.addPointAtIndexPos(arguments[0],arguments[1],arguments[2],arguments[3]);else if(3===arguments.length&&arguments[1]instanceof GPoint)this.getLayer(arguments[2]).addPointAtIndexPos(arguments[0],arguments[1]);else if(3===arguments.length)this.mainLayer.addPointAtIndexPos(arguments[0],arguments[1],arguments[2]);else{if(2!==arguments.length)throw new Error("GPlot.addPointAtIndexPos(): signature not supported");this.mainLayer.addPointAtIndexPos(arguments[0],arguments[1])}this.updateLimits()},GPlot.prototype.setPointColors=function(a){this.mainLayer.setPointColors(a)},GPlot.prototype.setPointColor=function(a){this.mainLayer.setPointColor(a)},GPlot.prototype.setPointSizes=function(a){this.mainLayer.setPointSizes(a)},GPlot.prototype.setPointSize=function(a){this.mainLayer.setPointSize(a)},GPlot.prototype.setLineColor=function(a){this.mainLayer.setLineColor(a)},GPlot.prototype.setLineWidth=function(a){this.mainLayer.setLineWidth(a)},GPlot.prototype.setHistBasePoint=function(a){this.mainLayer.setHistBasePoint(a)},GPlot.prototype.setHistType=function(a){this.mainLayer.setHistType(a)},GPlot.prototype.setHistVisible=function(a){this.mainLayer.setHistVisible(a)},GPlot.prototype.setDrawHistLabels=function(a){this.mainLayer.setDrawHistLabels(a)},GPlot.prototype.setLabelBgColor=function(a){this.mainLayer.setLabelBgColor(a)},GPlot.prototype.setLabelSeparation=function(a){this.mainLayer.setLabelSeparation(a)},GPlot.prototype.setTitleText=function(a){this.title.setText(a)},GPlot.prototype.setAxesOffset=function(a){this.xAxis.setOffset(a),this.topAxis.setOffset(a),this.yAxis.setOffset(a),this.rightAxis.setOffset(a)},GPlot.prototype.setTicksLength=function(a){this.xAxis.setTickLength(a),this.topAxis.setTickLength(a),this.yAxis.setTickLength(a),this.rightAxis.setTickLength(a)},GPlot.prototype.setHorizontalAxesNTicks=function(a){this.xAxis.setNTicks(a),this.topAxis.setNTicks(a)},GPlot.prototype.setHorizontalAxesTicksSeparation=function(a){this.xAxis.setTicksSeparation(a),this.topAxis.setTicksSeparation(a)},GPlot.prototype.setHorizontalAxesTicks=function(a){this.xAxis.setTicks(a),this.topAxis.setTicks(a)},GPlot.prototype.setVerticalAxesNTicks=function(a){this.yAxis.setNTicks(a),this.rightAxis.setNTicks(a)},GPlot.prototype.setVerticalAxesTicksSeparation=function(a){this.yAxis.setTicksSeparation(a),this.rightAxis.setTicksSeparation(a)},GPlot.prototype.setVerticalAxesTicks=function(a){this.yAxis.setTicks(a),this.rightAxis.setTicks(a)},GPlot.prototype.setFontName=function(a){this.maniLayer.setFontName(a)},GPlot.prototype.setFontColor=function(a){this.maniLayer.setFontColor(a)},GPlot.prototype.setFontSize=function(a){this.maniLayer.setFontSize(a)},GPlot.prototype.setFontProperties=function(a,b,c){this.maniLayer.setFontProperties(a,b,c)},GPlot.prototype.setAllFontProperties=function(a,b,c){this.xAxis.setAllFontProperties(a,b,c),this.topAxis.setAllFontProperties(a,b,c),this.yAxis.setAllFontProperties(a,b,c),this.rightAxis.setAllFontProperties(a,b,c),this.title.setFontProperties(a,b,c),this.mainLayer.setAllFontProperties(a,b,c);for(var d=0;d0&&(this.zoomFactor=a),(b===this.parent.LEFT||b===this.parent.RIGHT||b===this.parent.CENTER)&&(this.increaseZoomButton=b),(c===this.parent.LEFT||c===this.parent.RIGHT||c===this.parent.CENTER)&&(this.decreaseZoomButton=c),(d===this.parent.SHIFT||d===this.parent.CONTROL||d===this.parent.ALT||d===GPlot.NONE)&&(this.increaseZoomKeyModifier=d),(e===this.parent.SHIFT||e===this.parent.CONTROL||e===this.parent.ALT||e===GPlot.NONE)&&(this.decreaseZoomKeyModifier=e)},GPlot.prototype.deactivateZooming=function(){this.zoomingIsActive=!1},GPlot.prototype.activateCentering=function(){var a,b;if(2===arguments.length)a=arguments[0],b=arguments[1];else if(1===arguments.length)a=arguments[0],b=GPlot.NONE;else{if(0!==arguments.length)throw new Error("GPlot.activateCentering(): signature not supported");a=this.parent.LEFT,b=GPlot.NONE}this.centeringIsActive=!0,(a===this.parent.LEFT||a===this.parent.RIGHT||a===this.parent.CENTER)&&(this.centeringButton=a),(b===this.parent.SHIFT||b===this.parent.CONTROL||b===this.parent.ALT||b===GPlot.NONE)&&(this.centeringKeyModifier=b)},GPlot.prototype.deactivateCentering=function(){this.centeringIsActive=!1},GPlot.prototype.activatePanning=function(){var a,b;if(2===arguments.length)a=arguments[0],b=arguments[1];else if(1===arguments.length)a=arguments[0],b=GPlot.NONE;else{if(0!==arguments.length)throw new Error("GPlot.activatePanning(): signature not supported");a=this.parent.LEFT,b=GPlot.NONE}this.panningIsActive=!0,(a===this.parent.LEFT||a===this.parent.RIGHT||a===this.parent.CENTER)&&(this.panningButton=a),(b===this.parent.SHIFT||b===this.parent.CONTROL||b===this.parent.ALT||b===GPlot.NONE)&&(this.panningKeyModifier=b)},GPlot.prototype.deactivatePanning=function(){this.panningIsActive=!1,this.panningReferencePoint=void 0},GPlot.prototype.activatePointLabels=function(){var a,b;if(2===arguments.length)a=arguments[0],b=arguments[1];else if(1===arguments.length)a=arguments[0],b=GPlot.NONE;else{if(0!==arguments.length)throw new Error("GPlot.activatePointLabels(): signature not supported");a=this.parent.LEFT,b=GPlot.NONE}this.labelingIsActive=!0,(a===this.parent.LEFT||a===this.parent.RIGHT||a===this.parent.CENTER)&&(this.labelingButton=a),(b===this.parent.SHIFT||b===this.parent.CONTROL||b===this.parent.ALT||b===GPlot.NONE)&&(this.labelingKeyModifier=b)},GPlot.prototype.deactivatePointLabels=function(){this.labelingIsActive=!1,this.mousePos=void 0},GPlot.prototype.activateReset=function(){var a,b;if(2===arguments.length)a=arguments[0],b=arguments[1];else if(1===arguments.length)a=arguments[0],b=GPlot.NONE;else{if(0!==arguments.length)throw new Error("GPlot.activateReset(): signature not supported");a=this.parent.RIGHT,b=GPlot.NONE}this.resetIsActive=!0,this.xLimReset=void 0,this.yLimReset=void 0,(a===this.parent.LEFT||a===this.parent.RIGHT||a===this.parent.CENTER)&&(this.resetButton=a),(b===this.parent.SHIFT||b===this.parent.CONTROL||b===this.parent.ALT||b===GPlot.NONE)&&(this.resetKeyModifier=b)},GPlot.prototype.deactivateReset=function(){this.resetIsActive=!1,this.xLimReset=void 0,this.yLimReset=void 0},GPlot.prototype.getButton=function(a){var b;return 0===a.button?b=this.parent.LEFT:1===a.button?b=this.parent.CENTER:2===a.button?b=this.parent.RIGHT:"undefined"==typeof a.button&&(b=this.parent.LEFT),b},GPlot.prototype.getModifier=function(a){var b;return b=a.altKey?this.parent.ALT:a.ctrlKey?this.parent.CONTROL:a.shiftKey?this.parent.SHIFT:GPlot.NONE},GPlot.prototype.saveResetLimits=function(){("undefined"==typeof this.xLimReset||"undefined"==typeof this.yLimReset)&&(this.xLimReset=this.xLim.slice(),this.yLimReset=this.yLim.slice())},GPlot.prototype.panningFunction=function(){"undefined"!=typeof this.panningReferencePoint&&this.align(this.panningReferencePoint,this.parent.mouseX,this.parent.mouseY)},GPlot.prototype.clickEvent=function(a){if(e=a||window.event,this.isOverBox()){var b=this.getButton(e),c=this.getModifier(e);this.zoomingIsActive&&(b===this.increaseZoomButton&&c===this.increaseZoomKeyModifier?(this.resetIsActive&&this.saveResetLimits(),this.zoom(this.zoomFactor,this.parent.mouseX,this.parent.mouseY)):b===this.decreaseZoomButton&&c===this.decreaseZoomKeyModifier&&(this.resetIsActive&&this.saveResetLimits(),this.zoom(1/this.zoomFactor,this.parent.mouseX,this.parent.mouseY))),this.centeringIsActive&&b===this.centeringButton&&c===this.centeringKeyModifier&&(this.resetIsActive&&this.saveResetLimits(), +this.center(this.parent.mouseX,this.parent.mouseY)),this.resetIsActive&&b===this.resetButton&&c===this.resetKeyModifier&&"undefined"!=typeof this.xLimReset&&"undefined"!=typeof this.yLimReset&&(this.setXLim(this.xLimReset),this.setYLim(this.yLimReset),this.xLimReset=void 0,this.yLimReset=void 0)}},GPlot.prototype.mouseDownEvent=function(a){if(e=a||window.event,this.isOverBox()){var b=this.getButton(e),c=this.getModifier(e);this.panningIsActive&&b===this.panningButton&&c===this.panningKeyModifier&&(this.resetIsActive&&this.saveResetLimits(),this.panningReferencePoint=this.getValueAt(this.parent.mouseX,this.parent.mouseY),this.panningIntervalId=setInterval(this.panningFunction.bind(this),100)),this.labelingIsActive&&b===this.labelingButton&&c===this.labelingKeyModifier&&(this.mousePos=[this.parent.mouseX,this.parent.mouseY])}},GPlot.prototype.mouseUpEvent=function(a){e=a||window.event;{var b=this.getButton(e);this.getModifier(e)}this.panningIsActive&&b===this.panningButton&&"undefined"!=typeof this.panningIntervalId&&(clearInterval(this.panningIntervalId),this.panningIntervalId=void 0,this.panningReferencePoint=void 0),this.labelingIsActive&&b===this.labelingButton&&(this.mousePos=void 0),b===this.parent.RIGHT&&this.clickEvent(e)},GPlot.prototype.wheelEvent=function(a){if(e=a||window.event,this.isOverBox()){var b=e.deltaY,c=this.parent.CENTER,d=this.getModifier(e);this.zoomingIsActive&&(c===this.increaseZoomButton&&d===this.increaseZoomKeyModifier&&b>0?(this.resetIsActive&&this.saveResetLimits(),this.zoom(this.zoomFactor,this.parent.mouseX,this.parent.mouseY)):c===this.decreaseZoomButton&&d===this.decreaseZoomKeyModifier&&0>b&&(this.resetIsActive&&this.saveResetLimits(),this.zoom(1/this.zoomFactor,this.parent.mouseX,this.parent.mouseY)))}},GPlot.prototype.preventDefaultEvent=function(a){e=a||window.event,this.isOverBox()&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},GPlot.prototype.preventWheelDefault=function(){window.addEventListener("wheel",this.preventDefaultEvent.bind(this),!1)},GPlot.prototype.preventRightClickDefault=function(){window.addEventListener("contextmenu",this.preventDefaultEvent.bind(this),!1)}; diff --git a/docs/_site/graficos/hidraulicas.html b/docs/_site/graficos/hidraulicas.html new file mode 100755 index 0000000..68186c1 --- /dev/null +++ b/docs/_site/graficos/hidraulicas.html @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/docs/_site/graficos/hidraulicas.js b/docs/_site/graficos/hidraulicas.js new file mode 100644 index 0000000..68dbe93 --- /dev/null +++ b/docs/_site/graficos/hidraulicas.js @@ -0,0 +1,112 @@ +var cuencas, cmap; +var nombres,colores,x,y; +var canales, acequias; +var totCanales = 0,totAcequias = 0; +var cuenta = 0, last; + +function setup() { + createCanvas(800,519); + cuencas = loadImage("data/cuencas.png"); + cmap = loadImage("data/cmap-cuencas.png"); + nombres = new Array("Norte","Duero","Ebro","Pirineo","Jucar","Tajo","Guadiana","Guadalquivir","Sur", "Segura", "Baleares y Canarias"); + colores = new Array("#f00","#0f0","#00f","#ff0","#0ff","#a00","#0a0","#00a","#aa0","#0aa", "#aaa"); + canales = new Array(157.3,1422.1,810, 132.5,525.7,764.9,360.5,1111.7,266.7,85.7,-1); + acequias= new Array(448.1,2215.3,1872.7,258.7,2378,1356.7,1210.5,1215.7,191.7,2004.1,-1); + x = new Array(158,243, 449, 597, 432, 308, 236, 263, 362,412, 601); + y = new Array(77,158,140, 139,278, 253, 327, 393, 441,368, 322); + + for (var n = 0; n < nombres.length; n++) { + if (canales[n] != -1) totCanales = totCanales + canales[n]; + if (acequias[n] != -1) totAcequias = totAcequias + acequias[n]; + } +} + +function draw() { + background(200,225,225); + image(cuencas,0,0); + + var mc = cmap.get(mouseX,mouseY); + var over = []; + for (var n = 0; n < colores.length; n++) { + over[n] = compara(mc,color(colores[n])); + } + + for (var n = 0; n < colores.length; n++) { + if (over[n]) { + fill(0); + textStyle(NORMAL); + if (canales[n] != -1) { + text("Canales: " + canales[n] + " Km", x[n], y[n]+5); + text("Acequias: " + acequias[n] + " Km", x[n], y[n]+20); + } + else { + textSize(10); + text("(Sin datos)", x[n], y[n]+5); + } + } + } + + // nombres + textStyle(BOLD); + textSize(14); + for (var n = 0; n < nombres.length; n++) { + var nbr = nombres[n].toUpperCase(); + fill(255); + noStroke(); + fill(0); + text(nbr, x[n], y[n]-10); + } + + cuenta = cuenta + 0.5; + + // Canales + for (var n = 0; n < nombres.length; n++) { + if (!over[n]) { + if (canales[n] == -1) { + textSize(10); + fill(0); + text("(Sin datos)", x[n], y[n]+5); + } + var pct = map(canales[n]/totCanales,0,1,0,50); + for (var i = 0; i < min(cuenta,pct); i++) { + var xi = x[n] + 10*i; + stroke(0); + line(xi+3, y[n]-4,xi+10+3,y[n]-4); + noStroke(); + fill(0); + quad(xi+10+4,y[n]-4,xi+10+4,y[n]-4+7, xi+10,y[n]+7, xi+10,y[n]); + fill(0,255,255); + quad(xi+3, y[n]-3,xi+10+3,y[n]-3,xi+10,y[n],xi, y[n]); + noStroke(); + fill(0); + rect(xi, y[n],10,7) + fill(255); + arc(xi+5,y[n]+7,7,8,PI,TWO_PI); + } + } + } + + // Acequias + for (var n = 0; n < nombres.length; n++) { + if (!over[n]) { + pct = map(acequias[n]/totAcequias,0,1,0,50); + for (var i = 0; i < min(cuenta,pct); i++) { + var xi = x[n] + 10*i; + stroke(0); + line(xi, y[n]+15,xi+10,y[n]+15); + line(xi+3, y[n]+15-3,xi+10+3,y[n]+15-3); + noStroke(); + fill(0); + quad(xi+10+4,y[n]+15-3, xi+10+4,y[n]+15+4-3-1, xi+10, y[n]+15+4, xi+10, y[n]+15); + fill(0,255,255); + quad(xi+3, y[n]+15-2,xi+10+3,y[n]+15-2, xi+10,y[n]+15,xi, y[n]+15); + fill(0); + rect(xi, y[n]+15, 10, 4); + } + } + } +} + +function compara(c1, c2) { + return red(c1) == red(c2) && green(c1) == green(c2) && blue(c1) == blue(c2); +} diff --git a/docs/_site/graficos/mecanizacion.html b/docs/_site/graficos/mecanizacion.html new file mode 100644 index 0000000..f9d820f --- /dev/null +++ b/docs/_site/graficos/mecanizacion.html @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/docs/_site/graficos/mecanizacion.js b/docs/_site/graficos/mecanizacion.js new file mode 100644 index 0000000..9cbe3ab --- /dev/null +++ b/docs/_site/graficos/mecanizacion.js @@ -0,0 +1,101 @@ +var cuencas, cmap; +var nombres,colores,x,y; +var tractores, cosechadoras; +var totTractores = 0,totCosechadoras = 0; +var cuenta = 0, last; +var imgTractor,imgCosechadora; + +function setup() { + createCanvas(800,519); + cuencas = loadImage("data/cuencas.png"); + cmap = loadImage("data/cmap-cuencas.png"); + imgTractor = loadImage("data/tractor_792349_cc_p.png"); + imgCosechadora = loadImage("data/harvester_1046427_cc_p.png"); + nombres = new Array("Norte","Duero","Ebro","Pirineo","Jucar","Tajo","Guadiana","Guadalquivir","Sur", "Segura", "Baleares y Canarias"); + colores = new Array("#f00","#0f0","#00f","#ff0","#0ff","#a00","#0a0","#00a","#aa0","#0aa", "#aaa"); + tractores = new Array(31.5,32.8,81.4,-1,128.5,37.6,59.1,30.6,11.2,34.6,-1); + cosechadoras= new Array(0,1.2,2.8,-1,5,0.6,0.9,2.6,0.2,0.5,-1); + + x = new Array(128,233, 409, 597, 392, 248, 206, 217, 362,402, 651); + y = new Array(77,128,110, 139,248, 243, 307, 390, 431,368, 322); + + for (var n = 0; n < nombres.length; n++) { + if (tractores[n] != -1) totTractores = totTractores + tractores[n]; + if (cosechadoras[n] != -1) totCosechadoras = totCosechadoras + cosechadoras[n]; + } +} + +function draw() { + background(200,225,225); + image(cuencas,0,0); + + + var mc = cmap.get(mouseX,mouseY); + var over = []; + for (var n = 0; n < colores.length; n++) { + over[n] = compara(mc,color(colores[n])); + } + + for (var n = 0; n < colores.length; n++) { + if (over[n]) { + fill(0); + textStyle(NORMAL); + if (tractores[n] != -1) { + text("Tractores: " + tractores[n], x[n], y[n]+10); + text("Cosechadoras: " + cosechadoras[n], x[n], y[n]+25); + } + else { + textSize(10); + text("(Sin datos)", x[n], y[n]+5); + } + } + } + + + cuenta = cuenta + 0.5; + + // Cosechadoras + var mpct = []; + for (var n = 0; n < nombres.length; n++) { + if (!over[n]) { + pct = map(cosechadoras[n]/totCosechadoras,0,1,0,40); + mpct[n] = floor(pct)+1; + for (var i = 0; i < min(cuenta,pct); i++) { + var xi = x[n] + 20*(i%4); + var yi = y[n] + floor(i/4)*20; + image(imgCosechadora,xi,yi,20,20); + } + } + } + + // Tractores + for (var n = 0; n < nombres.length; n++) { + if (!over[n]) { + if (tractores[n] == -1) { + textSize(10); + textStyle(NORMAL); + fill(0); + text("(Sin datos)", x[n], y[n]+5); + } + var pct = map(tractores[n]/totTractores,0,1,0,40); + for (var i = 0; i < min(cuenta,pct); i++) { + var xi = x[n] + 20*(i%4) + min(4,mpct[n])*20; + var yi = y[n] + floor(i/4)*20; + image(imgTractor,xi,yi,18,18); + } + } + } + + // nombres + textStyle(BOLD); + textSize(14); + for (var n = 0; n < nombres.length; n++) { + var nbr = nombres[n]; + fill(0); + text(nbr, x[n], y[n]-7); + } +} + +function compara(c1, c2) { + return red(c1) == red(c2) && green(c1) == green(c2) && blue(c1) == blue(c2); +} diff --git a/docs/_site/graficos/parcelas-old.js b/docs/_site/graficos/parcelas-old.js new file mode 100644 index 0000000..b368d77 --- /dev/null +++ b/docs/_site/graficos/parcelas-old.js @@ -0,0 +1,94 @@ +var cuencas, cmap; +var ids,nombres,colores,x,y; +var capas,imgs; +var dim; + +function preload() { + ids = new Array("norte","duero","ebro","pirineo","jucar","tajo","guadiana","guadalquivir","sur","segura","baleares"); + imgs = new Array(); + for (var n = 0; n < ids.length; n++) { + imgs[n] = loadImage("data/"+ids[n]+".png"); + } + cuencas = loadImage("data/cuencas.png"); + cmap = loadImage("data/cmap-cuencas.png"); +} + +function setup() { + createCanvas(800,519); + nombres = new Array("Norte","Duero","Ebro","Pirineo","Jucar","Tajo","Guadiana","Guadalquivir","Sur", "Segura", "Baleares y Canarias"); + colores = new Array("#f00","#0f0","#00f","#ff0","#0ff","#a00","#0a0","#00a","#aa0","#0aa", "#aaa"); + x = new Array(158,243, 449, 597, 432, 308, 236, 263, 362,432, 651); + y = new Array(77,158,140, 139,278, 253, 327, 393, 441,368, 322); + dim = new Array(11,8.4,11,-1,6,7.5,8.6,5.3,5.9,6.6,-1); + capas = new Array(); + for (var n = 0; n < ids.length; n++) { + capas[n] = createImage(width,height); + capas[n].loadPixels(); + + if (dim[n] != -1) { + var paso = map(dim[n],0, 15, 2, 20); + + colorMode(HSB,360,255,255); + var h = random(70,130); + var numi = floor(width/paso)+1; + var numj = floor(height/paso)+1; + var c = []; + for (var i = 0; i < numi; i++) { + c[i] = []; + for (var j = 0; j < numj; j++) { + var s = random(100,200); + c[i][j] = color(h, s, random(150,200) ); + } + } + colorMode(RGB,255,255,255); + for (var i = 0; i < width; i++) { + var pasoi = floor(i/paso); + for (var j = 0; j < height; j++) { + var pasoj = floor(j/paso); + capas[n].set(i,j,c[pasoi][pasoj]); + } + } + capas[n].updatePixels(); + capas[n].mask(imgs[n]); + } + } +} + +function draw() { + background(200,225,225); + + // capas + for (var n = 0; n < ids.length; n++) { + tint(200,180,130); + image(imgs[n],0,0); + tint(255,min(frameCount*40,255)); + if (dim[n] != -1) image(capas[n],0,0); + else text("(Sin datos)", x[n], y[n]+5); + } + + // Mas datos + var mc = cmap.get(mouseX,mouseY); + for (var n = 0; n < colores.length; n++) { + if (compara(mc,color(colores[n]))) { + noTint(); + image(imgs[n],0,0); + } + } + + + // nombres + textSize(14); + for (var n = 0; n < nombres.length; n++) { + var nbr = nombres[n]; + fill(255); + noStroke(); + fill(0); + text(nbr, x[n], y[n]-10); + } +} + + + +function compara(c1, c2) { + return red(c1) == red(c2) && green(c1) == green(c2) && blue(c1) == blue(c2); +} diff --git a/docs/_site/graficos/parcelas.html b/docs/_site/graficos/parcelas.html new file mode 100644 index 0000000..de01ffd --- /dev/null +++ b/docs/_site/graficos/parcelas.html @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/docs/_site/graficos/parcelas.js b/docs/_site/graficos/parcelas.js new file mode 100644 index 0000000..d378590 --- /dev/null +++ b/docs/_site/graficos/parcelas.js @@ -0,0 +1,119 @@ +var cuencas, cmap; +var ids,nombres,colores,x,y; +var capas,capaspg,imgs; +var dim, dimr; +var pg; + +function preload() { + ids = new Array("norte","duero","ebro","pirineo","jucar","tajo","guadiana","guadalquivir","sur","segura","baleares"); + dimr = new Array(11,8.4,11,-1,6,7.5,8.6,5.3,5.9,6.6,-1); + dim = new Array(12,10,14.2,8,7.6,8,7.6,10,4.7,10,11); + imgs = new Array(); + capas = new Array(); + capaspg = new Array(); + for (var n = 0; n < ids.length; n++) { + imgs[n] = loadImage("data/"+ids[n]+".png"); + capaspg[n] = loadImage("data/capa-PGC-"+n+".png"); + if (dim[n] != -1) { + capas[n] = loadImage("data/capa-"+n+".png"); + } + } + cuencas = loadImage("data/cuencas.png"); + cmap = loadImage("data/cmap-cuencas.png"); +} + +function setup() { + pg = createGraphics(800, 519); + var as = 519. / 800.; + var zoom = .8; + var w = windowidth*zoom; + var h = windowHeight*as*zoom; + + createCanvas(w,h); + nombres = new Array("Norte","Duero","Ebro","Pirineo","Jucar","Tajo","Guadiana","Guadalquivir","Sur", "Segura", "Baleares y Canarias"); + colores = new Array("#f00","#0f0","#00f","#ff0","#0ff","#a00","#0a0","#00a","#aa0","#0aa", "#aaa"); + x = new Array(158,243, 429, 597, 432, 268, 226, 253, 362,432, 611); + y = new Array(77,158,140, 139,278, 263, 327, 393, 441, 368, 322); +} + + +function draw() { + + // Resize: + var w = min(800,width*.85); + var h = w*519./800.; + var zoom = w*800.; + var mx = map(mouseX-width/2+w/2,0,w,0,800); + var my = map(mouseY-height/2+h/2,0,h,0,519); + + + pg.background("#cad2d3"); + // capas + for (var n = 0; n < ids.length; n++) { + if (dimr[n] != -1) pg.image(capas[n],0,0); + else { + pg.image(imgs[n], 0, 0); + } + } + + // Parcelas segun PGC + var mc = cmap.get(mx,my); + for (var n = 0; n < colores.length; n++) { + if (compara(mc,color(colores[n]))) { + pg.tint(255,100); + pg.image(capaspg[n],0, 0); + pg.noTint(); + } + } + + + // nombres + pg.textSize(14); + for (var n = 0; n < nombres.length; n++) { + //var nbr = String.prototype.toUpperCase(nombres[n]); + if (dimr[n] != -1 || !compara(mc,color(colores[n]))) fill(0); + else fill(0); + pg.noStroke(); + pg.textStyle(BOLD); + + pg.text(nombres[n], x[n], y[n]-10); + pg.textStyle(NORMAL); + if (compara(mc,color(colores[n]))) { + pg.text("Plan inicial: " + dim[n]+" Has", x[n], y[n]+5); + } + else { + pg.noStroke(); + if (dimr[n] != -1) pg.text("Parcela media: " + dimr[n]+" Has", x[n], y[n]+5); + else pg.text("(Sin datos)", x[n], y[n]+5); + } + } + + // Titulo + pg.fill(255,200); + pg.stroke(155); + pg.rect(605, 365, 170, 130); + pg.fill(0); + pg.textStyle(BOLD); + pg.textSize(12); + pg.text("TAMAÑO MEDIO DE EXPLOTACIÓN ENTREGADA A COLONO", 620, 380, 150, 80); + pg.textStyle(NORMAL); + pg.textSize(11); + pg.noStroke(); + pg.fill(155,0,0); + pg.text("Interacción con el ratón:",620, 430, 150, 20); + pg.fill(0); + pg.text("Datos reales (verde) frente a datos según Plan de Colonización (blanco)", 620, 445, 150, 80); + background("#cad2d3"); + imageMode(CENTER); + image(pg,width/2, height/2,w,h); +} + + + +function compara(c1, c2) { + return red(c1) == red(c2) && green(c1) == green(c2) && blue(c1) == blue(c2); +} + +function windowResized() { + resizeCanvas(windowWidth, windowHeight); +} diff --git a/docs/_site/graficos/presos.html b/docs/_site/graficos/presos.html new file mode 100644 index 0000000..7409e72 --- /dev/null +++ b/docs/_site/graficos/presos.html @@ -0,0 +1,42 @@ + + + + + + + + + +
+ + + + + + + + diff --git a/docs/_site/graficos/presos.js b/docs/_site/graficos/presos.js new file mode 100644 index 0000000..395befb --- /dev/null +++ b/docs/_site/graficos/presos.js @@ -0,0 +1,42 @@ +var ids, cuencas; +var idZonas, zonas; + + +function preload() { + nombres = new Array("SCPM1","SCPM1","SCPM2","SCPM3","SCPM3bis","SCPM4","SCPM4","SCPM6","SCPM7"); + inicio = new Array(1939,1944,1941,1940,1953,1940,1950,1942,-1); + final = new Array(1944,1960,1957,1953,1959,1944,1953,1944,1956); +} + + +function setup() { + ids = new Array("guadiana","guadalquivir-presos","tajo","ebro"); + cuencas = new Array(); + for (var n = 0; n < ids.length; n++) { + cuencas[n] = loadImage("data/" + ids[n]+".png"); + } + zonas = []; + idZonas = []; + idZonas[0] = new Array("montijo", "la_mancha"); + idZonas[1] = new Array("bajo_guadalquivir", "viar"); + idZonas[2] = new Array("alberche", "jarama", "rosarito"); + idZonas[3] = new Array("violada", "aragon_cataluna", "tarrega"); + for (var n = 0; n < ids.length; n++) { + zonas[n] = [] + for (var m = 0; m < idZonas[n].length; m++) { + zonas[n][m] = loadImage("data/"+idZonas[n][m]+".png"); + } + } + + createCanvas(655,519); + +} + + +function draw() { + background(200,225,225); + for (var n = 0; n < nombres.length; n++) { + var x = 100; + var y = map(n,0,nombres.length,300, 500); + } +} diff --git a/docs/_site/images/Unidadestrabajo.jpg b/docs/_site/images/Unidadestrabajo.jpg new file mode 100644 index 0000000..c099a75 Binary files /dev/null and b/docs/_site/images/Unidadestrabajo.jpg differ diff --git a/docs/_site/images/banner-old.jpg b/docs/_site/images/banner-old.jpg new file mode 100755 index 0000000..d5423e2 Binary files /dev/null and b/docs/_site/images/banner-old.jpg differ diff --git a/docs/_site/images/banner.jpg b/docs/_site/images/banner.jpg new file mode 100755 index 0000000..5e13b10 Binary files /dev/null and b/docs/_site/images/banner.jpg differ diff --git a/docs/_site/images/guadalquivir-presos.png b/docs/_site/images/guadalquivir-presos.png new file mode 100644 index 0000000..cbc70a7 Binary files /dev/null and b/docs/_site/images/guadalquivir-presos.png differ diff --git a/docs/_site/images/modulo-carro.jpg b/docs/_site/images/modulo-carro.jpg new file mode 100644 index 0000000..39daf19 Binary files /dev/null and b/docs/_site/images/modulo-carro.jpg differ diff --git a/docs/_site/images/pic01.jpg b/docs/_site/images/pic01.jpg new file mode 100755 index 0000000..a14ad04 Binary files /dev/null and b/docs/_site/images/pic01.jpg differ diff --git a/docs/_site/images/pic02.jpg b/docs/_site/images/pic02.jpg new file mode 100755 index 0000000..57a2a83 Binary files /dev/null and b/docs/_site/images/pic02.jpg differ diff --git a/docs/_site/images/pic03.jpg b/docs/_site/images/pic03.jpg new file mode 100755 index 0000000..cab2c29 Binary files /dev/null and b/docs/_site/images/pic03.jpg differ diff --git a/docs/_site/images/pic04.jpg b/docs/_site/images/pic04.jpg new file mode 100755 index 0000000..86b93fc Binary files /dev/null and b/docs/_site/images/pic04.jpg differ diff --git a/docs/_site/images/pic05.jpg b/docs/_site/images/pic05.jpg new file mode 100755 index 0000000..f2fc227 Binary files /dev/null and b/docs/_site/images/pic05.jpg differ diff --git a/docs/_site/index-old.html b/docs/_site/index-old.html new file mode 100644 index 0000000..46d9058 --- /dev/null +++ b/docs/_site/index-old.html @@ -0,0 +1,259 @@ + + + + + + + + TÍTULO + + + + + + + + + + + + + +
+ + + + + + + + + +
+
+
+

Arcu aliquet vel lobortis ata nisl
+ eget augue amet aliquet nisl cep donec

+

Aliquam ut ex ut augue consectetur interdum. Donec amet imperdiet eleifend
+ fringilla tincidunt. Nullam dui leo Aenean mi ligula, rhoncus ullamcorper.

+
+
    +
  • Lorem
  • +
  • Ipsum
  • +
  • Dolor
  • +
+
+
+ + +
+
+
+

Magna primis lobortis
+ sed ullamcorper

+

Aliquam ut ex ut augue consectetur interdum. Donec hendrerit imperdiet. Mauris eleifend fringilla nullam aenean mi ligula.

+
+
+
+
+

Tortor dolore feugiat
+ elementum magna

+

Aliquam ut ex ut augue consectetur interdum. Donec hendrerit imperdiet. Mauris eleifend fringilla nullam aenean mi ligula.

+
+
+
+
+

Augue eleifend aliquet
+ sed condimentum

+

Aliquam ut ex ut augue consectetur interdum. Donec hendrerit imperdiet. Mauris eleifend fringilla nullam aenean mi ligula.

+
+
+
+ + +
+
+
+

Accumsan mus tortor nunc aliquet

+

Aliquam ut ex ut augue consectetur interdum. Donec amet imperdiet eleifend
+ fringilla tincidunt. Nullam dui leo Aenean mi ligula, rhoncus ullamcorper.

+
+
    +
  • +

    Arcu accumsan

    +

    Augue consectetur sed interdum imperdiet et ipsum. Mauris lorem tincidunt nullam amet leo Aenean ligula consequat consequat.

    +
  • +
  • +

    Ac Augue Eget

    +

    Augue consectetur sed interdum imperdiet et ipsum. Mauris lorem tincidunt nullam amet leo Aenean ligula consequat consequat.

    +
  • +
  • +

    Mus Scelerisque

    +

    Augue consectetur sed interdum imperdiet et ipsum. Mauris lorem tincidunt nullam amet leo Aenean ligula consequat consequat.

    +
  • +
  • +

    Mauris Imperdiet

    +

    Augue consectetur sed interdum imperdiet et ipsum. Mauris lorem tincidunt nullam amet leo Aenean ligula consequat consequat.

    +
  • +
  • +

    Aenean Primis

    +

    Augue consectetur sed interdum imperdiet et ipsum. Mauris lorem tincidunt nullam amet leo Aenean ligula consequat consequat.

    +
  • +
  • +

    Tortor Ut

    +

    Augue consectetur sed interdum imperdiet et ipsum. Mauris lorem tincidunt nullam amet leo Aenean ligula consequat consequat.

    +
  • +
+
+
+ + +
+
+
+

Arcue ut vel commodo

+

Aliquam ut ex ut augue consectetur interdum endrerit imperdiet amet eleifend fringilla.

+
+ +
+
+ + + +
+
    + +
+ +
+ + + + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/docs/_site/index.html b/docs/_site/index.html new file mode 100644 index 0000000..91fb743 --- /dev/null +++ b/docs/_site/index.html @@ -0,0 +1,273 @@ + + + + + + + + Titulo Introducción - presentación + + + + + + + + + + + + + +
+ + + + + + + + + +
+
+
+

Titulo Introducción - presentación

+ +
+

Uno de los episodios más relevantes entre los procesos operados sobre el territorio peninsular durante el siglo xx fue la llamada Colonización Interior. Descendiente de las tesis regeneracionistas de final de siglo e inspirada en procesos análogos desarrollados en Italia, Alemania o Israel, esta transformación productiva del territorio dirigida por el Instituto Nacional de Colonización (INC) entre 1939 y 1973 significó fundamentalmente la preparación para el cultivo y puesta en regadío de vastas extensiones de terreno a lo largo y ancho del Estado.

+ +

La necesidad de mano de obra para las tierras puestas en producción implicó la construcción de un gran número de nuevos pueblos, los llamados poblados de colonización. Dispuestos en redes de pequeños núcleos urbanos sitas en el interior de las zonas regables, fueron pueblos diseñados por algunos de los arquitectos más relevantes del momento cuyos trazados vanguardistas llaman todavía hoy la atención. Cada familia de colonos, seleccionada tanto por sus capacidades y competencias como por criterios de buena conducta, recibía así una vivienda y una parcela que había de costear con los réditos de su trabajo.

+ +

AQUI VA EL MAPA: include mapa.html

+ +

En muchos casos, las tierras recibidas eran de muy baja calidad, debido a una compleja mecánica de expropiación que benefició a los grandes terratenientes y a las redes clientelares del Régimen. Los suelos no fueron la única dificultad que estos pobladores tuvieron que afrontar; a esta hay que sumarle la burocratización debida al continuo control del Instituto de Colonización, la invisibilización del papel de las mujeres y un diseño estacionario de los planes que contempló tardíamente la mecanización de la agricultura. Pese a todas estas dificultades, sin embargo, las sucesivas generaciones de colonos pusieron en práctica las nuevas técnicas y han formado parte así de la buscada modernización agraria.

+ +

Esta colonización por otro lado no pudo tener lugar sin una política paralela de desarrollo de infraestructuras hidráulicas. La puesta en regadío implicó la construcción de embalses y la excavación de grandes canales y redes de acequias. Como un caso más de memoria histórica, es necesario destacar el hecho de que en un Estado pauperizado tras la guerra y aislado internacionalmente, estas obras necesitaron emplear mano de obra proporcionada por el programa de Redención de Penas por el Trabajo, estos es, prisioneros de guerra y comunes empleados en lo que ha sido llamado el trabajo esclavo.

+ +

La colonización fue en resumen un proceso complejo en el que confluyeron una primera etapa represiva de la dictadura con una visión pragmática y tecnócrata que la reemplazó, que fue implantado en una variedad enorme de contextos sociales, económicos y culturales que hacen difícil la generalización y el análisis grueso. Presentamos a continuación una serie de fragmentos de este proceso vistos desde una aproximación centrada en datos históricos de archivos y estudios legitimados. Ventanas de datos a un territorio cuya escala y memoria cambiaron para siempre.

+ +
+ +
+ + + + +
+
+
+

Título posible de sección bloques

+

Aliquam ut ex ut augue consectetur interdum. Donec amet imperdiet eleifend
+ fringilla tincidunt. Nullam dui leo Aenean mi ligula, rhoncus ullamcorper.

+
+
    +
  • +

    Introducción

    + Agua, reforma agraria y colonización. Contexto internacional de modernización agrícola

    +
  • +
  • +

    El estado autoritario

    +

    Augue consectetur sed interdum imperdiet et ipsum. Mauris lorem tincidunt nullam amet leo Aenean ligula consequat consequat.

    +
  • +
  • +

    Empleo de presos en las grandes obras

    +

    De la represión política a la explotación económica: el programa de Redención de Penas por el Trabajo, fundamental para la colonización.

    +
  • +
  • +

    El colono

    +

    Augue consectetur sed interdum imperdiet et ipsum. Mauris lorem tincidunt nullam amet leo Aenean ligula consequat consequat.

    +
  • +
  • +

    De colono a ciudadano

    +

    Augue consectetur sed interdum imperdiet et ipsum. Mauris lorem tincidunt nullam amet leo Aenean ligula consequat consequat.

    +
  • +
  • +

    Las mujeres en el proceso colonizador

    +

    Augue consectetur sed interdum imperdiet et ipsum. Mauris lorem tincidunt nullam amet leo Aenean ligula consequat consequat.

    +
  • +
  • +

    Diseño urbano y paisajes

    +

    Augue consectetur sed interdum imperdiet et ipsum. Mauris lorem tincidunt nullam amet leo Aenean ligula consequat consequat.

    +
  • +
  • +

    Tipos de cultivo y producción

    +

    Augue consectetur sed interdum imperdiet et ipsum. Mauris lorem tincidunt nullam amet leo Aenean ligula consequat consequat.

    +
  • +
  • +

    Los modelos principales

    +

    Augue consectetur sed interdum imperdiet et ipsum. Mauris lorem tincidunt nullam amet leo Aenean ligula consequat consequat.

    +
  • +
  • +

    Expropiación y plusvalía

    +

    Augue consectetur sed interdum imperdiet et ipsum. Mauris lorem tincidunt nullam amet leo Aenean ligula consequat consequat.

    +
  • +
+
+
+ + +
+
+
+

Arcue ut vel commodo

+

Aliquam ut ex ut augue consectetur interdum endrerit imperdiet amet eleifend fringilla.

+
+ +
+
+ + + +
+
    + +
+ +
+ + + + + + + + + + + + +
+ + + + diff --git a/docs/_site/introduccion.html b/docs/_site/introduccion.html new file mode 100644 index 0000000..292e3bc --- /dev/null +++ b/docs/_site/introduccion.html @@ -0,0 +1,178 @@ + + + + + + + + Agua, reforma agraria y colonización. Contexto internacional de modernización agrícola + + + + + + + + + + + + + +
+ + + + + +
+ +
+

Agua, reforma agraria y colonización. Contexto internacional de modernización agrícola

+

Agua, reforma agraria y colonización. Contexto internacional de modernización agrícola

+
+ +
+
+
+ +
+ +
+ +
+ + +
+
+ +
+ + + +
+
    + +
+ +
+ + + + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/docs/_site/js/ie/backgroundsize.min.htc b/docs/_site/js/ie/backgroundsize.min.htc new file mode 100755 index 0000000..9b2592e --- /dev/null +++ b/docs/_site/js/ie/backgroundsize.min.htc @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/docs/_site/js/ie/html5shiv.js b/docs/_site/js/ie/html5shiv.js new file mode 100755 index 0000000..dcf351c --- /dev/null +++ b/docs/_site/js/ie/html5shiv.js @@ -0,0 +1,8 @@ +/* + HTML5 Shiv v3.6.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); +a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x"; +c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| +"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video",version:"3.6.2",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment(); +for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d #mq-test-1 { width: 42px; }',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){v(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},g=function(a){return a.replace(c.regex.minmaxwh,"").match(c.regex.other)};if(c.ajax=f,c.queue=d,c.unsupportedmq=g,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^/][^*]*\*+)*\//gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var h,i,j,k=a.document,l=k.documentElement,m=[],n=[],o=[],p={},q=30,r=k.getElementsByTagName("head")[0]||l,s=k.getElementsByTagName("base")[0],t=r.getElementsByTagName("link"),u=function(){var a,b=k.createElement("div"),c=k.body,d=l.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=k.createElement("body"),c.style.background="none"),l.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&l.insertBefore(c,l.firstChild),a=b.offsetWidth,f?l.removeChild(c):c.removeChild(b),l.style.fontSize=d,e&&(c.style.fontSize=e),a=j=parseFloat(a)},v=function(b){var c="clientWidth",d=l[c],e="CSS1Compat"===k.compatMode&&d||k.body[c]||d,f={},g=t[t.length-1],p=(new Date).getTime();if(b&&h&&q>p-h)return a.clearTimeout(i),i=a.setTimeout(v,q),void 0;h=p;for(var s in m)if(m.hasOwnProperty(s)){var w=m[s],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?j||u():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?j||u():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(n[w.rules]))}for(var C in o)o.hasOwnProperty(C)&&o[C]&&o[C].parentNode===r&&r.removeChild(o[C]);o.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=k.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,r.insertBefore(E,g.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(k.createTextNode(F)),o.push(E)}},w=function(a,b,d){var e=a.replace(c.regex.comments,"").replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},i=!f&&d;b.length&&(b+="/"),i&&(f=1);for(var j=0;f>j;j++){var k,l,o,p;i?(k=d,n.push(h(a))):(k=e[j].match(c.regex.findStyles)&&RegExp.$1,n.push(RegExp.$2&&h(RegExp.$2))),o=k.split(","),p=o.length;for(var q=0;p>q;q++)l=o[q],g(l)||m.push({media:l.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:n.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}v()},x=function(){if(d.length){var b=d.shift();f(b.href,function(c){w(c,b.href,b.media),p[b.href]=!0,a.setTimeout(function(){x()},0)})}},y=function(){for(var b=0;ba?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b="length"in a&&a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1; + +return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="
a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function aa(){return!0}function ba(){return!1}function ca(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/\s*$/g,ra={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:k.htmlSerialize?[0,"",""]:[1,"X
","
"]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Ba(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xa(b).text=a.text,ya(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=da(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?""!==l[1]||ka.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ua(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ua(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&na.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qa,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Ca,Da={};function Ea(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m(" + + + + + + + + + + +
+
    + +
+ +
+ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_site/modelos.html b/docs/_site/modelos.html new file mode 100644 index 0000000..610e191 --- /dev/null +++ b/docs/_site/modelos.html @@ -0,0 +1,197 @@ + + + + + + + + Los principales modelos de colonización + + + + + + + + + + + + + +
+ + + + + +
+ +
+

Los principales modelos de colonización

+

+
+ +
+
+

Latifundio, minifundio, grandes propietarios, pequeños agricultores… La adaptación al entorno parcelario era una de las claves que manejaba el Régimen para poder hacer que funcionará el plan de colonización en toda España. Por eso tuvieron que diferenciar el tipo de repoblación dependiendo de la región elegida. Los entornos agrícolas del norte de España son totalmente distintos de los del sur y el plan para la colonización de los espacios también tenía que serlo.

+ +

A lo largo y ancho de la geografía española podemos diferenciar entre varios modelos que tomaron las instituciones dependiendo del lugar donde se ideaban las nuevas poblaciones. Y con unas características y unos resultados finales también bastante diferentes.

+ +

Con este mapa es fácil ver los diferentes planes implementados en cada zona geográfica, y descubrir, también, las diferencias entre los planes iniciales y la ejecución final. En la zona del Guadalquivir, por ejemplo, los colonos, en principio, iban a recibir 10 hectareas de media por familia, tras la ejecución de los planes solo recibieron 5,3.

+ +
+ +
+ +

El modelo de Aragón-Navarra

+ +

Debido a su geografía y su situación parcelaria la zona aragonesa y navarra se caracteriza por los minifundios y de propiedad mucho más repartida y con explotaciones mucho más pequeñas. En esas zonas la actuación del INC fue más sencilla y la colonización fue más efectiva. El caso de Bárdenas del Caudillo (Actualmente con el nombre de Bárdenas) es uno de los ejemplos en los que esta estrategia de colonización se puede considerar como efectiva, ya que el pueblo fue creciendo y afianzándose con el paso de los años desde su fundación en 1959.

+ +
+ +
+ +

El modelo de Andalucia-Extremadura

+ +

Aquí la situación cambiaba completamente. Frente a los minifundios del norte, la situación del sur siempre se ha caracterizado por los grandes latifundios controlados por pocas manos. Esto provocó que la colonización se hiciese de una forma bastante aislada y con una eficacia menor que en el norte. La mayoría de poblados, como el de Sotogordo se localizaron en medio de grandes extensiones de terrenos y acabaron aislados y gran parte de ellos abandonados.

+ +
+ +
+ + +
+
+ +
+ + + +
+
    + +
+ +
+ + + + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/docs/_site/mujeres.html b/docs/_site/mujeres.html new file mode 100644 index 0000000..78a29d0 --- /dev/null +++ b/docs/_site/mujeres.html @@ -0,0 +1,192 @@ + + + + + + + + Las mujeres en el proceso colonizador + + + + + + + + + + + + + +
+ + + + + +
+ +
+

Las mujeres en el proceso colonizador

+

+
+ +
+
+

Aunque puede parecer que las políticas de colonización se construyen de espaldas al género, es el trabajo reproductivo y de cuidados el que convierte en viable al proyecto en si. Las mujeres han aparecido, cuando lo han hecho, como apéndices complementarios de aquel hombre vinculado al mundo agrícola que asumía todo el protagonismo, a la vez que se utilizaba y se reconstruía como símbolo patrio.

+ +

Ellas aparecen, como no podía ser de otro modo en un hecho social, vinculadas a los diferentes Las mujeres de los presos,

+ +

cNo solo ha sido invisibilizado el trabajo reprodictivo y de cuidados +¿Quiénes son?

+ +

El sistema de equivalencia que se estableció como uno de los requisitos para ser seleccionado como colono invisibilizaba a las mujeres de la unidad familiar cuando no las ubicaba en los tramos más bajos en relación con el trabajo productivo. Así, las mujeres dedicadas a los trabajos domésticos (esposa del colono) y las que, en el núcleo familiar tuvieran a su cargo hijos/as menores de tres años no computaban de ningún modo como fuerza laboral. Además, las que sí que lo hacían por no ubicarse en los epígrafes anteriormente mencionados, tan sólo obtenían un 0,25, la mitad de lo que representaba un varón de entre 12 y 14 años (0,50).

+ +

Unidades de trabajo

+ +

Fuente: Elaboración propia a partir de GÓMEZ BENITO, C. Políticos, burócratas y expertos. Un estudio de la política agraria y la sociología rural en España (1936-1959). Siglo XXI de España Editores S.A (1995) e iconos de Adrien Coquet en Noun Project

+ +

Maestras solas (solteras, viudas, separadas); +jornaleras,

+ +
+

“¿y cien kilos de algodón una mujer? Recoger 100 kilos de algodón en una jornada ya era recoger algodón, más que los hombres. Se pagaba por kilo. Nos poníamos mi hermano y yo y como mucho cogíamos 30 kilos, te desriñonabas de intentarlo. Eran sobre todo jornaleras.” -Milagros, hija de colono.

+
+ +

esposas-hijas de los colonos, El Hogar, la sección femenina. +la excepción de “las colonas” +Las “maestras”, las únicas remuneradas. +Las mujeres de los presos (El canal de los presos)

+ +
+
+ +
+ + + +
+
    + +
+ +
+ + + + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/docs/_site/old/elements.html b/docs/_site/old/elements.html new file mode 100644 index 0000000..aefeb00 --- /dev/null +++ b/docs/_site/old/elements.html @@ -0,0 +1,469 @@ + + + + + + + + Elements + + + + + + + + + + + + + +
+ + + + + +
+ +
+

Elements

+

+
+ +
+
+
+

Text

+

This is bold and this is strong. This is italic and this is emphasized. + This is superscript text and this is subscript text. + This is underlined and this is code: for (;;) { ... }. Finally, this is a link.

+
+
+

Heading with a Subtitle

+

Lorem ipsum dolor sit amet nullam id egestas urna aliquam

+
+

Nunc lacinia ante nunc ac lobortis. Interdum adipiscing gravida odio porttitor sem non mi integer non faucibus ornare mi ut ante amet placerat aliquet. Volutpat eu sed ante lacinia sapien lorem accumsan varius montes viverra nibh in adipiscing blandit tempus accumsan.

+
+
Heading with a Subtitle
+

Lorem ipsum dolor sit amet nullam id egestas urna aliquam

+
+

Nunc lacinia ante nunc ac lobortis. Interdum adipiscing gravida odio porttitor sem non mi integer non faucibus ornare mi ut ante amet placerat aliquet. Volutpat eu sed ante lacinia sapien lorem accumsan varius montes viverra nibh in adipiscing blandit tempus accumsan.

+
+

Heading Level 2

+

Heading Level 3

+

Heading Level 4

+
Heading Level 5
+
Heading Level 6
+
+
Blockquote
+
Fringilla nisl. Donec accumsan interdum nisi, quis tincidunt felis sagittis eget tempus euismod. Vestibulum ante ipsum primis in faucibus vestibulum. Blandit adipiscing eu felis iaculis volutpat ac adipiscing accumsan faucibus. Vestibulum ante ipsum primis in faucibus lorem ipsum dolor sit amet nullam adipiscing eu felis.
+
Preformatted
+
i = 0;
+
+while (!deck.isInOrder()) {
+  print 'Iteration ' + i;
+  deck.shuffle();
+  i++;
+}
+
+print 'It took ' + i + ' iterations to sort the deck.';
+
+
+

Lists

+
+
+
Unordered
+
    +
  • Dolor pulvinar etiam.
  • +
  • Sagittis adipiscing.
  • +
  • Felis enim feugiat.
  • +
+
Alternate
+
    +
  • Dolor pulvinar etiam.
  • +
  • Sagittis adipiscing.
  • +
  • Felis enim feugiat.
  • +
+
+
+
Ordered
+
    +
  1. Dolor pulvinar etiam.
  2. +
  3. Etiam vel felis viverra.
  4. +
  5. Felis enim feugiat.
  6. +
  7. Dolor pulvinar etiam.
  8. +
  9. Etiam vel felis lorem.
  10. +
  11. Felis enim et feugiat.
  12. +
+
Icons
+ +
+
+
Actions
+
+
+ + + + +
+
+ + +
+
+
+
+

Table

+
Default
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionPrice
Item OneAnte turpis integer aliquet porttitor.29.99
Item TwoVis ac commodo adipiscing arcu aliquet.19.99
Item Three Morbi faucibus arcu accumsan lorem.29.99
Item FourVitae integer tempus condimentum.19.99
Item FiveAnte turpis integer aliquet porttitor.29.99
100.00
+ +
Alternate
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionPrice
Item OneAnte turpis integer aliquet porttitor.29.99
Item TwoVis ac commodo adipiscing arcu aliquet.19.99
Item Three Morbi faucibus arcu accumsan lorem.29.99
Item FourVitae integer tempus condimentum.19.99
Item FiveAnte turpis integer aliquet porttitor.29.99
100.00
+
+ +
+

Buttons

+ + + + + +
    +
  • Disabled
  • +
  • Disabled
  • +
+
+
+

Form

+
+
+
+ +
+
+ +
+
+
+ +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+
    +
  • +
  • +
+
+
+
+
+
+

Image

+
Fit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Left & Right
+

Morbi mattis mi consectetur tortor elementum, varius pellentesque velit convallis. Aenean tincidunt lectus auctor mauris maximus, ac scelerisque ipsum tempor. Duis vulputate ex et ex tincidunt, quis lacinia velit aliquet. Duis non efficitur nisi, id malesuada justo. Maecenas sagittis felis ac sagittis semper. Curabitur purus leo, tempus sed finibus eget, fringilla quis risus. Maecenas et lorem quis sem varius sagittis et a est. Maecenas iaculis iaculis sem. Donec vel dolor at arcu tincidunt bibendum. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce ut aliquet justo. Donec id neque ipsum. Integer eget ultricies odio. Nam vel ex a orci fringilla tincidunt. Aliquam eleifend ligula non velit accumsan cursus. Etiam ut gravida sapien. Morbi mattis mi consectetur tortor elementum, varius pellentesque velit convallis. Aenean tincidunt lectus auctor mauris maximus, ac scelerisque ipsum tempor. Duis vulputate ex et ex tincidunt, quis lacinia velit aliquet. Duis non efficitur nisi, id malesuada justo. Maecenas sagittis felis ac sagittis semper. Curabitur purus leo, tempus sed finibus eget, fringilla quis risus. Maecenas et lorem quis sem varius sagittis et a est. Maecenas iaculis iaculis sem. Donec vel dolor at arcu tincidunt bibendum. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce ut aliquet justo. Donec id neque ipsum. Integer eget ultricies odio. Nam vel ex a orci fringilla tincidunt. Aliquam eleifend ligula non velit accumsan cursus. Etiam ut gravida sapien.

+

Vestibulum ultrices risus velit, sit amet blandit massa auctor sit amet. Sed eu lectus sem. Phasellus in odio at ipsum porttitor mollis id vel diam. Praesent sit amet posuere risus, eu faucibus lectus. Vivamus ex ligula, tempus pulvinar ipsum in, auctor porta quam. Proin nec dui cursus, posuere dui eget interdum. Fusce lectus magna, sagittis at facilisis vitae, pellentesque at etiam. Quisque posuere leo quis sem commodo, vel scelerisque nisi scelerisque. Suspendisse id quam vel tortor tincidunt suscipit. Nullam auctor orci eu dolor consectetur, interdum ullamcorper ante tincidunt. Mauris felis nec felis elementum varius. Nam sapien ante, varius in pulvinar vitae, rhoncus id massa. Donec varius ex in mauris ornare, eget euismod urna egestas. Etiam lacinia tempor ipsum, sodales porttitor justo. Aliquam dolor quam, semper in tortor eu, volutpat efficitur quam. Fusce nec fermentum nisl. Aenean erat diam, tempus aliquet erat. Etiam iaculis nulla ipsum, et pharetra libero rhoncus ut. Phasellus rutrum cursus velit, eget condimentum nunc blandit vel. In at pulvinar lectus. Morbi diam ante, vulputate et imperdiet eget, fermentum non dolor. Ut eleifend sagittis tincidunt. Sed viverra commodo mi, ac rhoncus justo. Duis neque ligula, elementum ut enim vel, posuere finibus justo. Vivamus facilisis maximus nibh quis pulvinar. Quisque hendrerit in ipsum id tellus facilisis fermentum. Proin mauris dui.

+
+ + + + + + + + +
+
    + +
+ +
+ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_site/old/generic.html b/docs/_site/old/generic.html new file mode 100644 index 0000000..8ddb315 --- /dev/null +++ b/docs/_site/old/generic.html @@ -0,0 +1,175 @@ + + + + + + + + Generic + + + + + + + + + + + + + +
+ + + + + +
+ +
+

Generic

+

+
+ +
+
+

Lorem ipsum dolor

+

Morbi mattis mi consectetur tortor elementum, varius pellentesque velit convallis. Aenean tincidunt lectus auctor mauris maximus, ac scelerisque ipsum tempor. Duis vulputate ex et ex tincidunt, quis lacinia velit aliquet. Duis non efficitur nisi, id malesuada justo. Maecenas sagittis felis ac sagittis semper. Curabitur purus leo, tempus sed finibus eget, fringilla quis risus. Maecenas et lorem quis sem varius sagittis et a est. Maecenas iaculis iaculis sem. Donec vel dolor at arcu tincidunt bibendum. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce ut aliquet justo. Donec id neque ipsum. Integer eget ultricies odio. Nam vel ex a orci fringilla tincidunt. Aliquam eleifend ligula non velit accumsan cursus. Etiam ut gravida sapien.

+

Vestibulum ultrices risus velit, sit amet blandit massa auctor sit amet. Sed eu lectus sem. Phasellus in odio at ipsum porttitor mollis id vel diam. Praesent sit amet posuere risus, eu faucibus lectus. Vivamus ex ligula, tempus pulvinar ipsum in, auctor porta quam. Proin nec dui cursus, posuere dui eget interdum. Fusce lectus magna, sagittis at facilisis vitae, pellentesque at etiam. Quisque posuere leo quis sem commodo, vel scelerisque nisi scelerisque. Suspendisse id quam vel tortor tincidunt suscipit. Nullam auctor orci eu dolor consectetur, interdum ullamcorper ante tincidunt. Mauris felis nec felis elementum varius.

+
+

Feugiat aliquam

+

Nam sapien ante, varius in pulvinar vitae, rhoncus id massa. Donec varius ex in mauris ornare, eget euismod urna egestas. Etiam lacinia tempor ipsum, sodales porttitor justo. Aliquam dolor quam, semper in tortor eu, volutpat efficitur quam. Fusce nec fermentum nisl. Aenean erat diam, tempus aliquet erat.

+

Etiam iaculis nulla ipsum, et pharetra libero rhoncus ut. Phasellus rutrum cursus velit, eget condimentum nunc blandit vel. In at pulvinar lectus. Morbi diam ante, vulputate et imperdiet eget, fermentum non dolor. Ut eleifend sagittis tincidunt. Sed viverra commodo mi, ac rhoncus justo. Duis neque ligula, elementum ut enim vel, posuere finibus justo. Vivamus facilisis maximus nibh quis pulvinar. Quisque hendrerit in ipsum id tellus facilisis fermentum. Proin mauris dui, at vestibulum sit amet, auctor bibendum neque.

+ +
+
+ +
+ + + +
+
    + +
+ +
+ + + + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/docs/_site/presos.html b/docs/_site/presos.html new file mode 100644 index 0000000..ead1a2b --- /dev/null +++ b/docs/_site/presos.html @@ -0,0 +1,192 @@ + + + + + + + + Empleo de presos en las grandes obras + + + + + + + + + + + + + +
+ + + + + +
+ +
+

Empleo de presos en las grandes obras

+

De la represión política a la explotación económica

+
+ +
+
+

4 metros cúbicos excavados, por persona y día. Mientras el cupo no estuviera completado, la jornada no terminaba. Un trabajo extenuante a cambio de 2 pesetas y 50 céntimos diarios, apenas la cuarta parte del sueldo medio en este tipo de tareas. De las 2,50, además, 1,50 no se entregaban al trabajador: pasaban -cuando no se perdían en el camino- al grueso de su cartilla de liberación. Y es que hablamos de reclusos, de presos políticos en particular, empleados como mano de obra.

+ +

+ +

El programa de Redención de Penas por el Trabajo

+ +

El jesuita José Agustín Pérez del Pulgar lo vio claro. En aras de que el ingente número de prisioneros capturados durante y después de la Guerra Civil no constituyera “un peso muerto al erario público”, estos debían sustentarse a sí mismos con su propio trabajo. El programa de Redención de Penas por el Trabajo fue creado en 1937 a partir de esta idea. Y con él, una fuente de mano de obra gratuita para el Régimen que, en el contexto de necesidad de infraestructuras que la empresa colonizadora demandaba, resultó ser crucial en algunas de sus obras más significativas.

+ +

Si no podemos entender los arrozales del Guadalquivir sin los 150 Km del Canal del Bajo Guadalquivir, este no puede comprenderse sin los cerca de 2000 prisioneros empleados en su construcción. Lo mismo ocurre con el Canal de Montijo, el primero de los dispuestos por el Plan Badajoz, o con el Canal del Bajo Alberche (Tajo) o el de la Violada (Ebro), entre otros. El programa colonizador vino de la mano de una política hidráulica que estuvo apoyada a su vez en lo que hoy es conocido como el trabajo esclavo de prisioneros políticos, comunes y, después, libertos -liberados que no podían encontrar trabajo en ningún otro lugar- Lejos de ser algo puntual, el uso de presos políticos se extendió en el tiempo durante gran parte del franquismo, como se puede ver en este timeline. Era un negocio rentable y el Régimen lo quiso aprovechar al máximo.

+ +
+ + +
+ +

El uso de presos para el desarrollo de infraestructuras exigió la construcción de numerosos campos de concentración. De entre los distintos tipos de campos, los más duraderos fueron los operados por el Servicio de Colonias Penitenciarias Militarizadas (SCPM), que llegaron a estar en funcionamiento durante más de 20 años. Este servicio se dividió en 8 agrupaciones, 6 de las cuales estuvieron dedicadas casi en exclusiva a trabajos para la colonización.

+ +

Algunos de ellos, como el de Los Merinales en Dos Hermanas (Sevilla) han sido demolidos, otros sobreviven en ruinas. Todos tienen, sin embargo, algo en común: una historia de invisibilidad, y de falta a la memoria.

+ +
+ +
+ + +
+
+ +
+ + + +
+
    + +
+ +
+ + + + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/docs/_site/sliders/bardenas-caudillo-1956.jpeg b/docs/_site/sliders/bardenas-caudillo-1956.jpeg new file mode 100644 index 0000000..ac4a6c9 Binary files /dev/null and b/docs/_site/sliders/bardenas-caudillo-1956.jpeg differ diff --git a/docs/_site/sliders/bardenas-caudillo-2014.jpeg b/docs/_site/sliders/bardenas-caudillo-2014.jpeg new file mode 100644 index 0000000..170a87f Binary files /dev/null and b/docs/_site/sliders/bardenas-caudillo-2014.jpeg differ diff --git a/docs/_site/sliders/bardenas.html b/docs/_site/sliders/bardenas.html new file mode 100644 index 0000000..2b2959f --- /dev/null +++ b/docs/_site/sliders/bardenas.html @@ -0,0 +1,25 @@ + + + + + + + + + +
+ + +
+ + + diff --git a/docs/_site/sliders/jquery-3.2.1.min.js b/docs/_site/sliders/jquery-3.2.1.min.js new file mode 100644 index 0000000..644d35e --- /dev/null +++ b/docs/_site/sliders/jquery-3.2.1.min.js @@ -0,0 +1,4 @@ +/*! jQuery v3.2.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.2.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0&&("form"in a||"label"in a)},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"form"in b?b.parentNode&&b.disabled===!1?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&ea(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}}):(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c,d,e,f=b.getElementById(a);if(f){if(c=f.getAttributeNode("id"),c&&c.value===a)return[f];e=b.getElementsByName(a),d=0;while(f=e[d++])if(c=f.getAttributeNode("id"),c&&c.value===a)return[f]}return[]}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,c,e){var f,i,j,k,l,m="function"==typeof a&&a,n=!e&&g(a=m.selector||a);if(c=c||[],1===n.length){if(i=n[0]=n[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&9===b.nodeType&&p&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(_,aa),b)||[])[0],!b)return c;m&&(b=b.parentNode),a=a.slice(i.shift().value.length)}f=V.needsContext.test(a)?0:i.length;while(f--){if(j=i[f],d.relative[k=j.type])break;if((l=d.find[k])&&(e=l(j.matches[0].replace(_,aa),$.test(i[0].type)&&qa(b.parentNode)||b))){if(i.splice(f,1),a=e.length&&sa(i),!a)return G.apply(c,e),c;break}}}return(m||h(a,n))(e,b,!p,c,!b||$.test(a)&&qa(b.parentNode)||b),c},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext;function B(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()}var C=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,D=/^.[^:#\[\.,]*$/;function E(a,b,c){return r.isFunction(b)?r.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?r.grep(a,function(a){return a===b!==c}):"string"!=typeof b?r.grep(a,function(a){return i.call(b,a)>-1!==c}):D.test(b)?r.filter(b,a,c):(b=r.filter(b,a),r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType}))}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(E(this,a||[],!1))},not:function(a){return this.pushStack(E(this,a||[],!0))},is:function(a){return!!E(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var F,G=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,H=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||F,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:G.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),C.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};H.prototype=r.fn,F=r(d);var I=/^(?:parents|prev(?:Until|All))/,J={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function K(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return K(a,"nextSibling")},prev:function(a){return K(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return B(a,"iframe")?a.contentDocument:(B(a,"template")&&(a=a.content||a),r.merge([],a.childNodes))}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(J[a]||r.uniqueSort(e),I.test(a)&&e.reverse()),this.pushStack(e)}});var L=/[^\x20\t\r\n\f]+/g;function M(a){var b={};return r.each(a.match(L)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?M(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=e||a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function N(a){return a}function O(a){throw a}function P(a,b,c,d){var e;try{a&&r.isFunction(e=a.promise)?e.call(a).done(b).fail(c):a&&r.isFunction(e=a.then)?e.call(a,b,c):b.apply(void 0,[a].slice(d))}catch(a){c.apply(void 0,[a])}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b=f&&(d!==O&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:N,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:N)),c[2][3].add(g(0,a,r.isFunction(d)?d:O))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(P(a,g.done(h(c)).resolve,g.reject,!b),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)P(e[c],h(c),g.reject);return g.promise()}});var Q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&Q.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var R=r.Deferred();r.fn.ready=function(a){return R.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||R.resolveWith(d,[r]))}}),r.ready.then=R.then;function S(){d.removeEventListener("DOMContentLoaded",S), +a.removeEventListener("load",S),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",S),a.addEventListener("load",S));var T=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)T(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h1,null,!0)},removeData:function(a){return this.each(function(){X.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=W.get(a,b),c&&(!d||Array.isArray(c)?d=W.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return W.get(a,c)||W.access(a,c,{empty:r.Callbacks("once memory").add(function(){W.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length\x20\t\r\n\f]+)/i,la=/^$|\/(?:java|ecma)script/i,ma={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ma.optgroup=ma.option,ma.tbody=ma.tfoot=ma.colgroup=ma.caption=ma.thead,ma.th=ma.td;function na(a,b){var c;return c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&B(a,b)?r.merge([a],c):c}function oa(a,b){for(var c=0,d=a.length;c-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=na(l.appendChild(f),"script"),j&&oa(g),c){k=0;while(f=g[k++])la.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var ra=d.documentElement,sa=/^key/,ta=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ua=/^([^.]*)(?:\.(.+)|)/;function va(){return!0}function wa(){return!1}function xa(){try{return d.activeElement}catch(a){}}function ya(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ya(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=wa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(ra,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(L)||[""],j=b.length;while(j--)h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.hasData(a)&&W.get(a);if(q&&(i=q.events)){b=(b||"").match(L)||[""],j=b.length;while(j--)if(h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&W.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(W.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i\x20\t\r\n\f]*)[^>]*)\/>/gi,Aa=/\s*$/g;function Ea(a,b){return B(a,"table")&&B(11!==b.nodeType?b:b.firstChild,"tr")?r(">tbody",a)[0]||a:a}function Fa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Ga(a){var b=Ca.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ha(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(W.hasData(a)&&(f=W.access(a),g=W.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c1&&"string"==typeof q&&!o.checkClone&&Ba.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ja(f,b,c,d)});if(m&&(e=qa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(na(e,"script"),Fa),i=h.length;l")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=na(h),f=na(a),d=0,e=f.length;d0&&oa(g,!i&&na(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(U(c)){if(b=c[W.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[W.expando]=void 0}c[X.expando]&&(c[X.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ka(this,a,!0)},remove:function(a){return Ka(this,a)},text:function(a){return T(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.appendChild(a)}})},prepend:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(na(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return T(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!Aa.test(a)&&!ma[(ka.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c1)}});function _a(a,b,c,d,e){return new _a.prototype.init(a,b,c,d,e)}r.Tween=_a,_a.prototype={constructor:_a,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=_a.propHooks[this.prop];return a&&a.get?a.get(this):_a.propHooks._default.get(this)},run:function(a){var b,c=_a.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):_a.propHooks._default.set(this),this}},_a.prototype.init.prototype=_a.prototype,_a.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},_a.propHooks.scrollTop=_a.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=_a.prototype.init,r.fx.step={};var ab,bb,cb=/^(?:toggle|show|hide)$/,db=/queueHooks$/;function eb(){bb&&(d.hidden===!1&&a.requestAnimationFrame?a.requestAnimationFrame(eb):a.setTimeout(eb,r.fx.interval),r.fx.tick())}function fb(){return a.setTimeout(function(){ab=void 0}),ab=r.now()}function gb(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=ca[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function hb(a,b,c){for(var d,e=(kb.tweeners[b]||[]).concat(kb.tweeners["*"]),f=0,g=e.length;f1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?lb:void 0)),void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b), +null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&B(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(L);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),lb={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=mb[b]||r.find.attr;mb[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=mb[g],mb[g]=e,e=null!=c(a,b,d)?g:null,mb[g]=f),e}});var nb=/^(?:input|select|textarea|button)$/i,ob=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return T(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):nb.test(a.nodeName)||ob.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function pb(a){var b=a.match(L)||[];return b.join(" ")}function qb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,qb(this)))});if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,qb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,qb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(L)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=qb(this),b&&W.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":W.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+pb(qb(c))+" ").indexOf(b)>-1)return!0;return!1}});var rb=/\r/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":Array.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(rb,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:pb(r.text(a))}},select:{get:function(a){var b,c,d,e=a.options,f=a.selectedIndex,g="select-one"===a.type,h=g?null:[],i=g?f+1:e.length;for(d=f<0?i:g?f:0;d-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(Array.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var sb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!sb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,sb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(W.get(h,"events")||{})[b.type]&&W.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&U(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!U(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=W.access(d,b);e||d.addEventListener(a,c,!0),W.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=W.access(d,b)-1;e?W.access(d,b,e):(d.removeEventListener(a,c,!0),W.remove(d,b))}}});var tb=a.location,ub=r.now(),vb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var wb=/\[\]$/,xb=/\r?\n/g,yb=/^(?:submit|button|image|reset|file)$/i,zb=/^(?:input|select|textarea|keygen)/i;function Ab(a,b,c,d){var e;if(Array.isArray(b))r.each(b,function(b,e){c||wb.test(a)?d(a,e):Ab(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)Ab(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(Array.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)Ab(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&zb.test(this.nodeName)&&!yb.test(a)&&(this.checked||!ja.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:Array.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(xb,"\r\n")}}):{name:b.name,value:c.replace(xb,"\r\n")}}).get()}});var Bb=/%20/g,Cb=/#.*$/,Db=/([?&])_=[^&]*/,Eb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Fb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Gb=/^(?:GET|HEAD)$/,Hb=/^\/\//,Ib={},Jb={},Kb="*/".concat("*"),Lb=d.createElement("a");Lb.href=tb.href;function Mb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(L)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nb(a,b,c,d){var e={},f=a===Jb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Ob(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Pb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Qb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:tb.href,type:"GET",isLocal:Fb.test(tb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Ob(Ob(a,r.ajaxSettings),b):Ob(r.ajaxSettings,a)},ajaxPrefilter:Mb(Ib),ajaxTransport:Mb(Jb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Eb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||tb.href)+"").replace(Hb,tb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(L)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Lb.protocol+"//"+Lb.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Nb(Ib,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Gb.test(o.type),f=o.url.replace(Cb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(Bb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(vb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Db,"$1"),n=(vb.test(f)?"&":"?")+"_="+ub++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Kb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Nb(Jb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Pb(o,y,d)),v=Qb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Rb={0:200,1223:204},Sb=r.ajaxSettings.xhr();o.cors=!!Sb&&"withCredentials"in Sb,o.ajax=Sb=!!Sb,r.ajaxTransport(function(b){var c,d;if(o.cors||Sb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Rb[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r(" + + + + + + +
+ + +
+ + + diff --git a/docs/_site/sliders/penal-dos-hermanas-1956-57.png b/docs/_site/sliders/penal-dos-hermanas-1956-57.png new file mode 100644 index 0000000..88ec6ae Binary files /dev/null and b/docs/_site/sliders/penal-dos-hermanas-1956-57.png differ diff --git a/docs/_site/sliders/penal-dos-hermanas-2013.png b/docs/_site/sliders/penal-dos-hermanas-2013.png new file mode 100644 index 0000000..13dbf65 Binary files /dev/null and b/docs/_site/sliders/penal-dos-hermanas-2013.png differ diff --git a/docs/_site/sliders/sotogordo-1945-recorte.jpeg b/docs/_site/sliders/sotogordo-1945-recorte.jpeg new file mode 100644 index 0000000..e608090 Binary files /dev/null and b/docs/_site/sliders/sotogordo-1945-recorte.jpeg differ diff --git a/docs/_site/sliders/sotogordo-2016-recorte.jpeg b/docs/_site/sliders/sotogordo-2016-recorte.jpeg new file mode 100644 index 0000000..0a99293 Binary files /dev/null and b/docs/_site/sliders/sotogordo-2016-recorte.jpeg differ diff --git a/docs/_site/sliders/sotogordo.html b/docs/_site/sliders/sotogordo.html new file mode 100644 index 0000000..df8558a --- /dev/null +++ b/docs/_site/sliders/sotogordo.html @@ -0,0 +1,25 @@ + + + + + + + + + +
+ + +
+ + + diff --git a/docs/_site/sliders/twentytwenty.css b/docs/_site/sliders/twentytwenty.css new file mode 100644 index 0000000..cad8aa4 --- /dev/null +++ b/docs/_site/sliders/twentytwenty.css @@ -0,0 +1,205 @@ +.twentytwenty-horizontal .twentytwenty-handle:before, .twentytwenty-horizontal .twentytwenty-handle:after, .twentytwenty-vertical .twentytwenty-handle:before, .twentytwenty-vertical .twentytwenty-handle:after { + content: " "; + display: block; + background: white; + position: absolute; + z-index: 30; + -webkit-box-shadow: 0px 0px 12px rgba(51, 51, 51, 0.5); + -moz-box-shadow: 0px 0px 12px rgba(51, 51, 51, 0.5); + box-shadow: 0px 0px 12px rgba(51, 51, 51, 0.5); } + +.twentytwenty-horizontal .twentytwenty-handle:before, .twentytwenty-horizontal .twentytwenty-handle:after { + width: 3px; + height: 9999px; + left: 50%; + margin-left: -1.5px; } + +.twentytwenty-vertical .twentytwenty-handle:before, .twentytwenty-vertical .twentytwenty-handle:after { + width: 9999px; + height: 3px; + top: 50%; + margin-top: -1.5px; } + +.twentytwenty-before-label, .twentytwenty-after-label, .twentytwenty-overlay { + position: absolute; + top: 0; + width: 100%; + height: 100%; } + +.twentytwenty-before-label, .twentytwenty-after-label, .twentytwenty-overlay { + -webkit-transition-duration: 0.5s; + -moz-transition-duration: 0.5s; + transition-duration: 0.5s; } + +.twentytwenty-before-label, .twentytwenty-after-label { + -webkit-transition-property: opacity; + -moz-transition-property: opacity; + transition-property: opacity; } + +.twentytwenty-before-label:before, .twentytwenty-after-label:before { + color: white; + font-size: 13px; + letter-spacing: 0.1em; } + +.twentytwenty-before-label:before, .twentytwenty-after-label:before { + position: absolute; + background: rgba(255, 255, 255, 0.2); + line-height: 38px; + padding: 0 20px; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; } + +.twentytwenty-horizontal .twentytwenty-before-label:before, .twentytwenty-horizontal .twentytwenty-after-label:before { + top: 50%; + margin-top: -19px; } + +.twentytwenty-vertical .twentytwenty-before-label:before, .twentytwenty-vertical .twentytwenty-after-label:before { + left: 50%; + margin-left: -45px; + text-align: center; + width: 90px; } + +.twentytwenty-left-arrow, .twentytwenty-right-arrow, .twentytwenty-up-arrow, .twentytwenty-down-arrow { + width: 0; + height: 0; + border: 6px inset transparent; + position: absolute; } + +.twentytwenty-left-arrow, .twentytwenty-right-arrow { + top: 50%; + margin-top: -6px; } + +.twentytwenty-up-arrow, .twentytwenty-down-arrow { + left: 50%; + margin-left: -6px; } + +.twentytwenty-container { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + z-index: 0; + overflow: hidden; + position: relative; + -webkit-user-select: none; + -moz-user-select: none; } + .twentytwenty-container img { + max-width: 100%; + position: absolute; + top: 0; + display: block; } + .twentytwenty-container.active .twentytwenty-overlay, .twentytwenty-container.active :hover.twentytwenty-overlay { + background: rgba(0, 0, 0, 0); } + .twentytwenty-container.active .twentytwenty-overlay .twentytwenty-before-label, + .twentytwenty-container.active .twentytwenty-overlay .twentytwenty-after-label, .twentytwenty-container.active :hover.twentytwenty-overlay .twentytwenty-before-label, + .twentytwenty-container.active :hover.twentytwenty-overlay .twentytwenty-after-label { + opacity: 0; } + .twentytwenty-container * { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; } + +.twentytwenty-before-label { + opacity: 0; } + .twentytwenty-before-label:before { + content: attr(data-content); } + +.twentytwenty-after-label { + opacity: 0; } + .twentytwenty-after-label:before { + content: attr(data-content); } + +.twentytwenty-horizontal .twentytwenty-before-label:before { + left: 10px; } + +.twentytwenty-horizontal .twentytwenty-after-label:before { + right: 10px; } + +.twentytwenty-vertical .twentytwenty-before-label:before { + top: 10px; } + +.twentytwenty-vertical .twentytwenty-after-label:before { + bottom: 10px; } + +.twentytwenty-overlay { + -webkit-transition-property: background; + -moz-transition-property: background; + transition-property: background; + background: rgba(0, 0, 0, 0); + z-index: 25; } + .twentytwenty-overlay:hover { + background: rgba(0, 0, 0, 0.5); } + .twentytwenty-overlay:hover .twentytwenty-after-label { + opacity: 1; } + .twentytwenty-overlay:hover .twentytwenty-before-label { + opacity: 1; } + +.twentytwenty-before { + z-index: 20; } + +.twentytwenty-after { + z-index: 10; } + +.twentytwenty-handle { + height: 38px; + width: 38px; + position: absolute; + left: 50%; + top: 50%; + margin-left: -22px; + margin-top: -22px; + border: 3px solid white; + -webkit-border-radius: 1000px; + -moz-border-radius: 1000px; + border-radius: 1000px; + -webkit-box-shadow: 0px 0px 12px rgba(51, 51, 51, 0.5); + -moz-box-shadow: 0px 0px 12px rgba(51, 51, 51, 0.5); + box-shadow: 0px 0px 12px rgba(51, 51, 51, 0.5); + z-index: 40; + cursor: pointer; } + +.twentytwenty-horizontal .twentytwenty-handle:before { + bottom: 50%; + margin-bottom: 22px; + -webkit-box-shadow: 0 3px 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5); + -moz-box-shadow: 0 3px 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5); + box-shadow: 0 3px 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5); } +.twentytwenty-horizontal .twentytwenty-handle:after { + top: 50%; + margin-top: 22px; + -webkit-box-shadow: 0 -3px 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5); + -moz-box-shadow: 0 -3px 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5); + box-shadow: 0 -3px 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5); } + +.twentytwenty-vertical .twentytwenty-handle:before { + left: 50%; + margin-left: 22px; + -webkit-box-shadow: 3px 0 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5); + -moz-box-shadow: 3px 0 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5); + box-shadow: 3px 0 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5); } +.twentytwenty-vertical .twentytwenty-handle:after { + right: 50%; + margin-right: 22px; + -webkit-box-shadow: -3px 0 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5); + -moz-box-shadow: -3px 0 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5); + box-shadow: -3px 0 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5); } + +.twentytwenty-left-arrow { + border-right: 6px solid white; + left: 50%; + margin-left: -17px; } + +.twentytwenty-right-arrow { + border-left: 6px solid white; + right: 50%; + margin-right: -17px; } + +.twentytwenty-up-arrow { + border-bottom: 6px solid white; + top: 50%; + margin-top: -17px; } + +.twentytwenty-down-arrow { + border-top: 6px solid white; + bottom: 50%; + margin-bottom: -17px; } diff --git a/docs/_site/urbanismo.html b/docs/_site/urbanismo.html new file mode 100644 index 0000000..67b7955 --- /dev/null +++ b/docs/_site/urbanismo.html @@ -0,0 +1,181 @@ + + + + + + + + El diseño urbano y paisajístico + + + + + + + + + + + + + +
+ + + + + +
+ +
+

El diseño urbano y paisajístico

+

+
+ +
+
+

Donde no hay nada puede construirse todo. Eso debieron pensar los principales arquitectos españoles que acudieron a diseñar los nuevos poblados de colonización con la idea de convertir esos lugares en laboratorios vanguardistas. Algunos de los mejores arquitectos españoles de la época fueron los encargados de diseñar todos los elementos de estas nuevas localidades, y dieron rienda suelta a su imaginación, siempre respetando los principios racionalistas del Régimen, y la moda de la época.

+ +

En el diseño urbano se centraron en usar los trazados curvos y evitar las calles rectas, intentando dar una idea mayor de comunidad y recogimiento. Adaptaron conceptos organicistas, que eran la vanguardia en los años 40, para convertir estos nuevos poblados en lugares en armonía con el entorno y la naturaleza. La idea principal para estos proyectos era sacar el mayor provecho posible a estos nuevos municipios, teniendo la funcionalidad y la optimización de los recursos como primera premisa.

+ +

Durante los años que duraron estos planes de colonización, unos ochenta arquitectos trabajaron en los proyectos. Muchos de ellos de gran fama mundial como Alejandro de la Sota, Carlos Arniches Moltó, José Borobio, José Antonio Corrales, Fernando de Terán o Antonio Fernández Alba, entre muchos otros. Aunque el que dejó las obras más brillantes fue José Luis Fernández del Amo. Él diseñó poblados como Vegaviana (Cáceres) o Cañada de Agra (Albacete) que han quedado para la historia de la arquitectura dentro y fuera de España.

+ +

Pero estos conceptos vanguardistas también chocaron con una idea del campo atrasada y la falta progreso de la agricultura. El sector agrario en España en los años 40 adolecía de falta de mecanización y poca inversión. Por eso los poblados se crearon con el concepto del ‘módulo carro’. El agricultor, es decir, el colono, no podía vivir a más de 2,5 km de su tierra de labor ya que debía ir con sus aperos hasta su tierra, trabajar, y después volver a su casa sin perder demasiado tiempo en el camino. Esto pronto quedó desfasado, con el progreso económico se llevó a cabo una modernización y mecanización de la agricultura dejando en desfase este concepto y por tanto el diseño de los poblados.

+ +

A día de hoy algunos de estos pueblos se han quedado como joyas de esta arquitectura racionalista, con diseños muy originales y construcciones únicas.

+ +

+ +

Módulo carro

+ +
+
+ +
+ + + +
+
    + +
+ +
+ + + + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/docs/presos.md b/docs/presos.md index 1652743..45eada6 100644 --- a/docs/presos.md +++ b/docs/presos.md @@ -6,6 +6,8 @@ subtitle: De la represión política a la explotación económica 4 metros cúbicos excavados, por persona y día. Mientras el cupo no estuviera completado, la jornada no terminaba. Un trabajo extenuante a cambio de 2 pesetas y 50 céntimos diarios, apenas la cuarta parte del sueldo medio en este tipo de tareas. De las 2,50, además, 1,50 no se entregaban al trabajador: pasaban -cuando no se perdían en el camino- al grueso de su cartilla de liberación. Y es que hablamos de reclusos, de presos políticos en particular, empleados como mano de obra. +

+ **El programa de Redención de Penas por el Trabajo** El jesuita José Agustín Pérez del Pulgar lo vio claro. En aras de que el ingente número de prisioneros capturados durante y después de la Guerra Civil no constituyera "un peso muerto al erario público", estos debían sustentarse a sí mismos con su propio trabajo. El programa de Redención de Penas por el Trabajo fue creado en 1937 a partir de esta idea. Y con él, una fuente de mano de obra gratuita para el Régimen que, en el contexto de necesidad de infraestructuras que la empresa colonizadora demandaba, resultó ser crucial en algunas de sus obras más significativas.