├── rmq-perf-app-screenshot.png ├── Dockerfile ├── manifest.yml ├── .gitignore ├── src ├── main │ ├── java │ │ └── com │ │ │ └── johnlonganecker │ │ │ ├── App.java │ │ │ ├── IndexController.java │ │ │ ├── Config.java │ │ │ ├── PerfResult.java │ │ │ ├── Rabbitmq36.java │ │ │ ├── Protocols.java │ │ │ ├── Rabbitmq36_.java │ │ │ ├── FormController.java │ │ │ ├── Amqp.java │ │ │ ├── Management.java │ │ │ ├── Stomp.java │ │ │ └── Credentials.java │ └── resources │ │ └── static │ │ ├── lib │ │ ├── codeflask.css │ │ ├── prism-okaidia.css │ │ ├── prism.css │ │ ├── codeflask.js │ │ ├── excanvas.min.js │ │ ├── prism.js │ │ ├── jquery.flot.min.js │ │ └── jquery-3.1.1.min.js │ │ ├── perf.css │ │ ├── loading-animation.css │ │ ├── perf.js │ │ └── index.html └── test │ └── java │ └── com │ └── johnlonganecker │ └── AppTest.java ├── pom.xml └── README.md /rmq-perf-app-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnlonganecker/rabbitmq-performance-app/HEAD/rmq-perf-app-screenshot.png -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM openjdk:8 2 | COPY target/performance-1.0-SNAPSHOT.jar rmq-perf-app.jar 3 | #CMD ["java", "-version"] 4 | CMD ["java", "-jar", "rmq-perf-app.jar"] 5 | -------------------------------------------------------------------------------- /manifest.yml: -------------------------------------------------------------------------------- 1 | --- 2 | applications: 3 | - name: rabbitmq-perf-app 4 | memory: 512M 5 | instances: 1 6 | random-route: true 7 | buildpack: java-buildpack 8 | path: target/performance-1.0-SNAPSHOT.jar 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | pom.xml.tag 3 | pom.xml.releaseBackup 4 | pom.xml.versionsBackup 5 | pom.xml.next 6 | release.properties 7 | dependency-reduced-pom.xml 8 | buildNumber.properties 9 | .mvn/timing.properties 10 | .DS_Store 11 | -------------------------------------------------------------------------------- /src/main/java/com/johnlonganecker/App.java: -------------------------------------------------------------------------------- 1 | package com.johnlonganecker; 2 | 3 | /** 4 | * Hello world! 5 | * 6 | */ 7 | public class App 8 | { 9 | public static void App( String[] args ) 10 | { 11 | System.out.println( "Hello World!" ); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/johnlonganecker/IndexController.java: -------------------------------------------------------------------------------- 1 | package com.johnlonganecker; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | @Controller 7 | public class IndexController { 8 | 9 | @RequestMapping("/") 10 | public String index() { 11 | return "index.html"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/johnlonganecker/Config.java: -------------------------------------------------------------------------------- 1 | package com.johnlonganecker; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class Config { 8 | public static void main(String[] args) { 9 | SpringApplication.run(Config.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/johnlonganecker/PerfResult.java: -------------------------------------------------------------------------------- 1 | package com.johnlonganecker; 2 | 3 | import java.util.Map; 4 | import java.util.HashMap; 5 | 6 | public class PerfResult { 7 | 8 | private Map results = new HashMap(); 9 | 10 | public PerfResult(Map results) { 11 | this.results = results; 12 | } 13 | 14 | public Map getResults() { 15 | return results; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/test/java/com/johnlonganecker/AppTest.java: -------------------------------------------------------------------------------- 1 | package com.johnlonganecker; 2 | 3 | import junit.framework.Test; 4 | import junit.framework.TestCase; 5 | import junit.framework.TestSuite; 6 | 7 | /** 8 | * Unit test for simple App. 9 | */ 10 | public class AppTest 11 | extends TestCase 12 | { 13 | /** 14 | * Create the test case 15 | * 16 | * @param testName name of the test case 17 | */ 18 | public AppTest( String testName ) 19 | { 20 | super( testName ); 21 | } 22 | 23 | /** 24 | * @return the suite of tests being tested 25 | */ 26 | public static Test suite() 27 | { 28 | return new TestSuite( AppTest.class ); 29 | } 30 | 31 | /** 32 | * Rigourous Test :-) 33 | */ 34 | public void testApp() 35 | { 36 | assertTrue( true ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/johnlonganecker/Rabbitmq36.java: -------------------------------------------------------------------------------- 1 | 2 | package com.johnlonganecker; 3 | 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | import javax.annotation.Generated; 7 | import com.google.gson.annotations.Expose; 8 | import com.google.gson.annotations.SerializedName; 9 | import org.apache.commons.lang.builder.ToStringBuilder; 10 | 11 | @Generated("org.jsonschema2pojo") 12 | public class Rabbitmq36 { 13 | 14 | @SerializedName("rabbitmq-36") 15 | @Expose 16 | private List rabbitmq36 = new ArrayList(); 17 | 18 | /** 19 | * 20 | * @return 21 | * The rabbitmq36 22 | */ 23 | public List getRabbitmq36() { 24 | return rabbitmq36; 25 | } 26 | 27 | /** 28 | * 29 | * @param rabbitmq36 30 | * The rabbitmq-36 31 | */ 32 | public void setRabbitmq36(List rabbitmq36) { 33 | this.rabbitmq36 = rabbitmq36; 34 | } 35 | 36 | @Override 37 | public String toString() { 38 | return ToStringBuilder.reflectionToString(this); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/resources/static/lib/codeflask.css: -------------------------------------------------------------------------------- 1 | .CodeFlask{ 2 | position:relative; 3 | overflow:hidden; 4 | } 5 | 6 | .CodeFlask__textarea, 7 | .CodeFlask__pre{ 8 | box-sizing:border-box; 9 | position:absolute; 10 | top:0; 11 | left:0; 12 | width:100%; 13 | padding:1rem !important; 14 | border:none; 15 | font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; 16 | font-size:13px; 17 | background:transparent; 18 | white-space:pre-wrap; 19 | line-height:1.5em; 20 | word-wrap: break-word; 21 | } 22 | 23 | .CodeFlask__textarea{ 24 | border:none; 25 | background:transparent; 26 | outline:none; 27 | resize:none; 28 | opacity:0.4; 29 | color:#000; 30 | margin:0; 31 | z-index:1; 32 | height:100%; 33 | -webkit-overflow-scrolling: touch; 34 | } 35 | 36 | .CodeFlask__pre{ 37 | z-index:2; 38 | pointer-events:none; 39 | overflow-y:auto; 40 | margin:0; 41 | min-height:100%; 42 | margin:0 !important; 43 | background:transparent !important; 44 | } 45 | 46 | .CodeFlask__code{ 47 | font-size:inherit; 48 | font-family:inherit; 49 | color:inherit; 50 | display:block; 51 | } 52 | -------------------------------------------------------------------------------- /src/main/resources/static/perf.css: -------------------------------------------------------------------------------- 1 | body { font: 12px Verdana,sans-serif; color: #484848; padding: 8px 35px; } 2 | 3 | p, ul { font: 14px Verdana,sans-serif; } 4 | 5 | .chart { 6 | width: 600px; 7 | height: 300px; 8 | } 9 | 10 | .small-chart { 11 | width: 200px; 12 | height: 100px; 13 | } 14 | 15 | .small-chart-wrapper { 16 | float: left; 17 | } 18 | 19 | .xaxis, .yaxis { 20 | text-align: center; 21 | xcolor: #545454; 22 | font-size: smaller; 23 | } 24 | 25 | /* Any similarity is entirely intentional */ 26 | 27 | .summary { min-width: 120px; font-size: 120%; text-align:center; padding:10px; background-color: #ddd; margin: 0 20px 0 0; color: #888; border-radius: 10px; -moz-border-radius: 10px; float: left; clear: both; } 28 | .summary strong { font-size: 2em; display: block; color: #444; font-weight: normal; } 29 | 30 | .summary { 31 | background: -moz-linear-gradient(center top, #f0f0f0 0%,#e0e0e0 100%); 32 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #f0f0f0),color-stop(1, #e0e0e0)); 33 | border: 1px solid #e0e0e0; 34 | } 35 | 36 | .box { 37 | overflow: auto; 38 | width: 100%; 39 | } 40 | 41 | .box p { 42 | margin: 0 0 0 20px; 43 | float: left; 44 | width: 600px; 45 | } -------------------------------------------------------------------------------- /src/main/java/com/johnlonganecker/Protocols.java: -------------------------------------------------------------------------------- 1 | 2 | package com.johnlonganecker; 3 | 4 | import javax.annotation.Generated; 5 | import com.google.gson.annotations.Expose; 6 | import com.google.gson.annotations.SerializedName; 7 | import org.apache.commons.lang.builder.ToStringBuilder; 8 | 9 | @Generated("org.jsonschema2pojo") 10 | public class Protocols { 11 | 12 | @SerializedName("management") 13 | @Expose 14 | private Management management; 15 | @SerializedName("amqp") 16 | @Expose 17 | private Amqp amqp; 18 | @SerializedName("stomp") 19 | @Expose 20 | private Stomp stomp; 21 | 22 | /** 23 | * 24 | * @return 25 | * The management 26 | */ 27 | public Management getManagement() { 28 | return management; 29 | } 30 | 31 | /** 32 | * 33 | * @param management 34 | * The management 35 | */ 36 | public void setManagement(Management management) { 37 | this.management = management; 38 | } 39 | 40 | /** 41 | * 42 | * @return 43 | * The amqp 44 | */ 45 | public Amqp getAmqp() { 46 | return amqp; 47 | } 48 | 49 | /** 50 | * 51 | * @param amqp 52 | * The amqp 53 | */ 54 | public void setAmqp(Amqp amqp) { 55 | this.amqp = amqp; 56 | } 57 | 58 | /** 59 | * 60 | * @return 61 | * The stomp 62 | */ 63 | public Stomp getStomp() { 64 | return stomp; 65 | } 66 | 67 | /** 68 | * 69 | * @param stomp 70 | * The stomp 71 | */ 72 | public void setStomp(Stomp stomp) { 73 | this.stomp = stomp; 74 | } 75 | 76 | @Override 77 | public String toString() { 78 | return ToStringBuilder.reflectionToString(this); 79 | } 80 | 81 | } 82 | -------------------------------------------------------------------------------- /src/main/resources/static/lib/prism-okaidia.css: -------------------------------------------------------------------------------- 1 | /** 2 | * okaidia theme for JavaScript, CSS and HTML 3 | * Loosely based on Monokai textmate theme by http://www.monokai.nl/ 4 | * @author ocodia 5 | */ 6 | 7 | code[class*="language-"], 8 | pre[class*="language-"] { 9 | color: #f8f8f2; 10 | text-shadow: 0px 1px rgba(0,0,0,0.3); 11 | font-family: Consolas, Monaco, 'Andale Mono', monospace; 12 | direction: ltr; 13 | text-align: left; 14 | white-space: pre; 15 | word-spacing: normal; 16 | 17 | -moz-tab-size: 4; 18 | -o-tab-size: 4; 19 | tab-size: 4; 20 | 21 | -webkit-hyphens: none; 22 | -moz-hyphens: none; 23 | -ms-hyphens: none; 24 | hyphens: none; 25 | } 26 | 27 | /* Code blocks */ 28 | pre[class*="language-"] { 29 | padding: 1em; 30 | margin: .5em 0; 31 | overflow: auto; 32 | } 33 | 34 | :not(pre) > code[class*="language-"], 35 | pre[class*="language-"] { 36 | background: #272822; 37 | } 38 | 39 | /* Inline code */ 40 | :not(pre) > code[class*="language-"] { 41 | padding: .1em; 42 | border-radius: .3em; 43 | } 44 | 45 | .token.comment, 46 | .token.prolog, 47 | .token.doctype, 48 | .token.cdata { 49 | color: slategray; 50 | } 51 | 52 | .token.punctuation { 53 | color: #f8f8f2; 54 | } 55 | 56 | .namespace { 57 | opacity: .7; 58 | } 59 | 60 | .token.property, 61 | .token.tag { 62 | color: #f92672; 63 | } 64 | 65 | .token.boolean, 66 | .token.number{ 67 | color: #ae81ff; 68 | } 69 | 70 | .token.selector, 71 | .token.attr-name, 72 | .token.string { 73 | color: #a6e22e; 74 | } 75 | 76 | 77 | .token.operator, 78 | .token.entity, 79 | .token.url, 80 | .language-css .token.string, 81 | .style .token.string { 82 | color: #f8f8f2; 83 | } 84 | 85 | .token.atrule, 86 | .token.attr-value 87 | { 88 | color: #e6db74; 89 | } 90 | 91 | 92 | .token.keyword{ 93 | color: #f92672; 94 | } 95 | 96 | .token.regex, 97 | .token.important { 98 | color: #fd971f; 99 | } 100 | 101 | .token.important { 102 | font-weight: bold; 103 | } 104 | 105 | .token.entity { 106 | cursor: help; 107 | } -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | com.johnlonganecker 5 | performance 6 | jar 7 | 1.0-SNAPSHOT 8 | performance 9 | http://maven.apache.org 10 | 11 | 12 | org.springframework.boot 13 | spring-boot-starter-parent 14 | 1.4.1.RELEASE 15 | 16 | 17 | 18 | 19 | junit 20 | junit 21 | 3.8.1 22 | test 23 | 24 | 25 | com.rabbitmq 26 | amqp-client 27 | 5.6.0 28 | 29 | 30 | org.springframework.boot 31 | spring-boot-starter-web 32 | 33 | 34 | org.springframework.boot 35 | spring-boot-starter-actuator 36 | 37 | 38 | org.springframework.boot 39 | spring-boot-starter-test 40 | test 41 | 42 | 43 | com.google.code.gson 44 | gson 45 | 2.7 46 | 47 | 48 | commons-lang 49 | commons-lang 50 | 2.2 51 | 52 | 53 | com.rabbitmq 54 | perf-test 55 | 1.0.1 56 | 57 | 58 | 59 | 60 | 1.8 61 | 62 | 63 | 64 | 65 | 66 | org.springframework.boot 67 | spring-boot-maven-plugin 68 | 69 | 70 | org.cloudfoundry 71 | cf-maven-plugin 72 | 1.1.2 73 | 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /src/main/resources/static/loading-animation.css: -------------------------------------------------------------------------------- 1 | .sk-folding-cube { 2 | margin: 20px auto; 3 | width: 40px; 4 | height: 40px; 5 | position: relative; 6 | -webkit-transform: rotateZ(45deg); 7 | transform: rotateZ(45deg); 8 | } 9 | 10 | .sk-folding-cube .sk-cube { 11 | float: left; 12 | width: 50%; 13 | height: 50%; 14 | position: relative; 15 | -webkit-transform: scale(1.1); 16 | -ms-transform: scale(1.1); 17 | transform: scale(1.1); 18 | } 19 | .sk-folding-cube .sk-cube:before { 20 | content: ''; 21 | position: absolute; 22 | top: 0; 23 | left: 0; 24 | width: 100%; 25 | height: 100%; 26 | background-color: #333; 27 | -webkit-animation: sk-foldCubeAngle 2.4s infinite linear both; 28 | animation: sk-foldCubeAngle 2.4s infinite linear both; 29 | -webkit-transform-origin: 100% 100%; 30 | -ms-transform-origin: 100% 100%; 31 | transform-origin: 100% 100%; 32 | } 33 | .sk-folding-cube .sk-cube2 { 34 | -webkit-transform: scale(1.1) rotateZ(90deg); 35 | transform: scale(1.1) rotateZ(90deg); 36 | } 37 | .sk-folding-cube .sk-cube3 { 38 | -webkit-transform: scale(1.1) rotateZ(180deg); 39 | transform: scale(1.1) rotateZ(180deg); 40 | } 41 | .sk-folding-cube .sk-cube4 { 42 | -webkit-transform: scale(1.1) rotateZ(270deg); 43 | transform: scale(1.1) rotateZ(270deg); 44 | } 45 | .sk-folding-cube .sk-cube2:before { 46 | -webkit-animation-delay: 0.3s; 47 | animation-delay: 0.3s; 48 | } 49 | .sk-folding-cube .sk-cube3:before { 50 | -webkit-animation-delay: 0.6s; 51 | animation-delay: 0.6s; 52 | } 53 | .sk-folding-cube .sk-cube4:before { 54 | -webkit-animation-delay: 0.9s; 55 | animation-delay: 0.9s; 56 | } 57 | @-webkit-keyframes sk-foldCubeAngle { 58 | 0%, 10% { 59 | -webkit-transform: perspective(140px) rotateX(-180deg); 60 | transform: perspective(140px) rotateX(-180deg); 61 | opacity: 0; 62 | } 25%, 75% { 63 | -webkit-transform: perspective(140px) rotateX(0deg); 64 | transform: perspective(140px) rotateX(0deg); 65 | opacity: 1; 66 | } 90%, 100% { 67 | -webkit-transform: perspective(140px) rotateY(180deg); 68 | transform: perspective(140px) rotateY(180deg); 69 | opacity: 0; 70 | } 71 | } 72 | 73 | @keyframes sk-foldCubeAngle { 74 | 0%, 10% { 75 | -webkit-transform: perspective(140px) rotateX(-180deg); 76 | transform: perspective(140px) rotateX(-180deg); 77 | opacity: 0; 78 | } 25%, 75% { 79 | -webkit-transform: perspective(140px) rotateX(0deg); 80 | transform: perspective(140px) rotateX(0deg); 81 | opacity: 1; 82 | } 90%, 100% { 83 | -webkit-transform: perspective(140px) rotateY(180deg); 84 | transform: perspective(140px) rotateY(180deg); 85 | opacity: 0; 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /src/main/java/com/johnlonganecker/Rabbitmq36_.java: -------------------------------------------------------------------------------- 1 | 2 | package com.johnlonganecker; 3 | 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | import javax.annotation.Generated; 7 | import com.google.gson.annotations.Expose; 8 | import com.google.gson.annotations.SerializedName; 9 | import org.apache.commons.lang.builder.ToStringBuilder; 10 | 11 | @Generated("org.jsonschema2pojo") 12 | public class Rabbitmq36_ { 13 | 14 | @SerializedName("name") 15 | @Expose 16 | private String name; 17 | @SerializedName("label") 18 | @Expose 19 | private String label; 20 | @SerializedName("tags") 21 | @Expose 22 | private List tags = new ArrayList(); 23 | @SerializedName("plan") 24 | @Expose 25 | private String plan; 26 | @SerializedName("credentials") 27 | @Expose 28 | private Credentials credentials; 29 | 30 | /** 31 | * 32 | * @return 33 | * The name 34 | */ 35 | public String getName() { 36 | return name; 37 | } 38 | 39 | /** 40 | * 41 | * @param name 42 | * The name 43 | */ 44 | public void setName(String name) { 45 | this.name = name; 46 | } 47 | 48 | /** 49 | * 50 | * @return 51 | * The label 52 | */ 53 | public String getLabel() { 54 | return label; 55 | } 56 | 57 | /** 58 | * 59 | * @param label 60 | * The label 61 | */ 62 | public void setLabel(String label) { 63 | this.label = label; 64 | } 65 | 66 | /** 67 | * 68 | * @return 69 | * The tags 70 | */ 71 | public List getTags() { 72 | return tags; 73 | } 74 | 75 | /** 76 | * 77 | * @param tags 78 | * The tags 79 | */ 80 | public void setTags(List tags) { 81 | this.tags = tags; 82 | } 83 | 84 | /** 85 | * 86 | * @return 87 | * The plan 88 | */ 89 | public String getPlan() { 90 | return plan; 91 | } 92 | 93 | /** 94 | * 95 | * @param plan 96 | * The plan 97 | */ 98 | public void setPlan(String plan) { 99 | this.plan = plan; 100 | } 101 | 102 | /** 103 | * 104 | * @return 105 | * The credentials 106 | */ 107 | public Credentials getCredentials() { 108 | return credentials; 109 | } 110 | 111 | /** 112 | * 113 | * @param credentials 114 | * The credentials 115 | */ 116 | public void setCredentials(Credentials credentials) { 117 | this.credentials = credentials; 118 | } 119 | 120 | @Override 121 | public String toString() { 122 | return ToStringBuilder.reflectionToString(this); 123 | } 124 | 125 | } 126 | -------------------------------------------------------------------------------- /src/main/resources/static/lib/prism.css: -------------------------------------------------------------------------------- 1 | /** 2 | * prism.js default theme for JavaScript, CSS and HTML 3 | * Based on dabblet (http://dabblet.com) 4 | * @author Lea Verou 5 | */ 6 | 7 | code[class*="language-"], 8 | pre[class*="language-"] { 9 | color: black; 10 | text-shadow: 0 1px white; 11 | font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; 12 | direction: ltr; 13 | text-align: left; 14 | white-space: pre; 15 | word-spacing: normal; 16 | word-break: normal; 17 | line-height: 1.5; 18 | 19 | -moz-tab-size: 4; 20 | -o-tab-size: 4; 21 | tab-size: 4; 22 | 23 | -webkit-hyphens: none; 24 | -moz-hyphens: none; 25 | -ms-hyphens: none; 26 | hyphens: none; 27 | } 28 | 29 | pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection, 30 | code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection { 31 | text-shadow: none; 32 | background: #b3d4fc; 33 | } 34 | 35 | pre[class*="language-"]::selection, pre[class*="language-"] ::selection, 36 | code[class*="language-"]::selection, code[class*="language-"] ::selection { 37 | text-shadow: none; 38 | background: #b3d4fc; 39 | } 40 | 41 | @media print { 42 | code[class*="language-"], 43 | pre[class*="language-"] { 44 | text-shadow: none; 45 | } 46 | } 47 | 48 | /* Code blocks */ 49 | pre[class*="language-"] { 50 | padding: 1em; 51 | margin: .5em 0; 52 | overflow: auto; 53 | } 54 | 55 | :not(pre) > code[class*="language-"], 56 | pre[class*="language-"] { 57 | background: #f5f2f0; 58 | } 59 | 60 | /* Inline code */ 61 | :not(pre) > code[class*="language-"] { 62 | padding: .1em; 63 | border-radius: .3em; 64 | } 65 | 66 | .token.comment, 67 | .token.prolog, 68 | .token.doctype, 69 | .token.cdata { 70 | color: slategray; 71 | } 72 | 73 | .token.punctuation { 74 | color: #999; 75 | } 76 | 77 | .namespace { 78 | opacity: .7; 79 | } 80 | 81 | .token.property, 82 | .token.tag, 83 | .token.boolean, 84 | .token.number, 85 | .token.constant, 86 | .token.symbol, 87 | .token.deleted { 88 | color: #905; 89 | } 90 | 91 | .token.selector, 92 | .token.attr-name, 93 | .token.string, 94 | .token.char, 95 | .token.builtin, 96 | .token.inserted { 97 | color: #690; 98 | } 99 | 100 | .token.operator, 101 | .token.entity, 102 | .token.url, 103 | .language-css .token.string, 104 | .style .token.string { 105 | color: #a67f59; 106 | background: hsla(0, 0%, 100%, .5); 107 | } 108 | 109 | .token.atrule, 110 | .token.attr-value, 111 | .token.keyword { 112 | color: #07a; 113 | } 114 | 115 | .token.function { 116 | color: #DD4A68; 117 | } 118 | 119 | .token.regex, 120 | .token.important, 121 | .token.variable { 122 | color: #e90; 123 | } 124 | 125 | .token.important, 126 | .token.bold { 127 | font-weight: bold; 128 | } 129 | .token.italic { 130 | font-style: italic; 131 | } 132 | 133 | .token.entity { 134 | cursor: help; 135 | } 136 | -------------------------------------------------------------------------------- /src/main/java/com/johnlonganecker/FormController.java: -------------------------------------------------------------------------------- 1 | package com.johnlonganecker; 2 | 3 | import java.util.concurrent.atomic.AtomicLong; 4 | 5 | import com.rabbitmq.client.ConnectionFactory; 6 | import com.rabbitmq.tools.json.JSONReader; 7 | import com.rabbitmq.tools.json.JSONWriter; 8 | import com.rabbitmq.perf.Scenario; 9 | import com.rabbitmq.perf.ScenarioFactory; 10 | 11 | import org.springframework.stereotype.Controller; 12 | import org.springframework.web.bind.annotation.RestController; 13 | import org.springframework.web.bind.annotation.RequestMapping; 14 | import org.springframework.web.bind.annotation.RequestParam; 15 | import org.springframework.web.bind.annotation.PostMapping; 16 | import org.springframework.web.bind.annotation.GetMapping; 17 | import org.springframework.web.bind.annotation.RequestBody; 18 | 19 | import org.springframework.web.bind.annotation.ResponseBody; 20 | import org.springframework.web.bind.annotation.ResponseStatus; 21 | import org.springframework.http.HttpStatus; 22 | 23 | import org.springframework.web.util.UriUtils; 24 | 25 | import java.util.HashMap; 26 | import java.util.List; 27 | import java.util.Map; 28 | import java.util.Arrays; 29 | 30 | import com.google.gson.Gson; 31 | 32 | @RestController 33 | //@RequestMapping("/perf") 34 | public class FormController { 35 | 36 | private static final ConnectionFactory factory = new ConnectionFactory(); 37 | 38 | private static final Map results = new HashMap(); 39 | 40 | @PostMapping("/perftest") 41 | public @ResponseBody PerfResult process(@RequestBody String scenarioConfig) { 42 | 43 | Map env = System.getenv(); 44 | 45 | Map scenarioJSON = null; 46 | 47 | String returnResult = ""; 48 | try { 49 | scenarioJSON = (Map) new JSONReader().read(scenarioConfig); 50 | 51 | } catch (Exception e) { 52 | e.printStackTrace(); 53 | throw new InvalidJsonException("Parsing ScenarioConfig JSON - " + e.getMessage()); 54 | } 55 | 56 | try { 57 | 58 | // if uri is not specified use vcap variable 59 | if (!scenarioJSON.containsKey("uri")) { 60 | Gson gson = new Gson(); 61 | Rabbitmq36 rabbitmqConfig = gson.fromJson(env.get("VCAP_SERVICES"), Rabbitmq36.class); 62 | 63 | scenarioJSON.put("uri", rabbitmqConfig.getRabbitmq36().get(0).getCredentials().getUri()); 64 | } 65 | } catch(Exception e) { 66 | System.out.println("warning: failed trying to use Cloud Foundry VCAP ENV Variables"); 67 | } 68 | 69 | Scenario[] scenarios = new Scenario[1]; 70 | scenarios[0] = ScenarioFactory.fromJSON(scenarioJSON, factory); 71 | 72 | try { 73 | runStaticBrokerTests(scenarios); 74 | } catch(Exception e) { 75 | e.printStackTrace(); 76 | throw new RunScenarioException("Unable to run scenario - " + e.getMessage()); 77 | } 78 | 79 | return new PerfResult(results); 80 | } 81 | 82 | private static void runStaticBrokerTests(Scenario[] scenarios) throws Exception { 83 | runTests(scenarios); 84 | } 85 | 86 | private static void runTests(Scenario[] scenarios) throws Exception { 87 | for (Scenario scenario : scenarios) { 88 | System.out.print("Running scenario '" + scenario.getName() + "'"); 89 | scenario.run(); 90 | results.put(scenario.getName(), scenario.getStats().results()); 91 | } 92 | } 93 | } 94 | 95 | @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) 96 | class InvalidJsonException extends RuntimeException { 97 | public InvalidJsonException(String error) { 98 | super(error); 99 | } 100 | } 101 | 102 | @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) 103 | class RunScenarioException extends RuntimeException { 104 | public RunScenarioException(String error) { 105 | super(error); 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/johnlonganecker/Amqp.java: -------------------------------------------------------------------------------- 1 | 2 | package com.johnlonganecker; 3 | 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | import javax.annotation.Generated; 7 | import com.google.gson.annotations.Expose; 8 | import com.google.gson.annotations.SerializedName; 9 | import org.apache.commons.lang.builder.ToStringBuilder; 10 | 11 | @Generated("org.jsonschema2pojo") 12 | public class Amqp { 13 | 14 | @SerializedName("vhost") 15 | @Expose 16 | private String vhost; 17 | @SerializedName("username") 18 | @Expose 19 | private String username; 20 | @SerializedName("password") 21 | @Expose 22 | private String password; 23 | @SerializedName("port") 24 | @Expose 25 | private Integer port; 26 | @SerializedName("host") 27 | @Expose 28 | private String host; 29 | @SerializedName("hosts") 30 | @Expose 31 | private List hosts = new ArrayList(); 32 | @SerializedName("ssl") 33 | @Expose 34 | private Boolean ssl; 35 | @SerializedName("uri") 36 | @Expose 37 | private String uri; 38 | @SerializedName("uris") 39 | @Expose 40 | private List uris = new ArrayList(); 41 | 42 | /** 43 | * 44 | * @return 45 | * The vhost 46 | */ 47 | public String getVhost() { 48 | return vhost; 49 | } 50 | 51 | /** 52 | * 53 | * @param vhost 54 | * The vhost 55 | */ 56 | public void setVhost(String vhost) { 57 | this.vhost = vhost; 58 | } 59 | 60 | /** 61 | * 62 | * @return 63 | * The username 64 | */ 65 | public String getUsername() { 66 | return username; 67 | } 68 | 69 | /** 70 | * 71 | * @param username 72 | * The username 73 | */ 74 | public void setUsername(String username) { 75 | this.username = username; 76 | } 77 | 78 | /** 79 | * 80 | * @return 81 | * The password 82 | */ 83 | public String getPassword() { 84 | return password; 85 | } 86 | 87 | /** 88 | * 89 | * @param password 90 | * The password 91 | */ 92 | public void setPassword(String password) { 93 | this.password = password; 94 | } 95 | 96 | /** 97 | * 98 | * @return 99 | * The port 100 | */ 101 | public Integer getPort() { 102 | return port; 103 | } 104 | 105 | /** 106 | * 107 | * @param port 108 | * The port 109 | */ 110 | public void setPort(Integer port) { 111 | this.port = port; 112 | } 113 | 114 | /** 115 | * 116 | * @return 117 | * The host 118 | */ 119 | public String getHost() { 120 | return host; 121 | } 122 | 123 | /** 124 | * 125 | * @param host 126 | * The host 127 | */ 128 | public void setHost(String host) { 129 | this.host = host; 130 | } 131 | 132 | /** 133 | * 134 | * @return 135 | * The hosts 136 | */ 137 | public List getHosts() { 138 | return hosts; 139 | } 140 | 141 | /** 142 | * 143 | * @param hosts 144 | * The hosts 145 | */ 146 | public void setHosts(List hosts) { 147 | this.hosts = hosts; 148 | } 149 | 150 | /** 151 | * 152 | * @return 153 | * The ssl 154 | */ 155 | public Boolean getSsl() { 156 | return ssl; 157 | } 158 | 159 | /** 160 | * 161 | * @param ssl 162 | * The ssl 163 | */ 164 | public void setSsl(Boolean ssl) { 165 | this.ssl = ssl; 166 | } 167 | 168 | /** 169 | * 170 | * @return 171 | * The uri 172 | */ 173 | public String getUri() { 174 | return uri; 175 | } 176 | 177 | /** 178 | * 179 | * @param uri 180 | * The uri 181 | */ 182 | public void setUri(String uri) { 183 | this.uri = uri; 184 | } 185 | 186 | /** 187 | * 188 | * @return 189 | * The uris 190 | */ 191 | public List getUris() { 192 | return uris; 193 | } 194 | 195 | /** 196 | * 197 | * @param uris 198 | * The uris 199 | */ 200 | public void setUris(List uris) { 201 | this.uris = uris; 202 | } 203 | 204 | @Override 205 | public String toString() { 206 | return ToStringBuilder.reflectionToString(this); 207 | } 208 | 209 | } 210 | -------------------------------------------------------------------------------- /src/main/java/com/johnlonganecker/Management.java: -------------------------------------------------------------------------------- 1 | 2 | package com.johnlonganecker; 3 | 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | import javax.annotation.Generated; 7 | import com.google.gson.annotations.Expose; 8 | import com.google.gson.annotations.SerializedName; 9 | import org.apache.commons.lang.builder.ToStringBuilder; 10 | 11 | @Generated("org.jsonschema2pojo") 12 | public class Management { 13 | 14 | @SerializedName("path") 15 | @Expose 16 | private String path; 17 | @SerializedName("ssl") 18 | @Expose 19 | private Boolean ssl; 20 | @SerializedName("hosts") 21 | @Expose 22 | private List hosts = new ArrayList(); 23 | @SerializedName("password") 24 | @Expose 25 | private String password; 26 | @SerializedName("username") 27 | @Expose 28 | private String username; 29 | @SerializedName("port") 30 | @Expose 31 | private Integer port; 32 | @SerializedName("host") 33 | @Expose 34 | private String host; 35 | @SerializedName("uri") 36 | @Expose 37 | private String uri; 38 | @SerializedName("uris") 39 | @Expose 40 | private List uris = new ArrayList(); 41 | 42 | /** 43 | * 44 | * @return 45 | * The path 46 | */ 47 | public String getPath() { 48 | return path; 49 | } 50 | 51 | /** 52 | * 53 | * @param path 54 | * The path 55 | */ 56 | public void setPath(String path) { 57 | this.path = path; 58 | } 59 | 60 | /** 61 | * 62 | * @return 63 | * The ssl 64 | */ 65 | public Boolean getSsl() { 66 | return ssl; 67 | } 68 | 69 | /** 70 | * 71 | * @param ssl 72 | * The ssl 73 | */ 74 | public void setSsl(Boolean ssl) { 75 | this.ssl = ssl; 76 | } 77 | 78 | /** 79 | * 80 | * @return 81 | * The hosts 82 | */ 83 | public List getHosts() { 84 | return hosts; 85 | } 86 | 87 | /** 88 | * 89 | * @param hosts 90 | * The hosts 91 | */ 92 | public void setHosts(List hosts) { 93 | this.hosts = hosts; 94 | } 95 | 96 | /** 97 | * 98 | * @return 99 | * The password 100 | */ 101 | public String getPassword() { 102 | return password; 103 | } 104 | 105 | /** 106 | * 107 | * @param password 108 | * The password 109 | */ 110 | public void setPassword(String password) { 111 | this.password = password; 112 | } 113 | 114 | /** 115 | * 116 | * @return 117 | * The username 118 | */ 119 | public String getUsername() { 120 | return username; 121 | } 122 | 123 | /** 124 | * 125 | * @param username 126 | * The username 127 | */ 128 | public void setUsername(String username) { 129 | this.username = username; 130 | } 131 | 132 | /** 133 | * 134 | * @return 135 | * The port 136 | */ 137 | public Integer getPort() { 138 | return port; 139 | } 140 | 141 | /** 142 | * 143 | * @param port 144 | * The port 145 | */ 146 | public void setPort(Integer port) { 147 | this.port = port; 148 | } 149 | 150 | /** 151 | * 152 | * @return 153 | * The host 154 | */ 155 | public String getHost() { 156 | return host; 157 | } 158 | 159 | /** 160 | * 161 | * @param host 162 | * The host 163 | */ 164 | public void setHost(String host) { 165 | this.host = host; 166 | } 167 | 168 | /** 169 | * 170 | * @return 171 | * The uri 172 | */ 173 | public String getUri() { 174 | return uri; 175 | } 176 | 177 | /** 178 | * 179 | * @param uri 180 | * The uri 181 | */ 182 | public void setUri(String uri) { 183 | this.uri = uri; 184 | } 185 | 186 | /** 187 | * 188 | * @return 189 | * The uris 190 | */ 191 | public List getUris() { 192 | return uris; 193 | } 194 | 195 | /** 196 | * 197 | * @param uris 198 | * The uris 199 | */ 200 | public void setUris(List uris) { 201 | this.uris = uris; 202 | } 203 | 204 | @Override 205 | public String toString() { 206 | return ToStringBuilder.reflectionToString(this); 207 | } 208 | 209 | } 210 | -------------------------------------------------------------------------------- /src/main/java/com/johnlonganecker/Stomp.java: -------------------------------------------------------------------------------- 1 | 2 | package com.johnlonganecker; 3 | 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | import javax.annotation.Generated; 7 | import com.google.gson.annotations.Expose; 8 | import com.google.gson.annotations.SerializedName; 9 | import org.apache.commons.lang.builder.ToStringBuilder; 10 | 11 | @Generated("org.jsonschema2pojo") 12 | public class Stomp { 13 | 14 | @SerializedName("vhost") 15 | @Expose 16 | private String vhost; 17 | @SerializedName("username") 18 | @Expose 19 | private String username; 20 | @SerializedName("password") 21 | @Expose 22 | private String password; 23 | @SerializedName("port") 24 | @Expose 25 | private Integer port; 26 | @SerializedName("host") 27 | @Expose 28 | private String host; 29 | @SerializedName("hosts") 30 | @Expose 31 | private List hosts = new ArrayList(); 32 | @SerializedName("ssl") 33 | @Expose 34 | private Boolean ssl; 35 | @SerializedName("uri") 36 | @Expose 37 | private String uri; 38 | @SerializedName("uris") 39 | @Expose 40 | private List uris = new ArrayList(); 41 | 42 | /** 43 | * 44 | * @return 45 | * The vhost 46 | */ 47 | public String getVhost() { 48 | return vhost; 49 | } 50 | 51 | /** 52 | * 53 | * @param vhost 54 | * The vhost 55 | */ 56 | public void setVhost(String vhost) { 57 | this.vhost = vhost; 58 | } 59 | 60 | /** 61 | * 62 | * @return 63 | * The username 64 | */ 65 | public String getUsername() { 66 | return username; 67 | } 68 | 69 | /** 70 | * 71 | * @param username 72 | * The username 73 | */ 74 | public void setUsername(String username) { 75 | this.username = username; 76 | } 77 | 78 | /** 79 | * 80 | * @return 81 | * The password 82 | */ 83 | public String getPassword() { 84 | return password; 85 | } 86 | 87 | /** 88 | * 89 | * @param password 90 | * The password 91 | */ 92 | public void setPassword(String password) { 93 | this.password = password; 94 | } 95 | 96 | /** 97 | * 98 | * @return 99 | * The port 100 | */ 101 | public Integer getPort() { 102 | return port; 103 | } 104 | 105 | /** 106 | * 107 | * @param port 108 | * The port 109 | */ 110 | public void setPort(Integer port) { 111 | this.port = port; 112 | } 113 | 114 | /** 115 | * 116 | * @return 117 | * The host 118 | */ 119 | public String getHost() { 120 | return host; 121 | } 122 | 123 | /** 124 | * 125 | * @param host 126 | * The host 127 | */ 128 | public void setHost(String host) { 129 | this.host = host; 130 | } 131 | 132 | /** 133 | * 134 | * @return 135 | * The hosts 136 | */ 137 | public List getHosts() { 138 | return hosts; 139 | } 140 | 141 | /** 142 | * 143 | * @param hosts 144 | * The hosts 145 | */ 146 | public void setHosts(List hosts) { 147 | this.hosts = hosts; 148 | } 149 | 150 | /** 151 | * 152 | * @return 153 | * The ssl 154 | */ 155 | public Boolean getSsl() { 156 | return ssl; 157 | } 158 | 159 | /** 160 | * 161 | * @param ssl 162 | * The ssl 163 | */ 164 | public void setSsl(Boolean ssl) { 165 | this.ssl = ssl; 166 | } 167 | 168 | /** 169 | * 170 | * @return 171 | * The uri 172 | */ 173 | public String getUri() { 174 | return uri; 175 | } 176 | 177 | /** 178 | * 179 | * @param uri 180 | * The uri 181 | */ 182 | public void setUri(String uri) { 183 | this.uri = uri; 184 | } 185 | 186 | /** 187 | * 188 | * @return 189 | * The uris 190 | */ 191 | public List getUris() { 192 | return uris; 193 | } 194 | 195 | /** 196 | * 197 | * @param uris 198 | * The uris 199 | */ 200 | public void setUris(List uris) { 201 | this.uris = uris; 202 | } 203 | 204 | @Override 205 | public String toString() { 206 | return ToStringBuilder.reflectionToString(this); 207 | } 208 | 209 | } 210 | -------------------------------------------------------------------------------- /src/main/resources/static/lib/codeflask.js: -------------------------------------------------------------------------------- 1 | function CodeFlask() { 2 | 3 | } 4 | 5 | CodeFlask.prototype.run = function(selector, opts) { 6 | var target = document.querySelectorAll(selector); 7 | 8 | if(target.length > 1) { 9 | throw 'CodeFlask.js ERROR: run() expects only one element, ' + 10 | target.length + ' given. Use .runAll() instead.'; 11 | } else { 12 | this.scaffold(target[0], false, opts); 13 | } 14 | } 15 | 16 | CodeFlask.prototype.runAll = function(selector, opts) { 17 | // Remove update API for bulk rendering 18 | this.update = null; 19 | this.onUpdate = null; 20 | 21 | var target = document.querySelectorAll(selector); 22 | 23 | var i; 24 | for(i=0; i < target.length; i++) { 25 | this.scaffold(target[i], true, opts); 26 | } 27 | } 28 | 29 | CodeFlask.prototype.scaffold = function(target, isMultiple, opts) { 30 | var textarea = document.createElement('TEXTAREA'), 31 | highlightPre = document.createElement('PRE'), 32 | highlightCode = document.createElement('CODE'), 33 | initialCode = target.textContent, 34 | lang; 35 | 36 | opts.language = this.handleLanguage(opts.language); 37 | 38 | this.defaultLanguage = target.dataset.language || opts.language || 'markup'; 39 | 40 | 41 | // Prevent these vars from being refreshed when rendering multiple 42 | // instances 43 | if(!isMultiple) { 44 | this.textarea = textarea; 45 | this.highlightCode = highlightCode; 46 | } 47 | 48 | target.classList.add('CodeFlask'); 49 | textarea.classList.add('CodeFlask__textarea'); 50 | highlightPre.classList.add('CodeFlask__pre'); 51 | highlightCode.classList.add('CodeFlask__code'); 52 | highlightCode.classList.add('language-' + this.defaultLanguage); 53 | 54 | // Fixing iOS "drunk-text" issue 55 | if(/iPad|iPhone|iPod/.test(navigator.platform)) { 56 | highlightCode.style.paddingLeft = '3px'; 57 | } 58 | 59 | // Appending editor elements to DOM 60 | target.innerHTML = ''; 61 | target.appendChild(textarea); 62 | target.appendChild(highlightPre); 63 | highlightPre.appendChild(highlightCode); 64 | 65 | // Render initial code inside tag 66 | textarea.value = initialCode; 67 | this.renderOutput(highlightCode, textarea); 68 | 69 | Prism.highlightAll(); 70 | 71 | this.handleInput(textarea, highlightCode, highlightPre); 72 | this.handleScroll(textarea, highlightPre); 73 | 74 | } 75 | 76 | CodeFlask.prototype.renderOutput = function(highlightCode, input) { 77 | highlightCode.innerHTML = input.value.replace(/&/g, "&") 78 | .replace(//g, ">") + "\n"; 80 | } 81 | 82 | CodeFlask.prototype.handleInput = function(textarea, highlightCode, highlightPre) { 83 | var self = this, 84 | input, 85 | selStartPos, 86 | inputVal, 87 | roundedScroll; 88 | 89 | textarea.addEventListener('input', function(e) { 90 | input = this; 91 | 92 | self.renderOutput(highlightCode, input); 93 | 94 | Prism.highlightAll(); 95 | }); 96 | 97 | textarea.addEventListener('keydown', function(e) { 98 | input = this, 99 | selStartPos = input.selectionStart, 100 | inputVal = input.value; 101 | 102 | // If TAB pressed, insert four spaces 103 | if(e.keyCode === 9){ 104 | input.value = inputVal.substring(0, selStartPos) + " " + inputVal.substring(selStartPos, input.value.length); 105 | input.selectionStart = selStartPos + 4; 106 | input.selectionEnd = selStartPos + 4; 107 | e.preventDefault(); 108 | 109 | highlightCode.innerHTML = input.value.replace(/&/g, "&") 110 | .replace(//g, ">") + "\n"; 112 | Prism.highlightAll(); 113 | } 114 | }); 115 | } 116 | 117 | CodeFlask.prototype.handleScroll = function(textarea, highlightPre) { 118 | textarea.addEventListener('scroll', function(){ 119 | 120 | roundedScroll = Math.floor(this.scrollTop); 121 | 122 | // Fixes issue of desync text on mouse wheel, fuck Firefox. 123 | if(navigator.userAgent.toLowerCase().indexOf('firefox') < 0) { 124 | this.scrollTop = roundedScroll; 125 | } 126 | 127 | highlightPre.style.top = "-" + roundedScroll + "px"; 128 | }); 129 | } 130 | 131 | CodeFlask.prototype.handleLanguage = function(lang) { 132 | if(lang.match(/html|xml|xhtml|svg/)) { 133 | return 'markup'; 134 | } else if(lang.match(/js/)) { 135 | return 'javascript'; 136 | } else { 137 | return lang; 138 | } 139 | } 140 | 141 | CodeFlask.prototype.onUpdate = function(cb) { 142 | if(typeof(cb) == "function") { 143 | this.textarea.addEventListener('input', function(e) { 144 | cb(this.value); 145 | }); 146 | }else{ 147 | throw 'CodeFlask.js ERROR: onUpdate() expects function, ' + 148 | typeof(cb) + ' given instead.'; 149 | } 150 | } 151 | 152 | CodeFlask.prototype.update = function(string) { 153 | var evt = document.createEvent("HTMLEvents"); 154 | 155 | this.textarea.value = string; 156 | this.renderOutput(this.highlightCode, this.textarea); 157 | Prism.highlightAll(); 158 | 159 | evt.initEvent("input", false, true); 160 | this.textarea.dispatchEvent(evt); 161 | } 162 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RabbitMQ Performance App 2 | 3 | A simple way to test the performance of your RabbitMQ Service 4 | 5 | This project uses the [RabbitMQ Performance Testing Tool]( https://github.com/rabbitmq/rabbitmq-perf-test/ ) to run benchmarks and to graph the results. I created a simple spring app that gives you an easy way to run benchmarks and graph results from the convenience of your browser! 6 | 7 | ![Screenshot from the chrome](rmq-perf-app-screenshot.png) 8 | 9 | ## Run the Web App Server 10 | 11 | ### Docker 12 | ``` 13 | docker pull johnlonganecker/rmq-perf-app 14 | docker run -p 8080:8080 johnlonganecker/rmq-perf-app 15 | ``` 16 | 17 | ### Command Line 18 | **Download latest [release](https://github.com/johnlonganecker/rabbitmq-performance-app/releases)** 19 | ``` 20 | java -jar rmq-perf-app.jar 21 | ``` 22 | 23 | ### Cloud Foundry 24 | ``` 25 | mvn install 26 | cf push 27 | cf bind-service rabbitmq-perf-app rmq-service 28 | cf restage rabbitmq-perf-app 29 | ``` 30 | 31 | ## Releases 32 | Download from the [releases page](https://github.com/johnlonganecker/rabbitmq-performance-app/releases) 33 | 34 | ## Compile and Package 35 | **Have Maven and Java Installed** 36 | ``` 37 | mvn install 38 | mvn package 39 | ``` 40 | 41 | ## Take it out for a spin 42 | 43 | If you don't have a rabbitmq service running you can run one with docker 44 | ``` 45 | docker pull rabbitmq 46 | docker run -d -p 5672:5672 rabbitmq 47 | ``` 48 | 49 | Run the RabbitMQ Performance App 50 | ``` 51 | java -jar rmq-perf-app.jar 52 | ``` 53 | 54 | The server will use rabbitmq's default URI to connect to the docker container. If you need to set your own URI read below. 55 | 56 | You can find the WebApp at `localhost:8080` 57 | 58 | Enter a performance `Scenario config` and how you want to graph it by setting the `Graph Config` 59 | 60 | You can find the documentation for both scenarios and graphs from [this repo](https://github.com/rabbitmq/rabbitmq-perf-test/blob/aeead278089125753268fc61ab91caa155220459/html/README.md) 61 | 62 | ### Example Configs 63 | **Scenario** 64 | ``` 65 | { 66 | "name": "no-ack", 67 | "type": "simple", 68 | "params": [{"time-limit": 10}] 69 | } 70 | ``` 71 | **Graph** 72 | ``` 73 | { 74 | "type": "chart", 75 | "fields": { 76 | "data-type":"time", 77 | "data-x-axis":"time (s)", 78 | } 79 | } 80 | ``` 81 | ``` 82 | { 83 | "type": "small-chart", 84 | "fields": { 85 | "data-type":"time", 86 | "data-x-axis":"time (s)", 87 | } 88 | } 89 | ``` 90 | ``` 91 | { 92 | "type": "summary", 93 | "fields": {} 94 | } 95 | ``` 96 | ------ 97 | **Scenario** 98 | ``` 99 | { 100 | "name": "message-sizes-and-producers", 101 | "type": "varying", 102 | "params": [{"time-limit": 30, 103 | "consumer-count": 0}], 104 | "variables": [{"name": "min-msg-size", 105 | "values": [0, 1000, 10000, 100000]}, 106 | {"name": "producer-count", 107 | "values": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]}] 108 | } 109 | ``` 110 | 111 | **Graph** 112 | ``` 113 | { 114 | "type": "chart", 115 | "fields": { 116 | "data-type": "series", 117 | "data-x-key":"producerCount", 118 | "data-x-axis":"producers", 119 | "data-y-axis":"rate (msg/s)", 120 | "data-plot-key":"send-msg-rate", 121 | "data-series-key":"minMsgSize" 122 | } 123 | } 124 | ``` 125 | ------ 126 | **Scenario** 127 | ``` 128 | { 129 | "name": "message-sizes-large", 130 | "type": "varying", 131 | "params": [{"time-limit": 30}], 132 | "variables": [{"name": "min-msg-size", 133 | "values": [5000, 10000, 50000, 100000, 500000, 1000000]}] 134 | } 135 | ``` 136 | **Graph** 137 | ``` 138 | { 139 | "type": "chart", 140 | "fields": { 141 | "data-type": "x-y", 142 | "data-x-key":"minMsgSize", 143 | "data-plot-keys":"send-msg-rate send-bytes-rate", 144 | "data-x-axis":"message size (bytes)", 145 | "data-y-axis":"rate (msg/s)", 146 | "data-y-axis2":"rate (bytes/s)", 147 | "data-legend":"ne" 148 | } 149 | } 150 | ``` 151 | ------ 152 | **Scenario** 153 | ``` 154 | { 155 | "name": "rate-vs-latency", 156 | "type": "rate-vs-latency", 157 | "params": [{"time-limit": 30}] 158 | } 159 | ``` 160 | **Graph** 161 | ``` 162 | { 163 | "type": "chart", 164 | "fields": { 165 | "data-type":"r-l", 166 | "data-x-axis":"rate attempted (msg/s)", 167 | "data-y-axis":"rate (msg/s)" 168 | } 169 | } 170 | ``` 171 | 172 | ### Where do the host/user/pass/vhost get set? 173 | In the `scenario config` you can specify a `uri` like this: 174 | 175 | ``` 176 | "uri": "amqp://user:password@host:port/vhost" 177 | ``` 178 | 179 | **Cloud Foudry**
180 | If you bind a rabbitmq service (based on pivotal's rabbitmq release) to this app it will automatically get the credentials it needs to interact with rabbitmq. 181 | 182 | You can of course override those credentials by adding the `uri` field to the `scenario config` 183 | 184 | **Defaults**
185 | If no credentials are provided this app will use a default rabbitmq `uri` to connect to the service 186 | 187 | ## Report Bugs or Feature Requests 188 | Submit a github issue 189 | 190 | ## Contribute 191 | Feel free to do something cool or grab something from the Todo list and just submit a Pull Request :) 192 | 193 | ## ToDo 194 | - Make a bunch of useful examples 195 | - when creating new row have dialog box with pre-made exampels 196 | - examples endpoint (list examples for dialog box) 197 | - Make http server ports configurable through CLI 198 | - unit/smoke/integration tests 199 | - web app 200 | - spring server 201 | - Better Errors 202 | - UI Display 203 | - Messages from server 204 | - Store results 205 | - export results 206 | - import results 207 | - save results to PG/MySQL/other DB 208 | - store info of system with results? 209 | - number of nodes 210 | - policy 211 | - hostname (not full uri) 212 | -------------------------------------------------------------------------------- /src/main/java/com/johnlonganecker/Credentials.java: -------------------------------------------------------------------------------- 1 | 2 | package com.johnlonganecker; 3 | 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | import javax.annotation.Generated; 7 | import com.google.gson.annotations.Expose; 8 | import com.google.gson.annotations.SerializedName; 9 | import org.apache.commons.lang.builder.ToStringBuilder; 10 | 11 | @Generated("org.jsonschema2pojo") 12 | public class Credentials { 13 | 14 | @SerializedName("http_api_uris") 15 | @Expose 16 | private List httpApiUris = new ArrayList(); 17 | @SerializedName("ssl") 18 | @Expose 19 | private Boolean ssl; 20 | @SerializedName("dashboard_url") 21 | @Expose 22 | private String dashboardUrl; 23 | @SerializedName("password") 24 | @Expose 25 | private String password; 26 | @SerializedName("protocols") 27 | @Expose 28 | private Protocols protocols; 29 | @SerializedName("username") 30 | @Expose 31 | private String username; 32 | @SerializedName("hostname") 33 | @Expose 34 | private String hostname; 35 | @SerializedName("hostnames") 36 | @Expose 37 | private List hostnames = new ArrayList(); 38 | @SerializedName("vhost") 39 | @Expose 40 | private String vhost; 41 | @SerializedName("http_api_uri") 42 | @Expose 43 | private String httpApiUri; 44 | @SerializedName("uri") 45 | @Expose 46 | private String uri; 47 | @SerializedName("uris") 48 | @Expose 49 | private List uris = new ArrayList(); 50 | 51 | /** 52 | * 53 | * @return 54 | * The httpApiUris 55 | */ 56 | public List getHttpApiUris() { 57 | return httpApiUris; 58 | } 59 | 60 | /** 61 | * 62 | * @param httpApiUris 63 | * The http_api_uris 64 | */ 65 | public void setHttpApiUris(List httpApiUris) { 66 | this.httpApiUris = httpApiUris; 67 | } 68 | 69 | /** 70 | * 71 | * @return 72 | * The ssl 73 | */ 74 | public Boolean getSsl() { 75 | return ssl; 76 | } 77 | 78 | /** 79 | * 80 | * @param ssl 81 | * The ssl 82 | */ 83 | public void setSsl(Boolean ssl) { 84 | this.ssl = ssl; 85 | } 86 | 87 | /** 88 | * 89 | * @return 90 | * The dashboardUrl 91 | */ 92 | public String getDashboardUrl() { 93 | return dashboardUrl; 94 | } 95 | 96 | /** 97 | * 98 | * @param dashboardUrl 99 | * The dashboard_url 100 | */ 101 | public void setDashboardUrl(String dashboardUrl) { 102 | this.dashboardUrl = dashboardUrl; 103 | } 104 | 105 | /** 106 | * 107 | * @return 108 | * The password 109 | */ 110 | public String getPassword() { 111 | return password; 112 | } 113 | 114 | /** 115 | * 116 | * @param password 117 | * The password 118 | */ 119 | public void setPassword(String password) { 120 | this.password = password; 121 | } 122 | 123 | /** 124 | * 125 | * @return 126 | * The protocols 127 | */ 128 | public Protocols getProtocols() { 129 | return protocols; 130 | } 131 | 132 | /** 133 | * 134 | * @param protocols 135 | * The protocols 136 | */ 137 | public void setProtocols(Protocols protocols) { 138 | this.protocols = protocols; 139 | } 140 | 141 | /** 142 | * 143 | * @return 144 | * The username 145 | */ 146 | public String getUsername() { 147 | return username; 148 | } 149 | 150 | /** 151 | * 152 | * @param username 153 | * The username 154 | */ 155 | public void setUsername(String username) { 156 | this.username = username; 157 | } 158 | 159 | /** 160 | * 161 | * @return 162 | * The hostname 163 | */ 164 | public String getHostname() { 165 | return hostname; 166 | } 167 | 168 | /** 169 | * 170 | * @param hostname 171 | * The hostname 172 | */ 173 | public void setHostname(String hostname) { 174 | this.hostname = hostname; 175 | } 176 | 177 | /** 178 | * 179 | * @return 180 | * The hostnames 181 | */ 182 | public List getHostnames() { 183 | return hostnames; 184 | } 185 | 186 | /** 187 | * 188 | * @param hostnames 189 | * The hostnames 190 | */ 191 | public void setHostnames(List hostnames) { 192 | this.hostnames = hostnames; 193 | } 194 | 195 | /** 196 | * 197 | * @return 198 | * The vhost 199 | */ 200 | public String getVhost() { 201 | return vhost; 202 | } 203 | 204 | /** 205 | * 206 | * @param vhost 207 | * The vhost 208 | */ 209 | public void setVhost(String vhost) { 210 | this.vhost = vhost; 211 | } 212 | 213 | /** 214 | * 215 | * @return 216 | * The httpApiUri 217 | */ 218 | public String getHttpApiUri() { 219 | return httpApiUri; 220 | } 221 | 222 | /** 223 | * 224 | * @param httpApiUri 225 | * The http_api_uri 226 | */ 227 | public void setHttpApiUri(String httpApiUri) { 228 | this.httpApiUri = httpApiUri; 229 | } 230 | 231 | /** 232 | * 233 | * @return 234 | * The uri 235 | */ 236 | public String getUri() { 237 | return uri; 238 | } 239 | 240 | /** 241 | * 242 | * @param uri 243 | * The uri 244 | */ 245 | public void setUri(String uri) { 246 | this.uri = uri; 247 | } 248 | 249 | /** 250 | * 251 | * @return 252 | * The uris 253 | */ 254 | public List getUris() { 255 | return uris; 256 | } 257 | 258 | /** 259 | * 260 | * @param uris 261 | * The uris 262 | */ 263 | public void setUris(List uris) { 264 | this.uris = uris; 265 | } 266 | 267 | @Override 268 | public String toString() { 269 | return ToStringBuilder.reflectionToString(this); 270 | } 271 | 272 | } 273 | -------------------------------------------------------------------------------- /src/main/resources/static/perf.js: -------------------------------------------------------------------------------- 1 | function render_graphs(results, parentDomElement) { 2 | if(typeof parentDomElement === "undefined") { 3 | $('.chart, .small-chart').map(function() { 4 | plot($(this), results); 5 | }); 6 | $('.summary').map(function() { 7 | summarise($(this), results); 8 | }); 9 | } 10 | else { 11 | parentDomElement.find('.chart, .small-chart').map(function() { 12 | plot($(this), results); 13 | }); 14 | parentDomElement.find('.summary').map(function() { 15 | summarise($(this), results); 16 | }); 17 | } 18 | } 19 | 20 | function summarise(div, results) { 21 | var scenario = div.attr('data-scenario'); 22 | var mode = div.attr('data-mode'); 23 | var data = results[scenario]; 24 | 25 | var rate; 26 | if (mode == 'send') { 27 | rate = Math.round(data['send-msg-rate']); 28 | } 29 | else if (mode == 'recv') { 30 | rate = Math.round(data['recv-msg-rate']); 31 | } 32 | else { 33 | rate = Math.round((data['send-msg-rate'] + data['recv-msg-rate']) / 2); 34 | } 35 | 36 | div.append('' + rate + 'msg/s'); 37 | } 38 | 39 | function plot(div, results) { 40 | var file = div.attr('data-file'); 41 | 42 | if (file == undefined) { 43 | plot0(div, results); 44 | } 45 | else { 46 | $.ajax({ 47 | url: file, 48 | success: function(data) { 49 | plot0(div, JSON.parse(data)); 50 | }, 51 | fail: function() { alert('error loading ' + file); } 52 | }); 53 | } 54 | } 55 | 56 | function plot0(div, results) { 57 | var type = div.attr('data-type'); 58 | var scenario = div.attr('data-scenario'); 59 | 60 | if (type == 'time') { 61 | var data = results[scenario]; 62 | plot_time(div, data); 63 | } 64 | else { 65 | var dimensions = results[scenario]['dimensions']; 66 | var dimension_values = results[scenario]['dimension-values']; 67 | var data = results[scenario]['data']; 68 | 69 | if (type == 'series') { 70 | plot_series(div, dimensions, dimension_values, data); 71 | } 72 | else if (type == 'x-y') { 73 | plot_x_y(div, dimensions, dimension_values, data); 74 | } 75 | else if (type == 'r-l') { 76 | plot_r_l(div, dimensions, dimension_values, data); 77 | } 78 | } 79 | } 80 | 81 | function plot_time(div, data) { 82 | var show_latency = div.attr('data-latency') == 'true'; 83 | var chart_data = []; 84 | var keys = show_latency 85 | ? ['send-msg-rate', 'recv-msg-rate', 'avg-latency'] 86 | : ['send-msg-rate', 'recv-msg-rate']; 87 | $.each(keys, function(i, plot_key) { 88 | var d = []; 89 | $.each(data['samples'], function(j, sample) { 90 | d.push([sample['elapsed'] / 1000, sample[plot_key]]); 91 | }); 92 | var yaxis = (plot_key.indexOf('latency') == -1 ? 1 : 2); 93 | chart_data.push({label: plot_key, data: d, yaxis: yaxis}); 94 | }); 95 | 96 | plot_data(div, chart_data, {yaxes: axes_rate_and_latency}); 97 | } 98 | 99 | function plot_series(div, dimensions, dimension_values, data) { 100 | var x_key = div.attr('data-x-key'); 101 | var series_key = div.attr('data-series-key'); 102 | var series_first = dimensions[0] == series_key; 103 | var series_values = dimension_values[series_key]; 104 | var x_values = dimension_values[x_key]; 105 | var plot_key = attr_or_default(div, 'plot-key', 'send-msg-rate'); 106 | 107 | var chart_data = []; 108 | $.each(series_values, function(i, s_val) { 109 | var d = []; 110 | $.each(x_values, function(j, x_val) { 111 | var val = series_first ? data[s_val][x_val] : 112 | data[x_val][s_val]; 113 | d.push([x_val, val[plot_key]]); 114 | }); 115 | chart_data.push({label: series_key + ' = ' + s_val, data: d}); 116 | }); 117 | 118 | plot_data(div, chart_data); 119 | } 120 | 121 | function plot_x_y(div, dimensions, dimension_values, data) { 122 | var x_key = div.attr('data-x-key'); 123 | var x_values = dimension_values[x_key]; 124 | var plot_keys = attr_or_default(div, 'plot-keys', 'send-msg-rate').split(' '); 125 | var chart_data = []; 126 | var extra = {}; 127 | $.each(plot_keys, function(i, plot_key) { 128 | var d = []; 129 | $.each(x_values, function(j, x_val) { 130 | d.push([x_val, data[x_val][plot_key]]); 131 | }); 132 | var yaxis = 1; 133 | if (plot_key.indexOf('bytes') != -1) { 134 | yaxis = 2; 135 | extra = {yaxes: axes_rate_and_bytes}; 136 | } 137 | chart_data.push({label: plot_key, data: d, yaxis: yaxis}); 138 | }); 139 | plot_data(div, chart_data, extra); 140 | } 141 | 142 | function plot_r_l(div, dimensions, dimension_values, data) { 143 | var x_values = dimension_values['producerRateLimit']; 144 | 145 | var chart_data = []; 146 | var d = []; 147 | $.each(x_values, function(i, x_val) { 148 | d.push([x_val, data[x_val]['send-msg-rate']]); 149 | }); 150 | chart_data.push({label: 'rate achieved', data: d, yaxis: 1}); 151 | 152 | d = []; 153 | $.each(x_values, function(i, x_val) { 154 | d.push([x_val, data[x_val]['avg-latency']]); 155 | }); 156 | chart_data.push({label: 'latency (us)', data: d, yaxis: 2}); 157 | 158 | plot_data(div, chart_data, {yaxes: axes_rate_and_latency}); 159 | } 160 | 161 | function plot_data(div, chart_data, extra) { 162 | var legend = attr_or_default(div, 'legend', 'se'); 163 | var x_axis_log = attr_or_default(div, 'x-axis-log', 'false') == 'true'; 164 | var cssClass = div.attr('class'); 165 | 166 | var chrome = { 167 | series: { lines: { show: true } }, 168 | grid: { borderWidth: 2, borderColor: "#aaa" }, 169 | xaxis: { tickColor: "#fff" }, 170 | yaxis: { tickColor: "#eee" }, 171 | legend: { position: legend, backgroundOpacity: 0.5 } 172 | }; 173 | 174 | if (div.attr('class') == 'small-chart') { 175 | chrome['legend'] = { show: false }; 176 | } 177 | 178 | if (extra != undefined) { 179 | for (var k in extra) { 180 | chrome[k] = extra[k]; 181 | } 182 | } 183 | 184 | if (x_axis_log) { 185 | chrome['xaxis'] = log_x_axis; 186 | } 187 | 188 | var cell = div.wrap('').parent();; 189 | var row = cell.wrap('').parent(); 190 | row.wrap(''); 191 | 192 | cell.before(''); 193 | if (div.attr('data-y-axis2')) { 194 | cell.after(''); 195 | } 196 | row.after(''); 198 | 199 | $.plot(div, chart_data, chrome); 200 | } 201 | 202 | function log_transform(v) { 203 | return Math.log(v); 204 | } 205 | 206 | function log_ticks(axis) { 207 | var val = axis.min; 208 | var res = [val]; 209 | while (val < axis.max) { 210 | val *= 10; 211 | res.push(val); 212 | } 213 | return res; 214 | } 215 | 216 | function attr_or_default(div, key, def) { 217 | var res = div.attr('data-' + key); 218 | return res == undefined ? def : res; 219 | } 220 | 221 | var axes_rate_and_latency = [{min: 0}, 222 | {min: 100, 223 | transform: log_transform, 224 | ticks: log_ticks, 225 | position: "right"}]; 226 | 227 | var axes_rate_and_bytes = [{min: 0}, 228 | {min: 0, 229 | position: "right"}]; 230 | 231 | var log_x_axis = {min: 1, 232 | transform: log_transform, 233 | ticks: log_ticks}; 234 | -------------------------------------------------------------------------------- /src/main/resources/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | RabbitMQ Performance 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 119 | 291 | 292 | 293 |

RabbitMQ Performance Tests

294 |
295 |

Add Row

296 | 297 | 298 | -------------------------------------------------------------------------------- /src/main/resources/static/lib/excanvas.min.js: -------------------------------------------------------------------------------- 1 | if(!document.createElement("canvas").getContext){(function(){var z=Math;var K=z.round;var J=z.sin;var U=z.cos;var b=z.abs;var k=z.sqrt;var D=10;var F=D/2;function T(){return this.context_||(this.context_=new W(this))}var O=Array.prototype.slice;function G(i,j,m){var Z=O.call(arguments,2);return function(){return i.apply(j,Z.concat(O.call(arguments)))}}function AD(Z){return String(Z).replace(/&/g,"&").replace(/"/g,""")}function r(i){if(!i.namespaces.g_vml_){i.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML")}if(!i.namespaces.g_o_){i.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML")}if(!i.styleSheets.ex_canvas_){var Z=i.createStyleSheet();Z.owningElement.id="ex_canvas_";Z.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}"}}r(document);var E={init:function(Z){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var i=Z||document;i.createElement("canvas");i.attachEvent("onreadystatechange",G(this.init_,this,i))}},init_:function(m){var j=m.getElementsByTagName("canvas");for(var Z=0;Z1){j--}if(6*j<1){return i+(Z-i)*6*j}else{if(2*j<1){return Z}else{if(3*j<2){return i+(Z-i)*(2/3-j)*6}else{return i}}}}function Y(Z){var AE,p=1;Z=String(Z);if(Z.charAt(0)=="#"){AE=Z}else{if(/^rgb/.test(Z)){var m=g(Z);var AE="#",AF;for(var j=0;j<3;j++){if(m[j].indexOf("%")!=-1){AF=Math.floor(C(m[j])*255)}else{AF=Number(m[j])}AE+=I[N(AF,0,255)]}p=m[3]}else{if(/^hsl/.test(Z)){var m=g(Z);AE=c(m);p=m[3]}else{AE=B[Z]||Z}}}return{color:AE,alpha:p}}var L={style:"normal",variant:"normal",weight:"normal",size:10,family:"sans-serif"};var f={};function X(Z){if(f[Z]){return f[Z]}var m=document.createElement("div");var j=m.style;try{j.font=Z}catch(i){}return f[Z]={style:j.fontStyle||L.style,variant:j.fontVariant||L.variant,weight:j.fontWeight||L.weight,size:j.fontSize||L.size,family:j.fontFamily||L.family}}function P(j,i){var Z={};for(var AF in j){Z[AF]=j[AF]}var AE=parseFloat(i.currentStyle.fontSize),m=parseFloat(j.size);if(typeof j.size=="number"){Z.size=j.size}else{if(j.size.indexOf("px")!=-1){Z.size=m}else{if(j.size.indexOf("em")!=-1){Z.size=AE*m}else{if(j.size.indexOf("%")!=-1){Z.size=(AE/100)*m}else{if(j.size.indexOf("pt")!=-1){Z.size=m/0.75}else{Z.size=AE}}}}}Z.size*=0.981;return Z}function AA(Z){return Z.style+" "+Z.variant+" "+Z.weight+" "+Z.size+"px "+Z.family}function t(Z){switch(Z){case"butt":return"flat";case"round":return"round";case"square":default:return"square"}}function W(i){this.m_=V();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=D*1;this.globalAlpha=1;this.font="10px sans-serif";this.textAlign="left";this.textBaseline="alphabetic";this.canvas=i;var Z=i.ownerDocument.createElement("div");Z.style.width=i.clientWidth+"px";Z.style.height=i.clientHeight+"px";Z.style.overflow="hidden";Z.style.position="absolute";i.appendChild(Z);this.element_=Z;this.arcScaleX_=1;this.arcScaleY_=1;this.lineScale_=1}var M=W.prototype;M.clearRect=function(){if(this.textMeasureEl_){this.textMeasureEl_.removeNode(true);this.textMeasureEl_=null}this.element_.innerHTML=""};M.beginPath=function(){this.currentPath_=[]};M.moveTo=function(i,Z){var j=this.getCoords_(i,Z);this.currentPath_.push({type:"moveTo",x:j.x,y:j.y});this.currentX_=j.x;this.currentY_=j.y};M.lineTo=function(i,Z){var j=this.getCoords_(i,Z);this.currentPath_.push({type:"lineTo",x:j.x,y:j.y});this.currentX_=j.x;this.currentY_=j.y};M.bezierCurveTo=function(j,i,AI,AH,AG,AE){var Z=this.getCoords_(AG,AE);var AF=this.getCoords_(j,i);var m=this.getCoords_(AI,AH);e(this,AF,m,Z)};function e(Z,m,j,i){Z.currentPath_.push({type:"bezierCurveTo",cp1x:m.x,cp1y:m.y,cp2x:j.x,cp2y:j.y,x:i.x,y:i.y});Z.currentX_=i.x;Z.currentY_=i.y}M.quadraticCurveTo=function(AG,j,i,Z){var AF=this.getCoords_(AG,j);var AE=this.getCoords_(i,Z);var AH={x:this.currentX_+2/3*(AF.x-this.currentX_),y:this.currentY_+2/3*(AF.y-this.currentY_)};var m={x:AH.x+(AE.x-this.currentX_)/3,y:AH.y+(AE.y-this.currentY_)/3};e(this,AH,m,AE)};M.arc=function(AJ,AH,AI,AE,i,j){AI*=D;var AN=j?"at":"wa";var AK=AJ+U(AE)*AI-F;var AM=AH+J(AE)*AI-F;var Z=AJ+U(i)*AI-F;var AL=AH+J(i)*AI-F;if(AK==Z&&!j){AK+=0.125}var m=this.getCoords_(AJ,AH);var AG=this.getCoords_(AK,AM);var AF=this.getCoords_(Z,AL);this.currentPath_.push({type:AN,x:m.x,y:m.y,radius:AI,xStart:AG.x,yStart:AG.y,xEnd:AF.x,yEnd:AF.y})};M.rect=function(j,i,Z,m){this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath()};M.strokeRect=function(j,i,Z,m){var p=this.currentPath_;this.beginPath();this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath();this.stroke();this.currentPath_=p};M.fillRect=function(j,i,Z,m){var p=this.currentPath_;this.beginPath();this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath();this.fill();this.currentPath_=p};M.createLinearGradient=function(i,m,Z,j){var p=new v("gradient");p.x0_=i;p.y0_=m;p.x1_=Z;p.y1_=j;return p};M.createRadialGradient=function(m,AE,j,i,p,Z){var AF=new v("gradientradial");AF.x0_=m;AF.y0_=AE;AF.r0_=j;AF.x1_=i;AF.y1_=p;AF.r1_=Z;return AF};M.drawImage=function(AO,j){var AH,AF,AJ,AV,AM,AK,AQ,AX;var AI=AO.runtimeStyle.width;var AN=AO.runtimeStyle.height;AO.runtimeStyle.width="auto";AO.runtimeStyle.height="auto";var AG=AO.width;var AT=AO.height;AO.runtimeStyle.width=AI;AO.runtimeStyle.height=AN;if(arguments.length==3){AH=arguments[1];AF=arguments[2];AM=AK=0;AQ=AJ=AG;AX=AV=AT}else{if(arguments.length==5){AH=arguments[1];AF=arguments[2];AJ=arguments[3];AV=arguments[4];AM=AK=0;AQ=AG;AX=AT}else{if(arguments.length==9){AM=arguments[1];AK=arguments[2];AQ=arguments[3];AX=arguments[4];AH=arguments[5];AF=arguments[6];AJ=arguments[7];AV=arguments[8]}else{throw Error("Invalid number of arguments")}}}var AW=this.getCoords_(AH,AF);var m=AQ/2;var i=AX/2;var AU=[];var Z=10;var AE=10;AU.push(" ','","");this.element_.insertAdjacentHTML("BeforeEnd",AU.join(""))};M.stroke=function(AM){var m=10;var AN=10;var AE=5000;var AG={x:null,y:null};var AL={x:null,y:null};for(var AH=0;AHAL.x){AL.x=Z.x}if(AG.y==null||Z.yAL.y){AL.y=Z.y}}}AK.push(' ">');if(!AM){R(this,AK)}else{a(this,AK,AG,AL)}AK.push("");this.element_.insertAdjacentHTML("beforeEnd",AK.join(""))}};function R(j,AE){var i=Y(j.strokeStyle);var m=i.color;var p=i.alpha*j.globalAlpha;var Z=j.lineScale_*j.lineWidth;if(Z<1){p*=Z}AE.push("')}function a(AO,AG,Ah,AP){var AH=AO.fillStyle;var AY=AO.arcScaleX_;var AX=AO.arcScaleY_;var Z=AP.x-Ah.x;var m=AP.y-Ah.y;if(AH instanceof v){var AL=0;var Ac={x:0,y:0};var AU=0;var AK=1;if(AH.type_=="gradient"){var AJ=AH.x0_/AY;var j=AH.y0_/AX;var AI=AH.x1_/AY;var Aj=AH.y1_/AX;var Ag=AO.getCoords_(AJ,j);var Af=AO.getCoords_(AI,Aj);var AE=Af.x-Ag.x;var p=Af.y-Ag.y;AL=Math.atan2(AE,p)*180/Math.PI;if(AL<0){AL+=360}if(AL<0.000001){AL=0}}else{var Ag=AO.getCoords_(AH.x0_,AH.y0_);Ac={x:(Ag.x-Ah.x)/Z,y:(Ag.y-Ah.y)/m};Z/=AY*D;m/=AX*D;var Aa=z.max(Z,m);AU=2*AH.r0_/Aa;AK=2*AH.r1_/Aa-AU}var AS=AH.colors_;AS.sort(function(Ak,i){return Ak.offset-i.offset});var AN=AS.length;var AR=AS[0].color;var AQ=AS[AN-1].color;var AW=AS[0].alpha*AO.globalAlpha;var AV=AS[AN-1].alpha*AO.globalAlpha;var Ab=[];for(var Ae=0;Ae')}else{if(AH instanceof u){if(Z&&m){var AF=-Ah.x;var AZ=-Ah.y;AG.push("')}}else{var Ai=Y(AO.fillStyle);var AT=Ai.color;var Ad=Ai.alpha*AO.globalAlpha;AG.push('')}}}M.fill=function(){this.stroke(true)};M.closePath=function(){this.currentPath_.push({type:"close"})};M.getCoords_=function(j,i){var Z=this.m_;return{x:D*(j*Z[0][0]+i*Z[1][0]+Z[2][0])-F,y:D*(j*Z[0][1]+i*Z[1][1]+Z[2][1])-F}};M.save=function(){var Z={};Q(this,Z);this.aStack_.push(Z);this.mStack_.push(this.m_);this.m_=d(V(),this.m_)};M.restore=function(){if(this.aStack_.length){Q(this.aStack_.pop(),this);this.m_=this.mStack_.pop()}};function H(Z){return isFinite(Z[0][0])&&isFinite(Z[0][1])&&isFinite(Z[1][0])&&isFinite(Z[1][1])&&isFinite(Z[2][0])&&isFinite(Z[2][1])}function y(i,Z,j){if(!H(Z)){return }i.m_=Z;if(j){var p=Z[0][0]*Z[1][1]-Z[0][1]*Z[1][0];i.lineScale_=k(b(p))}}M.translate=function(j,i){var Z=[[1,0,0],[0,1,0],[j,i,1]];y(this,d(Z,this.m_),false)};M.rotate=function(i){var m=U(i);var j=J(i);var Z=[[m,j,0],[-j,m,0],[0,0,1]];y(this,d(Z,this.m_),false)};M.scale=function(j,i){this.arcScaleX_*=j;this.arcScaleY_*=i;var Z=[[j,0,0],[0,i,0],[0,0,1]];y(this,d(Z,this.m_),true)};M.transform=function(p,m,AF,AE,i,Z){var j=[[p,m,0],[AF,AE,0],[i,Z,1]];y(this,d(j,this.m_),true)};M.setTransform=function(AE,p,AG,AF,j,i){var Z=[[AE,p,0],[AG,AF,0],[j,i,1]];y(this,Z,true)};M.drawText_=function(AK,AI,AH,AN,AG){var AM=this.m_,AQ=1000,i=0,AP=AQ,AF={x:0,y:0},AE=[];var Z=P(X(this.font),this.element_);var j=AA(Z);var AR=this.element_.currentStyle;var p=this.textAlign.toLowerCase();switch(p){case"left":case"center":case"right":break;case"end":p=AR.direction=="ltr"?"right":"left";break;case"start":p=AR.direction=="rtl"?"right":"left";break;default:p="left"}switch(this.textBaseline){case"hanging":case"top":AF.y=Z.size/1.75;break;case"middle":break;default:case null:case"alphabetic":case"ideographic":case"bottom":AF.y=-Z.size/2.25;break}switch(p){case"right":i=AQ;AP=0.05;break;case"center":i=AP=AQ/2;break}var AO=this.getCoords_(AI+AF.x,AH+AF.y);AE.push('');if(AG){R(this,AE)}else{a(this,AE,{x:-i,y:0},{x:AP,y:Z.size})}var AL=AM[0][0].toFixed(3)+","+AM[1][0].toFixed(3)+","+AM[0][1].toFixed(3)+","+AM[1][1].toFixed(3)+",0,0";var AJ=K(AO.x/D)+","+K(AO.y/D);AE.push('','','');this.element_.insertAdjacentHTML("beforeEnd",AE.join(""))};M.fillText=function(j,Z,m,i){this.drawText_(j,Z,m,i,false)};M.strokeText=function(j,Z,m,i){this.drawText_(j,Z,m,i,true)};M.measureText=function(j){if(!this.textMeasureEl_){var Z='';this.element_.insertAdjacentHTML("beforeEnd",Z);this.textMeasureEl_=this.element_.lastChild}var i=this.element_.ownerDocument;this.textMeasureEl_.innerHTML="";this.textMeasureEl_.style.font=this.font;this.textMeasureEl_.appendChild(i.createTextNode(j));return{width:this.textMeasureEl_.offsetWidth}};M.clip=function(){};M.arcTo=function(){};M.createPattern=function(i,Z){return new u(i,Z)};function v(Z){this.type_=Z;this.x0_=0;this.y0_=0;this.r0_=0;this.x1_=0;this.y1_=0;this.r1_=0;this.colors_=[]}v.prototype.addColorStop=function(i,Z){Z=Y(Z);this.colors_.push({offset:i,color:Z.color,alpha:Z.alpha})};function u(i,Z){q(i);switch(Z){case"repeat":case null:case"":this.repetition_="repeat";break;case"repeat-x":case"repeat-y":case"no-repeat":this.repetition_=Z;break;default:n("SYNTAX_ERR")}this.src_=i.src;this.width_=i.width;this.height_=i.height}function n(Z){throw new o(Z)}function q(Z){if(!Z||Z.nodeType!=1||Z.tagName!="IMG"){n("TYPE_MISMATCH_ERR")}if(Z.readyState!="complete"){n("INVALID_STATE_ERR")}}function o(Z){this.code=this[Z];this.message=Z+": DOM Exception "+this.code}var x=o.prototype=new Error;x.INDEX_SIZE_ERR=1;x.DOMSTRING_SIZE_ERR=2;x.HIERARCHY_REQUEST_ERR=3;x.WRONG_DOCUMENT_ERR=4;x.INVALID_CHARACTER_ERR=5;x.NO_DATA_ALLOWED_ERR=6;x.NO_MODIFICATION_ALLOWED_ERR=7;x.NOT_FOUND_ERR=8;x.NOT_SUPPORTED_ERR=9;x.INUSE_ATTRIBUTE_ERR=10;x.INVALID_STATE_ERR=11;x.SYNTAX_ERR=12;x.INVALID_MODIFICATION_ERR=13;x.NAMESPACE_ERR=14;x.INVALID_ACCESS_ERR=15;x.VALIDATION_ERR=16;x.TYPE_MISMATCH_ERR=17;G_vmlCanvasManager=E;CanvasRenderingContext2D=W;CanvasGradient=v;CanvasPattern=u;DOMException=o})()}; -------------------------------------------------------------------------------- /src/main/resources/static/lib/prism.js: -------------------------------------------------------------------------------- 1 | 2 | /* ********************************************** 3 | Begin prism-core.js 4 | ********************************************** */ 5 | 6 | var _self = (typeof window !== 'undefined') 7 | ? window // if in browser 8 | : ( 9 | (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) 10 | ? self // if in worker 11 | : {} // if in node js 12 | ); 13 | 14 | /** 15 | * Prism: Lightweight, robust, elegant syntax highlighting 16 | * MIT license http://www.opensource.org/licenses/mit-license.php/ 17 | * @author Lea Verou http://lea.verou.me 18 | */ 19 | 20 | var Prism = (function(){ 21 | 22 | // Private helper vars 23 | var lang = /\blang(?:uage)?-(?!\*)(\w+)\b/i; 24 | 25 | var _ = _self.Prism = { 26 | util: { 27 | encode: function (tokens) { 28 | if (tokens instanceof Token) { 29 | return new Token(tokens.type, _.util.encode(tokens.content), tokens.alias); 30 | } else if (_.util.type(tokens) === 'Array') { 31 | return tokens.map(_.util.encode); 32 | } else { 33 | return tokens.replace(/&/g, '&').replace(/ text.length) { 275 | // Something went terribly wrong, ABORT, ABORT! 276 | break tokenloop; 277 | } 278 | 279 | if (str instanceof Token) { 280 | continue; 281 | } 282 | 283 | pattern.lastIndex = 0; 284 | 285 | var match = pattern.exec(str); 286 | 287 | if (match) { 288 | if(lookbehind) { 289 | lookbehindLength = match[1].length; 290 | } 291 | 292 | var from = match.index - 1 + lookbehindLength, 293 | match = match[0].slice(lookbehindLength), 294 | len = match.length, 295 | to = from + len, 296 | before = str.slice(0, from + 1), 297 | after = str.slice(to + 1); 298 | 299 | var args = [i, 1]; 300 | 301 | if (before) { 302 | args.push(before); 303 | } 304 | 305 | var wrapped = new Token(token, inside? _.tokenize(match, inside) : match, alias); 306 | 307 | args.push(wrapped); 308 | 309 | if (after) { 310 | args.push(after); 311 | } 312 | 313 | Array.prototype.splice.apply(strarr, args); 314 | } 315 | } 316 | } 317 | } 318 | 319 | return strarr; 320 | }, 321 | 322 | hooks: { 323 | all: {}, 324 | 325 | add: function (name, callback) { 326 | var hooks = _.hooks.all; 327 | 328 | hooks[name] = hooks[name] || []; 329 | 330 | hooks[name].push(callback); 331 | }, 332 | 333 | run: function (name, env) { 334 | var callbacks = _.hooks.all[name]; 335 | 336 | if (!callbacks || !callbacks.length) { 337 | return; 338 | } 339 | 340 | for (var i=0, callback; callback = callbacks[i++];) { 341 | callback(env); 342 | } 343 | } 344 | } 345 | }; 346 | 347 | var Token = _.Token = function(type, content, alias) { 348 | this.type = type; 349 | this.content = content; 350 | this.alias = alias; 351 | }; 352 | 353 | Token.stringify = function(o, language, parent) { 354 | if (typeof o == 'string') { 355 | return o; 356 | } 357 | 358 | if (_.util.type(o) === 'Array') { 359 | return o.map(function(element) { 360 | return Token.stringify(element, language, o); 361 | }).join(''); 362 | } 363 | 364 | var env = { 365 | type: o.type, 366 | content: Token.stringify(o.content, language, parent), 367 | tag: 'span', 368 | classes: ['token', o.type], 369 | attributes: {}, 370 | language: language, 371 | parent: parent 372 | }; 373 | 374 | if (env.type == 'comment') { 375 | env.attributes['spellcheck'] = 'true'; 376 | } 377 | 378 | if (o.alias) { 379 | var aliases = _.util.type(o.alias) === 'Array' ? o.alias : [o.alias]; 380 | Array.prototype.push.apply(env.classes, aliases); 381 | } 382 | 383 | _.hooks.run('wrap', env); 384 | 385 | var attributes = ''; 386 | 387 | for (var name in env.attributes) { 388 | attributes += name + '="' + (env.attributes[name] || '') + '"'; 389 | } 390 | 391 | return '<' + env.tag + ' class="' + env.classes.join(' ') + '" ' + attributes + '>' + env.content + ''; 392 | 393 | }; 394 | 395 | if (!_self.document) { 396 | if (!_self.addEventListener) { 397 | // in Node.js 398 | return _self.Prism; 399 | } 400 | // In worker 401 | _self.addEventListener('message', function(evt) { 402 | var message = JSON.parse(evt.data), 403 | lang = message.language, 404 | code = message.code; 405 | 406 | _self.postMessage(JSON.stringify(_.util.encode(_.tokenize(code, _.languages[lang])))); 407 | _self.close(); 408 | }, false); 409 | 410 | return _self.Prism; 411 | } 412 | 413 | // Get current script and highlight 414 | var script = document.getElementsByTagName('script'); 415 | 416 | script = script[script.length - 1]; 417 | 418 | if (script) { 419 | _.filename = script.src; 420 | 421 | if (document.addEventListener && !script.hasAttribute('data-manual')) { 422 | document.addEventListener('DOMContentLoaded', _.highlightAll); 423 | } 424 | } 425 | 426 | return _self.Prism; 427 | 428 | })(); 429 | 430 | if (typeof module !== 'undefined' && module.exports) { 431 | module.exports = Prism; 432 | } 433 | 434 | 435 | /* ********************************************** 436 | Begin prism-markup.js 437 | ********************************************** */ 438 | 439 | Prism.languages.markup = { 440 | 'comment': //, 441 | 'prolog': /<\?[\w\W]+?\?>/, 442 | 'doctype': //, 443 | 'cdata': //i, 444 | 'tag': { 445 | pattern: /<\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i, 446 | inside: { 447 | 'tag': { 448 | pattern: /^<\/?[^\s>\/]+/i, 449 | inside: { 450 | 'punctuation': /^<\/?/, 451 | 'namespace': /^[^\s>\/:]+:/ 452 | } 453 | }, 454 | 'attr-value': { 455 | pattern: /=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i, 456 | inside: { 457 | 'punctuation': /[=>"']/ 458 | } 459 | }, 460 | 'punctuation': /\/?>/, 461 | 'attr-name': { 462 | pattern: /[^\s>\/]+/, 463 | inside: { 464 | 'namespace': /^[^\s>\/:]+:/ 465 | } 466 | } 467 | 468 | } 469 | }, 470 | 'entity': /&#?[\da-z]{1,8};/i 471 | }; 472 | 473 | // Plugin to make entity title show the real entity, idea by Roman Komarov 474 | Prism.hooks.add('wrap', function(env) { 475 | 476 | if (env.type === 'entity') { 477 | env.attributes['title'] = env.content.replace(/&/, '&'); 478 | } 479 | }); 480 | 481 | 482 | /* ********************************************** 483 | Begin prism-css.js 484 | ********************************************** */ 485 | 486 | Prism.languages.css = { 487 | 'comment': /\/\*[\w\W]*?\*\//, 488 | 'atrule': { 489 | pattern: /@[\w-]+?.*?(;|(?=\s*\{))/i, 490 | inside: { 491 | 'rule': /@[\w-]+/ 492 | // See rest below 493 | } 494 | }, 495 | 'url': /url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i, 496 | 'selector': /[^\{\}\s][^\{\};]*?(?=\s*\{)/, 497 | 'string': /("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/, 498 | 'property': /(\b|\B)[\w-]+(?=\s*:)/i, 499 | 'important': /\B!important\b/i, 500 | 'function': /[-a-z0-9]+(?=\()/i, 501 | 'punctuation': /[(){};:]/ 502 | }; 503 | 504 | Prism.languages.css['atrule'].inside.rest = Prism.util.clone(Prism.languages.css); 505 | 506 | if (Prism.languages.markup) { 507 | Prism.languages.insertBefore('markup', 'tag', { 508 | 'style': { 509 | pattern: /[\w\W]*?<\/style>/i, 510 | inside: { 511 | 'tag': { 512 | pattern: /|<\/style>/i, 513 | inside: Prism.languages.markup.tag.inside 514 | }, 515 | rest: Prism.languages.css 516 | }, 517 | alias: 'language-css' 518 | } 519 | }); 520 | 521 | Prism.languages.insertBefore('inside', 'attr-value', { 522 | 'style-attr': { 523 | pattern: /\s*style=("|').*?\1/i, 524 | inside: { 525 | 'attr-name': { 526 | pattern: /^\s*style/i, 527 | inside: Prism.languages.markup.tag.inside 528 | }, 529 | 'punctuation': /^\s*=\s*['"]|['"]\s*$/, 530 | 'attr-value': { 531 | pattern: /.+/i, 532 | inside: Prism.languages.css 533 | } 534 | }, 535 | alias: 'language-css' 536 | } 537 | }, Prism.languages.markup.tag); 538 | } 539 | 540 | /* ********************************************** 541 | Begin prism-clike.js 542 | ********************************************** */ 543 | 544 | Prism.languages.clike = { 545 | 'comment': [ 546 | { 547 | pattern: /(^|[^\\])\/\*[\w\W]*?\*\//, 548 | lookbehind: true 549 | }, 550 | { 551 | pattern: /(^|[^\\:])\/\/.*/, 552 | lookbehind: true 553 | } 554 | ], 555 | 'string': /("|')(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, 556 | 'class-name': { 557 | pattern: /((?:(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i, 558 | lookbehind: true, 559 | inside: { 560 | punctuation: /(\.|\\)/ 561 | } 562 | }, 563 | 'keyword': /\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/, 564 | 'boolean': /\b(true|false)\b/, 565 | 'function': /[a-z0-9_]+(?=\()/i, 566 | 'number': /\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?)\b/, 567 | 'operator': /[-+]{1,2}|!|<=?|>=?|={1,3}|&{1,2}|\|?\||\?|\*|\/|~|\^|%/, 568 | 'punctuation': /[{}[\];(),.:]/ 569 | }; 570 | 571 | 572 | /* ********************************************** 573 | Begin prism-javascript.js 574 | ********************************************** */ 575 | 576 | Prism.languages.javascript = Prism.languages.extend('clike', { 577 | 'keyword': /\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/, 578 | 'number': /\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/, 579 | 'function': /(?!\d)[a-z0-9_$]+(?=\()/i 580 | }); 581 | 582 | Prism.languages.insertBefore('javascript', 'keyword', { 583 | 'regex': { 584 | pattern: /(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/, 585 | lookbehind: true 586 | } 587 | }); 588 | 589 | Prism.languages.insertBefore('javascript', 'class-name', { 590 | 'template-string': { 591 | pattern: /`(?:\\`|\\?[^`])*`/, 592 | inside: { 593 | 'interpolation': { 594 | pattern: /\$\{[^}]+\}/, 595 | inside: { 596 | 'interpolation-punctuation': { 597 | pattern: /^\$\{|\}$/, 598 | alias: 'punctuation' 599 | }, 600 | rest: Prism.languages.javascript 601 | } 602 | }, 603 | 'string': /[\s\S]+/ 604 | } 605 | } 606 | }); 607 | 608 | if (Prism.languages.markup) { 609 | Prism.languages.insertBefore('markup', 'tag', { 610 | 'script': { 611 | pattern: /[\w\W]*?<\/script>/i, 612 | inside: { 613 | 'tag': { 614 | pattern: /|<\/script>/i, 615 | inside: Prism.languages.markup.tag.inside 616 | }, 617 | rest: Prism.languages.javascript 618 | }, 619 | alias: 'language-javascript' 620 | } 621 | }); 622 | } 623 | 624 | 625 | /* ********************************************** 626 | Begin prism-file-highlight.js 627 | ********************************************** */ 628 | 629 | (function () { 630 | if (!self.Prism || !self.document || !document.querySelector) { 631 | return; 632 | } 633 | 634 | self.Prism.fileHighlight = function() { 635 | 636 | var Extensions = { 637 | 'js': 'javascript', 638 | 'html': 'markup', 639 | 'svg': 'markup', 640 | 'xml': 'markup', 641 | 'py': 'python', 642 | 'rb': 'ruby', 643 | 'ps1': 'powershell', 644 | 'psm1': 'powershell' 645 | }; 646 | 647 | if(Array.prototype.forEach) { // Check to prevent error in IE8 648 | Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) { 649 | var src = pre.getAttribute('data-src'); 650 | 651 | var language, parent = pre; 652 | var lang = /\blang(?:uage)?-(?!\*)(\w+)\b/i; 653 | while (parent && !lang.test(parent.className)) { 654 | parent = parent.parentNode; 655 | } 656 | 657 | if (parent) { 658 | language = (pre.className.match(lang) || [, ''])[1]; 659 | } 660 | 661 | if (!language) { 662 | var extension = (src.match(/\.(\w+)$/) || [, ''])[1]; 663 | language = Extensions[extension] || extension; 664 | } 665 | 666 | var code = document.createElement('code'); 667 | code.className = 'language-' + language; 668 | 669 | pre.textContent = ''; 670 | 671 | code.textContent = 'Loading…'; 672 | 673 | pre.appendChild(code); 674 | 675 | var xhr = new XMLHttpRequest(); 676 | 677 | xhr.open('GET', src, true); 678 | 679 | xhr.onreadystatechange = function () { 680 | if (xhr.readyState == 4) { 681 | 682 | if (xhr.status < 400 && xhr.responseText) { 683 | code.textContent = xhr.responseText; 684 | 685 | Prism.highlightElement(code); 686 | } 687 | else if (xhr.status >= 400) { 688 | code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText; 689 | } 690 | else { 691 | code.textContent = '✖ Error: File does not exist or is empty'; 692 | } 693 | } 694 | }; 695 | 696 | xhr.send(null); 697 | }); 698 | } 699 | 700 | }; 701 | 702 | self.Prism.fileHighlight(); 703 | 704 | })(); 705 | -------------------------------------------------------------------------------- /src/main/resources/static/lib/jquery.flot.min.js: -------------------------------------------------------------------------------- 1 | /* Javascript plotting library for jQuery, v. 0.7. 2 | * 3 | * Released under the MIT license by IOLA, December 2007. 4 | * 5 | */ 6 | (function(b){b.color={};b.color.make=function(d,e,g,f){var c={};c.r=d||0;c.g=e||0;c.b=g||0;c.a=f!=null?f:1;c.add=function(h,j){for(var k=0;k=1){return"rgb("+[c.r,c.g,c.b].join(",")+")"}else{return"rgba("+[c.r,c.g,c.b,c.a].join(",")+")"}};c.normalize=function(){function h(k,j,l){return jl?l:j)}c.r=h(0,parseInt(c.r),255);c.g=h(0,parseInt(c.g),255);c.b=h(0,parseInt(c.b),255);c.a=h(0,c.a,1);return c};c.clone=function(){return b.color.make(c.r,c.b,c.g,c.a)};return c.normalize()};b.color.extract=function(d,e){var c;do{c=d.css(e).toLowerCase();if(c!=""&&c!="transparent"){break}d=d.parent()}while(!b.nodeName(d.get(0),"body"));if(c=="rgba(0, 0, 0, 0)"){c="transparent"}return b.color.parse(c)};b.color.parse=function(c){var d,f=b.color.make;if(d=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c)){return f(parseInt(d[1],10),parseInt(d[2],10),parseInt(d[3],10))}if(d=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(c)){return f(parseInt(d[1],10),parseInt(d[2],10),parseInt(d[3],10),parseFloat(d[4]))}if(d=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c)){return f(parseFloat(d[1])*2.55,parseFloat(d[2])*2.55,parseFloat(d[3])*2.55)}if(d=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(c)){return f(parseFloat(d[1])*2.55,parseFloat(d[2])*2.55,parseFloat(d[3])*2.55,parseFloat(d[4]))}if(d=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c)){return f(parseInt(d[1],16),parseInt(d[2],16),parseInt(d[3],16))}if(d=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c)){return f(parseInt(d[1]+d[1],16),parseInt(d[2]+d[2],16),parseInt(d[3]+d[3],16))}var e=b.trim(c).toLowerCase();if(e=="transparent"){return f(255,255,255,0)}else{d=a[e]||[0,0,0];return f(d[0],d[1],d[2])}};var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);(function(c){function b(av,ai,J,af){var Q=[],O={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],legend:{show:true,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:0.85},xaxis:{show:null,position:"bottom",mode:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,max:null,autoscaleMargin:null,ticks:null,tickFormatter:null,labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,alignTicksWithAxis:null,tickDecimals:null,tickSize:null,minTickSize:null,monthNames:null,timeformat:null,twelveHourClock:false},yaxis:{autoscaleMargin:0.02,position:"left"},xaxes:[],yaxes:[],series:{points:{show:false,radius:3,lineWidth:2,fill:true,fillColor:"#ffffff",symbol:"circle"},lines:{lineWidth:2,fill:false,fillColor:null,steps:false},bars:{show:false,lineWidth:2,barWidth:1,fill:true,fillColor:null,align:"left",horizontal:false},shadowSize:3},grid:{show:true,aboveData:false,color:"#545454",backgroundColor:null,borderColor:null,tickColor:null,labelMargin:5,axisMargin:8,borderWidth:2,minBorderMargin:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:false,hoverable:false,autoHighlight:true,mouseActiveRadius:10},hooks:{}},az=null,ad=null,y=null,H=null,A=null,p=[],aw=[],q={left:0,right:0,top:0,bottom:0},G=0,I=0,h=0,w=0,ak={processOptions:[],processRawData:[],processDatapoints:[],drawSeries:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]},aq=this;aq.setData=aj;aq.setupGrid=t;aq.draw=W;aq.getPlaceholder=function(){return av};aq.getCanvas=function(){return az};aq.getPlotOffset=function(){return q};aq.width=function(){return h};aq.height=function(){return w};aq.offset=function(){var aB=y.offset();aB.left+=q.left;aB.top+=q.top;return aB};aq.getData=function(){return Q};aq.getAxes=function(){var aC={},aB;c.each(p.concat(aw),function(aD,aE){if(aE){aC[aE.direction+(aE.n!=1?aE.n:"")+"axis"]=aE}});return aC};aq.getXAxes=function(){return p};aq.getYAxes=function(){return aw};aq.c2p=C;aq.p2c=ar;aq.getOptions=function(){return O};aq.highlight=x;aq.unhighlight=T;aq.triggerRedrawOverlay=f;aq.pointOffset=function(aB){return{left:parseInt(p[aA(aB,"x")-1].p2c(+aB.x)+q.left),top:parseInt(aw[aA(aB,"y")-1].p2c(+aB.y)+q.top)}};aq.shutdown=ag;aq.resize=function(){B();g(az);g(ad)};aq.hooks=ak;F(aq);Z(J);X();aj(ai);t();W();ah();function an(aD,aB){aB=[aq].concat(aB);for(var aC=0;aC=O.colors.length){aG=0;++aF}}var aH=0,aN;for(aG=0;aGa3.datamax&&a1!=aB){a3.datamax=a1}}c.each(m(),function(a1,a2){a2.datamin=aO;a2.datamax=aI;a2.used=false});for(aU=0;aU0&&aT[aR-aP]!=null&&aT[aR-aP]!=aT[aR]&&aT[aR-aP+1]!=aT[aR+1]){for(aN=0;aNaM){aM=a0}}if(aX.y){if(a0aV){aV=a0}}}}if(aJ.bars.show){var aY=aJ.bars.align=="left"?0:-aJ.bars.barWidth/2;if(aJ.bars.horizontal){aQ+=aY;aV+=aY+aJ.bars.barWidth}else{aK+=aY;aM+=aY+aJ.bars.barWidth}}aF(aJ.xaxis,aK,aM);aF(aJ.yaxis,aQ,aV)}c.each(m(),function(a1,a2){if(a2.datamin==aO){a2.datamin=null}if(a2.datamax==aI){a2.datamax=null}})}function j(aB,aC){var aD=document.createElement("canvas");aD.className=aC;aD.width=G;aD.height=I;if(!aB){c(aD).css({position:"absolute",left:0,top:0})}c(aD).appendTo(av);if(!aD.getContext){aD=window.G_vmlCanvasManager.initElement(aD)}aD.getContext("2d").save();return aD}function B(){G=av.width();I=av.height();if(G<=0||I<=0){throw"Invalid dimensions for plot, width = "+G+", height = "+I}}function g(aC){if(aC.width!=G){aC.width=G}if(aC.height!=I){aC.height=I}var aB=aC.getContext("2d");aB.restore();aB.save()}function X(){var aC,aB=av.children("canvas.base"),aD=av.children("canvas.overlay");if(aB.length==0||aD==0){av.html("");av.css({padding:0});if(av.css("position")=="static"){av.css("position","relative")}B();az=j(true,"base");ad=j(false,"overlay");aC=false}else{az=aB.get(0);ad=aD.get(0);aC=true}H=az.getContext("2d");A=ad.getContext("2d");y=c([ad,az]);if(aC){av.data("plot").shutdown();aq.resize();A.clearRect(0,0,G,I);y.unbind();av.children().not([az,ad]).remove()}av.data("plot",aq)}function ah(){if(O.grid.hoverable){y.mousemove(aa);y.mouseleave(l)}if(O.grid.clickable){y.click(R)}an(ak.bindEvents,[y])}function ag(){if(M){clearTimeout(M)}y.unbind("mousemove",aa);y.unbind("mouseleave",l);y.unbind("click",R);an(ak.shutdown,[y])}function r(aG){function aC(aH){return aH}var aF,aB,aD=aG.options.transform||aC,aE=aG.options.inverseTransform;if(aG.direction=="x"){aF=aG.scale=h/Math.abs(aD(aG.max)-aD(aG.min));aB=Math.min(aD(aG.max),aD(aG.min))}else{aF=aG.scale=w/Math.abs(aD(aG.max)-aD(aG.min));aF=-aF;aB=Math.max(aD(aG.max),aD(aG.min))}if(aD==aC){aG.p2c=function(aH){return(aH-aB)*aF}}else{aG.p2c=function(aH){return(aD(aH)-aB)*aF}}if(!aE){aG.c2p=function(aH){return aB+aH/aF}}else{aG.c2p=function(aH){return aE(aB+aH/aF)}}}function L(aD){var aB=aD.options,aF,aJ=aD.ticks||[],aI=[],aE,aK=aB.labelWidth,aG=aB.labelHeight,aC;function aH(aM,aL){return c('
'+aM.join("")+"
").appendTo(av)}if(aD.direction=="x"){if(aK==null){aK=Math.floor(G/(aJ.length>0?aJ.length:1))}if(aG==null){aI=[];for(aF=0;aF'+aE+"")}}if(aI.length>0){aI.push('
');aC=aH(aI,"width:10000px;");aG=aC.height();aC.remove()}}}else{if(aK==null||aG==null){for(aF=0;aF'+aE+"")}}if(aI.length>0){aC=aH(aI,"");if(aK==null){aK=aC.children().width()}if(aG==null){aG=aC.find("div.tickLabel").height()}aC.remove()}}}if(aK==null){aK=0}if(aG==null){aG=0}aD.labelWidth=aK;aD.labelHeight=aG}function au(aD){var aC=aD.labelWidth,aL=aD.labelHeight,aH=aD.options.position,aF=aD.options.tickLength,aG=O.grid.axisMargin,aJ=O.grid.labelMargin,aK=aD.direction=="x"?p:aw,aE;var aB=c.grep(aK,function(aN){return aN&&aN.options.position==aH&&aN.reserveSpace});if(c.inArray(aD,aB)==aB.length-1){aG=0}if(aF==null){aF="full"}var aI=c.grep(aK,function(aN){return aN&&aN.reserveSpace});var aM=c.inArray(aD,aI)==0;if(!aM&&aF=="full"){aF=5}if(!isNaN(+aF)){aJ+=+aF}if(aD.direction=="x"){aL+=aJ;if(aH=="bottom"){q.bottom+=aL+aG;aD.box={top:I-q.bottom,height:aL}}else{aD.box={top:q.top+aG,height:aL};q.top+=aL+aG}}else{aC+=aJ;if(aH=="left"){aD.box={left:q.left+aG,width:aC};q.left+=aC+aG}else{q.right+=aC+aG;aD.box={left:G-q.right,width:aC}}}aD.position=aH;aD.tickLength=aF;aD.box.padding=aJ;aD.innermost=aM}function U(aB){if(aB.direction=="x"){aB.box.left=q.left;aB.box.width=h}else{aB.box.top=q.top;aB.box.height=w}}function t(){var aC,aE=m();c.each(aE,function(aF,aG){aG.show=aG.options.show;if(aG.show==null){aG.show=aG.used}aG.reserveSpace=aG.show||aG.options.reserveSpace;n(aG)});allocatedAxes=c.grep(aE,function(aF){return aF.reserveSpace});q.left=q.right=q.top=q.bottom=0;if(O.grid.show){c.each(allocatedAxes,function(aF,aG){S(aG);P(aG);ap(aG,aG.ticks);L(aG)});for(aC=allocatedAxes.length-1;aC>=0;--aC){au(allocatedAxes[aC])}var aD=O.grid.minBorderMargin;if(aD==null){aD=0;for(aC=0;aC=0){aD=0}}if(aF.max==null){aB+=aH*aG;if(aB>0&&aE.datamax!=null&&aE.datamax<=0){aB=0}}}}aE.min=aD;aE.max=aB}function S(aG){var aM=aG.options;var aH;if(typeof aM.ticks=="number"&&aM.ticks>0){aH=aM.ticks}else{aH=0.3*Math.sqrt(aG.direction=="x"?G:I)}var aT=(aG.max-aG.min)/aH,aO,aB,aN,aR,aS,aQ,aI;if(aM.mode=="time"){var aJ={second:1000,minute:60*1000,hour:60*60*1000,day:24*60*60*1000,month:30*24*60*60*1000,year:365.2425*24*60*60*1000};var aK=[[1,"second"],[2,"second"],[5,"second"],[10,"second"],[30,"second"],[1,"minute"],[2,"minute"],[5,"minute"],[10,"minute"],[30,"minute"],[1,"hour"],[2,"hour"],[4,"hour"],[8,"hour"],[12,"hour"],[1,"day"],[2,"day"],[3,"day"],[0.25,"month"],[0.5,"month"],[1,"month"],[2,"month"],[3,"month"],[6,"month"],[1,"year"]];var aC=0;if(aM.minTickSize!=null){if(typeof aM.tickSize=="number"){aC=aM.tickSize}else{aC=aM.minTickSize[0]*aJ[aM.minTickSize[1]]}}for(var aS=0;aS=aC){break}}aO=aK[aS][0];aN=aK[aS][1];if(aN=="year"){aQ=Math.pow(10,Math.floor(Math.log(aT/aJ.year)/Math.LN10));aI=(aT/aJ.year)/aQ;if(aI<1.5){aO=1}else{if(aI<3){aO=2}else{if(aI<7.5){aO=5}else{aO=10}}}aO*=aQ}aG.tickSize=aM.tickSize||[aO,aN];aB=function(aX){var a2=[],a0=aX.tickSize[0],a3=aX.tickSize[1],a1=new Date(aX.min);var aW=a0*aJ[a3];if(a3=="second"){a1.setUTCSeconds(a(a1.getUTCSeconds(),a0))}if(a3=="minute"){a1.setUTCMinutes(a(a1.getUTCMinutes(),a0))}if(a3=="hour"){a1.setUTCHours(a(a1.getUTCHours(),a0))}if(a3=="month"){a1.setUTCMonth(a(a1.getUTCMonth(),a0))}if(a3=="year"){a1.setUTCFullYear(a(a1.getUTCFullYear(),a0))}a1.setUTCMilliseconds(0);if(aW>=aJ.minute){a1.setUTCSeconds(0)}if(aW>=aJ.hour){a1.setUTCMinutes(0)}if(aW>=aJ.day){a1.setUTCHours(0)}if(aW>=aJ.day*4){a1.setUTCDate(1)}if(aW>=aJ.year){a1.setUTCMonth(0)}var a5=0,a4=Number.NaN,aY;do{aY=a4;a4=a1.getTime();a2.push(a4);if(a3=="month"){if(a0<1){a1.setUTCDate(1);var aV=a1.getTime();a1.setUTCMonth(a1.getUTCMonth()+1);var aZ=a1.getTime();a1.setTime(a4+a5*aJ.hour+(aZ-aV)*a0);a5=a1.getUTCHours();a1.setUTCHours(0)}else{a1.setUTCMonth(a1.getUTCMonth()+a0)}}else{if(a3=="year"){a1.setUTCFullYear(a1.getUTCFullYear()+a0)}else{a1.setTime(a4+aW)}}}while(a4aU){aP=aU}aQ=Math.pow(10,-aP);aI=aT/aQ;if(aI<1.5){aO=1}else{if(aI<3){aO=2;if(aI>2.25&&(aU==null||aP+1<=aU)){aO=2.5;++aP}}else{if(aI<7.5){aO=5}else{aO=10}}}aO*=aQ;if(aM.minTickSize!=null&&aO0){if(aM.min==null){aG.min=Math.min(aG.min,aL[0])}if(aM.max==null&&aL.length>1){aG.max=Math.max(aG.max,aL[aL.length-1])}}aB=function(aX){var aY=[],aV,aW;for(aW=0;aW1&&/\..*0$/.test((aD[1]-aD[0]).toFixed(aE)))){aG.tickDecimals=aE}}}}aG.tickGenerator=aB;if(c.isFunction(aM.tickFormatter)){aG.tickFormatter=function(aV,aW){return""+aM.tickFormatter(aV,aW)}}else{aG.tickFormatter=aR}}function P(aF){var aH=aF.options.ticks,aG=[];if(aH==null||(typeof aH=="number"&&aH>0)){aG=aF.tickGenerator(aF)}else{if(aH){if(c.isFunction(aH)){aG=aH({min:aF.min,max:aF.max})}else{aG=aH}}}var aE,aB;aF.ticks=[];for(aE=0;aE1){aC=aD[1]}}else{aB=+aD}if(aC==null){aC=aF.tickFormatter(aB,aF)}if(!isNaN(aB)){aF.ticks.push({v:aB,label:aC})}}}function ap(aB,aC){if(aB.options.autoscaleMargin&&aC.length>0){if(aB.options.min==null){aB.min=Math.min(aB.min,aC[0].v)}if(aB.options.max==null&&aC.length>1){aB.max=Math.max(aB.max,aC[aC.length-1].v)}}}function W(){H.clearRect(0,0,G,I);var aC=O.grid;if(aC.show&&aC.backgroundColor){N()}if(aC.show&&!aC.aboveData){ac()}for(var aB=0;aBaG){var aC=aH;aH=aG;aG=aC}return{from:aH,to:aG,axis:aE}}function N(){H.save();H.translate(q.left,q.top);H.fillStyle=am(O.grid.backgroundColor,w,0,"rgba(255, 255, 255, 0)");H.fillRect(0,0,h,w);H.restore()}function ac(){var aF;H.save();H.translate(q.left,q.top);var aH=O.grid.markings;if(aH){if(c.isFunction(aH)){var aK=aq.getAxes();aK.xmin=aK.xaxis.min;aK.xmax=aK.xaxis.max;aK.ymin=aK.yaxis.min;aK.ymax=aK.yaxis.max;aH=aH(aK)}for(aF=0;aFaC.axis.max||aI.toaI.axis.max){continue}aC.from=Math.max(aC.from,aC.axis.min);aC.to=Math.min(aC.to,aC.axis.max);aI.from=Math.max(aI.from,aI.axis.min);aI.to=Math.min(aI.to,aI.axis.max);if(aC.from==aC.to&&aI.from==aI.to){continue}aC.from=aC.axis.p2c(aC.from);aC.to=aC.axis.p2c(aC.to);aI.from=aI.axis.p2c(aI.from);aI.to=aI.axis.p2c(aI.to);if(aC.from==aC.to||aI.from==aI.to){H.beginPath();H.strokeStyle=aD.color||O.grid.markingsColor;H.lineWidth=aD.lineWidth||O.grid.markingsLineWidth;H.moveTo(aC.from,aI.from);H.lineTo(aC.to,aI.to);H.stroke()}else{H.fillStyle=aD.color||O.grid.markingsColor;H.fillRect(aC.from,aI.to,aC.to-aC.from,aI.from-aI.to)}}}var aK=m(),aM=O.grid.borderWidth;for(var aE=0;aEaB.max||(aQ=="full"&&aM>0&&(aO==aB.min||aO==aB.max))){continue}if(aB.direction=="x"){aN=aB.p2c(aO);aJ=aQ=="full"?-w:aQ;if(aB.position=="top"){aJ=-aJ}}else{aL=aB.p2c(aO);aP=aQ=="full"?-h:aQ;if(aB.position=="left"){aP=-aP}}if(H.lineWidth==1){if(aB.direction=="x"){aN=Math.floor(aN)+0.5}else{aL=Math.floor(aL)+0.5}}H.moveTo(aN,aL);H.lineTo(aN+aP,aL+aJ)}H.stroke()}if(aM){H.lineWidth=aM;H.strokeStyle=O.grid.borderColor;H.strokeRect(-aM/2,-aM/2,h+aM,w+aM)}H.restore()}function k(){av.find(".tickLabels").remove();var aG=['
'];var aJ=m();for(var aD=0;aD');for(var aE=0;aEaC.max){continue}var aK={},aI;if(aC.direction=="x"){aI="center";aK.left=Math.round(q.left+aC.p2c(aH.v)-aC.labelWidth/2);if(aC.position=="bottom"){aK.top=aF.top+aF.padding}else{aK.bottom=I-(aF.top+aF.height-aF.padding)}}else{aK.top=Math.round(q.top+aC.p2c(aH.v)-aC.labelHeight/2);if(aC.position=="left"){aK.right=G-(aF.left+aF.width-aF.padding);aI="right"}else{aK.left=aF.left+aF.padding;aI="left"}}aK.width=aC.labelWidth;var aB=["position:absolute","text-align:"+aI];for(var aL in aK){aB.push(aL+":"+aK[aL]+"px")}aG.push('
'+aH.label+"
")}aG.push("
")}aG.push("");av.append(aG.join(""))}function d(aB){if(aB.lines.show){at(aB)}if(aB.bars.show){e(aB)}if(aB.points.show){ao(aB)}}function at(aE){function aD(aP,aQ,aI,aU,aT){var aV=aP.points,aJ=aP.pointsize,aN=null,aM=null;H.beginPath();for(var aO=aJ;aO=aR&&aS>aT.max){if(aR>aT.max){continue}aL=(aT.max-aS)/(aR-aS)*(aK-aL)+aL;aS=aT.max}else{if(aR>=aS&&aR>aT.max){if(aS>aT.max){continue}aK=(aT.max-aS)/(aR-aS)*(aK-aL)+aL;aR=aT.max}}if(aL<=aK&&aL=aK&&aL>aU.max){if(aK>aU.max){continue}aS=(aU.max-aL)/(aK-aL)*(aR-aS)+aS;aL=aU.max}else{if(aK>=aL&&aK>aU.max){if(aL>aU.max){continue}aR=(aU.max-aL)/(aK-aL)*(aR-aS)+aS;aK=aU.max}}if(aL!=aN||aS!=aM){H.moveTo(aU.p2c(aL)+aQ,aT.p2c(aS)+aI)}aN=aK;aM=aR;H.lineTo(aU.p2c(aK)+aQ,aT.p2c(aR)+aI)}H.stroke()}function aF(aI,aQ,aP){var aW=aI.points,aV=aI.pointsize,aN=Math.min(Math.max(0,aP.min),aP.max),aX=0,aU,aT=false,aM=1,aL=0,aR=0;while(true){if(aV>0&&aX>aW.length+aV){break}aX+=aV;var aZ=aW[aX-aV],aK=aW[aX-aV+aM],aY=aW[aX],aJ=aW[aX+aM];if(aT){if(aV>0&&aZ!=null&&aY==null){aR=aX;aV=-aV;aM=2;continue}if(aV<0&&aX==aL+aV){H.fill();aT=false;aV=-aV;aM=1;aX=aL=aR+aV;continue}}if(aZ==null||aY==null){continue}if(aZ<=aY&&aZ=aY&&aZ>aQ.max){if(aY>aQ.max){continue}aK=(aQ.max-aZ)/(aY-aZ)*(aJ-aK)+aK;aZ=aQ.max}else{if(aY>=aZ&&aY>aQ.max){if(aZ>aQ.max){continue}aJ=(aQ.max-aZ)/(aY-aZ)*(aJ-aK)+aK;aY=aQ.max}}if(!aT){H.beginPath();H.moveTo(aQ.p2c(aZ),aP.p2c(aN));aT=true}if(aK>=aP.max&&aJ>=aP.max){H.lineTo(aQ.p2c(aZ),aP.p2c(aP.max));H.lineTo(aQ.p2c(aY),aP.p2c(aP.max));continue}else{if(aK<=aP.min&&aJ<=aP.min){H.lineTo(aQ.p2c(aZ),aP.p2c(aP.min));H.lineTo(aQ.p2c(aY),aP.p2c(aP.min));continue}}var aO=aZ,aS=aY;if(aK<=aJ&&aK=aP.min){aZ=(aP.min-aK)/(aJ-aK)*(aY-aZ)+aZ;aK=aP.min}else{if(aJ<=aK&&aJ=aP.min){aY=(aP.min-aK)/(aJ-aK)*(aY-aZ)+aZ;aJ=aP.min}}if(aK>=aJ&&aK>aP.max&&aJ<=aP.max){aZ=(aP.max-aK)/(aJ-aK)*(aY-aZ)+aZ;aK=aP.max}else{if(aJ>=aK&&aJ>aP.max&&aK<=aP.max){aY=(aP.max-aK)/(aJ-aK)*(aY-aZ)+aZ;aJ=aP.max}}if(aZ!=aO){H.lineTo(aQ.p2c(aO),aP.p2c(aK))}H.lineTo(aQ.p2c(aZ),aP.p2c(aK));H.lineTo(aQ.p2c(aY),aP.p2c(aJ));if(aY!=aS){H.lineTo(aQ.p2c(aY),aP.p2c(aJ));H.lineTo(aQ.p2c(aS),aP.p2c(aJ))}}}H.save();H.translate(q.left,q.top);H.lineJoin="round";var aG=aE.lines.lineWidth,aB=aE.shadowSize;if(aG>0&&aB>0){H.lineWidth=aB;H.strokeStyle="rgba(0,0,0,0.1)";var aH=Math.PI/18;aD(aE.datapoints,Math.sin(aH)*(aG/2+aB/2),Math.cos(aH)*(aG/2+aB/2),aE.xaxis,aE.yaxis);H.lineWidth=aB/2;aD(aE.datapoints,Math.sin(aH)*(aG/2+aB/4),Math.cos(aH)*(aG/2+aB/4),aE.xaxis,aE.yaxis)}H.lineWidth=aG;H.strokeStyle=aE.color;var aC=ae(aE.lines,aE.color,0,w);if(aC){H.fillStyle=aC;aF(aE.datapoints,aE.xaxis,aE.yaxis)}if(aG>0){aD(aE.datapoints,0,0,aE.xaxis,aE.yaxis)}H.restore()}function ao(aE){function aH(aN,aM,aU,aK,aS,aT,aQ,aJ){var aR=aN.points,aI=aN.pointsize;for(var aL=0;aLaT.max||aOaQ.max){continue}H.beginPath();aP=aT.p2c(aP);aO=aQ.p2c(aO)+aK;if(aJ=="circle"){H.arc(aP,aO,aM,0,aS?Math.PI:Math.PI*2,false)}else{aJ(H,aP,aO,aM,aS)}H.closePath();if(aU){H.fillStyle=aU;H.fill()}H.stroke()}}H.save();H.translate(q.left,q.top);var aG=aE.points.lineWidth,aC=aE.shadowSize,aB=aE.points.radius,aF=aE.points.symbol;if(aG>0&&aC>0){var aD=aC/2;H.lineWidth=aD;H.strokeStyle="rgba(0,0,0,0.1)";aH(aE.datapoints,aB,null,aD+aD/2,true,aE.xaxis,aE.yaxis,aF);H.strokeStyle="rgba(0,0,0,0.2)";aH(aE.datapoints,aB,null,aD/2,true,aE.xaxis,aE.yaxis,aF)}H.lineWidth=aG;H.strokeStyle=aE.color;aH(aE.datapoints,aB,ae(aE.points,aE.color),0,false,aE.xaxis,aE.yaxis,aF);H.restore()}function E(aN,aM,aV,aI,aQ,aF,aD,aL,aK,aU,aR,aC){var aE,aT,aJ,aP,aG,aB,aO,aH,aS;if(aR){aH=aB=aO=true;aG=false;aE=aV;aT=aN;aP=aM+aI;aJ=aM+aQ;if(aTaL.max||aPaK.max){return}if(aEaL.max){aT=aL.max;aB=false}if(aJaK.max){aP=aK.max;aO=false}aE=aL.p2c(aE);aJ=aK.p2c(aJ);aT=aL.p2c(aT);aP=aK.p2c(aP);if(aD){aU.beginPath();aU.moveTo(aE,aJ);aU.lineTo(aE,aP);aU.lineTo(aT,aP);aU.lineTo(aT,aJ);aU.fillStyle=aD(aJ,aP);aU.fill()}if(aC>0&&(aG||aB||aO||aH)){aU.beginPath();aU.moveTo(aE,aJ+aF);if(aG){aU.lineTo(aE,aP+aF)}else{aU.moveTo(aE,aP+aF)}if(aO){aU.lineTo(aT,aP+aF)}else{aU.moveTo(aT,aP+aF)}if(aB){aU.lineTo(aT,aJ+aF)}else{aU.moveTo(aT,aJ+aF)}if(aH){aU.lineTo(aE,aJ+aF)}else{aU.moveTo(aE,aJ+aF)}aU.stroke()}}function e(aD){function aC(aJ,aI,aL,aG,aK,aN,aM){var aO=aJ.points,aF=aJ.pointsize;for(var aH=0;aH")}aH.push("
");aF=true}if(aN){aJ=aN(aJ,aM)}aH.push('")}if(aF){aH.push("")}if(aH.length==0){return}var aL='
' + div.attr('data-y-axis') + '' + div.attr('data-y-axis2') + '
' + div.attr('data-x-axis') + 197 | '
'+aJ+"
'+aH.join("")+"
";if(O.legend.container!=null){c(O.legend.container).html(aL)}else{var aI="",aC=O.legend.position,aD=O.legend.margin;if(aD[0]==null){aD=[aD,aD]}if(aC.charAt(0)=="n"){aI+="top:"+(aD[1]+q.top)+"px;"}else{if(aC.charAt(0)=="s"){aI+="bottom:"+(aD[1]+q.bottom)+"px;"}}if(aC.charAt(1)=="e"){aI+="right:"+(aD[0]+q.right)+"px;"}else{if(aC.charAt(1)=="w"){aI+="left:"+(aD[0]+q.left)+"px;"}}var aK=c('
'+aL.replace('style="','style="position:absolute;'+aI+";")+"
").appendTo(av);if(O.legend.backgroundOpacity!=0){var aG=O.legend.backgroundColor;if(aG==null){aG=O.grid.backgroundColor;if(aG&&typeof aG=="string"){aG=c.color.parse(aG)}else{aG=c.color.extract(aK,"background-color")}aG.a=1;aG=aG.toString()}var aB=aK.children();c('
').prependTo(aK).css("opacity",O.legend.backgroundOpacity)}}}var ab=[],M=null;function K(aI,aG,aD){var aO=O.grid.mouseActiveRadius,a0=aO*aO+1,aY=null,aR=false,aW,aU;for(aW=Q.length-1;aW>=0;--aW){if(!aD(Q[aW])){continue}var aP=Q[aW],aH=aP.xaxis,aF=aP.yaxis,aV=aP.datapoints.points,aT=aP.datapoints.pointsize,aQ=aH.c2p(aI),aN=aF.c2p(aG),aC=aO/aH.scale,aB=aO/aF.scale;if(aH.options.inverseTransform){aC=Number.MAX_VALUE}if(aF.options.inverseTransform){aB=Number.MAX_VALUE}if(aP.lines.show||aP.points.show){for(aU=0;aUaC||aK-aQ<-aC||aJ-aN>aB||aJ-aN<-aB){continue}var aM=Math.abs(aH.p2c(aK)-aI),aL=Math.abs(aF.p2c(aJ)-aG),aS=aM*aM+aL*aL;if(aS=Math.min(aZ,aK)&&aN>=aJ+aE&&aN<=aJ+aX):(aQ>=aK+aE&&aQ<=aK+aX&&aN>=Math.min(aZ,aJ)&&aN<=Math.max(aZ,aJ))){aY=[aW,aU/aT]}}}}if(aY){aW=aY[0];aU=aY[1];aT=Q[aW].datapoints.pointsize;return{datapoint:Q[aW].datapoints.points.slice(aU*aT,(aU+1)*aT),dataIndex:aU,series:Q[aW],seriesIndex:aW}}return null}function aa(aB){if(O.grid.hoverable){u("plothover",aB,function(aC){return aC.hoverable!=false})}}function l(aB){if(O.grid.hoverable){u("plothover",aB,function(aC){return false})}}function R(aB){u("plotclick",aB,function(aC){return aC.clickable!=false})}function u(aC,aB,aD){var aE=y.offset(),aH=aB.pageX-aE.left-q.left,aF=aB.pageY-aE.top-q.top,aJ=C({left:aH,top:aF});aJ.pageX=aB.pageX;aJ.pageY=aB.pageY;var aK=K(aH,aF,aD);if(aK){aK.pageX=parseInt(aK.series.xaxis.p2c(aK.datapoint[0])+aE.left+q.left);aK.pageY=parseInt(aK.series.yaxis.p2c(aK.datapoint[1])+aE.top+q.top)}if(O.grid.autoHighlight){for(var aG=0;aGaH.max||aIaG.max){return}var aF=aE.points.radius+aE.points.lineWidth/2;A.lineWidth=aF;A.strokeStyle=c.color.parse(aE.color).scale("a",0.5).toString();var aB=1.5*aF,aC=aH.p2c(aC),aI=aG.p2c(aI);A.beginPath();if(aE.points.symbol=="circle"){A.arc(aC,aI,aB,0,2*Math.PI,false)}else{aE.points.symbol(A,aC,aI,aB,false)}A.closePath();A.stroke()}function v(aE,aB){A.lineWidth=aE.bars.lineWidth;A.strokeStyle=c.color.parse(aE.color).scale("a",0.5).toString();var aD=c.color.parse(aE.color).scale("a",0.5).toString();var aC=aE.bars.align=="left"?0:-aE.bars.barWidth/2;E(aB[0],aB[1],aB[2]||0,aC,aC+aE.bars.barWidth,0,function(){return aD},aE.xaxis,aE.yaxis,A,aE.bars.horizontal,aE.bars.lineWidth)}function am(aJ,aB,aH,aC){if(typeof aJ=="string"){return aJ}else{var aI=H.createLinearGradient(0,aH,0,aB);for(var aE=0,aD=aJ.colors.length;aE12){n=n-12}else{if(n==0){n=12}}}for(var g=0;g=0&&c0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0&&("form"in a||"label"in a)},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"form"in b?b.parentNode&&b.disabled===!1?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&ea(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}}):(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c,d,e,f=b.getElementById(a);if(f){if(c=f.getAttributeNode("id"),c&&c.value===a)return[f];e=b.getElementsByName(a),d=0;while(f=e[d++])if(c=f.getAttributeNode("id"),c&&c.value===a)return[f]}return[]}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,c,e){var f,i,j,k,l,m="function"==typeof a&&a,n=!e&&g(a=m.selector||a);if(c=c||[],1===n.length){if(i=n[0]=n[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&9===b.nodeType&&p&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(_,aa),b)||[])[0],!b)return c;m&&(b=b.parentNode),a=a.slice(i.shift().value.length)}f=V.needsContext.test(a)?0:i.length;while(f--){if(j=i[f],d.relative[k=j.type])break;if((l=d.find[k])&&(e=l(j.matches[0].replace(_,aa),$.test(i[0].type)&&qa(b.parentNode)||b))){if(i.splice(f,1),a=e.length&&sa(i),!a)return G.apply(c,e),c;break}}}return(m||h(a,n))(e,b,!p,c,!b||$.test(a)&&qa(b.parentNode)||b),c},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext,B=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,C=/^.[^:#\[\.,]*$/;function D(a,b,c){return r.isFunction(b)?r.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?r.grep(a,function(a){return a===b!==c}):"string"!=typeof b?r.grep(a,function(a){return i.call(b,a)>-1!==c}):C.test(b)?r.filter(b,a,c):(b=r.filter(b,a),r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType}))}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(D(this,a||[],!1))},not:function(a){return this.pushStack(D(this,a||[],!0))},is:function(a){return!!D(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var E,F=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,G=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||E,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:F.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),B.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};G.prototype=r.fn,E=r(d);var H=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function J(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return J(a,"nextSibling")},prev:function(a){return J(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return a.contentDocument||r.merge([],a.childNodes)}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(I[a]||r.uniqueSort(e),H.test(a)&&e.reverse()),this.pushStack(e)}});var K=/[^\x20\t\r\n\f]+/g;function L(a){var b={};return r.each(a.match(K)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?L(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function M(a){return a}function N(a){throw a}function O(a,b,c){var d;try{a&&r.isFunction(d=a.promise)?d.call(a).done(b).fail(c):a&&r.isFunction(d=a.then)?d.call(a,b,c):b.call(void 0,a)}catch(a){c.call(void 0,a)}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b=f&&(d!==N&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:M,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:M)),c[2][3].add(g(0,a,r.isFunction(d)?d:N))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(O(a,g.done(h(c)).resolve,g.reject),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)O(e[c],h(c),g.reject);return g.promise()}});var P=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&P.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var Q=r.Deferred();r.fn.ready=function(a){return Q.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,holdReady:function(a){a?r.readyWait++:r.ready(!0)},ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||Q.resolveWith(d,[r]))}}),r.ready.then=Q.then;function R(){d.removeEventListener("DOMContentLoaded",R), 3 | a.removeEventListener("load",R),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",R),a.addEventListener("load",R));var S=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)S(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h1,null,!0)},removeData:function(a){return this.each(function(){W.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=V.get(a,b),c&&(!d||r.isArray(c)?d=V.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return V.get(a,c)||V.access(a,c,{empty:r.Callbacks("once memory").add(function(){V.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length\x20\t\r\n\f]+)/i,ka=/^$|\/(?:java|ecma)script/i,la={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};la.optgroup=la.option,la.tbody=la.tfoot=la.colgroup=la.caption=la.thead,la.th=la.td;function ma(a,b){var c;return c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&r.nodeName(a,b)?r.merge([a],c):c}function na(a,b){for(var c=0,d=a.length;c-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=ma(l.appendChild(f),"script"),j&&na(g),c){k=0;while(f=g[k++])ka.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var qa=d.documentElement,ra=/^key/,sa=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ta=/^([^.]*)(?:\.(.+)|)/;function ua(){return!0}function va(){return!1}function wa(){try{return d.activeElement}catch(a){}}function xa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)xa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=va;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(qa,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(K)||[""],j=b.length;while(j--)h=ta.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.hasData(a)&&V.get(a);if(q&&(i=q.events)){b=(b||"").match(K)||[""],j=b.length;while(j--)if(h=ta.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&V.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(V.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i\x20\t\r\n\f]*)[^>]*)\/>/gi,za=/\s*$/g;function Da(a,b){return r.nodeName(a,"table")&&r.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a:a}function Ea(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Fa(a){var b=Ba.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ga(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(V.hasData(a)&&(f=V.access(a),g=V.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c1&&"string"==typeof q&&!o.checkClone&&Aa.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ia(f,b,c,d)});if(m&&(e=pa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(ma(e,"script"),Ea),i=h.length;l")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=ma(h),f=ma(a),d=0,e=f.length;d0&&na(g,!i&&ma(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(T(c)){if(b=c[V.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[V.expando]=void 0}c[W.expando]&&(c[W.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ja(this,a,!0)},remove:function(a){return Ja(this,a)},text:function(a){return S(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ia(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Da(this,a);b.appendChild(a)}})},prepend:function(){return Ia(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Da(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ia(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ia(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(ma(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return S(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!za.test(a)&&!la[(ja.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c1)}});function Ya(a,b,c,d,e){return new Ya.prototype.init(a,b,c,d,e)}r.Tween=Ya,Ya.prototype={constructor:Ya,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=Ya.propHooks[this.prop];return a&&a.get?a.get(this):Ya.propHooks._default.get(this)},run:function(a){var b,c=Ya.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Ya.propHooks._default.set(this),this}},Ya.prototype.init.prototype=Ya.prototype,Ya.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},Ya.propHooks.scrollTop=Ya.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=Ya.prototype.init,r.fx.step={};var Za,$a,_a=/^(?:toggle|show|hide)$/,ab=/queueHooks$/;function bb(){$a&&(a.requestAnimationFrame(bb),r.fx.tick())}function cb(){return a.setTimeout(function(){Za=void 0}),Za=r.now()}function db(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=ba[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function eb(a,b,c){for(var d,e=(hb.tweeners[b]||[]).concat(hb.tweeners["*"]),f=0,g=e.length;f1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?ib:void 0)), 4 | void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&r.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(K);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),ib={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=jb[b]||r.find.attr;jb[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=jb[g],jb[g]=e,e=null!=c(a,b,d)?g:null,jb[g]=f),e}});var kb=/^(?:input|select|textarea|button)$/i,lb=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return S(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):kb.test(a.nodeName)||lb.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function mb(a){var b=a.match(K)||[];return b.join(" ")}function nb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,nb(this)))});if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=nb(c),d=1===c.nodeType&&" "+mb(e)+" "){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=mb(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,nb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=nb(c),d=1===c.nodeType&&" "+mb(e)+" "){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=mb(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,nb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(K)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=nb(this),b&&V.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":V.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+mb(nb(c))+" ").indexOf(b)>-1)return!0;return!1}});var ob=/\r/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":r.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(ob,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:mb(r.text(a))}},select:{get:function(a){var b,c,d,e=a.options,f=a.selectedIndex,g="select-one"===a.type,h=g?null:[],i=g?f+1:e.length;for(d=f<0?i:g?f:0;d-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(r.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var pb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!pb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,pb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(V.get(h,"events")||{})[b.type]&&V.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&T(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!T(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=V.access(d,b);e||d.addEventListener(a,c,!0),V.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=V.access(d,b)-1;e?V.access(d,b,e):(d.removeEventListener(a,c,!0),V.remove(d,b))}}});var qb=a.location,rb=r.now(),sb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var tb=/\[\]$/,ub=/\r?\n/g,vb=/^(?:submit|button|image|reset|file)$/i,wb=/^(?:input|select|textarea|keygen)/i;function xb(a,b,c,d){var e;if(r.isArray(b))r.each(b,function(b,e){c||tb.test(a)?d(a,e):xb(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)xb(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(r.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)xb(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&wb.test(this.nodeName)&&!vb.test(a)&&(this.checked||!ia.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:r.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(ub,"\r\n")}}):{name:b.name,value:c.replace(ub,"\r\n")}}).get()}});var yb=/%20/g,zb=/#.*$/,Ab=/([?&])_=[^&]*/,Bb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Cb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Db=/^(?:GET|HEAD)$/,Eb=/^\/\//,Fb={},Gb={},Hb="*/".concat("*"),Ib=d.createElement("a");Ib.href=qb.href;function Jb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(K)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Kb(a,b,c,d){var e={},f=a===Gb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Lb(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Mb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Nb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:qb.href,type:"GET",isLocal:Cb.test(qb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Hb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Lb(Lb(a,r.ajaxSettings),b):Lb(r.ajaxSettings,a)},ajaxPrefilter:Jb(Fb),ajaxTransport:Jb(Gb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Bb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||qb.href)+"").replace(Eb,qb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(K)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Ib.protocol+"//"+Ib.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Kb(Fb,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Db.test(o.type),f=o.url.replace(zb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(yb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(sb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Ab,"$1"),n=(sb.test(f)?"&":"?")+"_="+rb++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Hb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Kb(Gb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Mb(o,y,d)),v=Nb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Ob={0:200,1223:204},Pb=r.ajaxSettings.xhr();o.cors=!!Pb&&"withCredentials"in Pb,o.ajax=Pb=!!Pb,r.ajaxTransport(function(b){var c,d;if(o.cors||Pb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Ob[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r("