From 799a3d8ea8582447f8cf93057829b97a143127a8 Mon Sep 17 00:00:00 2001 From: Anahi Salgado Date: Tue, 23 Jan 2018 12:18:47 -0500 Subject: [PATCH 01/44] Hola Mundo IDE Eclipse --- HolaMundo/.classpath | 10 ++++++++++ HolaMundo/.project | 17 +++++++++++++++++ HolaMundo/.settings/org.eclipse.jdt.core.prefs | 11 +++++++++++ HolaMundo/HolaMundo.class | Bin 425 -> 0 bytes HolaMundo/HolaMundo.java | 5 ----- .../bin/com/anncode/holamundo/HolaMundo.class | Bin 0 -> 576 bytes .../src/com/anncode/holamundo/HolaMundo.java | 10 ++++++++++ 7 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 HolaMundo/.classpath create mode 100644 HolaMundo/.project create mode 100644 HolaMundo/.settings/org.eclipse.jdt.core.prefs delete mode 100644 HolaMundo/HolaMundo.class delete mode 100644 HolaMundo/HolaMundo.java create mode 100644 HolaMundo/bin/com/anncode/holamundo/HolaMundo.class create mode 100644 HolaMundo/src/com/anncode/holamundo/HolaMundo.java diff --git a/HolaMundo/.classpath b/HolaMundo/.classpath new file mode 100644 index 0000000..6ee61f2 --- /dev/null +++ b/HolaMundo/.classpath @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/HolaMundo/.project b/HolaMundo/.project new file mode 100644 index 0000000..10cc775 --- /dev/null +++ b/HolaMundo/.project @@ -0,0 +1,17 @@ + + + HolaMundo + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/HolaMundo/.settings/org.eclipse.jdt.core.prefs b/HolaMundo/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..7e5c907 --- /dev/null +++ b/HolaMundo/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=9 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=9 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=9 diff --git a/HolaMundo/HolaMundo.class b/HolaMundo/HolaMundo.class deleted file mode 100644 index 24cda3235138f05514f5aabba74a238584318fb2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 425 zcmZut%SyvQ6g`uqd6_qi$2;!nXAmYZ=q#eqXJR~N9pQQ^07k+>r zCEkf(DL9LJ@0@e)opa~w`{NV95qd66G##|CZlmp@gAEJ5g)W16B2!tMGU&t69fNU} z%>+YpB2#fyCXvW*c@z_3BwVHp-QoRY!Jl{#^K>4BMK06%ST(v~R_0T2E|s`(k;VM7 zOlR4l5__;8nqV*3@{KOR}w@vw_M2IsGfp|yPEI$DTnu>yt9kA+Ccb5;`J z|2mRca6@(qG9`F2X6RHiR$&I~L5X78#UK8+3I?drZ>gh!Jz4Q6?{sG_!`vy`B4KEBFu9O!Jg)kQp#*l7z`V5(K!dpngw2?)Qq2x*>u4lnOM0b4P3x#IU1*FKLqmnepb4WAN*@HLapOdsjQl~+H x6_WP6fOLU86GfCLqQS>WGm5>ST&cfeW6{8(6sRaqZ_&iW9vT#9Xp&5!^$p@#ee(bS literal 0 HcmV?d00001 diff --git a/HolaMundo/src/com/anncode/holamundo/HolaMundo.java b/HolaMundo/src/com/anncode/holamundo/HolaMundo.java new file mode 100644 index 0000000..5ce85fd --- /dev/null +++ b/HolaMundo/src/com/anncode/holamundo/HolaMundo.java @@ -0,0 +1,10 @@ +package com.anncode.holamundo; + +public class HolaMundo { + + public static void main(String[] args) { + // TODO Auto-generated method stub + System.out.println("Hola Mundo :)"); + } + +} From 20defdc1789e3931660cef44c7e3c4e2069c71fb Mon Sep 17 00:00:00 2001 From: Anahi Salgado Date: Tue, 23 Jan 2018 12:19:33 -0500 Subject: [PATCH 02/44] Hola Mundo IDE Eclipse --- {HolaMundo => HolaMundoIDE}/.classpath | 0 {HolaMundo => HolaMundoIDE}/.project | 0 .../.settings/org.eclipse.jdt.core.prefs | 0 .../bin/com/anncode/holamundo/HolaMundo.class | Bin .../src/com/anncode/holamundo/HolaMundo.java | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename {HolaMundo => HolaMundoIDE}/.classpath (100%) rename {HolaMundo => HolaMundoIDE}/.project (100%) rename {HolaMundo => HolaMundoIDE}/.settings/org.eclipse.jdt.core.prefs (100%) rename {HolaMundo => HolaMundoIDE}/bin/com/anncode/holamundo/HolaMundo.class (100%) rename {HolaMundo => HolaMundoIDE}/src/com/anncode/holamundo/HolaMundo.java (100%) diff --git a/HolaMundo/.classpath b/HolaMundoIDE/.classpath similarity index 100% rename from HolaMundo/.classpath rename to HolaMundoIDE/.classpath diff --git a/HolaMundo/.project b/HolaMundoIDE/.project similarity index 100% rename from HolaMundo/.project rename to HolaMundoIDE/.project diff --git a/HolaMundo/.settings/org.eclipse.jdt.core.prefs b/HolaMundoIDE/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from HolaMundo/.settings/org.eclipse.jdt.core.prefs rename to HolaMundoIDE/.settings/org.eclipse.jdt.core.prefs diff --git a/HolaMundo/bin/com/anncode/holamundo/HolaMundo.class b/HolaMundoIDE/bin/com/anncode/holamundo/HolaMundo.class similarity index 100% rename from HolaMundo/bin/com/anncode/holamundo/HolaMundo.class rename to HolaMundoIDE/bin/com/anncode/holamundo/HolaMundo.class diff --git a/HolaMundo/src/com/anncode/holamundo/HolaMundo.java b/HolaMundoIDE/src/com/anncode/holamundo/HolaMundo.java similarity index 100% rename from HolaMundo/src/com/anncode/holamundo/HolaMundo.java rename to HolaMundoIDE/src/com/anncode/holamundo/HolaMundo.java From 8d2f6fe47d49dc6add11f9d597e935c0ce956804 Mon Sep 17 00:00:00 2001 From: Anahi Salgado Date: Tue, 23 Jan 2018 12:20:27 -0500 Subject: [PATCH 03/44] Hola Mundo IDE Eclipse --- {HolaMundoIDE => HolaMundo}/.classpath | 0 {HolaMundoIDE => HolaMundo}/.project | 0 .../.settings/org.eclipse.jdt.core.prefs | 0 .../bin/com/anncode/holamundo/HolaMundo.class | Bin 576 -> 580 bytes .../src/com/anncode/holamundo/HolaMundo.java | 2 +- 5 files changed, 1 insertion(+), 1 deletion(-) rename {HolaMundoIDE => HolaMundo}/.classpath (100%) rename {HolaMundoIDE => HolaMundo}/.project (100%) rename {HolaMundoIDE => HolaMundo}/.settings/org.eclipse.jdt.core.prefs (100%) rename {HolaMundoIDE => HolaMundo}/bin/com/anncode/holamundo/HolaMundo.class (86%) rename {HolaMundoIDE => HolaMundo}/src/com/anncode/holamundo/HolaMundo.java (76%) diff --git a/HolaMundoIDE/.classpath b/HolaMundo/.classpath similarity index 100% rename from HolaMundoIDE/.classpath rename to HolaMundo/.classpath diff --git a/HolaMundoIDE/.project b/HolaMundo/.project similarity index 100% rename from HolaMundoIDE/.project rename to HolaMundo/.project diff --git a/HolaMundoIDE/.settings/org.eclipse.jdt.core.prefs b/HolaMundo/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from HolaMundoIDE/.settings/org.eclipse.jdt.core.prefs rename to HolaMundo/.settings/org.eclipse.jdt.core.prefs diff --git a/HolaMundoIDE/bin/com/anncode/holamundo/HolaMundo.class b/HolaMundo/bin/com/anncode/holamundo/HolaMundo.class similarity index 86% rename from HolaMundoIDE/bin/com/anncode/holamundo/HolaMundo.class rename to HolaMundo/bin/com/anncode/holamundo/HolaMundo.class index dff637a5fd7cfec34c97f95860132b043718ca84..3f6b856286e743f76d0b32445eb3498878cefb70 100644 GIT binary patch delta 28 jcmX@Wa)f1r6eGW&M}AJCf^TVFO1^@pi|b}pMrlR>ez6D! delta 24 fcmX@Ya)4!n6eBmUM}AJCf^TVFO8#a|MrlR>Ugrl8 diff --git a/HolaMundoIDE/src/com/anncode/holamundo/HolaMundo.java b/HolaMundo/src/com/anncode/holamundo/HolaMundo.java similarity index 76% rename from HolaMundoIDE/src/com/anncode/holamundo/HolaMundo.java rename to HolaMundo/src/com/anncode/holamundo/HolaMundo.java index 5ce85fd..3093b69 100644 --- a/HolaMundoIDE/src/com/anncode/holamundo/HolaMundo.java +++ b/HolaMundo/src/com/anncode/holamundo/HolaMundo.java @@ -4,7 +4,7 @@ public class HolaMundo { public static void main(String[] args) { // TODO Auto-generated method stub - System.out.println("Hola Mundo :)"); + System.out.println("Hola Mundo IDE :)"); } } From 1806c62e03aff56711fb7c60cc74ad1d0b2b0027 Mon Sep 17 00:00:00 2001 From: Anahi Salgado Date: Tue, 23 Jan 2018 12:43:20 -0500 Subject: [PATCH 04/44] Tipos Enteros --- .../bin/com/anncode/holamundo/HolaMundo.class | Bin 580 -> 714 bytes .../src/com/anncode/holamundo/HolaMundo.java | 6 ++++++ 2 files changed, 6 insertions(+) diff --git a/HolaMundo/bin/com/anncode/holamundo/HolaMundo.class b/HolaMundo/bin/com/anncode/holamundo/HolaMundo.class index 3f6b856286e743f76d0b32445eb3498878cefb70..5f8cbf1a53a132ecd99f7eb8aa1e1776c5215827 100644 GIT binary patch delta 229 zcmX@Ya*CDf)W2Q(7#J8#8FV&sr89D}GHBlkiQAVbI=PTh-k2pdB{7AOfzgSPfu%Av zu?WZvW@KQ`Oo=ZoP6hEi85y{MyprFGiTWdlw@My0+Lc-h3pI*Kpr;`@-y%-2s7|9NHFjLc?=9D46Go7 z7!(*3fiyQzREa^Eff1;Vi$R4!6=;eu&;&IGbp~dj9!3TY22BQT79c|lsGNyG8vs@P BA|n6* delta 94 zcmX@bdW41R)W2Q(7#J8#8I(41r87>hVw9hJj Date: Tue, 23 Jan 2018 13:00:02 -0500 Subject: [PATCH 05/44] Tipos Flotante Texto Logico --- .../bin/com/anncode/holamundo/HolaMundo.class | Bin 714 -> 885 bytes .../src/com/anncode/holamundo/HolaMundo.java | 26 ++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/HolaMundo/bin/com/anncode/holamundo/HolaMundo.class b/HolaMundo/bin/com/anncode/holamundo/HolaMundo.class index 5f8cbf1a53a132ecd99f7eb8aa1e1776c5215827..e11aef1ae38e3249c747d39aacf085ad8b28b976 100644 GIT binary patch delta 320 zcmW-by-vbl7)H<6)n?w|AgSwQo1os8O@P-2ccto2Th~?@^uAqSrzF z&hNDD73x@FHe3Ex@E?vO-1wnCYz`Gx&^`~^!R4(l<%J^JcnF0I>%C9aIru^&CO;Kl za1)cSq}=XK{E6MT{=JuEreY*!t7ekycEmmLEW@*P&*=-VVavOU(+jn!Zk!AWvP_U8 zMV>STrg4O547nn6%u8~F$+3W9O!`G3HO7TrVi{eQN!b-K#OAUhc2jtVHP(s9F2V+z WSh6zMq9o>mn97u50x7)VS(QI<$1n>3 delta 167 zcmW-ZIS#@=3`O5e7SMzxAqWKu6t=LIAR6El90YNJp`_1ALP0^n0df-#K#MTQlI{Qf z{oa1*ney{^0vlF^IjQ`rj(Muj)}ryn@7@SoojXZrchQA? Date: Tue, 23 Jan 2018 13:22:31 -0500 Subject: [PATCH 06/44] Nombres en Java --- .../bin/com/anncode/holamundo/HolaMundo.class | Bin 885 -> 1114 bytes .../src/com/anncode/holamundo/HolaMundo.java | 18 +++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/HolaMundo/bin/com/anncode/holamundo/HolaMundo.class b/HolaMundo/bin/com/anncode/holamundo/HolaMundo.class index e11aef1ae38e3249c747d39aacf085ad8b28b976..536ef98ec3d2be2f9a877bc6eeccb6049ab6c6d3 100644 GIT binary patch delta 410 zcmYk0Juib%9L0b4QEfea=!-}yr3qS8Jt%s;)0#91p8q-LEBG09-@jkqfFj#%_twN+2FZ8~ku?M+E4g~>-aOR8 zH;v|5%+<4rI=C40>dnlW{FW& z8DoPZH8F_^7Wb1Ey#%U^DGb| zOGZgWdh{}aJyN7AgEY&ch!#_XRbDx~LNyRY{+iPEU1w6)eeg NOO#Ntl4?4Xe*oSNJQ)B0 delta 180 zcmW-bO%4G;5QV?#nat2lNLY}Vh4|Ow-{2e$VQ*z;;R?Os7_+r-04EUlup}z8sd}%f zzL$CzKB0d8?hhbkm+7 Date: Tue, 23 Jan 2018 13:51:49 -0500 Subject: [PATCH 07/44] Cast Variables Java --- .../bin/com/anncode/holamundo/HolaMundo.class | Bin 1114 -> 1349 bytes .../src/com/anncode/holamundo/HolaMundo.java | 17 +++++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/HolaMundo/bin/com/anncode/holamundo/HolaMundo.class b/HolaMundo/bin/com/anncode/holamundo/HolaMundo.class index 536ef98ec3d2be2f9a877bc6eeccb6049ab6c6d3..c76e706de4e18f123cb9f134efd359d63f9b3607 100644 GIT binary patch delta 509 zcmXAl%}x_x6o#K~AR|oqDNd)Ewy+=s6j~?(epm`xib!jL0EP_<5}*}{0TO;p+=y2| zLVG23;erJ_HeP~P;RT5C1t$4s-kkZ~=e+0qZoBooU;nOefR`*cy>G^M3+~5<$0NZ| z2faLN)Xkr~*)^C`odcb!!QDHq9_$|*B9CJJ!$P^N^3nNW?L=koQ53(P)f(TOQ_lfM zF!<8Aa|*?%YyH5tu^@J3{Z<>q7|6xL_@xb^J2ni$x=r+$j7THz7}2p-LhyC}2!u4ym3c qAit?Ri%Jt$(vWv5hDz_Vqy`Di-u1AXq&Cn_S(ub2eXqG4D*pj5F-vX$ delta 274 zcmW-bNlpS$7=*v>Hj1xX#&m+gkPra}Xc+|+hXxkFh6{KKE})0#C0AgB3l=Wikr0DF$Fqw)mS0VgODpjd SPN0FILf?ea8Ww7%P5&Qq5FlOv diff --git a/HolaMundo/src/com/anncode/holamundo/HolaMundo.java b/HolaMundo/src/com/anncode/holamundo/HolaMundo.java index c867985..86c2c36 100644 --- a/HolaMundo/src/com/anncode/holamundo/HolaMundo.java +++ b/HolaMundo/src/com/anncode/holamundo/HolaMundo.java @@ -39,9 +39,22 @@ public static void main(String[] args) { //Lower Camel Case int minValor = 4; - + byte b = 6; + short s = b; + + b = (byte) s; + + int i = 1; + double d = 2.8; + i= (int) d; + + int codigo = 97; + char codigoASCII = (char) codigo; + + short numero = 300; + byte numeroByte = (byte) numero; - System.out.println(variable); + System.out.println(numeroByte); } } From 6d792271ad90d006c7012976f912368cda44789d Mon Sep 17 00:00:00 2001 From: Anahi Salgado Date: Wed, 24 Jan 2018 09:17:03 -0500 Subject: [PATCH 08/44] =?UTF-8?q?Arrays=20Declaraci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bin/com/anncode/holamundo/HolaMundo.class | Bin 1349 -> 1703 bytes .../src/com/anncode/holamundo/HolaMundo.java | 16 ++++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/HolaMundo/bin/com/anncode/holamundo/HolaMundo.class b/HolaMundo/bin/com/anncode/holamundo/HolaMundo.class index c76e706de4e18f123cb9f134efd359d63f9b3607..876bb7709e6b20971e5d02a8c90b3b7ed868c797 100644 GIT binary patch delta 709 zcmb7?zfV(f6vaQ^zP?so!BzoNqyi-=pkP5Nq6L3ZP^+S7srYPSQnk?mBq?1WF&!98 zTp9fXoE(sZ!61vNF(xjqE{+ZkCMG5(Mm?{IgT}?-eRIC|-gEA~=lg2TlP2fQkLTOK z2!(a$p-BemF<6B{Hb|erU#O!4245i)WT2kPIJA*$B*x&zW0N#v#d5iHcYZN@zv9(p z4M9bU%fpkuQA)^vr?|YNzGX z`=r5BG%NFw3mUM689s1P*;ewrXIi{H+~ggX6pP~C<}H^sR~z?ut>O{(vcOBONTyxh pY;%>IeyJ5UnWaa5tnyS+eRRsL2V7%-E_v3#9M_4<8@KN9jbG$bf8hWC delta 356 zcmWlUy)pw)0ENHZ%`k2f32V(pC{iSTmW|)A#9s&@#!zS!8U-^ZLqnU=1MD*xb(m2o zs5IWfdl=)SxqIg9J>NO^IsIkK_uu;mu*6ZvJX*$(qm*Kl@z+l)wBo?IGd9?A;30l; zTHXs;FaJidBge*cea7OS#BDp`o>h`^eue4!6HMxxWRb+X|N_rO8I)5s$^Qh8tYR1ifytX zmC^O8beXLFL~Kb7=&Z0UHOQ`NYr?w1h3shH5GR!6m+>^EKwV>oHPmNMp0DvP`{L)g WR!>8T5!{wm9te}yOAqyKo8~{v>@0Es diff --git a/HolaMundo/src/com/anncode/holamundo/HolaMundo.java b/HolaMundo/src/com/anncode/holamundo/HolaMundo.java index 86c2c36..c3bcb43 100644 --- a/HolaMundo/src/com/anncode/holamundo/HolaMundo.java +++ b/HolaMundo/src/com/anncode/holamundo/HolaMundo.java @@ -54,6 +54,22 @@ public static void main(String[] args) { short numero = 300; byte numeroByte = (byte) numero; + //Arrays + //Declaración de array + + int[] arregloInt = new int[2]; + double arregloDouble[]; + + int[][] array2D = new int[2][3];//caben 6 cupcakes + int[][][] array3D = new int[3][3][2]; //caben 18 cokies + //int[][][][] array4D = new int[1][2][3][4]; + + char[][] days = { {'M','T','W'}, {'M', 'T', 'W'} }; + + char[][][] letters = { { {'a','b'}, {'a','b'},{'a','b'} }, { {'a','b'}, {'a','b'}, {'a','b'} } }; + + + System.out.println(numeroByte); } From c77b12468d718667b9e6b9703e24b53dbd22cad4 Mon Sep 17 00:00:00 2001 From: Anahi Salgado Date: Wed, 24 Jan 2018 09:32:24 -0500 Subject: [PATCH 09/44] ArrayBusqueda Valores --- .../bin/com/anncode/holamundo/HolaMundo.class | Bin 1703 -> 1894 bytes .../src/com/anncode/holamundo/HolaMundo.java | 18 +++++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/HolaMundo/bin/com/anncode/holamundo/HolaMundo.class b/HolaMundo/bin/com/anncode/holamundo/HolaMundo.class index 876bb7709e6b20971e5d02a8c90b3b7ed868c797..24370a9434ece1964c633a3c78eec9041b33b865 100644 GIT binary patch delta 597 zcmX|-OHWf#6otRdeNdCa1`A}jC6<5L6UbTn)b<%$mT z$y;I?h7gc9TxCGNYL%A^GK4{!JSWaIOxooM*BQp9Q+62P2A(SCrNSsf zuvM+5m{Wnrn3n`;szV$nr@k|)<^*ff&%Cy@aZh?#P+2ZT>0wb@PEwXGvO4AzJJQK5 za)ZaV2Aky1;bn;tcmTP(doZmP^dpHh<4^RrLCphpE? z3D!V=aF&wGFjt+ z3BCE*;EqX+mBkh}(uT-pV4G{E6_djbm&`CrfL+d*qgeZhaIC0O@`ZkiT<_7 M5<%@|`G21)zjC}iSO5S3 diff --git a/HolaMundo/src/com/anncode/holamundo/HolaMundo.java b/HolaMundo/src/com/anncode/holamundo/HolaMundo.java index c3bcb43..c56ec55 100644 --- a/HolaMundo/src/com/anncode/holamundo/HolaMundo.java +++ b/HolaMundo/src/com/anncode/holamundo/HolaMundo.java @@ -68,9 +68,21 @@ public static void main(String[] args) { char[][][] letters = { { {'a','b'}, {'a','b'},{'a','b'} }, { {'a','b'}, {'a','b'}, {'a','b'} } }; - - - System.out.println(numeroByte); + char[] names = new char[4]; + names[0] = 'h'; + names[1] = 'o'; + names[2] = 'l'; + names[3] = 'a'; + System.out.println(names[0]); + System.out.println(names[1]); + System.out.println(names[2]); + System.out.println(names[3]); + + char[][][][] monkey = new char[2][3][2][2]; + monkey[1][0][0][1] = 'm'; + System.out.println(monkey[1][0][0][1]); + + //System.out.println(numeroByte); } } From cb8044bc3adc0dd95585524a2f5b8390c86d4b34 Mon Sep 17 00:00:00 2001 From: Anahi Salgado Date: Wed, 24 Jan 2018 09:55:06 -0500 Subject: [PATCH 10/44] Operadores Aritmeticos Asignacion --- .../bin/com/anncode/holamundo/HolaMundo.class | Bin 1894 -> 2414 bytes .../src/com/anncode/holamundo/HolaMundo.java | 29 ++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/HolaMundo/bin/com/anncode/holamundo/HolaMundo.class b/HolaMundo/bin/com/anncode/holamundo/HolaMundo.class index 24370a9434ece1964c633a3c78eec9041b33b865..4738e2817362c38f8dcd07fb3b5c6cd99383d8b0 100644 GIT binary patch delta 927 zcmZ{iTWm~W5XXPhu2tJbFS{&?MO$ZU)5dMt)}<&~D(ccw*Pgbk-F9_rdqImug~Wr1 zM!fWa7muW^EJ1{XNF)*>aY={>5eX5Ocn}HZ@F>2MIp6=xeBaD}=6~Lf_?Y3i_w(uv zU^Ykk9d{)@l$pZlCbQElh?p%61?$>l;g*KQ9pOlQD3-!(Aw3lFcAAlB%v&GwdQG#? z>tF_RoD5;Sg@R5BDH7~vYip>bUdS@aeC7YiSY+Lp?_>cBg_QPa^WS=c%lP+Bk-gZ~ z^=kPASGR*PEOC-WiC{C9`Ks)TQo_HiWkpJ@NSPHW@l{!lm6oI2a+K-OVr|!2gAb)c zCW^#S;Jk delta 404 zcmW-d$u0w66otP-L$u~1=2?j;rkdxOqNdhNLPQfoq6rcfBrL4;5j=r3u^_RPh)1xn zvh)bzviow*z2`sw{Z9W%cE0^Qy#QXe9-Oa=KF6FWGUqsU#@^$k92AMZJMNV9U_&t` z!6S8%kGSY%5SQ756#os;M6-D=-O^%VB1Jc}(q=nuUC~Ylv1IFlPP%ZAuQR&oA&wG- z>7|c&Ds)6Y10+zTeFhn_*J>1E*vLh_b{VmhL>jftC>@t1(V{KJOiZRt>x>(v(5V$B zj8f@QkV&I7`n7=1D4k*XnX-az#^qz$3T7~?A!f|YB%ogWRwj#0d6_jWn;kVUXSH$& zsfKym$mLKT0t*(CM_45+5+I**(F*0RSM)s*U# P0@i7y% Date: Wed, 24 Jan 2018 10:13:45 -0500 Subject: [PATCH 11/44] Operador Incremento --- .../bin/com/anncode/holamundo/HolaMundo.class | Bin 2414 -> 2472 bytes .../src/com/anncode/holamundo/HolaMundo.java | 43 ++++++++++++++---- 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/HolaMundo/bin/com/anncode/holamundo/HolaMundo.class b/HolaMundo/bin/com/anncode/holamundo/HolaMundo.class index 4738e2817362c38f8dcd07fb3b5c6cd99383d8b0..4b7f4dde9974908f490945fb525dfc4a801c2f1f 100644 GIT binary patch delta 992 zcmbu7+i%Q49K}E1-JktcF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Nu4Zmf)Rb9#6~8Mt!OR3@ z3EWP~19|B~{H8nasLMRqGSjOUM|cxd{5gkqC~`7CkguQa`~+2c8VMFUSsd`$`~_~G ztKiVqfX_<%5@}RjQhrHF3O-YI++({KZ;)fGkQ1zw(=^EdtK}MN%80p_4kf!X{0- zSS}ZdD4F4^z&SQ+%&qgErBi8Ts{*Hq>Wh(VmQ!?TnNh@4fi1-Jcj%SFs!1MW*f0Hb zt1e?1kb1V^!y}V;K@Zz?Tpv%_LHr&?-i&4`~Dcd|2N9j#CZS! diff --git a/HolaMundo/src/com/anncode/holamundo/HolaMundo.java b/HolaMundo/src/com/anncode/holamundo/HolaMundo.java index e9d6675..fc9c18e 100644 --- a/HolaMundo/src/com/anncode/holamundo/HolaMundo.java +++ b/HolaMundo/src/com/anncode/holamundo/HolaMundo.java @@ -80,25 +80,25 @@ public static void main(String[] args) { char[][][][] monkey = new char[2][3][2][2]; monkey[1][0][0][1] = 'm'; - System.out.println(monkey[1][0][0][1]); + //System.out.println(monkey[1][0][0][1]); //Operadores Aritméticos int a = 1; int aa = a + a; - System.out.println("el valor de aa: " + aa); + //System.out.println("el valor de aa: " + aa); double x = 2.56; int y = 9; float w = (float)x + y; - System.out.println(w); + //System.out.println(w); - System.out.println(w*2); + //System.out.println(w*2); double k = 4/0.00002; - System.out.println(k); + //System.out.println(k); - System.out.println(7%2); + //System.out.println(7%2); double f = 2; @@ -109,9 +109,36 @@ public static void main(String[] args) { //f -*= g; //f /= g; f %= g; - System.out.println(f); + //System.out.println(f); + + + int l = 3; + + + //++l; + //l++; + //System.out.println(l); + + //++l + //1. Incrementar el valor l+1 + //2. Asignar el valor a l + //System.out.println(++l); + + //l++ + //1. Asignar el valor a l l=l + //2. Incrementar el valor l+1 + //System.out.println(l++); + //System.out.println(l);//4 + + + //Operadores equidad + + int q = 5; + int p = 4; + System.out.println(q == p); + System.out.println(q != p); + - //System.out.println(numeroByte); } } From c37883666bb618ec65ed9406738917bc74398f4a Mon Sep 17 00:00:00 2001 From: Anahi Salgado Date: Wed, 24 Jan 2018 10:30:18 -0500 Subject: [PATCH 12/44] Operadores Logicos --- .../bin/com/anncode/holamundo/HolaMundo.class | Bin 2472 -> 4252 bytes .../src/com/anncode/holamundo/HolaMundo.java | 21 ++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/HolaMundo/bin/com/anncode/holamundo/HolaMundo.class b/HolaMundo/bin/com/anncode/holamundo/HolaMundo.class index 4b7f4dde9974908f490945fb525dfc4a801c2f1f..93f68cdd80dc6532a655fd7a8931a8f9a78a8ea5 100644 GIT binary patch literal 4252 zcmeHJ>u(g-75|;Pvoq@lu(o%J4F=XWm^C(jK?b}wU}IiRY)s+@81u;39_)dAnDrVk zp@otX5<vyPDKEzQqoqbs;d3a4^^cq>W8Wy+drW6H)9(DfmW(p zsUI?{JM%mDo^$Sb-n*au2fW8X zIgRV@Z!-|3m;D}EAyECT2CBTJR@abfcfT5PL|ZF*4b%zz89!A`JaA-mXpFt^u?QvS`D) zX>z+qHqDSb1lh?*d3hv36C(jU@6jht%+TF5u_QUQ#|$P>q5b1ywoA2f7gCv{PA20`xF!!dR>IDtQ(WJ|okr94pyLv5l!oo3 z?X9%Zd}plJ8FRcIklhqKFrFl5(jq)E-3{d0{{_7C3wQ>)`R;9L@1)1M-gkdT%dWPL zPHIUw$zCg-axER;pr7J!&?TL1?F`eZoGH-K)!Ig9^yGNLvoCuJY@EojL9?xN+8&Ol z+LG)O)lWWyGuA{sJ(@zRh_oSVf;$*-+l>X0Td{Q0pJX^l>WNhHkUhcu>7cUsl4Bh1 z#8Hkz90xdtIpQ3LIYv3yK9Ug3>B?AxhdQiL?|d+@%fN91Cuv+)YCJt?Z*knCWbXar zsoJe&lz?sGRlFkN`NOwCx`toj*T3Q;1b$4Q*b?kPZ_+N!d%Sb425$> z$h(>%fBz7{{P~k844!PtJB4+5zQ3*yVeuL*KeAR2p`^hGc9>b3ne8)k{AR9h&N0ln z0dtD=jMZ1xI>{O0{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d6 100644 --- a/HolaMundo/src/com/anncode/holamundo/HolaMundo.java +++ b/HolaMundo/src/com/anncode/holamundo/HolaMundo.java @@ -133,12 +133,29 @@ public static void main(String[] args) { //Operadores equidad - int q = 5; - int p = 4; + int q = 8; + int p = 5; System.out.println(q == p); System.out.println(q != p); + //Operadores relacionales + System.out.println("q > p ->" + (q > p)); + System.out.println("q < p ->" + (q < p)); + + System.out.println("q >= p ->" + (q >= p)); + System.out.println("q <= p ->" + (q <= p)); + + //Operadores lógicos + boolean n = false; + boolean m = true; + + System.out.println("n && m -> " + (n && m)); + System.out.println("n || m -> " + (n || m)); + System.out.println("!n -> " + (!n)); + System.out.println("!m -> " + (!m)); + + } } From ade74fcac082b41ddd6510ae06b5a4e978f525f4 Mon Sep 17 00:00:00 2001 From: Anahi Salgado Date: Wed, 24 Jan 2018 11:04:24 -0500 Subject: [PATCH 13/44] If Else Switch --- .../bin/com/anncode/holamundo/HolaMundo.class | Bin 4252 -> 4906 bytes .../src/com/anncode/holamundo/HolaMundo.java | 60 ++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/HolaMundo/bin/com/anncode/holamundo/HolaMundo.class b/HolaMundo/bin/com/anncode/holamundo/HolaMundo.class index 93f68cdd80dc6532a655fd7a8931a8f9a78a8ea5..d53c4b0908e0667dd1ba3ca163a3b6d195e5a123 100644 GIT binary patch delta 1802 zcmd6ne^69a6vw~!9+tQ4viuYV31~M1QFjoOV#b*Y8EMK1Z3detO?_-Hc7bJScR|2n z6~)phvsExtFhu!b8o05knI>g9l1xtJOf}O?O@B4@NB{Ll6P@>x#%ZAb=%3!qci!io zv*+A%&prDNJ4W&>*M2{L5x_l&j#++`Av3B3td$v4UTD9L;RI|N8^|!J8X~vb+eh+7RMj)nw zw=u)b#??)s1`l(s!Sy=U3&gIh@dbj+4FZ-*tug4)yqwgGM$W(16>KsVeu20(zUCQU zke91Gu9;=CK(bzSizg7&xOmO()dIY?>aXEf>iS1&)n;{Ry&6%dM`V-Xv{eRGS6zkL zxK6FE*A%oUIHaI2JRTFU*i5i+&peut7(cfi4|21FLkbF|a~MkAY=6))`o$qt`&Ejy?k&IzDS)x{d(@jq@}yj)8kY zEQoGskwSB#2=&WfF+jixvS5%>Fhpq>rfi%hJ4R_U&X5}ss>3)15T$0ErFNX7?RbxN z;{tWzBJIZ|>cM5|!vyu?BO1XKI)zVY99QWquF(gWqz`eOCNV`*_>6Ai27QIk={tNu zKZJ0Te!@4fa!pex(C-Ob(88^=()VaZ8@D}?zQtBN2Z>br8qcGh&yYc1BE&6^K^EP> zc61;X4*C>3uoDV$=_)$03vtM&D|i7f@|l;=1a>o7Q9zflhqJ_^h(Z_m&e~x^F`Yvf zQvymTikF!Zv4SFag((U5(J1yZC8Lzj_9{~fR?#r_ae=9Lh>qhmE^r4~ZIoLt9 zIE;MU$(OJKN8p5AER-Lk7kzLDr@V}#Sd65uqxniH( zfB`NhPaKd{IL@|w(JR;D1iT$sB#z0|7-aWiF(k_|#N-qwWf_L~hXo=kOEAK;RGgQ~ zagwP}ye|uRzS~hG-J%nxxUI`%o#?=6rsX_2*YP%ci!lnAx{*6ACgD^t7FKPUJg$5} z3Kl9@q9CGRk-`ZD2}vaQflx4ing?Jefd8wv2ZT#)>ET{$yfCuO;*1m1+~K*S?XyQ_ zC1iy|@uu0GrMCY?lw~mOCv|j9A+gX zmaU^+mq!BkaNBW$l`~!JrOaB~`kj63NAT!34sZ}9PNyixXZA$>%pndl53hd0PX!UA z=|?I#fLT{&9a=2RVthKtDXS$? zsr|HCtR!l*m(%7*re1ppwAq*?G-)SiXva&twsDp$Qs~wOI>=!eqq>=My}HORMTygDFfo?qJ_zlAt|TFYB_ROO1WfvTOkj8 zvXjdu=gK45!4;!?c`VzwYK;Z*TsG2cv`WTgJ=cs@%WEm7&!|vqOuKGtU8A)& " + (!m)); + //Control de Flujo + //If/else + + if (q > p) { + //true + System.out.println("Si es mayor"); + + } else if(q == p) { + System.out.println("Es igual"); + } else { + System.out.println("No es mayor, y no es igual"); + } + + //Switch + + int mes = 0; + + switch (mes) { + case 1: + System.out.println("Enero"); + break; + case 2: + System.out.println("Febrero"); + break; + case 3: + System.out.println("Marzo"); + break; + case 4: + System.out.println("Abril"); + break; + case 5: + System.out.println("Mayo"); + break; + case 6: + System.out.println("Junio"); + break; + case 7: + System.out.println("Julio"); + break; + case 8: + System.out.println("Agosto"); + break; + case 9: + System.out.println("Septiembre"); + break; + case 10: + System.out.println("Octubre"); + break; + case 11: + System.out.println("Noviembre"); + break; + case 12: + System.out.println("Diciembre"); + break; + default: + System.out.println("No existe ese mes"); + break; + } + + } } From 2d042d1d5312e06cd304d48b78e031f21ccfb4ef Mon Sep 17 00:00:00 2001 From: Anahi Salgado Date: Wed, 24 Jan 2018 11:37:31 -0500 Subject: [PATCH 14/44] While y Proyecto --- AmazonViewer/.classpath | 10 +++++++ AmazonViewer/.project | 17 ++++++++++++ .../.settings/org.eclipse.jdt.core.prefs | 11 ++++++++ .../bin/com/anncode/amazonviewer/Main.class | Bin 0 -> 856 bytes .../src/com/anncode/amazonviewer/Main.java | 26 ++++++++++++++++++ .../bin/com/anncode/holamundo/HolaMundo.class | Bin 4906 -> 5040 bytes .../src/com/anncode/holamundo/HolaMundo.java | 11 ++++++++ 7 files changed, 75 insertions(+) create mode 100644 AmazonViewer/.classpath create mode 100644 AmazonViewer/.project create mode 100644 AmazonViewer/.settings/org.eclipse.jdt.core.prefs create mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/Main.class create mode 100644 AmazonViewer/src/com/anncode/amazonviewer/Main.java diff --git a/AmazonViewer/.classpath b/AmazonViewer/.classpath new file mode 100644 index 0000000..6ee61f2 --- /dev/null +++ b/AmazonViewer/.classpath @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/AmazonViewer/.project b/AmazonViewer/.project new file mode 100644 index 0000000..b9f7f63 --- /dev/null +++ b/AmazonViewer/.project @@ -0,0 +1,17 @@ + + + AmazonViewer + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/AmazonViewer/.settings/org.eclipse.jdt.core.prefs b/AmazonViewer/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..7e5c907 --- /dev/null +++ b/AmazonViewer/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=9 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=9 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=9 diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/Main.class b/AmazonViewer/bin/com/anncode/amazonviewer/Main.class new file mode 100644 index 0000000000000000000000000000000000000000..0c8252b225104abfb9510180daebdec52abbf46d GIT binary patch literal 856 zcmaJ=U2oD*7=8}0Q5bUwg8Oi;n_s|`ZcJ}vG1-(E5vep%=UJHyQP9X=0Wv-khiJ_w#=A=kL?+03Ki`i5SDGr5uC1uB8UT;0`}g?y(ea zg=e(6bdyLhWDofjc)%?SU$t-u5_jUh#_7o_ZSk7DLRcfQW?x(mSLeKUD261 zec`>}eOoZ(TFT;fk9#tZBW1#WBgYJDt^bm!Qvrv_FceF#TmQ(Iz9-#bz1&OTGV)2} z&QUerkA2}}a0LaTsV2m_Fb$TGy+)_`q-*MX?Y&psj^1lF zUN)Ymv4oW*mKpM4>GRPUT*E3uaug)AiDIF25kn1Y4A8L7uxScgSe8^S*M+USXQz(v zls*u;&2=@h~jh{4|#B8goH{MC=KEb^q4Lg6q2+1fyAJ$};H+^m$wfQJoQrc7#&k_eRSYs-< zifS+jtb^uCmjuMwXP zVuVl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LsPa JtdH69}>!5 diff --git a/HolaMundo/src/com/anncode/holamundo/HolaMundo.java b/HolaMundo/src/com/anncode/holamundo/HolaMundo.java index 0a8e6b4..4e9442b 100644 --- a/HolaMundo/src/com/anncode/holamundo/HolaMundo.java +++ b/HolaMundo/src/com/anncode/holamundo/HolaMundo.java @@ -216,6 +216,17 @@ public static void main(String[] args) { } + //Bucle While + int e = 1; + while (e <= 5) { + System.out.println("e es menor o igual que 5"); + e++; + } + + System.out.println("Continuamos con el flujo"); + + + } } From 25e28b058455ae7ef83f0093d43bceb10e5f47ca Mon Sep 17 00:00:00 2001 From: Anahi Salgado Date: Wed, 24 Jan 2018 11:56:05 -0500 Subject: [PATCH 15/44] For ForEach --- .../bin/com/anncode/holamundo/HolaMundo.class | Bin 5040 -> 5470 bytes .../src/com/anncode/holamundo/HolaMundo.java | 12 ++++++++++++ 2 files changed, 12 insertions(+) diff --git a/HolaMundo/bin/com/anncode/holamundo/HolaMundo.class b/HolaMundo/bin/com/anncode/holamundo/HolaMundo.class index a238c9570940027cbad1310235075ba4b61f6a2a..723e223d0c3c39eae48d1aad6c299cfe46b40396 100644 GIT binary patch delta 1459 zcmc(fUvLvu6vlsd_mT}so2Ds?O^MhRq3It|ifuMc2hkBnU|>Y+KSohwrvnsPv{Y0? zgHlA~k77gx6|E>m5v8pLZJ{cP3J5sP_~L^vD9oUvqo{8ZPevb8A9(R$cfUQ~{m%LB z*>iVa#dlSnqvr>Qfd-EEdCr*?9)hgQBZSM%Duuh_-uBkcWy^2%(8R-eTt!k53eQT- zHcBepJfbic#7nc}nk?C^m>izdmROOfU7F}vSlisyxwvCtldKK}f;^VZyH26Qvnp?L zv%X)SRF&4h6%?vPt~Nz}b628e$=t-h!4P9^dt3i=poyXmPo8 zGR*_-1D<%)j5@v41*5iOJJ|orEMWT*m$O_kX$CMqj8+$TmB@%dCbbZn*Q#_!)ri+19o?R+= zN{{Ay?c)bMhSPc+XY_QzGdZgl@S|>(=Q4iQ_wgHE(f!HPtbd+hgXHq+b~dsJMS)(- zW}d{LNHkBeMd}pmJ9(NEnvlMYXV{91GJP}8@*EZubu-ViEy-xYdLG+(L5x-Fxx6UI zOGMA+B}tP&xj8{h1bR480P6PyM(p5QBNS*D{jVeyDnk31dD0WHgB*^CTWrO^QK5jXxCo$NSbkU zY8P*@S4Lr_d7ihK#CX=2fA9`rE@8kt%sy%;RTbuS^wCe5sxjvTq z&0kp0CjuK}3flNob{Ex!I2@LkBU9k!vn=9s81*~V8Fh>ri!V~E3rc)PvR~4o!lK&Z zXlk18VwICP;kzic-RB*N96ti#FU?K-T2PjoIPw1~Las285qgs-EYI!vo}!RDL-_>> vQ+EWc+*$vt+y$u`{C_dl;)t4@k@M6r;x3Ddm6B!rbC=_&I41uJgD?LE3cpM4 delta 1170 zcmd6nOKeS16o$XO*VV(leciTbX=zp8H>DJbL}Fkd5g}fQiKI$GS|SM1mRqWxE#;_J zDb>klP~LE|5|_c-Z_1_9a-MTKf50Q zQ@Gpd{VFn)vQWLJ$Bc|xxUs0XWNy*AMMcX?S2|QUG&(f9wGkVk zi`&vgVy8|Ktz+6L2_5jYn&4}Xk9YXA)XRi{cFL*HHlN3^m2DVe%SBFVtRz-R3k~WRMR1Lr;gpUU&3ZY>X&OnUOb&B~OvX?p zdpS!sV+qMpnh20;vg}*V(M*~N*q5}B%Q&;i9_2g*q?>BHn+v*bys5F3v?^toL$;hY z4U=i=?Pe}&E!#BOwOnFXkQ~!&S94kAT+?P(a78I#F54omYGc0XvP)=Jnqa!^0 Date: Thu, 25 Jan 2018 11:44:03 -0500 Subject: [PATCH 16/44] Definicion de Clases --- .../bin/com/anncode/amazonviewer/Main.class | Bin 856 -> 856 bytes .../com/anncode/amazonviewer/model/Book.class | Bin 0 -> 513 bytes .../anncode/amazonviewer/model/Chapter.class | Bin 0 -> 466 bytes .../anncode/amazonviewer/model/Magazine.class | Bin 0 -> 468 bytes .../anncode/amazonviewer/model/Movie.class | Bin 0 -> 470 bytes .../anncode/amazonviewer/model/Serie.class | Bin 0 -> 496 bytes .../src/com/anncode/amazonviewer/Main.java | 5 + .../com/anncode/amazonviewer/model/Book.java | 14 + .../anncode/amazonviewer/model/Chapter.java | 13 + .../anncode/amazonviewer/model/Magazine.java | 12 + .../com/anncode/amazonviewer/model/Movie.java | 14 + .../com/anncode/amazonviewer/model/Serie.java | 18 ++ HolaMundo/.classpath | 10 - HolaMundo/.project | 17 -- .../.settings/org.eclipse.jdt.core.prefs | 11 - .../bin/com/anncode/holamundo/HolaMundo.class | Bin 5470 -> 0 bytes .../src/com/anncode/holamundo/HolaMundo.java | 255 ------------------ 17 files changed, 76 insertions(+), 293 deletions(-) create mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/model/Book.class create mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/model/Chapter.class create mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/model/Magazine.class create mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/model/Movie.class create mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/model/Serie.class create mode 100644 AmazonViewer/src/com/anncode/amazonviewer/model/Book.java create mode 100644 AmazonViewer/src/com/anncode/amazonviewer/model/Chapter.java create mode 100644 AmazonViewer/src/com/anncode/amazonviewer/model/Magazine.java create mode 100644 AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java create mode 100644 AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java delete mode 100644 HolaMundo/.classpath delete mode 100644 HolaMundo/.project delete mode 100644 HolaMundo/.settings/org.eclipse.jdt.core.prefs delete mode 100644 HolaMundo/bin/com/anncode/holamundo/HolaMundo.class delete mode 100644 HolaMundo/src/com/anncode/holamundo/HolaMundo.java diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/Main.class b/AmazonViewer/bin/com/anncode/amazonviewer/Main.class index 0c8252b225104abfb9510180daebdec52abbf46d..a7e1e39e7b83f46ac877cdaf8de542008237eab3 100644 GIT binary patch delta 17 Ycmcb?c7tt$A~UNbgByeFWHn|Z04(MN00000 delta 17 Ycmcb?c7tt$A~UN9gBydyWHn|Z04$&b_5c6? diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/model/Book.class b/AmazonViewer/bin/com/anncode/amazonviewer/model/Book.class new file mode 100644 index 0000000000000000000000000000000000000000..7a2fdd3385d9756e9224d31947a00a56260d75ca GIT binary patch literal 513 zcma)2O-sW-5Pj38iH)tTt=}I95kWnelPAT4iXapPD?R9GlP+~@vJ2^^g8#~s;K3i@ zj}j+oz>5bDJ2UU?+u1ks_5JY);27H;Dumt0B!SR6GD8`NM7$b3Rq{oqLBdQNoE!7( z!6CHAVk&}I=uvPRj%8#C6*VN#HKAsejU}Pe`xW(Vs`TiD(3C^P_sZx?VOi9ki88C= zAZJ)o&m|^RA|`kuvri_S5W0_lwR6-Y)C4z`VkqXT|%p;w7kiZP^R}HoY^*!hzEiVFfK{QJ}EY_*ZaqUcm%(1vNV!cDsNcN zw|1280y|(Myzej%~+Z+QR! literal 0 HcmV?d00001 diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/model/Chapter.class b/AmazonViewer/bin/com/anncode/amazonviewer/model/Chapter.class new file mode 100644 index 0000000000000000000000000000000000000000..7e00fc3291abe963e279df99b7ba9189ab72e2f2 GIT binary patch literal 466 zcma)2yG{c!5S-295{?TA;SCiHN+`IB3PckL2`PdiCku+*WyPp zS=-1Hk&cB?t}e-%ovVV-8~$%*HXe@hrAg$ia(_nUE-u`JI0f6`MK<`<5pZ;Q)8j^2 zhuHLWgqFvxl5czD!JU1MUA~POiLrkEft`0wD%j%~c(RIp&ZD&e2RP)4aO73Tzf!ql AX8-^I literal 0 HcmV?d00001 diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/model/Magazine.class b/AmazonViewer/bin/com/anncode/amazonviewer/model/Magazine.class new file mode 100644 index 0000000000000000000000000000000000000000..48469116286ef82854b4f4e385feeea41b2aa752 GIT binary patch literal 468 zcma)2yG{c!5S+a{j)a7Sgl9WzoJ5--~;$5 z#NH){hJwPgp7D4+-p{Z14*=&l3=t5HBbO+)HgaRFIN_zU3!`6jsuEFRbTxvFktYOZOrSeL#Ty@MLZ|<08u--M$pxXQ$41VLvp4L;)Lxk~Z(@}z zVyWd8ml}=Br%yau zrE(F+Lze!+*J9aEjl9w8|8oYCvOaKG8tGe;H*Nk5=Pds+jv#?#w3T921%VJ7MXjM; v)Xg<-pebA?mj@PX3sVJ``=@W%eib1=SFkE_-gHN>vEJ`uPZ(ieFu=h#W;<(X literal 0 HcmV?d00001 diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/model/Movie.class b/AmazonViewer/bin/com/anncode/amazonviewer/model/Movie.class new file mode 100644 index 0000000000000000000000000000000000000000..c0b5714c96f33cd93b3fb086380a7a29f8fe27d8 GIT binary patch literal 470 zcma)2yG{c!5S-29E*yb`@P0H%2muAIs6aGGNJs&SpcHh@#R`t@Y{~e7;IF8VDEI(A z3bE&$L`&hF-P!Sa*55y$UjWXq7o$cvNNp~pF{vFZA#?d=%}lEoaNH~%00-@ z+=xwOHk3}6bwxJ(lYS-~_W!dp8&3wdaH+c1<-{cX#A&%7_Q6*86I*Rb@rr?dH6k7>D3i zc&!~iO|&=y9@-8&75Wt}ReBf8PG3RKVZY*69r7B=Q8=!%8ZZ)L^Xvl~@0`@I#j)kc TI<`6QE)3YgF5d`y&b9vw$)IOS literal 0 HcmV?d00001 diff --git a/AmazonViewer/src/com/anncode/amazonviewer/Main.java b/AmazonViewer/src/com/anncode/amazonviewer/Main.java index 92e4872..9a3c3a7 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/Main.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/Main.java @@ -17,6 +17,11 @@ public static void main(String[] args) { System.out.println("4. Magazines"); System.out.println("0. Exit"); + //Leer la respuesta del usuario + + + + }while(exit != 0); diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Book.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Book.java new file mode 100644 index 0000000..9e83406 --- /dev/null +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Book.java @@ -0,0 +1,14 @@ +package com.anncode.amazonviewer.model; + +import java.util.Date; + +public class Book { + int id; + String title; + Date edititionDate; + String editorial; + String[] authors; + String isbn; + boolean readed; + int timeReaded; +} diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Chapter.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Chapter.java new file mode 100644 index 0000000..b05d064 --- /dev/null +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Chapter.java @@ -0,0 +1,13 @@ +package com.anncode.amazonviewer.model; + +public class Chapter { + + int id; + String title; + int duration; + short year; + boolean viewed; + int timeViewed; + int sessionNumber; + +} diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Magazine.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Magazine.java new file mode 100644 index 0000000..e499a29 --- /dev/null +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Magazine.java @@ -0,0 +1,12 @@ +package com.anncode.amazonviewer.model; + +import java.util.Date; + +public class Magazine { + int id; + String title; + Date edititionDate; + String editorial; + String[] authors; + +} diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java new file mode 100644 index 0000000..1993cf8 --- /dev/null +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java @@ -0,0 +1,14 @@ +package com.anncode.amazonviewer.model; + +public class Movie { + + int id; + String title; + String genre; + String creator; + int duration; + short year; + boolean viewed; + int timeViewed; + +} diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java new file mode 100644 index 0000000..aa42ff6 --- /dev/null +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java @@ -0,0 +1,18 @@ +package com.anncode.amazonviewer.model; + +public class Serie { + + int id; + String title; + String genre; + String creator; + int duration; + short year; + boolean viewed; + int timeViewed; + + int sessionQuantity; + //chapters[] + + +} diff --git a/HolaMundo/.classpath b/HolaMundo/.classpath deleted file mode 100644 index 6ee61f2..0000000 --- a/HolaMundo/.classpath +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/HolaMundo/.project b/HolaMundo/.project deleted file mode 100644 index 10cc775..0000000 --- a/HolaMundo/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - HolaMundo - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/HolaMundo/.settings/org.eclipse.jdt.core.prefs b/HolaMundo/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 7e5c907..0000000 --- a/HolaMundo/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=9 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=9 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=9 diff --git a/HolaMundo/bin/com/anncode/holamundo/HolaMundo.class b/HolaMundo/bin/com/anncode/holamundo/HolaMundo.class deleted file mode 100644 index 723e223d0c3c39eae48d1aad6c299cfe46b40396..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5470 zcmeHKd2m(L8ULMo?tAxT0bZ7e35&jfKms9w5N~v zt=6zDkU2jVvcgSP+);9Wr=I9=x&-p(|C=zXI7P&Aq5?znTjqZrPD3K@MBA$hno^K~ zECZP*1>4Zwm9Qh}$VPyH#*&OX&}Zz#iWku`L3`VZRQYg@K!!>>=w=rl85dWC0I#TWY*B^$qXMeLVXL zZ?(_qRX^`cF0lG3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MdoJe8Qf3D*jGjd`0yiz@DjgB{(=d;;y4No zyex#!HOc4aKUXsFidtF&;|xqN@T!3VgV6{nH0dfp7|8AA(QtNNG{(G)^x!`9X zk%6kSPfao_IugBP)Yl=MiAMj|Rmw-v+3XR)e^B~JpxAV_u0F5SsI&IXxE9iUjHWfHd7HatMzW{pQ B^ p ->" + (q > p)); - System.out.println("q < p ->" + (q < p)); - - System.out.println("q >= p ->" + (q >= p)); - System.out.println("q <= p ->" + (q <= p)); - - //Operadores lógicos - boolean n = false; - boolean m = true; - - System.out.println("n && m -> " + (n && m)); - System.out.println("n || m -> " + (n || m)); - System.out.println("!n -> " + (!n)); - System.out.println("!m -> " + (!m)); - - - //Control de Flujo - //If/else - - if (q > p) { - //true - System.out.println("Si es mayor"); - - } else if(q == p) { - System.out.println("Es igual"); - } else { - System.out.println("No es mayor, y no es igual"); - } - - //Switch - - int mes = 0; - - switch (mes) { - case 1: - System.out.println("Enero"); - break; - case 2: - System.out.println("Febrero"); - break; - case 3: - System.out.println("Marzo"); - break; - case 4: - System.out.println("Abril"); - break; - case 5: - System.out.println("Mayo"); - break; - case 6: - System.out.println("Junio"); - break; - case 7: - System.out.println("Julio"); - break; - case 8: - System.out.println("Agosto"); - break; - case 9: - System.out.println("Septiembre"); - break; - case 10: - System.out.println("Octubre"); - break; - case 11: - System.out.println("Noviembre"); - break; - case 12: - System.out.println("Diciembre"); - break; - default: - System.out.println("No existe ese mes"); - break; - } - - - //Bucle While - int e = 1; - while (e <= 5) { - System.out.println("e es menor o igual que 5"); - e++; - } - - - System.out.println(); - int[] numeros = new int[5]; - for(int c = 0; c < 5; c++) { - numeros[c] = c; - System.out.println("numeros["+c+"]: " + numeros[c]); - } - - for (int j : numeros) { - System.out.println(j); - } - - System.out.println("Continuamos con el flujo"); - - - - } - -} - - - - - - - - - - - From 3d49bc4f933066defa5f1741e62947d62c0d7e08 Mon Sep 17 00:00:00 2001 From: Anahi Salgado Date: Thu, 25 Jan 2018 12:04:59 -0500 Subject: [PATCH 17/44] Declarando e Instanciando un Objeto --- .../bin/com/anncode/amazonviewer/Main.class | Bin 856 -> 1289 bytes .../anncode/amazonviewer/model/Movie.class | Bin 470 -> 470 bytes .../src/com/anncode/amazonviewer/Main.java | 39 +++++++++++++++++- .../com/anncode/amazonviewer/model/Movie.java | 18 ++++---- 4 files changed, 47 insertions(+), 10 deletions(-) diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/Main.class b/AmazonViewer/bin/com/anncode/amazonviewer/Main.class index a7e1e39e7b83f46ac877cdaf8de542008237eab3..e42093873dcbe250686e9edb06e4c34e005dbf03 100644 GIT binary patch literal 1289 zcmaKs`)d?e6vw}JH_6VfW3%RIVp1nf8k20gV`6;fVH4dzAlXQ_uD1Q@W^#!WcV@!u zY<%?Bf*=$Mf?z3#KP?FUprS$w{lWa!KdJQfy}JWdG#$9-+;bo2e(pKv&hLNk{RZGP zmQzRw3_5{lOW${bO=U|@-VOX+SKU&fy(V2hg%*MAw%nC=MfzLz`o^|$B7wF!*LR}@ zf#leDS)k<-cW019+C(eb1lm_!UlnWKh6=xy8xhgHISVkO|!>DFOCYd zMsCyu{on+>tlz{j3rNHRHb@NWnb@?cQ5II!U zoxrbh>)}!)ottZNC$7XyDX4{xT6T2_q;=`%bb7>jZe_d5pEXW(^(70Ui^yeH*fefavhzo(4EWPeuci|{0j_r z48O+bTIXW@MXc>uPsRFFtWU@KEOl~W@F~3mUpAzs0&;A5wkft5wzF&(*yigPuVb{1 z;X1532J7grqnAg&#(51e+jLB8;OBpC=$j^?Z@P_s$_z{E5N~Fpi?Rnt_#ir%@J^o9 zg)`{J0!Nqm!iqSGGM~_O4B!V?xQAif=gJ>h89!kX4;a#in8qXinI3azorKRYhv&S7 zj^;!&Vwk5#UC>W)ku&@y;1?{?XM&!uVu`&ZE^$RKGJl~bg{=4!o=7ymKL{ppnbQdr F{sr+dAS(a> delta 444 zcmYk2J5K^p5QWdM$}Y>I2#P!eSHu_U^3q1FNYI!_VX&jR8bS~R1B9pzwS|S*&Oc$W zu&~ft;}7tk*cf$Kw=kRB@6OE0nREAA{cx&p-%rl~Hj%qkUv(EI;FsYecuz%7q#B}G zO_eS?-O8DUNlcjy(rMbfp_ns-h>Wl~prAB^sQFF_d6obLbLJ#?XtcUaitm zu)t;3&`XuJRW1>foT2AitvU}^2-*f~MO9qYnnU?2K~5Wb;iA?hjEHu%L-3am{$=X6 zYt8C54=a|2_6eR+SDe&~;`~S)n?C8VFTu@E)4;JX%JeW@7{fSsWWL|S!5^?E?L5Hi z3p^q?WXz^+Gj20sbJ6Cq%_K8&_wzDfD+wx}hPAk?u)CWZ8hpGv%$wu9I|(nc{GYeD kn@0${h+6W%Uly!koh=+FuuY1Srnz#0zThCPGS)2n3;(xHuK)l5 diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/model/Movie.class b/AmazonViewer/bin/com/anncode/amazonviewer/model/Movie.class index c0b5714c96f33cd93b3fb086380a7a29f8fe27d8..36dca903f5b6f5bfe834d75fcf7ad23888095591 100644 GIT binary patch delta 69 zcmcb{e2sa7AEPBB11kd?0|Nsi13Lo;nC67iTu_=DD$m2f3zp|&;0Mu@+Zp`<);a{? delta 69 xcmcb{e2sa7AEPA$11kd?0|>A)aDZt}D9r_>xuNnr47^}@J_ddeJ-MCH9{|-d1la%p diff --git a/AmazonViewer/src/com/anncode/amazonviewer/Main.java b/AmazonViewer/src/com/anncode/amazonviewer/Main.java index 9a3c3a7..220345b 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/Main.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/Main.java @@ -1,10 +1,16 @@ package com.anncode.amazonviewer; +import com.anncode.amazonviewer.model.Movie; + public class Main { public static void main(String[] args) { // TODO Auto-generated method stub + Movie movie = new Movie(); + movie.title = "Coco"; + movie.duration = 120; + int exit = 0; do { @@ -18,8 +24,37 @@ public static void main(String[] args) { System.out.println("0. Exit"); //Leer la respuesta del usuario - - + int response = 0; + switch (response) { + case 0: + //salir + + break; + case 1: + + break; + case 2: + + break; + case 3: + + break; + case 4: + + break; + case 5: + + break; + case 6: + + break; + + default: + System.out.println(); + System.out.println("....¡¡Selecciona una opción!!...."); + System.out.println(); + break; + } }while(exit != 0); diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java index 1993cf8..2a50a9f 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java @@ -2,13 +2,15 @@ public class Movie { - int id; - String title; - String genre; - String creator; - int duration; - short year; - boolean viewed; - int timeViewed; + public int id; + public String title; + public String genre; + public String creator; + public int duration; + public short year; + public boolean viewed; + public int timeViewed; + + } From 197c668ca189fe118a9cef6dc4f8ae43874171b1 Mon Sep 17 00:00:00 2001 From: Anahi Salgado Date: Thu, 25 Jan 2018 12:42:43 -0500 Subject: [PATCH 18/44] Declarando Metodos Static --- .../bin/com/anncode/amazonviewer/Main.class | Bin 1289 -> 1908 bytes .../src/com/anncode/amazonviewer/Main.java | 63 +++++++++++++++--- 2 files changed, 53 insertions(+), 10 deletions(-) diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/Main.class b/AmazonViewer/bin/com/anncode/amazonviewer/Main.class index e42093873dcbe250686e9edb06e4c34e005dbf03..2b551606e2e6f2604a40aadb702169fc198d448b 100644 GIT binary patch literal 1908 zcmai!+iw#`6vn@CocMxsAt4tMQZ|I9xz&acpd^9Dc1#HIC5ow`v}!wcM$RVou4Ox+ zph}f0Rq9h8`%qPC^JJ-S1&Jaa`T%eJSNb1RsO>lFO#>2gY|YG`nK|?O&N;LD=ReQ? z0B{*eA3Or11-l%PmQ}E~R795LBiq_H)dN+Hq@-#2;1%fEk^3@Il2$R2$?vE_U7%yh zw9NVqfwsx1oPak@?;zR`2%#Mv0^Lc|Qt7>NURCeNd`SuPChdYOoM}fk$f}d5WO>n#GXke$Yl(C&kzQNLWQ}MldOwpk za%+jZiOnG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CwLCNg>h=+OWicgCm zJx``$XP6o%MJDsyn$qnS)RZXhk~&wD$57BfmJh!ma`zM2%0^>HXv;=+kIQv7@s{=PqG|))QQgW0cYQPW=qm(hqq=$YFX%9&c zx`!SQaSt8reT-}V1mmZbX(itNyMMq86&m$A;?x>hZbCD{Xr*pP3%401O))lW#R%Fk z#lK}fkK5?PGWWkyLjq5r;~A28!O)i^^c4o+B9GT7;SFEkd!~9E@dGAsze!mdYm~)GM1+)JF*JF?p diff --git a/AmazonViewer/src/com/anncode/amazonviewer/Main.java b/AmazonViewer/src/com/anncode/amazonviewer/Main.java index 220345b..26be44c 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/Main.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/Main.java @@ -6,11 +6,11 @@ public class Main { public static void main(String[] args) { // TODO Auto-generated method stub - - Movie movie = new Movie(); - movie.title = "Coco"; - movie.duration = 120; - + showMenu(); + + } + + public static void showMenu() { int exit = 0; do { @@ -24,14 +24,14 @@ public static void main(String[] args) { System.out.println("0. Exit"); //Leer la respuesta del usuario - int response = 0; + int response = 1; switch (response) { case 0: //salir break; case 1: - + showMovies(); break; case 2: @@ -58,9 +58,52 @@ public static void main(String[] args) { }while(exit != 0); + } + + public static void showMovies() { + int exit = 0; + do { + System.out.println(); + System.out.println(":: MOVIES ::"); + System.out.println(); + }while(exit !=0); - - } - + + public static void showSeries() { + int exit = 0; + do { + System.out.println(); + System.out.println(":: SERIES ::"); + System.out.println(); + }while(exit !=0); + } + + public static void showChapters() { + int exit = 0; + do { + System.out.println(); + System.out.println(":: CHAPTERS ::"); + System.out.println(); + }while(exit !=0); + } + + public static void showBooks() { + int exit = 0; + do { + System.out.println(); + System.out.println(":: BOOKS ::"); + System.out.println(); + }while(exit !=0); + } + + public static void showMagazines() { + int exit = 0; + do { + System.out.println(); + System.out.println(":: MAGAZINES ::"); + System.out.println(); + }while(exit !=0); + } + } From e5f002ef418e05c04a9cb2929d0862c81211f151 Mon Sep 17 00:00:00 2001 From: Anahi Salgado Date: Thu, 25 Jan 2018 13:16:13 -0500 Subject: [PATCH 19/44] =?UTF-8?q?Sobrecarga=20de=20M=C3=A9todos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bin/com/anncode/amazonviewer/Main.class | Bin 1908 -> 2250 bytes .../src/com/anncode/amazonviewer/Main.java | 29 +++++++++++++++--- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/Main.class b/AmazonViewer/bin/com/anncode/amazonviewer/Main.class index 2b551606e2e6f2604a40aadb702169fc198d448b..d33fcf722b069f361f3733dd4f5aa9a92a269d9d 100644 GIT binary patch literal 2250 zcmah}`)?Fg6#i}>>}**c_CcZLF~tgfz;0=2)olf~?a~%@yRf?yD4<@p*D_^yX0tox zm1s;%OiVN;CMHG`lm4`cCMG@t8#Mj^Q4{|a{{utR@6HY_M6#Xa&Y5%Oob#R6J%9f5 z@K*q%kO4FZ?8`ZYh_vmTv!o)jAn!T$Elb^2rASg*b^uKRJ6Gf_8Ocj~Ig+}*qH?al zmI=$Y+!F$gefxh(IoVU!F}eKc&QRnaNA28P+nv8Sw=b(Z8^1IHQtP}q#$v0PpG zu@GL>m2dGX@4;&E>mfwf#Wi>>o(SO$Ee>jJFAOa`8Nw+o-RAjt8jk)m8N!t3rXX*s zT37+Z1-5&oU3IN|WLml$zG(!t{;bxYW9j{>u4{O6vL9!4{kIrM3iO8gJX(9S_Dp?O zS!2JXJw5tA$4D_z0YRrmNtKI^UFJM*%eXRkGbxMSC>zMIl+mb}OmPM>W;ANxLQRs1 zr)v_jI=iVGvgoQ3Yki4X&}3>hb}k!F*Nhegwo*2kN}a6o+g~Pf~%$Xz2YY*rm@s9ExAQvI!oS}K(0gUhY(Le=w zzd?nq{0`L=NVky-Vmo&D#>3>baZ?pLH*8zz1GH?U{)T-M+R*OV^P1M|#V6F%x_>l| z|A3Cx?)%uM>B~NS#ixgT+V9grpC0vT#HYu6Izrks(ftiQ1DCzG&IlOf3G*E1iSnG{ zIn9%(V6uwQ3MQ&}t%9*C#w!@A;zR`lRm3Xj{Tb7jAK-KqGZl0)#``#)?Pz(z<^KfliiT$Wg#KovL4A+?)+$=-)^>ZX@zYH|o92`V5 zjnia?8*7${&k_C%6HKg6Km${*g`xu>j1GX1+!6I4vvna;ggj5kG$AvD%o6g#rjQHu zAura2yhO-FLS7-{RYG1PasWf9iMEF}1=qR$9}y J_-?@4{{c~7*_6QikV(xz6|77CW&OKTgOCYo*%`;x{jMr#F8Q&`%xYQ#u= zK`01@dSV%rn2|+1Z`Yub{E>=i7Gx zW0>DEqDp+PE$>890Km0FJ?{BO!IwHq!!uWYR3! zi?jKXnN04bmz?`d*O8HHs%d2ff=tTJOf6i_UuvfL>Z(<(t~2X`fS>!8Z5NuG`x_<8 zE9EDZyLDz(epbWshdLm1DYRkXk#TL(@vk`TV#vjy3)4lviKvw=Z8#t@$3I5rW-Gn~Y8roZ5=zr;A+ zAc1#C;R8GLvqYrvG4F8}6O3|LB0ItVG07+lV;73p#T}t|l=}0VZTK)MUwL~EH2P2d z?_Y-Wa3Vv^f{rW>(uyF@rl%Wq0yGu$?$xR5UQkv9y>l(^e7iTtGxPL{^e)n~=`D2h zrdpoW?v?0Wp|?oyD!nCo*E)K+mX~k$uG70g?J9^VCZ>G&lJM>oQt Date: Thu, 25 Jan 2018 16:22:54 -0500 Subject: [PATCH 20/44] Modificadores Acceso Constructores y Sobrecarga --- .../bin/com/anncode/amazonviewer/Main.class | Bin 2250 -> 2460 bytes .../com/anncode/amazonviewer/model/Book.class | Bin 513 -> 710 bytes .../anncode/amazonviewer/model/Chapter.class | Bin 466 -> 583 bytes .../anncode/amazonviewer/model/Magazine.class | Bin 468 -> 617 bytes .../anncode/amazonviewer/model/Movie.class | Bin 470 -> 1360 bytes .../anncode/amazonviewer/model/Serie.class | Bin 496 -> 604 bytes .../src/com/anncode/amazonviewer/Main.java | 5 ++- .../com/anncode/amazonviewer/model/Book.java | 27 ++++++++---- .../anncode/amazonviewer/model/Chapter.java | 22 +++++++--- .../anncode/amazonviewer/model/Magazine.java | 19 +++++--- .../com/anncode/amazonviewer/model/Movie.java | 41 ++++++++++++++---- .../com/anncode/amazonviewer/model/Serie.java | 26 +++++++---- 12 files changed, 102 insertions(+), 38 deletions(-) diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/Main.class b/AmazonViewer/bin/com/anncode/amazonviewer/Main.class index d33fcf722b069f361f3733dd4f5aa9a92a269d9d..6060120c19eb0129a2eec4ffae155bcc8fa9529d 100644 GIT binary patch literal 2460 zcmah~Yi|=*5IxsP@Y)yx;hmJSDHIYy?eI#A6CO_DK){Yu+ZY1nabqvZ67Q~SZ=g`M zs#K{`rB;+*(-m8Crs%S>N4 zimt$_A=5V9V*)Kby#;~R5$+D71)&Jquu7mkW!lEXyftl9^K!au2y~>JqAV9=)l_TW z+3L=kHGv(erX&UlV3CZ#=AMhGWimOpYT7e{y@epw3+#Gf4vXZd^D5O6Y0c-%!FPTPo7I=!`O>`LG+QfC-Bp|BX|u_fnY@?EVB`t zo+D9jK|{X)G#n7<%Nb>(SfsL2H_E#G@SbH<9ld1eWvM%rqWSPAo2!~3OH#ujwqk!& z_gYlbFu>)3sGc*brorVK6yac0A9kEMuHpibLyVO(@-~Nzo*{-Gj_O&X;#6G?oXYlr z$4fo$l;kZ9C&<1(swdwu-7o}(BN$O#3#+a*V3j)=!Pt_!0k7PrA{bZhkc#$bDDRmF zQp&r=%kh|wdNUD0#!F+#Iio=?>%700e|=GNp~S)5DDiud_x zxI!u8aXp>k4CM59Tmz?9d2-2Y!^5SjZe&(gT%$^@ORRzcBc~FR`DC`S>6*Z5`i3)^ zGY!WqJD~C=P9`plPk5hIrG(`F=ncBBBYL;s1gd@l%|D86`(}o zxx(KdS20@78QS*Vh4up<0t|rn8Vp#?=SU-fb`4h{tVO%Od6J0&^liM4byFQ39UIpN z|GJCKslEklTh6uC176Kt5p3XBu5xZ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&IlOf3G*E1iSnG{ zIn9%(V6uwQ3MQ&}t%9*C#w!@A;zR`lRm3Xj{Tb7jAK-KqGZl0)#``#)?Pz(z<^KfliiT$Wg#KovL4A+?)+$=-)^>ZX@zYH|o92`V5 zjnia?8*7${&k_C%6HKg6Km${*g`xu>j1GX1+!6I4vvna;ggj5kG$AvD%o6g#rjQHu zAura2yhO-FLS7-{RYG1PasWf9iMEF}1=qR$9}y J_-?@4{{cWiby= z=#IrAyusglSHr~|&D87{B)1@W1uYf?DIi!tQLrRAMa5-Q=v|^~k9u6f^=OFY=s3e# zbdr%e&9E5-Cd2lpWOv!a`3DqWsL)4=7I9Gp0afjh;bKySeT1Yqz!Q})9;t=#Oh*_G LH1vN!O5<=0;IA{6 delta 182 zcmX@c+Q`Cn>ff$?3=9mW46+ls9*8n)XofK|usG+Zq;fGZGl=mp2r&pxE@rH%XJBAu zU;`>-U|?t90MncdTwt0T%I9I=1@rl!e0~N2FkcX?kCA~9WEPMV0gCDaX+|K;s|uuGDw4!$p8SpZ4Q0_ diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/model/Chapter.class b/AmazonViewer/bin/com/anncode/amazonviewer/model/Chapter.class index 7e00fc3291abe963e279df99b7ba9189ab72e2f2..94e8df80643d74e8577109bec7023bad01b1a559 100644 GIT binary patch delta 290 zcmXX=J!=9{5S({+ew{CRerwc3t@K$~r3%uXU+|}da0nK*f~7ww zIB!j}GrK!GJ6HGY`Io=r3BU_Fd;fP@=}z9mZ8%tmo7G_U_4&40y^d$Sxq>(PSS)?G zC~5>KDY)IF-#PASHqn2x>eCX8z|{K}DAU zIo3S4Yuo`Vq>e5us|D5gvc!y1`oJFVM|HhC#Bd!4L(SG&weR13clG9jzpg R5@sVg!fYs)Ph0F9v~O!?9Pjd@crVFrSBk7fka(#reTBBLgGI3?L~4l+_2)j6j-IYdeGRMj(TU fK@>=`fd!cv#DHubhyn(21_>aKkwFryictyxHGU2A diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/model/Magazine.class b/AmazonViewer/bin/com/anncode/amazonviewer/model/Magazine.class index 48469116286ef82854b4f4e385feeea41b2aa752..96257dba63e5cc5beb25749ad793abd969711888 100644 GIT binary patch delta 324 zcmYk0y-or_6ot?1uEH+k0-}ijmazV8MJOz>BsLoQAx_Aebv0zMk6EuhcvP<{PE|IJ@A65KjjvaeX`ZC< zjmq_ZzrN8K3V8kJ2OYr0wnT`AfZOg2eF*GIlu$NqPr^rF+`dEwWr6A-$@J~?X{0Cj zYLx2v&&$lg1~!?$i66iZWt?-COQ1aPvS)VY%*<~t=kLE?e*nzmt%eZ8WYuk0+;OUIO<26azqrnU zEe?feHAqvp-n;axA;QqJ%MZ9!=gzkEacfspeTI--V_-#wsBimq!H_JSUn={a?Q9pw zxGfxyj9S$b+;=?&z1H-&Z@Ugd^riR>w z`IL|LebF#5jTtJ^ZPKXHL7QyX`b1;#X*hy63L0h^1}@KRxoOvH!qah|TE8JDyO2O0 zbFym>Dby91xr)3oZ{RVWkQ3kA6Ale7f7R8Fft}Xi4)>?OTEECkaT*Cz&tF)4vv~{YeHHo~=Fp@2HW;q3;bu7D0 zuPWATIqZab6tglfCTK0f^qzEt5JilnklZD8(k7{s_DG$yMe3v-QfC*s)!C!;VT#m? zBz^lx`;Fqr+Zpp1DRa7o0duB>K{MaNu$hjuFlwfwEsTFx5hmz6MtOlAL?}v};&f4* zKBO>+G{(`7+hkn|V&V=a>5rl-R;DCL8&Z`MKuJOzmlJ1F8#p0-^gz! ztz$eee`27GM{PW9WAW7RDliOo7*+zqcpI++kMlkz6;+0qCoo5x?}$(K&Iodz&@#Ls HT?obhnf?-z delta 186 zcmcb>b&Z+p)W2Q(7#J8#8Du7MZ5CzL&}k8 zQ5q}MgW==!Cz_OCU@Ndwh$C){l443&QOyumlrnkrn45u< EU+M5IU;qFB delta 219 zcmcb^@`0J_)W2Q(7#J8#8DuANtuo**PAx9Z%+CufP0TCFEU9E3DnQZzy>547}yy&z%(b6=7Q4PP Date: Fri, 26 Jan 2018 08:51:15 -0500 Subject: [PATCH 21/44] Aplicando Herencia a Film Movie y Serie --- .../bin/com/anncode/amazonviewer/Main.class | Bin 2460 -> 2332 bytes .../com/anncode/amazonviewer/model/Book.class | Bin 710 -> 2218 bytes .../anncode/amazonviewer/model/Chapter.class | Bin 583 -> 1847 bytes .../com/anncode/amazonviewer/model/Film.class | Bin 0 -> 1684 bytes .../anncode/amazonviewer/model/Magazine.class | Bin 617 -> 1606 bytes .../anncode/amazonviewer/model/Movie.class | Bin 1360 -> 986 bytes .../anncode/amazonviewer/model/Serie.class | Bin 604 -> 765 bytes .../src/com/anncode/amazonviewer/Main.java | 1 + .../com/anncode/amazonviewer/model/Book.java | 48 ++++++++++++++ .../anncode/amazonviewer/model/Chapter.java | 42 ++++++++++++ .../com/anncode/amazonviewer/model/Film.java | 62 ++++++++++++++++++ .../anncode/amazonviewer/model/Magazine.java | 40 +++++++++++ .../com/anncode/amazonviewer/model/Movie.java | 41 +++++------- .../com/anncode/amazonviewer/model/Serie.java | 32 ++++----- 14 files changed, 222 insertions(+), 44 deletions(-) create mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/model/Film.class create mode 100644 AmazonViewer/src/com/anncode/amazonviewer/model/Film.java diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/Main.class b/AmazonViewer/bin/com/anncode/amazonviewer/Main.class index 6060120c19eb0129a2eec4ffae155bcc8fa9529d..ed7e1a081c5cdf909a49912dc112af6dbf70d0f0 100644 GIT binary patch literal 2332 zcmah~{clrc6n@@q(A!cz9N(L;J3!qAwBu`NH-T+*Q0T{4OJRWEUHiIS*4|rhZ~2NE z6B82?jfshg(ZqzGnrLF;M_>V?2}Di&SNsnQQJ?qTyA9NIU2ad$x#vC4InO!o+3$Zn z_zA!fltO3|*io{pal^7oc3H-as&U7*ZkY0>bmAGqv_j|**l^vrVZ(T$d$R zVD*S;neH)x_P+k2K*u;wN6?ON6sxdWV13%OWVTVAkxs#wsYrp&v|TbPMZ+1~eMFD8&6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aXp>k4CM59Tmz?9d2-2Y!^5SjZe&(gT%$^@ORRzcBc~FR`DC`S>6*Z5`i3)^ zGY!WqJD~C=P9`plPk5hIrG(`F=ncBBBYL;s1gd@l%|D86`(}o zxx(KdS20@78QS*Vh4up<0t|rn8Vp#?=SU-fb`4h{tVO%Od6J0&^liM4byFQ39UIpN z|GJCKslEklTh6uC176Kt5p3XBu5xZ}?88gg&Q&|}yo?>p8iM|qn)sA4D*GQTgFm9X zW6uJ5m5up!zi$uv_ONeX_w5ni4*K?}Z;#Wq4t0IY%)pfQtLg>%ct?33;vMIGg7+Bj zR2{>MNYpX3h|xL*7ICtU{zaUwWA7r;b?my2$*H@@E+SXQ7IIubK`}kwK;)|PtN)HG zL0UX<-)E_y6amT*#ujv7D>|`_M^YyTv>TUVgINzn9DH^wd4Y zEvI>&o#6zeSa_PnW|rnF!15bZ6am600)*rV(hTxyQ^+hK^MpK0$O0kH5%Twjv~taUZgqJyw@kJ|xsD;HH;Eee@x9iu>W}!&Gmd34eD9Qw5kTTiH4O H22lPV_}$?{ diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/model/Book.class b/AmazonViewer/bin/com/anncode/amazonviewer/model/Book.class index 778b51f87a0d0bca56386f3a1766865b6a8d71d2..5d76429d697f528c05e077cefa79cce675a3e61a 100644 GIT binary patch literal 2218 zcma)-T~8B16o%g^r60IR1wpB(_yKMUQa|t;Dq29B5KWYDfmch};A*>@ltmM-{6Su5 zVq@ZkKfoVle9!Dc>oQHe*_oYv=RMDyIj8;o=jSf~ckn!ml){xp(5g7T-w1ZyiqmpF z1^x%m{phwUEv_^xPlMon7HNgTJLiK_X*&L1<>k&hw-G9&yj=xVR~QVvu<0s{ZgfSj z!?x$|JyIBUcRhah0)N#BDJn#wgV1YMWQCHvNP@QKG!?SWLHIUk?<;SC7{UN1ER5oe!hl`c z%0pq&LKZohowJa~kj&0oI1#N~v~UtRg^>-A#0hIOWZEOm){&B7ouT;Gq@({^3hbChjH7j)V#9X~M@+z>0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R_#EvY+K^lo5o5>v+ zc|+l7wh3fs0tmkm2H66SgvUHOn(a8qZX(EIJc*KrZ-hp(9q-6<0(mh3g#RcEvKu^x Fy}xjR`~v_0 delta 35 rcmX@c^OA+@)W2Q(7#J8#85A~h^)OC8#^lGyI9Zgro|S=ti9sF!+<*z9 diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/model/Movie.class b/AmazonViewer/bin/com/anncode/amazonviewer/model/Movie.class index f36ecb5cfce25cf184d53a91f599f35dbe1ca2f4..b6887e2b4382618002c2a1853b17c0488b3bb97c 100644 GIT binary patch literal 986 zcmbVK%Wl&^6g}hk5nQ(kfs{hZqcoJn1-xQIP&ObWOMy+QNL@~yQ98&E$(gi*Z(@VQ zLt?=P@KK066DvVbsR&uJ?>%?Ux#!;TkDuSZ19*zigT>HIiY(%Jo)l9N@r=JO@-r#U zMHyv;q|xhwQV%x6{v{`0$uwiIoP2++h;25&CZvEU_j=$S^1k<7)LMRp>} zBYu(!hSsP^csk*w)OiKk>Qv4d4n~)(#w>Bb;3%neEHZ zl`L}d_0HI1V?yVr#raFFI76+cw?ae}(~>ERuh3NY12}LQHVHpkU4pJW2;i9t&AYDX zsbekVkBdc_2)anJ;TzLWv{CF4w?;pWMGr}vh=l0tP^Av7?Ng?zYBM~1^tf$*#YWh6 zzF_O4VYKMIWpsREY@mSv*9aRLr6#VUO&RD)wsC_Lb+ki~WuluDX%9`@qVu+iI@mQ1 zZsShn;E-_5Wb2l$0a~V2uq;-s81CX;MU3dHiB9+ldmkvUp#3h%?cd1GioAazx%(%1 s=R)!U9#)-)X06mJ?0iOd?b|nlcWA&}qp)pqceN&0-=%TgGj{vG01|eyO#lD@ literal 1360 zcma)*TTc^F5Xb+gx82s2OKCywMG@PDvWnt`A}SzQt(T;v3BDcL6Ijyjl4T3QM?ZsK zL}N>$i66iZWt?-COQ1aPvS)VY%*<~t=kLE?e*nzmt%eZ8WYuk0+;OUIO<26azqrnU zEe?feHAqvp-n;axA;QqJ%MZ9!=gzkEacfspeTI--V_-#wsBimq!H_JSUn={a?Q9pw zxGfxyj9S$b+;=?&z1H-&Z@Ugd^riR>w z`IL|LebF#5jTtJ^ZPKXHL7QyX`b1;#X*hy63L0h^1}@KRxoOvH!qah|TE8JDyO2O0 zbFym>Dby91xr)3oZ{RVWkQ3kA6Ale7f7R8Fft}Xi4)>?OTEECkaT*Cz&tF)4vv~{YeHHo~=Fp@2HW;q3;bu7D0 zuPWATIqZab6tglfCTK0f^qzEt5JilnklZD8(k7{s_DG$yMe3v-QfC*s)!C!;VT#m? zBz^lx`;Fqr+Zpp1DRa7o0duB>K{MaNu$hjuFlwfwEsTFx5hmz6MtOlAL?}v};&f4* zKBO>+G{(`7+hkn|V&V=a>5rl-R;DCL8&Z`MKuJOzmlJ1F8#p0-^gz! ztz$eee`27GM{PW9WAW7RDliOo7*+zqcpI++kMlkz6;+0qCoo5x?}$(K&Iodz&@#Ls HT?obhnf?-z diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/model/Serie.class b/AmazonViewer/bin/com/anncode/amazonviewer/model/Serie.class index d9c9476fc6a1a2f6a7dad4a2a734e4a85e0ff58b..57e6ab886d8c0c6aa653c2abc0e603cd2eccd562 100644 GIT binary patch delta 403 zcmXX=%TB^j6r9r+v=&-{g7`v1Ol*Cyas!49iAfVTE_B0+NTW>@46O@SenZ1=xG~X~ zxZnfax%XEzo_lF-a?i}YGiT;U`_-+lzt07L6YOSIhuWFjIzEfgfCQwLlk|;^y z>Ez;ZG)d$1iBPz{9X+JcjNlK?*-;xTd5>V6#*;Yh6METVFZ-@GLjQ`O4W{GBf{L;Y z3l59!g-?j}M#(YNYXBCRT+*Ls#pGBCG6K`E% zxy>xiRc>%_c;smxC?}a8XBtHwv`INQoqD vG8ASP>uk^@5@mFjZeTO7(BUbpdhmv=7X}JMt|1>QGS6NL@;pLIs&@VXHUl$| delta 364 zcmXX=K}y3w6n%d(jcpohYPD*$Y84@kLfmv$+_+I(xDc|?RkVYo)Cv+Rt~^7@6}*6p zAh_@Vf;aFWZWRAa!!YySfB(<>@3-_VozK7b4*)&vPMxsj4dY21j^goccz!)pHz`3R z0|K39FVsJjPbz-k>VjZT67{Hb>yqH4$(@P{!R{yHBt0Vd{`70F*Nq7B_s*5?4HEX%3%-DvDYIa6f*$;J|%Md8R=7d5|8ss^HPJz{;?_%EQH7pqP zjLr#p=OVuiR!8h38JB`LzWX^=f`c4uK|9C#tNGRDx5+!fF7gB($Eu^o1`R%&EC(|K ZY+;)#wlcxUFda=8rbAi0w8NFa&OgQcEN%b* diff --git a/AmazonViewer/src/com/anncode/amazonviewer/Main.java b/AmazonViewer/src/com/anncode/amazonviewer/Main.java index c1c74c5..8fd5457 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/Main.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/Main.java @@ -9,6 +9,7 @@ public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Movie movie =new Movie("Coco", "Animation",(short)2017); + movie.setTitle("Rambo"); movie.showData(); //showMenu(); diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Book.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Book.java index b622629..66f27f4 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Book.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Book.java @@ -18,6 +18,54 @@ public Book(String title, Date edititionDate, String editorial, String isbn) { this.editorial = editorial; this.isbn = isbn; } + public int getId() { + return id; + } + public void setId(int id) { + this.id = id; + } + public String getTitle() { + return title; + } + public void setTitle(String title) { + this.title = title; + } + public Date getEdititionDate() { + return edititionDate; + } + public void setEdititionDate(Date edititionDate) { + this.edititionDate = edititionDate; + } + public String getEditorial() { + return editorial; + } + public void setEditorial(String editorial) { + this.editorial = editorial; + } + public String[] getAuthors() { + return authors; + } + public void setAuthors(String[] authors) { + this.authors = authors; + } + public String getIsbn() { + return isbn; + } + public void setIsbn(String isbn) { + this.isbn = isbn; + } + public boolean isReaded() { + return readed; + } + public void setReaded(boolean readed) { + this.readed = readed; + } + public int getTimeReaded() { + return timeReaded; + } + public void setTimeReaded(int timeReaded) { + this.timeReaded = timeReaded; + } diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Chapter.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Chapter.java index 2d17a36..0dc6ab3 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Chapter.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Chapter.java @@ -15,6 +15,48 @@ public Chapter(String title, int duration, short year) { this.duration = duration; this.year = year; } + public int getId() { + return id; + } + public void setId(int id) { + this.id = id; + } + public String getTitle() { + return title; + } + public void setTitle(String title) { + this.title = title; + } + public int getDuration() { + return duration; + } + public void setDuration(int duration) { + this.duration = duration; + } + public short getYear() { + return year; + } + public void setYear(short year) { + this.year = year; + } + public boolean isViewed() { + return viewed; + } + public void setViewed(boolean viewed) { + this.viewed = viewed; + } + public int getTimeViewed() { + return timeViewed; + } + public void setTimeViewed(int timeViewed) { + this.timeViewed = timeViewed; + } + public int getSessionNumber() { + return sessionNumber; + } + public void setSessionNumber(int sessionNumber) { + this.sessionNumber = sessionNumber; + } diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Film.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Film.java new file mode 100644 index 0000000..670e534 --- /dev/null +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Film.java @@ -0,0 +1,62 @@ +package com.anncode.amazonviewer.model; + +public class Film { + + private String title; + private String genre; + private String creator; + private int duration; + private short year; + private boolean viewed; + + + + public Film(String title, String genre, String creator, int duration) { + super(); + this.title = title; + this.genre = genre; + this.creator = creator; + this.duration = duration; + } + + public String getTitle() { + return title; + } + public void setTitle(String title) { + this.title = title; + } + public String getGenre() { + return genre; + } + public void setGenre(String genre) { + this.genre = genre; + } + public String getCreator() { + return creator; + } + public void setCreator(String creator) { + this.creator = creator; + } + public int getDuration() { + return duration; + } + public void setDuration(int duration) { + this.duration = duration; + } + public short getYear() { + return year; + } + public void setYear(short year) { + this.year = year; + } + public boolean isViewed() { + return viewed; + } + public void setViewed(boolean viewed) { + this.viewed = viewed; + } + + + + +} diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Magazine.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Magazine.java index 7250566..020d284 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Magazine.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Magazine.java @@ -15,6 +15,46 @@ public Magazine(String title, Date edititionDate, String editorial) { this.edititionDate = edititionDate; this.editorial = editorial; } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public Date getEdititionDate() { + return edititionDate; + } + + public void setEdititionDate(Date edititionDate) { + this.edititionDate = edititionDate; + } + + public String getEditorial() { + return editorial; + } + + public void setEditorial(String editorial) { + this.editorial = editorial; + } + + public String[] getAuthors() { + return authors; + } + + public void setAuthors(String[] authors) { + this.authors = authors; + } diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java index 8de8422..432929e 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java @@ -1,41 +1,30 @@ package com.anncode.amazonviewer.model; -public class Movie { +public class Movie extends Film { private int id; - private String title; - private String genre; - private String creator; - private int duration; - private short year; - private boolean viewed; private int timeViewed; public Movie(String title, String genre, String creator, int duration, short year) { - super(); - this.title = title; - this.genre = genre; - this.creator = creator; - this.duration = duration; - this.year = year; - } - - public Movie(String title, String genre, short year) { - super(); - this.title = title; - this.genre = genre; - this.year = year; + super(title, genre, creator, duration); + setYear(year); } public void showData() { - System.out.println("Title:" + title); - System.out.println("Genre:" + genre); - System.out.println("Year:" + year); + //System.out.println("Title:" + title); + //System.out.println("Genre:" + genre); + //System.out.println("Year:" + year); } + public int getId() { + return id; + } + public int getTimeViewed() { + return timeViewed; + } + public void setTimeViewed(int timeViewed) { + this.timeViewed = timeViewed; + } - - - } diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java index f98401f..309624c 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java @@ -1,26 +1,22 @@ package com.anncode.amazonviewer.model; -public class Serie { +public class Serie extends Film { private int id; - private String title; - private String genre; - private String creator; - private int duration; - private short year; - private boolean viewed; - private int timeViewed; + private int sessionQuantity; + private Chapter[] chapter; - public Serie(String title, String genre, int duration) { - super(); - this.title = title; - this.genre = genre; - this.duration = duration; + + public Serie(String title, String genre, String creator, int duration, int sessionQuantity) { + super(title, genre, creator, duration); + // TODO Auto-generated constructor stub + this.sessionQuantity = sessionQuantity; + + } + + public int getId() { + return id; } - - //chapters[] - - - + } From 25ffa3e259271452a6172667195f2f517ef276c5 Mon Sep 17 00:00:00 2001 From: Anahi Salgado Date: Fri, 26 Jan 2018 09:15:11 -0500 Subject: [PATCH 22/44] Sobreescritura Polimorfismo --- .../bin/com/anncode/amazonviewer/Main.class | Bin 2332 -> 2499 bytes .../anncode/amazonviewer/model/Chapter.class | Bin 1847 -> 1445 bytes .../anncode/amazonviewer/model/Movie.class | Bin 986 -> 1557 bytes .../anncode/amazonviewer/model/Serie.class | Bin 765 -> 1791 bytes .../src/com/anncode/amazonviewer/Main.java | 8 ++- .../anncode/amazonviewer/model/Chapter.java | 68 ++++++------------ .../com/anncode/amazonviewer/model/Movie.java | 20 ++++++ .../com/anncode/amazonviewer/model/Serie.java | 30 +++++++- 8 files changed, 75 insertions(+), 51 deletions(-) diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/Main.class b/AmazonViewer/bin/com/anncode/amazonviewer/Main.class index ed7e1a081c5cdf909a49912dc112af6dbf70d0f0..988170a6995a7e6f2ef8538be2ce9d82fdb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+2e1W6*631`{fnHA2o4vOvhV?2}Di&SNsnQQJ?qTyA9NIU2ad$x#vC4InO!o+3$Zn z_zA!fltO3|*io{pal^7oc3H-as&U7*ZkY0>bmAGqv_j|**l^vrVZ(T$d$R zVD*S;neH)x_P+k2K*u;wN6?ON6sxdWV13%OWVTVAkxs#wsYrp&v|TbPMZ+1~eMFD8&6WE)V6Dji!dOTA*~cCBPS{@$WimqyvpFdz^<5c3JD zYuHEiU`)?T$COlKEcQ@LAG7UwYJ&pN!}K*~jXNZZmVA|8pVFLh-ej$&lV?87Vbu_%r!b69zMX(;Px6l2P| z){C*2j(T%4ili5&YRpSNtq@KLtn(;rxMn4O(r`J}69_B+Gs^!gDGpk_~&sGBs5&`E&1e>Z=tHH8=o_3u5`%tC04;B zPRTjLs)75^zU7ZLI>37kI;`REsP90zmRcC=us%3Ez>w;2454w^s1oEXo_6KrrAom9{9>@cMJQT~A$Vq^h{CWaR9Y7>JCIMKww0>+!z^AHo$_i=gw zsV25E$9qVtOtU^BwXVai zgEP=Eh21D{9^XYD-lNC+O!Wio$A?V!V+`UG9KfeIgwL4z7Z}2qIEuTB@HK|<4UXXl z-lZQ|&LhtJuPjNmYl}zjFPOwRY6VzCImb5Tz04v{`0wNi-WF}E)F=8UHnOF>zd=hS zPpg)8d#wq|Ej(TBAIs%-dF-Zm5Z*1MT;~ZU6uP diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/model/Chapter.class b/AmazonViewer/bin/com/anncode/amazonviewer/model/Chapter.class index bd558b2b579094108aa9466e41bccdf263dd8c35..b1ff7dafaf9c13bc691f63320ab54ad0f58194df 100644 GIT binary patch literal 1445 zcmbVMYfsZq7=F&!jZ$ut0RrOW<~A<%0*V`=FhHi$7)MC>Shi-=Y%S?JjDGS5`9TvM zi6;I4f0Xe#ZG{L#jA_#Ip7*?$=Xu`K{`mRzJAfrTiy! z>C$WcNZ0DRRny9@V_LQRzj%t}VrEw$Tp%V)`p_@X*EHPn zpP0jGuVrt^v<#oej=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id$XZG1=U)El0+wVX8^B;iASk57(Fx?4yb=UVh!K$vi zJ@<9szwq=+9oBpFbn9&$dOC-+!s%TiZ+qRILdsiJP)&vLzV7$Ez<)S!{m6@6DdaoP z-1SI@eTB-C)-Kf+;@CNb>^0B#qIre6a_hPK!mW2*f34n*LeF2D+l!~!tgI-c7dVfF z5$v~NVO*i{z2zz^qfj_tBZn;KYWws3`AZl?_D%$`=gCKMis``VXMkadC$s=X!$6Jg;qFNuIv;$hnm8n z?F`)-c->VU<}s@_(j38oIBdrVIWAj**30y>_dO3^WeVcE$6Xz z!#L!Ijhnbd$q7ZgM&GvJSrj}=3R6_=8(r^E3d>oD7bdRRv~f?`S|W7(kVi|www%Re zo#Ma;Hh#wx3o!8Gi?n`dqihPagF)EQ{0HDtT4sgMiYPeA;YRpxGlG;XA+41BYRs40 z!EcTc7RGqmyhTY=p<0`nEv4UKU$vCkK;f;)DDvEI>WwjXAI5q6fxdZDv4Ddp@dgwy zfkUh))?r#HV;!L-SPD4G__VPEONNn?m`V`T`IXE}^=};elST^CHfx**OglRcNZKi! z7@Azzo?IH5>==$@_Ib7vq}l4^7ZY2?dxSWTnhFzf)Te2)hEYL%3a5EWt*! zr#Lng$Qk^UByRz!ZD4wf`WVPb0y*^+AR?&%;Zh{E-jH&kbMaqP9~Wod;cRsi=QnYw z_%jdM4Y7ZX?dzLZDBh0kyW+ne+rQDji9fdHIL?tlyrb+?V6Q3eVi`4D!VGTEFG~@t MwD?J-M}~#=|4$2UGynhq delta 66 zcmV-I0KNbJ4gCcQ%Ko~(0000r03neIa0>@xXkl=4WpV)kDU*N#DY36g0h3e&I{^Zd YkOVye50lOWZUGXLJp~s900062AlPpbTmS$7 diff --git a/AmazonViewer/src/com/anncode/amazonviewer/Main.java b/AmazonViewer/src/com/anncode/amazonviewer/Main.java index 8fd5457..6827ff8 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/Main.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/Main.java @@ -8,9 +8,11 @@ public class Main { public static void main(String[] args) { // TODO Auto-generated method stub - Movie movie =new Movie("Coco", "Animation",(short)2017); - movie.setTitle("Rambo"); - movie.showData(); + //Movie movie =new Movie("Coco", "Animation",(short)2017); + //movie.setTitle("Rambo"); + //movie.showData(); + Movie movie = new Movie("Coco", "Animation", "", 120, (short)2017); + System.out.println(movie); //showMenu(); diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Chapter.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Chapter.java index 0dc6ab3..a92f29b 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Chapter.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Chapter.java @@ -1,63 +1,39 @@ package com.anncode.amazonviewer.model; -public class Chapter { +public class Chapter extends Movie { + private int id; - private String title; - private int duration; - private short year; - private boolean viewed; - private int timeViewed; private int sessionNumber; - public Chapter(String title, int duration, short year) { - super(); - this.title = title; - this.duration = duration; - this.year = year; + + public Chapter(String title, String genre, String creator, int duration, short year, int sessionNumber) { + super(title, genre, creator, duration, year); + // TODO Auto-generated constructor stub + this.setSessionNumber(sessionNumber); } + + @Override public int getId() { - return id; - } - public void setId(int id) { - this.id = id; - } - public String getTitle() { - return title; - } - public void setTitle(String title) { - this.title = title; - } - public int getDuration() { - return duration; - } - public void setDuration(int duration) { - this.duration = duration; - } - public short getYear() { - return year; - } - public void setYear(short year) { - this.year = year; - } - public boolean isViewed() { - return viewed; - } - public void setViewed(boolean viewed) { - this.viewed = viewed; - } - public int getTimeViewed() { - return timeViewed; - } - public void setTimeViewed(int timeViewed) { - this.timeViewed = timeViewed; + // TODO Auto-generated method stub + return this.id; } + public int getSessionNumber() { return sessionNumber; } + public void setSessionNumber(int sessionNumber) { this.sessionNumber = sessionNumber; } - + @Override + public String toString() { + // TODO Auto-generated method stub + return "\n :: CHAPTER ::" + + "\n Title: " + getTitle() + + "\n Year: " + getYear() + + "\n Creator: " + getCreator() + + "\n Duration: " + getDuration(); + } } diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java index 432929e..1987573 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java @@ -20,6 +20,8 @@ public void showData() { public int getId() { return id; } + + public int getTimeViewed() { return timeViewed; } @@ -27,4 +29,22 @@ public void setTimeViewed(int timeViewed) { this.timeViewed = timeViewed; } + @Override + public String toString() { + // TODO Auto-generated method stub + return "\n :: MOVIE ::" + + "\n Title: " + getTitle() + + "\n Genero: " + getGenre() + + "\n Year: " + getYear() + + "\n Creator: " + getCreator() + + "\n Duration: " + getDuration(); + } + } + + + + + + + diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java index 309624c..30ddae0 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java @@ -4,19 +4,45 @@ public class Serie extends Film { private int id; private int sessionQuantity; - private Chapter[] chapter; + private Chapter[] chapters; public Serie(String title, String genre, String creator, int duration, int sessionQuantity) { super(title, genre, creator, duration); // TODO Auto-generated constructor stub this.sessionQuantity = sessionQuantity; - } public int getId() { return id; } + public int getSessionQuantity() { + return sessionQuantity; + } + + public void setSessionQuantity(int sessionQuantity) { + this.sessionQuantity = sessionQuantity; + } + + public Chapter[] getChapters() { + return chapters; + } + + public void setChapters(Chapter[] chapters) { + this.chapters = chapters; + } + + @Override + public String toString() { + // TODO Auto-generated method stub + return "\n :: SERIE ::" + + "\n Title: " + getTitle() + + "\n Genero: " + getGenre() + + "\n Year: " + getYear() + + "\n Creator: " + getCreator() + + "\n Duration: " + getDuration(); + } + } From 337e7e2547e91603a43ab84ffe84be32000c9c56 Mon Sep 17 00:00:00 2001 From: Anahi Salgado Date: Fri, 26 Jan 2018 09:27:41 -0500 Subject: [PATCH 23/44] Herencia Polimorfismo Book Magazine --- .../bin/com/anncode/amazonviewer/Main.class | Bin 2499 -> 2499 bytes .../com/anncode/amazonviewer/model/Book.class | Bin 2218 -> 2170 bytes .../anncode/amazonviewer/model/Magazine.class | Bin 1606 -> 1120 bytes .../amazonviewer/model/Publication.class | Bin 0 -> 1422 bytes .../src/com/anncode/amazonviewer/Main.java | 3 - .../com/anncode/amazonviewer/model/Book.java | 74 ++++++++---------- .../anncode/amazonviewer/model/Magazine.java | 60 +++----------- .../amazonviewer/model/Publication.java | 49 ++++++++++++ 8 files changed, 96 insertions(+), 90 deletions(-) create mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/model/Publication.class create mode 100644 AmazonViewer/src/com/anncode/amazonviewer/model/Publication.java diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/Main.class b/AmazonViewer/bin/com/anncode/amazonviewer/Main.class index 988170a6995a7e6f2ef8538be2ce9d82fdb49d1c..4fb65d58dcc5d2078b62858999077255146cbd0d 100644 GIT binary patch delta 336 zcmW;G%PT~27{>AMnHtV9vzVODxDGK3ky}JjhZ3bh>U3OcGAOx>+h9RiP)d|iPD&|d zt)y65$do_CzhUF)w|Rf{etyr}Q+CVlTM%~=xFo43^`4L0)|pF;G*#44O|8~-v}$(H zKp%|^lVOY|ax@c2Lb9CG#s%$M>en@$+|b1>J>1dDy;2YK^T+^C4D!qnFS_!I&j%xX zGRimO{4hZRNJqaFC2vw4a@b6fVp?rx)L=IHvRk67O5Y2lp>$38vT>zrAyL+ zbXmG0T{XIA``(&#UAiINlx|6j(t@`u*_V_g2a-d{k;#Ql);f+(obJr2>6pY)Q%l*R KdABuV?EC|Av^O~b delta 336 zcmW;GT`L3u6vpxYY%MbgnP$q%Vu=f_mxz!l+z@$bT4A>~i;~@?&0BJTQlgYHDW#Na zCB>x++44br4L6?V=A1geb52jmF4=E>)T+j&h6e2SbksD?Tq4v{p+Oyus!g;Jql;$x zXPTuIc55K5n&r#{l;X^1u*}4D-YY&y4Yc$1CG}Fu|w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z<_zZJ};;bl1tTN=M`@iT*rz3m~*BO>{vr;klcHZoKsO|5Pt(y(S zT`_g6z*H)&G0dMMc(JJy$t?r7u}maHI80P&cMYtgKo`c3j)Y6x<@54qa7SEK4HhY+ zo4aEH6bwVjKv}gisMX|1gH7s%v81M{qjqkr)&J+Bu(uTU<0;y= ztwYfcs8sWxd1o==Bam46SR`pW8#qg`&Q%9E&3)DX_%rDd`C0W#2#ZdKUuaPf2#USISlXzQ8km z{BzuTTwxpwWZuyAib!KY!z{`IY27$3K%lB2k15{W(ojH=cS{$RnGEQy=WQ8445DPlKT|Jhr*eYRu!P3k03G`V73Ll!xTUxe|D-el@2k{yM8 zuIR@2%}7BBk)oQ=95yMD$=iSDv2blRI*}4t#dPJ!awua%Ei#Ozr$u?uu}EKEU(d6u z8wnHT8}De)Fe6Z;>>GJaPf&Bo;-S~?we5F`hcI*fNVoXup-ygTdg586xQVn&@koP} z1{$n1&S0gIv`$mTEavF9L??&z8Comm56qhz1KKnOsF|AsEPe~JZqsj#yg}I+$}CXs zEajFlk7bIQVLn!Hhfd@a)EB{y2~xq18PZhqF78E@Em~QXHNRu^3vE*1Qn?^l39PkH z5LpY{#{-Hm_CBfEIA<;ousQ?{%PkV_Qs7VvRX1?Cph;YK4G$x)QIN{l7|2Q@$Rn(e zfpG8QAgffaJ^_TM#2`A11dv)BWGxZI#6}WGEe@g+h%o_#hr}R_#EvY+K^lo5o5>v+ zc|+l7wh3fs0tmkm2H66SgvUHOn(a8qZX(EIJc*KrZ-hp(9q-6<0(mh3g#RcEvKu^x Fy}xjR`~v_0 diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/model/Publication.class b/AmazonViewer/bin/com/anncode/amazonviewer/model/Publication.class new file mode 100644 index 0000000000000000000000000000000000000000..eb8c06c6623269bcc7a2f89764717c256daf61e9 GIT binary patch literal 1422 zcma)4+iuf95IviV(-@byxfNOpErsH^N&SR)098UCjiMj8qs@P!cdN<$d{3a>pP!vX6BUeJ3aoo) ziq5J0t&9j{CZK7ge1|gxsWK#-DCrASS&-0jiZ)<3f4HmQ0uF}`!F33y~(K@Cbtb;=?^67 zrhS?$MdymNcl-bEDjBdg@}kqk!=}|)R!xY@8$>JT;(RTWNZ#G{x_(Wz=(b5z8C)Z! zoWq#VND0%)7-?O))#>#0^{iS}CudshU&nxsI|4dY-@w~e4w_r)C*gGBdhZn*Y%V;# zBYs)fBf=uR-4Y5sDT)d_r+B3)#Vd8Am0KHFr~h5r`GhOc+O&V7W*^Q_x4Sdi^=4>) zkE`y{zfGJ#jgThQZ%}0&4f^g=)=uiNg>BjqQ`}#~5i2Of5o;(?&j;8^J3F*8s%-y2 z{Tl@Za4RiNZpPF`0!XO^9^w&YSoSfYnOKV@&xPu7c8erz#|-TRbt6to#R=@jmND0& zkY-lMPOgy0*v}Kv%nI41c6%#?us7_$lUzsISt0wmLZ0S3vM{>DkpmL)Y=saW4GTFS nMB?tEBUV;OCs&A#!?gI;XsoOwT@un;A%x#23+d8O3h4a<+M4ks literal 0 HcmV?d00001 diff --git a/AmazonViewer/src/com/anncode/amazonviewer/Main.java b/AmazonViewer/src/com/anncode/amazonviewer/Main.java index 6827ff8..2661bb7 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/Main.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/Main.java @@ -8,9 +8,6 @@ public class Main { public static void main(String[] args) { // TODO Auto-generated method stub - //Movie movie =new Movie("Coco", "Animation",(short)2017); - //movie.setTitle("Rambo"); - //movie.showData(); Movie movie = new Movie("Coco", "Animation", "", 120, (short)2017); System.out.println(movie); diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Book.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Book.java index 66f27f4..1b7d5a6 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Book.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Book.java @@ -2,72 +2,66 @@ import java.util.Date; -public class Book { +public class Book extends Publication { private int id; - private String title; - private Date edititionDate; - private String editorial; - private String[] authors; private String isbn; private boolean readed; private int timeReaded; - public Book(String title, Date edititionDate, String editorial, String isbn) { - super(); - this.title = title; - this.edititionDate = edititionDate; - this.editorial = editorial; - this.isbn = isbn; + + + public Book(String title, Date edititionDate, String editorial, String[] authors) { + super(title, edititionDate, editorial); + // TODO Auto-generated constructor stub + setAuthors(authors); } + + public int getId() { return id; } - public void setId(int id) { - this.id = id; - } - public String getTitle() { - return title; - } - public void setTitle(String title) { - this.title = title; - } - public Date getEdititionDate() { - return edititionDate; - } - public void setEdititionDate(Date edititionDate) { - this.edititionDate = edititionDate; - } - public String getEditorial() { - return editorial; - } - public void setEditorial(String editorial) { - this.editorial = editorial; - } - public String[] getAuthors() { - return authors; - } - public void setAuthors(String[] authors) { - this.authors = authors; - } + + public String getIsbn() { return isbn; } + + public void setIsbn(String isbn) { this.isbn = isbn; } + + public boolean isReaded() { return readed; } + + public void setReaded(boolean readed) { this.readed = readed; } + + public int getTimeReaded() { return timeReaded; } + + public void setTimeReaded(int timeReaded) { this.timeReaded = timeReaded; } - - + @Override + public String toString() { + // TODO Auto-generated method stub + String detailBook = "\n :: BOOK ::" + + "\n Title: " + getTitle() + + "\n Editorial: " + getEditorial() + + "\n Edition Date: " + getEdititionDate() + + "\n Authors: "; + for (int i = 0; i < getAuthors().length; i++) { + detailBook += "\t" + getAuthors()[i]; + } + return detailBook; + } } diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Magazine.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Magazine.java index 020d284..8ce5c2c 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Magazine.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Magazine.java @@ -2,60 +2,26 @@ import java.util.Date; -public class Magazine { +public class Magazine extends Publication { + private int id; - private String title; - private Date edititionDate; - private String editorial; - private String[] authors; public Magazine(String title, Date edititionDate, String editorial) { - super(); - this.title = title; - this.edititionDate = edititionDate; - this.editorial = editorial; + super(title, edititionDate, editorial); + // TODO Auto-generated constructor stub } - + public int getId() { return id; } - - public void setId(int id) { - this.id = id; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public Date getEdititionDate() { - return edititionDate; - } - - public void setEdititionDate(Date edititionDate) { - this.edititionDate = edititionDate; - } - - public String getEditorial() { - return editorial; - } - - public void setEditorial(String editorial) { - this.editorial = editorial; - } - - public String[] getAuthors() { - return authors; - } - - public void setAuthors(String[] authors) { - this.authors = authors; - } - + @Override + public String toString() { + // TODO Auto-generated method stub + return "\n :: MAGAZINE ::" + + "\n Title: " + getTitle() + + "\n Editorial: " + getEditorial() + + "\n Edition Date: " + getEdititionDate(); + } } diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Publication.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Publication.java new file mode 100644 index 0000000..5e86bcf --- /dev/null +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Publication.java @@ -0,0 +1,49 @@ +package com.anncode.amazonviewer.model; + +import java.util.Date; + +public class Publication { + + private String title; + private Date edititionDate; + private String editorial; + private String[] authors; + + + + public Publication(String title, Date edititionDate, String editorial) { + super(); + this.title = title; + this.edititionDate = edititionDate; + this.editorial = editorial; + } + + + public String getTitle() { + return title; + } + public void setTitle(String title) { + this.title = title; + } + public Date getEdititionDate() { + return edititionDate; + } + public void setEdititionDate(Date edititionDate) { + this.edititionDate = edititionDate; + } + public String getEditorial() { + return editorial; + } + public void setEditorial(String editorial) { + this.editorial = editorial; + } + public String[] getAuthors() { + return authors; + } + public void setAuthors(String[] authors) { + this.authors = authors; + } + + + +} From 00069bdd387cb4973fa79ba5876a6afbbe5e9b31 Mon Sep 17 00:00:00 2001 From: Anahi Salgado Date: Fri, 26 Jan 2018 10:50:51 -0500 Subject: [PATCH 24/44] ArrayList Chapters --- .../bin/com/anncode/amazonviewer/Main.class | Bin 2499 -> 2660 bytes .../com/anncode/amazonviewer/model/Book.class | Bin 2170 -> 2594 bytes .../amazonviewer/model/IVisualizable.class | Bin 0 -> 254 bytes .../anncode/amazonviewer/model/Movie.class | Bin 1557 -> 2016 bytes .../amazonviewer/model/Publication.class | Bin 1422 -> 1422 bytes .../anncode/amazonviewer/model/Serie.class | Bin 1791 -> 2013 bytes .../src/com/anncode/amazonviewer/Main.java | 7 ++++++ .../com/anncode/amazonviewer/model/Book.java | 20 ++++++++++++++- .../amazonviewer/model/IVisualizable.java | 9 +++++++ .../com/anncode/amazonviewer/model/Movie.java | 23 +++++++++++++++++- .../amazonviewer/model/Publication.java | 1 - .../com/anncode/amazonviewer/model/Serie.java | 8 +++--- 12 files changed, 62 insertions(+), 6 deletions(-) create mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/model/IVisualizable.class create mode 100644 AmazonViewer/src/com/anncode/amazonviewer/model/IVisualizable.java diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/Main.class b/AmazonViewer/bin/com/anncode/amazonviewer/Main.class index 4fb65d58dcc5d2078b62858999077255146cbd0d..86347e61bd15e40ec05da730d74483e3f6ae9a5d 100644 GIT binary patch literal 2660 zcma)7Yi|=r6g}fSyfzL52SN!2HZ-Jpv^In!fD;H#;y@sdAx=#bUftMBvc%ps_L`Se zRJBs2O06nYs?>*6iBFbVsZvW7BB=TS)K==h=;!`}iayS)mn1-Oy7KOwxpQaExo7T- zfBXCXPXPK*^1>sqGi~LF7)e)Q)hrA2sj=P=|VfO%sNxPnL3XdSP0d%jyEb2`jB-Q(D20 zeb-rQFBnCE-4j(w3=kkkG6KyV=O$LkB<+G>&JT2^yx1(z_QExCB$o}xE#{@5$zhwe z6l@jnMNK28*@k5**d_o!8nIob&>}F<@jTT3@r)-sQ&NhT1K5dOluEx^(z48Q>)Hh? zLJoA!`k-Qu7p+gpoV;1I^;`h2pp6n+B`UtPf^Asg)6Cjt?z)y6@S`0aUc4&MEa#Bix_7`v48p*kP_0EJI zfrg~5r5EE`-rawtxL{q6>t;zozrgn4@z`W4HaR|;NUG6zbT%=mrp9AuV^fmyAxZi0 zGn7|KKml>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ode/amazonviewer/model/Book.class b/AmazonViewer/bin/com/anncode/amazonviewer/model/Book.class index 740241b85024bbb27a221c0d9afc6478b14ba419..557e044e9cd4701145ca13202bdbca388ab7b188 100644 GIT binary patch literal 2594 zcmbVM+fo}x5IrLV63c=ead8L)go%SLfNXGV%q=m#1seml2(fVzvXa)YAZdxTA{9U9 zM^cq4zvRKGise*NB|{ludA7FN{pyR0vo(1+}aYw91*HLS$vnI5bjuqqvhwJ0+{QGpEp2GL4)mz%2#Mu?ps6 z-_SO16)k5`;eM>q(X&(>E1$Y;IObd<;#s39zDX{(sDXwSM09kaTjBcux;?(BL7`Vi zA1;u0*>rAJoL#$AR_KeJ68hYVRWw&Cg^XF+@Dz%y*jXdLX_PGa_KiVj*WxvoR?bjc z%18lQ9m^55JI$QMEo&u$D4egCNTFRIHiP9ALdFr_?k043?T+azvn(yK_;Nc_y`&?A zF#W{tma``oZw6}@IQjD-wKB_k3Y>9J9M+bCrrSs8QFt#P=PKMs7 zHHd((>gW_wodh4Bu*k7x_jeJCb7m(++9m^6*XQCwuyE0G+Zc!PHm{lO}Fes=NiikYBrcHdi5GB7L&o5%skDB5t_}0WP_~0jQ0+3*BuCd1rqI&>82zvx$vsjwz+Bw>v2ppAu?H?#b{F^mvN~vHzRlW$NfFo-}m+_RjfzS+*k40O3T7ajEYzCSA0&t$d?{ydvMA} zd>>GQykYz85C8s^l(M(DJ(F;oe1_$@!S0x4E6yQ?c@}AgS}!ooMWnfI^R1TVjd}$A z!d}5;WZmYSW?^$oC;*cvw!`1J7Qz!X%+#J^$4^j1llBR?3{H0Ky%Qn@YHbtXfDO?{ z!NQ(@$9KL+BjZ)2=QCBPNnQklM3dW{rL0JG*{lnctd?>^?2E?51r$i6EqqdJXVSvs|+(hGW@vg@9F6P+JNi z>#)poEdSUzGO{(JzMCyN4XeJJQwTRqqiPCpM?rI}eeY$lg5PTq&6bGhm4*^NVmiNp!1 zNAgzPyxrU{n~iOwTr))xyJFNzM#GY`Zwxtm7Q@WuU!%1&g#r#ZmLsu-%&NsLl@~!2 zM!O|ahzi7JvYJA~X!AYYhc3hJn$8y65=3#5toQ3XNRp+`bDXb_6}d)Z51cBH%?Gr-alH!JQj6IkDx2 zcWiIYBDkP%rhED}n^vuAHU@D~VO)!^uEsYDg_~Tp__k=e8rQIloXkm5y1lMr1G8l9 z@*qI2FX_09P0q1#aA4LcSf*dCJwo}pbAz}_`da*2yEBqh;ku4bB$duo$5(^kTN?GS zY;#=t?7?s9$m13-efTS55Nmg-^Hzj*L1^FUVp}LbHY-l9x2+wvcNI=)aevl5fwp!2 zM`ksY@MQ#FkVLo6I_`mwJ91>ynr7jV!rZG8otTu`e8t~FRP^{-$3uL>hsFYrAKG{# z*>`lcs_7V3P2LCnE$UlzjLMT+#)1FBw4&W?RLtv^yql=t&I@O}!%RW`7DEWguyYrX zNp@EbrMq(8xXSS97~*%Br#*TMa2-yi=QGbRl9~*)5c|c&Pl(-(I>cBb^clq&+CKC= z@FpgC63ko7q}<(EOfj?A-lk0$4dWc9nMEP)vXrb@o&-OT`W5f~#7zK_EbJP`+$6dO z@RKOKhgn*>o#%e;a-Qt#oIuid-e4->7fz+0Vy;uC=339OvS~NMgoiq=G3=@-tW!w$ zAu``x#Y|r!=iSn!iVl&pPch$3Btas{6NpGVg~$he&TKG72g&*#($^KJsf1`!lvCp_~p_mV@ z|A-m!O8=@+~2fgVgP`iSoXYKjpaJpbXJKhx6opgS`uceqzL))zURs~o=^5?Dh9 zD_Fof{}&r5a(#$PZW(cppx@X9s%W^wyM%d^Sx^8K#^yNuh2;oJYMP~0X$ipm7ozm9 Ae*gdg diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/model/IVisualizable.class b/AmazonViewer/bin/com/anncode/amazonviewer/model/IVisualizable.class new file mode 100644 index 0000000000000000000000000000000000000000..e96d32c506fd93463b5ae224e204d32625d29414 GIT binary patch literal 254 zcmZXPJqp4=6ohB}i^fJgf;I-kt*mTC5Cn@z`j_~S4V$ban+P7w!UK3HaU(Wr`!T~e z^LXCw0G1efXbH>{lS#_+#2i^tMpu*9iZ5Kq%n>cOkt!?F>PoR@4;_I~N;OGM`AP2M zloKo9mzD~9Fd?(RWVU-JDyy_yljT+L3j_wGHRn%Z`d9eP2a$7xrYaKNDD52MuUU)6 Z*AozEyJtYlt?Z(QX03<5BTm?G_%HquMrr^6 literal 0 HcmV?d00001 diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/model/Movie.class b/AmazonViewer/bin/com/anncode/amazonviewer/model/Movie.class index abc0b0a13d1251dbb4ee40208d696e6c19aecdac..21f18a47d01de3945203fab0bc5a2b38fb577117 100644 GIT binary patch literal 2016 zcmbVM>uwuG7(KJTX1lrI<^m+No1{%0+o=nbUhHB@RC@+=aDTRORw0Yr(4{1xlJK1uzJePExX%GAt_KeUsy(JLeWEMJNm@=Sa zTA=iQ!>zY;2)tq-gR=suzVvsb<&hy95KY%@N8TUwcBR)0^UBoSw$*J}o~`zgGwwgM z`vPnAQ)(2Hy)2OMZC@2Bb3A1p?n%evVXEy(%XcXz-5Ge6Z@Uh4JqhHA2EF}ee7)T*4FiC%N)C6^M$-qQ#!hFXkD(jjGl=j`QB?7bA_2U{- z*brDa+P^ykyW5do8byJ5-7J;N?FX&eT^hRCRQZ-n9R<9pTK1N}+zBlUyK&Xv9Oo$` z&`qF%T{mz8H#tGp{=RgW<;F?)V_G9o|a><0-Vv!&9IYU%#RGz6|K&g(Loyb1q|J+ zMtu%1er(_qtS|sC9-JuZhJjoVpzm9r-*g+2)3OqkW8mA}BBw%@BUxhyC#1szN}353 zA3mDs`|f@eYxP*HqxV&#zQQ*td@V2)48kaufp3*)m0d%&U8mDmwf^2f7VD9MEzV@a zx7t5$Tl>))q&M7w*OvU+Fc&>|PcEytSSC2ee*zkRoM(RJG&Q|k)AZ{&!>7TW&pS!3 zGr4?WV=n$2lexLX5Hr6Ah*>_T7zw;Pfk{krH^*Hi#9$r^+!2je@fss4>vdXMU@g*8 z*cmL5H6B=R;2aqR&clop}$ za0r|jfiIp2UONh2IuXoPM9dXZsT7mB#b;O>>(&GBc_wHE5$3~NqcSCf7AVym#VFQK zL8E}`UnuNkE3i0^(uIv3-r$`=bdH_yTW*EyRvI8QgRh!P7~2`J4l b*obmDq9g$D_+i@0Fa;5$MP%RR|2r6q%>;33heKLJDbtF8bHo zLr{^+7BV`*eh(t5>#|B@gnl#bGc{$fKY}c1@t~h>=CpxMATYCP+i`CQ!j%)KU0DTw_wR z2JUhdP5Y7bWZ)|%+(8R-zw6K+NCVtV!?e{3L{}CpJitTFf>ff#ptx1Vr=<8S2@FuO zzf^rB&}rI>(IlgsWeZPKS(7>AfPspDW!j~9&e6qH3u~~MfERy9RO#myaymiP-wEoH z?~U7H>fO4khJs->*TJ`);Ex-iEzX<&X+{jF6)<@U<7jVw^2$_Savz=fzElg{pEM%N zZ@124648ksSU5%Byw22%)9B*~d^!C%!;H#0ODmzRbF>tPUYzIsq_!?#fE5J>F%&bH zq+cP$K}kgs$m&v76pTv=T!bA13;b92Qu)sq{y-x^NYo$5OYw}rsWy1zNbu;N;PXd< z$1omOp4YOnRQ|#jj2`edb>o9(rTmvE`WP2x9Mk+R P(0?FKsV&Y6jjsLz%B(OV diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/model/Publication.class b/AmazonViewer/bin/com/anncode/amazonviewer/model/Publication.class index eb8c06c6623269bcc7a2f89764717c256daf61e9..e8a8450ea3673e9ed77eaf01fba28e770a543c26 100644 GIT binary patch delta 105 zcmeC8UQEYNIvn{J611p2nl_1&XNx#ngaeZj2g})mUv=wSjycu$p>SegNAu6o&u+ delta 105 zcmeC8UQG9YYvn{I>11p2{o`1&XNw#ngdfZj73f)mUv=b%1SegNLs6qo=2 diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/model/Serie.class b/AmazonViewer/bin/com/anncode/amazonviewer/model/Serie.class index 19243b545e88381645be45f64e2eaad1af0637d9..3e938fc56f946e89618ea4dc3bb7a062fe9a527e 100644 GIT binary patch literal 2013 zcmbVMY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RRv~f?`S|W7(kVi|www%Re zo#Ma;Hh#wx3o!8Gi?n`dqihPagF)EQ{0HDtT4sgMiYPeA;YRpxGlG;XA+41BYRs40 z!EcTc7RGqmyhTY=p<0`nEv4UKU$vCkK;f;)DDvEI>WwjXAI5q6fxdZDv4Ddp@dgwy zfkUh))?r#HV;!L-SPD4G__VPEONNn?m`V`T`IXE}^=};elST^CHfx**OglRcNZKi! z7@Azzo?IH5>==$@_Ib7vq}l4^7ZY2?dxSWTnhFzf)Te2)hEYL%3a5EWt*! zr#Lng$Qk^UByRz!ZD4wf`WVPb0y*^+AR?&%;Zh{E-jH&kbMaqP9~Wod;cRsi=QnYw z_%jdM4Y7ZX?dzLZDBh0kyW+ne+rQDji9fdHIL?tlyrb+?V6Q3eVi`4D!VGTEFG~@t MwD?J-M}~#=|4$2UGynhq diff --git a/AmazonViewer/src/com/anncode/amazonviewer/Main.java b/AmazonViewer/src/com/anncode/amazonviewer/Main.java index 2661bb7..9401f69 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/Main.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/Main.java @@ -9,6 +9,13 @@ public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Movie movie = new Movie("Coco", "Animation", "", 120, (short)2017); + Movie movie2 = new Movie("Coco", "Animation", "", 120, (short)2017); + + if (movie.equals(movie)) { + System.out.println(true); + } else { + System.out.println(false); + } System.out.println(movie); //showMenu(); diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Book.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Book.java index 1b7d5a6..794fbeb 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Book.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Book.java @@ -2,7 +2,7 @@ import java.util.Date; -public class Book extends Publication { +public class Book extends Publication implements IVisualizable { private int id; private String isbn; private boolean readed; @@ -63,5 +63,23 @@ public String toString() { } return detailBook; } + + + @Override + public Date startToSee(Date dateI) { + // TODO Auto-generated method stub + return dateI; + } + + + @Override + public void stopToSee(Date dateI, Date dateF) { + // TODO Auto-generated method stub + if (dateF.getSeconds() > dateI.getSeconds()) { + setTimeReaded(dateF.getSeconds() - dateI.getSeconds()); + }else { + setTimeReaded(0); + } + } } diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/IVisualizable.java b/AmazonViewer/src/com/anncode/amazonviewer/model/IVisualizable.java new file mode 100644 index 0000000..6f0d4cb --- /dev/null +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/IVisualizable.java @@ -0,0 +1,9 @@ +package com.anncode.amazonviewer.model; + +import java.util.Date; + +public interface IVisualizable { + Date startToSee(Date dateI); + void stopToSee(Date dateI, Date dateF); + +} diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java index 1987573..3167742 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java @@ -1,6 +1,8 @@ package com.anncode.amazonviewer.model; -public class Movie extends Film { +import java.util.Date; + +public class Movie extends Film implements IVisualizable { private int id; private int timeViewed; @@ -39,6 +41,25 @@ public String toString() { "\n Creator: " + getCreator() + "\n Duration: " + getDuration(); } + + @Override + public Date startToSee(Date dateI) { + // TODO Auto-generated method stub + return dateI; + } + + @Override + public void stopToSee(Date dateI, Date dateF) { + // TODO Auto-generated method stub + + if (dateF.getSeconds() > dateI.getSeconds()) { + setTimeViewed(dateF.getSeconds() - dateI.getSeconds()); + }else { + setTimeViewed(0); + } + + + } } diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Publication.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Publication.java index 5e86bcf..22d2322 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Publication.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Publication.java @@ -10,7 +10,6 @@ public class Publication { private String[] authors; - public Publication(String title, Date edititionDate, String editorial) { super(); this.title = title; diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java index 30ddae0..3e302a4 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java @@ -1,10 +1,12 @@ package com.anncode.amazonviewer.model; +import java.util.ArrayList; + public class Serie extends Film { private int id; private int sessionQuantity; - private Chapter[] chapters; + private ArrayList chapters; public Serie(String title, String genre, String creator, int duration, int sessionQuantity) { @@ -25,11 +27,11 @@ public void setSessionQuantity(int sessionQuantity) { this.sessionQuantity = sessionQuantity; } - public Chapter[] getChapters() { + public ArrayList getChapters() { return chapters; } - public void setChapters(Chapter[] chapters) { + public void setChapters(ArrayList chapters) { this.chapters = chapters; } From af594ebfcd3d406d97330125e0384035405cf27c Mon Sep 17 00:00:00 2001 From: Anahi Salgado Date: Fri, 26 Jan 2018 11:17:57 -0500 Subject: [PATCH 25/44] Creando Imprimiendo Movies --- .../bin/com/anncode/amazonviewer/Main.class | Bin 2660 -> 3028 bytes .../com/anncode/amazonviewer/model/Film.class | Bin 1684 -> 1808 bytes .../anncode/amazonviewer/model/Movie.class | Bin 2016 -> 2606 bytes .../src/com/anncode/amazonviewer/Main.java | 21 +++++++++--------- .../com/anncode/amazonviewer/model/Film.java | 11 +++++++-- .../com/anncode/amazonviewer/model/Movie.java | 11 +++++++++ 6 files changed, 31 insertions(+), 12 deletions(-) diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/Main.class b/AmazonViewer/bin/com/anncode/amazonviewer/Main.class index 86347e61bd15e40ec05da730d74483e3f6ae9a5d..5d2d1f95428a3186c32f076a3d665c0d239493d7 100644 GIT binary patch literal 3028 zcmai0`%e^S6g{)7?Cd%|ih?iH!CDKbyNZu0APR~KF05q{3qFV40Y-Lb*4bSVtdCY} zYpb=|Hfh?V2|tmvNs~T;8#PU%X`A$4>3`7J+Vjl}FCVzc>^I-@+1hSau$+!rdHPx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M;N-UJcT!3TYGa8X>O}@&+Mq67tr% wko;$GAzQh}@)6J8X}6t4rp^ApCeg#1nKY=cS zMO_>Oaq}~YcpH~{-Z}T(bMC!!Z%WSh@B0T3&>lK%eP9tNuu)XUa4A{T6-NB^WU-;p z`{#gWAC2o}v73;PR8R{} z`D;=6mGBFNV0(iO($Pq5oI=Ku$WxPDk5gO5iZRIRK~zy!NAI3If+G_ NA80Dr7)!7MD*)X+5zqht diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/model/Movie.class b/AmazonViewer/bin/com/anncode/amazonviewer/model/Movie.class index 21f18a47d01de3945203fab0bc5a2b38fb577117..1da8f22a416bf6ae7a6443112e3bf2dca4221b45 100644 GIT binary patch delta 666 zcmZ`$%WhIp6kYrF!i8HXR7-7xCYYECXo8Jxv_h?~MiVhUT5Yf~=>d*-DRArMVe!?8 zetC8#L!GZpSi7`Glw*wP{lfCxZd#}CE%J~v{J7(_u`nU~X7Ej-s z9sSx!RjkV^cFU6WtW|Fi_Qey~vS^7^vtdZQveZ?|?lfN+<_lBIZMd;B`-PULzP6WlcIZlMRCJydy=?c48(7PG2zGmo@@u zqD2@I#UddR-+gLD)JmzV`LZlD(uvzEyte8(;)(xwA&W4cwF{zhOE{LuSLAYgLoW9d z!u%kSYi)?FscroP`PDal)*pl)BM2d+W;|tzsF$7$O{mWt52#7+ye9?^4ysk}^T{cm zJd7~n*pCFqBxY~~XE3F{d*^6c9XIl$CozmUOyCrvNF#;?_1c);@}qzvG)Vq54R;Y> z{KVTd#ydTfa$Q)L^~@V&lRZ$bhoiYY>s=g+cCgsN4VPE{;r3r1-i)q|8egMps*C#_ z)K{JnMSZV+e@MRL13Kgw!#Mi@&cTNZ2x1XSjH|eWh}+Y+eiIL{$;`xcw3!ngG7B*7 Y_8u|IyA|yxf(AnlYy6kpMh`ka<(i+k;y{r zHjLtv{eh$mkQAM~kX?gSo`ID?Ve&clR!LQ$YBdG{26YA*1`Qz8WH4dSVsKzkot(pA q$!IWn8Ap_3@HHMtr~;? diff --git a/AmazonViewer/src/com/anncode/amazonviewer/Main.java b/AmazonViewer/src/com/anncode/amazonviewer/Main.java index 9401f69..0431556 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/Main.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/Main.java @@ -1,5 +1,6 @@ package com.anncode.amazonviewer; +import java.util.ArrayList; import java.util.Date; import com.anncode.amazonviewer.model.Movie; @@ -8,17 +9,8 @@ public class Main { public static void main(String[] args) { // TODO Auto-generated method stub - Movie movie = new Movie("Coco", "Animation", "", 120, (short)2017); - Movie movie2 = new Movie("Coco", "Animation", "", 120, (short)2017); - if (movie.equals(movie)) { - System.out.println(true); - } else { - System.out.println(false); - } - System.out.println(movie); - - //showMenu(); + showMenu(); } @@ -77,10 +69,19 @@ public static void showMenu() { public static void showMovies() { int exit = 0; + ArrayList movies = Movie.makeMoviesList(); do { System.out.println(); System.out.println(":: MOVIES ::"); System.out.println(); + + for (int i = 0; i < movies.size(); i++) { //1. Movie 1 + System.out.println(i+1 + ". " + movies.get(i).getTitle() + " Visto: " + movies.get(i).isViewed()); + } + + System.out.println("0. Regresar al Menu"); + System.out.println(); + }while(exit !=0); } diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Film.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Film.java index 670e534..2cf5224 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Film.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Film.java @@ -49,8 +49,15 @@ public short getYear() { public void setYear(short year) { this.year = year; } - public boolean isViewed() { - return viewed; + public String isViewed() { + String visto = ""; + if(viewed == true) { + visto = "Sí"; + }else { + visto = "No"; + } + + return visto; } public void setViewed(boolean viewed) { this.viewed = viewed; diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java index 3167742..e955e03 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java @@ -1,5 +1,6 @@ package com.anncode.amazonviewer.model; +import java.util.ArrayList; import java.util.Date; public class Movie extends Film implements IVisualizable { @@ -61,6 +62,16 @@ public void stopToSee(Date dateI, Date dateF) { } + public static ArrayList makeMoviesList() { + ArrayList movies = new ArrayList(); + + for (int i = 1; i <= 5; i++) { + movies.add(new Movie("Movie " + i, "Genero " + i, "Creador " + i, 120+i, (short)(2017+i))); + } + + return movies; + } + } From 4d04f3463ba234136408ebb6fa4e1ee009f426fa Mon Sep 17 00:00:00 2001 From: Anahi Salgado Date: Fri, 26 Jan 2018 11:39:25 -0500 Subject: [PATCH 26/44] Leer Datos Consola --- .../bin/com/anncode/amazonviewer/Main.class | Bin 3028 -> 4002 bytes .../anncode/amazonviewer/model/Movie.class | Bin 2606 -> 2611 bytes .../src/com/anncode/amazonviewer/Main.java | 30 ++++++++++++++++-- .../com/anncode/amazonviewer/model/Movie.java | 4 +-- 4 files changed, 30 insertions(+), 4 deletions(-) diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/Main.class b/AmazonViewer/bin/com/anncode/amazonviewer/Main.class index 5d2d1f95428a3186c32f076a3d665c0d239493d7..81d813b5e9c7a682883dafb8c89205c1523ab41f 100644 GIT binary patch literal 4002 zcma)8?{^f{8Gi0&v%6Ub#2|z~kl~jm1QS3&n*f?Xz({^zHm(JvW!N3U!0yhvI~xeC zMZr=*t3^>OEiKg6RBLNNUAADwLVu|J(ogMad-@mjQ+xWQ=P2}fXC|8jFm%tEy>sup z_kG^`KF@pa{q)ND4*{&eAHxVJ%ud+pW+RhH*h#b5NE`d@%%ElNHFM3~hLs5;s4!)> zF=#ZWjLblD?~dJO!chpVvND#lMxmmph`m}LJGHbSsAmZkltbD`i&ha zQ=z)cP8g}Uk+Y=l4+foGR$gIF*Mvc|5+KcB6sFg2?HUax=H#r*Kx;!h3WeJ=R10z> zzsug+ZDtCbWaI|ued-P7RAD-1gi$kYaj~JiW2QCKVkQ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a47UKd{zsPM(80mGeiASD40bO^BtLskQolV~RTX~a=QOKJnFGSu9 zdFr;j&Q0Fkt-J_%QSxHs&5?J7y!f`fqno@BxAIctEs%GWyhZYs$h)>JuUl(();rUN epMLl3`ZrfooUYoN8?o#UuA_xtWS-#z!?$FTYS_3{d|aQa}L>5+MbqE#n7;chw#T3!91iGrQG z)vsnn-%v41H delta 424 zcmZ9G%Sr-a6vuxvjya7Jbg>dw^k!weI)^?-Ub8(pS>a654Hl`Q%VOuEOhKI$ ZDqM(aEoh>C&=JB>-kFuxOYu~$z5sqAQb+&* diff --git a/AmazonViewer/src/com/anncode/amazonviewer/Main.java b/AmazonViewer/src/com/anncode/amazonviewer/Main.java index 0431556..8db4c47 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/Main.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/Main.java @@ -2,6 +2,7 @@ import java.util.ArrayList; import java.util.Date; +import java.util.Scanner; import com.anncode.amazonviewer.model.Movie; @@ -30,7 +31,9 @@ public static void showMenu() { System.out.println("0. Exit"); //Leer la respuesta del usuario - int response = 1; + Scanner sc = new Scanner(System.in); + int response = Integer.valueOf(sc.nextLine()); + switch (response) { case 0: //salir @@ -68,7 +71,7 @@ public static void showMenu() { } public static void showMovies() { - int exit = 0; + int exit = 1; ArrayList movies = Movie.makeMoviesList(); do { System.out.println(); @@ -82,6 +85,29 @@ public static void showMovies() { System.out.println("0. Regresar al Menu"); System.out.println(); + //Leer Respuesta usuario + Scanner sc = new Scanner(System.in); + int response = Integer.valueOf(sc.nextLine()); + + if(response == 0) { + showMenu(); + } + + Movie movieSelected = movies.get(response-1); + movieSelected.setViewed(true); + Date dateI = movieSelected.startToSee(new Date()); + + for (int i = 0; i < 100000; i++) { + System.out.println(".........."); + } + + //Termine de verla + movieSelected.stopToSee(dateI, new Date()); + System.out.println(); + System.out.println("Viste: " + movieSelected); + System.out.println("Por: " + movieSelected.getTimeViewed() + " milisegundos"); + + }while(exit !=0); } diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java index e955e03..080b8ec 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java @@ -53,8 +53,8 @@ public Date startToSee(Date dateI) { public void stopToSee(Date dateI, Date dateF) { // TODO Auto-generated method stub - if (dateF.getSeconds() > dateI.getSeconds()) { - setTimeViewed(dateF.getSeconds() - dateI.getSeconds()); + if (dateF.getTime() > dateI.getTime()) { + setTimeViewed((int)(dateF.getTime() - dateI.getTime())); }else { setTimeViewed(0); } From b249265b7d7f63543ff110ac5c6db855dccd18d3 Mon Sep 17 00:00:00 2001 From: Anahi Salgado Date: Fri, 26 Jan 2018 14:18:46 -0500 Subject: [PATCH 27/44] Implementacion Ver Series y Chapters --- .../bin/com/anncode/amazonviewer/Main.class | Bin 4002 -> 5239 bytes .../anncode/amazonviewer/model/Chapter.class | Bin 1445 -> 2055 bytes .../anncode/amazonviewer/model/Serie.class | Bin 2013 -> 2800 bytes .../src/com/anncode/amazonviewer/Main.java | 56 +++++++++++++++++- .../anncode/amazonviewer/model/Chapter.java | 13 ++++ .../com/anncode/amazonviewer/model/Serie.java | 13 +++- 6 files changed, 79 insertions(+), 3 deletions(-) diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/Main.class b/AmazonViewer/bin/com/anncode/amazonviewer/Main.class index 81d813b5e9c7a682883dafb8c89205c1523ab41f..ff9660af75b6822384c8007a8cb2707d61d3d4b4 100644 GIT binary patch delta 1453 zcmY+Edr*{R6vlrquI{qCfo>8YB9fvADVkanB&CiG8Vw4L+MqQA%S8c=U3JRQovfU+ zvh?dR(3qsiOcygm7so4VD43RJXxh#0^;b>PO#e98^DPk5?96$;@0|0V^E}Tv-|kBJ zC*6In=kRf0I={8Jm%2P|+BxOqq+#r~p^2fIm1X|wtRjD1mEX&0RvBVyN>=zIjzE4@ zAn2mQ;LXk+T{Nd~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`;B91y#ZBr>gF^)a*WzPJQ@48 zKM)?v5gcY_jzsz3-|tyf6lpbR8mD4PQy!D=#mjLm?S%3t?Qi}n^U}WIuLzG9)TgA= z(r2X4N}rQHKc($ze<=LApuHe_QTCE-M)tDomAoC0eOu68lkJneE^Ev7%MQq{HMi{A YlDgnfelKo}UTE}#p5@O8MF*4r0EUW-;{X5v diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/model/Chapter.class b/AmazonViewer/bin/com/anncode/amazonviewer/model/Chapter.class index b1ff7dafaf9c13bc691f63320ab54ad0f58194df..f370c5135eb0e74f56d18f3d0a4544da370beb1e 100644 GIT binary patch delta 659 zcmZ`$!EO>!6g`)jmYFH&w6v(9CMHz`qLLU*ji9FKqEQB0fl|S$eGC(v7ActyMiLVi znz(Rf<`*<>bpufnH@fmK{EkNJ9jY5cH}BkY@45Hg^WOWZ*ShxO_m{5#uEP4Hy_5?2 zQ?X+$KM`%$a`p^+&n28lB#mwHOr$%m-Apezj_CS@3_&g0jh1jbjzw4+ugV&4^>{CH zGZVyJLS)Pw4SB4Epx_=sN+in)iUeg@v~9Pudq%-JA=t25mgAFC8VL7&wd(g(LwJBq z?i2MoVJ>mFXH&Eq>DAh{WxAPUm4}thzlK&9ZQ8QEOVIZrdvP0pZrT zrjfG6ebdN1TGo%BA-HzwvWfz#f; z-0dwu#aZY$hk3-2z z*$>F2hM>w2@ybkLfK;rH>wT<@cm&vsBF9h&3A4@EDV9V2hb=ZIjmX+lI delta 105 zcmZn{Sjx?H>ff$?3=9mW4Bi{LnwckyvYIloPWEOs=j3AGX5e8EWZ<3L&04`IG})0& zbh0FyI-?knWy>nXz{(&!xtXm}RFQ#`L5V?tL772@L4`qsL6yOTL2QBaH8t#2hkjICl@g7^ZcsrVX;g}yFfi>t|oZZ>xGbEiL| zpF7hp{a|M*ICZ8U`mukh)0gMm8xU|?wA0DV=G=4lob#OXJooNzfByUnfDt^%BBgM+ z+Nc-3FswEf{GwO)9yP)Tf&Y~s73=iWi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}-5$@rk^eORbQvORY>rX4C z?yLUip7GSu_9VTmiwk^Sq$i4_i?!vI)#=PLOx32dPf_|sM_=aiqQ<>Ij4A$#n5J(- zBNs7)S-yeZD|nrV%6fxVN?UWZ6sIEQ8K2RX;*@3Nn^=e$IQ&WpYMj)@>5(_Ql#}v46#KLTlxoLM(P!2n3?7H zk(ne>-W{yPZU0C#HSnF^;p~^*dxj5c$N2CVpOil3gZ3?DZy9^%7@w8CF!q- r=|9HT&pTY;P=G4eq(;G)Il2{8SoH?$-lkuzjp4L&s^d5GrSR?FNHMOE diff --git a/AmazonViewer/src/com/anncode/amazonviewer/Main.java b/AmazonViewer/src/com/anncode/amazonviewer/Main.java index 8db4c47..9ecbac0 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/Main.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/Main.java @@ -4,7 +4,9 @@ import java.util.Date; import java.util.Scanner; +import com.anncode.amazonviewer.model.Chapter; import com.anncode.amazonviewer.model.Movie; +import com.anncode.amazonviewer.model.Serie; public class Main { @@ -113,20 +115,70 @@ public static void showMovies() { } public static void showSeries() { - int exit = 0; + int exit = 1; + ArrayList series = Serie.makeSeriesList(); do { System.out.println(); System.out.println(":: SERIES ::"); System.out.println(); + + for (int i = 0; i < series.size(); i++) { //1. Serie 1 + System.out.println(i+1 + ". " + series.get(i).getTitle() + " Visto: " + series.get(i).isViewed()); + } + + System.out.println("0. Regresar al Menu"); + System.out.println(); + + //Leer Respuesta usuario + Scanner sc = new Scanner(System.in); + int response = Integer.valueOf(sc.nextLine()); + + if(response == 0) { + showMenu(); + } + + showChapters(series.get(response-1).getChapters()); + }while(exit !=0); } - public static void showChapters() { + public static void showChapters(ArrayList chaptersOfSerieSelected) { int exit = 0; + do { System.out.println(); System.out.println(":: CHAPTERS ::"); System.out.println(); + + + for (int i = 0; i < chaptersOfSerieSelected.size(); i++) { //1. Chapter 1 + System.out.println(i+1 + ". " + chaptersOfSerieSelected.get(i).getTitle() + " Visto: " + chaptersOfSerieSelected.get(i).isViewed()); + } + + System.out.println("0. Regresar al Menu"); + System.out.println(); + + //Leer Respuesta usuario + Scanner sc = new Scanner(System.in); + int response = Integer.valueOf(sc.nextLine()); + + if(response == 0) { + showSeries(); + } + + Chapter chapterSelected = chaptersOfSerieSelected.get(response-1); + chapterSelected.setViewed(true); + Date dateI = chapterSelected.startToSee(new Date()); + + for (int i = 0; i < 100000; i++) { + System.out.println(".........."); + } + + //Termine de verla + chapterSelected.stopToSee(dateI, new Date()); + System.out.println(); + System.out.println("Viste: " + chapterSelected); + System.out.println("Por: " + chapterSelected.getTimeViewed() + " milisegundos"); }while(exit !=0); } diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Chapter.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Chapter.java index a92f29b..1bbde81 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Chapter.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Chapter.java @@ -1,5 +1,7 @@ package com.anncode.amazonviewer.model; +import java.util.ArrayList; + public class Chapter extends Movie { @@ -36,4 +38,15 @@ public String toString() { "\n Creator: " + getCreator() + "\n Duration: " + getDuration(); } + + + public static ArrayList makeChaptersList() { + ArrayList chapters = new ArrayList(); + + for (int i = 1; i <= 5; i++) { + chapters.add(new Chapter("Capituo "+i, "genero "+i, "creator" +i, 45, (short)(2017+i), i)); + } + + return chapters; + } } diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java index 3e302a4..8f5a93c 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java @@ -9,10 +9,11 @@ public class Serie extends Film { private ArrayList chapters; - public Serie(String title, String genre, String creator, int duration, int sessionQuantity) { + public Serie(String title, String genre, String creator, int duration, int sessionQuantity, ArrayList chapters) { super(title, genre, creator, duration); // TODO Auto-generated constructor stub this.sessionQuantity = sessionQuantity; + this.chapters = chapters; } public int getId() { @@ -46,5 +47,15 @@ public String toString() { "\n Duration: " + getDuration(); } + public static ArrayList makeSeriesList() { + ArrayList series = new ArrayList(); + + for (int i = 1; i <= 5; i++) { + series.add(new Serie("Serie "+i, "genero "+i, "creador "+i, 1200, 5, Chapter.makeChaptersList())); + + } + + return series; + } } From 87d5d3e55a04f67ac6b68fbb90696a40a29684c3 Mon Sep 17 00:00:00 2001 From: Anahi Salgado Date: Fri, 26 Jan 2018 15:50:39 -0500 Subject: [PATCH 28/44] Escribir Archivos en Java --- MakeReport/.classpath | 10 +++ MakeReport/.project | 17 ++++ .../.settings/org.eclipse.jdt.core.prefs | 11 +++ .../bin/com/anncode/makereport/Main.class | Bin 0 -> 1199 bytes .../bin/com/anncode/makereport/Report.class | Bin 0 -> 2304 bytes MakeReport/reporte.txt | 7 ++ .../src/com/anncode/makereport/Main.java | 21 +++++ .../src/com/anncode/makereport/Report.java | 77 ++++++++++++++++++ 8 files changed, 143 insertions(+) create mode 100644 MakeReport/.classpath create mode 100644 MakeReport/.project create mode 100644 MakeReport/.settings/org.eclipse.jdt.core.prefs create mode 100644 MakeReport/bin/com/anncode/makereport/Main.class create mode 100644 MakeReport/bin/com/anncode/makereport/Report.class create mode 100644 MakeReport/reporte.txt create mode 100644 MakeReport/src/com/anncode/makereport/Main.java create mode 100644 MakeReport/src/com/anncode/makereport/Report.java diff --git a/MakeReport/.classpath b/MakeReport/.classpath new file mode 100644 index 0000000..6ee61f2 --- /dev/null +++ b/MakeReport/.classpath @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/MakeReport/.project b/MakeReport/.project new file mode 100644 index 0000000..bc4e452 --- /dev/null +++ b/MakeReport/.project @@ -0,0 +1,17 @@ + + + MakeReport + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/MakeReport/.settings/org.eclipse.jdt.core.prefs b/MakeReport/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..7e5c907 --- /dev/null +++ b/MakeReport/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=9 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=9 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=9 diff --git a/MakeReport/bin/com/anncode/makereport/Main.class b/MakeReport/bin/com/anncode/makereport/Main.class new file mode 100644 index 0000000000000000000000000000000000000000..41b5985413471ac8837f5d7735dac9acbd4df026 GIT binary patch literal 1199 zcmaJ=*-{fh6g`~;W-<&A!YU9JLC6A(`$7;E42mYf0*Wfir)Fs5Kr)jWCKMmwkND)X zFM}mjet>U&ga3ivo{1&0_%Pkmx9@V!y{EsQe*FgE9?A+L3`3?E>JjCt>^1BO)bKM?YizD7_O`qFQUf1zx6u4Py9nJoof zl;VmE>j4)H3B*gbq%xhxBl0bXYmlaVlNMyYuPX-R_NXbB* z0t-i;un#Q9Rx!%ZF+V@HUU;*%zFD9@O*)V3xGtSla^AGOYEXJo#|=!8vC=d$^rSNv z3oA%7^q(ia)Uc|%!qt$)jDp-h6AIg+V-|D7_K;T_V(lHn)LB;H6!VwV(=d&ja)tvc zZc}HpuzzBV$k5eYom6w5#?R|@Vec}`o=y8_A{S^h@#bZUhcd+@hT-(;#rkI*^EwuS z7I{vXST=J}#}nC1jheaa*wp%9AkTCxN!e*qz9D2%4R^MVZ6bVoZ22pDrk|7KvGclO}{-VBG zmklmi%SRskL%zA(XC?_D1YhRPoV(9C`+O#U|NG}(03PE=LyN+#l$(p0j+1iJRxD@k zTLmlc7QEO?|IiRpxVC2=n6a$sWMXUEdsfO*2s>uZTC}s4LU-cqdfhA7PA0C<=GmTH zYAM(8EQcB$))8Ndw(BUgKeZj(n^9;T9ZM>N=IL8UE4mEm=v26xupMi)l-srn8|HT4 z#7&vmq*<`#yCMvEyLM6GcH)0SAe+vN<*n8T_l}NTq}&08J_BuNC%jk>kBnYK3+phA zZb+1(deeX=s$r`7LIs`o^Fj22xNRUT2%U(Em>-hxAk#WA?-}Spue{wg&>y^gVBi*d zHH;}3exhwRCW+TDp>U%y^>ZaVo3;u%CK1yxb*^?naSS}bhb+v2nJrmsI|}#e;|uB= zZ;~J#<9HL z#P*DV&*UQPxq%@aqj;oYP9a*Kh_#ZJFL{JmW=_W}J{OV;3fC)CD*1|!B{h7ZFi_R4 z*V`=Eo@8wiOQQXiLjRd|JK_(s~kEtPePlx$*4!?(0hb+WX!aFnw09*4)kcm9OrIcN;pOzm$J%oKa@ z2mGkv)%k+|QuM5xf!Fwnqvn=4g^{3_nUfcR0m)iCjBPH0B_~s`ismp$45v*`o>q3) zETner16M~HI~q9BHCA;N3}hrE&1aS6gok$g-OyEYCoRiKY~67=u> zHAww+C6Nj(+r&g`nDbSjA4Q^PvDW2}cUSzht(bX#jmT_z20COm4bEn*2RWVVZmE!} zthvr$OsAwK7@<-tmuLtrvNHJABJ=N`oO1u9MV`{)+-ZCo{EG2ZJln>PapkQKyUJ&~ zFVu03??wQ?b#(KK=|(S~=aqj) Date: Fri, 26 Jan 2018 16:56:33 -0500 Subject: [PATCH 29/44] EscrituraArchivosDate --- AmazonViewer/.classpath | 1 + .../bin/com/anncode/amazonviewer/Main.class | Bin 5239 -> 7258 bytes .../com/anncode/amazonviewer/model/Book.class | Bin 2594 -> 3384 bytes .../com/anncode/amazonviewer/model/Film.class | Bin 1808 -> 1889 bytes .../anncode/amazonviewer/model/Movie.class | Bin 2611 -> 2543 bytes AmazonViewer/libs/makefile.jar | Bin 0 -> 2077 bytes AmazonViewer/reporte.txt | 13 +++ AmazonViewer/reporte2018-01-26.txt | 21 ++++ .../src/com/anncode/amazonviewer/Main.java | 108 +++++++++++++++--- .../com/anncode/amazonviewer/model/Book.java | 21 ++++ .../com/anncode/amazonviewer/model/Film.java | 4 + .../com/anncode/amazonviewer/model/Movie.java | 5 - MakeReport/.classpath | 10 -- MakeReport/.project | 17 --- .../.settings/org.eclipse.jdt.core.prefs | 11 -- .../bin/com/anncode/makereport/Main.class | Bin 1199 -> 0 bytes .../bin/com/anncode/makereport/Report.class | Bin 2304 -> 0 bytes MakeReport/reporte.txt | 7 -- .../src/com/anncode/makereport/Main.java | 21 ---- .../src/com/anncode/makereport/Report.java | 77 ------------- 20 files changed, 152 insertions(+), 164 deletions(-) create mode 100644 AmazonViewer/libs/makefile.jar create mode 100644 AmazonViewer/reporte.txt create mode 100644 AmazonViewer/reporte2018-01-26.txt delete mode 100644 MakeReport/.classpath delete mode 100644 MakeReport/.project delete mode 100644 MakeReport/.settings/org.eclipse.jdt.core.prefs delete mode 100644 MakeReport/bin/com/anncode/makereport/Main.class delete mode 100644 MakeReport/bin/com/anncode/makereport/Report.class delete mode 100644 MakeReport/reporte.txt delete mode 100644 MakeReport/src/com/anncode/makereport/Main.java delete mode 100644 MakeReport/src/com/anncode/makereport/Report.java diff --git a/AmazonViewer/.classpath b/AmazonViewer/.classpath index 6ee61f2..8da7346 100644 --- a/AmazonViewer/.classpath +++ b/AmazonViewer/.classpath @@ -6,5 +6,6 @@ + diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/Main.class b/AmazonViewer/bin/com/anncode/amazonviewer/Main.class index ff9660af75b6822384c8007a8cb2707d61d3d4b4..493b841899cc6260c7dc70a356c104729a3c4391 100644 GIT binary patch literal 7258 zcmbtZ33yc175?umnaS`1l7J)-WLT7tkOUA=lYk}=YDyNHU=-BqBYA{@S<;ya0!rOC zw6@i16_-M-rgc~B5XG&oUF@b^RBE-YR! zocs9xzK0$Kus|*K!KE;{D;B9XqtUKdw^eOM%+0arhLClp6|Zh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5Pw&pN2Kf*embRIsrJ(Ql+(n`8APEi^&U8@D1!Cz~aEb7VGk d!gR=Utm&y~k^;)4UUhAP!D%7~TSR1l`WG2ursMzs diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/model/Film.class b/AmazonViewer/bin/com/anncode/amazonviewer/model/Film.class index 13ff09ddd241777f3e78b3b4ac39d67030b2af59..6eb09f54508a86a1dae7faca0eda766f0cfa4432 100644 GIT binary patch delta 121 zcmbQh_mGe4)W2Q(7#J8#8QeBpTGb{5U zW;uNZMj&KhVAa~fV73OxU}BI3l5Ai>hshUMM46o!oF^BuicG%3Cdlf{z{=n->6#yHg7zY3V delta 60 zcmaFJH-V4q)W2Q(7#J8#8C*7UO=X(AnJJZ#ce5n(A?C>v>~gI346FraMI~<3jbU+J zxN=KOTtL*4NJ8SmjXUEnaAjPXxHTHjohfKsbnZRhIo~faZ{T@F8wmyU%`m}yzUC+_u7H~& zjnIFKD|xr0x`70ya~;H#1XFjuMdjvRC)Grqu*1baIS#Cn8)?QP$mSIPHuPX#{T2@D zDI89rG4D8iXx}3C?bg0Cg`T|A*1k{R1J-_s@D$E%?9D5qhX#0%iE`wk0xne24OF3# z%^3)v1t*iZCP_8wsp?*9STTfbER delta 1189 zcmZuwOHUI~6#nkCrNeMBh=7Cw7SIBvT2VxK2ngj3zIbRsgi!`s1gfPx1eCZjZitKP z!j&%BxR9uAB8fXUZcW^?bmb2)8qb|+D={wS-t+p-<2!eL9C??gefj9G}6SNY3^=g(TGMG-5Mpl z$kCEQkUeUsXd}Gl4jOvY3Tfx)K!CwXNu|~7b4X_Hl9{{3jIC^}mmy1YcSH?67D?jz zIR<2Ejc`eaipvaKa|f2AdMq4Svzqp7#@h2FGnoTAfLr%+C7cSUN`)s>MsYU}52N6n2DgPtxR8vA~cq7+DD$Bu5Bq zu|diMnp^fc9f_LMEJ;9?h7guHRi0DwuwrWjpf!VT> z^hz2=af4cAxQSr0`3)M#MujSTag5c__u>`uyeY+a7RS^MRIiP0$%V~aQ2~KKFP5VL zMQB6`nuz>Xv#6V5wkTh^YDKcDwB4cl3holv4yD9S!%f2=%M4i*%$l41Ojfyoi9LjZ z3C#7|n|Cna-2)4n1kV$}E{iQwU;IbEpFm+MAZN`rb=bM@ni2^_H_~pP}X3Bu%!@q5ML&6Cw7K@C=X0rr_}(LT$w( diff --git a/AmazonViewer/libs/makefile.jar b/AmazonViewer/libs/makefile.jar new file mode 100644 index 0000000000000000000000000000000000000000..fe69534e83e82e0978056916b7ccc83214662843 GIT binary patch literal 2077 zcmWIWW@Zs#;Nak3U~jVWVL$>R3@i-3t|5-Po_=onzK(vLZmz*0dcJP|PBAci_C0gj z$6HtLBCofu*10q1HwPJ9F@Es$(NiXd0B?4VP4!Igq=80B0&xJ`0*_i$3zUJf$@#hZ ziFtX+`6;RTxry1SMX3e(MJ4({U`j7JC$YG=Htc@5bf~~TJ(Zk@JWW<7W>&7NVRa%w z(b1wBVoDlj4!Rs}YfEq5X=zO{f0xJbf6>0EeqK4tre1FI06j5{Y=G>oY z@63(M)qeiIZ~vd^gM_*|`p_3ip>2U;r^7rAO484tmEMXdtF^byc7jVIM=F*bAM;CftZxPp$ zEZLOa^hWiOnY)ux$$KAP`ANAB!RlwKWo%ze%`dn7)x4eGqV2-!#5s-Ha?>VHJ7VHv zbSEcmTf|nc%7?FJI7J=)(t3}TqmTW^1gYYLDXWt99w=CExPQU^&4R3#3>)1y*{@`g zGv1K7^2dzF!ZlvJrdpzj&n1^F>MHdV-85(F&$C5m7EYhExJdWv`i>sk^B-rLsMM%` zxMbMoE+r-z)Y}@d{@2u1{sM_pN_8F-dlq#*bn{Sc2|RC7bI>3l-0WBG?rHj~xAlm= z{447Ge`mRJfa}Rip(~}uSGO|V-CkpRsCdmuj@LZ4&jp#3e|r7CE~7tjk)Y+2sFgRL z{BVo=y(6;7=2DLG@`uq~0pH^zjDSO1L7uQTL@jsFX=&UrIx+MoQqxa*SI$>sj8FSr8|S$>Lzs~ha> zSL)y~5%zQylI&44y5R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diff --git a/AmazonViewer/reporte.txt b/AmazonViewer/reporte.txt new file mode 100644 index 0000000..240f0b6 --- /dev/null +++ b/AmazonViewer/reporte.txt @@ -0,0 +1,13 @@ + + :: MOVIE :: + Title: Movie 3 + Genero: Genero 3 + Year: 2020 + Creator: Creador 3 + Duration: 123 + :: MOVIE :: + Title: Movie 4 + Genero: Genero 4 + Year: 2021 + Creator: Creador 4 + Duration: 124 \ No newline at end of file diff --git a/AmazonViewer/reporte2018-01-26.txt b/AmazonViewer/reporte2018-01-26.txt new file mode 100644 index 0000000..e6113df --- /dev/null +++ b/AmazonViewer/reporte2018-01-26.txt @@ -0,0 +1,21 @@ + + :: MOVIE :: + Title: Movie 2 + Genero: Genero 2 + Year: 2019 + Creator: Creador 2 + Duration: 122 + + :: MOVIE :: + Title: Movie 3 + Genero: Genero 3 + Year: 2020 + Creator: Creador 3 + Duration: 123 + + :: MOVIE :: + Title: Movie 5 + Genero: Genero 5 + Year: 2022 + Creator: Creador 5 + Duration: 125 diff --git a/AmazonViewer/src/com/anncode/amazonviewer/Main.java b/AmazonViewer/src/com/anncode/amazonviewer/Main.java index 9ecbac0..7486c2b 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/Main.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/Main.java @@ -1,12 +1,15 @@ package com.anncode.amazonviewer; +import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.Scanner; +import com.anncode.amazonviewer.model.Book; import com.anncode.amazonviewer.model.Chapter; import com.anncode.amazonviewer.model.Movie; import com.anncode.amazonviewer.model.Serie; +import com.anncode.makereport.Report; public class Main { @@ -35,11 +38,11 @@ public static void showMenu() { //Leer la respuesta del usuario Scanner sc = new Scanner(System.in); int response = Integer.valueOf(sc.nextLine()); - + System.out.println(response); switch (response) { case 0: //salir - + exit = 0; break; case 1: showMovies(); @@ -72,9 +75,10 @@ public static void showMenu() { }while(exit != 0); } + static ArrayList movies = Movie.makeMoviesList(); public static void showMovies() { int exit = 1; - ArrayList movies = Movie.makeMoviesList(); + do { System.out.println(); System.out.println(":: MOVIES ::"); @@ -92,23 +96,25 @@ public static void showMovies() { int response = Integer.valueOf(sc.nextLine()); if(response == 0) { + exit = 0; showMenu(); } - - Movie movieSelected = movies.get(response-1); - movieSelected.setViewed(true); - Date dateI = movieSelected.startToSee(new Date()); - - for (int i = 0; i < 100000; i++) { - System.out.println(".........."); + if (response > 0) { + Movie movieSelected = movies.get(response-1); + movieSelected.setViewed(true); + Date dateI = movieSelected.startToSee(new Date()); + + for (int i = 0; i < 100000; i++) { + System.out.println(".........."); + } + + //Termine de verla + movieSelected.stopToSee(dateI, new Date()); + System.out.println(); + System.out.println("Viste: " + movieSelected); + System.out.println("Por: " + movieSelected.getTimeViewed() + " milisegundos"); } - //Termine de verla - movieSelected.stopToSee(dateI, new Date()); - System.out.println(); - System.out.println("Viste: " + movieSelected); - System.out.println("Por: " + movieSelected.getTimeViewed() + " milisegundos"); - }while(exit !=0); @@ -184,10 +190,40 @@ public static void showChapters(ArrayList chaptersOfSerieSelected) { public static void showBooks() { int exit = 0; + ArrayList books= Book.makeBookList(); do { System.out.println(); System.out.println(":: BOOKS ::"); System.out.println(); + + for (int i = 0; i < books.size(); i++) { //1. Movie 1 + System.out.println(i+1 + ". " + books.get(i).getTitle() + " Visto: " + books.get(i).isReaded()); + } + + System.out.println("0. Regresar al Menu"); + System.out.println(); + + //Leer Respuesta usuario + Scanner sc = new Scanner(System.in); + int response = Integer.valueOf(sc.nextLine()); + + if(response == 0) { + showMenu(); + } + + Book bookSelected = books.get(response-1); + bookSelected.setReaded(true); + Date dateI = bookSelected.startToSee(new Date()); + + for (int i = 0; i < 100000; i++) { + System.out.println(".........."); + } + + //Termine de verla + bookSelected.stopToSee(dateI, new Date()); + System.out.println(); + System.out.println("Viste: " + bookSelected); + System.out.println("Por: " + bookSelected.getTimeReaded() + " milisegundos"); }while(exit !=0); } @@ -202,10 +238,41 @@ public static void showMagazines() { public static void makeReport() { + Report report = new Report(); + report.setNameFile("reporte"); + report.setExtension("txt"); + report.setTitle(":: VISTOS ::"); + String contentReport = ""; + + for (Movie movie : movies) { + if (movie.getIsViewed()) { + contentReport += movie.toString() + "\n"; + + } + } + report.setContent(contentReport); + report.makeReport(); + } public static void makeReport(Date date) { + SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); + String dateString = df.format(date); + Report report = new Report(); + report.setNameFile("reporte" + dateString); + report.setExtension("txt"); + report.setTitle(":: VISTOS ::"); + String contentReport = ""; + + for (Movie movie : movies) { + if (movie.getIsViewed()) { + contentReport += movie.toString() + "\n"; + + } + } + report.setContent(contentReport); + report.makeReport(); } } @@ -215,3 +282,12 @@ public static void makeReport(Date date) { + + + + + + + + + diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Book.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Book.java index 794fbeb..53c13db 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Book.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Book.java @@ -1,5 +1,6 @@ package com.anncode.amazonviewer.model; +import java.util.ArrayList; import java.util.Date; public class Book extends Publication implements IVisualizable { @@ -32,6 +33,13 @@ public void setIsbn(String isbn) { public boolean isReaded() { + String leido = ""; + if(readed == true) { + leido = "Sí"; + }else { + leido = "No"; + } + return readed; } @@ -82,4 +90,17 @@ public void stopToSee(Date dateI, Date dateF) { } } + public static ArrayList makeBookList() { + ArrayList books = new ArrayList(); + String[] authors = new String[3]; + for (int i = 0; i < 3; i++) { + authors[i] = "author "+i; + } + for (int i = 1; i <= 5; i++) { + books.add(new Book("Book " + i, new Date(), "editorial " + i, authors)); + } + + return books; + } + } diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Film.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Film.java index 2cf5224..4a6c4b4 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Film.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Film.java @@ -59,6 +59,10 @@ public String isViewed() { return visto; } + + public boolean getIsViewed() { + return viewed; + } public void setViewed(boolean viewed) { this.viewed = viewed; } diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java index 080b8ec..bacbcd1 100644 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java @@ -14,11 +14,6 @@ public Movie(String title, String genre, String creator, int duration, short yea setYear(year); } - public void showData() { - //System.out.println("Title:" + title); - //System.out.println("Genre:" + genre); - //System.out.println("Year:" + year); - } public int getId() { return id; diff --git a/MakeReport/.classpath b/MakeReport/.classpath deleted file mode 100644 index 6ee61f2..0000000 --- a/MakeReport/.classpath +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/MakeReport/.project b/MakeReport/.project deleted file mode 100644 index bc4e452..0000000 --- a/MakeReport/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - MakeReport - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/MakeReport/.settings/org.eclipse.jdt.core.prefs b/MakeReport/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 7e5c907..0000000 --- a/MakeReport/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=9 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=9 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=9 diff --git a/MakeReport/bin/com/anncode/makereport/Main.class b/MakeReport/bin/com/anncode/makereport/Main.class deleted file mode 100644 index 41b5985413471ac8837f5d7735dac9acbd4df026..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1199 zcmaJ=*-{fh6g`~;W-<&A!YU9JLC6A(`$7;E42mYf0*Wfir)Fs5Kr)jWCKMmwkND)X zFM}mjet>U&ga3ivo{1&0_%Pkmx9@V!y{EsQe*FgE9?A+L3`3?E>JjCt>^1BO)bKM?YizD7_O`qFQUf1zx6u4Py9nJoof zl;VmE>j4)H3B*gbq%xhxBl0bXYmlaVlNMyYuPX-R_NXbB* z0t-i;un#Q9Rx!%ZF+V@HUU;*%zFD9@O*)V3xGtSla^AGOYEXJo#|=!8vC=d$^rSNv z3oA%7^q(ia)Uc|%!qt$)jDp-h6AIg+V-|D7_K;T_V(lHn)LB;H6!VwV(=d&ja)tvc zZc}HpuzzBV$k5eYom6w5#?R|@Vec}`o=y8_A{S^h@#bZUhcd+@hT-(;#rkI*^EwuS z7I{vXST=J}#}nC1jheaa*wp%9AkTCxN!e*qz9D2%4R^MVZ6bVoZ22pDrk|7KvGclO}{-VBG zmklmi%SRskL%zA(XC?_D1YhRPoV(9C`+O#U|NG}(03PE=LyN+#l$(p0j+1iJRxD@k zTLmlc7QEO?|IiRpxVC2=n6a$sWMXUEdsfO*2s>uZTC}s4LU-cqdfhA7PA0C<=GmTH zYAM(8EQcB$))8Ndw(BUgKeZj(n^9;T9ZM>N=IL8UE4mEm=v26xupMi)l-srn8|HT4 z#7&vmq*<`#yCMvEyLM6GcH)0SAe+vN<*n8T_l}NTq}&08J_BuNC%jk>kBnYK3+phA zZb+1(deeX=s$r`7LIs`o^Fj22xNRUT2%U(Em>-hxAk#WA?-}Spue{wg&>y^gVBi*d zHH;}3exhwRCW+TDp>U%y^>ZaVo3;u%CK1yxb*^?naSS}bhb+v2nJrmsI|}#e;|uB= zZ;~J#<9HL z#P*DV&*UQPxq%@aqj;oYP9a*Kh_#ZJFL{JmW=_W}J{OV;3fC)CD*1|!B{h7ZFi_R4 z*V`=Eo@8wiOQQXiLjRd|JK_(s~kEtPePlx$*4!?(0hb+WX!aFnw09*4)kcm9OrIcN;pOzm$J%oKa@ z2mGkv)%k+|QuM5xf!Fwnqvn=4g^{3_nUfcR0m)iCjBPH0B_~s`ismp$45v*`o>q3) zETner16M~HI~q9BHCA;N3}hrE&1aS6gok$g-OyEYCoRiKY~67=u> zHAww+C6Nj(+r&g`nDbSjA4Q^PvDW2}cUSzht(bX#jmT_z20COm4bEn*2RWVVZmE!} zthvr$OsAwK7@<-tmuLtrvNHJABJ=N`oO1u9MV`{)+-ZCo{EG2ZJln>PapkQKyUJ&~ zFVu03??wQ?b#(KK=|(S~=aqj) Date: Thu, 15 Feb 2018 14:13:46 -0600 Subject: [PATCH 30/44] Modularizacion --- AmazonViewer/.classpath | 11 - AmazonViewer/.project | 17 - .../.settings/org.eclipse.jdt.core.prefs | 11 - .../bin/com/anncode/amazonviewer/Main.class | Bin 7258 -> 0 bytes .../com/anncode/amazonviewer/model/Book.class | Bin 3384 -> 0 bytes .../anncode/amazonviewer/model/Chapter.class | Bin 2055 -> 0 bytes .../com/anncode/amazonviewer/model/Film.class | Bin 1889 -> 0 bytes .../amazonviewer/model/IVisualizable.class | Bin 254 -> 0 bytes .../anncode/amazonviewer/model/Magazine.class | Bin 1120 -> 0 bytes .../anncode/amazonviewer/model/Movie.class | Bin 2543 -> 0 bytes .../amazonviewer/model/Publication.class | Bin 1422 -> 0 bytes .../anncode/amazonviewer/model/Serie.class | Bin 2800 -> 0 bytes AmazonViewer/libs/makefile.jar | Bin 2077 -> 0 bytes AmazonViewer/reporte.txt | 13 - AmazonViewer/reporte2018-01-26.txt | 21 - .../src/com/anncode/amazonviewer/Main.java | 293 ------------ .../com/anncode/amazonviewer/model/Book.java | 106 ----- .../anncode/amazonviewer/model/Chapter.java | 52 --- .../com/anncode/amazonviewer/model/Film.java | 73 --- .../amazonviewer/model/IVisualizable.java | 9 - .../anncode/amazonviewer/model/Magazine.java | 27 -- .../com/anncode/amazonviewer/model/Movie.java | 77 ---- .../amazonviewer/model/Publication.java | 48 -- .../com/anncode/amazonviewer/model/Serie.java | 61 --- Modularizacion/.idea/misc.xml | 6 + Modularizacion/.idea/modules.xml | 8 + Modularizacion/.idea/uiDesigner.xml | 124 ++++++ Modularizacion/.idea/workspace.xml | 420 ++++++++++++++++++ Modularizacion/Modularizacion.iml | 11 + .../Modularizacion/com/anncode/Main.class | Bin 0 -> 642 bytes .../anncode/internal/CalculadoraHelper.class | Bin 0 -> 425 bytes .../com/anncode/util/Calculadora.class | Bin 0 -> 653 bytes Modularizacion/src/com/anncode/Main.java | 12 + .../anncode/internal/CalculadoraHelper.java | 8 + .../src/com/anncode/util/Calculadora.java | 15 + 35 files changed, 604 insertions(+), 819 deletions(-) delete mode 100644 AmazonViewer/.classpath delete mode 100644 AmazonViewer/.project delete mode 100644 AmazonViewer/.settings/org.eclipse.jdt.core.prefs delete mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/Main.class delete mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/model/Book.class delete mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/model/Chapter.class delete mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/model/Film.class delete mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/model/IVisualizable.class delete mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/model/Magazine.class delete mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/model/Movie.class delete mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/model/Publication.class delete mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/model/Serie.class delete mode 100644 AmazonViewer/libs/makefile.jar delete mode 100644 AmazonViewer/reporte.txt delete mode 100644 AmazonViewer/reporte2018-01-26.txt delete mode 100644 AmazonViewer/src/com/anncode/amazonviewer/Main.java delete mode 100644 AmazonViewer/src/com/anncode/amazonviewer/model/Book.java delete mode 100644 AmazonViewer/src/com/anncode/amazonviewer/model/Chapter.java delete mode 100644 AmazonViewer/src/com/anncode/amazonviewer/model/Film.java delete mode 100644 AmazonViewer/src/com/anncode/amazonviewer/model/IVisualizable.java delete mode 100644 AmazonViewer/src/com/anncode/amazonviewer/model/Magazine.java delete mode 100644 AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java delete mode 100644 AmazonViewer/src/com/anncode/amazonviewer/model/Publication.java delete mode 100644 AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java create mode 100644 Modularizacion/.idea/misc.xml create mode 100644 Modularizacion/.idea/modules.xml create mode 100644 Modularizacion/.idea/uiDesigner.xml create mode 100644 Modularizacion/.idea/workspace.xml create mode 100644 Modularizacion/Modularizacion.iml create mode 100644 Modularizacion/out/production/Modularizacion/com/anncode/Main.class create mode 100644 Modularizacion/out/production/Modularizacion/com/anncode/internal/CalculadoraHelper.class create mode 100644 Modularizacion/out/production/Modularizacion/com/anncode/util/Calculadora.class create mode 100644 Modularizacion/src/com/anncode/Main.java create mode 100644 Modularizacion/src/com/anncode/internal/CalculadoraHelper.java create mode 100644 Modularizacion/src/com/anncode/util/Calculadora.java diff --git a/AmazonViewer/.classpath b/AmazonViewer/.classpath deleted file mode 100644 index 8da7346..0000000 --- a/AmazonViewer/.classpath +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/AmazonViewer/.project b/AmazonViewer/.project deleted file mode 100644 index b9f7f63..0000000 --- a/AmazonViewer/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - AmazonViewer - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/AmazonViewer/.settings/org.eclipse.jdt.core.prefs b/AmazonViewer/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 7e5c907..0000000 --- a/AmazonViewer/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=9 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=9 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=9 diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/Main.class b/AmazonViewer/bin/com/anncode/amazonviewer/Main.class deleted file mode 100644 index 493b841899cc6260c7dc70a356c104729a3c4391..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7258 zcmbtZ33yc175?umnaS`1l7J)-WLT7tkOUA=lYk}=YDyNHU=-BqBYA{@S<;ya0!rOC zw6@i16_-M-rgc~B5XG&oUF@b^RBE-YR! zocs9xzK0$Kus|*K!KE;{D;B9XqtUKdw^eOM%+0arhLClp6|ZhFLs1_*3WuySH<;C7 zGul(#wtAh_l~l-!#5gLUFuqye>`R8i)%EeXxv4pnNY*OkcZ7PPX0k7CDJ&XkOkMK< z9~|LQ!qqMEgxbZl<*(}shoYh6Vg+~EtWE{b5{?L<0AqX@tuW)GSTb-3#wv`CnCmTV zIw31nm{2xrq~+D-L!rok7kLU}nnO{mwJ);TimxzNhqhvlD zaHH73p$KrL$+aP(H08jX6_mM0PlT<)p=GDotI=q8B;%oIPwlME02gzZfhl6rpI93^ zv&D+`agrJDq4lB>=Hz2K4)=JP{#VWeaC;HSoH~fR+3M&%t);t zvlL1ini^X>8(W)}wsi#STk2P}wFWzz8c%9$51;~-KFsE$wfBe4Hc*9X1z)ci40BWC z%SPIhA9EGp$B_yZ9ah-t>I%i8X3z=;qfb5*vEs2{w-pSV!B}rs=*gW?UL`EE+w_yU z$e&vkw4Lb3QM{a273{F$B%~k55TPThf(^0QdR`G(V?M{4J?3WmkUfh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9)J=|)l(cJJA1=jdq1WXmZeZG?Hs3_=d|;kcA?WA z?X)#cTj#Wko%T4kyV0=nek|RE!m5IEWMo%<=?4xLx6zU{LJO& zD1H|4vxJ`}e%jo%{b(4#sr{%M!0G*1IDpmtm@@#YALRpB+m9K$v3}()L=nqi$^<#h_%XzD_xCUJNQH|-cq3C`Oy_DA-5={ES?wd82& z%{Y%UOFiB8qgpFHDSW-sabF6z)p*Oxe8yDeNwMG_&@J+xESkB|?-00FS6Ho`(Eb!S^^PGBi(O@5wlY z?OJ~KlBFAPI?lrxxB{zrPU*r`Ja=A$H9Tna;5LrB10f9X)c7dEED_hULhQvW_#9mt z$9qVq2{=_b@>3S06XhO8}3G@d8S5lHo6>4hm7?&Z$S)`Asvy0EU%pt_}q{{1fg9N>c ztC2AE^0{`H=4I$&+xKxWV`;7!rvWj|NkO(uS1!C=1}Ink4TySd@RbmKa?`m^&HBq)0NWW zbkcX|$R`=CPf;VDX797qi0@J(o~1_ofEw`}HR8vN@}H10&r>5_phoSJubhgaGA8g>0Qco)AVWqwCpe?3DRmpU}9Bc#o~{d6Qvo2?nz+(g<8QkFe@ zPMS6k>_?kCu}1Z_Ri+Gi|3hW=$&2~DY3A@PsLdSi)x}>xsjl=48c* zn*48a&RYzJx2d;(p!WTd0rw}pThTrjv9wiF$jky)$V|5K{i^fKKQn7dep$C$c~5+u#q&D^hB9c}i7h^ZGn`96V+F@ean|@05#osn7pF5dWg){~NW; z$|v#n89XIh^cBxOdS_CI`LSBfQFA#z$am}W)RElJd`wsKnTPE{Y#dyJtO7kg?be93I!QWEh>(*7#yqa@G8nkHAP#SAVmpIxes zRmTy4u{dAV6E+uhd$Wep&HA@PL+K&xGc}ZU`7&9cTn-;8>r)GeW-g}lShO_Iv`a1d EFSE-<%m4rY diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/model/Book.class b/AmazonViewer/bin/com/anncode/amazonviewer/model/Book.class deleted file mode 100644 index fb0cf1734a194ce68ea8d709e90c12fc8ed4274b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fksLkHDt;9n!W@W^20=i4Jw(_T6H?3H7Qt4cfK{e&d{Tg>)cqpd(Cakk1h6= zu;2&VevzE>UitOYx(V~Km`@uW4=lk_KFQm5M&hXD?lC;h$g*3;Gsic={Jea>9Gz~| z1Xr&t_Ay?#3GTE|aU=wJ5wcNgzGf5Dc$R-h?l_(S8;$ELcBa&Xj3WP5EQy-cL<0f|UGN+O)p?p=S7A*mVd z4hF`;yKiGptc1NK><NeK1er!NKSJ%;MPYVR?+KYBK3n0#wrCySB2`>`BO9BBe+wC|_(4yJY9b6u}jaT>ke!*5-kHztJTgTU_ zM|%lxP^Xlr;JZHkmzR3=#_m8FvrXQvnA|~u*Su>VzgIbq-^K?ed~`%E2;7+dEhZ9r z?e1E|ynqwT<0L!l6vEKhXQwD(8tak4X|6d;*l1()32^FthR^BK#5XdX6wbrPUHKCH mC^|xZK?`XW$Noz`2@~_+y@#+Lm;LxkX$^{^U-Q_5YySd_=gbiR diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/model/Chapter.class b/AmazonViewer/bin/com/anncode/amazonviewer/model/Chapter.class deleted file mode 100644 index f370c5135eb0e74f56d18f3d0a4544da370beb1e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2055 zcmbVNT~k|C6kR6-a=Bazqz$E}t+54~q(J;=6$w&l`avYLNRSFv?IF2CZyRnhH#a!= zf1T#x|Mp>&dF{0W!>Fz>@RFDx6Mc`S9mNNzU{>j6&QWN-laNI1tLyWKokY~ zn|8D5)ZKfn?M>Sg=$Um~$Db3JO_!d?9hs|1cPm%+J;&Y3zf7c9E@svQq6I=T(FMzb zfqsGf|E`x=Ga)cwVGu(CgH78nAH^I^>y`s0$F&0STP z`Q_EyD>Tj2svPwnt9G)qp?r{V{*X!%Yp zH}83JS1s_U^p>41SNbh=BIY~qntj=WHRn!e5AE>ZBIGpl*Ava-MuPr!@?(c$UIr)=#Gs3{^k?A;^#9PELI5~72cFYApB7T z)xx+ELny*11AmRGUwIO-}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er/model/Magazine.class b/AmazonViewer/bin/com/anncode/amazonviewer/model/Magazine.class deleted file mode 100644 index 138bf5717c42656a94a78cd17f245884293c9ee2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1120 zcmaizYi|-k6o%j7x~z*Jwxu_9>#eYbuD4nRV^Xym5?W14Nc7tPBTlpIHtSN8{w6tT)&;@u`YlJcc_2NPAtE~rtj3UdCS4gkXV@;(5BV{-9qxAR zgTR+=w;JyB1L@eWcpygp*@$A3A@-7BbVPB4c>ADL$2<%xzpsn zRQ_l)7JQPQ8H)7_z{gWo8RCHq!g@2T3~AAkbWZarScdF0K0``{ctqh)t*!`aq(Zb% ztfj!PXdsRRgBEz<_zZJ};;bl1tTN=M`@iT*rz3m~*BO>{vr;klcHZoKsO|5Pt(y(S zT`_g6z*H)&G0dMMc(JJy$t?r7u}maHI80P&cMYtgKo`c3j)Y6x<@54qa7SEK4HhY+ zo4aEH6bwVjKv}gisMX|1gH7s%v81M{qjqkr)&J+Bu(uTU<0;y= ztwYfcs8sWxd1o==Bam46SR`pWZOtR;md(Sz)^E>C<&F_Ez@+*LI z_%a4fpugajQ&y!?aEo@zDqBz7%0tI~WP7PHHKo*y%Vi7^fxbOXUU5q07@`8hdmPN< zoodZ0IZv#`k}aS)MFEi!Fnp(M=VfpzqGL|Q@y7+y1K9`GLn~FXDod%H?>UvF^nNs% z++bcHGQ}(mG@;FefrA30|JU7M-hjX%6CLOjh*fQW-nKkO7*K%@W}S+CvsPZTy}2N- zj;vd-N_oq3bYo6sh zZiTp36+Dqs=ll#gZ5kNNv@nTY6EWxltxL8)*Wg_4oHEg(c9`Dgj!ZHm+0=bEsDMD% zz~D|uF$@VD-d?UtHK$axJsl$gJw{@5G%+)q&s?TpB<5s#qX`2^q-2F&7wF!lLIL@2 zns^I?grRWLP@0`HaUO58VXT!EyTU9-cC+7sH3XH`@h&^hNL;lmw&zMDY&jES8*!-j zY#nSw-AKra2S+ANT*M_(PbfhjkldWaGcEC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WNT!{4CN6hqie0Vo<9qq=E$nRaWS2`pst0 z2yeE$Fb?8}3Rd;5w-ozPQ=xDAp7+2jw&I{xJRe2g!|9+ImlV1x!D8set;kn6oAl1u z^cE;4OpVewvt`DDFo?$$ZVZ}SH7{H&R^liK7fUbWDVLKll=3qQkN($`uh5nhPfw5= z8y(o;z(G!7^uMCX&vZdymxC-aV)Z+)&_(v9gV4X$s?Yn;ZEwCtI&#yEs#lxwqCnPd zXF9$ckj|r9v7%K(MmnhklT7o!o)2y=`k@e?twz2VHzF!#p%r;CMMPj5%RgLNg}|t| zOwDx+=F8H-VF#Va5HJ0e%@WKt6P)S6vJADG0d4iLrQL)1MD7*NC-1xhg{(y!&ui^z zv$yFu2&fB*Tdz<{l2~!Wh@MQZf?q%SEZ$p%%BIT*tko>6aU$q&ija8mpWhqMi< zWZ|rWZM&EJ(2p8|gv2hlxE`^VOUI4*O;8${Z{ z&t(Tva;?xx$yKTUc~NrL)^<0qO;U~??i1_Tn|Jm}%q`Y3vI9%b0oI;Q=j|0tp|Yh>lSf z!yM0XoMPQ`D6H#zvOUNye7J6Wv%2$N884mBJ;U7W3O>G)9{V2U!ZWB@jrKF59WbT! z+S|0QK40%hKenF2U%|a))b4z()PVKfUr!5yIIR`d&p84oIiV5C|1_`C5h5C0n=G$V nED;Y#@HKp?W$SV!lQnx0S556n{ehk==G5<);%-b|3a!5ZchY{P diff --git a/AmazonViewer/libs/makefile.jar b/AmazonViewer/libs/makefile.jar deleted file mode 100644 index fe69534e83e82e0978056916b7ccc83214662843..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2077 zcmWIWW@Zs#;Nak3U~jVWVL$>R3@i-3t|5-Po_=onzK(vLZmz*0dcJP|PBAci_C0gj z$6HtLBCofu*10q1HwPJ9F@Es$(NiXd0B?4VP4!Igq=80B0&xJ`0*_i$3zUJf$@#hZ ziFtX+`6;RTxry1SMX3e(MJ4({U`j7JC$YG=Htc@5bf~~TJ(Zk@JWW<7W>&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cw7h5y@nb24il=iRpR z@y&l~h97E!QbG*!&z~)H*ciC@*7eiXGtNa$(OQ~tdyc`mieo(?{X$jwo17CC7gZh- zF>3nZ+0~t)sW&_JtyHsJ>D>8`R=p^eDze(ScIi#q=wQ+NpkVQSFf;T%(9?~K_=1H4 z6f6Zr`B|ySC8ZP2@*PqTXgU8))91a|-pU1U9Uq_Vw&!oykhwy4LaUkGzJLuI)$XOG zrT=7z+W#xhmMLmw=*;(Bx%=3TZk@17^YibwTW&rtof_D@i}hV!f~D8vnw_V@LN>~+ zGOj+v+T-SaQsf8Y^;-T@p;Kz6@L!fR%lMQl*Zk(lRfg|sJDcN^y;>9!P0Uz7_(^fQ zYR4Qjtvcvt_LVVxM|{E!p2n=js@(o3`4w4TGR=F&))LYC%ij7NbJeTX&CkC6?Ctii zW(IjW_Pgt%{Xj1jf<4X1B*K8G1Cc8)P#uU0aMg$b-Uw4b6&-SF166bgkO*WFQSBic y2uh^L@dQew2=EQ)MnsZD*N5y?P%I(9G1H4&*JO-e5Sr}M>fx^TN;sF5u3R8vv diff --git a/AmazonViewer/reporte.txt b/AmazonViewer/reporte.txt deleted file mode 100644 index 240f0b6..0000000 --- a/AmazonViewer/reporte.txt +++ /dev/null @@ -1,13 +0,0 @@ - - :: MOVIE :: - Title: Movie 3 - Genero: Genero 3 - Year: 2020 - Creator: Creador 3 - Duration: 123 - :: MOVIE :: - Title: Movie 4 - Genero: Genero 4 - Year: 2021 - Creator: Creador 4 - Duration: 124 \ No newline at end of file diff --git a/AmazonViewer/reporte2018-01-26.txt b/AmazonViewer/reporte2018-01-26.txt deleted file mode 100644 index e6113df..0000000 --- a/AmazonViewer/reporte2018-01-26.txt +++ /dev/null @@ -1,21 +0,0 @@ - - :: MOVIE :: - Title: Movie 2 - Genero: Genero 2 - Year: 2019 - Creator: Creador 2 - Duration: 122 - - :: MOVIE :: - Title: Movie 3 - Genero: Genero 3 - Year: 2020 - Creator: Creador 3 - Duration: 123 - - :: MOVIE :: - Title: Movie 5 - Genero: Genero 5 - Year: 2022 - Creator: Creador 5 - Duration: 125 diff --git a/AmazonViewer/src/com/anncode/amazonviewer/Main.java b/AmazonViewer/src/com/anncode/amazonviewer/Main.java deleted file mode 100644 index 7486c2b..0000000 --- a/AmazonViewer/src/com/anncode/amazonviewer/Main.java +++ /dev/null @@ -1,293 +0,0 @@ -package com.anncode.amazonviewer; - -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.Scanner; - -import com.anncode.amazonviewer.model.Book; -import com.anncode.amazonviewer.model.Chapter; -import com.anncode.amazonviewer.model.Movie; -import com.anncode.amazonviewer.model.Serie; -import com.anncode.makereport.Report; - -public class Main { - - public static void main(String[] args) { - // TODO Auto-generated method stub - - showMenu(); - - } - - public static void showMenu() { - int exit = 0; - do { - - System.out.println("BIENVENIDOS AMAZON VIEWER"); - System.out.println(""); - System.out.println("Selecciona el número de la opción deseada"); - System.out.println("1. Movies"); - System.out.println("2. Series"); - System.out.println("3. Books"); - System.out.println("4. Magazines"); - System.out.println("5. Report"); - System.out.println("6. Report Today"); - System.out.println("0. Exit"); - - //Leer la respuesta del usuario - Scanner sc = new Scanner(System.in); - int response = Integer.valueOf(sc.nextLine()); - System.out.println(response); - switch (response) { - case 0: - //salir - exit = 0; - break; - case 1: - showMovies(); - break; - case 2: - showSeries(); - break; - case 3: - showBooks(); - break; - case 4: - showMagazines(); - break; - case 5: - makeReport(); - break; - case 6: - //Date date = new Date(); - makeReport(new Date()); - break; - - default: - System.out.println(); - System.out.println("....¡¡Selecciona una opción!!...."); - System.out.println(); - break; - } - - - }while(exit != 0); - } - - static ArrayList movies = Movie.makeMoviesList(); - public static void showMovies() { - int exit = 1; - - do { - System.out.println(); - System.out.println(":: MOVIES ::"); - System.out.println(); - - for (int i = 0; i < movies.size(); i++) { //1. Movie 1 - System.out.println(i+1 + ". " + movies.get(i).getTitle() + " Visto: " + movies.get(i).isViewed()); - } - - System.out.println("0. Regresar al Menu"); - System.out.println(); - - //Leer Respuesta usuario - Scanner sc = new Scanner(System.in); - int response = Integer.valueOf(sc.nextLine()); - - if(response == 0) { - exit = 0; - showMenu(); - } - if (response > 0) { - Movie movieSelected = movies.get(response-1); - movieSelected.setViewed(true); - Date dateI = movieSelected.startToSee(new Date()); - - for (int i = 0; i < 100000; i++) { - System.out.println(".........."); - } - - //Termine de verla - movieSelected.stopToSee(dateI, new Date()); - System.out.println(); - System.out.println("Viste: " + movieSelected); - System.out.println("Por: " + movieSelected.getTimeViewed() + " milisegundos"); - } - - - }while(exit !=0); - - } - - public static void showSeries() { - int exit = 1; - ArrayList series = Serie.makeSeriesList(); - do { - System.out.println(); - System.out.println(":: SERIES ::"); - System.out.println(); - - for (int i = 0; i < series.size(); i++) { //1. Serie 1 - System.out.println(i+1 + ". " + series.get(i).getTitle() + " Visto: " + series.get(i).isViewed()); - } - - System.out.println("0. Regresar al Menu"); - System.out.println(); - - //Leer Respuesta usuario - Scanner sc = new Scanner(System.in); - int response = Integer.valueOf(sc.nextLine()); - - if(response == 0) { - showMenu(); - } - - showChapters(series.get(response-1).getChapters()); - - }while(exit !=0); - } - - public static void showChapters(ArrayList chaptersOfSerieSelected) { - int exit = 0; - - do { - System.out.println(); - System.out.println(":: CHAPTERS ::"); - System.out.println(); - - - for (int i = 0; i < chaptersOfSerieSelected.size(); i++) { //1. Chapter 1 - System.out.println(i+1 + ". " + chaptersOfSerieSelected.get(i).getTitle() + " Visto: " + chaptersOfSerieSelected.get(i).isViewed()); - } - - System.out.println("0. Regresar al Menu"); - System.out.println(); - - //Leer Respuesta usuario - Scanner sc = new Scanner(System.in); - int response = Integer.valueOf(sc.nextLine()); - - if(response == 0) { - showSeries(); - } - - Chapter chapterSelected = chaptersOfSerieSelected.get(response-1); - chapterSelected.setViewed(true); - Date dateI = chapterSelected.startToSee(new Date()); - - for (int i = 0; i < 100000; i++) { - System.out.println(".........."); - } - - //Termine de verla - chapterSelected.stopToSee(dateI, new Date()); - System.out.println(); - System.out.println("Viste: " + chapterSelected); - System.out.println("Por: " + chapterSelected.getTimeViewed() + " milisegundos"); - }while(exit !=0); - } - - public static void showBooks() { - int exit = 0; - ArrayList books= Book.makeBookList(); - do { - System.out.println(); - System.out.println(":: BOOKS ::"); - System.out.println(); - - for (int i = 0; i < books.size(); i++) { //1. Movie 1 - System.out.println(i+1 + ". " + books.get(i).getTitle() + " Visto: " + books.get(i).isReaded()); - } - - System.out.println("0. Regresar al Menu"); - System.out.println(); - - //Leer Respuesta usuario - Scanner sc = new Scanner(System.in); - int response = Integer.valueOf(sc.nextLine()); - - if(response == 0) { - showMenu(); - } - - Book bookSelected = books.get(response-1); - bookSelected.setReaded(true); - Date dateI = bookSelected.startToSee(new Date()); - - for (int i = 0; i < 100000; i++) { - System.out.println(".........."); - } - - //Termine de verla - bookSelected.stopToSee(dateI, new Date()); - System.out.println(); - System.out.println("Viste: " + bookSelected); - System.out.println("Por: " + bookSelected.getTimeReaded() + " milisegundos"); - }while(exit !=0); - } - - public static void showMagazines() { - int exit = 0; - do { - System.out.println(); - System.out.println(":: MAGAZINES ::"); - System.out.println(); - }while(exit !=0); - } - - public static void makeReport() { - - Report report = new Report(); - report.setNameFile("reporte"); - report.setExtension("txt"); - report.setTitle(":: VISTOS ::"); - String contentReport = ""; - - for (Movie movie : movies) { - if (movie.getIsViewed()) { - contentReport += movie.toString() + "\n"; - - } - } - report.setContent(contentReport); - report.makeReport(); - - } - - public static void makeReport(Date date) { - SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); - String dateString = df.format(date); - Report report = new Report(); - - report.setNameFile("reporte" + dateString); - report.setExtension("txt"); - report.setTitle(":: VISTOS ::"); - String contentReport = ""; - - for (Movie movie : movies) { - if (movie.getIsViewed()) { - contentReport += movie.toString() + "\n"; - - } - } - report.setContent(contentReport); - report.makeReport(); - } - -} - - - - - - - - - - - - - - - diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Book.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Book.java deleted file mode 100644 index 53c13db..0000000 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Book.java +++ /dev/null @@ -1,106 +0,0 @@ -package com.anncode.amazonviewer.model; - -import java.util.ArrayList; -import java.util.Date; - -public class Book extends Publication implements IVisualizable { - private int id; - private String isbn; - private boolean readed; - private int timeReaded; - - - public Book(String title, Date edititionDate, String editorial, String[] authors) { - super(title, edititionDate, editorial); - // TODO Auto-generated constructor stub - setAuthors(authors); - } - - - public int getId() { - return id; - } - - - public String getIsbn() { - return isbn; - } - - - public void setIsbn(String isbn) { - this.isbn = isbn; - } - - - public boolean isReaded() { - String leido = ""; - if(readed == true) { - leido = "Sí"; - }else { - leido = "No"; - } - - return readed; - } - - - public void setReaded(boolean readed) { - this.readed = readed; - } - - - public int getTimeReaded() { - return timeReaded; - } - - - public void setTimeReaded(int timeReaded) { - this.timeReaded = timeReaded; - } - - @Override - public String toString() { - // TODO Auto-generated method stub - String detailBook = "\n :: BOOK ::" + - "\n Title: " + getTitle() + - "\n Editorial: " + getEditorial() + - "\n Edition Date: " + getEdititionDate() + - "\n Authors: "; - for (int i = 0; i < getAuthors().length; i++) { - detailBook += "\t" + getAuthors()[i]; - } - return detailBook; - } - - - @Override - public Date startToSee(Date dateI) { - // TODO Auto-generated method stub - return dateI; - } - - - @Override - public void stopToSee(Date dateI, Date dateF) { - // TODO Auto-generated method stub - if (dateF.getSeconds() > dateI.getSeconds()) { - setTimeReaded(dateF.getSeconds() - dateI.getSeconds()); - }else { - setTimeReaded(0); - } - } - - public static ArrayList makeBookList() { - ArrayList books = new ArrayList(); - String[] authors = new String[3]; - for (int i = 0; i < 3; i++) { - authors[i] = "author "+i; - } - for (int i = 1; i <= 5; i++) { - books.add(new Book("Book " + i, new Date(), "editorial " + i, authors)); - } - - return books; - } - -} diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Chapter.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Chapter.java deleted file mode 100644 index 1bbde81..0000000 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Chapter.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.anncode.amazonviewer.model; - -import java.util.ArrayList; - -public class Chapter extends Movie { - - - private int id; - private int sessionNumber; - - public Chapter(String title, String genre, String creator, int duration, short year, int sessionNumber) { - super(title, genre, creator, duration, year); - // TODO Auto-generated constructor stub - this.setSessionNumber(sessionNumber); - } - - @Override - public int getId() { - // TODO Auto-generated method stub - return this.id; - } - - public int getSessionNumber() { - return sessionNumber; - } - - public void setSessionNumber(int sessionNumber) { - this.sessionNumber = sessionNumber; - } - - - @Override - public String toString() { - // TODO Auto-generated method stub - return "\n :: CHAPTER ::" + - "\n Title: " + getTitle() + - "\n Year: " + getYear() + - "\n Creator: " + getCreator() + - "\n Duration: " + getDuration(); - } - - - public static ArrayList makeChaptersList() { - ArrayList chapters = new ArrayList(); - - for (int i = 1; i <= 5; i++) { - chapters.add(new Chapter("Capituo "+i, "genero "+i, "creator" +i, 45, (short)(2017+i), i)); - } - - return chapters; - } -} diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Film.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Film.java deleted file mode 100644 index 4a6c4b4..0000000 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Film.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.anncode.amazonviewer.model; - -public class Film { - - private String title; - private String genre; - private String creator; - private int duration; - private short year; - private boolean viewed; - - - - public Film(String title, String genre, String creator, int duration) { - super(); - this.title = title; - this.genre = genre; - this.creator = creator; - this.duration = duration; - } - - public String getTitle() { - return title; - } - public void setTitle(String title) { - this.title = title; - } - public String getGenre() { - return genre; - } - public void setGenre(String genre) { - this.genre = genre; - } - public String getCreator() { - return creator; - } - public void setCreator(String creator) { - this.creator = creator; - } - public int getDuration() { - return duration; - } - public void setDuration(int duration) { - this.duration = duration; - } - public short getYear() { - return year; - } - public void setYear(short year) { - this.year = year; - } - public String isViewed() { - String visto = ""; - if(viewed == true) { - visto = "Sí"; - }else { - visto = "No"; - } - - return visto; - } - - public boolean getIsViewed() { - return viewed; - } - public void setViewed(boolean viewed) { - this.viewed = viewed; - } - - - - -} diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/IVisualizable.java b/AmazonViewer/src/com/anncode/amazonviewer/model/IVisualizable.java deleted file mode 100644 index 6f0d4cb..0000000 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/IVisualizable.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.anncode.amazonviewer.model; - -import java.util.Date; - -public interface IVisualizable { - Date startToSee(Date dateI); - void stopToSee(Date dateI, Date dateF); - -} diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Magazine.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Magazine.java deleted file mode 100644 index 8ce5c2c..0000000 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Magazine.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.anncode.amazonviewer.model; - -import java.util.Date; - -public class Magazine extends Publication { - - private int id; - - public Magazine(String title, Date edititionDate, String editorial) { - super(title, edititionDate, editorial); - // TODO Auto-generated constructor stub - } - - public int getId() { - return id; - } - - @Override - public String toString() { - // TODO Auto-generated method stub - return "\n :: MAGAZINE ::" + - "\n Title: " + getTitle() + - "\n Editorial: " + getEditorial() + - "\n Edition Date: " + getEdititionDate(); - } - -} diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java deleted file mode 100644 index bacbcd1..0000000 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java +++ /dev/null @@ -1,77 +0,0 @@ -package com.anncode.amazonviewer.model; - -import java.util.ArrayList; -import java.util.Date; - -public class Movie extends Film implements IVisualizable { - - private int id; - private int timeViewed; - - - public Movie(String title, String genre, String creator, int duration, short year) { - super(title, genre, creator, duration); - setYear(year); - } - - - public int getId() { - return id; - } - - - public int getTimeViewed() { - return timeViewed; - } - public void setTimeViewed(int timeViewed) { - this.timeViewed = timeViewed; - } - - @Override - public String toString() { - // TODO Auto-generated method stub - return "\n :: MOVIE ::" + - "\n Title: " + getTitle() + - "\n Genero: " + getGenre() + - "\n Year: " + getYear() + - "\n Creator: " + getCreator() + - "\n Duration: " + getDuration(); - } - - @Override - public Date startToSee(Date dateI) { - // TODO Auto-generated method stub - return dateI; - } - - @Override - public void stopToSee(Date dateI, Date dateF) { - // TODO Auto-generated method stub - - if (dateF.getTime() > dateI.getTime()) { - setTimeViewed((int)(dateF.getTime() - dateI.getTime())); - }else { - setTimeViewed(0); - } - - - } - - public static ArrayList makeMoviesList() { - ArrayList movies = new ArrayList(); - - for (int i = 1; i <= 5; i++) { - movies.add(new Movie("Movie " + i, "Genero " + i, "Creador " + i, 120+i, (short)(2017+i))); - } - - return movies; - } - -} - - - - - - - diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Publication.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Publication.java deleted file mode 100644 index 22d2322..0000000 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Publication.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.anncode.amazonviewer.model; - -import java.util.Date; - -public class Publication { - - private String title; - private Date edititionDate; - private String editorial; - private String[] authors; - - - public Publication(String title, Date edititionDate, String editorial) { - super(); - this.title = title; - this.edititionDate = edititionDate; - this.editorial = editorial; - } - - - public String getTitle() { - return title; - } - public void setTitle(String title) { - this.title = title; - } - public Date getEdititionDate() { - return edititionDate; - } - public void setEdititionDate(Date edititionDate) { - this.edititionDate = edititionDate; - } - public String getEditorial() { - return editorial; - } - public void setEditorial(String editorial) { - this.editorial = editorial; - } - public String[] getAuthors() { - return authors; - } - public void setAuthors(String[] authors) { - this.authors = authors; - } - - - -} diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java deleted file mode 100644 index 8f5a93c..0000000 --- a/AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.anncode.amazonviewer.model; - -import java.util.ArrayList; - -public class Serie extends Film { - - private int id; - private int sessionQuantity; - private ArrayList chapters; - - - public Serie(String title, String genre, String creator, int duration, int sessionQuantity, ArrayList chapters) { - super(title, genre, creator, duration); - // TODO Auto-generated constructor stub - this.sessionQuantity = sessionQuantity; - this.chapters = chapters; - } - - public int getId() { - return id; - } - - public int getSessionQuantity() { - return sessionQuantity; - } - - public void setSessionQuantity(int sessionQuantity) { - this.sessionQuantity = sessionQuantity; - } - - public ArrayList getChapters() { - return chapters; - } - - public void setChapters(ArrayList chapters) { - this.chapters = chapters; - } - - @Override - public String toString() { - // TODO Auto-generated method stub - return "\n :: SERIE ::" + - "\n Title: " + getTitle() + - "\n Genero: " + getGenre() + - "\n Year: " + getYear() + - "\n Creator: " + getCreator() + - "\n Duration: " + getDuration(); - } - - public static ArrayList makeSeriesList() { - ArrayList series = new ArrayList(); - - for (int i = 1; i <= 5; i++) { - series.add(new Serie("Serie "+i, "genero "+i, "creador "+i, 1200, 5, Chapter.makeChaptersList())); - - } - - return series; - } - -} diff --git a/Modularizacion/.idea/misc.xml b/Modularizacion/.idea/misc.xml new file mode 100644 index 0000000..8e8843c --- /dev/null +++ b/Modularizacion/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Modularizacion/.idea/modules.xml b/Modularizacion/.idea/modules.xml new file mode 100644 index 0000000..371ea6f --- /dev/null +++ b/Modularizacion/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Modularizacion/.idea/uiDesigner.xml b/Modularizacion/.idea/uiDesigner.xml new file mode 100644 index 0000000..e96534f --- /dev/null +++ b/Modularizacion/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Modularizacion/.idea/workspace.xml b/Modularizacion/.idea/workspace.xml new file mode 100644 index 0000000..a250880 --- /dev/null +++ b/Modularizacion/.idea/workspace.xml @@ -0,0 +1,420 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -133,7 +141,15 @@ - + + + + + + + + + - + + + + + + + @@ -248,9 +283,14 @@ + + + + - - + + + @@ -271,34 +311,34 @@ - + - + - - - - - - - - - - - - + + + + + + + + + + + - - + + - + - - + + + @@ -309,17 +349,41 @@ - + - - + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + @@ -328,19 +392,85 @@ + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + diff --git a/Modularizacion/anncode.main/anncode.main.iml b/Modularizacion/anncode.main/anncode.main.iml new file mode 100644 index 0000000..c097fb5 --- /dev/null +++ b/Modularizacion/anncode.main/anncode.main.iml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/Modularizacion/anncode.main/src/anncode/main/Main.java b/Modularizacion/anncode.main/src/anncode/main/Main.java new file mode 100644 index 0000000..bf45b9d --- /dev/null +++ b/Modularizacion/anncode.main/src/anncode/main/Main.java @@ -0,0 +1,15 @@ +package anncode.main; + +import util.Calculadora; + +public class Main { + + public static void main(String[] args){ + + System.out.println("Hola mundo :)"); + Calculadora calculadora = new Calculadora(); + System.out.println(calculadora.suma(5,8)); + + } + +} diff --git a/Modularizacion/anncode.main/src/module-info.java b/Modularizacion/anncode.main/src/module-info.java new file mode 100644 index 0000000..9532200 --- /dev/null +++ b/Modularizacion/anncode.main/src/module-info.java @@ -0,0 +1,3 @@ +module anncode.main { + requires anncode.util; +} \ No newline at end of file diff --git a/Modularizacion/anncode.util/anncode.util.iml b/Modularizacion/anncode.util/anncode.util.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Modularizacion/anncode.util/anncode.util.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Modularizacion/anncode.util/src/internal/CalculadoraHelper.java b/Modularizacion/anncode.util/src/internal/CalculadoraHelper.java new file mode 100644 index 0000000..c9d59d7 --- /dev/null +++ b/Modularizacion/anncode.util/src/internal/CalculadoraHelper.java @@ -0,0 +1,8 @@ +package internal; + +public class CalculadoraHelper { + + public int suma(int i, int j){ + return i+j; + } +} diff --git a/Modularizacion/anncode.util/src/module-info.java b/Modularizacion/anncode.util/src/module-info.java new file mode 100644 index 0000000..bbf2835 --- /dev/null +++ b/Modularizacion/anncode.util/src/module-info.java @@ -0,0 +1,3 @@ +module anncode.util { + exports util; +} \ No newline at end of file diff --git a/Modularizacion/anncode.util/src/util/Calculadora.java b/Modularizacion/anncode.util/src/util/Calculadora.java new file mode 100644 index 0000000..d910e41 --- /dev/null +++ b/Modularizacion/anncode.util/src/util/Calculadora.java @@ -0,0 +1,17 @@ +package util; + + +import internal.CalculadoraHelper; + +public class Calculadora { + + CalculadoraHelper calculadoraHelper = new CalculadoraHelper(); + + public int suma(int i, int j){ + return calculadoraHelper.suma(i,j); + } + + public int suma(double i, double j){ + return (int)(i+j); + } +} diff --git a/Modularizacion/out/production/Modularizacion/com/anncode/util/Calculadora.class b/Modularizacion/out/production/Modularizacion/com/anncode/util/Calculadora.class index 40c602362cf298924ed6703745a47a14457250ee..acdce0a320f16265ac0be5a0127e3c1658750861 100644 GIT binary patch delta 19 acmeBW?PcA-&BVwxnTIKWk#BM=lK}uMTm%mQ delta 19 acmeBW?PcA-&BVw#nTIKWk#}+|lK}uMOau)8 diff --git a/Modularizacion/out/production/anncode.main/anncode/main/Main.class b/Modularizacion/out/production/anncode.main/anncode/main/Main.class new file mode 100644 index 0000000000000000000000000000000000000000..87e0fb962645e7b508a8e2ab1f54d2ff2d330cc8 GIT binary patch literal 686 zcmZ`$+fLg+5Iq}`*f9o7(g3A}hF-vif}eOPs4qxWBe@qTRV0K|Y2#SwB3~-UuGG(J zAA(dQK7fy^dN!#P(Tg8ucFxS4Gc&&Z`Qrw_F^())*lged9-7#)u#HCsIu>f!)MiH` zj}1IA@Km6Fs!~vfl8ydWip8J4{{I_X$Dy+yI;*%N+ zv;vu?AshWfs?>i&b3!T|2&}mm!KM5n{aB_WzgOfc9i2?2WIoc(|40igQYu6JlDxXfz`kEVZ(fhcZ16)Ebc(Puj3+0c*U$_qCMMKW&V4vTX5+}CLFmn<+uwA z7@u`f%v-hH|D0-ECOkvU?RLE`FY9)_K6cRHf7V|GJQ!@+B}P8Ips(#;L42F0muc%W z5G#D^QWn6$Dt!Y@w20{DkEoIk*#3@6b76w&HEQQqs0WM>OvjwSn82K~Hd(J3OpfAk bh%It!g|!(A?xD@d!7`C`Y6xsFuHgPJ4zrGP literal 0 HcmV?d00001 diff --git a/Modularizacion/out/production/anncode.main/module-info.class b/Modularizacion/out/production/anncode.main/module-info.class new file mode 100644 index 0000000000000000000000000000000000000000..007a331cc7884ff3514bd273b7c550d270196f05 GIT binary patch literal 183 zcmX^0Z`VEs1_o0GUUmjfMh33n{L-T2RJY8WR7M7Y-29Z%oK)S+ytI71ti-ZJMg}%t zu#hkVmoNi2BLl0Yo`IgBFar-G12>XlMh2e5yu9T6lvKUk#LPTK22PM}y`;oqps8@F s(vr-a1_lO3p!E>I#J~h(FflMQumEWp23D{z69ZcV0|Pq)2bc#X09dyqK>z>% literal 0 HcmV?d00001 diff --git a/Modularizacion/out/production/anncode.util/internal/CalculadoraHelper.class b/Modularizacion/out/production/anncode.util/internal/CalculadoraHelper.class new file mode 100644 index 0000000000000000000000000000000000000000..89d5149d893774219add68f1fccd3d04820579b1 GIT binary patch literal 401 zcmZ`!Jx{|h5PjD;34}sR`52%BY%K$sm_Q6vLPV-y0CmPmEpX%}C{6fPEKEoY`~ZFw z;%p)@AT0Ur-t)bC=g+VA4*)0FiQr)nVk^WpAvn{8uFnbHXgni`NjX=9-c%Rrx>=;E zx|6A4W-u)?X=bw07Pq9RAN7(j@iUh3oE516C0+BCI*aiZ9xsVt;u5!nlK9ZQ!&A&Q!Eou<<%J P+&qCES9Y1cQ*M3(rqoBc literal 0 HcmV?d00001 diff --git a/Modularizacion/out/production/anncode.util/module-info.class b/Modularizacion/out/production/anncode.util/module-info.class new file mode 100644 index 0000000000000000000000000000000000000000..bc015f2e7609b656e739176340821b2ae000694a GIT binary patch literal 175 zcmX^0Z`VEs1_o0GUUmjfMh33n{L-T2RJY8WR7M7Y-29Z%oK)S+ytI71ti-ZJMg}%t zu#hkVmoNi2BLl0Yo`IgB2m=oz12>XlMh2e5yu9T6lvKUalFS@N22PM}y`;oqps6e% qp#}y9MxeD2z{J1=WH2!>Gq3<@83tCcFwn9F1_pMZIu0-&OaK6>At6lw literal 0 HcmV?d00001 diff --git a/Modularizacion/out/production/anncode.util/util/Calculadora.class b/Modularizacion/out/production/anncode.util/util/Calculadora.class new file mode 100644 index 0000000000000000000000000000000000000000..c302ced32a6ffe8c4b0bf1994ab19337ed0ef9ec GIT binary patch literal 605 zcmZ{h%TB^T6o&ulg-WSX@PYy=t^^jca;0GdF_I8nXh>WRrO}eon$r3hK8YI>l|&OC zz=txP85)BmF6Q)H=Ks!_)35LMPXNcLnJ`c`P%)vPoJ9sz;q4mOGqBH4aJcUzJ|Be< zKX?6mH)5#vy&!g@fcve^a`l8EbLs_N+-6YgjRAw!2}dqNo<#0NG8wwjH6QwvDfUBx z4|wE>I8AEtoi`P=B=-K`39L<%31`sjydK%g%xBi6i_7j@)(p7l$Otf+t%f9>^dWU!gryO~EQzv2qYaBmEkAmSow;!={M-0*Wc?oLH(*G+&@qs&CMr zD4J6;Qk9d0+Wb~Z5FOUBA?qeK$x|eCE2Va*vrZiSu;Dx|1M>?&{THYcuq1&x0Za0U I+j5khA4x7`KmY&$ literal 0 HcmV?d00001 diff --git a/Modularizacion/src/com/anncode/util/Calculadora.java b/Modularizacion/src/com/anncode/util/Calculadora.java index 543be96..939c345 100644 --- a/Modularizacion/src/com/anncode/util/Calculadora.java +++ b/Modularizacion/src/com/anncode/util/Calculadora.java @@ -5,6 +5,7 @@ public class Calculadora { CalculadoraHelper calculadoraHelper = new CalculadoraHelper(); + public int suma(int i, int j){ return calculadoraHelper.suma(i,j); } From c712c780702104d96235ce88701711a89c384396 Mon Sep 17 00:00:00 2001 From: Anahi Salgado Date: Fri, 16 Mar 2018 03:53:38 -0600 Subject: [PATCH 32/44] Refactorizacion de codigo de entrada de datos --- AmazonViewer/.classpath | 11 + AmazonViewer/.project | 17 + .../.settings/org.eclipse.jdt.core.prefs | 11 + .../bin/com/anncode/amazonviewer/Main.class | Bin 0 -> 6964 bytes .../com/anncode/amazonviewer/model/Book.class | Bin 0 -> 3384 bytes .../anncode/amazonviewer/model/Chapter.class | Bin 0 -> 2055 bytes .../com/anncode/amazonviewer/model/Film.class | Bin 0 -> 1889 bytes .../amazonviewer/model/IVisualizable.class | Bin 0 -> 254 bytes .../anncode/amazonviewer/model/Magazine.class | Bin 0 -> 1120 bytes .../anncode/amazonviewer/model/Movie.class | Bin 0 -> 2543 bytes .../amazonviewer/model/Publication.class | Bin 0 -> 1422 bytes .../anncode/amazonviewer/model/Serie.class | Bin 0 -> 2800 bytes .../bin/com/anncode/util/AmazonUtil.class | Bin 0 -> 1293 bytes AmazonViewer/libs/makefile.jar | Bin 0 -> 2077 bytes AmazonViewer/reporte2018-01-26.txt | 21 + .../src/com/anncode/amazonviewer/Main.java | 308 ++++++++++ .../com/anncode/amazonviewer/model/Book.java | 106 ++++ .../anncode/amazonviewer/model/Chapter.java | 52 ++ .../com/anncode/amazonviewer/model/Film.java | 73 +++ .../amazonviewer/model/IVisualizable.java | 9 + .../anncode/amazonviewer/model/Magazine.java | 27 + .../com/anncode/amazonviewer/model/Movie.java | 77 +++ .../amazonviewer/model/Publication.java | 48 ++ .../com/anncode/amazonviewer/model/Serie.java | 61 ++ .../src/com/anncode/util/AmazonUtil.java | 37 ++ Modularizacion/.idea/misc.xml | 6 - Modularizacion/.idea/modules.xml | 10 - Modularizacion/.idea/uiDesigner.xml | 124 ---- Modularizacion/.idea/workspace.xml | 550 ------------------ Modularizacion/Modularizacion.iml | 11 - Modularizacion/anncode.main/anncode.main.iml | 13 - .../anncode.main/src/anncode/main/Main.java | 15 - .../anncode.main/src/module-info.java | 3 - Modularizacion/anncode.util/anncode.util.iml | 11 - .../src/internal/CalculadoraHelper.java | 8 - .../anncode.util/src/module-info.java | 3 - .../anncode.util/src/util/Calculadora.java | 17 - .../Modularizacion/com/anncode/Main.class | Bin 642 -> 0 bytes .../anncode/internal/CalculadoraHelper.class | Bin 425 -> 0 bytes .../com/anncode/util/Calculadora.class | Bin 653 -> 0 bytes .../anncode.main/anncode/main/Main.class | Bin 686 -> 0 bytes .../production/anncode.main/module-info.class | Bin 183 -> 0 bytes .../internal/CalculadoraHelper.class | Bin 401 -> 0 bytes .../production/anncode.util/module-info.class | Bin 175 -> 0 bytes .../anncode.util/util/Calculadora.class | Bin 605 -> 0 bytes Modularizacion/src/com/anncode/Main.java | 12 - .../anncode/internal/CalculadoraHelper.java | 8 - .../src/com/anncode/util/Calculadora.java | 16 - 48 files changed, 858 insertions(+), 807 deletions(-) create mode 100644 AmazonViewer/.classpath create mode 100644 AmazonViewer/.project create mode 100644 AmazonViewer/.settings/org.eclipse.jdt.core.prefs create mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/Main.class create mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/model/Book.class create mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/model/Chapter.class create mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/model/Film.class create mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/model/IVisualizable.class create mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/model/Magazine.class create mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/model/Movie.class create mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/model/Publication.class create mode 100644 AmazonViewer/bin/com/anncode/amazonviewer/model/Serie.class create mode 100644 AmazonViewer/bin/com/anncode/util/AmazonUtil.class create mode 100644 AmazonViewer/libs/makefile.jar create mode 100644 AmazonViewer/reporte2018-01-26.txt create mode 100644 AmazonViewer/src/com/anncode/amazonviewer/Main.java create mode 100644 AmazonViewer/src/com/anncode/amazonviewer/model/Book.java create mode 100644 AmazonViewer/src/com/anncode/amazonviewer/model/Chapter.java create mode 100644 AmazonViewer/src/com/anncode/amazonviewer/model/Film.java create mode 100644 AmazonViewer/src/com/anncode/amazonviewer/model/IVisualizable.java create mode 100644 AmazonViewer/src/com/anncode/amazonviewer/model/Magazine.java create mode 100644 AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java create mode 100644 AmazonViewer/src/com/anncode/amazonviewer/model/Publication.java create mode 100644 AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java create mode 100644 AmazonViewer/src/com/anncode/util/AmazonUtil.java delete mode 100644 Modularizacion/.idea/misc.xml delete mode 100644 Modularizacion/.idea/modules.xml delete mode 100644 Modularizacion/.idea/uiDesigner.xml delete mode 100644 Modularizacion/.idea/workspace.xml delete mode 100644 Modularizacion/Modularizacion.iml delete mode 100644 Modularizacion/anncode.main/anncode.main.iml delete mode 100644 Modularizacion/anncode.main/src/anncode/main/Main.java delete mode 100644 Modularizacion/anncode.main/src/module-info.java delete mode 100644 Modularizacion/anncode.util/anncode.util.iml delete mode 100644 Modularizacion/anncode.util/src/internal/CalculadoraHelper.java delete mode 100644 Modularizacion/anncode.util/src/module-info.java delete mode 100644 Modularizacion/anncode.util/src/util/Calculadora.java delete mode 100644 Modularizacion/out/production/Modularizacion/com/anncode/Main.class delete mode 100644 Modularizacion/out/production/Modularizacion/com/anncode/internal/CalculadoraHelper.class delete mode 100644 Modularizacion/out/production/Modularizacion/com/anncode/util/Calculadora.class delete mode 100644 Modularizacion/out/production/anncode.main/anncode/main/Main.class delete mode 100644 Modularizacion/out/production/anncode.main/module-info.class delete mode 100644 Modularizacion/out/production/anncode.util/internal/CalculadoraHelper.class delete mode 100644 Modularizacion/out/production/anncode.util/module-info.class delete mode 100644 Modularizacion/out/production/anncode.util/util/Calculadora.class delete mode 100644 Modularizacion/src/com/anncode/Main.java delete mode 100644 Modularizacion/src/com/anncode/internal/CalculadoraHelper.java delete mode 100644 Modularizacion/src/com/anncode/util/Calculadora.java diff --git a/AmazonViewer/.classpath b/AmazonViewer/.classpath new file mode 100644 index 0000000..8da7346 --- /dev/null +++ b/AmazonViewer/.classpath @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/AmazonViewer/.project b/AmazonViewer/.project new file mode 100644 index 0000000..b9f7f63 --- /dev/null +++ b/AmazonViewer/.project @@ -0,0 +1,17 @@ + + + AmazonViewer + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/AmazonViewer/.settings/org.eclipse.jdt.core.prefs b/AmazonViewer/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..7e5c907 --- /dev/null +++ b/AmazonViewer/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=9 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=9 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=9 diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/Main.class b/AmazonViewer/bin/com/anncode/amazonviewer/Main.class new file mode 100644 index 0000000000000000000000000000000000000000..9246a3e7aaae10fff18415f0fc3fe6065f3dbbb2 GI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/AmazonViewer/bin/com/anncode/amazonviewer/model/Book.class new file mode 100644 index 0000000000000000000000000000000000000000..fb0cf1734a194ce68ea8d709e90c12fc8ed4274b GIT binary patch literal 3384 zcmbVO+jA3j6#h0%b7Ko7rR7#7rCidakaEWsDin$o0!2~_1qHUrQWnx|O*SB?D2n&{ zU3_DP8D4ZoXCyc>^5TOtzWU~0;2)vX@9b`qkOpCVXnw!_?K!`5zVAEdY=6J^^IZU& z@QoiH1)XVgGNI*iX)~iIv`OufnLBUj7xa8$k|){3fN7rd!>b_n5W_>o@vM>7EW^zC z;ZxB45c{D~qfpec#wBe$t1Ivr83oFa0GU~@!3aRqs(O&IS8QvVHI=H zqF~Gay1i>O1O=@s+OUv$7j$c9(K=)13kuqz4+uRkY2@^S#mR9!KjJVHPMT>gJF4Xk zd3F!I))|A>tV}+HZIO`#Hd=-yY&Yo{gIj7PgeYjPrAR?gOiTvLD)4JF`L@(am)B0{ z)(~ZBh;|JH33a6kKLYfVb6d^@(XQDPi)ojNAVM@HD~@Sv9ganefKixHn{kc>kWfHh z1?yDIff~RDCXo8|y8t$^oDP~yE2|qBu1zUROP@QSP1&UR@dN?aRu=&?gP8!{=rIY| z#QaCfRVK0eRWu2*CK^}Xuu`H!c8-?m6ssS*6fCR_GEg+K89g7sAj=^X>FtdS3=i+; z8j6gFFujow2Jn;=TU<(JNX0&^CUiRw8p!LUiUT;vX3(al^c-1VQ;)D&Y`d}h0yxC< zLy^H5c_pZV!zxk|N@b|>s{o!MRgNudB_hS*m>*Gb6k~kpnpf3Qct+|?8NF2wqjgG8l=E~UdtBs;nNCMRg>|+>&XIb zm7pL$qr$*h_9dZ|`?59KRkzYZ8Qs#1th5vT4e4e}%UdI6N@p7_cY{}uyT~dBtjY{o zjR#FQ|ADJKS)4DD0$m zPM5rsMuB%MyicW_`Mh>fUT{VPQ^rJ2vx<2F>aTCL?UBY!f1e+(C}^oOV^P9pV#A^eNy<0PmBA^4zlP`a_8_PvU*7;uCzz zcv^-PbKjJisS|!x8pnAZCu(bz0OhpFPTT!c_~O*eB;Hof;n9ieVCE^am{03_44KeD zfwfksLkHDt;9n!W@W^20=i4Jw(_T6H?3H7Qt4cfK{e&d{Tg>)cqpd(Cakk1h6= zu;2&VevzE>UitOYx(V~Km`@uW4=lk_KFQm5M&hXD?lC;h$g*3;Gsic={Jea>9Gz~| z1Xr&t_Ay?#3GTE|aU=wJ5wcNgzGf5Dc$R-h?l_(S8;$ELcBa&Xj3WP5EQy-cL<0f|UGN+O)p?p=S7A*mVd z4hF`;yKiGptc1NK><NeK1er!NKSJ%;MPYVR?+KYBK3n0#wrCySB2`>`BO9BBe+wC|_(4yJY9b6u}jaT>ke!*5-kHztJTgTU_ zM|%lxP^Xlr;JZHkmzR3=#_m8FvrXQvnA|~u*Su>VzgIbq-^K?ed~`%E2;7+dEhZ9r z?e1E|ynqwT<0L!l6vEKhXQwD(8tak4X|6d;*l1()32^FthR^BK#5XdX6wbrPUHKCH mC^|xZK?`XW$Noz`2@~_+y@#+Lm;LxkX$^{^U-Q_5YySd_=gbiR literal 0 HcmV?d00001 diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/model/Chapter.class b/AmazonViewer/bin/com/anncode/amazonviewer/model/Chapter.class new file mode 100644 index 0000000000000000000000000000000000000000..f370c5135eb0e74f56d18f3d0a4544da370beb1e GIT binary patch literal 2055 zcmbVNT~k|C6kR6-a=Bazqz$E}t+54~q(J;=6$w&l`avYLNRSFv?IF2CZyRnhH#a!= zf1T#x|Mp>&dF{0W!>Fz>@RFDx6Mc`S9mNNzU{>j6&QWN-laNI1tLyWKokY~ zn|8D5)ZKfn?M>Sg=$Um~$Db3JO_!d?9hs|1cPm%+J;&Y3zf7c9E@svQq6I=T(FMzb zfqsGf|E`x=Ga)cwVGu(CgH78nAH^I^>y`s0$F&0STP z`Q_EyD>Tj2svPwnt9G)qp?r{V{*X!%Yp zH}83JS1s_U^p>41SNbh=BIY~qntj=WHRn!e5AE>ZBIGpl*Ava-MuPr!@?(c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t?Z(QX03<5BTm?G_%HquMrr^6 literal 0 HcmV?d00001 diff --git a/AmazonViewer/bin/com/anncode/amazonviewer/model/Magazine.class b/AmazonViewer/bin/com/anncode/amazonviewer/model/Magazine.class new file mode 100644 index 0000000000000000000000000000000000000000..138bf5717c42656a94a78cd17f245884293c9ee2 GIT binary patch literal 1120 zcmaizYi|-k6o%j7x~z*Jwxu_9>#eYbuD4nRV^Xym5?W14Nc7tPBTlpIHtSN8{w6tT)&;@u`YlJcc_2NPAtE~rtj3UdCS4gkXV@;(5BV{-9qxAR zgTR+=w;JyB1L@eWcpygp*@$A3A@-7BbVPB4c>ADL$2<%xzpsn zRQ_l)7JQPQ8H)7_z{gWo8RCHq!g@2T3~AAkbWZarScdF0K0``{ctqh)t*!`aq(Zb% ztfj!PXdsRRgBEz<_zZJ};;bl1tTN=M`@iT*rz3m~*BO>{vr;klcHZoKsO|5Pt(y(S zT`_g6z*H)&G0dMMc(JJy$t?r7u}maHI80P&cMYtgKo`c3j)Y6x<@54qa7SEK4HhY+ zo4aEH6bwVjKv}gisMX|1gH7s%v81M{qjqkr)&J+Bu(uTU<0;y= ztwYfcs8sWxd1o==Bam46SR`pWZOtR;md(Sz)^E>C<&F_Ez@+*LI z_%a4fpugajQ&y!?aEo@zDqBz7%0tI~WP7PHHKo*y%Vi7^fxbOXUU5q07@`8hdmPN< zoodZ0IZv#`k}aS)MFEi!Fnp(M=VfpzqGL|Q@y7+y1K9`GLn~FXDod%H?>UvF^nNs% z++bcHGQ}(mG@;FefrA30|JU7M-hjX%6CLOjh*fQW-nKkO7*K%@W}S+CvsPZTy}2N- zj;vd-N_oq3bYo6sh zZiTp36+Dqs=ll#gZ5kNNv@nTY6EWxltxL8)*Wg_4oHEg(c9`Dgj!ZHm+0=bEsDMD% zz~D|uF$@VD-d?UtHK$axJsl$gJw{@5G%+)q&s?TpB<5s#qX`2^q-2F&7wF!lLIL@2 zns^I?grRWLP@0`HaUO58VXT!EyTU9-cC+7sH3XH`@h&^hN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ooNzfByUnfDt^%BBgM+ z+Nc-3FswEf{GwO)9yP)Tf&Y~s73=iWiWNT!{4CN6hqie0Vo<9qq=E$nRaWS2`pst0 z2yeE$Fb?8}3Rd;5w-ozPQ=xDAp7+2jw&I{xJRe2g!|9+ImlV1x!D8set;kn6oAl1u z^cE;4OpVewvt`DDFo?$$ZVZ}SH7{H&R^liK7fUbWDVLKll=3qQkN($`uh5nhPfw5= z8y(o;z(G!7^uMCX&vZdymxC-aV)Z+)&_(v9gV4X$s?Yn;ZEwCtI&#yEs#lxwqCnPd zXF9$ckj|r9v7%K(MmnhklT7o!o)2y=`k@e?twz2VHzF!#p%r;CMMPj5%RgLNg}|t| zOwDx+=F8H-VF#Va5HJ0e%@WKt6P)S6vJADG0d4iLrQL)1MD7*NC-1xhg{(y!&ui^z zv$yFu2&fB*Tdz<{l2~!Wh@MQZf?q%SEZ$p%%BIT*tko>6aU$q&ija8mpWhqMi< zWZ|rWZM&EJ(2p8|gv2hlxE`^VOUI4*O;8${Z{ z&t(Tva;?xx$yKTUc~NrL)^<0qO;U~??i1_Tn|Jm}%q`Y3vI9%b0oI;Q=j|0tp|Yh>lSf z!yM0XoMPQ`D6H#zvOUNye7J6Wv%2$N884mBJ;U7W3O>G)9{V2U!ZWB@jrKF59WbT! z+S|0QK40%hKenF2U%|a))b4z()PVKfUr!5yIIR`d&p84oIiV5C|1_`C5h5C0n=G$V nED;Y#@HKp?W$SV!lQnx0S556n{ehk==G5<);%-b|3a!5ZchY{P literal 0 HcmV?d00001 diff --git a/AmazonViewer/bin/com/anncode/util/AmazonUtil.class b/AmazonViewer/bin/com/anncode/util/AmazonUtil.class new file mode 100644 index 0000000000000000000000000000000000000000..c31e1077cf99bc90e5d93f008e1a1dd4e89edf70 GIT binary patch literal 1293 zcmah|U2hXd6g}g7tm7<+aT1coF_=J$Z6GeR6p}z7p@nX79E2e#yiGO(EVXB?{fH=1 zUs3-;A5kB8=?fqw5|Ma8yzoc(6R7DK+fiIvQLVK1&i$H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!p2n=js@(o3`4w4TGR=F&))LYC%ij7NbJeTX&CkC6?Ctii zW(IjW_Pgt%{Xj1jf<4X1B*K8G1Cc8)P#uU0aMg$b-Uw4b6&-SF166bgkO*WFQSBic y2uh^L@dQew2=EQ)MnsZD*N5y?P%I(9G1H4&*JO-e5Sr}M>fx^TN;sF5u3R8vv literal 0 HcmV?d00001 diff --git a/AmazonViewer/reporte2018-01-26.txt b/AmazonViewer/reporte2018-01-26.txt new file mode 100644 index 0000000..e6113df --- /dev/null +++ b/AmazonViewer/reporte2018-01-26.txt @@ -0,0 +1,21 @@ + + :: MOVIE :: + Title: Movie 2 + Genero: Genero 2 + Year: 2019 + Creator: Creador 2 + Duration: 122 + + :: MOVIE :: + Title: Movie 3 + Genero: Genero 3 + Year: 2020 + Creator: Creador 3 + Duration: 123 + + :: MOVIE :: + Title: Movie 5 + Genero: Genero 5 + Year: 2022 + Creator: Creador 5 + Duration: 125 diff --git a/AmazonViewer/src/com/anncode/amazonviewer/Main.java b/AmazonViewer/src/com/anncode/amazonviewer/Main.java new file mode 100644 index 0000000..ebd3ef2 --- /dev/null +++ b/AmazonViewer/src/com/anncode/amazonviewer/Main.java @@ -0,0 +1,308 @@ +package com.anncode.amazonviewer; + +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.Scanner; + +import com.anncode.amazonviewer.model.Book; +import com.anncode.amazonviewer.model.Chapter; +import com.anncode.amazonviewer.model.Movie; +import com.anncode.amazonviewer.model.Serie; +import com.anncode.makereport.Report; +import com.anncode.util.AmazonUtil; + +public class Main { + + public static void main(String[] args) { + // TODO Auto-generated method stub + + showMenu(); + + } + + public static void showMenu() { + int exit = 0; + do { + + System.out.println("BIENVENIDOS AMAZON VIEWER"); + System.out.println(""); + System.out.println("Selecciona el número de la opción deseada"); + System.out.println("1. Movies"); + System.out.println("2. Series"); + System.out.println("3. Books"); + System.out.println("4. Magazines"); + System.out.println("5. Report"); + System.out.println("6. Report Today"); + System.out.println("0. Exit"); + + //Leer la respuesta del usuario + int response = AmazonUtil.validateUserResponseMenu(0, 6); + + switch (response) { + case 0: + //salir + exit = 0; + break; + case 1: + showMovies(); + break; + case 2: + showSeries(); + exit = 0; + response = 0; + break; + case 3: + showBooks(); + break; + case 4: + showMagazines(); + break; + case 5: + makeReport(); + exit = 1; + break; + case 6: + //Date date = new Date(); + makeReport(new Date()); + exit = 1; + break; + + default: + System.out.println(); + System.out.println("....¡¡Selecciona una opción!!...."); + System.out.println(); + exit = 1; + break; + } + + + }while(exit != 0); + } + + static ArrayList movies = Movie.makeMoviesList(); + public static void showMovies() { + int exit = 1; + + do { + System.out.println(); + System.out.println(":: MOVIES ::"); + System.out.println(); + + for (int i = 0; i < movies.size(); i++) { //1. Movie 1 + System.out.println(i+1 + ". " + movies.get(i).getTitle() + " Visto: " + movies.get(i).isViewed()); + } + + System.out.println("0. Regresar al Menu"); + System.out.println(); + + //Leer Respuesta usuario + int response = AmazonUtil.validateUserResponseMenu(0, movies.size()); + + if(response == 0) { + exit = 0; + showMenu(); + break; + } + if (response > 0) { + Movie movieSelected = movies.get(response-1); + movieSelected.setViewed(true); + Date dateI = movieSelected.startToSee(new Date()); + + for (int i = 0; i < 100; i++) { + System.out.println(".........."); + } + + //Termine de verla + movieSelected.stopToSee(dateI, new Date()); + System.out.println(); + System.out.println("Viste: " + movieSelected); + System.out.println("Por: " + movieSelected.getTimeViewed() + " milisegundos"); + } + + + }while(exit !=0); + + } + static ArrayList series = Serie.makeSeriesList(); + public static void showSeries() { + int exit = 1; + + do { + System.out.println(); + System.out.println(":: SERIES ::"); + System.out.println(); + + for (int i = 0; i < series.size(); i++) { //1. Serie 1 + System.out.println(i+1 + ". " + series.get(i).getTitle() + " Visto: " + series.get(i).isViewed()); + } + + System.out.println("0. Regresar al Menu"); + System.out.println(); + + //Leer Respuesta usuario + int response = AmazonUtil.validateUserResponseMenu(0, series.size()); + + if(response == 0) { + exit = 0; + showMenu(); + } + + if(response > 0) { + showChapters(series.get(response-1).getChapters()); + } + + + }while(exit !=0); + } + + public static void showChapters(ArrayList chaptersOfSerieSelected) { + int exit = 1; + + do { + System.out.println(); + System.out.println(":: CHAPTERS ::"); + System.out.println(); + + + for (int i = 0; i < chaptersOfSerieSelected.size(); i++) { //1. Chapter 1 + System.out.println(i+1 + ". " + chaptersOfSerieSelected.get(i).getTitle() + " Visto: " + chaptersOfSerieSelected.get(i).isViewed()); + } + + System.out.println("0. Regresar al Menu"); + System.out.println(); + + //Leer Respuesta usuario + int response = AmazonUtil.validateUserResponseMenu(0, chaptersOfSerieSelected.size()); + + if(response == 0) { + exit = 0; + } + + + if(response > 0) { + Chapter chapterSelected = chaptersOfSerieSelected.get(response-1); + chapterSelected.setViewed(true); + Date dateI = chapterSelected.startToSee(new Date()); + + for (int i = 0; i < 100; i++) { + System.out.println(".........."); + } + + //Termine de verla + chapterSelected.stopToSee(dateI, new Date()); + System.out.println(); + System.out.println("Viste: " + chapterSelected); + System.out.println("Por: " + chapterSelected.getTimeViewed() + " milisegundos"); + } + }while(exit !=0); + } + + static ArrayList books= Book.makeBookList(); + public static void showBooks() { + int exit = 1; + + do { + System.out.println(); + System.out.println(":: BOOKS ::"); + System.out.println(); + + for (int i = 0; i < books.size(); i++) { //1. Book 1 + System.out.println(i+1 + ". " + books.get(i).getTitle() + " Visto: " + books.get(i).isReaded()); + } + + System.out.println("0. Regresar al Menu"); + System.out.println(); + + //Leer Respuesta usuario + int response = AmazonUtil.validateUserResponseMenu(0, books.size()); + + if(response == 0) { + exit = 0; + showMenu(); + } + + if(response > 0) { + Book bookSelected = books.get(response-1); + bookSelected.setReaded(true); + Date dateI = bookSelected.startToSee(new Date()); + + for (int i = 0; i < 100000; i++) { + System.out.println(".........."); + } + + //Termine de verla + bookSelected.stopToSee(dateI, new Date()); + System.out.println(); + System.out.println("Viste: " + bookSelected); + System.out.println("Por: " + bookSelected.getTimeReaded() + " milisegundos"); + } + + }while(exit !=0); + } + + public static void showMagazines() { + int exit = 0; + do { + System.out.println(); + System.out.println(":: MAGAZINES ::"); + System.out.println(); + }while(exit !=0); + } + + public static void makeReport() { + + Report report = new Report(); + report.setNameFile("reporte"); + report.setExtension("txt"); + report.setTitle(":: VISTOS ::"); + String contentReport = ""; + + for (Movie movie : movies) { + if (movie.getIsViewed()) { + contentReport += movie.toString() + "\n"; + + } + } + + report.setContent(contentReport); + report.makeReport(); + + } + + public static void makeReport(Date date) { + SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); + String dateString = df.format(date); + Report report = new Report(); + + report.setNameFile("reporte" + dateString); + report.setExtension("txt"); + report.setTitle(":: VISTOS ::"); + String contentReport = ""; + + for (Movie movie : movies) { + if (movie.getIsViewed()) { + contentReport += movie.toString() + "\n"; + + } + } + report.setContent(contentReport); + report.makeReport(); + } + +} + + + + + + + + + + + + + + + diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Book.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Book.java new file mode 100644 index 0000000..53c13db --- /dev/null +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Book.java @@ -0,0 +1,106 @@ +package com.anncode.amazonviewer.model; + +import java.util.ArrayList; +import java.util.Date; + +public class Book extends Publication implements IVisualizable { + private int id; + private String isbn; + private boolean readed; + private int timeReaded; + + + public Book(String title, Date edititionDate, String editorial, String[] authors) { + super(title, edititionDate, editorial); + // TODO Auto-generated constructor stub + setAuthors(authors); + } + + + public int getId() { + return id; + } + + + public String getIsbn() { + return isbn; + } + + + public void setIsbn(String isbn) { + this.isbn = isbn; + } + + + public boolean isReaded() { + String leido = ""; + if(readed == true) { + leido = "Sí"; + }else { + leido = "No"; + } + + return readed; + } + + + public void setReaded(boolean readed) { + this.readed = readed; + } + + + public int getTimeReaded() { + return timeReaded; + } + + + public void setTimeReaded(int timeReaded) { + this.timeReaded = timeReaded; + } + + @Override + public String toString() { + // TODO Auto-generated method stub + String detailBook = "\n :: BOOK ::" + + "\n Title: " + getTitle() + + "\n Editorial: " + getEditorial() + + "\n Edition Date: " + getEdititionDate() + + "\n Authors: "; + for (int i = 0; i < getAuthors().length; i++) { + detailBook += "\t" + getAuthors()[i]; + } + return detailBook; + } + + + @Override + public Date startToSee(Date dateI) { + // TODO Auto-generated method stub + return dateI; + } + + + @Override + public void stopToSee(Date dateI, Date dateF) { + // TODO Auto-generated method stub + if (dateF.getSeconds() > dateI.getSeconds()) { + setTimeReaded(dateF.getSeconds() - dateI.getSeconds()); + }else { + setTimeReaded(0); + } + } + + public static ArrayList makeBookList() { + ArrayList books = new ArrayList(); + String[] authors = new String[3]; + for (int i = 0; i < 3; i++) { + authors[i] = "author "+i; + } + for (int i = 1; i <= 5; i++) { + books.add(new Book("Book " + i, new Date(), "editorial " + i, authors)); + } + + return books; + } + +} diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Chapter.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Chapter.java new file mode 100644 index 0000000..1bbde81 --- /dev/null +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Chapter.java @@ -0,0 +1,52 @@ +package com.anncode.amazonviewer.model; + +import java.util.ArrayList; + +public class Chapter extends Movie { + + + private int id; + private int sessionNumber; + + public Chapter(String title, String genre, String creator, int duration, short year, int sessionNumber) { + super(title, genre, creator, duration, year); + // TODO Auto-generated constructor stub + this.setSessionNumber(sessionNumber); + } + + @Override + public int getId() { + // TODO Auto-generated method stub + return this.id; + } + + public int getSessionNumber() { + return sessionNumber; + } + + public void setSessionNumber(int sessionNumber) { + this.sessionNumber = sessionNumber; + } + + + @Override + public String toString() { + // TODO Auto-generated method stub + return "\n :: CHAPTER ::" + + "\n Title: " + getTitle() + + "\n Year: " + getYear() + + "\n Creator: " + getCreator() + + "\n Duration: " + getDuration(); + } + + + public static ArrayList makeChaptersList() { + ArrayList chapters = new ArrayList(); + + for (int i = 1; i <= 5; i++) { + chapters.add(new Chapter("Capituo "+i, "genero "+i, "creator" +i, 45, (short)(2017+i), i)); + } + + return chapters; + } +} diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Film.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Film.java new file mode 100644 index 0000000..4a6c4b4 --- /dev/null +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Film.java @@ -0,0 +1,73 @@ +package com.anncode.amazonviewer.model; + +public class Film { + + private String title; + private String genre; + private String creator; + private int duration; + private short year; + private boolean viewed; + + + + public Film(String title, String genre, String creator, int duration) { + super(); + this.title = title; + this.genre = genre; + this.creator = creator; + this.duration = duration; + } + + public String getTitle() { + return title; + } + public void setTitle(String title) { + this.title = title; + } + public String getGenre() { + return genre; + } + public void setGenre(String genre) { + this.genre = genre; + } + public String getCreator() { + return creator; + } + public void setCreator(String creator) { + this.creator = creator; + } + public int getDuration() { + return duration; + } + public void setDuration(int duration) { + this.duration = duration; + } + public short getYear() { + return year; + } + public void setYear(short year) { + this.year = year; + } + public String isViewed() { + String visto = ""; + if(viewed == true) { + visto = "Sí"; + }else { + visto = "No"; + } + + return visto; + } + + public boolean getIsViewed() { + return viewed; + } + public void setViewed(boolean viewed) { + this.viewed = viewed; + } + + + + +} diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/IVisualizable.java b/AmazonViewer/src/com/anncode/amazonviewer/model/IVisualizable.java new file mode 100644 index 0000000..6f0d4cb --- /dev/null +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/IVisualizable.java @@ -0,0 +1,9 @@ +package com.anncode.amazonviewer.model; + +import java.util.Date; + +public interface IVisualizable { + Date startToSee(Date dateI); + void stopToSee(Date dateI, Date dateF); + +} diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Magazine.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Magazine.java new file mode 100644 index 0000000..8ce5c2c --- /dev/null +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Magazine.java @@ -0,0 +1,27 @@ +package com.anncode.amazonviewer.model; + +import java.util.Date; + +public class Magazine extends Publication { + + private int id; + + public Magazine(String title, Date edititionDate, String editorial) { + super(title, edititionDate, editorial); + // TODO Auto-generated constructor stub + } + + public int getId() { + return id; + } + + @Override + public String toString() { + // TODO Auto-generated method stub + return "\n :: MAGAZINE ::" + + "\n Title: " + getTitle() + + "\n Editorial: " + getEditorial() + + "\n Edition Date: " + getEdititionDate(); + } + +} diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java new file mode 100644 index 0000000..bacbcd1 --- /dev/null +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Movie.java @@ -0,0 +1,77 @@ +package com.anncode.amazonviewer.model; + +import java.util.ArrayList; +import java.util.Date; + +public class Movie extends Film implements IVisualizable { + + private int id; + private int timeViewed; + + + public Movie(String title, String genre, String creator, int duration, short year) { + super(title, genre, creator, duration); + setYear(year); + } + + + public int getId() { + return id; + } + + + public int getTimeViewed() { + return timeViewed; + } + public void setTimeViewed(int timeViewed) { + this.timeViewed = timeViewed; + } + + @Override + public String toString() { + // TODO Auto-generated method stub + return "\n :: MOVIE ::" + + "\n Title: " + getTitle() + + "\n Genero: " + getGenre() + + "\n Year: " + getYear() + + "\n Creator: " + getCreator() + + "\n Duration: " + getDuration(); + } + + @Override + public Date startToSee(Date dateI) { + // TODO Auto-generated method stub + return dateI; + } + + @Override + public void stopToSee(Date dateI, Date dateF) { + // TODO Auto-generated method stub + + if (dateF.getTime() > dateI.getTime()) { + setTimeViewed((int)(dateF.getTime() - dateI.getTime())); + }else { + setTimeViewed(0); + } + + + } + + public static ArrayList makeMoviesList() { + ArrayList movies = new ArrayList(); + + for (int i = 1; i <= 5; i++) { + movies.add(new Movie("Movie " + i, "Genero " + i, "Creador " + i, 120+i, (short)(2017+i))); + } + + return movies; + } + +} + + + + + + + diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Publication.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Publication.java new file mode 100644 index 0000000..22d2322 --- /dev/null +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Publication.java @@ -0,0 +1,48 @@ +package com.anncode.amazonviewer.model; + +import java.util.Date; + +public class Publication { + + private String title; + private Date edititionDate; + private String editorial; + private String[] authors; + + + public Publication(String title, Date edititionDate, String editorial) { + super(); + this.title = title; + this.edititionDate = edititionDate; + this.editorial = editorial; + } + + + public String getTitle() { + return title; + } + public void setTitle(String title) { + this.title = title; + } + public Date getEdititionDate() { + return edititionDate; + } + public void setEdititionDate(Date edititionDate) { + this.edititionDate = edititionDate; + } + public String getEditorial() { + return editorial; + } + public void setEditorial(String editorial) { + this.editorial = editorial; + } + public String[] getAuthors() { + return authors; + } + public void setAuthors(String[] authors) { + this.authors = authors; + } + + + +} diff --git a/AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java b/AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java new file mode 100644 index 0000000..8f5a93c --- /dev/null +++ b/AmazonViewer/src/com/anncode/amazonviewer/model/Serie.java @@ -0,0 +1,61 @@ +package com.anncode.amazonviewer.model; + +import java.util.ArrayList; + +public class Serie extends Film { + + private int id; + private int sessionQuantity; + private ArrayList chapters; + + + public Serie(String title, String genre, String creator, int duration, int sessionQuantity, ArrayList chapters) { + super(title, genre, creator, duration); + // TODO Auto-generated constructor stub + this.sessionQuantity = sessionQuantity; + this.chapters = chapters; + } + + public int getId() { + return id; + } + + public int getSessionQuantity() { + return sessionQuantity; + } + + public void setSessionQuantity(int sessionQuantity) { + this.sessionQuantity = sessionQuantity; + } + + public ArrayList getChapters() { + return chapters; + } + + public void setChapters(ArrayList chapters) { + this.chapters = chapters; + } + + @Override + public String toString() { + // TODO Auto-generated method stub + return "\n :: SERIE ::" + + "\n Title: " + getTitle() + + "\n Genero: " + getGenre() + + "\n Year: " + getYear() + + "\n Creator: " + getCreator() + + "\n Duration: " + getDuration(); + } + + public static ArrayList makeSeriesList() { + ArrayList series = new ArrayList(); + + for (int i = 1; i <= 5; i++) { + series.add(new Serie("Serie "+i, "genero "+i, "creador "+i, 1200, 5, Chapter.makeChaptersList())); + + } + + return series; + } + +} diff --git a/AmazonViewer/src/com/anncode/util/AmazonUtil.java b/AmazonViewer/src/com/anncode/util/AmazonUtil.java new file mode 100644 index 0000000..f992b4b --- /dev/null +++ b/AmazonViewer/src/com/anncode/util/AmazonUtil.java @@ -0,0 +1,37 @@ +package com.anncode.util; + +import java.util.Scanner; + +public class AmazonUtil { + + public static int validateUserResponseMenu(int min, int max) { + //Leer la respuesta del usuario + Scanner sc = new Scanner(System.in); + + //Validar respuesta int + while(!sc.hasNextInt()) { + sc.next(); + System.out.println("No ingresaste una opción válida1"); + System.out.println("Intenta otra vez1"); + } + + int response = sc.nextInt(); + + //Validar rango de respuesta + while(response < min || response > max) { + //Solicitar de nuevo la respuesta + System.out.println("No ingresaste una opción válida"); + System.out.println("Intenta otra vez"); + + while(!sc.hasNextInt()) { + sc.next(); + System.out.println("No ingresaste una opción válida"); + System.out.println("Intenta otra vez"); + } + response = sc.nextInt(); + } + System.out.println("Tu Respuesta fue: " + response); + return response; + } + +} diff --git a/Modularizacion/.idea/misc.xml b/Modularizacion/.idea/misc.xml deleted file mode 100644 index 8e8843c..0000000 --- a/Modularizacion/.idea/misc.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/Modularizacion/.idea/modules.xml b/Modularizacion/.idea/modules.xml deleted file mode 100644 index b0cf185..0000000 --- a/Modularizacion/.idea/modules.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/Modularizacion/.idea/uiDesigner.xml b/Modularizacion/.idea/uiDesigner.xml deleted file mode 100644 index e96534f..0000000 --- a/Modularizacion/.idea/uiDesigner.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modularizacion/.idea/workspace.xml b/Modularizacion/.idea/workspace.xml deleted file mode 100644 index d073899..0000000 --- a/Modularizacion/.idea/workspace.xml +++ /dev/null @@ -1,550 +0,0 @@ - - - - - - - - - - - - - - - $PROJECT_DIR$/anncode.util/src - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + +
+ + +
+
+ + +
+ + + + + + + + +
+ +

Class Main

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • com.anncode.amazonviewer.Main
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class Main
    +extends java.lang.Object
    +

    AmazonViewer

    + AmazonViewer es un programa que permite visualizar Movies, Series con sus respectivos Chapters, + Books y Magazines. Te permite generar reportes generales y con fecha del día. +

    + Existen algunas reglas como que todos los elementos pueden ser visualizadors o leídos a excepción + de las Magazines, estás solo pueden ser vistas a modo de exposición sin ser leídas.

    +
    +
    Since:
    +
    2018
    +
    Version:
    +
    1.1
    +
    Author:
    +
    anncode
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Main​() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static voidmain​(java.lang.String[] args) 
      static voidmakeReport​() 
      static voidmakeReport​(java.util.Date date) 
      static voidshowBooks​() 
      static voidshowChapters​(java.util.ArrayList<Chapter> chaptersOfSerieSelected) 
      static voidshowMagazines​() 
      static voidshowMenu​() 
      static voidshowMovies​() 
      static voidshowSeries​() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Main

        +
        public Main​()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        main

        +
        public static void main​(java.lang.String[] args)
        +
      • +
      + + + +
        +
      • +

        showMenu

        +
        public static void showMenu​()
        +
      • +
      + + + +
        +
      • +

        showMovies

        +
        public static void showMovies​()
        +
      • +
      + + + +
        +
      • +

        showSeries

        +
        public static void showSeries​()
        +
      • +
      + + + +
        +
      • +

        showChapters

        +
        public static void showChapters​(java.util.ArrayList<Chapter> chaptersOfSerieSelected)
        +
      • +
      + + + +
        +
      • +

        showBooks

        +
        public static void showBooks​()
        +
      • +
      + + + +
        +
      • +

        showMagazines

        +
        public static void showMagazines​()
        +
      • +
      + + + +
        +
      • +

        makeReport

        +
        public static void makeReport​()
        +
      • +
      + + + +
        +
      • +

        makeReport

        +
        public static void makeReport​(java.util.Date date)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/AmazonViewer/doc/com/anncode/amazonviewer/class-use/Main.html b/AmazonViewer/doc/com/anncode/amazonviewer/class-use/Main.html new file mode 100644 index 0000000..12fcd25 --- /dev/null +++ b/AmazonViewer/doc/com/anncode/amazonviewer/class-use/Main.html @@ -0,0 +1,152 @@ + + + + + +Uses of Class com.anncode.amazonviewer.Main + + + + + + + + + + + + + + +
+ + + + +
+ + +
+

Uses of Class
com.anncode.amazonviewer.Main

+
+
No usage of com.anncode.amazonviewer.Main
+ + + + + + diff --git a/AmazonViewer/doc/com/anncode/amazonviewer/model/Book.html b/AmazonViewer/doc/com/anncode/amazonviewer/model/Book.html new file mode 100644 index 0000000..ecf1e4c --- /dev/null +++ b/AmazonViewer/doc/com/anncode/amazonviewer/model/Book.html @@ -0,0 +1,523 @@ + + + + + +Book + + + + + + + + + + + + + + +
+ + + + +
+ + + +
+ +

Class Book

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

      Constructor Detail

      + + + +
        +
      • +

        Book

        +
        public Book​(java.lang.String title,
        +            java.util.Date edititionDate,
        +            java.lang.String editorial,
        +            java.lang.String[] authors)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getId

        +
        public int getId​()
        +
      • +
      + + + +
        +
      • +

        getIsbn

        +
        public java.lang.String getIsbn​()
        +
      • +
      + + + +
        +
      • +

        setIsbn

        +
        public void setIsbn​(java.lang.String isbn)
        +
      • +
      + + + +
        +
      • +

        isReaded

        +
        public java.lang.String isReaded​()
        +
      • +
      + + + +
        +
      • +

        setReaded

        +
        public void setReaded​(boolean readed)
        +
      • +
      + + + +
        +
      • +

        getIsReaded

        +
        public boolean getIsReaded​()
        +
      • +
      + + + +
        +
      • +

        getTimeReaded

        +
        public int getTimeReaded​()
        +
      • +
      + + + +
        +
      • +

        setTimeReaded

        +
        public void setTimeReaded​(int timeReaded)
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString​()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        startToSee

        +
        public java.util.Date startToSee​(java.util.Date dateI)
        +
        Description copied from interface: IVisualizable
        +
        Este método captura el tiempo exacto de inicio de visualización
        +
        +
        Specified by:
        +
        startToSee in interface IVisualizable
        +
        Parameters:
        +
        dateI - Es un objeto Date con el tiempo de inicio exacto.
        +
        Returns:
        +
        Devuelve la fecha y hora capturada
        +
        +
      • +
      + + + +
        +
      • +

        stopToSee

        +
        public void stopToSee​(java.util.Date dateI,
        +                      java.util.Date dateF)
        +
        Description copied from interface: IVisualizable
        +
        Este método captura el tiempo exacto de inicio y final de visualización
        +
        +
        Specified by:
        +
        stopToSee in interface IVisualizable
        +
        Parameters:
        +
        dateI - Es un objeto Date con el tiempo de inicio exacto.
        +
        dateF - Es un objeto Date con el tiempo de final exacto.
        +
        +
      • +
      + + + +
        +
      • +

        view

        +
        public void view​()
        +
      • +
      + + + +
        +
      • +

        makeBookList

        +
        public static java.util.ArrayList<Book> makeBookList​()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/AmazonViewer/doc/com/anncode/amazonviewer/model/Chapter.html b/AmazonViewer/doc/com/anncode/amazonviewer/model/Chapter.html new file mode 100644 index 0000000..671241a --- /dev/null +++ b/AmazonViewer/doc/com/anncode/amazonviewer/model/Chapter.html @@ -0,0 +1,462 @@ + + + + + +Chapter + + + + + + + + + + + + + + +
+ + + + +
+ + + +
+ +

Class Chapter

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

      Constructor Detail

      + + + +
        +
      • +

        Chapter

        +
        public Chapter​(java.lang.String title,
        +               java.lang.String genre,
        +               java.lang.String creator,
        +               int duration,
        +               short year,
        +               int sessionNumber,
        +               Serie serie)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getId

        +
        public int getId​()
        +
        +
        Overrides:
        +
        getId in class Movie
        +
        +
      • +
      + + + +
        +
      • +

        getSessionNumber

        +
        public int getSessionNumber​()
        +
      • +
      + + + +
        +
      • +

        setSessionNumber

        +
        public void setSessionNumber​(int sessionNumber)
        +
      • +
      + + + +
        +
      • +

        getSerie

        +
        public Serie getSerie​()
        +
      • +
      + + + +
        +
      • +

        setSerie

        +
        public void setSerie​(Serie serie)
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString​()
        +
        +
        Overrides:
        +
        toString in class Movie
        +
        +
      • +
      + + + +
        +
      • +

        makeChaptersList

        +
        public static java.util.ArrayList<Chapter> makeChaptersList​(Serie serie)
        +
      • +
      + + + +
        +
      • +

        view

        +
        public void view​()
        +
        Description copied from class: Movie
        +
        view() es un método abstracto obligatorio de implementar
        +
        +
        Overrides:
        +
        view in class Movie
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/AmazonViewer/doc/com/anncode/amazonviewer/model/Film.html b/AmazonViewer/doc/com/anncode/amazonviewer/model/Film.html new file mode 100644 index 0000000..531e53c --- /dev/null +++ b/AmazonViewer/doc/com/anncode/amazonviewer/model/Film.html @@ -0,0 +1,512 @@ + + + + + +Film + + + + + + + + + + + + + + +
+ + + + +
+ + + +
+ +

Class Film

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • com.anncode.amazonviewer.model.Film
    • +
    +
  • +
+
+
    +
  • +
    +
    Direct Known Subclasses:
    +
    Movie, Serie
    +
    +
    +
    +
    public abstract class Film
    +extends java.lang.Object
    +

    Film

    + Film es una clase padre abstracta +

    + Esta clase es la clase base de la familia Films, como es abstracta + no pueden crearse instancias. Continene el método abstracto + view() que es obligatorio implementar para todo aquél que pertenezca a la familia.

    +
    +
    Since:
    +
    2018
    +
    Version:
    +
    1.1
    +
    Author:
    +
    anncode
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Film​(java.lang.String title, + java.lang.String genre, + java.lang.String creator, + int duration) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.lang.StringgetCreator​() 
      intgetDuration​() 
      java.lang.StringgetGenre​() 
      booleangetIsViewed​() 
      java.lang.StringgetTitle​() 
      shortgetYear​() 
      java.lang.StringisViewed​() 
      voidsetCreator​(java.lang.String creator) 
      voidsetDuration​(int duration) 
      voidsetGenre​(java.lang.String genre) 
      voidsetTitle​(java.lang.String title) 
      voidsetViewed​(boolean viewed) 
      voidsetYear​(short year) 
      abstract voidview​() +
      view() es un método abstracto obligatorio de implementar
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Film

        +
        public Film​(java.lang.String title,
        +            java.lang.String genre,
        +            java.lang.String creator,
        +            int duration)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getTitle

        +
        public java.lang.String getTitle​()
        +
      • +
      + + + +
        +
      • +

        setTitle

        +
        public void setTitle​(java.lang.String title)
        +
      • +
      + + + +
        +
      • +

        getGenre

        +
        public java.lang.String getGenre​()
        +
      • +
      + + + +
        +
      • +

        setGenre

        +
        public void setGenre​(java.lang.String genre)
        +
      • +
      + + + +
        +
      • +

        getCreator

        +
        public java.lang.String getCreator​()
        +
      • +
      + + + +
        +
      • +

        setCreator

        +
        public void setCreator​(java.lang.String creator)
        +
      • +
      + + + +
        +
      • +

        getDuration

        +
        public int getDuration​()
        +
      • +
      + + + +
        +
      • +

        setDuration

        +
        public void setDuration​(int duration)
        +
      • +
      + + + +
        +
      • +

        getYear

        +
        public short getYear​()
        +
      • +
      + + + +
        +
      • +

        setYear

        +
        public void setYear​(short year)
        +
      • +
      + + + +
        +
      • +

        isViewed

        +
        public java.lang.String isViewed​()
        +
      • +
      + + + +
        +
      • +

        getIsViewed

        +
        public boolean getIsViewed​()
        +
      • +
      + + + +
        +
      • +

        setViewed

        +
        public void setViewed​(boolean viewed)
        +
      • +
      + + + +
        +
      • +

        view

        +
        public abstract void view​()
        +
        view() es un método abstracto obligatorio de implementar
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/AmazonViewer/doc/com/anncode/amazonviewer/model/IVisualizable.html b/AmazonViewer/doc/com/anncode/amazonviewer/model/IVisualizable.html new file mode 100644 index 0000000..6870a22 --- /dev/null +++ b/AmazonViewer/doc/com/anncode/amazonviewer/model/IVisualizable.html @@ -0,0 +1,288 @@ + + + + + +IVisualizable + + + + + + + + + + + + + + +
+ + + + +
+ + + +
+ +

Interface IVisualizable

+
+
+
+
    +
  • +
    +
    All Known Implementing Classes:
    +
    Book, Chapter, Movie
    +
    +
    +
    +
    public interface IVisualizable
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethodDescription
      java.util.DatestartToSee​(java.util.Date dateI) +
      Este método captura el tiempo exacto de inicio de visualización
      +
      voidstopToSee​(java.util.Date dateI, + java.util.Date dateF) +
      Este método captura el tiempo exacto de inicio y final de visualización
      +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        startToSee

        +
        java.util.Date startToSee​(java.util.Date dateI)
        +
        Este método captura el tiempo exacto de inicio de visualización
        +
        +
        Parameters:
        +
        dateI - Es un objeto Date con el tiempo de inicio exacto.
        +
        Returns:
        +
        Devuelve la fecha y hora capturada
        +
        +
      • +
      + + + +
        +
      • +

        stopToSee

        +
        void stopToSee​(java.util.Date dateI,
        +               java.util.Date dateF)
        +
        Este método captura el tiempo exacto de inicio y final de visualización
        +
        +
        Parameters:
        +
        dateI - Es un objeto Date con el tiempo de inicio exacto.
        +
        dateF - Es un objeto Date con el tiempo de final exacto.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/AmazonViewer/doc/com/anncode/amazonviewer/model/Magazine.html b/AmazonViewer/doc/com/anncode/amazonviewer/model/Magazine.html new file mode 100644 index 0000000..27fa618 --- /dev/null +++ b/AmazonViewer/doc/com/anncode/amazonviewer/model/Magazine.html @@ -0,0 +1,351 @@ + + + + + +Magazine + + + + + + + + + + + + + + +
+ + + + +
+ + + +
+ +

Class Magazine

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

      Constructor Detail

      + + + +
        +
      • +

        Magazine

        +
        public Magazine​(java.lang.String title,
        +                java.util.Date edititionDate,
        +                java.lang.String editorial)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getId

        +
        public int getId​()
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString​()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        makeMagazineList

        +
        public static java.util.ArrayList<Magazine> makeMagazineList​()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/AmazonViewer/doc/com/anncode/amazonviewer/model/Movie.html b/AmazonViewer/doc/com/anncode/amazonviewer/model/Movie.html new file mode 100644 index 0000000..a6ee5b6 --- /dev/null +++ b/AmazonViewer/doc/com/anncode/amazonviewer/model/Movie.html @@ -0,0 +1,466 @@ + + + + + +Movie + + + + + + + + + + + + + + +
+ + + + +
+ + + +
+ +

Class Movie

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

      Constructor Detail

      + + + +
        +
      • +

        Movie

        +
        public Movie​(java.lang.String title,
        +             java.lang.String genre,
        +             java.lang.String creator,
        +             int duration,
        +             short year)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getId

        +
        public int getId​()
        +
      • +
      + + + +
        +
      • +

        getTimeViewed

        +
        public int getTimeViewed​()
        +
      • +
      + + + +
        +
      • +

        setTimeViewed

        +
        public void setTimeViewed​(int timeViewed)
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString​()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        startToSee

        +
        public java.util.Date startToSee​(java.util.Date dateI)
        +
        Este método captura el tiempo exacto de inicio de visualización
        +
        +
        Specified by:
        +
        startToSee in interface IVisualizable
        +
        Parameters:
        +
        dateI - Es un objeto Date con el tiempo de inicio exacto.
        +
        Returns:
        +
        Devuelve la fecha y hora capturada
        +
        +
      • +
      + + + +
        +
      • +

        stopToSee

        +
        public void stopToSee​(java.util.Date dateI,
        +                      java.util.Date dateF)
        +
        Este método captura el tiempo exacto de inicio y final de visualización
        +
        +
        Specified by:
        +
        stopToSee in interface IVisualizable
        +
        Parameters:
        +
        dateI - Es un objeto Date con el tiempo de inicio exacto.
        +
        dateF - Es un objeto Date con el tiempo de final exacto.
        +
        +
      • +
      + + + +
        +
      • +

        makeMoviesList

        +
        public static java.util.ArrayList<Movie> makeMoviesList​()
        +
      • +
      + + + +
        +
      • +

        view

        +
        public void view​()
        +
        view() es un método abstracto obligatorio de implementar
        +
        +
        Specified by:
        +
        view in class Film
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/AmazonViewer/doc/com/anncode/amazonviewer/model/Publication.html b/AmazonViewer/doc/com/anncode/amazonviewer/model/Publication.html new file mode 100644 index 0000000..71b4472 --- /dev/null +++ b/AmazonViewer/doc/com/anncode/amazonviewer/model/Publication.html @@ -0,0 +1,409 @@ + + + + + +Publication + + + + + + + + + + + + + + +
+ + + + +
+ + + +
+ +

Class Publication

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • com.anncode.amazonviewer.model.Publication
    • +
    +
  • +
+
+
    +
  • +
    +
    Direct Known Subclasses:
    +
    Book, Magazine
    +
    +
    +
    +
    public class Publication
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Publication​(java.lang.String title, + java.util.Date edititionDate, + java.lang.String editorial) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.lang.String[]getAuthors​() 
      java.util.DategetEdititionDate​() 
      java.lang.StringgetEditorial​() 
      java.lang.StringgetTitle​() 
      voidsetAuthors​(java.lang.String[] authors) 
      voidsetEdititionDate​(java.util.Date edititionDate) 
      voidsetEditorial​(java.lang.String editorial) 
      voidsetTitle​(java.lang.String title) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Publication

        +
        public Publication​(java.lang.String title,
        +                   java.util.Date edititionDate,
        +                   java.lang.String editorial)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getTitle

        +
        public java.lang.String getTitle​()
        +
      • +
      + + + +
        +
      • +

        setTitle

        +
        public void setTitle​(java.lang.String title)
        +
      • +
      + + + +
        +
      • +

        getEdititionDate

        +
        public java.util.Date getEdititionDate​()
        +
      • +
      + + + +
        +
      • +

        setEdititionDate

        +
        public void setEdititionDate​(java.util.Date edititionDate)
        +
      • +
      + + + +
        +
      • +

        getEditorial

        +
        public java.lang.String getEditorial​()
        +
      • +
      + + + +
        +
      • +

        setEditorial

        +
        public void setEditorial​(java.lang.String editorial)
        +
      • +
      + + + +
        +
      • +

        getAuthors

        +
        public java.lang.String[] getAuthors​()
        +
      • +
      + + + +
        +
      • +

        setAuthors

        +
        public void setAuthors​(java.lang.String[] authors)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/AmazonViewer/doc/com/anncode/amazonviewer/model/Serie.html b/AmazonViewer/doc/com/anncode/amazonviewer/model/Serie.html new file mode 100644 index 0000000..da50e08 --- /dev/null +++ b/AmazonViewer/doc/com/anncode/amazonviewer/model/Serie.html @@ -0,0 +1,433 @@ + + + + + +Serie + + + + + + + + + + + + + + +
+ + + + +
+ + + +
+ +

Class Serie

+
+
+ +
+
    +
  • +
    +
    +
    public class Serie
    +extends Film
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Serie

        +
        public Serie​(java.lang.String title,
        +             java.lang.String genre,
        +             java.lang.String creator,
        +             int duration,
        +             int sessionQuantity)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getId

        +
        public int getId​()
        +
      • +
      + + + +
        +
      • +

        getSessionQuantity

        +
        public int getSessionQuantity​()
        +
      • +
      + + + +
        +
      • +

        setSessionQuantity

        +
        public void setSessionQuantity​(int sessionQuantity)
        +
      • +
      + + + +
        +
      • +

        getChapters

        +
        public java.util.ArrayList<Chapter> getChapters​()
        +
      • +
      + + + +
        +
      • +

        setChapters

        +
        public void setChapters​(java.util.ArrayList<Chapter> chapters)
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString​()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        makeSeriesList

        +
        public static java.util.ArrayList<Serie> makeSeriesList​()
        +
      • +
      + + + +
        +
      • +

        view

        +
        public void view​()
        +
        Description copied from class: Film
        +
        view() es un método abstracto obligatorio de implementar
        +
        +
        Specified by:
        +
        view in class Film
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/AmazonViewer/doc/com/anncode/amazonviewer/model/class-use/Book.html b/AmazonViewer/doc/com/anncode/amazonviewer/model/class-use/Book.html new file mode 100644 index 0000000..4356e96 --- /dev/null +++ b/AmazonViewer/doc/com/anncode/amazonviewer/model/class-use/Book.html @@ -0,0 +1,194 @@ + + + + + +Uses of Class com.anncode.amazonviewer.model.Book + + + + + + + + + + + + + + +
+ + + + +
+ + +
+

Uses of Class
com.anncode.amazonviewer.model.Book

+
+
+ +
+ + + + + + diff --git a/AmazonViewer/doc/com/anncode/amazonviewer/model/class-use/Chapter.html b/AmazonViewer/doc/com/anncode/amazonviewer/model/class-use/Chapter.html new file mode 100644 index 0000000..0fe999b --- /dev/null +++ b/AmazonViewer/doc/com/anncode/amazonviewer/model/class-use/Chapter.html @@ -0,0 +1,238 @@ + + + + + +Uses of Class com.anncode.amazonviewer.model.Chapter + + + + + + + + + + + + + + +
+ + + + +
+ + +
+

Uses of Class
com.anncode.amazonviewer.model.Chapter

+
+
+ +
+ + + + + + diff --git a/AmazonViewer/doc/com/anncode/amazonviewer/model/class-use/Film.html b/AmazonViewer/doc/com/anncode/amazonviewer/model/class-use/Film.html new file mode 100644 index 0000000..8d688c8 --- /dev/null +++ b/AmazonViewer/doc/com/anncode/amazonviewer/model/class-use/Film.html @@ -0,0 +1,209 @@ + + + + + +Uses of Class com.anncode.amazonviewer.model.Film + + + + + + + + + + + + + + +
+ + + + +
+ + +
+

Uses of Class
com.anncode.amazonviewer.model.Film

+
+
+ +
+ + + + + + diff --git a/AmazonViewer/doc/com/anncode/amazonviewer/model/class-use/IVisualizable.html b/AmazonViewer/doc/com/anncode/amazonviewer/model/class-use/IVisualizable.html new file mode 100644 index 0000000..9a6e24b --- /dev/null +++ b/AmazonViewer/doc/com/anncode/amazonviewer/model/class-use/IVisualizable.html @@ -0,0 +1,209 @@ + + + + + +Uses of Interface com.anncode.amazonviewer.model.IVisualizable + + + + + + + + + + + + + + +
+ + + + +
+ + +
+

Uses of Interface
com.anncode.amazonviewer.model.IVisualizable

+
+
+ +
+ + + + + + diff --git a/AmazonViewer/doc/com/anncode/amazonviewer/model/class-use/Magazine.html b/AmazonViewer/doc/com/anncode/amazonviewer/model/class-use/Magazine.html new file mode 100644 index 0000000..3d238cb --- /dev/null +++ b/AmazonViewer/doc/com/anncode/amazonviewer/model/class-use/Magazine.html @@ -0,0 +1,194 @@ + + + + + +Uses of Class com.anncode.amazonviewer.model.Magazine + + + + + + + + + + + + + + +
+ + + + +
+ + +
+

Uses of Class
com.anncode.amazonviewer.model.Magazine

+
+
+ +
+ + + + + + diff --git a/AmazonViewer/doc/com/anncode/amazonviewer/model/class-use/Movie.html b/AmazonViewer/doc/com/anncode/amazonviewer/model/class-use/Movie.html new file mode 100644 index 0000000..3938335 --- /dev/null +++ b/AmazonViewer/doc/com/anncode/amazonviewer/model/class-use/Movie.html @@ -0,0 +1,211 @@ + + + + + +Uses of Class com.anncode.amazonviewer.model.Movie + + + + + + + + + + + + + + +
+ + + + +
+ + +
+

Uses of Class
com.anncode.amazonviewer.model.Movie

+
+
+ +
+ + + + + + diff --git a/AmazonViewer/doc/com/anncode/amazonviewer/model/class-use/Publication.html b/AmazonViewer/doc/com/anncode/amazonviewer/model/class-use/Publication.html new file mode 100644 index 0000000..7d4e866 --- /dev/null +++ b/AmazonViewer/doc/com/anncode/amazonviewer/model/class-use/Publication.html @@ -0,0 +1,199 @@ + + + + + +Uses of Class com.anncode.amazonviewer.model.Publication + + + + + + + + + + + + + + +
+ + + + +
+ + +
+

Uses of Class
com.anncode.amazonviewer.model.Publication

+
+
+ +
+ + + + + + diff --git a/AmazonViewer/doc/com/anncode/amazonviewer/model/class-use/Serie.html b/AmazonViewer/doc/com/anncode/amazonviewer/model/class-use/Serie.html new file mode 100644 index 0000000..2017e40 --- /dev/null +++ b/AmazonViewer/doc/com/anncode/amazonviewer/model/class-use/Serie.html @@ -0,0 +1,248 @@ + + + + + +Uses of Class com.anncode.amazonviewer.model.Serie + + + + + + + + + + + + + + +
+ + + + +
+ + +
+

Uses of Class
com.anncode.amazonviewer.model.Serie

+
+
+ +
+ + + + + + diff --git a/AmazonViewer/doc/com/anncode/amazonviewer/model/package-frame.html b/AmazonViewer/doc/com/anncode/amazonviewer/model/package-frame.html new file mode 100644 index 0000000..6317c1f --- /dev/null +++ b/AmazonViewer/doc/com/anncode/amazonviewer/model/package-frame.html @@ -0,0 +1,39 @@ + + + + + +com.anncode.amazonviewer.model + + + + + + + + + + + + +

com.anncode.amazonviewer.model

+
+

Interfaces

+ +

Classes

+ +
+ + diff --git a/AmazonViewer/doc/com/anncode/amazonviewer/model/package-summary.html b/AmazonViewer/doc/com/anncode/amazonviewer/model/package-summary.html new file mode 100644 index 0000000..18164dc --- /dev/null +++ b/AmazonViewer/doc/com/anncode/amazonviewer/model/package-summary.html @@ -0,0 +1,216 @@ + + + + + +com.anncode.amazonviewer.model + + + + + + + + + + + + + + +
+ + + + +
+ + +
+

Package com.anncode.amazonviewer.model

+
+
+ +
+ + + + + + diff --git a/AmazonViewer/doc/com/anncode/amazonviewer/model/package-tree.html b/AmazonViewer/doc/com/anncode/amazonviewer/model/package-tree.html new file mode 100644 index 0000000..262007f --- /dev/null +++ b/AmazonViewer/doc/com/anncode/amazonviewer/model/package-tree.html @@ -0,0 +1,184 @@ + + + + + +com.anncode.amazonviewer.model Class Hierarchy + + + + + + + + + + + + + + +
+ + + + +
+ + +
+

Hierarchy For Package com.anncode.amazonviewer.model

+Package Hierarchies: + +
+
+

Class Hierarchy

+
    +
  • java.lang.Object +
      +
    • com.anncode.amazonviewer.model.Film +
        +
      • com.anncode.amazonviewer.model.Movie (implements com.anncode.amazonviewer.model.IVisualizable) +
          +
        • com.anncode.amazonviewer.model.Chapter
        • +
        +
      • +
      • com.anncode.amazonviewer.model.Serie
      • +
      +
    • +
    • com.anncode.amazonviewer.model.Publication +
        +
      • com.anncode.amazonviewer.model.Book (implements com.anncode.amazonviewer.model.IVisualizable)
      • +
      • com.anncode.amazonviewer.model.Magazine
      • +
      +
    • +
    +
  • +
+

Interface Hierarchy

+ +
+ + + + + + diff --git a/AmazonViewer/doc/com/anncode/amazonviewer/model/package-use.html b/AmazonViewer/doc/com/anncode/amazonviewer/model/package-use.html new file mode 100644 index 0000000..b134457 --- /dev/null +++ b/AmazonViewer/doc/com/anncode/amazonviewer/model/package-use.html @@ -0,0 +1,245 @@ + + + + + +Uses of Package com.anncode.amazonviewer.model + + + + + + + + + + + + + + +
+ + + + +
+ + +
+

Uses of Package
com.anncode.amazonviewer.model

+
+
+ +
+ + + + + + diff --git a/AmazonViewer/doc/com/anncode/amazonviewer/package-frame.html b/AmazonViewer/doc/com/anncode/amazonviewer/package-frame.html new file mode 100644 index 0000000..88eafa0 --- /dev/null +++ b/AmazonViewer/doc/com/anncode/amazonviewer/package-frame.html @@ -0,0 +1,29 @@ + + + + + +com.anncode.amazonviewer + + + + + + + + + + + + +

com.anncode.amazonviewer

+
+

Classes

+ +
+ + diff --git a/AmazonViewer/doc/com/anncode/amazonviewer/package-summary.html b/AmazonViewer/doc/com/anncode/amazonviewer/package-summary.html new file mode 100644 index 0000000..09852f4 --- /dev/null +++ b/AmazonViewer/doc/com/anncode/amazonviewer/package-summary.html @@ -0,0 +1,172 @@ + + + + + +com.anncode.amazonviewer + + + + + + + + + + + + + + +
+ + + + +
+ + +
+

Package com.anncode.amazonviewer

+
+
+
    +
  • + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    Main +
    AmazonViewer
    +
    +
  • +
+
+ + + + + + diff --git a/AmazonViewer/doc/com/anncode/amazonviewer/package-tree.html b/AmazonViewer/doc/com/anncode/amazonviewer/package-tree.html new file mode 100644 index 0000000..9f4e6a9 --- /dev/null +++ b/AmazonViewer/doc/com/anncode/amazonviewer/package-tree.html @@ -0,0 +1,165 @@ + + + + + +com.anncode.amazonviewer Class Hierarchy + + + + + + + + + + + + + + +
+ + + + +
+ + +
+

Hierarchy For Package com.anncode.amazonviewer

+Package Hierarchies: + +
+
+

Class Hierarchy

+
    +
  • java.lang.Object +
      +
    • com.anncode.amazonviewer.Main
    • +
    +
  • +
+
+ + + + + + diff --git a/AmazonViewer/doc/com/anncode/amazonviewer/package-use.html b/AmazonViewer/doc/com/anncode/amazonviewer/package-use.html new file mode 100644 index 0000000..93769a3 --- /dev/null +++ b/AmazonViewer/doc/com/anncode/amazonviewer/package-use.html @@ -0,0 +1,152 @@ + + + + + +Uses of Package com.anncode.amazonviewer + + + + + + + + + + + + + + +
+ + + + +
+ + +
+

Uses of Package
com.anncode.amazonviewer

+
+
No usage of com.anncode.amazonviewer
+ + + + + + diff --git a/AmazonViewer/doc/com/anncode/util/AmazonUtil.html b/AmazonViewer/doc/com/anncode/util/AmazonUtil.html new file mode 100644 index 0000000..65161dd --- /dev/null +++ b/AmazonViewer/doc/com/anncode/util/AmazonUtil.html @@ -0,0 +1,305 @@ + + + + + +AmazonUtil + + + + + + + + + + + + + + +
+ + + + +
+ + + +
+ +

Class AmazonUtil

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • com.anncode.util.AmazonUtil
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class AmazonUtil
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      AmazonUtil​() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static intvalidateUserResponseMenu​(int min, + int max) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        AmazonUtil

        +
        public AmazonUtil​()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        validateUserResponseMenu

        +
        public static int validateUserResponseMenu​(int min,
        +                                           int max)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/AmazonViewer/doc/com/anncode/util/class-use/AmazonUtil.html b/AmazonViewer/doc/com/anncode/util/class-use/AmazonUtil.html new file mode 100644 index 0000000..4ef9b5b --- /dev/null +++ b/AmazonViewer/doc/com/anncode/util/class-use/AmazonUtil.html @@ -0,0 +1,152 @@ + + + + + +Uses of Class com.anncode.util.AmazonUtil + + + + + + + + + + + + + + +
+ + + + +
+ + +
+

Uses of Class
com.anncode.util.AmazonUtil

+
+
No usage of com.anncode.util.AmazonUtil
+ + + + + + diff --git a/AmazonViewer/doc/com/anncode/util/package-frame.html b/AmazonViewer/doc/com/anncode/util/package-frame.html new file mode 100644 index 0000000..a9e22f1 --- /dev/null +++ b/AmazonViewer/doc/com/anncode/util/package-frame.html @@ -0,0 +1,29 @@ + + + + + +com.anncode.util + + + + + + + + + + + + +

com.anncode.util

+
+

Classes

+ +
+ + diff --git a/AmazonViewer/doc/com/anncode/util/package-summary.html b/AmazonViewer/doc/com/anncode/util/package-summary.html new file mode 100644 index 0000000..a7bdb8f --- /dev/null +++ b/AmazonViewer/doc/com/anncode/util/package-summary.html @@ -0,0 +1,170 @@ + + + + + +com.anncode.util + + + + + + + + + + + + + + +
+ + + + +
+ + +
+

Package com.anncode.util

+
+
+
    +
  • + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    AmazonUtil 
    +
  • +
+
+ + + + + + diff --git a/AmazonViewer/doc/com/anncode/util/package-tree.html b/AmazonViewer/doc/com/anncode/util/package-tree.html new file mode 100644 index 0000000..5ee9092 --- /dev/null +++ b/AmazonViewer/doc/com/anncode/util/package-tree.html @@ -0,0 +1,165 @@ + + + + + +com.anncode.util Class Hierarchy + + + + + + + + + + + + + + +
+ + + + +
+ + +
+

Hierarchy For Package com.anncode.util

+Package Hierarchies: + +
+
+

Class Hierarchy

+
    +
  • java.lang.Object + +
  • +
+
+ + + + + + diff --git a/AmazonViewer/doc/com/anncode/util/package-use.html b/AmazonViewer/doc/com/anncode/util/package-use.html new file mode 100644 index 0000000..9b96ffd --- /dev/null +++ b/AmazonViewer/doc/com/anncode/util/package-use.html @@ -0,0 +1,152 @@ + + + + + +Uses of Package com.anncode.util + + + + + + + + + + + + + + +
+ + + + +
+ + +
+

Uses of Package
com.anncode.util

+
+
No usage of com.anncode.util
+ + + + + + diff --git a/AmazonViewer/doc/constant-values.html b/AmazonViewer/doc/constant-values.html new file mode 100644 index 0000000..f3661c0 --- /dev/null +++ b/AmazonViewer/doc/constant-values.html @@ -0,0 +1,152 @@ + + + + + +Constant Field Values + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ + +
+ + +
+

Constant Field Values

+

Contents

+
+ +
+ + + + + + + +
+ + + + diff --git a/AmazonViewer/doc/deprecated-list.html b/AmazonViewer/doc/deprecated-list.html new file mode 100644 index 0000000..1889a28 --- /dev/null +++ b/AmazonViewer/doc/deprecated-list.html @@ -0,0 +1,152 @@ + + + + + +Deprecated List + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ + +
+ + +
+

Deprecated API

+

Contents

+
+ +
+ + + + + + + +
+ + + + diff --git a/AmazonViewer/doc/help-doc.html b/AmazonViewer/doc/help-doc.html new file mode 100644 index 0000000..494c4bb --- /dev/null +++ b/AmazonViewer/doc/help-doc.html @@ -0,0 +1,257 @@ + + + + + +API Help + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ + +
+ + +
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+
    +
  • +

    Overview

    +

    The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

    +
  • +
  • +

    Package

    +

    Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:

    +
      +
    • Interfaces (italic)
    • +
    • Classes
    • +
    • Enums
    • +
    • Exceptions
    • +
    • Errors
    • +
    • Annotation Types
    • +
    +
  • +
  • +

    Class/Interface

    +

    Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    +
      +
    • Class inheritance diagram
    • +
    • Direct Subclasses
    • +
    • All Known Subinterfaces
    • +
    • All Known Implementing Classes
    • +
    • Class/interface declaration
    • +
    • Class/interface description
    • +
    +
      +
    • Nested Class Summary
    • +
    • Field Summary
    • +
    • Constructor Summary
    • +
    • Method Summary
    • +
    +
      +
    • Field Detail
    • +
    • Constructor Detail
    • +
    • Method Detail
    • +
    +

    Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

    +
  • +
  • +

    Annotation Type

    +

    Each annotation type has its own separate page with the following sections:

    +
      +
    • Annotation Type declaration
    • +
    • Annotation Type description
    • +
    • Required Element Summary
    • +
    • Optional Element Summary
    • +
    • Element Detail
    • +
    +
  • +
  • +

    Enum

    +

    Each enum has its own separate page with the following sections:

    +
      +
    • Enum declaration
    • +
    • Enum description
    • +
    • Enum Constant Summary
    • +
    • Enum Constant Detail
    • +
    +
  • +
  • +

    Use

    +

    Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

    +
  • +
  • +

    Tree (Class Hierarchy)

    +

    There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.

    +
      +
    • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
    • +
    • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
    • +
    +
  • +
  • +

    Deprecated API

    +

    The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

    +
  • +
  • +

    Index

    +

    The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

    +
  • +
  • +

    Prev/Next

    +

    These links take you to the next or previous class, interface, package, or related page.

    +
  • +
  • +

    Frames/No Frames

    +

    These links show and hide the HTML frames. All pages are available with or without frames.

    +
  • +
  • +

    All Classes

    +

    The All Classes link shows all classes and interfaces except non-static nested types.

    +
  • +
  • +

    Serialized Form

    +

    Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

    +
  • +
  • +

    Constant Field Values

    +

    The Constant Field Values page lists the static final fields and their values.

    +
  • +
+This help file applies to API documentation generated using the standard doclet.
+ +
+ + + + + + + +
+ + + + diff --git a/AmazonViewer/doc/index-files/index-1.html b/AmazonViewer/doc/index-files/index-1.html new file mode 100644 index 0000000..a48fb38 --- /dev/null +++ b/AmazonViewer/doc/index-files/index-1.html @@ -0,0 +1,159 @@ + + + + + +A-Index + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ + +
+ + +
A B C F G I M P S T V  + + +

A

+
+
AmazonUtil - Class in com.anncode.util
+
 
+
AmazonUtil() - Constructor for class com.anncode.util.AmazonUtil
+
 
+
+A B C F G I M P S T V 
+ +
+ + + + + + + +
+ + + + diff --git a/AmazonViewer/doc/index-files/index-10.html b/AmazonViewer/doc/index-files/index-10.html new file mode 100644 index 0000000..24b5f65 --- /dev/null +++ b/AmazonViewer/doc/index-files/index-10.html @@ -0,0 +1,165 @@ + + + + + +T-Index + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ + +
+ + +
A B C F G I M P S T V  + + +

T

+
+
toString() - Method in class com.anncode.amazonviewer.model.Book
+
 
+
toString() - Method in class com.anncode.amazonviewer.model.Chapter
+
 
+
toString() - Method in class com.anncode.amazonviewer.model.Magazine
+
 
+
toString() - Method in class com.anncode.amazonviewer.model.Movie
+
 
+
toString() - Method in class com.anncode.amazonviewer.model.Serie
+
 
+
+A B C F G I M P S T V 
+ +
+ + + + + + + +
+ + + + diff --git a/AmazonViewer/doc/index-files/index-11.html b/AmazonViewer/doc/index-files/index-11.html new file mode 100644 index 0000000..251555a --- /dev/null +++ b/AmazonViewer/doc/index-files/index-11.html @@ -0,0 +1,171 @@ + + + + + +V-Index + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ + +
+ + +
A B C F G I M P S T V  + + +

V

+
+
validateUserResponseMenu(int, int) - Static method in class com.anncode.util.AmazonUtil
+
 
+
view() - Method in class com.anncode.amazonviewer.model.Book
+
 
+
view() - Method in class com.anncode.amazonviewer.model.Chapter
+
 
+
view() - Method in class com.anncode.amazonviewer.model.Film
+
+
view() es un método abstracto obligatorio de implementar
+
+
view() - Method in class com.anncode.amazonviewer.model.Movie
+
+
view() es un método abstracto obligatorio de implementar
+
+
view() - Method in class com.anncode.amazonviewer.model.Serie
+
 
+
+A B C F G I M P S T V 
+ +
+ + + + + + + +
+ + + + diff --git a/AmazonViewer/doc/index-files/index-2.html b/AmazonViewer/doc/index-files/index-2.html new file mode 100644 index 0000000..69eafca --- /dev/null +++ b/AmazonViewer/doc/index-files/index-2.html @@ -0,0 +1,159 @@ + + + + + +B-Index + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ + +
+ + +
A B C F G I M P S T V  + + +

B

+
+
Book - Class in com.anncode.amazonviewer.model
+
 
+
Book(String, Date, String, String[]) - Constructor for class com.anncode.amazonviewer.model.Book
+
 
+
+A B C F G I M P S T V 
+ +
+ + + + + + + +
+ + + + diff --git a/AmazonViewer/doc/index-files/index-3.html b/AmazonViewer/doc/index-files/index-3.html new file mode 100644 index 0000000..7c5a1f6 --- /dev/null +++ b/AmazonViewer/doc/index-files/index-3.html @@ -0,0 +1,167 @@ + + + + + +C-Index + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ + +
+ + +
A B C F G I M P S T V  + + +

C

+
+
Chapter - Class in com.anncode.amazonviewer.model
+
+
Hereda de Movie
+
+
Chapter(String, String, String, int, short, int, Serie) - Constructor for class com.anncode.amazonviewer.model.Chapter
+
 
+
com.anncode.amazonviewer - package com.anncode.amazonviewer
+
 
+
com.anncode.amazonviewer.model - package com.anncode.amazonviewer.model
+
 
+
com.anncode.util - package com.anncode.util
+
 
+
+A B C F G I M P S T V 
+ +
+ + + + + + + +
+ + + + diff --git a/AmazonViewer/doc/index-files/index-4.html b/AmazonViewer/doc/index-files/index-4.html new file mode 100644 index 0000000..ca1a751 --- /dev/null +++ b/AmazonViewer/doc/index-files/index-4.html @@ -0,0 +1,161 @@ + + + + + +F-Index + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ + +
+ + +
A B C F G I M P S T V  + + +

F

+
+
Film - Class in com.anncode.amazonviewer.model
+
+
Film
+
+
Film(String, String, String, int) - Constructor for class com.anncode.amazonviewer.model.Film
+
 
+
+A B C F G I M P S T V 
+ +
+ + + + + + + +
+ + + + diff --git a/AmazonViewer/doc/index-files/index-5.html b/AmazonViewer/doc/index-files/index-5.html new file mode 100644 index 0000000..49ae2d2 --- /dev/null +++ b/AmazonViewer/doc/index-files/index-5.html @@ -0,0 +1,201 @@ + + + + + +G-Index + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ + +
+ + +
A B C F G I M P S T V  + + +

G

+
+
getAuthors() - Method in class com.anncode.amazonviewer.model.Publication
+
 
+
getChapters() - Method in class com.anncode.amazonviewer.model.Serie
+
 
+
getCreator() - Method in class com.anncode.amazonviewer.model.Film
+
 
+
getDuration() - Method in class com.anncode.amazonviewer.model.Film
+
 
+
getEdititionDate() - Method in class com.anncode.amazonviewer.model.Publication
+
 
+
getEditorial() - Method in class com.anncode.amazonviewer.model.Publication
+
 
+
getGenre() - Method in class com.anncode.amazonviewer.model.Film
+
 
+
getId() - Method in class com.anncode.amazonviewer.model.Book
+
 
+
getId() - Method in class com.anncode.amazonviewer.model.Chapter
+
 
+
getId() - Method in class com.anncode.amazonviewer.model.Magazine
+
 
+
getId() - Method in class com.anncode.amazonviewer.model.Movie
+
 
+
getId() - Method in class com.anncode.amazonviewer.model.Serie
+
 
+
getIsbn() - Method in class com.anncode.amazonviewer.model.Book
+
 
+
getIsReaded() - Method in class com.anncode.amazonviewer.model.Book
+
 
+
getIsViewed() - Method in class com.anncode.amazonviewer.model.Film
+
 
+
getSerie() - Method in class com.anncode.amazonviewer.model.Chapter
+
 
+
getSessionNumber() - Method in class com.anncode.amazonviewer.model.Chapter
+
 
+
getSessionQuantity() - Method in class com.anncode.amazonviewer.model.Serie
+
 
+
getTimeReaded() - Method in class com.anncode.amazonviewer.model.Book
+
 
+
getTimeViewed() - Method in class com.anncode.amazonviewer.model.Movie
+
 
+
getTitle() - Method in class com.anncode.amazonviewer.model.Film
+
 
+
getTitle() - Method in class com.anncode.amazonviewer.model.Publication
+
 
+
getYear() - Method in class com.anncode.amazonviewer.model.Film
+
 
+
+A B C F G I M P S T V 
+ +
+ + + + + + + +
+ + + + diff --git a/AmazonViewer/doc/index-files/index-6.html b/AmazonViewer/doc/index-files/index-6.html new file mode 100644 index 0000000..47946c4 --- /dev/null +++ b/AmazonViewer/doc/index-files/index-6.html @@ -0,0 +1,161 @@ + + + + + +I-Index + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ + +
+ + +
A B C F G I M P S T V  + + +

I

+
+
isReaded() - Method in class com.anncode.amazonviewer.model.Book
+
 
+
isViewed() - Method in class com.anncode.amazonviewer.model.Film
+
 
+
IVisualizable - Interface in com.anncode.amazonviewer.model
+
 
+
+A B C F G I M P S T V 
+ +
+ + + + + + + +
+ + + + diff --git a/AmazonViewer/doc/index-files/index-7.html b/AmazonViewer/doc/index-files/index-7.html new file mode 100644 index 0000000..c94408a --- /dev/null +++ b/AmazonViewer/doc/index-files/index-7.html @@ -0,0 +1,188 @@ + + + + + +M-Index + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ + +
+ + +
A B C F G I M P S T V  + + +

M

+
+
Magazine - Class in com.anncode.amazonviewer.model
+
 
+
Magazine(String, Date, String) - Constructor for class com.anncode.amazonviewer.model.Magazine
+
 
+
main(String[]) - Static method in class com.anncode.amazonviewer.Main
+
 
+
Main - Class in com.anncode.amazonviewer
+
+
AmazonViewer
+
+
Main() - Constructor for class com.anncode.amazonviewer.Main
+
 
+
makeBookList() - Static method in class com.anncode.amazonviewer.model.Book
+
 
+
makeChaptersList(Serie) - Static method in class com.anncode.amazonviewer.model.Chapter
+
 
+
makeMagazineList() - Static method in class com.anncode.amazonviewer.model.Magazine
+
 
+
makeMoviesList() - Static method in class com.anncode.amazonviewer.model.Movie
+
 
+
makeReport() - Static method in class com.anncode.amazonviewer.Main
+
 
+
makeReport(Date) - Static method in class com.anncode.amazonviewer.Main
+
 
+
makeSeriesList() - Static method in class com.anncode.amazonviewer.model.Serie
+
 
+
Movie - Class in com.anncode.amazonviewer.model
+
+
Hereda de Film + Implementea de IVisualizable
+
+
Movie(String, String, String, int, short) - Constructor for class com.anncode.amazonviewer.model.Movie
+
 
+
+A B C F G I M P S T V 
+ +
+ + + + + + + +
+ + + + diff --git a/AmazonViewer/doc/index-files/index-8.html b/AmazonViewer/doc/index-files/index-8.html new file mode 100644 index 0000000..b7647d3 --- /dev/null +++ b/AmazonViewer/doc/index-files/index-8.html @@ -0,0 +1,159 @@ + + + + + +P-Index + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ + +
+ + +
A B C F G I M P S T V  + + +

P

+
+
Publication - Class in com.anncode.amazonviewer.model
+
 
+
Publication(String, Date, String) - Constructor for class com.anncode.amazonviewer.model.Publication
+
 
+
+A B C F G I M P S T V 
+ +
+ + + + + + + +
+ + + + diff --git a/AmazonViewer/doc/index-files/index-9.html b/AmazonViewer/doc/index-files/index-9.html new file mode 100644 index 0000000..3d0e8af --- /dev/null +++ b/AmazonViewer/doc/index-files/index-9.html @@ -0,0 +1,227 @@ + + + + + +S-Index + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ + +
+ + +
A B C F G I M P S T V  + + +

S

+
+
Serie - Class in com.anncode.amazonviewer.model
+
 
+
Serie(String, String, String, int, int) - Constructor for class com.anncode.amazonviewer.model.Serie
+
 
+
setAuthors(String[]) - Method in class com.anncode.amazonviewer.model.Publication
+
 
+
setChapters(ArrayList<Chapter>) - Method in class com.anncode.amazonviewer.model.Serie
+
 
+
setCreator(String) - Method in class com.anncode.amazonviewer.model.Film
+
 
+
setDuration(int) - Method in class com.anncode.amazonviewer.model.Film
+
 
+
setEdititionDate(Date) - Method in class com.anncode.amazonviewer.model.Publication
+
 
+
setEditorial(String) - Method in class com.anncode.amazonviewer.model.Publication
+
 
+
setGenre(String) - Method in class com.anncode.amazonviewer.model.Film
+
 
+
setIsbn(String) - Method in class com.anncode.amazonviewer.model.Book
+
 
+
setReaded(boolean) - Method in class com.anncode.amazonviewer.model.Book
+
 
+
setSerie(Serie) - Method in class com.anncode.amazonviewer.model.Chapter
+
 
+
setSessionNumber(int) - Method in class com.anncode.amazonviewer.model.Chapter
+
 
+
setSessionQuantity(int) - Method in class com.anncode.amazonviewer.model.Serie
+
 
+
setTimeReaded(int) - Method in class com.anncode.amazonviewer.model.Book
+
 
+
setTimeViewed(int) - Method in class com.anncode.amazonviewer.model.Movie
+
 
+
setTitle(String) - Method in class com.anncode.amazonviewer.model.Film
+
 
+
setTitle(String) - Method in class com.anncode.amazonviewer.model.Publication
+
 
+
setViewed(boolean) - Method in class com.anncode.amazonviewer.model.Film
+
 
+
setYear(short) - Method in class com.anncode.amazonviewer.model.Film
+
 
+
showBooks() - Static method in class com.anncode.amazonviewer.Main
+
 
+
showChapters(ArrayList<Chapter>) - Static method in class com.anncode.amazonviewer.Main
+
 
+
showMagazines() - Static method in class com.anncode.amazonviewer.Main
+
 
+
showMenu() - Static method in class com.anncode.amazonviewer.Main
+
 
+
showMovies() - Static method in class com.anncode.amazonviewer.Main
+
 
+
showSeries() - Static method in class com.anncode.amazonviewer.Main
+
 
+
startToSee(Date) - Method in class com.anncode.amazonviewer.model.Book
+
 
+
startToSee(Date) - Method in interface com.anncode.amazonviewer.model.IVisualizable
+
+
Este método captura el tiempo exacto de inicio de visualización
+
+
startToSee(Date) - Method in class com.anncode.amazonviewer.model.Movie
+
+
Este método captura el tiempo exacto de inicio de visualización
+
+
stopToSee(Date, Date) - Method in class com.anncode.amazonviewer.model.Book
+
 
+
stopToSee(Date, Date) - Method in interface com.anncode.amazonviewer.model.IVisualizable
+
+
Este método captura el tiempo exacto de inicio y final de visualización
+
+
stopToSee(Date, Date) - Method in class com.anncode.amazonviewer.model.Movie
+
+
Este método captura el tiempo exacto de inicio y final de visualización
+
+
+A B C F G I M P S T V 
+ +
+ + + + + + + +
+ + + + diff --git a/AmazonViewer/doc/index.html b/AmazonViewer/doc/index.html new file mode 100644 index 0000000..a3a830e --- /dev/null +++ b/AmazonViewer/doc/index.html @@ -0,0 +1,83 @@ + + + + + +Generated Documentation (Untitled) + + + + + + + +
+
+
+ +
+
+ +
+
+
+ +
+
+ + diff --git a/AmazonViewer/doc/jquery/external/jquery/jquery.js b/AmazonViewer/doc/jquery/external/jquery/jquery.js new file mode 100644 index 0000000..c5c6482 --- /dev/null +++ b/AmazonViewer/doc/jquery/external/jquery/jquery.js @@ -0,0 +1,9789 @@ +/*! + * jQuery JavaScript Library v1.10.2 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2013-07-03T13:48Z + */ +(function( window, undefined ) { + +// Can't do this because several apps including ASP.NET trace +// the stack via arguments.caller.callee and Firefox dies if +// you try to trace through "use strict" call chains. (#13335) +// Support: Firefox 18+ +//"use strict"; +var + // The deferred used on DOM ready + readyList, + + // A central reference to the root jQuery(document) + rootjQuery, + + // Support: IE<10 + // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined` + core_strundefined = typeof undefined, + + // Use the correct document accordingly with window argument (sandbox) + location = window.location, + document = window.document, + docElem = document.documentElement, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // [[Class]] -> type pairs + class2type = {}, + + // List of deleted data cache ids, so we can reuse them + core_deletedIds = [], + + core_version = "1.10.2", + + // Save a reference to some core methods + core_concat = core_deletedIds.concat, + core_push = core_deletedIds.push, + core_slice = core_deletedIds.slice, + core_indexOf = core_deletedIds.indexOf, + core_toString = class2type.toString, + core_hasOwn = class2type.hasOwnProperty, + core_trim = core_version.trim, + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context, rootjQuery ); + }, + + // Used for matching numbers + core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, + + // Used for splitting on whitespace + core_rnotwhite = /\S+/g, + + // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, + + // JSON RegExp + rvalidchars = /^[\],:{}\s]*$/, + rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, + rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, + rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([\da-z])/gi, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return letter.toUpperCase(); + }, + + // The ready event handler + completed = function( event ) { + + // readyState === "complete" is good enough for us to call the dom ready in oldIE + if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { + detach(); + jQuery.ready(); + } + }, + // Clean-up method for dom ready events + detach = function() { + if ( document.addEventListener ) { + document.removeEventListener( "DOMContentLoaded", completed, false ); + window.removeEventListener( "load", completed, false ); + + } else { + document.detachEvent( "onreadystatechange", completed ); + window.detachEvent( "onload", completed ); + } + }; + +jQuery.fn = jQuery.prototype = { + // The current version of jQuery being used + jquery: core_version, + + constructor: jQuery, + init: function( selector, context, rootjQuery ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + + // scripts is true for back-compat + jQuery.merge( this, jQuery.parseHTML( + match[1], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + // Properties of context are called as methods if possible + if ( jQuery.isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[2] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || rootjQuery ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }, + + // Start with an empty selector + selector: "", + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return core_slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == null ? + + // Return a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this[ this.length + num ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + ret.context = this.context; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + // Add the callback + jQuery.ready.promise().done( fn ); + + return this; + }, + + slice: function() { + return this.pushStack( core_slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: core_push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + var src, copyIsArray, copy, name, options, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( length === i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + // Unique for each copy of jQuery on the page + // Non-digits removed to match rinlinejQuery + expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), + + noConflict: function( deep ) { + if ( window.$ === jQuery ) { + window.$ = _$; + } + + if ( deep && window.jQuery === jQuery ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.trigger ) { + jQuery( document ).trigger("ready").off("ready"); + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type(obj) === "array"; + }, + + isWindow: function( obj ) { + /* jshint eqeqeq: false */ + return obj != null && obj == obj.window; + }, + + isNumeric: function( obj ) { + return !isNaN( parseFloat(obj) ) && isFinite( obj ); + }, + + type: function( obj ) { + if ( obj == null ) { + return String( obj ); + } + return typeof obj === "object" || typeof obj === "function" ? + class2type[ core_toString.call(obj) ] || "object" : + typeof obj; + }, + + isPlainObject: function( obj ) { + var key; + + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + try { + // Not own constructor property must be Object + if ( obj.constructor && + !core_hasOwn.call(obj, "constructor") && + !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + } catch ( e ) { + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Support: IE<9 + // Handle iteration over inherited properties before own properties. + if ( jQuery.support.ownLast ) { + for ( key in obj ) { + return core_hasOwn.call( obj, key ); + } + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + for ( key in obj ) {} + + return key === undefined || core_hasOwn.call( obj, key ); + }, + + isEmptyObject: function( obj ) { + var name; + for ( name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw new Error( msg ); + }, + + // data: string of html + // context (optional): If specified, the fragment will be created in this context, defaults to document + // keepScripts (optional): If true, will include scripts passed in the html string + parseHTML: function( data, context, keepScripts ) { + if ( !data || typeof data !== "string" ) { + return null; + } + if ( typeof context === "boolean" ) { + keepScripts = context; + context = false; + } + context = context || document; + + var parsed = rsingleTag.exec( data ), + scripts = !keepScripts && []; + + // Single tag + if ( parsed ) { + return [ context.createElement( parsed[1] ) ]; + } + + parsed = jQuery.buildFragment( [ data ], context, scripts ); + if ( scripts ) { + jQuery( scripts ).remove(); + } + return jQuery.merge( [], parsed.childNodes ); + }, + + parseJSON: function( data ) { + // Attempt to parse using the native JSON parser first + if ( window.JSON && window.JSON.parse ) { + return window.JSON.parse( data ); + } + + if ( data === null ) { + return data; + } + + if ( typeof data === "string" ) { + + // Make sure leading/trailing whitespace is removed (IE can't handle it) + data = jQuery.trim( data ); + + if ( data ) { + // Make sure the incoming data is actual JSON + // Logic borrowed from http://json.org/json2.js + if ( rvalidchars.test( data.replace( rvalidescape, "@" ) + .replace( rvalidtokens, "]" ) + .replace( rvalidbraces, "")) ) { + + return ( new Function( "return " + data ) )(); + } + } + } + + jQuery.error( "Invalid JSON: " + data ); + }, + + // Cross-browser xml parsing + parseXML: function( data ) { + var xml, tmp; + if ( !data || typeof data !== "string" ) { + return null; + } + try { + if ( window.DOMParser ) { // Standard + tmp = new DOMParser(); + xml = tmp.parseFromString( data , "text/xml" ); + } else { // IE + xml = new ActiveXObject( "Microsoft.XMLDOM" ); + xml.async = "false"; + xml.loadXML( data ); + } + } catch( e ) { + xml = undefined; + } + if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; + }, + + noop: function() {}, + + // Evaluates a script in a global context + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function( data ) { + if ( data && jQuery.trim( data ) ) { + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function( data ) { + window[ "eval" ].call( window, data ); + } )( data ); + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + }, + + // args is for internal usage only + each: function( obj, callback, args ) { + var value, + i = 0, + length = obj.length, + isArray = isArraylike( obj ); + + if ( args ) { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } + } + + return obj; + }, + + // Use native String.trim function wherever possible + trim: core_trim && !core_trim.call("\uFEFF\xA0") ? + function( text ) { + return text == null ? + "" : + core_trim.call( text ); + } : + + // Otherwise use our own trimming functionality + function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArraylike( Object(arr) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + core_push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + var len; + + if ( arr ) { + if ( core_indexOf ) { + return core_indexOf.call( arr, elem, i ); + } + + len = arr.length; + i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; + + for ( ; i < len; i++ ) { + // Skip accessing in sparse arrays + if ( i in arr && arr[ i ] === elem ) { + return i; + } + } + } + + return -1; + }, + + merge: function( first, second ) { + var l = second.length, + i = first.length, + j = 0; + + if ( typeof l === "number" ) { + for ( ; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + var retVal, + ret = [], + i = 0, + length = elems.length; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + retVal = !!callback( elems[ i ], i ); + if ( inv !== retVal ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, + i = 0, + length = elems.length, + isArray = isArraylike( elems ), + ret = []; + + // Go through the array, translating each of the items to their + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + } + + // Flatten any nested arrays + return core_concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var args, proxy, tmp; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = core_slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + // Multifunctional method to get and set values of a collection + // The value/s can optionally be executed if it's a function + access: function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + length = elems.length, + bulk = key == null; + + // Sets many values + if ( jQuery.type( key ) === "object" ) { + chainable = true; + for ( i in key ) { + jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !jQuery.isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < length; i++ ) { + fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); + } + } + } + + return chainable ? + elems : + + // Gets + bulk ? + fn.call( elems ) : + length ? fn( elems[0], key ) : emptyGet; + }, + + now: function() { + return ( new Date() ).getTime(); + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations. + // Note: this method belongs to the css module but it's needed here for the support module. + // If support gets modularized, this method should be moved back to the css module. + swap: function( elem, options, callback, args ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.apply( elem, args || [] ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; + } +}); + +jQuery.ready.promise = function( obj ) { + if ( !readyList ) { + + readyList = jQuery.Deferred(); + + // Catch cases where $(document).ready() is called after the browser event has already occurred. + // we once tried to use readyState "interactive" here, but it caused issues like the one + // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + setTimeout( jQuery.ready ); + + // Standards-based browsers support DOMContentLoaded + } else if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed, false ); + + // If IE event model is used + } else { + // Ensure firing before onload, maybe late but safe also for iframes + document.attachEvent( "onreadystatechange", completed ); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", completed ); + + // If IE and not a frame + // continually check to see if the document is ready + var top = false; + + try { + top = window.frameElement == null && document.documentElement; + } catch(e) {} + + if ( top && top.doScroll ) { + (function doScrollCheck() { + if ( !jQuery.isReady ) { + + try { + // Use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + top.doScroll("left"); + } catch(e) { + return setTimeout( doScrollCheck, 50 ); + } + + // detach all dom ready events + detach(); + + // and execute any waiting functions + jQuery.ready(); + } + })(); + } + } + } + return readyList.promise( obj ); +}; + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +function isArraylike( obj ) { + var length = obj.length, + type = jQuery.type( obj ); + + if ( jQuery.isWindow( obj ) ) { + return false; + } + + if ( obj.nodeType === 1 && length ) { + return true; + } + + return type === "array" || type !== "function" && + ( length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj ); +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); +/*! + * Sizzle CSS Selector Engine v1.10.2 + * http://sizzlejs.com/ + * + * Copyright 2013 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2013-07-03 + */ +(function( window, undefined ) { + +var i, + support, + cachedruns, + Expr, + getText, + isXML, + compile, + outermostContext, + sortInput, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + -(new Date()), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + hasDuplicate = false, + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + return 0; + } + return 0; + }, + + // General-purpose constants + strundefined = typeof undefined, + MAX_NEGATIVE = 1 << 31, + + // Instance methods + hasOwn = ({}).hasOwnProperty, + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf if we can't use a native one + indexOf = arr.indexOf || function( elem ) { + var i = 0, + len = this.length; + for ( ; i < len; i++ ) { + if ( this[i] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + // http://www.w3.org/TR/css3-syntax/#characters + characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + + // Loosely modeled on CSS identifier characters + // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors + // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = characterEncoding.replace( "w", "w#" ), + + // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + + "*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", + + // Prefer arguments quoted, + // then not containing pseudos/brackets, + // then attribute selectors/non-parenthetical expressions, + // then anything else + // These preferences are here to reduce the number of selectors + // needing tokenize in the PSEUDO preFilter + pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), + + rsibling = new RegExp( whitespace + "*[+~]" ), + rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + characterEncoding + ")" ), + "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), + "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rescape = /'|\\/g, + + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), + funescape = function( _, escaped, escapedWhitespace ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + // Support: Firefox + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace ? + escaped : + // BMP codepoint + high < 0 ? + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }; + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + (arr = slice.call( preferredDoc.childNodes )), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + push_native.apply( target, slice.call(els) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ( (target[j++] = els[i++]) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var match, elem, m, nodeType, + // QSA vars + i, groups, old, nid, newContext, newSelector; + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + + context = context || document; + results = results || []; + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { + return []; + } + + if ( documentIsHTML && !seed ) { + + // Shortcuts + if ( (match = rquickExpr.exec( selector )) ) { + // Speed-up: Sizzle("#ID") + if ( (m = match[1]) ) { + if ( nodeType === 9 ) { + elem = context.getElementById( m ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE, Opera, and Webkit return items + // by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + } else { + // Context is not a document + if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && + contains( context, elem ) && elem.id === m ) { + results.push( elem ); + return results; + } + } + + // Speed-up: Sizzle("TAG") + } else if ( match[2] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Speed-up: Sizzle(".CLASS") + } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // QSA path + if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + nid = old = expando; + newContext = context; + newSelector = nodeType === 9 && selector; + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + groups = tokenize( selector ); + + if ( (old = context.getAttribute("id")) ) { + nid = old.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", nid ); + } + nid = "[id='" + nid + "'] "; + + i = groups.length; + while ( i-- ) { + groups[i] = nid + toSelector( groups[i] ); + } + newContext = rsibling.test( selector ) && context.parentNode || context; + newSelector = groups.join(","); + } + + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch(qsaError) { + } finally { + if ( !old ) { + context.removeAttribute("id"); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {Function(string, Object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key += " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key ] = value); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created div and expects a boolean result + */ +function assert( fn ) { + var div = document.createElement("div"); + + try { + return !!fn( div ); + } catch (e) { + return false; + } finally { + // Remove from its parent by default + if ( div.parentNode ) { + div.parentNode.removeChild( div ); + } + // release memory in IE + div = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split("|"), + i = attrs.length; + + while ( i-- ) { + Expr.attrHandle[ arr[i] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + ( ~b.sourceIndex || MAX_NEGATIVE ) - + ( ~a.sourceIndex || MAX_NEGATIVE ); + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/** + * Detect xml + * @param {Element|Object} elem An element or a document + */ +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var doc = node ? node.ownerDocument || node : preferredDoc, + parent = doc.defaultView; + + // If no document and documentElement is available, return + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Set our document + document = doc; + docElem = doc.documentElement; + + // Support tests + documentIsHTML = !isXML( doc ); + + // Support: IE>8 + // If iframe document is assigned to "document" variable and if iframe has been reloaded, + // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 + // IE6-8 do not support the defaultView property so parent will be undefined + if ( parent && parent.attachEvent && parent !== parent.top ) { + parent.attachEvent( "onbeforeunload", function() { + setDocument(); + }); + } + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) + support.attributes = assert(function( div ) { + div.className = "i"; + return !div.getAttribute("className"); + }); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert(function( div ) { + div.appendChild( doc.createComment("") ); + return !div.getElementsByTagName("*").length; + }); + + // Check if getElementsByClassName can be trusted + support.getElementsByClassName = assert(function( div ) { + div.innerHTML = "
"; + + // Support: Safari<4 + // Catch class over-caching + div.firstChild.className = "i"; + // Support: Opera<10 + // Catch gEBCN failure to find non-leading classes + return div.getElementsByClassName("i").length === 2; + }); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert(function( div ) { + docElem.appendChild( div ).id = expando; + return !doc.getElementsByName || !doc.getElementsByName( expando ).length; + }); + + // ID find and filter + if ( support.getById ) { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== strundefined && documentIsHTML ) { + var m = context.getElementById( id ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute("id") === attrId; + }; + }; + } else { + // Support: IE6/7 + // getElementById is not reliable as a find shortcut + delete Expr.find["ID"]; + + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + } + + // Tag + Expr.find["TAG"] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== strundefined ) { + return context.getElementsByTagName( tag ); + } + } : + function( tag, context ) { + var elem, + tmp = [], + i = 0, + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( (elem = results[i++]) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See http://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( div ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + div.innerHTML = ""; + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + }); + + assert(function( div ) { + + // Support: Opera 10-12/IE8 + // ^= $= *= and empty values + // Should not select anything + // Support: Windows 8 Native Apps + // The type attribute is restricted during .innerHTML assignment + var input = doc.createElement("input"); + input.setAttribute( "type", "hidden" ); + div.appendChild( input ).setAttribute( "t", "" ); + + if ( div.querySelectorAll("[t^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":enabled").length ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + div.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) )) ) { + + assert(function( div ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( div, "div" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( div, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + }); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); + + /* Contains + ---------------------------------------------------------------------- */ + + // Element contains another + // Purposefully does not implement inclusive descendent + // As in, an element does not contain itself + contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + )); + } : + function( a, b ) { + if ( b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = docElem.compareDocumentPosition ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b ); + + if ( compare ) { + // Disconnected nodes + if ( compare & 1 || + (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { + + // Choose the first element that is related to our preferred document + if ( a === doc || contains(preferredDoc, a) ) { + return -1; + } + if ( b === doc || contains(preferredDoc, b) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } + + // Not directly comparable, sort on existence of method + return a.compareDocumentPosition ? -1 : 1; + } : + function( a, b ) { + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + + // Parentless nodes are either documents or disconnected + } else if ( !aup || !bup ) { + return a === doc ? -1 : + b === doc ? 1 : + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( (cur = cur.parentNode) ) { + ap.unshift( cur ); + } + cur = b; + while ( (cur = cur.parentNode) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[i] === bp[i] ) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[i], bp[i] ) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + return doc; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + if ( support.matchesSelector && documentIsHTML && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch(e) {} + } + + return Sizzle( expr, document, null, [elem] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + // Set document vars if needed + if ( ( context.ownerDocument || context ) !== document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val === undefined ? + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + (val = elem.getAttributeNode(name)) && val.specified ? + val.value : + null : + val; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( (elem = results[i++]) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + for ( ; (node = elem[i]); i++ ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (see #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1].slice( 0, 3 ) === "nth" ) { + // nth-* requires argument + if ( !match[3] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[5] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[3] && match[4] !== undefined ) { + match[2] = match[4]; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { return true; } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, what, argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, context, xml ) { + var cache, outerCache, node, diff, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( (node = node[ dir ]) ) { + if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + // Seek `elem` from a previously-cached index + outerCache = parent[ expando ] || (parent[ expando ] = {}); + cache = outerCache[ type ] || []; + nodeIndex = cache[0] === dirruns && cache[1]; + diff = cache[0] === dirruns && cache[2]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( (node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop()) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + outerCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + // Use previously-cached element index if available + } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { + diff = cache[1]; + + // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) + } else { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { + // Cache the index of each encountered element + if ( useCache ) { + (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf.call( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + // lang value must be a valid identifier + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + return false; + }; + }), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": function( elem ) { + return elem.disabled === false; + }, + + "disabled": function( elem ) { + return elem.disabled === true; + }, + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), + // not comment, processing instructions, or others + // Thanks to Diego Perini for the nodeName shortcut + // Greater than "@" means alpha characters (specifically not starting with "#" or "?") + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +function tokenize( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( tokens = [] ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + matched = match.shift(); + tokens.push({ + value: matched, + // Cast descendant combinators to space + type: match[0].replace( rtrim, " " ) + }); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + matched = match.shift(); + tokens.push({ + value: matched, + type: type, + matches: match + }); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +} + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[i].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + checkNonElements = base && dir === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var data, cache, outerCache, + dirkey = dirruns + " " + doneName; + + // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching + if ( xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || (elem[ expando ] = {}); + if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { + if ( (data = cache[1]) === true || data === cachedruns ) { + return data === true; + } + } else { + cache = outerCache[ dir ] = [ dirkey ]; + cache[1] = matcher( elem, context, xml ) || cachedruns; + if ( cache[1] === true ) { + return true; + } + } + } + } + } + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[i]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[0]; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( (elem = unmatched[i]) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction(function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) ) { + // Restore matcherIn since elem is not yet a final match + temp.push( (matcherIn[i] = elem) ); + } + } + postFinder( null, (matcherOut = []), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + }); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf.call( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + } ]; + + for ( ; i < len; i++ ) { + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; + } else { + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[j].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + // A counter to specify which element is currently being matched + var matcherCachedRuns = 0, + bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, expandContext ) { + var elem, j, matcher, + setMatched = [], + matchedCount = 0, + i = "0", + unmatched = seed && [], + outermost = expandContext != null, + contextBackup = outermostContext, + // We must always have either seed elements or context + elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1); + + if ( outermost ) { + outermostContext = context !== document && context; + cachedruns = matcherCachedRuns; + } + + // Add elements passing elementMatchers directly to results + // Keep `i` a string if there are no elements so `matchedCount` will be "00" below + for ( ; (elem = elems[i]) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + cachedruns = ++matcherCachedRuns; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + // They will have gone through all possible matchers + if ( (elem = !matcher && elem) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // Apply set filters to unmatched elements + matchedCount += i; + if ( bySet && i !== matchedCount ) { + j = 0; + while ( (matcher = setMatchers[j++]) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element + if ( !group ) { + group = tokenize( selector ); + } + i = group.length; + while ( i-- ) { + cached = matcherFromTokens( group[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + } + return cached; +}; + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +function select( selector, context, results, seed ) { + var i, tokens, token, type, find, + match = tokenize( selector ); + + if ( !seed ) { + // Try to minimize operations if there is only one group + if ( match.length === 1 ) { + + // Take a shortcut and set the context if the root selector is an ID + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + support.getById && context.nodeType === 9 && documentIsHTML && + Expr.relative[ tokens[1].type ] ) { + + context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; + if ( !context ) { + return results; + } + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[i]; + + // Abort if we hit a combinator + if ( Expr.relative[ (type = token.type) ] ) { + break; + } + if ( (find = Expr.find[ type ]) ) { + // Search, expanding context for leading sibling combinators + if ( (seed = find( + token.matches[0].replace( runescape, funescape ), + rsibling.test( tokens[0].type ) && context.parentNode || context + )) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + } + + // Compile and execute a filtering function + // Provide `match` to avoid retokenization if we modified the selector above + compile( selector, match )( + seed, + context, + !documentIsHTML, + results, + rsibling.test( selector ) + ); + return results; +} + +// One-time assignments + +// Sort stability +support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; + +// Support: Chrome<14 +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert(function( div1 ) { + // Should return 1, but returns 4 (following) + return div1.compareDocumentPosition( document.createElement("div") ) & 1; +}); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert(function( div ) { + div.innerHTML = ""; + return div.firstChild.getAttribute("href") === "#" ; +}) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + }); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert(function( div ) { + div.innerHTML = ""; + div.firstChild.setAttribute( "value", "" ); + return div.firstChild.getAttribute( "value" ) === ""; +}) ) { + addHandle( "value", function( elem, name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + }); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert(function( div ) { + return div.getAttribute("disabled") == null; +}) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return (val = elem.getAttributeNode( name )) && val.specified ? + val.value : + elem[ name ] === true ? name.toLowerCase() : null; + } + }); +} + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.pseudos; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})( window ); +// String to Object options format cache +var optionsCache = {}; + +// Convert String-formatted options into Object-formatted ones and store in cache +function createOptions( options ) { + var object = optionsCache[ options ] = {}; + jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { + object[ flag ] = true; + }); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + ( optionsCache[ options ] || createOptions( options ) ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list was already fired + fired, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // First callback to fire (used internally by add and fireWith) + firingStart, + // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = !options.once && [], + // Fire callbacks + fire = function( data ) { + memory = options.memory && data; + fired = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + firing = true; + for ( ; list && firingIndex < firingLength; firingIndex++ ) { + if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { + memory = false; // To prevent further calls using add + break; + } + } + firing = false; + if ( list ) { + if ( stack ) { + if ( stack.length ) { + fire( stack.shift() ); + } + } else if ( memory ) { + list = []; + } else { + self.disable(); + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + // First, we save the current length + var start = list.length; + (function add( args ) { + jQuery.each( args, function( _, arg ) { + var type = jQuery.type( arg ); + if ( type === "function" ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && type !== "string" ) { + // Inspect recursively + add( arg ); + } + }); + })( arguments ); + // Do we need to add the callbacks to the + // current firing batch? + if ( firing ) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away + } else if ( memory ) { + firingStart = start; + fire( memory ); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if ( list ) { + jQuery.each( arguments, function( _, arg ) { + var index; + while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + // Handle firing indexes + if ( firing ) { + if ( index <= firingLength ) { + firingLength--; + } + if ( index <= firingIndex ) { + firingIndex--; + } + } + } + }); + } + return this; + }, + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); + }, + // Remove all callbacks from the list + empty: function() { + list = []; + firingLength = 0; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if ( !memory ) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( list && ( !fired || stack ) ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + if ( firing ) { + stack.push( args ); + } else { + fire( args ); + } + } + return this; + }, + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; +jQuery.extend({ + + Deferred: function( func ) { + var tuples = [ + // action, add listener, listener list, final state + [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], + [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], + [ "notify", "progress", jQuery.Callbacks("memory") ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + then: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + return jQuery.Deferred(function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + var action = tuple[ 0 ], + fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; + // deferred[ done | fail | progress ] for forwarding actions to newDefer + deferred[ tuple[1] ](function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise() + .done( newDefer.resolve ) + .fail( newDefer.reject ) + .progress( newDefer.notify ); + } else { + newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); + } + }); + }); + fns = null; + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Keep pipe for back-compat + promise.pipe = promise.then; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 3 ]; + + // promise[ done | fail | progress ] = list.add + promise[ tuple[1] ] = list.add; + + // Handle state + if ( stateString ) { + list.add(function() { + // state = [ resolved | rejected ] + state = stateString; + + // [ reject_list | resolve_list ].disable; progress_list.lock + }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); + } + + // deferred[ resolve | reject | notify ] + deferred[ tuple[0] ] = function() { + deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); + return this; + }; + deferred[ tuple[0] + "With" ] = list.fireWith; + }); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( subordinate /* , ..., subordinateN */ ) { + var i = 0, + resolveValues = core_slice.call( arguments ), + length = resolveValues.length, + + // the count of uncompleted subordinates + remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, + + // the master Deferred. If resolveValues consist of only a single Deferred, just use that. + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), + + // Update function for both resolve and progress values + updateFunc = function( i, contexts, values ) { + return function( value ) { + contexts[ i ] = this; + values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; + if( values === progressValues ) { + deferred.notifyWith( contexts, values ); + } else if ( !( --remaining ) ) { + deferred.resolveWith( contexts, values ); + } + }; + }, + + progressValues, progressContexts, resolveContexts; + + // add listeners to Deferred subordinates; treat others as resolved + if ( length > 1 ) { + progressValues = new Array( length ); + progressContexts = new Array( length ); + resolveContexts = new Array( length ); + for ( ; i < length; i++ ) { + if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { + resolveValues[ i ].promise() + .done( updateFunc( i, resolveContexts, resolveValues ) ) + .fail( deferred.reject ) + .progress( updateFunc( i, progressContexts, progressValues ) ); + } else { + --remaining; + } + } + } + + // if we're not waiting on anything, resolve the master + if ( !remaining ) { + deferred.resolveWith( resolveContexts, resolveValues ); + } + + return deferred.promise(); + } +}); +jQuery.support = (function( support ) { + + var all, a, input, select, fragment, opt, eventName, isSupported, i, + div = document.createElement("div"); + + // Setup + div.setAttribute( "className", "t" ); + div.innerHTML = "
a"; + + // Finish early in limited (non-browser) environments + all = div.getElementsByTagName("*") || []; + a = div.getElementsByTagName("a")[ 0 ]; + if ( !a || !a.style || !all.length ) { + return support; + } + + // First batch of tests + select = document.createElement("select"); + opt = select.appendChild( document.createElement("option") ); + input = div.getElementsByTagName("input")[ 0 ]; + + a.style.cssText = "top:1px;float:left;opacity:.5"; + + // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) + support.getSetAttribute = div.className !== "t"; + + // IE strips leading whitespace when .innerHTML is used + support.leadingWhitespace = div.firstChild.nodeType === 3; + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + support.tbody = !div.getElementsByTagName("tbody").length; + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + support.htmlSerialize = !!div.getElementsByTagName("link").length; + + // Get the style information from getAttribute + // (IE uses .cssText instead) + support.style = /top/.test( a.getAttribute("style") ); + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + support.hrefNormalized = a.getAttribute("href") === "/a"; + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + support.opacity = /^0.5/.test( a.style.opacity ); + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + support.cssFloat = !!a.style.cssFloat; + + // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) + support.checkOn = !!input.value; + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + support.optSelected = opt.selected; + + // Tests for enctype support on a form (#6743) + support.enctype = !!document.createElement("form").enctype; + + // Makes sure cloning an html5 element does not cause problems + // Where outerHTML is undefined, this still works + support.html5Clone = document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>"; + + // Will be defined later + support.inlineBlockNeedsLayout = false; + support.shrinkWrapBlocks = false; + support.pixelPosition = false; + support.deleteExpando = true; + support.noCloneEvent = true; + support.reliableMarginRight = true; + support.boxSizingReliable = true; + + // Make sure checked status is properly cloned + input.checked = true; + support.noCloneChecked = input.cloneNode( true ).checked; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as disabled) + select.disabled = true; + support.optDisabled = !opt.disabled; + + // Support: IE<9 + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + + // Check if we can trust getAttribute("value") + input = document.createElement("input"); + input.setAttribute( "value", "" ); + support.input = input.getAttribute( "value" ) === ""; + + // Check if an input maintains its value after becoming a radio + input.value = "t"; + input.setAttribute( "type", "radio" ); + support.radioValue = input.value === "t"; + + // #11217 - WebKit loses check when the name is after the checked attribute + input.setAttribute( "checked", "t" ); + input.setAttribute( "name", "t" ); + + fragment = document.createDocumentFragment(); + fragment.appendChild( input ); + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + support.appendChecked = input.checked; + + // WebKit doesn't clone checked state correctly in fragments + support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE<9 + // Opera does not clone events (and typeof div.attachEvent === undefined). + // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() + if ( div.attachEvent ) { + div.attachEvent( "onclick", function() { + support.noCloneEvent = false; + }); + + div.cloneNode( true ).click(); + } + + // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event) + // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) + for ( i in { submit: true, change: true, focusin: true }) { + div.setAttribute( eventName = "on" + i, "t" ); + + support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false; + } + + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + // Support: IE<9 + // Iteration over object's inherited properties before its own. + for ( i in jQuery( support ) ) { + break; + } + support.ownLast = i !== "0"; + + // Run tests that need a body at doc ready + jQuery(function() { + var container, marginDiv, tds, + divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", + body = document.getElementsByTagName("body")[0]; + + if ( !body ) { + // Return for frameset docs that don't have a body + return; + } + + container = document.createElement("div"); + container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; + + body.appendChild( container ).appendChild( div ); + + // Support: IE8 + // Check if table cells still have offsetWidth/Height when they are set + // to display:none and there are still other visible table cells in a + // table row; if so, offsetWidth/Height are not reliable for use when + // determining if an element has been hidden directly using + // display:none (it is still safe to use offsets if a parent element is + // hidden; don safety goggles and see bug #4512 for more information). + div.innerHTML = "
t
"; + tds = div.getElementsByTagName("td"); + tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; + isSupported = ( tds[ 0 ].offsetHeight === 0 ); + + tds[ 0 ].style.display = ""; + tds[ 1 ].style.display = "none"; + + // Support: IE8 + // Check if empty table cells still have offsetWidth/Height + support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); + + // Check box-sizing and margin behavior. + div.innerHTML = ""; + div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; + + // Workaround failing boxSizing test due to offsetWidth returning wrong value + // with some non-1 values of body zoom, ticket #13543 + jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() { + support.boxSizing = div.offsetWidth === 4; + }); + + // Use window.getComputedStyle because jsdom on node.js will break without it. + if ( window.getComputedStyle ) { + support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; + support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; + + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. (#3333) + // Fails in WebKit before Feb 2011 nightlies + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + marginDiv = div.appendChild( document.createElement("div") ); + marginDiv.style.cssText = div.style.cssText = divReset; + marginDiv.style.marginRight = marginDiv.style.width = "0"; + div.style.width = "1px"; + + support.reliableMarginRight = + !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); + } + + if ( typeof div.style.zoom !== core_strundefined ) { + // Support: IE<8 + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + div.innerHTML = ""; + div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; + support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); + + // Support: IE6 + // Check if elements with layout shrink-wrap their children + div.style.display = "block"; + div.innerHTML = "
"; + div.firstChild.style.width = "5px"; + support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); + + if ( support.inlineBlockNeedsLayout ) { + // Prevent IE 6 from affecting layout for positioned elements #11048 + // Prevent IE from shrinking the body in IE 7 mode #12869 + // Support: IE<8 + body.style.zoom = 1; + } + } + + body.removeChild( container ); + + // Null elements to avoid leaks in IE + container = div = tds = marginDiv = null; + }); + + // Null elements to avoid leaks in IE + all = select = fragment = opt = a = input = null; + + return support; +})({}); + +var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, + rmultiDash = /([A-Z])/g; + +function internalData( elem, name, data, pvt /* Internal Use Only */ ){ + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var ret, thisCache, + internalKey = jQuery.expando, + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) { + return; + } + + if ( !id ) { + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + id = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++; + } else { + id = internalKey; + } + } + + if ( !cache[ id ] ) { + // Avoid exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + cache[ id ] = isNode ? {} : { toJSON: jQuery.noop }; + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ] = jQuery.extend( cache[ id ], name ); + } else { + cache[ id ].data = jQuery.extend( cache[ id ].data, name ); + } + } + + thisCache = cache[ id ]; + + // jQuery data() is stored in a separate object inside the object's internal data + // cache in order to avoid key collisions between internal data and user-defined + // data. + if ( !pvt ) { + if ( !thisCache.data ) { + thisCache.data = {}; + } + + thisCache = thisCache.data; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( typeof name === "string" ) { + + // First Try to find as-is property data + ret = thisCache[ name ]; + + // Test for null|undefined property data + if ( ret == null ) { + + // Try to find the camelCased property + ret = thisCache[ jQuery.camelCase( name ) ]; + } + } else { + ret = thisCache; + } + + return ret; +} + +function internalRemoveData( elem, name, pvt ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, i, + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + id = isNode ? elem[ jQuery.expando ] : jQuery.expando; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + + thisCache = pvt ? cache[ id ] : cache[ id ].data; + + if ( thisCache ) { + + // Support array or space separated string names for data keys + if ( !jQuery.isArray( name ) ) { + + // try the string as a key before any manipulation + if ( name in thisCache ) { + name = [ name ]; + } else { + + // split the camel cased version by spaces unless a key with the spaces exists + name = jQuery.camelCase( name ); + if ( name in thisCache ) { + name = [ name ]; + } else { + name = name.split(" "); + } + } + } else { + // If "name" is an array of keys... + // When data is initially created, via ("key", "val") signature, + // keys will be converted to camelCase. + // Since there is no way to tell _how_ a key was added, remove + // both plain key and camelCase key. #12786 + // This will only penalize the array argument path. + name = name.concat( jQuery.map( name, jQuery.camelCase ) ); + } + + i = name.length; + while ( i-- ) { + delete thisCache[ name[i] ]; + } + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( !pvt ) { + delete cache[ id ].data; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject( cache[ id ] ) ) { + return; + } + } + + // Destroy the cache + if ( isNode ) { + jQuery.cleanData( [ elem ], true ); + + // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) + /* jshint eqeqeq: false */ + } else if ( jQuery.support.deleteExpando || cache != cache.window ) { + /* jshint eqeqeq: true */ + delete cache[ id ]; + + // When all else fails, null + } else { + cache[ id ] = null; + } +} + +jQuery.extend({ + cache: {}, + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "applet": true, + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data ) { + return internalData( elem, name, data ); + }, + + removeData: function( elem, name ) { + return internalRemoveData( elem, name ); + }, + + // For internal use only. + _data: function( elem, name, data ) { + return internalData( elem, name, data, true ); + }, + + _removeData: function( elem, name ) { + return internalRemoveData( elem, name, true ); + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + // Do not set data on non-element because it will not be cleared (#8335). + if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) { + return false; + } + + var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; + + // nodes accept data unless otherwise specified; rejection can be conditional + return !noData || noData !== true && elem.getAttribute("classid") === noData; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var attrs, name, + data = null, + i = 0, + elem = this[0]; + + // Special expections of .data basically thwart jQuery.access, + // so implement the relevant behavior ourselves + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = jQuery.data( elem ); + + if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { + attrs = elem.attributes; + for ( ; i < attrs.length; i++ ) { + name = attrs[i].name; + + if ( name.indexOf("data-") === 0 ) { + name = jQuery.camelCase( name.slice(5) ); + + dataAttr( elem, name, data[ name ] ); + } + } + jQuery._data( elem, "parsedAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + return arguments.length > 1 ? + + // Sets one value + this.each(function() { + jQuery.data( this, key, value ); + }) : + + // Gets one value + // Try to fetch any internally stored data first + elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null; + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + + var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// checks a cache object for emptiness +function isEmptyDataObject( obj ) { + var name; + for ( name in obj ) { + + // if the public data object is empty, the private is still empty + if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { + continue; + } + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} +jQuery.extend({ + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || jQuery.isArray(data) ) { + queue = jQuery._data( elem, type, jQuery.makeArray(data) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // not intended for public consumption - generates a queueHooks object, or returns the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return jQuery._data( elem, key ) || jQuery._data( elem, key, { + empty: jQuery.Callbacks("once memory").add(function() { + jQuery._removeData( elem, type + "queue" ); + jQuery._removeData( elem, key ); + }) + }); + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[0], type ); + } + + return data === undefined ? + this : + this.each(function() { + var queue = jQuery.queue( this, type, data ); + + // ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = setTimeout( next, time ); + hooks.stop = function() { + clearTimeout( timeout ); + }; + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while( i-- ) { + tmp = jQuery._data( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +}); +var nodeHook, boolHook, + rclass = /[\t\r\n\f]/g, + rreturn = /\r/g, + rfocusable = /^(?:input|select|textarea|button|object)$/i, + rclickable = /^(?:a|area)$/i, + ruseDefault = /^(?:checked|selected)$/i, + getSetAttribute = jQuery.support.getSetAttribute, + getSetInput = jQuery.support.input; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each(function() { + jQuery.removeAttr( this, name ); + }); + }, + + prop: function( name, value ) { + return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + name = jQuery.propFix[ name ] || name; + return this.each(function() { + // try/catch handles cases where IE balks (such as removing a property on window) + try { + this[ name ] = undefined; + delete this[ name ]; + } catch( e ) {} + }); + }, + + addClass: function( value ) { + var classes, elem, cur, clazz, j, + i = 0, + len = this.length, + proceed = typeof value === "string" && value; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).addClass( value.call( this, j, this.className ) ); + }); + } + + if ( proceed ) { + // The disjunction here is for better compressibility (see removeClass) + classes = ( value || "" ).match( core_rnotwhite ) || []; + + for ( ; i < len; i++ ) { + elem = this[ i ]; + cur = elem.nodeType === 1 && ( elem.className ? + ( " " + elem.className + " " ).replace( rclass, " " ) : + " " + ); + + if ( cur ) { + j = 0; + while ( (clazz = classes[j++]) ) { + if ( cur.indexOf( " " + clazz + " " ) < 0 ) { + cur += clazz + " "; + } + } + elem.className = jQuery.trim( cur ); + + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classes, elem, cur, clazz, j, + i = 0, + len = this.length, + proceed = arguments.length === 0 || typeof value === "string" && value; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).removeClass( value.call( this, j, this.className ) ); + }); + } + if ( proceed ) { + classes = ( value || "" ).match( core_rnotwhite ) || []; + + for ( ; i < len; i++ ) { + elem = this[ i ]; + // This expression is here for better compressibility (see addClass) + cur = elem.nodeType === 1 && ( elem.className ? + ( " " + elem.className + " " ).replace( rclass, " " ) : + "" + ); + + if ( cur ) { + j = 0; + while ( (clazz = classes[j++]) ) { + // Remove *all* instances + while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { + cur = cur.replace( " " + clazz + " ", " " ); + } + } + elem.className = value ? jQuery.trim( cur ) : ""; + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value; + + if ( typeof stateVal === "boolean" && type === "string" ) { + return stateVal ? this.addClass( value ) : this.removeClass( value ); + } + + if ( jQuery.isFunction( value ) ) { + return this.each(function( i ) { + jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + classNames = value.match( core_rnotwhite ) || []; + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space separated list + if ( self.hasClass( className ) ) { + self.removeClass( className ); + } else { + self.addClass( className ); + } + } + + // Toggle whole class name + } else if ( type === core_strundefined || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery._data( this, "__className__", this.className ); + } + + // If the element has a class name or if we're passed "false", + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " ", + i = 0, + l = this.length; + for ( ; i < l; i++ ) { + if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + var ret, hooks, isFunction, + elem = this[0]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { + return ret; + } + + ret = elem.value; + + return typeof ret === "string" ? + // handle most common string cases + ret.replace(rreturn, "") : + // handle cases where value is null/undef or number + ret == null ? "" : ret; + } + + return; + } + + isFunction = jQuery.isFunction( value ); + + return this.each(function( i ) { + var val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, jQuery( this ).val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray( val ) ) { + val = jQuery.map(val, function ( value ) { + return value == null ? "" : value + ""; + }); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + valHooks: { + option: { + get: function( elem ) { + // Use proper attribute retrieval(#6932, #12072) + var val = jQuery.find.attr( elem, "value" ); + return val != null ? + val : + elem.text; + } + }, + select: { + get: function( elem ) { + var value, option, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one" || index < 0, + values = one ? null : [], + max = one ? index + 1 : options.length, + i = index < 0 ? + max : + one ? index : 0; + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // oldIE doesn't update selected after form reset (#2551) + if ( ( option.selected || i === index ) && + // Don't return options that are disabled or in a disabled optgroup + ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && + ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var optionSet, option, + options = elem.options, + values = jQuery.makeArray( value ), + i = options.length; + + while ( i-- ) { + option = options[ i ]; + if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) { + optionSet = true; + } + } + + // force browsers to behave consistently when non-matching value is set + if ( !optionSet ) { + elem.selectedIndex = -1; + } + return values; + } + } + }, + + attr: function( elem, name, value ) { + var hooks, ret, + nType = elem.nodeType; + + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === core_strundefined ) { + return jQuery.prop( elem, name, value ); + } + + // All attributes are lowercase + // Grab necessary hook if one is defined + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + name = name.toLowerCase(); + hooks = jQuery.attrHooks[ name ] || + ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook ); + } + + if ( value !== undefined ) { + + if ( value === null ) { + jQuery.removeAttr( elem, name ); + + } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + elem.setAttribute( name, value + "" ); + return value; + } + + } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + ret = jQuery.find.attr( elem, name ); + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? + undefined : + ret; + } + }, + + removeAttr: function( elem, value ) { + var name, propName, + i = 0, + attrNames = value && value.match( core_rnotwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( (name = attrNames[i++]) ) { + propName = jQuery.propFix[ name ] || name; + + // Boolean attributes get special treatment (#10870) + if ( jQuery.expr.match.bool.test( name ) ) { + // Set corresponding property to false + if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { + elem[ propName ] = false; + // Support: IE<9 + // Also clear defaultChecked/defaultSelected (if appropriate) + } else { + elem[ jQuery.camelCase( "default-" + name ) ] = + elem[ propName ] = false; + } + + // See #9699 for explanation of this approach (setting first, then removal) + } else { + jQuery.attr( elem, name, "" ); + } + + elem.removeAttribute( getSetAttribute ? name : propName ); + } + } + }, + + attrHooks: { + type: { + set: function( elem, value ) { + if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { + // Setting the type on a radio button after the value resets the value in IE6-9 + // Reset value to default in case type is set after value during creation + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + } + }, + + propFix: { + "for": "htmlFor", + "class": "className" + }, + + prop: function( elem, name, value ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set properties on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + if ( notxml ) { + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ? + ret : + ( elem[ name ] = value ); + + } else { + return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ? + ret : + elem[ name ]; + } + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + // Use proper attribute retrieval(#12072) + var tabindex = jQuery.find.attr( elem, "tabindex" ); + + return tabindex ? + parseInt( tabindex, 10 ) : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + -1; + } + } + } +}); + +// Hooks for boolean attributes +boolHook = { + set: function( elem, value, name ) { + if ( value === false ) { + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { + // IE<8 needs the *property* name + elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); + + // Use defaultChecked and defaultSelected for oldIE + } else { + elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; + } + + return name; + } +}; +jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { + var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr; + + jQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ? + function( elem, name, isXML ) { + var fn = jQuery.expr.attrHandle[ name ], + ret = isXML ? + undefined : + /* jshint eqeqeq: false */ + (jQuery.expr.attrHandle[ name ] = undefined) != + getter( elem, name, isXML ) ? + + name.toLowerCase() : + null; + jQuery.expr.attrHandle[ name ] = fn; + return ret; + } : + function( elem, name, isXML ) { + return isXML ? + undefined : + elem[ jQuery.camelCase( "default-" + name ) ] ? + name.toLowerCase() : + null; + }; +}); + +// fix oldIE attroperties +if ( !getSetInput || !getSetAttribute ) { + jQuery.attrHooks.value = { + set: function( elem, value, name ) { + if ( jQuery.nodeName( elem, "input" ) ) { + // Does not return so that setAttribute is also used + elem.defaultValue = value; + } else { + // Use nodeHook if defined (#1954); otherwise setAttribute is fine + return nodeHook && nodeHook.set( elem, value, name ); + } + } + }; +} + +// IE6/7 do not support getting/setting some attributes with get/setAttribute +if ( !getSetAttribute ) { + + // Use this for any attribute in IE6/7 + // This fixes almost every IE6/7 issue + nodeHook = { + set: function( elem, value, name ) { + // Set the existing or create a new attribute node + var ret = elem.getAttributeNode( name ); + if ( !ret ) { + elem.setAttributeNode( + (ret = elem.ownerDocument.createAttribute( name )) + ); + } + + ret.value = value += ""; + + // Break association with cloned elements by also using setAttribute (#9646) + return name === "value" || value === elem.getAttribute( name ) ? + value : + undefined; + } + }; + jQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords = + // Some attributes are constructed with empty-string values when not defined + function( elem, name, isXML ) { + var ret; + return isXML ? + undefined : + (ret = elem.getAttributeNode( name )) && ret.value !== "" ? + ret.value : + null; + }; + jQuery.valHooks.button = { + get: function( elem, name ) { + var ret = elem.getAttributeNode( name ); + return ret && ret.specified ? + ret.value : + undefined; + }, + set: nodeHook.set + }; + + // Set contenteditable to false on removals(#10429) + // Setting to empty string throws an error as an invalid value + jQuery.attrHooks.contenteditable = { + set: function( elem, value, name ) { + nodeHook.set( elem, value === "" ? false : value, name ); + } + }; + + // Set width and height to auto instead of 0 on empty string( Bug #8150 ) + // This is for removals + jQuery.each([ "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = { + set: function( elem, value ) { + if ( value === "" ) { + elem.setAttribute( name, "auto" ); + return value; + } + } + }; + }); +} + + +// Some attributes require a special call on IE +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !jQuery.support.hrefNormalized ) { + // href/src property should get the full normalized URL (#10299/#12915) + jQuery.each([ "href", "src" ], function( i, name ) { + jQuery.propHooks[ name ] = { + get: function( elem ) { + return elem.getAttribute( name, 4 ); + } + }; + }); +} + +if ( !jQuery.support.style ) { + jQuery.attrHooks.style = { + get: function( elem ) { + // Return undefined in the case of empty string + // Note: IE uppercases css property names, but if we were to .toLowerCase() + // .cssText, that would destroy case senstitivity in URL's, like in "background" + return elem.style.cssText || undefined; + }, + set: function( elem, value ) { + return ( elem.style.cssText = value + "" ); + } + }; +} + +// Safari mis-reports the default selected property of an option +// Accessing the parent's selectedIndex property fixes it +if ( !jQuery.support.optSelected ) { + jQuery.propHooks.selected = { + get: function( elem ) { + var parent = elem.parentNode; + + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + return null; + } + }; +} + +jQuery.each([ + "tabIndex", + "readOnly", + "maxLength", + "cellSpacing", + "cellPadding", + "rowSpan", + "colSpan", + "useMap", + "frameBorder", + "contentEditable" +], function() { + jQuery.propFix[ this.toLowerCase() ] = this; +}); + +// IE6/7 call enctype encoding +if ( !jQuery.support.enctype ) { + jQuery.propFix.enctype = "encoding"; +} + +// Radios and checkboxes getter/setter +jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + set: function( elem, value ) { + if ( jQuery.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); + } + } + }; + if ( !jQuery.support.checkOn ) { + jQuery.valHooks[ this ].get = function( elem ) { + // Support: Webkit + // "" is returned instead of "on" if a value isn't specified + return elem.getAttribute("value") === null ? "on" : elem.value; + }; + } +}); +var rformElems = /^(?:input|select|textarea)$/i, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + var tmp, events, t, handleObjIn, + special, eventHandle, handleObj, + handlers, type, namespaces, origType, + elemData = jQuery._data( elem ); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !(events = elemData.events) ) { + events = elemData.events = {}; + } + if ( !(eventHandle = elemData.handle) ) { + eventHandle = elemData.handle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( core_rnotwhite ) || [""]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !(handlers = events[ type ]) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener/attachEvent if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + var j, handleObj, tmp, + origCount, t, events, + special, handlers, type, + namespaces, origType, + elemData = jQuery.hasData( elem ) && jQuery._data( elem ); + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( core_rnotwhite ) || [""]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + delete elemData.handle; + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery._removeData( elem, "events" ); + } + }, + + trigger: function( event, data, elem, onlyHandlers ) { + var handle, ontype, cur, + bubbleType, special, tmp, i, + eventPath = [ elem || document ], + type = core_hasOwn.call( event, "type" ) ? event.type : event, + namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; + + cur = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf(".") >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf(":") < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join("."); + event.namespace_re = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === (elem.ownerDocument || document) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { + + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { + event.preventDefault(); + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && + jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction() check here because IE6/7 fails that test. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + try { + elem[ type ](); + } catch ( e ) { + // IE<9 dies on focus/blur to hidden element (#1486,#12518) + // only reproducible on winXP IE8 native, not IE9 in IE8 mode + } + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event ); + + var i, ret, handleObj, matched, j, + handlerQueue = [], + args = core_slice.call( arguments ), + handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { + + // Triggered event must either 1) have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( (event.result = ret) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var sel, handleObj, matches, i, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + // Black-hole SVG instance trees (#13180) + // Avoid non-left-click bubbling in Firefox (#3861) + if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { + + /* jshint eqeqeq: false */ + for ( ; cur != this; cur = cur.parentNode || this ) { + /* jshint eqeqeq: true */ + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { + matches = []; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matches[ sel ] === undefined ) { + matches[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) >= 0 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matches[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, handlers: matches }); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( delegateCount < handlers.length ) { + handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); + } + + return handlerQueue; + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, copy, + type = event.type, + originalEvent = event, + fixHook = this.fixHooks[ type ]; + + if ( !fixHook ) { + this.fixHooks[ type ] = fixHook = + rmouseEvent.test( type ) ? this.mouseHooks : + rkeyEvent.test( type ) ? this.keyHooks : + {}; + } + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = new jQuery.Event( originalEvent ); + + i = copy.length; + while ( i-- ) { + prop = copy[ i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Support: IE<9 + // Fix target property (#1925) + if ( !event.target ) { + event.target = originalEvent.srcElement || document; + } + + // Support: Chrome 23+, Safari? + // Target should not be a text node (#504, #13143) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // Support: IE<9 + // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) + event.metaKey = !!event.metaKey; + + return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function( event, original ) { + var body, eventDoc, doc, + button = original.button, + fromElement = original.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && fromElement ) { + event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + special: { + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + focus: { + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== safeActiveElement() && this.focus ) { + try { + this.focus(); + return false; + } catch ( e ) { + // Support: IE<9 + // If we error on focus to hidden element (#1486, #12518), + // let .trigger() run the handlers + } + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === safeActiveElement() && this.blur ) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + click: { + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { + this.click(); + return false; + } + }, + + // For cross-browser consistency, don't fire native .click() on links + _default: function( event ) { + return jQuery.nodeName( event.target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Even when returnValue equals to undefined Firefox will still show alert + if ( event.result !== undefined ) { + event.originalEvent.returnValue = event.result; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + var name = "on" + type; + + if ( elem.detachEvent ) { + + // #8545, #7054, preventing memory leaks for custom events in IE6-8 + // detachEvent needed property on element, by name of that event, to properly expose it to GC + if ( typeof elem[ name ] === core_strundefined ) { + elem[ name ] = null; + } + + elem.detachEvent( name, handle ); + } + }; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || + src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + if ( !e ) { + return; + } + + // If preventDefault exists, run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // Support: IE + // Otherwise set the returnValue property of the original event to false + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + if ( !e ) { + return; + } + // If stopPropagation exists, run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + + // Support: IE + // Set the cancelBubble property of the original event to true + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + } +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +}); + +// IE submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Lazy-add a submit handler when a descendant form may potentially be submitted + jQuery.event.add( this, "click._submit keypress._submit", function( e ) { + // Node name check avoids a VML-related crash in IE (#9807) + var elem = e.target, + form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; + if ( form && !jQuery._data( form, "submitBubbles" ) ) { + jQuery.event.add( form, "submit._submit", function( event ) { + event._submit_bubble = true; + }); + jQuery._data( form, "submitBubbles", true ); + } + }); + // return undefined since we don't need an event listener + }, + + postDispatch: function( event ) { + // If form was submitted by the user, bubble the event up the tree + if ( event._submit_bubble ) { + delete event._submit_bubble; + if ( this.parentNode && !event.isTrigger ) { + jQuery.event.simulate( "submit", this.parentNode, event, true ); + } + } + }, + + teardown: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above + jQuery.event.remove( this, "._submit" ); + } + }; +} + +// IE change delegation and checkbox/radio fix +if ( !jQuery.support.changeBubbles ) { + + jQuery.event.special.change = { + + setup: function() { + + if ( rformElems.test( this.nodeName ) ) { + // IE doesn't fire change on a check/radio until blur; trigger it on click + // after a propertychange. Eat the blur-change in special.change.handle. + // This still fires onchange a second time for check/radio after blur. + if ( this.type === "checkbox" || this.type === "radio" ) { + jQuery.event.add( this, "propertychange._change", function( event ) { + if ( event.originalEvent.propertyName === "checked" ) { + this._just_changed = true; + } + }); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._just_changed && !event.isTrigger ) { + this._just_changed = false; + } + // Allow triggered, simulated change events (#11500) + jQuery.event.simulate( "change", this, event, true ); + }); + } + return false; + } + // Delegated event; lazy-add a change handler on descendant inputs + jQuery.event.add( this, "beforeactivate._change", function( e ) { + var elem = e.target; + + if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { + jQuery.event.simulate( "change", this.parentNode, event, true ); + } + }); + jQuery._data( elem, "changeBubbles", true ); + } + }); + }, + + handle: function( event ) { + var elem = event.target; + + // Swallow native change events from checkbox/radio, we already triggered them above + if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { + return event.handleObj.handler.apply( this, arguments ); + } + }, + + teardown: function() { + jQuery.event.remove( this, "._change" ); + + return !rformElems.test( this.nodeName ); + } + }; +} + +// Create "bubbling" focus and blur events +if ( !jQuery.support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler while someone wants focusin/focusout + var attaches = 0, + handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + if ( attaches++ === 0 ) { + document.addEventListener( orig, handler, true ); + } + }, + teardown: function() { + if ( --attaches === 0 ) { + document.removeEventListener( orig, handler, true ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var type, origFn; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on( types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + var elem = this[0]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +}); +var isSimple = /^.[^:#\[\.,]*$/, + rparentsprev = /^(?:parents|prev(?:Until|All))/, + rneedsContext = jQuery.expr.match.needsContext, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend({ + find: function( selector ) { + var i, + ret = [], + self = this, + len = self.length; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }) ); + } + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + // Needed because $( selector, context ) becomes $( context ).find( selector ) + ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); + ret.selector = this.selector ? this.selector + " " + selector : selector; + return ret; + }, + + has: function( target ) { + var i, + targets = jQuery( target, this ), + len = targets.length; + + return this.filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector || [], true) ); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector || [], false) ); + }, + + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + ret = [], + pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( ; i < l; i++ ) { + for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { + // Always skip document fragments + if ( cur.nodeType < 11 && (pos ? + pos.index(cur) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector(cur, selectors)) ) { + + cur = ret.push( cur ); + break; + } + } + } + + return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return jQuery.inArray( this[0], jQuery( elem ) ); + } + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context ) : + jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( jQuery.unique(all) ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter(selector) + ); + } +}); + +function sibling( cur, dir ) { + do { + cur = cur[ dir ]; + } while ( cur && cur.nodeType !== 1 ); + + return cur; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + if ( this.length > 1 ) { + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + ret = jQuery.unique( ret ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + } + + return this.pushStack( ret ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 && elem.nodeType === 1 ? + jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : + jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + })); + }, + + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + /* jshint -W018 */ + return !!qualifier.call( elem, i, elem ) !== not; + }); + + } + + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + }); + + } + + if ( typeof qualifier === "string" ) { + if ( isSimple.test( qualifier ) ) { + return jQuery.filter( qualifier, elements, not ); + } + + qualifier = jQuery.filter( qualifier, elements ); + } + + return jQuery.grep( elements, function( elem ) { + return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not; + }); +} +function createSafeFragment( document ) { + var list = nodeNames.split( "|" ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + +var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", + rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, + rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + rtagName = /<([\w:]+)/, + rtbody = /\s*$/g, + + // We have to close these tags to support XHTML (#13200) + wrapMap = { + option: [ 1, "" ], + legend: [ 1, "
", "
" ], + area: [ 1, "", "" ], + param: [ 1, "", "" ], + thead: [ 1, "", "
" ], + tr: [ 2, "", "
" ], + col: [ 2, "", "
" ], + td: [ 3, "", "
" ], + + // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, + // unless wrapped in a div with non-breaking characters in front of it. + _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X
", "
" ] + }, + safeFragment = createSafeFragment( document ), + fragmentDiv = safeFragment.appendChild( document.createElement("div") ); + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +jQuery.fn.extend({ + text: function( value ) { + return jQuery.access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); + }, null, value, arguments.length ); + }, + + append: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + }); + }, + + prepend: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + }); + }, + + before: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + }); + }, + + after: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + }); + }, + + // keepData is for internal use only--do not document + remove: function( selector, keepData ) { + var elem, + elems = selector ? jQuery.filter( selector, this ) : this, + i = 0; + + for ( ; (elem = elems[i]) != null; i++ ) { + + if ( !keepData && elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem ) ); + } + + if ( elem.parentNode ) { + if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { + setGlobalEval( getAll( elem, "script" ) ); + } + elem.parentNode.removeChild( elem ); + } + } + + return this; + }, + + empty: function() { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + } + + // Remove any remaining nodes + while ( elem.firstChild ) { + elem.removeChild( elem.firstChild ); + } + + // If this is a select, ensure that it displays empty (#12336) + // Support: IE<9 + if ( elem.options && jQuery.nodeName( elem, "select" ) ) { + elem.options.length = 0; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function () { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + }); + }, + + html: function( value ) { + return jQuery.access( this, function( value ) { + var elem = this[0] || {}, + i = 0, + l = this.length; + + if ( value === undefined ) { + return elem.nodeType === 1 ? + elem.innerHTML.replace( rinlinejQuery, "" ) : + undefined; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && + ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && + !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { + + value = value.replace( rxhtmlTag, "<$1>" ); + + try { + for (; i < l; i++ ) { + // Remove element nodes and prevent memory leaks + elem = this[i] || {}; + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch(e) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var + // Snapshot the DOM in case .domManip sweeps something relevant into its fragment + args = jQuery.map( this, function( elem ) { + return [ elem.nextSibling, elem.parentNode ]; + }), + i = 0; + + // Make the changes, replacing each context element with the new content + this.domManip( arguments, function( elem ) { + var next = args[ i++ ], + parent = args[ i++ ]; + + if ( parent ) { + // Don't use the snapshot next if it has moved (#13810) + if ( next && next.parentNode !== parent ) { + next = this.nextSibling; + } + jQuery( this ).remove(); + parent.insertBefore( elem, next ); + } + // Allow new content to include elements from the context set + }, true ); + + // Force removal if there was no new content (e.g., from empty arguments) + return i ? this : this.remove(); + }, + + detach: function( selector ) { + return this.remove( selector, true ); + }, + + domManip: function( args, callback, allowIntersection ) { + + // Flatten any nested arrays + args = core_concat.apply( [], args ); + + var first, node, hasScripts, + scripts, doc, fragment, + i = 0, + l = this.length, + set = this, + iNoClone = l - 1, + value = args[0], + isFunction = jQuery.isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) { + return this.each(function( index ) { + var self = set.eq( index ); + if ( isFunction ) { + args[0] = value.call( this, index, self.html() ); + } + self.domManip( args, callback, allowIntersection ); + }); + } + + if ( l ) { + fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + if ( first ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( this[i], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { + + if ( node.src ) { + // Hope ajax is available... + jQuery._evalUrl( node.src ); + } else { + jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); + } + } + } + } + + // Fix #11809: Avoid leaking memory + fragment = first = null; + } + } + + return this; + } +}); + +// Support: IE<8 +// Manipulating tables requires a tbody +function manipulationTarget( elem, content ) { + return jQuery.nodeName( elem, "table" ) && + jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ? + + elem.getElementsByTagName("tbody")[0] || + elem.appendChild( elem.ownerDocument.createElement("tbody") ) : + elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + var match = rscriptTypeMasked.exec( elem.type ); + if ( match ) { + elem.type = match[1]; + } else { + elem.removeAttribute("type"); + } + return elem; +} + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var elem, + i = 0; + for ( ; (elem = elems[i]) != null; i++ ) { + jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); + } +} + +function cloneCopyEvent( src, dest ) { + + if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { + return; + } + + var type, i, l, + oldData = jQuery._data( src ), + curData = jQuery._data( dest, oldData ), + events = oldData.events; + + if ( events ) { + delete curData.handle; + curData.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + + // make the cloned public data object a copy from the original + if ( curData.data ) { + curData.data = jQuery.extend( {}, curData.data ); + } +} + +function fixCloneNodeIssues( src, dest ) { + var nodeName, e, data; + + // We do not need to do anything for non-Elements + if ( dest.nodeType !== 1 ) { + return; + } + + nodeName = dest.nodeName.toLowerCase(); + + // IE6-8 copies events bound via attachEvent when using cloneNode. + if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) { + data = jQuery._data( dest ); + + for ( e in data.events ) { + jQuery.removeEvent( dest, e, data.handle ); + } + + // Event data gets referenced instead of copied if the expando gets copied too + dest.removeAttribute( jQuery.expando ); + } + + // IE blanks contents when cloning scripts, and tries to evaluate newly-set text + if ( nodeName === "script" && dest.text !== src.text ) { + disableScript( dest ).text = src.text; + restoreScript( dest ); + + // IE6-10 improperly clones children of object elements using classid. + // IE10 throws NoModificationAllowedError if parent is null, #12132. + } else if ( nodeName === "object" ) { + if ( dest.parentNode ) { + dest.outerHTML = src.outerHTML; + } + + // This path appears unavoidable for IE9. When cloning an object + // element in IE9, the outerHTML strategy above is not sufficient. + // If the src has innerHTML and the destination does not, + // copy the src.innerHTML into the dest.innerHTML. #10324 + if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { + dest.innerHTML = src.innerHTML; + } + + } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) { + // IE6-8 fails to persist the checked state of a cloned checkbox + // or radio button. Worse, IE6-7 fail to give the cloned element + // a checked appearance if the defaultChecked value isn't also set + + dest.defaultChecked = dest.checked = src.checked; + + // IE6-7 get confused and end up setting the value of a cloned + // checkbox/radio button to an empty string instead of "on" + if ( dest.value !== src.value ) { + dest.value = src.value; + } + + // IE6-8 fails to return the selected option to the default selected + // state when cloning options + } else if ( nodeName === "option" ) { + dest.defaultSelected = dest.selected = src.defaultSelected; + + // IE6-8 fails to set the defaultValue to the correct value when + // cloning other types of input fields + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + i = 0, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone(true); + jQuery( insert[i] )[ original ]( elems ); + + // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() + core_push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +}); + +function getAll( context, tag ) { + var elems, elem, + i = 0, + found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) : + typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) : + undefined; + + if ( !found ) { + for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { + if ( !tag || jQuery.nodeName( elem, tag ) ) { + found.push( elem ); + } else { + jQuery.merge( found, getAll( elem, tag ) ); + } + } + } + + return tag === undefined || tag && jQuery.nodeName( context, tag ) ? + jQuery.merge( [ context ], found ) : + found; +} + +// Used in buildFragment, fixes the defaultChecked property +function fixDefaultChecked( elem ) { + if ( manipulation_rcheckableType.test( elem.type ) ) { + elem.defaultChecked = elem.checked; + } +} + +jQuery.extend({ + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var destElements, node, clone, i, srcElements, + inPage = jQuery.contains( elem.ownerDocument, elem ); + + if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { + clone = elem.cloneNode( true ); + + // IE<=8 does not properly clone detached, unknown element nodes + } else { + fragmentDiv.innerHTML = elem.outerHTML; + fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); + } + + if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && + (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { + + // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + // Fix all IE cloning issues + for ( i = 0; (node = srcElements[i]) != null; ++i ) { + // Ensure that the destination node is not null; Fixes #9587 + if ( destElements[i] ) { + fixCloneNodeIssues( node, destElements[i] ); + } + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0; (node = srcElements[i]) != null; i++ ) { + cloneCopyEvent( node, destElements[i] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + destElements = srcElements = node = null; + + // Return the cloned set + return clone; + }, + + buildFragment: function( elems, context, scripts, selection ) { + var j, elem, contains, + tmp, tag, tbody, wrap, + l = elems.length, + + // Ensure a safe fragment + safe = createSafeFragment( context ), + + nodes = [], + i = 0; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( jQuery.type( elem ) === "object" ) { + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || safe.appendChild( context.createElement("div") ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + + tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[2]; + + // Descend through wrappers to the right content + j = wrap[0]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Manually add leading whitespace removed by IE + if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { + nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); + } + + // Remove IE's autoinserted from table fragments + if ( !jQuery.support.tbody ) { + + // String was a , *may* have spurious + elem = tag === "table" && !rtbody.test( elem ) ? + tmp.firstChild : + + // String was a bare or + wrap[1] === "
" && !rtbody.test( elem ) ? + tmp : + 0; + + j = elem && elem.childNodes.length; + while ( j-- ) { + if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { + elem.removeChild( tbody ); + } + } + } + + jQuery.merge( nodes, tmp.childNodes ); + + // Fix #12392 for WebKit and IE > 9 + tmp.textContent = ""; + + // Fix #12392 for oldIE + while ( tmp.firstChild ) { + tmp.removeChild( tmp.firstChild ); + } + + // Remember the top-level container for proper cleanup + tmp = safe.lastChild; + } + } + } + + // Fix #11356: Clear elements from fragment + if ( tmp ) { + safe.removeChild( tmp ); + } + + // Reset defaultChecked for any radios and checkboxes + // about to be appended to the DOM in IE 6/7 (#8060) + if ( !jQuery.support.appendChecked ) { + jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); + } + + i = 0; + while ( (elem = nodes[ i++ ]) ) { + + // #4087 - If origin and destination elements are the same, and this is + // that element, do not do anything + if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { + continue; + } + + contains = jQuery.contains( elem.ownerDocument, elem ); + + // Append to fragment + tmp = getAll( safe.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( contains ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( (elem = tmp[ j++ ]) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + tmp = null; + + return safe; + }, + + cleanData: function( elems, /* internal */ acceptData ) { + var elem, type, id, data, + i = 0, + internalKey = jQuery.expando, + cache = jQuery.cache, + deleteExpando = jQuery.support.deleteExpando, + special = jQuery.event.special; + + for ( ; (elem = elems[i]) != null; i++ ) { + + if ( acceptData || jQuery.acceptData( elem ) ) { + + id = elem[ internalKey ]; + data = id && cache[ id ]; + + if ( data ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Remove cache only if it was not already removed by jQuery.event.remove + if ( cache[ id ] ) { + + delete cache[ id ]; + + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( deleteExpando ) { + delete elem[ internalKey ]; + + } else if ( typeof elem.removeAttribute !== core_strundefined ) { + elem.removeAttribute( internalKey ); + + } else { + elem[ internalKey ] = null; + } + + core_deletedIds.push( id ); + } + } + } + } + }, + + _evalUrl: function( url ) { + return jQuery.ajax({ + url: url, + type: "GET", + dataType: "script", + async: false, + global: false, + "throws": true + }); + } +}); +jQuery.fn.extend({ + wrapAll: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapAll( html.call(this, i) ); + }); + } + + if ( this[0] ) { + // The elements to wrap the target around + var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); + + if ( this[0].parentNode ) { + wrap.insertBefore( this[0] ); + } + + wrap.map(function() { + var elem = this; + + while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { + elem = elem.firstChild; + } + + return elem; + }).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapInner( html.call(this, i) ); + }); + } + + return this.each(function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + }); + }, + + wrap: function( html ) { + var isFunction = jQuery.isFunction( html ); + + return this.each(function(i) { + jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); + }); + }, + + unwrap: function() { + return this.parent().each(function() { + if ( !jQuery.nodeName( this, "body" ) ) { + jQuery( this ).replaceWith( this.childNodes ); + } + }).end(); + } +}); +var iframe, getStyles, curCSS, + ralpha = /alpha\([^)]*\)/i, + ropacity = /opacity\s*=\s*([^)]*)/, + rposition = /^(top|right|bottom|left)$/, + // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" + // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rmargin = /^margin/, + rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), + rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), + rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ), + elemdisplay = { BODY: "block" }, + + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: 0, + fontWeight: 400 + }, + + cssExpand = [ "Top", "Right", "Bottom", "Left" ], + cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; + +// return a css property mapped to a potentially vendor prefixed property +function vendorPropName( style, name ) { + + // shortcut for names that are not vendor prefixed + if ( name in style ) { + return name; + } + + // check for vendor prefixed names + var capName = name.charAt(0).toUpperCase() + name.slice(1), + origName = name, + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in style ) { + return name; + } + } + + return origName; +} + +function isHidden( elem, el ) { + // isHidden might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); +} + +function showHide( elements, show ) { + var display, elem, hidden, + values = [], + index = 0, + length = elements.length; + + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + values[ index ] = jQuery._data( elem, "olddisplay" ); + display = elem.style.display; + if ( show ) { + // Reset the inline display of this element to learn if it is + // being hidden by cascaded rules or not + if ( !values[ index ] && display === "none" ) { + elem.style.display = ""; + } + + // Set elements which have been overridden with display: none + // in a stylesheet to whatever the default browser style is + // for such an element + if ( elem.style.display === "" && isHidden( elem ) ) { + values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); + } + } else { + + if ( !values[ index ] ) { + hidden = isHidden( elem ); + + if ( display && display !== "none" || !hidden ) { + jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); + } + } + } + } + + // Set the display of most of the elements in a second loop + // to avoid the constant reflow + for ( index = 0; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + if ( !show || elem.style.display === "none" || elem.style.display === "" ) { + elem.style.display = show ? values[ index ] || "" : "none"; + } + } + + return elements; +} + +jQuery.fn.extend({ + css: function( name, value ) { + return jQuery.access( this, function( elem, name, value ) { + var len, styles, + map = {}, + i = 0; + + if ( jQuery.isArray( name ) ) { + styles = getStyles( elem ); + len = name.length; + + for ( ; i < len; i++ ) { + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); + } + + return map; + } + + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + }, + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state ) { + if ( typeof state === "boolean" ) { + return state ? this.show() : this.hide(); + } + + return this.each(function() { + if ( isHidden( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + }); + } +}); + +jQuery.extend({ + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + } + } + } + }, + + // Don't automatically add "px" to these possibly-unitless properties + cssNumber: { + "columnCount": true, + "fillOpacity": true, + "fontWeight": true, + "lineHeight": true, + "opacity": true, + "order": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: { + // normalize float css property + "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" + }, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = jQuery.camelCase( name ), + style = elem.style; + + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // convert relative number strings (+= or -=) to relative numbers. #7345 + if ( type === "string" && (ret = rrelNum.exec( value )) ) { + value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); + // Fixes bug #9237 + type = "number"; + } + + // Make sure that NaN and null values aren't set. See: #7116 + if ( value == null || type === "number" && isNaN( value ) ) { + return; + } + + // If a number was passed in, add 'px' to the (except for certain CSS properties) + if ( type === "number" && !jQuery.cssNumber[ origName ] ) { + value += "px"; + } + + // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, + // but it would mean to define eight (for every problematic property) identical functions + if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { + style[ name ] = "inherit"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { + + // Wrapped to prevent IE from throwing errors when 'invalid' values are provided + // Fixes bug #5509 + try { + style[ name ] = value; + } catch(e) {} + } + + } else { + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, extra, styles ) { + var num, val, hooks, + origName = jQuery.camelCase( name ); + + // Make sure that we're working with the right name + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name, styles ); + } + + //convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Return, converting to number if forced or a qualifier was provided and val looks numeric + if ( extra === "" || extra ) { + num = parseFloat( val ); + return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; + } + return val; + } +}); + +// NOTE: we've included the "window" in window.getComputedStyle +// because jsdom on node.js will break without it. +if ( window.getComputedStyle ) { + getStyles = function( elem ) { + return window.getComputedStyle( elem, null ); + }; + + curCSS = function( elem, name, _computed ) { + var width, minWidth, maxWidth, + computed = _computed || getStyles( elem ), + + // getPropertyValue is only needed for .css('filter') in IE9, see #12537 + ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined, + style = elem.style; + + if ( computed ) { + + if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right + // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels + // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values + if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret; + }; +} else if ( document.documentElement.currentStyle ) { + getStyles = function( elem ) { + return elem.currentStyle; + }; + + curCSS = function( elem, name, _computed ) { + var left, rs, rsLeft, + computed = _computed || getStyles( elem ), + ret = computed ? computed[ name ] : undefined, + style = elem.style; + + // Avoid setting ret to empty string here + // so we don't default to auto + if ( ret == null && style && style[ name ] ) { + ret = style[ name ]; + } + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + // but not position css attributes, as those are proportional to the parent element instead + // and we can't measure the parent instead because it might trigger a "stacking dolls" problem + if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { + + // Remember the original values + left = style.left; + rs = elem.runtimeStyle; + rsLeft = rs && rs.left; + + // Put in the new values to get a computed value out + if ( rsLeft ) { + rs.left = elem.currentStyle.left; + } + style.left = name === "fontSize" ? "1em" : ret; + ret = style.pixelLeft + "px"; + + // Revert the changed values + style.left = left; + if ( rsLeft ) { + rs.left = rsLeft; + } + } + + return ret === "" ? "auto" : ret; + }; +} + +function setPositiveNumber( elem, value, subtract ) { + var matches = rnumsplit.exec( value ); + return matches ? + // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : + value; +} + +function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { + var i = extra === ( isBorderBox ? "border" : "content" ) ? + // If we already have the right measurement, avoid augmentation + 4 : + // Otherwise initialize for horizontal or vertical properties + name === "width" ? 1 : 0, + + val = 0; + + for ( ; i < 4; i += 2 ) { + // both box models exclude margin, so add it if we want it + if ( extra === "margin" ) { + val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); + } + + if ( isBorderBox ) { + // border-box includes padding, so remove it if we want content + if ( extra === "content" ) { + val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } + + // at this point, extra isn't border nor margin, so remove border + if ( extra !== "margin" ) { + val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } else { + // at this point, extra isn't content, so add padding + val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // at this point, extra isn't content nor padding, so add border + if ( extra !== "padding" ) { + val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } + } + + return val; +} + +function getWidthOrHeight( elem, name, extra ) { + + // Start with offset property, which is equivalent to the border-box value + var valueIsBorderBox = true, + val = name === "width" ? elem.offsetWidth : elem.offsetHeight, + styles = getStyles( elem ), + isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + + // some non-html elements return undefined for offsetWidth, so check for null/undefined + // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 + // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 + if ( val <= 0 || val == null ) { + // Fall back to computed then uncomputed css if necessary + val = curCSS( elem, name, styles ); + if ( val < 0 || val == null ) { + val = elem.style[ name ]; + } + + // Computed unit is not pixels. Stop here and return. + if ( rnumnonpx.test(val) ) { + return val; + } + + // we need the check for style in case a browser which returns unreliable values + // for getComputedStyle silently falls back to the reliable elem.style + valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); + + // Normalize "", auto, and prepare for extra + val = parseFloat( val ) || 0; + } + + // use the active box-sizing model to add/subtract irrelevant styles + return ( val + + augmentWidthOrHeight( + elem, + name, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox, + styles + ) + ) + "px"; +} + +// Try to determine the default display value of an element +function css_defaultDisplay( nodeName ) { + var doc = document, + display = elemdisplay[ nodeName ]; + + if ( !display ) { + display = actualDisplay( nodeName, doc ); + + // If the simple way fails, read from inside an iframe + if ( display === "none" || !display ) { + // Use the already-created iframe if possible + iframe = ( iframe || + jQuery(" - -
- -
- -
- -
- - - diff --git a/AmazonViewer/doc/jquery/external/jquery/jquery.js b/AmazonViewer/doc/jquery/external/jquery/jquery.js deleted file mode 100644 index c5c6482..0000000 --- a/AmazonViewer/doc/jquery/external/jquery/jquery.js +++ /dev/null @@ -1,9789 +0,0 @@ -/*! - * jQuery JavaScript Library v1.10.2 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2013-07-03T13:48Z - */ -(function( window, undefined ) { - -// Can't do this because several apps including ASP.NET trace -// the stack via arguments.caller.callee and Firefox dies if -// you try to trace through "use strict" call chains. (#13335) -// Support: Firefox 18+ -//"use strict"; -var - // The deferred used on DOM ready - readyList, - - // A central reference to the root jQuery(document) - rootjQuery, - - // Support: IE<10 - // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined` - core_strundefined = typeof undefined, - - // Use the correct document accordingly with window argument (sandbox) - location = window.location, - document = window.document, - docElem = document.documentElement, - - // Map over jQuery in case of overwrite - _jQuery = window.jQuery, - - // Map over the $ in case of overwrite - _$ = window.$, - - // [[Class]] -> type pairs - class2type = {}, - - // List of deleted data cache ids, so we can reuse them - core_deletedIds = [], - - core_version = "1.10.2", - - // Save a reference to some core methods - core_concat = core_deletedIds.concat, - core_push = core_deletedIds.push, - core_slice = core_deletedIds.slice, - core_indexOf = core_deletedIds.indexOf, - core_toString = class2type.toString, - core_hasOwn = class2type.hasOwnProperty, - core_trim = core_version.trim, - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context, rootjQuery ); - }, - - // Used for matching numbers - core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, - - // Used for splitting on whitespace - core_rnotwhite = /\S+/g, - - // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, - rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }, - - // The ready event handler - completed = function( event ) { - - // readyState === "complete" is good enough for us to call the dom ready in oldIE - if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { - detach(); - jQuery.ready(); - } - }, - // Clean-up method for dom ready events - detach = function() { - if ( document.addEventListener ) { - document.removeEventListener( "DOMContentLoaded", completed, false ); - window.removeEventListener( "load", completed, false ); - - } else { - document.detachEvent( "onreadystatechange", completed ); - window.detachEvent( "onload", completed ); - } - }; - -jQuery.fn = jQuery.prototype = { - // The current version of jQuery being used - jquery: core_version, - - constructor: jQuery, - init: function( selector, context, rootjQuery ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - - // scripts is true for back-compat - jQuery.merge( this, jQuery.parseHTML( - match[1], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - // Properties of context are called as methods if possible - if ( jQuery.isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }, - - // Start with an empty selector - selector: "", - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return core_slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == null ? - - // Return a 'clean' array - this.toArray() : - - // Return just the object - ( num < 0 ? this[ this.length + num ] : this[ num ] ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - ret.context = this.context; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - ready: function( fn ) { - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; - }, - - slice: function() { - return this.pushStack( core_slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: core_push, - sort: [].sort, - splice: [].splice -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.extend = jQuery.fn.extend = function() { - var src, copyIsArray, copy, name, options, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( length === i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - // Unique for each copy of jQuery on the page - // Non-digits removed to match rinlinejQuery - expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), - - noConflict: function( deep ) { - if ( window.$ === jQuery ) { - window.$ = _$; - } - - if ( deep && window.jQuery === jQuery ) { - window.jQuery = _jQuery; - } - - return jQuery; - }, - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger("ready").off("ready"); - } - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - isWindow: function( obj ) { - /* jshint eqeqeq: false */ - return obj != null && obj == obj.window; - }, - - isNumeric: function( obj ) { - return !isNaN( parseFloat(obj) ) && isFinite( obj ); - }, - - type: function( obj ) { - if ( obj == null ) { - return String( obj ); - } - return typeof obj === "object" || typeof obj === "function" ? - class2type[ core_toString.call(obj) ] || "object" : - typeof obj; - }, - - isPlainObject: function( obj ) { - var key; - - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - try { - // Not own constructor property must be Object - if ( obj.constructor && - !core_hasOwn.call(obj, "constructor") && - !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; - } - - // Support: IE<9 - // Handle iteration over inherited properties before own properties. - if ( jQuery.support.ownLast ) { - for ( key in obj ) { - return core_hasOwn.call( obj, key ); - } - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - for ( key in obj ) {} - - return key === undefined || core_hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - error: function( msg ) { - throw new Error( msg ); - }, - - // data: string of html - // context (optional): If specified, the fragment will be created in this context, defaults to document - // keepScripts (optional): If true, will include scripts passed in the html string - parseHTML: function( data, context, keepScripts ) { - if ( !data || typeof data !== "string" ) { - return null; - } - if ( typeof context === "boolean" ) { - keepScripts = context; - context = false; - } - context = context || document; - - var parsed = rsingleTag.exec( data ), - scripts = !keepScripts && []; - - // Single tag - if ( parsed ) { - return [ context.createElement( parsed[1] ) ]; - } - - parsed = jQuery.buildFragment( [ data ], context, scripts ); - if ( scripts ) { - jQuery( scripts ).remove(); - } - return jQuery.merge( [], parsed.childNodes ); - }, - - parseJSON: function( data ) { - // Attempt to parse using the native JSON parser first - if ( window.JSON && window.JSON.parse ) { - return window.JSON.parse( data ); - } - - if ( data === null ) { - return data; - } - - if ( typeof data === "string" ) { - - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); - - if ( data ) { - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test( data.replace( rvalidescape, "@" ) - .replace( rvalidtokens, "]" ) - .replace( rvalidbraces, "")) ) { - - return ( new Function( "return " + data ) )(); - } - } - } - - jQuery.error( "Invalid JSON: " + data ); - }, - - // Cross-browser xml parsing - parseXML: function( data ) { - var xml, tmp; - if ( !data || typeof data !== "string" ) { - return null; - } - try { - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); - } - } catch( e ) { - xml = undefined; - } - if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; - }, - - noop: function() {}, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && jQuery.trim( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - // args is for internal usage only - each: function( obj, callback, args ) { - var value, - i = 0, - length = obj.length, - isArray = isArraylike( obj ); - - if ( args ) { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } - } - - return obj; - }, - - // Use native String.trim function wherever possible - trim: core_trim && !core_trim.call("\uFEFF\xA0") ? - function( text ) { - return text == null ? - "" : - core_trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArraylike( Object(arr) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - core_push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - var len; - - if ( arr ) { - if ( core_indexOf ) { - return core_indexOf.call( arr, elem, i ); - } - - len = arr.length; - i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; - - for ( ; i < len; i++ ) { - // Skip accessing in sparse arrays - if ( i in arr && arr[ i ] === elem ) { - return i; - } - } - } - - return -1; - }, - - merge: function( first, second ) { - var l = second.length, - i = first.length, - j = 0; - - if ( typeof l === "number" ) { - for ( ; j < l; j++ ) { - first[ i++ ] = second[ j ]; - } - } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, inv ) { - var retVal, - ret = [], - i = 0, - length = elems.length; - inv = !!inv; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); - } - } - - return ret; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, - i = 0, - length = elems.length, - isArray = isArraylike( elems ), - ret = []; - - // Go through the array, translating each of the items to their - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - } - - // Flatten any nested arrays - return core_concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var args, proxy, tmp; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = core_slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - // Multifunctional method to get and set values of a collection - // The value/s can optionally be executed if it's a function - access: function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - length = elems.length, - bulk = key == null; - - // Sets many values - if ( jQuery.type( key ) === "object" ) { - chainable = true; - for ( i in key ) { - jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !jQuery.isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < length; i++ ) { - fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); - } - } - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - length ? fn( elems[0], key ) : emptyGet; - }, - - now: function() { - return ( new Date() ).getTime(); - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations. - // Note: this method belongs to the css module but it's needed here for the support module. - // If support gets modularized, this method should be moved back to the css module. - swap: function( elem, options, callback, args ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.apply( elem, args || [] ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; - } -}); - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called after the browser event has already occurred. - // we once tried to use readyState "interactive" here, but it caused issues like the one - // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - setTimeout( jQuery.ready ); - - // Standards-based browsers support DOMContentLoaded - } else if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed, false ); - - // If IE event model is used - } else { - // Ensure firing before onload, maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", completed ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", completed ); - - // If IE and not a frame - // continually check to see if the document is ready - var top = false; - - try { - top = window.frameElement == null && document.documentElement; - } catch(e) {} - - if ( top && top.doScroll ) { - (function doScrollCheck() { - if ( !jQuery.isReady ) { - - try { - // Use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - top.doScroll("left"); - } catch(e) { - return setTimeout( doScrollCheck, 50 ); - } - - // detach all dom ready events - detach(); - - // and execute any waiting functions - jQuery.ready(); - } - })(); - } - } - } - return readyList.promise( obj ); -}; - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -function isArraylike( obj ) { - var length = obj.length, - type = jQuery.type( obj ); - - if ( jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === "array" || type !== "function" && - ( length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj ); -} - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); -/*! - * Sizzle CSS Selector Engine v1.10.2 - * http://sizzlejs.com/ - * - * Copyright 2013 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2013-07-03 - */ -(function( window, undefined ) { - -var i, - support, - cachedruns, - Expr, - getText, - isXML, - compile, - outermostContext, - sortInput, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + -(new Date()), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - hasDuplicate = false, - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - return 0; - } - return 0; - }, - - // General-purpose constants - strundefined = typeof undefined, - MAX_NEGATIVE = 1 << 31, - - // Instance methods - hasOwn = ({}).hasOwnProperty, - arr = [], - pop = arr.pop, - push_native = arr.push, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf if we can't use a native one - indexOf = arr.indexOf || function( elem ) { - var i = 0, - len = this.length; - for ( ; i < len; i++ ) { - if ( this[i] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", - - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), - - // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + - "*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", - - // Prefer arguments quoted, - // then not containing pseudos/brackets, - // then attribute selectors/non-parenthetical expressions, - // then anything else - // These preferences are here to reduce the number of selectors - // needing tokenize in the PSEUDO preFilter - pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - - rsibling = new RegExp( whitespace + "*[+~]" ), - rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rescape = /'|\\/g, - - // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - // BMP codepoint - high < 0 ? - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }; - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - (arr = slice.call( preferredDoc.childNodes )), - preferredDoc.childNodes - ); - // Support: Android<4.0 - // Detect silently failing push.apply - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - push_native.apply( target, slice.call(els) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var match, elem, m, nodeType, - // QSA vars - i, groups, old, nid, newContext, newSelector; - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - - context = context || document; - results = results || []; - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { - return []; - } - - if ( documentIsHTML && !seed ) { - - // Shortcuts - if ( (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; - } - } - - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // QSA path - if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - nid = old = expando; - newContext = context; - newSelector = nodeType === 9 && selector; - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - groups = tokenize( selector ); - - if ( (old = context.getAttribute("id")) ) { - nid = old.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - nid = "[id='" + nid + "'] "; - - i = groups.length; - while ( i-- ) { - groups[i] = nid + toSelector( groups[i] ); - } - newContext = rsibling.test( selector ) && context.parentNode || context; - newSelector = groups.join(","); - } - - if ( newSelector ) { - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch(qsaError) { - } finally { - if ( !old ) { - context.removeAttribute("id"); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {Function(string, Object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key += " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key ] = value); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created div and expects a boolean result - */ -function assert( fn ) { - var div = document.createElement("div"); - - try { - return !!fn( div ); - } catch (e) { - return false; - } finally { - // Remove from its parent by default - if ( div.parentNode ) { - div.parentNode.removeChild( div ); - } - // release memory in IE - div = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split("|"), - i = attrs.length; - - while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - ( ~b.sourceIndex || MAX_NEGATIVE ) - - ( ~a.sourceIndex || MAX_NEGATIVE ); - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Detect xml - * @param {Element|Object} elem An element or a document - */ -isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var doc = node ? node.ownerDocument || node : preferredDoc, - parent = doc.defaultView; - - // If no document and documentElement is available, return - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Set our document - document = doc; - docElem = doc.documentElement; - - // Support tests - documentIsHTML = !isXML( doc ); - - // Support: IE>8 - // If iframe document is assigned to "document" variable and if iframe has been reloaded, - // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 - // IE6-8 do not support the defaultView property so parent will be undefined - if ( parent && parent.attachEvent && parent !== parent.top ) { - parent.attachEvent( "onbeforeunload", function() { - setDocument(); - }); - } - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) - support.attributes = assert(function( div ) { - div.className = "i"; - return !div.getAttribute("className"); - }); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert(function( div ) { - div.appendChild( doc.createComment("") ); - return !div.getElementsByTagName("*").length; - }); - - // Check if getElementsByClassName can be trusted - support.getElementsByClassName = assert(function( div ) { - div.innerHTML = "
"; - - // Support: Safari<4 - // Catch class over-caching - div.firstChild.className = "i"; - // Support: Opera<10 - // Catch gEBCN failure to find non-leading classes - return div.getElementsByClassName("i").length === 2; - }); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert(function( div ) { - docElem.appendChild( div ).id = expando; - return !doc.getElementsByName || !doc.getElementsByName( expando ).length; - }); - - // ID find and filter - if ( support.getById ) { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== strundefined && documentIsHTML ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - } else { - // Support: IE6/7 - // getElementById is not reliable as a find shortcut - delete Expr.find["ID"]; - - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - } - - // Tag - Expr.find["TAG"] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== strundefined ) { - return context.getElementsByTagName( tag ); - } - } : - function( tag, context ) { - var elem, - tmp = [], - i = 0, - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( (elem = results[i++]) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See http://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // http://bugs.jquery.com/ticket/12359 - div.innerHTML = ""; - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - }); - - assert(function( div ) { - - // Support: Opera 10-12/IE8 - // ^= $= *= and empty values - // Should not select anything - // Support: Windows 8 Native Apps - // The type attribute is restricted during .innerHTML assignment - var input = doc.createElement("input"); - input.setAttribute( "type", "hidden" ); - div.appendChild( input ).setAttribute( "t", "" ); - - if ( div.querySelectorAll("[t^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - div.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( div, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); - - /* Contains - ---------------------------------------------------------------------- */ - - // Element contains another - // Purposefully does not implement inclusive descendent - // As in, an element does not contain itself - contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = docElem.compareDocumentPosition ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b ); - - if ( compare ) { - // Disconnected nodes - if ( compare & 1 || - (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { - - // Choose the first element that is related to our preferred document - if ( a === doc || contains(preferredDoc, a) ) { - return -1; - } - if ( b === doc || contains(preferredDoc, b) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } - - // Not directly comparable, sort on existence of method - return a.compareDocumentPosition ? -1 : 1; - } : - function( a, b ) { - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - - // Parentless nodes are either documents or disconnected - } else if ( !aup || !bup ) { - return a === doc ? -1 : - b === doc ? 1 : - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - return doc; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - if ( support.matchesSelector && documentIsHTML && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch(e) {} - } - - return Sizzle( expr, document, null, [elem] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val === undefined ? - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - (val = elem.getAttributeNode(name)) && val.specified ? - val.value : - null : - val; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( (elem = results[i++]) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - for ( ; (node = elem[i]); i++ ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (see #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[5] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[3] && match[4] !== undefined ) { - match[2] = match[4]; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { return true; } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, outerCache, node, diff, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - // Seek `elem` from a previously-cached index - outerCache = parent[ expando ] || (parent[ expando ] = {}); - cache = outerCache[ type ] || []; - nodeIndex = cache[0] === dirruns && cache[1]; - diff = cache[0] === dirruns && cache[2]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - outerCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - // Use previously-cached element index if available - } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { - diff = cache[1]; - - // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) - } else { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { - // Cache the index of each encountered element - if ( useCache ) { - (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf.call( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifier - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), - // not comment, processing instructions, or others - // Thanks to Diego Perini for the nodeName shortcut - // Greater than "@" means alpha characters (specifically not starting with "#" or "?") - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -function tokenize( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( tokens = [] ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push({ - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - }); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push({ - value: matched, - type: type, - matches: match - }); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -} - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - checkNonElements = base && dir === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var data, cache, outerCache, - dirkey = dirruns + " " + doneName; - - // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { - if ( (data = cache[1]) === true || data === cachedruns ) { - return data === true; - } - } else { - cache = outerCache[ dir ] = [ dirkey ]; - cache[1] = matcher( elem, context, xml ) || cachedruns; - if ( cache[1] === true ) { - return true; - } - } - } - } - } - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf.call( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - // A counter to specify which element is currently being matched - var matcherCachedRuns = 0, - bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, expandContext ) { - var elem, j, matcher, - setMatched = [], - matchedCount = 0, - i = "0", - unmatched = seed && [], - outermost = expandContext != null, - contextBackup = outermostContext, - // We must always have either seed elements or context - elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1); - - if ( outermost ) { - outermostContext = context !== document && context; - cachedruns = matcherCachedRuns; - } - - // Add elements passing elementMatchers directly to results - // Keep `i` a string if there are no elements so `matchedCount` will be "00" below - for ( ; (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - while ( (matcher = elementMatchers[j++]) ) { - if ( matcher( elem, context, xml ) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - cachedruns = ++matcherCachedRuns; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // Apply set filters to unmatched elements - matchedCount += i; - if ( bySet && i !== matchedCount ) { - j = 0; - while ( (matcher = setMatchers[j++]) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !group ) { - group = tokenize( selector ); - } - i = group.length; - while ( i-- ) { - cached = matcherFromTokens( group[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - } - return cached; -}; - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function select( selector, context, results, seed ) { - var i, tokens, token, type, find, - match = tokenize( selector ); - - if ( !seed ) { - // Try to minimize operations if there is only one group - if ( match.length === 1 ) { - - // Take a shortcut and set the context if the root selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - support.getById && context.nodeType === 9 && documentIsHTML && - Expr.relative[ tokens[1].type ] ) { - - context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; - if ( !context ) { - return results; - } - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && context.parentNode || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - } - - // Compile and execute a filtering function - // Provide `match` to avoid retokenization if we modified the selector above - compile( selector, match )( - seed, - context, - !documentIsHTML, - results, - rsibling.test( selector ) - ); - return results; -} - -// One-time assignments - -// Sort stability -support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; - -// Support: Chrome<14 -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert(function( div1 ) { - // Should return 1, but returns 4 (following) - return div1.compareDocumentPosition( document.createElement("div") ) & 1; -}); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert(function( div ) { - div.innerHTML = ""; - return div.firstChild.getAttribute("href") === "#" ; -}) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - }); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert(function( div ) { - div.innerHTML = ""; - div.firstChild.setAttribute( "value", "" ); - return div.firstChild.getAttribute( "value" ) === ""; -}) ) { - addHandle( "value", function( elem, name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - }); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert(function( div ) { - return div.getAttribute("disabled") == null; -}) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return (val = elem.getAttributeNode( name )) && val.specified ? - val.value : - elem[ name ] === true ? name.toLowerCase() : null; - } - }); -} - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.pseudos; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})( window ); -// String to Object options format cache -var optionsCache = {}; - -// Convert String-formatted options into Object-formatted ones and store in cache -function createOptions( options ) { - var object = optionsCache[ options ] = {}; - jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { - object[ flag ] = true; - }); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - ( optionsCache[ options ] || createOptions( options ) ) : - jQuery.extend( {}, options ); - - var // Flag to know if list is currently firing - firing, - // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list was already fired - fired, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // First callback to fire (used internally by add and fireWith) - firingStart, - // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = !options.once && [], - // Fire callbacks - fire = function( data ) { - memory = options.memory && data; - fired = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - firing = true; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { - memory = false; // To prevent further calls using add - break; - } - } - firing = false; - if ( list ) { - if ( stack ) { - if ( stack.length ) { - fire( stack.shift() ); - } - } else if ( memory ) { - list = []; - } else { - self.disable(); - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - // First, we save the current length - var start = list.length; - (function add( args ) { - jQuery.each( args, function( _, arg ) { - var type = jQuery.type( arg ); - if ( type === "function" ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && type !== "string" ) { - // Inspect recursively - add( arg ); - } - }); - })( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away - } else if ( memory ) { - firingStart = start; - fire( memory ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - jQuery.each( arguments, function( _, arg ) { - var index; - while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - // Handle firing indexes - if ( firing ) { - if ( index <= firingLength ) { - firingLength--; - } - if ( index <= firingIndex ) { - firingIndex--; - } - } - } - }); - } - return this; - }, - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); - }, - // Remove all callbacks from the list - empty: function() { - list = []; - firingLength = 0; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( list && ( !fired || stack ) ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - if ( firing ) { - stack.push( args ); - } else { - fire( args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; -jQuery.extend({ - - Deferred: function( func ) { - var tuples = [ - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], - [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], - [ "notify", "progress", jQuery.Callbacks("memory") ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred(function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var action = tuple[ 0 ], - fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[1] ](function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .done( newDefer.resolve ) - .fail( newDefer.reject ) - .progress( newDefer.notify ); - } else { - newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); - } - }); - }); - fns = null; - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[1] ] = list.add; - - // Handle state - if ( stateString ) { - list.add(function() { - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] - deferred[ tuple[0] ] = function() { - deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); - return this; - }; - deferred[ tuple[0] + "With" ] = list.fireWith; - }); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = core_slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; - if( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ) - .progress( updateFunc( i, progressContexts, progressValues ) ); - } else { - --remaining; - } - } - } - - // if we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -}); -jQuery.support = (function( support ) { - - var all, a, input, select, fragment, opt, eventName, isSupported, i, - div = document.createElement("div"); - - // Setup - div.setAttribute( "className", "t" ); - div.innerHTML = "
a"; - - // Finish early in limited (non-browser) environments - all = div.getElementsByTagName("*") || []; - a = div.getElementsByTagName("a")[ 0 ]; - if ( !a || !a.style || !all.length ) { - return support; - } - - // First batch of tests - select = document.createElement("select"); - opt = select.appendChild( document.createElement("option") ); - input = div.getElementsByTagName("input")[ 0 ]; - - a.style.cssText = "top:1px;float:left;opacity:.5"; - - // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) - support.getSetAttribute = div.className !== "t"; - - // IE strips leading whitespace when .innerHTML is used - support.leadingWhitespace = div.firstChild.nodeType === 3; - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - support.tbody = !div.getElementsByTagName("tbody").length; - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - support.htmlSerialize = !!div.getElementsByTagName("link").length; - - // Get the style information from getAttribute - // (IE uses .cssText instead) - support.style = /top/.test( a.getAttribute("style") ); - - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - support.hrefNormalized = a.getAttribute("href") === "/a"; - - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - support.opacity = /^0.5/.test( a.style.opacity ); - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - support.cssFloat = !!a.style.cssFloat; - - // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) - support.checkOn = !!input.value; - - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - support.optSelected = opt.selected; - - // Tests for enctype support on a form (#6743) - support.enctype = !!document.createElement("form").enctype; - - // Makes sure cloning an html5 element does not cause problems - // Where outerHTML is undefined, this still works - support.html5Clone = document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>"; - - // Will be defined later - support.inlineBlockNeedsLayout = false; - support.shrinkWrapBlocks = false; - support.pixelPosition = false; - support.deleteExpando = true; - support.noCloneEvent = true; - support.reliableMarginRight = true; - support.boxSizingReliable = true; - - // Make sure checked status is properly cloned - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) - select.disabled = true; - support.optDisabled = !opt.disabled; - - // Support: IE<9 - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - - // Check if we can trust getAttribute("value") - input = document.createElement("input"); - input.setAttribute( "value", "" ); - support.input = input.getAttribute( "value" ) === ""; - - // Check if an input maintains its value after becoming a radio - input.value = "t"; - input.setAttribute( "type", "radio" ); - support.radioValue = input.value === "t"; - - // #11217 - WebKit loses check when the name is after the checked attribute - input.setAttribute( "checked", "t" ); - input.setAttribute( "name", "t" ); - - fragment = document.createDocumentFragment(); - fragment.appendChild( input ); - - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - support.appendChecked = input.checked; - - // WebKit doesn't clone checked state correctly in fragments - support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE<9 - // Opera does not clone events (and typeof div.attachEvent === undefined). - // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() - if ( div.attachEvent ) { - div.attachEvent( "onclick", function() { - support.noCloneEvent = false; - }); - - div.cloneNode( true ).click(); - } - - // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event) - // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) - for ( i in { submit: true, change: true, focusin: true }) { - div.setAttribute( eventName = "on" + i, "t" ); - - support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false; - } - - div.style.backgroundClip = "content-box"; - div.cloneNode( true ).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - - // Support: IE<9 - // Iteration over object's inherited properties before its own. - for ( i in jQuery( support ) ) { - break; - } - support.ownLast = i !== "0"; - - // Run tests that need a body at doc ready - jQuery(function() { - var container, marginDiv, tds, - divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", - body = document.getElementsByTagName("body")[0]; - - if ( !body ) { - // Return for frameset docs that don't have a body - return; - } - - container = document.createElement("div"); - container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; - - body.appendChild( container ).appendChild( div ); - - // Support: IE8 - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - div.innerHTML = "
t
"; - tds = div.getElementsByTagName("td"); - tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; - isSupported = ( tds[ 0 ].offsetHeight === 0 ); - - tds[ 0 ].style.display = ""; - tds[ 1 ].style.display = "none"; - - // Support: IE8 - // Check if empty table cells still have offsetWidth/Height - support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); - - // Check box-sizing and margin behavior. - div.innerHTML = ""; - div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; - - // Workaround failing boxSizing test due to offsetWidth returning wrong value - // with some non-1 values of body zoom, ticket #13543 - jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() { - support.boxSizing = div.offsetWidth === 4; - }); - - // Use window.getComputedStyle because jsdom on node.js will break without it. - if ( window.getComputedStyle ) { - support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; - support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; - - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. (#3333) - // Fails in WebKit before Feb 2011 nightlies - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - marginDiv = div.appendChild( document.createElement("div") ); - marginDiv.style.cssText = div.style.cssText = divReset; - marginDiv.style.marginRight = marginDiv.style.width = "0"; - div.style.width = "1px"; - - support.reliableMarginRight = - !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); - } - - if ( typeof div.style.zoom !== core_strundefined ) { - // Support: IE<8 - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - div.innerHTML = ""; - div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; - support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); - - // Support: IE6 - // Check if elements with layout shrink-wrap their children - div.style.display = "block"; - div.innerHTML = "
"; - div.firstChild.style.width = "5px"; - support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); - - if ( support.inlineBlockNeedsLayout ) { - // Prevent IE 6 from affecting layout for positioned elements #11048 - // Prevent IE from shrinking the body in IE 7 mode #12869 - // Support: IE<8 - body.style.zoom = 1; - } - } - - body.removeChild( container ); - - // Null elements to avoid leaks in IE - container = div = tds = marginDiv = null; - }); - - // Null elements to avoid leaks in IE - all = select = fragment = opt = a = input = null; - - return support; -})({}); - -var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, - rmultiDash = /([A-Z])/g; - -function internalData( elem, name, data, pvt /* Internal Use Only */ ){ - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var ret, thisCache, - internalKey = jQuery.expando, - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; - - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) { - return; - } - - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - id = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++; - } else { - id = internalKey; - } - } - - if ( !cache[ id ] ) { - // Avoid exposing jQuery metadata on plain JS objects when the object - // is serialized using JSON.stringify - cache[ id ] = isNode ? {} : { toJSON: jQuery.noop }; - } - - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ] = jQuery.extend( cache[ id ], name ); - } else { - cache[ id ].data = jQuery.extend( cache[ id ].data, name ); - } - } - - thisCache = cache[ id ]; - - // jQuery data() is stored in a separate object inside the object's internal data - // cache in order to avoid key collisions between internal data and user-defined - // data. - if ( !pvt ) { - if ( !thisCache.data ) { - thisCache.data = {}; - } - - thisCache = thisCache.data; - } - - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } - - // Check for both converted-to-camel and non-converted data property names - // If a data property was specified - if ( typeof name === "string" ) { - - // First Try to find as-is property data - ret = thisCache[ name ]; - - // Test for null|undefined property data - if ( ret == null ) { - - // Try to find the camelCased property - ret = thisCache[ jQuery.camelCase( name ) ]; - } - } else { - ret = thisCache; - } - - return ret; -} - -function internalRemoveData( elem, name, pvt ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, i, - isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - id = isNode ? elem[ jQuery.expando ] : jQuery.expando; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - - thisCache = pvt ? cache[ id ] : cache[ id ].data; - - if ( thisCache ) { - - // Support array or space separated string names for data keys - if ( !jQuery.isArray( name ) ) { - - // try the string as a key before any manipulation - if ( name in thisCache ) { - name = [ name ]; - } else { - - // split the camel cased version by spaces unless a key with the spaces exists - name = jQuery.camelCase( name ); - if ( name in thisCache ) { - name = [ name ]; - } else { - name = name.split(" "); - } - } - } else { - // If "name" is an array of keys... - // When data is initially created, via ("key", "val") signature, - // keys will be converted to camelCase. - // Since there is no way to tell _how_ a key was added, remove - // both plain key and camelCase key. #12786 - // This will only penalize the array argument path. - name = name.concat( jQuery.map( name, jQuery.camelCase ) ); - } - - i = name.length; - while ( i-- ) { - delete thisCache[ name[i] ]; - } - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) { - return; - } - } - } - - // See jQuery.data for more information - if ( !pvt ) { - delete cache[ id ].data; - - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject( cache[ id ] ) ) { - return; - } - } - - // Destroy the cache - if ( isNode ) { - jQuery.cleanData( [ elem ], true ); - - // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) - /* jshint eqeqeq: false */ - } else if ( jQuery.support.deleteExpando || cache != cache.window ) { - /* jshint eqeqeq: true */ - delete cache[ id ]; - - // When all else fails, null - } else { - cache[ id ] = null; - } -} - -jQuery.extend({ - cache: {}, - - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "applet": true, - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" - }, - - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - return !!elem && !isEmptyDataObject( elem ); - }, - - data: function( elem, name, data ) { - return internalData( elem, name, data ); - }, - - removeData: function( elem, name ) { - return internalRemoveData( elem, name ); - }, - - // For internal use only. - _data: function( elem, name, data ) { - return internalData( elem, name, data, true ); - }, - - _removeData: function( elem, name ) { - return internalRemoveData( elem, name, true ); - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - // Do not set data on non-element because it will not be cleared (#8335). - if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) { - return false; - } - - var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; - - // nodes accept data unless otherwise specified; rejection can be conditional - return !noData || noData !== true && elem.getAttribute("classid") === noData; - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var attrs, name, - data = null, - i = 0, - elem = this[0]; - - // Special expections of .data basically thwart jQuery.access, - // so implement the relevant behavior ourselves - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = jQuery.data( elem ); - - if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { - attrs = elem.attributes; - for ( ; i < attrs.length; i++ ) { - name = attrs[i].name; - - if ( name.indexOf("data-") === 0 ) { - name = jQuery.camelCase( name.slice(5) ); - - dataAttr( elem, name, data[ name ] ); - } - } - jQuery._data( elem, "parsedAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - return arguments.length > 1 ? - - // Sets one value - this.each(function() { - jQuery.data( this, key, value ); - }) : - - // Gets one value - // Try to fetch any internally stored data first - elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null; - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - - var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - -// checks a cache object for emptiness -function isEmptyDataObject( obj ) { - var name; - for ( name in obj ) { - - // if the public data object is empty, the private is still empty - if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { - continue; - } - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} -jQuery.extend({ - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = jQuery._data( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray(data) ) { - queue = jQuery._data( elem, type, jQuery.makeArray(data) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // not intended for public consumption - generates a queueHooks object, or returns the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return jQuery._data( elem, key ) || jQuery._data( elem, key, { - empty: jQuery.Callbacks("once memory").add(function() { - jQuery._removeData( elem, type + "queue" ); - jQuery._removeData( elem, key ); - }) - }); - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[0], type ); - } - - return data === undefined ? - this : - this.each(function() { - var queue = jQuery.queue( this, type, data ); - - // ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = setTimeout( next, time ); - hooks.stop = function() { - clearTimeout( timeout ); - }; - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while( i-- ) { - tmp = jQuery._data( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -}); -var nodeHook, boolHook, - rclass = /[\t\r\n\f]/g, - rreturn = /\r/g, - rfocusable = /^(?:input|select|textarea|button|object)$/i, - rclickable = /^(?:a|area)$/i, - ruseDefault = /^(?:checked|selected)$/i, - getSetAttribute = jQuery.support.getSetAttribute, - getSetInput = jQuery.support.input; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each(function() { - jQuery.removeAttr( this, name ); - }); - }, - - prop: function( name, value ) { - return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - name = jQuery.propFix[ name ] || name; - return this.each(function() { - // try/catch handles cases where IE balks (such as removing a property on window) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} - }); - }, - - addClass: function( value ) { - var classes, elem, cur, clazz, j, - i = 0, - len = this.length, - proceed = typeof value === "string" && value; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).addClass( value.call( this, j, this.className ) ); - }); - } - - if ( proceed ) { - // The disjunction here is for better compressibility (see removeClass) - classes = ( value || "" ).match( core_rnotwhite ) || []; - - for ( ; i < len; i++ ) { - elem = this[ i ]; - cur = elem.nodeType === 1 && ( elem.className ? - ( " " + elem.className + " " ).replace( rclass, " " ) : - " " - ); - - if ( cur ) { - j = 0; - while ( (clazz = classes[j++]) ) { - if ( cur.indexOf( " " + clazz + " " ) < 0 ) { - cur += clazz + " "; - } - } - elem.className = jQuery.trim( cur ); - - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classes, elem, cur, clazz, j, - i = 0, - len = this.length, - proceed = arguments.length === 0 || typeof value === "string" && value; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).removeClass( value.call( this, j, this.className ) ); - }); - } - if ( proceed ) { - classes = ( value || "" ).match( core_rnotwhite ) || []; - - for ( ; i < len; i++ ) { - elem = this[ i ]; - // This expression is here for better compressibility (see addClass) - cur = elem.nodeType === 1 && ( elem.className ? - ( " " + elem.className + " " ).replace( rclass, " " ) : - "" - ); - - if ( cur ) { - j = 0; - while ( (clazz = classes[j++]) ) { - // Remove *all* instances - while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { - cur = cur.replace( " " + clazz + " ", " " ); - } - } - elem.className = value ? jQuery.trim( cur ) : ""; - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value; - - if ( typeof stateVal === "boolean" && type === "string" ) { - return stateVal ? this.addClass( value ) : this.removeClass( value ); - } - - if ( jQuery.isFunction( value ) ) { - return this.each(function( i ) { - jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); - }); - } - - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - classNames = value.match( core_rnotwhite ) || []; - - while ( (className = classNames[ i++ ]) ) { - // check each className given, space separated list - if ( self.hasClass( className ) ) { - self.removeClass( className ); - } else { - self.addClass( className ); - } - } - - // Toggle whole class name - } else if ( type === core_strundefined || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery._data( this, "__className__", this.className ); - } - - // If the element has a class name or if we're passed "false", - // then remove the whole classname (if there was one, the above saved it). - // Otherwise bring back whatever was previously saved (if anything), - // falling back to the empty string if nothing was stored. - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; - } - }); - }, - - hasClass: function( selector ) { - var className = " " + selector + " ", - i = 0, - l = this.length; - for ( ; i < l; i++ ) { - if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { - return true; - } - } - - return false; - }, - - val: function( value ) { - var ret, hooks, isFunction, - elem = this[0]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { - return ret; - } - - ret = elem.value; - - return typeof ret === "string" ? - // handle most common string cases - ret.replace(rreturn, "") : - // handle cases where value is null/undef or number - ret == null ? "" : ret; - } - - return; - } - - isFunction = jQuery.isFunction( value ); - - return this.each(function( i ) { - var val; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, jQuery( this ).val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray( val ) ) { - val = jQuery.map(val, function ( value ) { - return value == null ? "" : value + ""; - }); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - valHooks: { - option: { - get: function( elem ) { - // Use proper attribute retrieval(#6932, #12072) - var val = jQuery.find.attr( elem, "value" ); - return val != null ? - val : - elem.text; - } - }, - select: { - get: function( elem ) { - var value, option, - options = elem.options, - index = elem.selectedIndex, - one = elem.type === "select-one" || index < 0, - values = one ? null : [], - max = one ? index + 1 : options.length, - i = index < 0 ? - max : - one ? index : 0; - - // Loop through all the selected options - for ( ; i < max; i++ ) { - option = options[ i ]; - - // oldIE doesn't update selected after form reset (#2551) - if ( ( option.selected || i === index ) && - // Don't return options that are disabled or in a disabled optgroup - ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && - ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - }, - - set: function( elem, value ) { - var optionSet, option, - options = elem.options, - values = jQuery.makeArray( value ), - i = options.length; - - while ( i-- ) { - option = options[ i ]; - if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) { - optionSet = true; - } - } - - // force browsers to behave consistently when non-matching value is set - if ( !optionSet ) { - elem.selectedIndex = -1; - } - return values; - } - } - }, - - attr: function( elem, name, value ) { - var hooks, ret, - nType = elem.nodeType; - - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === core_strundefined ) { - return jQuery.prop( elem, name, value ); - } - - // All attributes are lowercase - // Grab necessary hook if one is defined - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - name = name.toLowerCase(); - hooks = jQuery.attrHooks[ name ] || - ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook ); - } - - if ( value !== undefined ) { - - if ( value === null ) { - jQuery.removeAttr( elem, name ); - - } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - elem.setAttribute( name, value + "" ); - return value; - } - - } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - ret = jQuery.find.attr( elem, name ); - - // Non-existent attributes return null, we normalize to undefined - return ret == null ? - undefined : - ret; - } - }, - - removeAttr: function( elem, value ) { - var name, propName, - i = 0, - attrNames = value && value.match( core_rnotwhite ); - - if ( attrNames && elem.nodeType === 1 ) { - while ( (name = attrNames[i++]) ) { - propName = jQuery.propFix[ name ] || name; - - // Boolean attributes get special treatment (#10870) - if ( jQuery.expr.match.bool.test( name ) ) { - // Set corresponding property to false - if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { - elem[ propName ] = false; - // Support: IE<9 - // Also clear defaultChecked/defaultSelected (if appropriate) - } else { - elem[ jQuery.camelCase( "default-" + name ) ] = - elem[ propName ] = false; - } - - // See #9699 for explanation of this approach (setting first, then removal) - } else { - jQuery.attr( elem, name, "" ); - } - - elem.removeAttribute( getSetAttribute ? name : propName ); - } - } - }, - - attrHooks: { - type: { - set: function( elem, value ) { - if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to default in case type is set after value during creation - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - } - }, - - propFix: { - "for": "htmlFor", - "class": "className" - }, - - prop: function( elem, name, value ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set properties on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - if ( notxml ) { - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ? - ret : - ( elem[ name ] = value ); - - } else { - return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ? - ret : - elem[ name ]; - } - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - // Use proper attribute retrieval(#12072) - var tabindex = jQuery.find.attr( elem, "tabindex" ); - - return tabindex ? - parseInt( tabindex, 10 ) : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - -1; - } - } - } -}); - -// Hooks for boolean attributes -boolHook = { - set: function( elem, value, name ) { - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { - // IE<8 needs the *property* name - elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); - - // Use defaultChecked and defaultSelected for oldIE - } else { - elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; - } - - return name; - } -}; -jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { - var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr; - - jQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ? - function( elem, name, isXML ) { - var fn = jQuery.expr.attrHandle[ name ], - ret = isXML ? - undefined : - /* jshint eqeqeq: false */ - (jQuery.expr.attrHandle[ name ] = undefined) != - getter( elem, name, isXML ) ? - - name.toLowerCase() : - null; - jQuery.expr.attrHandle[ name ] = fn; - return ret; - } : - function( elem, name, isXML ) { - return isXML ? - undefined : - elem[ jQuery.camelCase( "default-" + name ) ] ? - name.toLowerCase() : - null; - }; -}); - -// fix oldIE attroperties -if ( !getSetInput || !getSetAttribute ) { - jQuery.attrHooks.value = { - set: function( elem, value, name ) { - if ( jQuery.nodeName( elem, "input" ) ) { - // Does not return so that setAttribute is also used - elem.defaultValue = value; - } else { - // Use nodeHook if defined (#1954); otherwise setAttribute is fine - return nodeHook && nodeHook.set( elem, value, name ); - } - } - }; -} - -// IE6/7 do not support getting/setting some attributes with get/setAttribute -if ( !getSetAttribute ) { - - // Use this for any attribute in IE6/7 - // This fixes almost every IE6/7 issue - nodeHook = { - set: function( elem, value, name ) { - // Set the existing or create a new attribute node - var ret = elem.getAttributeNode( name ); - if ( !ret ) { - elem.setAttributeNode( - (ret = elem.ownerDocument.createAttribute( name )) - ); - } - - ret.value = value += ""; - - // Break association with cloned elements by also using setAttribute (#9646) - return name === "value" || value === elem.getAttribute( name ) ? - value : - undefined; - } - }; - jQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords = - // Some attributes are constructed with empty-string values when not defined - function( elem, name, isXML ) { - var ret; - return isXML ? - undefined : - (ret = elem.getAttributeNode( name )) && ret.value !== "" ? - ret.value : - null; - }; - jQuery.valHooks.button = { - get: function( elem, name ) { - var ret = elem.getAttributeNode( name ); - return ret && ret.specified ? - ret.value : - undefined; - }, - set: nodeHook.set - }; - - // Set contenteditable to false on removals(#10429) - // Setting to empty string throws an error as an invalid value - jQuery.attrHooks.contenteditable = { - set: function( elem, value, name ) { - nodeHook.set( elem, value === "" ? false : value, name ); - } - }; - - // Set width and height to auto instead of 0 on empty string( Bug #8150 ) - // This is for removals - jQuery.each([ "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = { - set: function( elem, value ) { - if ( value === "" ) { - elem.setAttribute( name, "auto" ); - return value; - } - } - }; - }); -} - - -// Some attributes require a special call on IE -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !jQuery.support.hrefNormalized ) { - // href/src property should get the full normalized URL (#10299/#12915) - jQuery.each([ "href", "src" ], function( i, name ) { - jQuery.propHooks[ name ] = { - get: function( elem ) { - return elem.getAttribute( name, 4 ); - } - }; - }); -} - -if ( !jQuery.support.style ) { - jQuery.attrHooks.style = { - get: function( elem ) { - // Return undefined in the case of empty string - // Note: IE uppercases css property names, but if we were to .toLowerCase() - // .cssText, that would destroy case senstitivity in URL's, like in "background" - return elem.style.cssText || undefined; - }, - set: function( elem, value ) { - return ( elem.style.cssText = value + "" ); - } - }; -} - -// Safari mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it -if ( !jQuery.support.optSelected ) { - jQuery.propHooks.selected = { - get: function( elem ) { - var parent = elem.parentNode; - - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - return null; - } - }; -} - -jQuery.each([ - "tabIndex", - "readOnly", - "maxLength", - "cellSpacing", - "cellPadding", - "rowSpan", - "colSpan", - "useMap", - "frameBorder", - "contentEditable" -], function() { - jQuery.propFix[ this.toLowerCase() ] = this; -}); - -// IE6/7 call enctype encoding -if ( !jQuery.support.enctype ) { - jQuery.propFix.enctype = "encoding"; -} - -// Radios and checkboxes getter/setter -jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); - } - } - }; - if ( !jQuery.support.checkOn ) { - jQuery.valHooks[ this ].get = function( elem ) { - // Support: Webkit - // "" is returned instead of "on" if a value isn't specified - return elem.getAttribute("value") === null ? "on" : elem.value; - }; - } -}); -var rformElems = /^(?:input|select|textarea)$/i, - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - var tmp, events, t, handleObjIn, - special, eventHandle, handleObj, - handlers, type, namespaces, origType, - elemData = jQuery._data( elem ); - - // Don't attach events to noData or text/comment nodes (but allow plain objects) - if ( !elemData ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !(events = elemData.events) ) { - events = elemData.events = {}; - } - if ( !(eventHandle = elemData.handle) ) { - eventHandle = elemData.handle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : - undefined; - }; - // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events - eventHandle.elem = elem; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( core_rnotwhite ) || [""]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !(handlers = events[ type ]) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener/attachEvent if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - var j, handleObj, tmp, - origCount, t, events, - special, handlers, type, - namespaces, origType, - elemData = jQuery.hasData( elem ) && jQuery._data( elem ); - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( core_rnotwhite ) || [""]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - delete elemData.handle; - - // removeData also checks for emptiness and clears the expando if empty - // so use it instead of delete - jQuery._removeData( elem, "events" ); - } - }, - - trigger: function( event, data, elem, onlyHandlers ) { - var handle, ontype, cur, - bubbleType, special, tmp, i, - eventPath = [ elem || document ], - type = core_hasOwn.call( event, "type" ) ? event.type : event, - namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; - - cur = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf(".") >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf(":") < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) - event.isTrigger = onlyHandlers ? 2 : 3; - event.namespace = namespaces.join("."); - event.namespace_re = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === (elem.ownerDocument || document) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { - - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { - event.preventDefault(); - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && - jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction() check here because IE6/7 fails that test. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - try { - elem[ type ](); - } catch ( e ) { - // IE<9 dies on focus/blur to hidden element (#1486,#12518) - // only reproducible on winXP IE8 native, not IE9 in IE8 mode - } - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event ); - - var i, ret, handleObj, matched, j, - handlerQueue = [], - args = core_slice.call( arguments ), - handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { - - // Triggered event must either 1) have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). - if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( (event.result = ret) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var sel, handleObj, matches, i, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - // Black-hole SVG instance trees (#13180) - // Avoid non-left-click bubbling in Firefox (#3861) - if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { - - /* jshint eqeqeq: false */ - for ( ; cur != this; cur = cur.parentNode || this ) { - /* jshint eqeqeq: true */ - - // Don't check non-elements (#13208) - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { - matches = []; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matches[ sel ] === undefined ) { - matches[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) >= 0 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matches[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, handlers: matches }); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( delegateCount < handlers.length ) { - handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); - } - - return handlerQueue; - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, copy, - type = event.type, - originalEvent = event, - fixHook = this.fixHooks[ type ]; - - if ( !fixHook ) { - this.fixHooks[ type ] = fixHook = - rmouseEvent.test( type ) ? this.mouseHooks : - rkeyEvent.test( type ) ? this.keyHooks : - {}; - } - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = new jQuery.Event( originalEvent ); - - i = copy.length; - while ( i-- ) { - prop = copy[ i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Support: IE<9 - // Fix target property (#1925) - if ( !event.target ) { - event.target = originalEvent.srcElement || document; - } - - // Support: Chrome 23+, Safari? - // Target should not be a text node (#504, #13143) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // Support: IE<9 - // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) - event.metaKey = !!event.metaKey; - - return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var body, eventDoc, doc, - button = original.button, - fromElement = original.fromElement; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && fromElement ) { - event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - special: { - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - focus: { - // Fire native event if possible so blur/focus sequence is correct - trigger: function() { - if ( this !== safeActiveElement() && this.focus ) { - try { - this.focus(); - return false; - } catch ( e ) { - // Support: IE<9 - // If we error on focus to hidden element (#1486, #12518), - // let .trigger() run the handlers - } - } - }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if ( this === safeActiveElement() && this.blur ) { - this.blur(); - return false; - } - }, - delegateType: "focusout" - }, - click: { - // For checkbox, fire native event so checked state will be right - trigger: function() { - if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { - this.click(); - return false; - } - }, - - // For cross-browser consistency, don't fire native .click() on links - _default: function( event ) { - return jQuery.nodeName( event.target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Even when returnValue equals to undefined Firefox will still show alert - if ( event.result !== undefined ) { - event.originalEvent.returnValue = event.result; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { - type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - var name = "on" + type; - - if ( elem.detachEvent ) { - - // #8545, #7054, preventing memory leaks for custom events in IE6-8 - // detachEvent needed property on element, by name of that event, to properly expose it to GC - if ( typeof elem[ name ] === core_strundefined ) { - elem[ name ] = null; - } - - elem.detachEvent( name, handle ); - } - }; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || - src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - if ( !e ) { - return; - } - - // If preventDefault exists, run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // Support: IE - // Otherwise set the returnValue property of the original event to false - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - if ( !e ) { - return; - } - // If stopPropagation exists, run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - - // Support: IE - // Set the cancelBubble property of the original event to true - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - } -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// IE submit delegation -if ( !jQuery.support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Lazy-add a submit handler when a descendant form may potentially be submitted - jQuery.event.add( this, "click._submit keypress._submit", function( e ) { - // Node name check avoids a VML-related crash in IE (#9807) - var elem = e.target, - form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; - if ( form && !jQuery._data( form, "submitBubbles" ) ) { - jQuery.event.add( form, "submit._submit", function( event ) { - event._submit_bubble = true; - }); - jQuery._data( form, "submitBubbles", true ); - } - }); - // return undefined since we don't need an event listener - }, - - postDispatch: function( event ) { - // If form was submitted by the user, bubble the event up the tree - if ( event._submit_bubble ) { - delete event._submit_bubble; - if ( this.parentNode && !event.isTrigger ) { - jQuery.event.simulate( "submit", this.parentNode, event, true ); - } - } - }, - - teardown: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Remove delegated handlers; cleanData eventually reaps submit handlers attached above - jQuery.event.remove( this, "._submit" ); - } - }; -} - -// IE change delegation and checkbox/radio fix -if ( !jQuery.support.changeBubbles ) { - - jQuery.event.special.change = { - - setup: function() { - - if ( rformElems.test( this.nodeName ) ) { - // IE doesn't fire change on a check/radio until blur; trigger it on click - // after a propertychange. Eat the blur-change in special.change.handle. - // This still fires onchange a second time for check/radio after blur. - if ( this.type === "checkbox" || this.type === "radio" ) { - jQuery.event.add( this, "propertychange._change", function( event ) { - if ( event.originalEvent.propertyName === "checked" ) { - this._just_changed = true; - } - }); - jQuery.event.add( this, "click._change", function( event ) { - if ( this._just_changed && !event.isTrigger ) { - this._just_changed = false; - } - // Allow triggered, simulated change events (#11500) - jQuery.event.simulate( "change", this, event, true ); - }); - } - return false; - } - // Delegated event; lazy-add a change handler on descendant inputs - jQuery.event.add( this, "beforeactivate._change", function( e ) { - var elem = e.target; - - if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { - jQuery.event.add( elem, "change._change", function( event ) { - if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { - jQuery.event.simulate( "change", this.parentNode, event, true ); - } - }); - jQuery._data( elem, "changeBubbles", true ); - } - }); - }, - - handle: function( event ) { - var elem = event.target; - - // Swallow native change events from checkbox/radio, we already triggered them above - if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { - return event.handleObj.handler.apply( this, arguments ); - } - }, - - teardown: function() { - jQuery.event.remove( this, "._change" ); - - return !rformElems.test( this.nodeName ); - } - }; -} - -// Create "bubbling" focus and blur events -if ( !jQuery.support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler while someone wants focusin/focusout - var attaches = 0, - handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - if ( attaches++ === 0 ) { - document.addEventListener( orig, handler, true ); - } - }, - teardown: function() { - if ( --attaches === 0 ) { - document.removeEventListener( orig, handler, true ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var type, origFn; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on( types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - var elem = this[0]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - } -}); -var isSimple = /^.[^:#\[\.,]*$/, - rparentsprev = /^(?:parents|prev(?:Until|All))/, - rneedsContext = jQuery.expr.match.needsContext, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend({ - find: function( selector ) { - var i, - ret = [], - self = this, - len = self.length; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }) ); - } - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - // Needed because $( selector, context ) becomes $( context ).find( selector ) - ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); - ret.selector = this.selector ? this.selector + " " + selector : selector; - return ret; - }, - - has: function( target ) { - var i, - targets = jQuery( target, this ), - len = targets.length; - - return this.filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector || [], true) ); - }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector || [], false) ); - }, - - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - ret = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { - // Always skip document fragments - if ( cur.nodeType < 11 && (pos ? - pos.index(cur) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector(cur, selectors)) ) { - - cur = ret.push( cur ); - break; - } - } - } - - return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return jQuery.inArray( this[0], jQuery( elem ) ); - } - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context ) : - jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), - all = jQuery.merge( this.get(), set ); - - return this.pushStack( jQuery.unique(all) ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter(selector) - ); - } -}); - -function sibling( cur, dir ) { - do { - cur = cur[ dir ]; - } while ( cur && cur.nodeType !== 1 ); - - return cur; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - if ( this.length > 1 ) { - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - ret = jQuery.unique( ret ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - } - - return this.pushStack( ret ); - }; -}); - -jQuery.extend({ - filter: function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 && elem.nodeType === 1 ? - jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : - jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - })); - }, - - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - /* jshint -W018 */ - return !!qualifier.call( elem, i, elem ) !== not; - }); - - } - - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - }); - - } - - if ( typeof qualifier === "string" ) { - if ( isSimple.test( qualifier ) ) { - return jQuery.filter( qualifier, elements, not ); - } - - qualifier = jQuery.filter( qualifier, elements ); - } - - return jQuery.grep( elements, function( elem ) { - return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not; - }); -} -function createSafeFragment( document ) { - var list = nodeNames.split( "|" ), - safeFrag = document.createDocumentFragment(); - - if ( safeFrag.createElement ) { - while ( list.length ) { - safeFrag.createElement( - list.pop() - ); - } - } - return safeFrag; -} - -var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + - "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", - rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, - rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - rtagName = /<([\w:]+)/, - rtbody = /\s*$/g, - - // We have to close these tags to support XHTML (#13200) - wrapMap = { - option: [ 1, "" ], - legend: [ 1, "
", "
" ], - area: [ 1, "", "" ], - param: [ 1, "", "" ], - thead: [ 1, "", "
" ], - tr: [ 2, "", "
" ], - col: [ 2, "", "
" ], - td: [ 3, "", "
" ], - - // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, - // unless wrapped in a div with non-breaking characters in front of it. - _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X
", "
" ] - }, - safeFragment = createSafeFragment( document ), - fragmentDiv = safeFragment.appendChild( document.createElement("div") ); - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -jQuery.fn.extend({ - text: function( value ) { - return jQuery.access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); - }, null, value, arguments.length ); - }, - - append: function() { - return this.domManip( arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - }); - }, - - prepend: function() { - return this.domManip( arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - }); - }, - - before: function() { - return this.domManip( arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - }); - }, - - after: function() { - return this.domManip( arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - }); - }, - - // keepData is for internal use only--do not document - remove: function( selector, keepData ) { - var elem, - elems = selector ? jQuery.filter( selector, this ) : this, - i = 0; - - for ( ; (elem = elems[i]) != null; i++ ) { - - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem ) ); - } - - if ( elem.parentNode ) { - if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { - setGlobalEval( getAll( elem, "script" ) ); - } - elem.parentNode.removeChild( elem ); - } - } - - return this; - }, - - empty: function() { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - } - - // Remove any remaining nodes - while ( elem.firstChild ) { - elem.removeChild( elem.firstChild ); - } - - // If this is a select, ensure that it displays empty (#12336) - // Support: IE<9 - if ( elem.options && jQuery.nodeName( elem, "select" ) ) { - elem.options.length = 0; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function () { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); - }, - - html: function( value ) { - return jQuery.access( this, function( value ) { - var elem = this[0] || {}, - i = 0, - l = this.length; - - if ( value === undefined ) { - return elem.nodeType === 1 ? - elem.innerHTML.replace( rinlinejQuery, "" ) : - undefined; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && - ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && - !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { - - value = value.replace( rxhtmlTag, "<$1>" ); - - try { - for (; i < l; i++ ) { - // Remove element nodes and prevent memory leaks - elem = this[i] || {}; - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch(e) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var - // Snapshot the DOM in case .domManip sweeps something relevant into its fragment - args = jQuery.map( this, function( elem ) { - return [ elem.nextSibling, elem.parentNode ]; - }), - i = 0; - - // Make the changes, replacing each context element with the new content - this.domManip( arguments, function( elem ) { - var next = args[ i++ ], - parent = args[ i++ ]; - - if ( parent ) { - // Don't use the snapshot next if it has moved (#13810) - if ( next && next.parentNode !== parent ) { - next = this.nextSibling; - } - jQuery( this ).remove(); - parent.insertBefore( elem, next ); - } - // Allow new content to include elements from the context set - }, true ); - - // Force removal if there was no new content (e.g., from empty arguments) - return i ? this : this.remove(); - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, callback, allowIntersection ) { - - // Flatten any nested arrays - args = core_concat.apply( [], args ); - - var first, node, hasScripts, - scripts, doc, fragment, - i = 0, - l = this.length, - set = this, - iNoClone = l - 1, - value = args[0], - isFunction = jQuery.isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) { - return this.each(function( index ) { - var self = set.eq( index ); - if ( isFunction ) { - args[0] = value.call( this, index, self.html() ); - } - self.domManip( args, callback, allowIntersection ); - }); - } - - if ( l ) { - fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - if ( first ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( this[i], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { - - if ( node.src ) { - // Hope ajax is available... - jQuery._evalUrl( node.src ); - } else { - jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); - } - } - } - } - - // Fix #11809: Avoid leaking memory - fragment = first = null; - } - } - - return this; - } -}); - -// Support: IE<8 -// Manipulating tables requires a tbody -function manipulationTarget( elem, content ) { - return jQuery.nodeName( elem, "table" ) && - jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ? - - elem.getElementsByTagName("tbody")[0] || - elem.appendChild( elem.ownerDocument.createElement("tbody") ) : - elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - var match = rscriptTypeMasked.exec( elem.type ); - if ( match ) { - elem.type = match[1]; - } else { - elem.removeAttribute("type"); - } - return elem; -} - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var elem, - i = 0; - for ( ; (elem = elems[i]) != null; i++ ) { - jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); - } -} - -function cloneCopyEvent( src, dest ) { - - if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { - return; - } - - var type, i, l, - oldData = jQuery._data( src ), - curData = jQuery._data( dest, oldData ), - events = oldData.events; - - if ( events ) { - delete curData.handle; - curData.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - - // make the cloned public data object a copy from the original - if ( curData.data ) { - curData.data = jQuery.extend( {}, curData.data ); - } -} - -function fixCloneNodeIssues( src, dest ) { - var nodeName, e, data; - - // We do not need to do anything for non-Elements - if ( dest.nodeType !== 1 ) { - return; - } - - nodeName = dest.nodeName.toLowerCase(); - - // IE6-8 copies events bound via attachEvent when using cloneNode. - if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) { - data = jQuery._data( dest ); - - for ( e in data.events ) { - jQuery.removeEvent( dest, e, data.handle ); - } - - // Event data gets referenced instead of copied if the expando gets copied too - dest.removeAttribute( jQuery.expando ); - } - - // IE blanks contents when cloning scripts, and tries to evaluate newly-set text - if ( nodeName === "script" && dest.text !== src.text ) { - disableScript( dest ).text = src.text; - restoreScript( dest ); - - // IE6-10 improperly clones children of object elements using classid. - // IE10 throws NoModificationAllowedError if parent is null, #12132. - } else if ( nodeName === "object" ) { - if ( dest.parentNode ) { - dest.outerHTML = src.outerHTML; - } - - // This path appears unavoidable for IE9. When cloning an object - // element in IE9, the outerHTML strategy above is not sufficient. - // If the src has innerHTML and the destination does not, - // copy the src.innerHTML into the dest.innerHTML. #10324 - if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { - dest.innerHTML = src.innerHTML; - } - - } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) { - // IE6-8 fails to persist the checked state of a cloned checkbox - // or radio button. Worse, IE6-7 fail to give the cloned element - // a checked appearance if the defaultChecked value isn't also set - - dest.defaultChecked = dest.checked = src.checked; - - // IE6-7 get confused and end up setting the value of a cloned - // checkbox/radio button to an empty string instead of "on" - if ( dest.value !== src.value ) { - dest.value = src.value; - } - - // IE6-8 fails to return the selected option to the default selected - // state when cloning options - } else if ( nodeName === "option" ) { - dest.defaultSelected = dest.selected = src.defaultSelected; - - // IE6-8 fails to set the defaultValue to the correct value when - // cloning other types of input fields - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - i = 0, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone(true); - jQuery( insert[i] )[ original ]( elems ); - - // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() - core_push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -}); - -function getAll( context, tag ) { - var elems, elem, - i = 0, - found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) : - typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) : - undefined; - - if ( !found ) { - for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { - if ( !tag || jQuery.nodeName( elem, tag ) ) { - found.push( elem ); - } else { - jQuery.merge( found, getAll( elem, tag ) ); - } - } - } - - return tag === undefined || tag && jQuery.nodeName( context, tag ) ? - jQuery.merge( [ context ], found ) : - found; -} - -// Used in buildFragment, fixes the defaultChecked property -function fixDefaultChecked( elem ) { - if ( manipulation_rcheckableType.test( elem.type ) ) { - elem.defaultChecked = elem.checked; - } -} - -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var destElements, node, clone, i, srcElements, - inPage = jQuery.contains( elem.ownerDocument, elem ); - - if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { - clone = elem.cloneNode( true ); - - // IE<=8 does not properly clone detached, unknown element nodes - } else { - fragmentDiv.innerHTML = elem.outerHTML; - fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); - } - - if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && - (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { - - // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - // Fix all IE cloning issues - for ( i = 0; (node = srcElements[i]) != null; ++i ) { - // Ensure that the destination node is not null; Fixes #9587 - if ( destElements[i] ) { - fixCloneNodeIssues( node, destElements[i] ); - } - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0; (node = srcElements[i]) != null; i++ ) { - cloneCopyEvent( node, destElements[i] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - destElements = srcElements = node = null; - - // Return the cloned set - return clone; - }, - - buildFragment: function( elems, context, scripts, selection ) { - var j, elem, contains, - tmp, tag, tbody, wrap, - l = elems.length, - - // Ensure a safe fragment - safe = createSafeFragment( context ), - - nodes = [], - i = 0; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || safe.appendChild( context.createElement("div") ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - - tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[2]; - - // Descend through wrappers to the right content - j = wrap[0]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Manually add leading whitespace removed by IE - if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { - nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); - } - - // Remove IE's autoinserted from table fragments - if ( !jQuery.support.tbody ) { - - // String was a , *may* have spurious - elem = tag === "table" && !rtbody.test( elem ) ? - tmp.firstChild : - - // String was a bare or - wrap[1] === "
" && !rtbody.test( elem ) ? - tmp : - 0; - - j = elem && elem.childNodes.length; - while ( j-- ) { - if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { - elem.removeChild( tbody ); - } - } - } - - jQuery.merge( nodes, tmp.childNodes ); - - // Fix #12392 for WebKit and IE > 9 - tmp.textContent = ""; - - // Fix #12392 for oldIE - while ( tmp.firstChild ) { - tmp.removeChild( tmp.firstChild ); - } - - // Remember the top-level container for proper cleanup - tmp = safe.lastChild; - } - } - } - - // Fix #11356: Clear elements from fragment - if ( tmp ) { - safe.removeChild( tmp ); - } - - // Reset defaultChecked for any radios and checkboxes - // about to be appended to the DOM in IE 6/7 (#8060) - if ( !jQuery.support.appendChecked ) { - jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); - } - - i = 0; - while ( (elem = nodes[ i++ ]) ) { - - // #4087 - If origin and destination elements are the same, and this is - // that element, do not do anything - if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { - continue; - } - - contains = jQuery.contains( elem.ownerDocument, elem ); - - // Append to fragment - tmp = getAll( safe.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( contains ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( (elem = tmp[ j++ ]) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - tmp = null; - - return safe; - }, - - cleanData: function( elems, /* internal */ acceptData ) { - var elem, type, id, data, - i = 0, - internalKey = jQuery.expando, - cache = jQuery.cache, - deleteExpando = jQuery.support.deleteExpando, - special = jQuery.event.special; - - for ( ; (elem = elems[i]) != null; i++ ) { - - if ( acceptData || jQuery.acceptData( elem ) ) { - - id = elem[ internalKey ]; - data = id && cache[ id ]; - - if ( data ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Remove cache only if it was not already removed by jQuery.event.remove - if ( cache[ id ] ) { - - delete cache[ id ]; - - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( deleteExpando ) { - delete elem[ internalKey ]; - - } else if ( typeof elem.removeAttribute !== core_strundefined ) { - elem.removeAttribute( internalKey ); - - } else { - elem[ internalKey ] = null; - } - - core_deletedIds.push( id ); - } - } - } - } - }, - - _evalUrl: function( url ) { - return jQuery.ajax({ - url: url, - type: "GET", - dataType: "script", - async: false, - global: false, - "throws": true - }); - } -}); -jQuery.fn.extend({ - wrapAll: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapAll( html.call(this, i) ); - }); - } - - if ( this[0] ) { - // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); - - if ( this[0].parentNode ) { - wrap.insertBefore( this[0] ); - } - - wrap.map(function() { - var elem = this; - - while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { - elem = elem.firstChild; - } - - return elem; - }).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapInner( html.call(this, i) ); - }); - } - - return this.each(function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - }); - }, - - wrap: function( html ) { - var isFunction = jQuery.isFunction( html ); - - return this.each(function(i) { - jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); - }); - }, - - unwrap: function() { - return this.parent().each(function() { - if ( !jQuery.nodeName( this, "body" ) ) { - jQuery( this ).replaceWith( this.childNodes ); - } - }).end(); - } -}); -var iframe, getStyles, curCSS, - ralpha = /alpha\([^)]*\)/i, - ropacity = /opacity\s*=\s*([^)]*)/, - rposition = /^(top|right|bottom|left)$/, - // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" - // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rmargin = /^margin/, - rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), - rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), - rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ), - elemdisplay = { BODY: "block" }, - - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: 0, - fontWeight: 400 - }, - - cssExpand = [ "Top", "Right", "Bottom", "Left" ], - cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; - -// return a css property mapped to a potentially vendor prefixed property -function vendorPropName( style, name ) { - - // shortcut for names that are not vendor prefixed - if ( name in style ) { - return name; - } - - // check for vendor prefixed names - var capName = name.charAt(0).toUpperCase() + name.slice(1), - origName = name, - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in style ) { - return name; - } - } - - return origName; -} - -function isHidden( elem, el ) { - // isHidden might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); -} - -function showHide( elements, show ) { - var display, elem, hidden, - values = [], - index = 0, - length = elements.length; - - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - - values[ index ] = jQuery._data( elem, "olddisplay" ); - display = elem.style.display; - if ( show ) { - // Reset the inline display of this element to learn if it is - // being hidden by cascaded rules or not - if ( !values[ index ] && display === "none" ) { - elem.style.display = ""; - } - - // Set elements which have been overridden with display: none - // in a stylesheet to whatever the default browser style is - // for such an element - if ( elem.style.display === "" && isHidden( elem ) ) { - values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); - } - } else { - - if ( !values[ index ] ) { - hidden = isHidden( elem ); - - if ( display && display !== "none" || !hidden ) { - jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); - } - } - } - } - - // Set the display of most of the elements in a second loop - // to avoid the constant reflow - for ( index = 0; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - if ( !show || elem.style.display === "none" || elem.style.display === "" ) { - elem.style.display = show ? values[ index ] || "" : "none"; - } - } - - return elements; -} - -jQuery.fn.extend({ - css: function( name, value ) { - return jQuery.access( this, function( elem, name, value ) { - var len, styles, - map = {}, - i = 0; - - if ( jQuery.isArray( name ) ) { - styles = getStyles( elem ); - len = name.length; - - for ( ; i < len; i++ ) { - map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); - } - - return map; - } - - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - }, - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state ) { - if ( typeof state === "boolean" ) { - return state ? this.show() : this.hide(); - } - - return this.each(function() { - if ( isHidden( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - }); - } -}); - -jQuery.extend({ - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - } - } - } - }, - - // Don't automatically add "px" to these possibly-unitless properties - cssNumber: { - "columnCount": true, - "fillOpacity": true, - "fontWeight": true, - "lineHeight": true, - "opacity": true, - "order": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: { - // normalize float css property - "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" - }, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = jQuery.camelCase( name ), - style = elem.style; - - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // convert relative number strings (+= or -=) to relative numbers. #7345 - if ( type === "string" && (ret = rrelNum.exec( value )) ) { - value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); - // Fixes bug #9237 - type = "number"; - } - - // Make sure that NaN and null values aren't set. See: #7116 - if ( value == null || type === "number" && isNaN( value ) ) { - return; - } - - // If a number was passed in, add 'px' to the (except for certain CSS properties) - if ( type === "number" && !jQuery.cssNumber[ origName ] ) { - value += "px"; - } - - // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, - // but it would mean to define eight (for every problematic property) identical functions - if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { - style[ name ] = "inherit"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { - - // Wrapped to prevent IE from throwing errors when 'invalid' values are provided - // Fixes bug #5509 - try { - style[ name ] = value; - } catch(e) {} - } - - } else { - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, extra, styles ) { - var num, val, hooks, - origName = jQuery.camelCase( name ); - - // Make sure that we're working with the right name - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name, styles ); - } - - //convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Return, converting to number if forced or a qualifier was provided and val looks numeric - if ( extra === "" || extra ) { - num = parseFloat( val ); - return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; - } - return val; - } -}); - -// NOTE: we've included the "window" in window.getComputedStyle -// because jsdom on node.js will break without it. -if ( window.getComputedStyle ) { - getStyles = function( elem ) { - return window.getComputedStyle( elem, null ); - }; - - curCSS = function( elem, name, _computed ) { - var width, minWidth, maxWidth, - computed = _computed || getStyles( elem ), - - // getPropertyValue is only needed for .css('filter') in IE9, see #12537 - ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined, - style = elem.style; - - if ( computed ) { - - if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right - // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels - // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values - if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { - - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret; - }; -} else if ( document.documentElement.currentStyle ) { - getStyles = function( elem ) { - return elem.currentStyle; - }; - - curCSS = function( elem, name, _computed ) { - var left, rs, rsLeft, - computed = _computed || getStyles( elem ), - ret = computed ? computed[ name ] : undefined, - style = elem.style; - - // Avoid setting ret to empty string here - // so we don't default to auto - if ( ret == null && style && style[ name ] ) { - ret = style[ name ]; - } - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - // but not position css attributes, as those are proportional to the parent element instead - // and we can't measure the parent instead because it might trigger a "stacking dolls" problem - if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { - - // Remember the original values - left = style.left; - rs = elem.runtimeStyle; - rsLeft = rs && rs.left; - - // Put in the new values to get a computed value out - if ( rsLeft ) { - rs.left = elem.currentStyle.left; - } - style.left = name === "fontSize" ? "1em" : ret; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - if ( rsLeft ) { - rs.left = rsLeft; - } - } - - return ret === "" ? "auto" : ret; - }; -} - -function setPositiveNumber( elem, value, subtract ) { - var matches = rnumsplit.exec( value ); - return matches ? - // Guard against undefined "subtract", e.g., when used as in cssHooks - Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : - value; -} - -function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { - var i = extra === ( isBorderBox ? "border" : "content" ) ? - // If we already have the right measurement, avoid augmentation - 4 : - // Otherwise initialize for horizontal or vertical properties - name === "width" ? 1 : 0, - - val = 0; - - for ( ; i < 4; i += 2 ) { - // both box models exclude margin, so add it if we want it - if ( extra === "margin" ) { - val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); - } - - if ( isBorderBox ) { - // border-box includes padding, so remove it if we want content - if ( extra === "content" ) { - val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - } - - // at this point, extra isn't border nor margin, so remove border - if ( extra !== "margin" ) { - val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } else { - // at this point, extra isn't content, so add padding - val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - - // at this point, extra isn't content nor padding, so add border - if ( extra !== "padding" ) { - val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } - } - - return val; -} - -function getWidthOrHeight( elem, name, extra ) { - - // Start with offset property, which is equivalent to the border-box value - var valueIsBorderBox = true, - val = name === "width" ? elem.offsetWidth : elem.offsetHeight, - styles = getStyles( elem ), - isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - - // some non-html elements return undefined for offsetWidth, so check for null/undefined - // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 - // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 - if ( val <= 0 || val == null ) { - // Fall back to computed then uncomputed css if necessary - val = curCSS( elem, name, styles ); - if ( val < 0 || val == null ) { - val = elem.style[ name ]; - } - - // Computed unit is not pixels. Stop here and return. - if ( rnumnonpx.test(val) ) { - return val; - } - - // we need the check for style in case a browser which returns unreliable values - // for getComputedStyle silently falls back to the reliable elem.style - valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); - - // Normalize "", auto, and prepare for extra - val = parseFloat( val ) || 0; - } - - // use the active box-sizing model to add/subtract irrelevant styles - return ( val + - augmentWidthOrHeight( - elem, - name, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox, - styles - ) - ) + "px"; -} - -// Try to determine the default display value of an element -function css_defaultDisplay( nodeName ) { - var doc = document, - display = elemdisplay[ nodeName ]; - - if ( !display ) { - display = actualDisplay( nodeName, doc ); - - // If the simple way fails, read from inside an iframe - if ( display === "none" || !display ) { - // Use the already-created iframe if possible - iframe = ( iframe || - jQuery("