├── tmpl ├── robots.txt ├── assets │ ├── logo.png │ ├── fonts │ │ ├── firasans.ttf │ │ ├── firasans.woff │ │ ├── firasans.woff2 │ │ ├── firasansbold.ttf │ │ ├── firasansbold.woff │ │ ├── firasansbook.ttf │ │ ├── firasansbook.woff │ │ ├── firasanslight.ttf │ │ ├── firasansbold.woff2 │ │ ├── firasansbook.woff2 │ │ ├── firasansitalic.ttf │ │ ├── firasansitalic.woff │ │ ├── firasansitalic.woff2 │ │ ├── firasanslight.woff │ │ ├── firasanslight.woff2 │ │ ├── firasansmedium.ttf │ │ ├── firasansmedium.woff │ │ ├── firasansmedium.woff2 │ │ ├── firasanssemibold.ttf │ │ ├── firasansbolditalic.ttf │ │ ├── firasansbookitalic.ttf │ │ ├── firasansextralight.ttf │ │ ├── firasanssemibold.woff │ │ ├── firasanssemibold.woff2 │ │ ├── firasansbolditalic.woff │ │ ├── firasansbolditalic.woff2 │ │ ├── firasansbookitalic.woff │ │ ├── firasansbookitalic.woff2 │ │ ├── firasansextralight.woff │ │ ├── firasansextralight.woff2 │ │ ├── firasanslightitalic.ttf │ │ ├── firasanslightitalic.woff │ │ ├── firasanslightitalic.woff2 │ │ ├── firasansmediumitalic.ttf │ │ ├── firasansmediumitalic.woff │ │ ├── firasansmediumitalic.woff2 │ │ ├── firasanssemibolditalic.ttf │ │ ├── firasanssemibolditalic.woff │ │ ├── firasansextralightitalic.ttf │ │ ├── firasansextralightitalic.woff │ │ ├── firasansextralightitalic.woff2 │ │ ├── firasanssemibolditalic.woff2 │ │ └── firasans.css │ ├── awesome-go.css │ ├── normalize.css │ ├── marked.js │ └── jquery-custom.min.js ├── sitemap.xml └── tmpl.html ├── .gitignore ├── .travis.yml ├── .gitattributes ├── Dockerfile ├── docker-compose.yml ├── .codeclimate.yml ├── MAINTAINERS ├── LICENSE ├── repo.go ├── .github └── PULL_REQUEST_TEMPLATE.md ├── CONTRIBUTING.md ├── repo_test.go └── CODE_OF_CONDUCT.md /tmpl/robots.txt: -------------------------------------------------------------------------------- 1 | User-Agent: * 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | tmpl/index.html 2 | awesome-go 3 | -------------------------------------------------------------------------------- /tmpl/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/logo.png -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasans.ttf -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasans.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasans.woff -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasans.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasans.woff2 -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansbold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansbold.ttf -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansbold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansbold.woff -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansbook.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansbook.ttf -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansbook.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansbook.woff -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasanslight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasanslight.ttf -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.x 5 | 6 | sudo: false 7 | 8 | install: 9 | - go get -t -v ./... 10 | -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansbold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansbold.woff2 -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansbook.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansbook.woff2 -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansitalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansitalic.ttf -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansitalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansitalic.woff -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansitalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansitalic.woff2 -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasanslight.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasanslight.woff -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasanslight.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasanslight.woff2 -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansmedium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansmedium.ttf -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansmedium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansmedium.woff -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansmedium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansmedium.woff2 -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasanssemibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasanssemibold.ttf -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | tmpl/assets/* linguist-vendored 2 | *.js linguist-vendored 3 | *.css linguist-vendored 4 | *.html linguist-vendored 5 | -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansbolditalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansbolditalic.ttf -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansbookitalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansbookitalic.ttf -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansextralight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansextralight.ttf -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasanssemibold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasanssemibold.woff -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasanssemibold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasanssemibold.woff2 -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansbolditalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansbolditalic.woff -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansbolditalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansbolditalic.woff2 -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansbookitalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansbookitalic.woff -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansbookitalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansbookitalic.woff2 -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansextralight.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansextralight.woff -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansextralight.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansextralight.woff2 -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasanslightitalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasanslightitalic.ttf -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasanslightitalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasanslightitalic.woff -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasanslightitalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasanslightitalic.woff2 -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansmediumitalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansmediumitalic.ttf -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansmediumitalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansmediumitalic.woff -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansmediumitalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansmediumitalic.woff2 -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasanssemibolditalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasanssemibolditalic.ttf -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasanssemibolditalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasanssemibolditalic.woff -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansextralightitalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansextralightitalic.ttf -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansextralightitalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansextralightitalic.woff -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasansextralightitalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasansextralightitalic.woff2 -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasanssemibolditalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/safe-linso/awesome-go/HEAD/tmpl/assets/fonts/firasanssemibolditalic.woff2 -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:alpine 2 | 3 | RUN apk add --update -t build-deps curl go git libc-dev gcc libgcc 4 | RUN go get github.com/russross/blackfriday github.com/gorilla/mux 5 | 6 | WORKDIR /srv 7 | 8 | CMD ["go", "run", "repo.go"] 9 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | services: 4 | caddy: 5 | image: abiosoft/caddy 6 | volumes: 7 | - ./tmpl:/srv 8 | ports: 9 | - 80:2015 10 | webhook: 11 | build: ./ 12 | volumes: 13 | - ./:/srv 14 | ports: 15 | - 9000:9000 -------------------------------------------------------------------------------- /.codeclimate.yml: -------------------------------------------------------------------------------- 1 | --- 2 | engines: 3 | rubocop: 4 | enabled: true 5 | golint: 6 | enabled: true 7 | gofmt: 8 | enabled: true 9 | govet: 10 | enabled: true 11 | fixme: 12 | enabled: true 13 | duplication: 14 | enabled: true 15 | config: 16 | languages: 17 | - go 18 | ratings: 19 | paths: 20 | - "**.go" 21 | exclude_paths: 22 | - vendor/ 23 | -------------------------------------------------------------------------------- /tmpl/sitemap.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | http://www.awesome-go.com/ 10 | 2016-10-10T07:39:03+00:00 11 | 12 | -------------------------------------------------------------------------------- /MAINTAINERS: -------------------------------------------------------------------------------- 1 | Avelino (@avelino) 2 | Duke (@dukex) 3 | Dmitri Shuralyov (@shurcooL) 4 | Dobrosław Żybort (@matrixik) 5 | Dean Karn (@joeybloggs) 6 | Kirill Danshin (@kirillDanshin) 7 | Felipe Oliveira (@felipeweb) 8 | Bo-Yi Wu (@appleboy) 9 | Cássio Botaro (@cassiobotaro) 10 | -------------------------------------------------------------------------------- /tmpl/assets/awesome-go.css: -------------------------------------------------------------------------------- 1 | * { 2 | max-width: 100%; 3 | box-sizing: border-box; 4 | font-family: "Fira Sans"; 5 | text-decoration: none; 6 | font-weight: 300; 7 | } 8 | .awesome-logo { 9 | max-width: 500px; 10 | width: 100%; 11 | margin: auto; 12 | display: block; 13 | } 14 | 15 | a { 16 | color: #669; 17 | } 18 | a:visited, h1, h2, h3, h4 { 19 | color: #494368; 20 | font-weight: 400; 21 | } 22 | h1 > a:nth-child(1) { 23 | margin-left: 10px; 24 | } 25 | h1 > a img { 26 | padding-right: 5px; 27 | } 28 | 29 | #content { 30 | width: 100%; 31 | padding: 40px 80px; 32 | } 33 | 34 | @media (max-width: 720px) { 35 | #content { 36 | padding: 20px 40px; 37 | } 38 | } 39 | @media (max-width: 420px) { 40 | #content * { 41 | word-wrap: break-word; 42 | } 43 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Thiago Avelino 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /repo.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "io/ioutil" 5 | "net/http" 6 | "os" 7 | "os/exec" 8 | "text/template" 9 | 10 | "github.com/gorilla/mux" 11 | gfm "github.com/shurcooL/github_flavored_markdown" 12 | ) 13 | 14 | // memory usage optimizations 15 | const ( 16 | emtyStr = "" 17 | git = "git" 18 | checkout = "checkout" 19 | force = "-f" 20 | pull = "pull" 21 | 22 | // options 23 | readmePath = "./README.md" 24 | tplPath = "tmpl/tmpl.html" 25 | idxPath = "tmpl/index.html" 26 | ) 27 | 28 | var ( 29 | doneResp = []byte("Done!\n") 30 | ) 31 | 32 | type content struct { 33 | Body string 34 | } 35 | 36 | func generateHTML() { 37 | // Update repo 38 | exec.Command(git, checkout, force).Output() 39 | exec.Command(git, pull).Output() 40 | 41 | input, _ := ioutil.ReadFile(readmePath) 42 | body := string(gfm.Markdown(input)) 43 | c := &content{Body: body} 44 | 45 | t := template.Must(template.ParseFiles(tplPath)) 46 | f, _ := os.Create(idxPath) 47 | t.Execute(f, c) 48 | } 49 | 50 | func hookHandler(w http.ResponseWriter, r *http.Request) { 51 | go generateHTML() 52 | w.Write(doneResp) 53 | } 54 | 55 | func main() { 56 | r := mux.NewRouter() 57 | r.HandleFunc("/hook", hookHandler) 58 | http.ListenAndServe(":9000", r) 59 | } 60 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please check if what you want to add to `awesome-go` list meets [quality standards](https://github.com/avelino/awesome-go/blob/master/CONTRIBUTING.md#quality-standard) before sending pull request. Thanks! 2 | 3 | **Please provide package links to:** 4 | 5 | - github.com repo: 6 | - godoc.org: 7 | - goreportcard.com: 8 | - coverage service link ([cover.run](https://cover.run/), [gocover](http://gocover.io/), [coveralls](https://coveralls.io/) etc.), example: `![cover.run go](https://cover.run/go/github.com/user/repository.svg)` 9 | 10 | Very good coverage 11 | 12 | **Note**: that new categories can be added only when there are 3 packages or more. 13 | 14 | **Make sure that you've checked the boxes below before you submit PR:** 15 | - [ ] I have added my package in alphabetical order. 16 | - [ ] I have an appropriate description with correct grammar. 17 | - [ ] I know that this package was not listed before. 18 | - [ ] I have added godoc link to the repo and to my pull request. 19 | - [ ] I have added coverage service link to the repo and to my pull request. 20 | - [ ] I have added goreportcard link to the repo and to my pull request. 21 | - [ ] I have read [Contribution guidelines](https://github.com/avelino/awesome-go/blob/master/CONTRIBUTING.md#contribution-guidelines), [maintainers note](https://github.com/avelino/awesome-go/blob/master/CONTRIBUTING.md#maintainers) and [Quality standard](https://github.com/avelino/awesome-go/blob/master/CONTRIBUTING.md#quality-standard). 22 | 23 | Thanks for your PR, you're awesome! :+1: 24 | -------------------------------------------------------------------------------- /tmpl/tmpl.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Awesome Go 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | {{.Body}} 27 |
28 | 29 | 30 | 31 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | This resource was made by the Go community and wouldn't be possible without you! We appreciate and recognize [all contributors](https://github.com/avelino/awesome-go/graphs/contributors). 2 | 3 | Join us on IRC at **#awesome-go** on freenode [web access](http://webchat.freenode.net/?channels=awesome-go) 4 | 5 | 6 | # Contribution Guidelines 7 | 8 | - **To add, remove, or change things on the list:** Submit a pull request 9 | 10 | To set this list apart from and complement the excellent [Go wiki Projects page](https://golang.org/wiki/Projects), awesome-go is a specially curated list for high-quality, actively maintained Go packages and resources. 11 | 12 | - List items should be sorted *alphabetically*. 13 | - Each item should be limited to one link. 14 | - The link should be the name of the package or project. 15 | - Descriptions should be clear, concise, and non-promotional. 16 | - Descriptions should follow the link, on the same line and end with a punctuation mark. 17 | - At least 3 items are needed to create a new category. 18 | 19 | Please contribute links to packages/projects you have used or are familiar with. This will help ensure high-quality entries. 20 | 21 | If you removed our PR template you can find it [here](https://github.com/avelino/awesome-go/blob/master/.github/PULL_REQUEST_TEMPLATE.md). 22 | 23 | 24 | ## Quality standards 25 | 26 | To be on the list, project repositories should adhere to these quality standards (http://goreportcard.com/report/ **github_user** / **github_repo**): 27 | 28 | - Code functions as documented and expected 29 | - Generally useful to the wider community of Go programmers 30 | - Actively maintained 31 | - Regular, recent commits 32 | - Or, for finished projects, issues and pull requests are responded to 33 | - Stable or progressing toward stable 34 | - Thoroughly documented (README, godoc comments, etc.) 35 | - Tests, where practical. If the library/program is testable, then coverage should be >= 80% for non-data-related packages and >=90% for data related packages. **Notice**: the tests will be reviewed too. We will check your coverage manually if your package's coverage is just a benchmark results. 36 | 37 | 38 | ## Maintainers 39 | 40 | To make sure every PR is checked, we have [team maintainers](MAINTAINERS). Every PR MUST be reviewed by at least two maintainers before it can get merged. 41 | 42 | The maintainers will review your PR and notify you and tag it in case any 43 | information is still missing. They will wait 8 days for your interaction, after 44 | that the PR will be closed. 45 | 46 | 47 | ## Reporting issues 48 | 49 | Please open an issue if you would like to discuss anything that could be improved or have suggestions for making the list a more valuable resource. We realize sometimes packages fall into abandonment or have breaking builds for extended periods of time, so if you see that, feel free to change its listing or let us know. We also realize that sometimes projects are just going through transitions or are more experimental in nature. These can still be cool, but we can indicate them as transitory or experimental. 50 | 51 | Removal changes will not be applied until they have been pending for a minimum of 1 week (7 days). This grace window benefits projects that may be going through a temporary transition but are otherwise worthy of being on the list. 52 | 53 | Thanks everyone! 54 | -------------------------------------------------------------------------------- /repo_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "bytes" 5 | "io/ioutil" 6 | "regexp" 7 | "sort" 8 | "strings" 9 | "testing" 10 | 11 | "github.com/PuerkitoBio/goquery" 12 | "github.com/russross/blackfriday" 13 | ) 14 | 15 | func TestAlpha(t *testing.T) { 16 | query := startQuery() 17 | 18 | query.Find("body > ul").Each(func(_ int, s *goquery.Selection) { 19 | testList(t, s) 20 | }) 21 | } 22 | 23 | func TestDuplicatedLinks(t *testing.T) { 24 | query := startQuery() 25 | links := make(map[string]bool, 0) 26 | 27 | query.Find("body li > a:first-child").Each(func(_ int, s *goquery.Selection) { 28 | t.Run(s.Text(), func(t *testing.T) { 29 | href, ok := s.Attr("href") 30 | if !ok { 31 | t.Error("expected to have href") 32 | } 33 | 34 | if links[href] { 35 | t.Fatalf("duplicated link '%s'", href) 36 | } 37 | 38 | links[href] = true 39 | }) 40 | }) 41 | } 42 | 43 | var ( 44 | reContainsLink = regexp.MustCompile(`\* \[.*\]\(.*\)`) 45 | reOnlyLink = regexp.MustCompile(`\* \[.*\]\(.*\)$`) 46 | reLinkWithDescription = regexp.MustCompile(`\* \[.*\]\(.*\) - \S`) 47 | ) 48 | 49 | // Test if an entry has description, it must be separated from link with ` - ` 50 | func TestSeparator(t *testing.T) { 51 | var matched, containsLink, noDescription bool 52 | input, err := ioutil.ReadFile("./README.md") 53 | if err != nil { 54 | panic(err) 55 | } 56 | lines := strings.Split(string(input), "\n") 57 | for _, line := range lines { 58 | line = strings.Trim(line, " ") 59 | containsLink = reContainsLink.MatchString(line) 60 | if containsLink { 61 | noDescription = reOnlyLink.MatchString(line) 62 | if noDescription { 63 | continue 64 | } 65 | 66 | matched = reLinkWithDescription.MatchString(line) 67 | if !matched { 68 | t.Errorf("expected entry to be in form of `* [link] - description`, got '%s'", line) 69 | } 70 | } 71 | } 72 | } 73 | 74 | func testList(t *testing.T, list *goquery.Selection) { 75 | list.Find("ul").Each(func(_ int, items *goquery.Selection) { 76 | testList(t, items) 77 | items.RemoveFiltered("ul") 78 | }) 79 | 80 | category := list.Prev().Text() 81 | 82 | t.Run(category, func(t *testing.T) { 83 | checkAlphabeticOrder(t, list) 84 | }) 85 | } 86 | 87 | func readme() []byte { 88 | input, err := ioutil.ReadFile("./README.md") 89 | if err != nil { 90 | panic(err) 91 | } 92 | html := append([]byte(""), blackfriday.MarkdownCommon(input)...) 93 | html = append(html, []byte("")...) 94 | return html 95 | } 96 | 97 | func startQuery() *goquery.Document { 98 | buf := bytes.NewBuffer(readme()) 99 | query, err := goquery.NewDocumentFromReader(buf) 100 | if err != nil { 101 | panic(err) 102 | } 103 | 104 | return query 105 | } 106 | 107 | func checkAlphabeticOrder(t *testing.T, s *goquery.Selection) { 108 | items := s.Find("li > a:first-child").Map(func(_ int, li *goquery.Selection) string { 109 | return strings.ToLower(li.Text()) 110 | }) 111 | 112 | sorted := make([]string, len(items)) 113 | copy(sorted, items) 114 | sort.Strings(sorted) 115 | 116 | for k, item := range items { 117 | if item != sorted[k] { 118 | t.Errorf("expected '%s' but actual is '%s'", sorted[k], item) 119 | } 120 | } 121 | if t.Failed() { 122 | t.Logf("expected order is:\n%s", strings.Join(sorted, "\n")) 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /tmpl/assets/fonts/firasans.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Fira Sans'; 3 | src: local('Fira Sans ExtraLight'), 4 | local('FiraSans-ExtraLight'), 5 | url('/assets/fonts/firasansextralight.woff2') format('woff2'), 6 | url('/assets/fonts/firasansextralight.woff') format('woff'), 7 | url('/assets/fonts/firasansextralight.ttf') format('truetype'); 8 | font-weight: 100; 9 | font-style: normal; 10 | } 11 | @font-face { 12 | font-family: 'Fira Sans'; 13 | src: local('Fira Sans ExtraLight Italic'), 14 | local('FiraSans-ExtraLightItalic'), 15 | url('/assets/fonts/firasansextralightitalic.woff2') format('woff2'), 16 | url('/assets/fonts/firasansextralightitalic.woff') format('woff'), 17 | url('/assets/fonts/firasansextralightitalic.ttf') format('truetype'); 18 | font-weight: 100; 19 | font-style: italic; 20 | } 21 | @font-face { 22 | font-family: 'Fira Sans'; 23 | src: local('Fira Sans Light'), 24 | local('FiraSans-Light'), 25 | url('/assets/fonts/firasanslight.woff2') format('woff2'), 26 | url('/assets/fonts/firasanslight.woff') format('woff'), 27 | url('/assets/fonts/firasanslight.ttf') format('truetype'); 28 | font-weight: 200; 29 | font-style: normal; 30 | } 31 | @font-face { 32 | font-family: 'Fira Sans'; 33 | src: local('Fira Sans Light Italic'), 34 | local('FiraSans-LightItalic'), 35 | url('/assets/fonts/firasanslightitalic.woff2') format('woff2'), 36 | url('/assets/fonts/firasanslightitalic.woff') format('woff'), 37 | url('/assets/fonts/firasanslightitalic.ttf') format('truetype'); 38 | font-weight: 200; 39 | font-style: italic; 40 | } 41 | @font-face { 42 | font-family: 'Fira Sans'; 43 | src: local('Fira Sans Book'), 44 | local('FiraSans-Book'), 45 | url('/assets/fonts/firasansbook.woff2') format('woff2'), 46 | url('/assets/fonts/firasansbook.woff') format('woff'), 47 | url('/assets/fonts/firasansbook.ttf') format('truetype'); 48 | font-weight: 300; 49 | font-style: normal; 50 | } 51 | @font-face { 52 | font-family: 'Fira Sans'; 53 | src: local('Fira Sans Book Italic'), 54 | local('FiraSans-BookItalic'), 55 | url('/assets/fonts/firasansbookitalic.woff2') format('woff2'), 56 | url('/assets/fonts/firasansbookitalic.woff') format('woff'), 57 | url('/assets/fonts/firasansbookitalic.ttf') format('truetype'); 58 | font-weight: 300; 59 | font-style: italic; 60 | } 61 | @font-face { 62 | font-family: 'Fira Sans'; 63 | src: local('Fira Sans'), 64 | local('FiraSans-Regular'), 65 | url('/assets/fonts/firasans.woff2') format('woff2'), 66 | url('/assets/fonts/firasans.woff') format('woff'), 67 | url('/assets/fonts/firasans.ttf') format('truetype'); 68 | font-weight: 400; 69 | font-style: normal; 70 | } 71 | @font-face { 72 | font-family: 'Fira Sans'; 73 | src: local('Fira Sans Italic'), 74 | local('FiraSans-Italic'), 75 | url('/assets/fonts/firasansitalic.woff2') format('woff2'), 76 | url('/assets/fonts/firasansitalic.woff') format('woff'), 77 | url('/assets/fonts/firasansitalic.ttf') format('truetype'); 78 | font-weight: 400; 79 | font-style: italic; 80 | } 81 | @font-face { 82 | font-family: 'Fira Sans'; 83 | src: local('Fira Sans Medium'), 84 | local('FiraSans-Medium'), 85 | url('/assets/fonts/firasansmedium.woff2') format('woff2'), 86 | url('/assets/fonts/firasansmedium.woff') format('woff'), 87 | url('/assets/fonts/firasansmedium.ttf') format('truetype'); 88 | font-weight: 500; 89 | font-style: normal; 90 | } 91 | @font-face { 92 | font-family: 'Fira Sans'; 93 | src: local('Fira Sans Medium Italic'), 94 | local('FiraSans-MediumItalic'), 95 | url('/assets/fonts/firasansmediumitalic.woff2') format('woff2'), 96 | url('/assets/fonts/firasansmediumitalic.woff') format('woff'), 97 | url('/assets/fonts/firasansmediumitalic.ttf') format('truetype'); 98 | font-weight: 500; 99 | font-style: italic; 100 | } 101 | @font-face { 102 | font-family: 'Fira Sans'; 103 | src: local('Fira Sans SemiBold'), 104 | local('FiraSans-SemiBold'), 105 | url('/assets/fonts/firasanssemibold.woff2') format('woff2'), 106 | url('/assets/fonts/firasanssemibold.woff') format('woff'), 107 | url('/assets/fonts/firasanssemibold.ttf') format('truetype'); 108 | font-weight: 600; 109 | font-style: normal; 110 | } 111 | @font-face { 112 | font-family: 'Fira Sans'; 113 | src: local('Fira Sans SemiBold Italic'), 114 | local('FiraSans-SemiBoldItalic'), 115 | url('/assets/fonts/firasanssemibolditalic.woff2') format('woff2'), 116 | url('/assets/fonts/firasanssemibolditalic.woff') format('woff'), 117 | url('/assets/fonts/firasanssemibolditalic.ttf') format('truetype'); 118 | font-weight: 600; 119 | font-style: italic; 120 | } 121 | @font-face { 122 | font-family: 'Fira Sans'; 123 | src: local('Fira Sans Bold'), 124 | local('FiraSans-Bold'), 125 | url('/assets/fonts/firasansbold.woff2') format('woff2'), 126 | url('/assets/fonts/firasansbold.woff') format('woff'), 127 | url('/assets/fonts/firasansbold.ttf') format('truetype'); 128 | font-weight: 700; 129 | font-style: normal; 130 | } 131 | @font-face { 132 | font-family: 'Fira Sans'; 133 | src: local('Fira Sans Bold Italic'), 134 | local('FiraSans-BoldItalic'), 135 | url('/assets/fonts/firasansbolditalic.woff2') format('woff2'), 136 | url('/assets/fonts/firasansbolditalic.woff') format('woff'), 137 | url('/assets/fonts/firasansbolditalic.ttf') format('truetype'); 138 | font-weight: 700; 139 | font-style: italic; 140 | } 141 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | ## 1. Purpose 4 | 5 | A primary goal of Awesome Go is to be inclusive to the largest number of contributors, with the most varied and diverse backgrounds possible. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, ability, ethnicity, socioeconomic status, and religion (or lack thereof). 6 | 7 | This code of conduct outlines our expectations for all those who participate in our community, as well as the consequences for unacceptable behavior. 8 | 9 | We invite all those who participate in Awesome Go to help us create safe and positive experiences for everyone. 10 | 11 | ## 2. Open Source Citizenship 12 | 13 | A supplemental goal of this Code of Conduct is to increase open source citizenship by encouraging participants to recognize and strengthen the relationships between our actions and their effects on our community. 14 | 15 | Communities mirror the societies in which they exist and positive action is essential to counteract the many forms of inequality and abuses of power that exist in society. 16 | 17 | If you see someone who is making an extra effort to ensure our community is welcoming, friendly, and encourages all participants to contribute to the fullest extent, we want to know. 18 | 19 | ## 3. Expected Behavior 20 | 21 | The following behaviors are expected and requested of all community members: 22 | 23 | * Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community. 24 | * Exercise consideration and respect in your speech and actions. 25 | * Attempt collaboration before conflict. 26 | * Refrain from demeaning, discriminatory, or harassing behavior and speech. 27 | * Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential. 28 | * Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations. 29 | 30 | ## 4. Unacceptable Behavior 31 | 32 | The following behaviors are considered harassment and are unacceptable within our community: 33 | 34 | * Violence, threats of violence or violent language directed against another person. 35 | * Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language. 36 | * Posting or displaying sexually explicit or violent material. 37 | * Posting or threatening to post other people’s personally identifying information ("doxing"). 38 | * Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability. 39 | * Inappropriate photography or recording. 40 | * Inappropriate physical contact. You should have someone’s consent before touching them. 41 | * Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances. 42 | * Deliberate intimidation, stalking or following (online or in person). 43 | * Advocating for, or encouraging, any of the above behavior. 44 | * Sustained disruption of community events, including talks and presentations. 45 | 46 | ## 5. Consequences of Unacceptable Behavior 47 | 48 | Unacceptable behavior from any community member, including sponsors and those with decision-making authority, will not be tolerated. 49 | 50 | Anyone asked to stop unacceptable behavior is expected to comply immediately. 51 | 52 | If a community member engages in unacceptable behavior, the community organizers may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning (and without refund in the case of a paid event). 53 | 54 | ## 6. Reporting Guidelines 55 | 56 | If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community organizer as soon as possible. t@avelino.xxx. 57 | 58 | [Reporting Guidelines](https://github.com/avelino/awesome-go/blob/master/CONTRIBUTING.md#contribution-guidelines) 59 | 60 | Additionally, community organizers are available to help community members engage with local law enforcement or to otherwise help those experiencing unacceptable behavior feel safe. In the context of in-person events, organizers will also provide escorts as desired by the person experiencing distress. 61 | 62 | ## 7. Addressing Grievances 63 | 64 | If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify Avelino with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies. 65 | 66 | [Policy](https://github.com/avelino/awesome-go/blob/master/CONTRIBUTING.md) 67 | 68 | ## 8. Scope 69 | 70 | We expect all community participants (contributors, paid or otherwise; sponsors; and other guests) to abide by this Code of Conduct in all community venues–online and in-person–as well as in all one-on-one communications pertaining to community business. 71 | 72 | This code of conduct and its related procedures also applies to unacceptable behavior occurring outside the scope of community activities when such behavior has the potential to adversely affect the safety and well-being of community members. 73 | 74 | ## 9. Contact info 75 | 76 | t@avelino.xxx 77 | 78 | ## 10. License and attribution 79 | 80 | This Code of Conduct is distributed under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/). 81 | 82 | Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy). 83 | 84 | Retrieved on November 22, 2016 from [http://citizencodeofconduct.org/](http://citizencodeofconduct.org/) 85 | -------------------------------------------------------------------------------- /tmpl/assets/normalize.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v3.0.1 | MIT License | git.io/normalize */ 2 | 3 | /** 4 | * 1. Set default font family to sans-serif. 5 | * 2. Prevent iOS text size adjust after orientation change, without disabling 6 | * user zoom. 7 | */ 8 | 9 | html { 10 | font-family: sans-serif; /* 1 */ 11 | -ms-text-size-adjust: 100%; /* 2 */ 12 | -webkit-text-size-adjust: 100%; /* 2 */ 13 | } 14 | 15 | /** 16 | * Remove default margin. 17 | */ 18 | 19 | body { 20 | margin: 0; 21 | } 22 | 23 | /* HTML5 display definitions 24 | ========================================================================== */ 25 | 26 | /** 27 | * Correct `block` display not defined for any HTML5 element in IE 8/9. 28 | * Correct `block` display not defined for `details` or `summary` in IE 10/11 and Firefox. 29 | * Correct `block` display not defined for `main` in IE 11. 30 | */ 31 | 32 | article, 33 | aside, 34 | details, 35 | figcaption, 36 | figure, 37 | footer, 38 | header, 39 | hgroup, 40 | main, 41 | nav, 42 | section, 43 | summary { 44 | display: block; 45 | } 46 | 47 | /** 48 | * 1. Correct `inline-block` display not defined in IE 8/9. 49 | * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. 50 | */ 51 | 52 | audio, 53 | canvas, 54 | progress, 55 | video { 56 | display: inline-block; /* 1 */ 57 | vertical-align: baseline; /* 2 */ 58 | } 59 | 60 | /** 61 | * Prevent modern browsers from displaying `audio` without controls. 62 | * Remove excess height in iOS 5 devices. 63 | */ 64 | 65 | audio:not([controls]) { 66 | display: none; 67 | height: 0; 68 | } 69 | 70 | /** 71 | * Address `[hidden]` styling not present in IE 8/9/10. 72 | * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. 73 | */ 74 | 75 | [hidden], 76 | template { 77 | display: none; 78 | } 79 | 80 | /* Links 81 | ========================================================================== */ 82 | 83 | /** 84 | * Remove the gray background color from active links in IE 10. 85 | */ 86 | 87 | a { 88 | background: transparent; 89 | } 90 | 91 | /** 92 | * Improve readability when focused and also mouse hovered in all browsers. 93 | */ 94 | 95 | a:active, 96 | a:hover { 97 | outline: 0; 98 | } 99 | 100 | /* Text-level semantics 101 | ========================================================================== */ 102 | 103 | /** 104 | * Address styling not present in IE 8/9/10/11, Safari, and Chrome. 105 | */ 106 | 107 | abbr[title] { 108 | border-bottom: 1px dotted; 109 | } 110 | 111 | /** 112 | * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. 113 | */ 114 | 115 | b, 116 | strong { 117 | font-weight: bold; 118 | } 119 | 120 | /** 121 | * Address styling not present in Safari and Chrome. 122 | */ 123 | 124 | dfn { 125 | font-style: italic; 126 | } 127 | 128 | /** 129 | * Address variable `h1` font-size and margin within `section` and `article` 130 | * contexts in Firefox 4+, Safari, and Chrome. 131 | */ 132 | 133 | h1 { 134 | font-size: 2em; 135 | margin: 0.67em 0; 136 | } 137 | 138 | /** 139 | * Address styling not present in IE 8/9. 140 | */ 141 | 142 | mark { 143 | background: #ff0; 144 | color: #000; 145 | } 146 | 147 | /** 148 | * Address inconsistent and variable font size in all browsers. 149 | */ 150 | 151 | small { 152 | font-size: 80%; 153 | } 154 | 155 | /** 156 | * Prevent `sub` and `sup` affecting `line-height` in all browsers. 157 | */ 158 | 159 | sub, 160 | sup { 161 | font-size: 75%; 162 | line-height: 0; 163 | position: relative; 164 | vertical-align: baseline; 165 | } 166 | 167 | sup { 168 | top: -0.5em; 169 | } 170 | 171 | sub { 172 | bottom: -0.25em; 173 | } 174 | 175 | /* Embedded content 176 | ========================================================================== */ 177 | 178 | /** 179 | * Remove border when inside `a` element in IE 8/9/10. 180 | */ 181 | 182 | img { 183 | border: 0; 184 | } 185 | 186 | /** 187 | * Correct overflow not hidden in IE 9/10/11. 188 | */ 189 | 190 | svg:not(:root) { 191 | overflow: hidden; 192 | } 193 | 194 | /* Grouping content 195 | ========================================================================== */ 196 | 197 | /** 198 | * Address margin not present in IE 8/9 and Safari. 199 | */ 200 | 201 | figure { 202 | margin: 1em 40px; 203 | } 204 | 205 | /** 206 | * Address differences between Firefox and other browsers. 207 | */ 208 | 209 | hr { 210 | -moz-box-sizing: content-box; 211 | box-sizing: content-box; 212 | height: 0; 213 | } 214 | 215 | /** 216 | * Contain overflow in all browsers. 217 | */ 218 | 219 | pre { 220 | overflow: auto; 221 | } 222 | 223 | /** 224 | * Address odd `em`-unit font size rendering in all browsers. 225 | */ 226 | 227 | code, 228 | kbd, 229 | pre, 230 | samp { 231 | font-family: monospace, monospace; 232 | font-size: 1em; 233 | } 234 | 235 | /* Forms 236 | ========================================================================== */ 237 | 238 | /** 239 | * Known limitation: by default, Chrome and Safari on OS X allow very limited 240 | * styling of `select`, unless a `border` property is set. 241 | */ 242 | 243 | /** 244 | * 1. Correct color not being inherited. 245 | * Known issue: affects color of disabled elements. 246 | * 2. Correct font properties not being inherited. 247 | * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. 248 | */ 249 | 250 | button, 251 | input, 252 | optgroup, 253 | select, 254 | textarea { 255 | color: inherit; /* 1 */ 256 | font: inherit; /* 2 */ 257 | margin: 0; /* 3 */ 258 | } 259 | 260 | /** 261 | * Address `overflow` set to `hidden` in IE 8/9/10/11. 262 | */ 263 | 264 | button { 265 | overflow: visible; 266 | } 267 | 268 | /** 269 | * Address inconsistent `text-transform` inheritance for `button` and `select`. 270 | * All other form control elements do not inherit `text-transform` values. 271 | * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. 272 | * Correct `select` style inheritance in Firefox. 273 | */ 274 | 275 | button, 276 | select { 277 | text-transform: none; 278 | } 279 | 280 | /** 281 | * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` 282 | * and `video` controls. 283 | * 2. Correct inability to style clickable `input` types in iOS. 284 | * 3. Improve usability and consistency of cursor style between image-type 285 | * `input` and others. 286 | */ 287 | 288 | button, 289 | html input[type="button"], /* 1 */ 290 | input[type="reset"], 291 | input[type="submit"] { 292 | -webkit-appearance: button; /* 2 */ 293 | cursor: pointer; /* 3 */ 294 | } 295 | 296 | /** 297 | * Re-set default cursor for disabled elements. 298 | */ 299 | 300 | button[disabled], 301 | html input[disabled] { 302 | cursor: default; 303 | } 304 | 305 | /** 306 | * Remove inner padding and border in Firefox 4+. 307 | */ 308 | 309 | button::-moz-focus-inner, 310 | input::-moz-focus-inner { 311 | border: 0; 312 | padding: 0; 313 | } 314 | 315 | /** 316 | * Address Firefox 4+ setting `line-height` on `input` using `!important` in 317 | * the UA stylesheet. 318 | */ 319 | 320 | input { 321 | line-height: normal; 322 | } 323 | 324 | /** 325 | * It's recommended that you don't attempt to style these elements. 326 | * Firefox's implementation doesn't respect box-sizing, padding, or width. 327 | * 328 | * 1. Address box sizing set to `content-box` in IE 8/9/10. 329 | * 2. Remove excess padding in IE 8/9/10. 330 | */ 331 | 332 | input[type="checkbox"], 333 | input[type="radio"] { 334 | box-sizing: border-box; /* 1 */ 335 | padding: 0; /* 2 */ 336 | } 337 | 338 | /** 339 | * Fix the cursor style for Chrome's increment/decrement buttons. For certain 340 | * `font-size` values of the `input`, it causes the cursor style of the 341 | * decrement button to change from `default` to `text`. 342 | */ 343 | 344 | input[type="number"]::-webkit-inner-spin-button, 345 | input[type="number"]::-webkit-outer-spin-button { 346 | height: auto; 347 | } 348 | 349 | /** 350 | * 1. Address `appearance` set to `searchfield` in Safari and Chrome. 351 | * 2. Address `box-sizing` set to `border-box` in Safari and Chrome 352 | * (include `-moz` to future-proof). 353 | */ 354 | 355 | input[type="search"] { 356 | -webkit-appearance: textfield; /* 1 */ 357 | -moz-box-sizing: content-box; 358 | -webkit-box-sizing: content-box; /* 2 */ 359 | box-sizing: content-box; 360 | } 361 | 362 | /** 363 | * Remove inner padding and search cancel button in Safari and Chrome on OS X. 364 | * Safari (but not Chrome) clips the cancel button when the search input has 365 | * padding (and `textfield` appearance). 366 | */ 367 | 368 | input[type="search"]::-webkit-search-cancel-button, 369 | input[type="search"]::-webkit-search-decoration { 370 | -webkit-appearance: none; 371 | } 372 | 373 | /** 374 | * Define consistent border, margin, and padding. 375 | */ 376 | 377 | fieldset { 378 | border: 1px solid #c0c0c0; 379 | margin: 0 2px; 380 | padding: 0.35em 0.625em 0.75em; 381 | } 382 | 383 | /** 384 | * 1. Correct `color` not being inherited in IE 8/9/10/11. 385 | * 2. Remove padding so people aren't caught out if they zero out fieldsets. 386 | */ 387 | 388 | legend { 389 | border: 0; /* 1 */ 390 | padding: 0; /* 2 */ 391 | } 392 | 393 | /** 394 | * Remove default vertical scrollbar in IE 8/9/10/11. 395 | */ 396 | 397 | textarea { 398 | overflow: auto; 399 | } 400 | 401 | /** 402 | * Don't inherit the `font-weight` (applied by a rule above). 403 | * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. 404 | */ 405 | 406 | optgroup { 407 | font-weight: bold; 408 | } 409 | 410 | /* Tables 411 | ========================================================================== */ 412 | 413 | /** 414 | * Remove most spacing between table cells. 415 | */ 416 | 417 | table { 418 | border-collapse: collapse; 419 | border-spacing: 0; 420 | } 421 | 422 | td, 423 | th { 424 | padding: 0; 425 | } 426 | -------------------------------------------------------------------------------- /tmpl/assets/marked.js: -------------------------------------------------------------------------------- 1 | /** 2 | * marked - a markdown parser 3 | * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed) 4 | * https://github.com/chjj/marked 5 | */ 6 | 7 | ;(function() { 8 | 9 | /** 10 | * Block-Level Grammar 11 | */ 12 | 13 | var block = { 14 | newline: /^\n+/, 15 | code: /^( {4}[^\n]+\n*)+/, 16 | fences: noop, 17 | hr: /^( *[-*_]){3,} *(?:\n+|$)/, 18 | heading: /^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/, 19 | nptable: noop, 20 | lheading: /^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/, 21 | blockquote: /^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/, 22 | list: /^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/, 23 | html: /^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/, 24 | def: /^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/, 25 | table: noop, 26 | paragraph: /^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/, 27 | text: /^[^\n]+/ 28 | }; 29 | 30 | block.bullet = /(?:[*+-]|\d+\.)/; 31 | block.item = /^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/; 32 | block.item = replace(block.item, 'gm') 33 | (/bull/g, block.bullet) 34 | (); 35 | 36 | block.list = replace(block.list) 37 | (/bull/g, block.bullet) 38 | ('hr', '\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))') 39 | ('def', '\\n+(?=' + block.def.source + ')') 40 | (); 41 | 42 | block.blockquote = replace(block.blockquote) 43 | ('def', block.def) 44 | (); 45 | 46 | block._tag = '(?!(?:' 47 | + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code' 48 | + '|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo' 49 | + '|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b'; 50 | 51 | block.html = replace(block.html) 52 | ('comment', //) 53 | ('closed', /<(tag)[\s\S]+?<\/\1>/) 54 | ('closing', /])*?>/) 55 | (/tag/g, block._tag) 56 | (); 57 | 58 | block.paragraph = replace(block.paragraph) 59 | ('hr', block.hr) 60 | ('heading', block.heading) 61 | ('lheading', block.lheading) 62 | ('blockquote', block.blockquote) 63 | ('tag', '<' + block._tag) 64 | ('def', block.def) 65 | (); 66 | 67 | /** 68 | * Normal Block Grammar 69 | */ 70 | 71 | block.normal = merge({}, block); 72 | 73 | /** 74 | * GFM Block Grammar 75 | */ 76 | 77 | block.gfm = merge({}, block.normal, { 78 | fences: /^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/, 79 | paragraph: /^/, 80 | heading: /^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/ 81 | }); 82 | 83 | block.gfm.paragraph = replace(block.paragraph) 84 | ('(?!', '(?!' 85 | + block.gfm.fences.source.replace('\\1', '\\2') + '|' 86 | + block.list.source.replace('\\1', '\\3') + '|') 87 | (); 88 | 89 | /** 90 | * GFM + Tables Block Grammar 91 | */ 92 | 93 | block.tables = merge({}, block.gfm, { 94 | nptable: /^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/, 95 | table: /^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/ 96 | }); 97 | 98 | /** 99 | * Block Lexer 100 | */ 101 | 102 | function Lexer(options) { 103 | this.tokens = []; 104 | this.tokens.links = {}; 105 | this.options = options || marked.defaults; 106 | this.rules = block.normal; 107 | 108 | if (this.options.gfm) { 109 | if (this.options.tables) { 110 | this.rules = block.tables; 111 | } else { 112 | this.rules = block.gfm; 113 | } 114 | } 115 | } 116 | 117 | /** 118 | * Expose Block Rules 119 | */ 120 | 121 | Lexer.rules = block; 122 | 123 | /** 124 | * Static Lex Method 125 | */ 126 | 127 | Lexer.lex = function(src, options) { 128 | var lexer = new Lexer(options); 129 | return lexer.lex(src); 130 | }; 131 | 132 | /** 133 | * Preprocessing 134 | */ 135 | 136 | Lexer.prototype.lex = function(src) { 137 | src = src 138 | .replace(/\r\n|\r/g, '\n') 139 | .replace(/\t/g, ' ') 140 | .replace(/\u00a0/g, ' ') 141 | .replace(/\u2424/g, '\n'); 142 | 143 | return this.token(src, true); 144 | }; 145 | 146 | /** 147 | * Lexing 148 | */ 149 | 150 | Lexer.prototype.token = function(src, top, bq) { 151 | var src = src.replace(/^ +$/gm, '') 152 | , next 153 | , loose 154 | , cap 155 | , bull 156 | , b 157 | , item 158 | , space 159 | , i 160 | , l; 161 | 162 | while (src) { 163 | // newline 164 | if (cap = this.rules.newline.exec(src)) { 165 | src = src.substring(cap[0].length); 166 | if (cap[0].length > 1) { 167 | this.tokens.push({ 168 | type: 'space' 169 | }); 170 | } 171 | } 172 | 173 | // code 174 | if (cap = this.rules.code.exec(src)) { 175 | src = src.substring(cap[0].length); 176 | cap = cap[0].replace(/^ {4}/gm, ''); 177 | this.tokens.push({ 178 | type: 'code', 179 | text: !this.options.pedantic 180 | ? cap.replace(/\n+$/, '') 181 | : cap 182 | }); 183 | continue; 184 | } 185 | 186 | // fences (gfm) 187 | if (cap = this.rules.fences.exec(src)) { 188 | src = src.substring(cap[0].length); 189 | this.tokens.push({ 190 | type: 'code', 191 | lang: cap[2], 192 | text: cap[3] || '' 193 | }); 194 | continue; 195 | } 196 | 197 | // heading 198 | if (cap = this.rules.heading.exec(src)) { 199 | src = src.substring(cap[0].length); 200 | this.tokens.push({ 201 | type: 'heading', 202 | depth: cap[1].length, 203 | text: cap[2] 204 | }); 205 | continue; 206 | } 207 | 208 | // table no leading pipe (gfm) 209 | if (top && (cap = this.rules.nptable.exec(src))) { 210 | src = src.substring(cap[0].length); 211 | 212 | item = { 213 | type: 'table', 214 | header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */), 215 | align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), 216 | cells: cap[3].replace(/\n$/, '').split('\n') 217 | }; 218 | 219 | for (i = 0; i < item.align.length; i++) { 220 | if (/^ *-+: *$/.test(item.align[i])) { 221 | item.align[i] = 'right'; 222 | } else if (/^ *:-+: *$/.test(item.align[i])) { 223 | item.align[i] = 'center'; 224 | } else if (/^ *:-+ *$/.test(item.align[i])) { 225 | item.align[i] = 'left'; 226 | } else { 227 | item.align[i] = null; 228 | } 229 | } 230 | 231 | for (i = 0; i < item.cells.length; i++) { 232 | item.cells[i] = item.cells[i].split(/ *\| */); 233 | } 234 | 235 | this.tokens.push(item); 236 | 237 | continue; 238 | } 239 | 240 | // lheading 241 | if (cap = this.rules.lheading.exec(src)) { 242 | src = src.substring(cap[0].length); 243 | this.tokens.push({ 244 | type: 'heading', 245 | depth: cap[2] === '=' ? 1 : 2, 246 | text: cap[1] 247 | }); 248 | continue; 249 | } 250 | 251 | // hr 252 | if (cap = this.rules.hr.exec(src)) { 253 | src = src.substring(cap[0].length); 254 | this.tokens.push({ 255 | type: 'hr' 256 | }); 257 | continue; 258 | } 259 | 260 | // blockquote 261 | if (cap = this.rules.blockquote.exec(src)) { 262 | src = src.substring(cap[0].length); 263 | 264 | this.tokens.push({ 265 | type: 'blockquote_start' 266 | }); 267 | 268 | cap = cap[0].replace(/^ *> ?/gm, ''); 269 | 270 | // Pass `top` to keep the current 271 | // "toplevel" state. This is exactly 272 | // how markdown.pl works. 273 | this.token(cap, top, true); 274 | 275 | this.tokens.push({ 276 | type: 'blockquote_end' 277 | }); 278 | 279 | continue; 280 | } 281 | 282 | // list 283 | if (cap = this.rules.list.exec(src)) { 284 | src = src.substring(cap[0].length); 285 | bull = cap[2]; 286 | 287 | this.tokens.push({ 288 | type: 'list_start', 289 | ordered: bull.length > 1 290 | }); 291 | 292 | // Get each top-level item. 293 | cap = cap[0].match(this.rules.item); 294 | 295 | next = false; 296 | l = cap.length; 297 | i = 0; 298 | 299 | for (; i < l; i++) { 300 | item = cap[i]; 301 | 302 | // Remove the list item's bullet 303 | // so it is seen as the next token. 304 | space = item.length; 305 | item = item.replace(/^ *([*+-]|\d+\.) +/, ''); 306 | 307 | // Outdent whatever the 308 | // list item contains. Hacky. 309 | if (~item.indexOf('\n ')) { 310 | space -= item.length; 311 | item = !this.options.pedantic 312 | ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '') 313 | : item.replace(/^ {1,4}/gm, ''); 314 | } 315 | 316 | // Determine whether the next list item belongs here. 317 | // Backpedal if it does not belong in this list. 318 | if (this.options.smartLists && i !== l - 1) { 319 | b = block.bullet.exec(cap[i + 1])[0]; 320 | if (bull !== b && !(bull.length > 1 && b.length > 1)) { 321 | src = cap.slice(i + 1).join('\n') + src; 322 | i = l - 1; 323 | } 324 | } 325 | 326 | // Determine whether item is loose or not. 327 | // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/ 328 | // for discount behavior. 329 | loose = next || /\n\n(?!\s*$)/.test(item); 330 | if (i !== l - 1) { 331 | next = item.charAt(item.length - 1) === '\n'; 332 | if (!loose) loose = next; 333 | } 334 | 335 | this.tokens.push({ 336 | type: loose 337 | ? 'loose_item_start' 338 | : 'list_item_start' 339 | }); 340 | 341 | // Recurse. 342 | this.token(item, false, bq); 343 | 344 | this.tokens.push({ 345 | type: 'list_item_end' 346 | }); 347 | } 348 | 349 | this.tokens.push({ 350 | type: 'list_end' 351 | }); 352 | 353 | continue; 354 | } 355 | 356 | // html 357 | if (cap = this.rules.html.exec(src)) { 358 | src = src.substring(cap[0].length); 359 | this.tokens.push({ 360 | type: this.options.sanitize 361 | ? 'paragraph' 362 | : 'html', 363 | pre: !this.options.sanitizer 364 | && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'), 365 | text: cap[0] 366 | }); 367 | continue; 368 | } 369 | 370 | // def 371 | if ((!bq && top) && (cap = this.rules.def.exec(src))) { 372 | src = src.substring(cap[0].length); 373 | this.tokens.links[cap[1].toLowerCase()] = { 374 | href: cap[2], 375 | title: cap[3] 376 | }; 377 | continue; 378 | } 379 | 380 | // table (gfm) 381 | if (top && (cap = this.rules.table.exec(src))) { 382 | src = src.substring(cap[0].length); 383 | 384 | item = { 385 | type: 'table', 386 | header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */), 387 | align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), 388 | cells: cap[3].replace(/(?: *\| *)?\n$/, '').split('\n') 389 | }; 390 | 391 | for (i = 0; i < item.align.length; i++) { 392 | if (/^ *-+: *$/.test(item.align[i])) { 393 | item.align[i] = 'right'; 394 | } else if (/^ *:-+: *$/.test(item.align[i])) { 395 | item.align[i] = 'center'; 396 | } else if (/^ *:-+ *$/.test(item.align[i])) { 397 | item.align[i] = 'left'; 398 | } else { 399 | item.align[i] = null; 400 | } 401 | } 402 | 403 | for (i = 0; i < item.cells.length; i++) { 404 | item.cells[i] = item.cells[i] 405 | .replace(/^ *\| *| *\| *$/g, '') 406 | .split(/ *\| */); 407 | } 408 | 409 | this.tokens.push(item); 410 | 411 | continue; 412 | } 413 | 414 | // top-level paragraph 415 | if (top && (cap = this.rules.paragraph.exec(src))) { 416 | src = src.substring(cap[0].length); 417 | this.tokens.push({ 418 | type: 'paragraph', 419 | text: cap[1].charAt(cap[1].length - 1) === '\n' 420 | ? cap[1].slice(0, -1) 421 | : cap[1] 422 | }); 423 | continue; 424 | } 425 | 426 | // text 427 | if (cap = this.rules.text.exec(src)) { 428 | // Top-level should never reach here. 429 | src = src.substring(cap[0].length); 430 | this.tokens.push({ 431 | type: 'text', 432 | text: cap[0] 433 | }); 434 | continue; 435 | } 436 | 437 | if (src) { 438 | throw new 439 | Error('Infinite loop on byte: ' + src.charCodeAt(0)); 440 | } 441 | } 442 | 443 | return this.tokens; 444 | }; 445 | 446 | /** 447 | * Inline-Level Grammar 448 | */ 449 | 450 | var inline = { 451 | escape: /^\\([\\`*{}\[\]()#+\-.!_>])/, 452 | autolink: /^<([^ >]+(@|:\/)[^ >]+)>/, 453 | url: noop, 454 | tag: /^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/, 455 | link: /^!?\[(inside)\]\(href\)/, 456 | reflink: /^!?\[(inside)\]\s*\[([^\]]*)\]/, 457 | nolink: /^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/, 458 | strong: /^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/, 459 | em: /^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/, 460 | code: /^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/, 461 | br: /^ {2,}\n(?!\s*$)/, 462 | del: noop, 463 | text: /^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/; 468 | 469 | inline.link = replace(inline.link) 470 | ('inside', inline._inside) 471 | ('href', inline._href) 472 | (); 473 | 474 | inline.reflink = replace(inline.reflink) 475 | ('inside', inline._inside) 476 | (); 477 | 478 | /** 479 | * Normal Inline Grammar 480 | */ 481 | 482 | inline.normal = merge({}, inline); 483 | 484 | /** 485 | * Pedantic Inline Grammar 486 | */ 487 | 488 | inline.pedantic = merge({}, inline.normal, { 489 | strong: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/, 490 | em: /^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/ 491 | }); 492 | 493 | /** 494 | * GFM Inline Grammar 495 | */ 496 | 497 | inline.gfm = merge({}, inline.normal, { 498 | escape: replace(inline.escape)('])', '~|])')(), 499 | url: /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, 500 | del: /^~~(?=\S)([\s\S]*?\S)~~/, 501 | text: replace(inline.text) 502 | (']|', '~]|') 503 | ('|', '|https?://|') 504 | () 505 | }); 506 | 507 | /** 508 | * GFM + Line Breaks Inline Grammar 509 | */ 510 | 511 | inline.breaks = merge({}, inline.gfm, { 512 | br: replace(inline.br)('{2,}', '*')(), 513 | text: replace(inline.gfm.text)('{2,}', '*')() 514 | }); 515 | 516 | /** 517 | * Inline Lexer & Compiler 518 | */ 519 | 520 | function InlineLexer(links, options) { 521 | this.options = options || marked.defaults; 522 | this.links = links; 523 | this.rules = inline.normal; 524 | this.renderer = this.options.renderer || new Renderer; 525 | this.renderer.options = this.options; 526 | 527 | if (!this.links) { 528 | throw new 529 | Error('Tokens array requires a `links` property.'); 530 | } 531 | 532 | if (this.options.gfm) { 533 | if (this.options.breaks) { 534 | this.rules = inline.breaks; 535 | } else { 536 | this.rules = inline.gfm; 537 | } 538 | } else if (this.options.pedantic) { 539 | this.rules = inline.pedantic; 540 | } 541 | } 542 | 543 | /** 544 | * Expose Inline Rules 545 | */ 546 | 547 | InlineLexer.rules = inline; 548 | 549 | /** 550 | * Static Lexing/Compiling Method 551 | */ 552 | 553 | InlineLexer.output = function(src, links, options) { 554 | var inline = new InlineLexer(links, options); 555 | return inline.output(src); 556 | }; 557 | 558 | /** 559 | * Lexing/Compiling 560 | */ 561 | 562 | InlineLexer.prototype.output = function(src) { 563 | var out = '' 564 | , link 565 | , text 566 | , href 567 | , cap; 568 | 569 | while (src) { 570 | // escape 571 | if (cap = this.rules.escape.exec(src)) { 572 | src = src.substring(cap[0].length); 573 | out += cap[1]; 574 | continue; 575 | } 576 | 577 | // autolink 578 | if (cap = this.rules.autolink.exec(src)) { 579 | src = src.substring(cap[0].length); 580 | if (cap[2] === '@') { 581 | text = cap[1].charAt(6) === ':' 582 | ? this.mangle(cap[1].substring(7)) 583 | : this.mangle(cap[1]); 584 | href = this.mangle('mailto:') + text; 585 | } else { 586 | text = escape(cap[1]); 587 | href = text; 588 | } 589 | out += this.renderer.link(href, null, text); 590 | continue; 591 | } 592 | 593 | // url (gfm) 594 | if (!this.inLink && (cap = this.rules.url.exec(src))) { 595 | src = src.substring(cap[0].length); 596 | text = escape(cap[1]); 597 | href = text; 598 | out += this.renderer.link(href, null, text); 599 | continue; 600 | } 601 | 602 | // tag 603 | if (cap = this.rules.tag.exec(src)) { 604 | if (!this.inLink && /^/i.test(cap[0])) { 607 | this.inLink = false; 608 | } 609 | src = src.substring(cap[0].length); 610 | out += this.options.sanitize 611 | ? this.options.sanitizer 612 | ? this.options.sanitizer(cap[0]) 613 | : escape(cap[0]) 614 | : cap[0] 615 | continue; 616 | } 617 | 618 | // link 619 | if (cap = this.rules.link.exec(src)) { 620 | src = src.substring(cap[0].length); 621 | this.inLink = true; 622 | out += this.outputLink(cap, { 623 | href: cap[2], 624 | title: cap[3] 625 | }); 626 | this.inLink = false; 627 | continue; 628 | } 629 | 630 | // reflink, nolink 631 | if ((cap = this.rules.reflink.exec(src)) 632 | || (cap = this.rules.nolink.exec(src))) { 633 | src = src.substring(cap[0].length); 634 | link = (cap[2] || cap[1]).replace(/\s+/g, ' '); 635 | link = this.links[link.toLowerCase()]; 636 | if (!link || !link.href) { 637 | out += cap[0].charAt(0); 638 | src = cap[0].substring(1) + src; 639 | continue; 640 | } 641 | this.inLink = true; 642 | out += this.outputLink(cap, link); 643 | this.inLink = false; 644 | continue; 645 | } 646 | 647 | // strong 648 | if (cap = this.rules.strong.exec(src)) { 649 | src = src.substring(cap[0].length); 650 | out += this.renderer.strong(this.output(cap[2] || cap[1])); 651 | continue; 652 | } 653 | 654 | // em 655 | if (cap = this.rules.em.exec(src)) { 656 | src = src.substring(cap[0].length); 657 | out += this.renderer.em(this.output(cap[2] || cap[1])); 658 | continue; 659 | } 660 | 661 | // code 662 | if (cap = this.rules.code.exec(src)) { 663 | src = src.substring(cap[0].length); 664 | out += this.renderer.codespan(escape(cap[2], true)); 665 | continue; 666 | } 667 | 668 | // br 669 | if (cap = this.rules.br.exec(src)) { 670 | src = src.substring(cap[0].length); 671 | out += this.renderer.br(); 672 | continue; 673 | } 674 | 675 | // del (gfm) 676 | if (cap = this.rules.del.exec(src)) { 677 | src = src.substring(cap[0].length); 678 | out += this.renderer.del(this.output(cap[1])); 679 | continue; 680 | } 681 | 682 | // text 683 | if (cap = this.rules.text.exec(src)) { 684 | src = src.substring(cap[0].length); 685 | out += this.renderer.text(escape(this.smartypants(cap[0]))); 686 | continue; 687 | } 688 | 689 | if (src) { 690 | throw new 691 | Error('Infinite loop on byte: ' + src.charCodeAt(0)); 692 | } 693 | } 694 | 695 | return out; 696 | }; 697 | 698 | /** 699 | * Compile Link 700 | */ 701 | 702 | InlineLexer.prototype.outputLink = function(cap, link) { 703 | var href = escape(link.href) 704 | , title = link.title ? escape(link.title) : null; 705 | 706 | return cap[0].charAt(0) !== '!' 707 | ? this.renderer.link(href, title, this.output(cap[1])) 708 | : this.renderer.image(href, title, escape(cap[1])); 709 | }; 710 | 711 | /** 712 | * Smartypants Transformations 713 | */ 714 | 715 | InlineLexer.prototype.smartypants = function(text) { 716 | if (!this.options.smartypants) return text; 717 | return text 718 | // em-dashes 719 | .replace(/---/g, '\u2014') 720 | // en-dashes 721 | .replace(/--/g, '\u2013') 722 | // opening singles 723 | .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018') 724 | // closing singles & apostrophes 725 | .replace(/'/g, '\u2019') 726 | // opening doubles 727 | .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c') 728 | // closing doubles 729 | .replace(/"/g, '\u201d') 730 | // ellipses 731 | .replace(/\.{3}/g, '\u2026'); 732 | }; 733 | 734 | /** 735 | * Mangle Links 736 | */ 737 | 738 | InlineLexer.prototype.mangle = function(text) { 739 | if (!this.options.mangle) return text; 740 | var out = '' 741 | , l = text.length 742 | , i = 0 743 | , ch; 744 | 745 | for (; i < l; i++) { 746 | ch = text.charCodeAt(i); 747 | if (Math.random() > 0.5) { 748 | ch = 'x' + ch.toString(16); 749 | } 750 | out += '&#' + ch + ';'; 751 | } 752 | 753 | return out; 754 | }; 755 | 756 | /** 757 | * Renderer 758 | */ 759 | 760 | function Renderer(options) { 761 | this.options = options || {}; 762 | } 763 | 764 | Renderer.prototype.code = function(code, lang, escaped) { 765 | if (this.options.highlight) { 766 | var out = this.options.highlight(code, lang); 767 | if (out != null && out !== code) { 768 | escaped = true; 769 | code = out; 770 | } 771 | } 772 | 773 | if (!lang) { 774 | return '
'
 775 |       + (escaped ? code : escape(code, true))
 776 |       + '\n
'; 777 | } 778 | 779 | return '
'
 783 |     + (escaped ? code : escape(code, true))
 784 |     + '\n
\n'; 785 | }; 786 | 787 | Renderer.prototype.blockquote = function(quote) { 788 | return '
\n' + quote + '
\n'; 789 | }; 790 | 791 | Renderer.prototype.html = function(html) { 792 | return html; 793 | }; 794 | 795 | Renderer.prototype.heading = function(text, level, raw) { 796 | return '' 802 | + text 803 | + '\n'; 806 | }; 807 | 808 | Renderer.prototype.hr = function() { 809 | return this.options.xhtml ? '
\n' : '
\n'; 810 | }; 811 | 812 | Renderer.prototype.list = function(body, ordered) { 813 | var type = ordered ? 'ol' : 'ul'; 814 | return '<' + type + '>\n' + body + '\n'; 815 | }; 816 | 817 | Renderer.prototype.listitem = function(text) { 818 | return '
  • ' + text + '
  • \n'; 819 | }; 820 | 821 | Renderer.prototype.paragraph = function(text) { 822 | return '

    ' + text + '

    \n'; 823 | }; 824 | 825 | Renderer.prototype.table = function(header, body) { 826 | return '\n' 827 | + '\n' 828 | + header 829 | + '\n' 830 | + '\n' 831 | + body 832 | + '\n' 833 | + '
    \n'; 834 | }; 835 | 836 | Renderer.prototype.tablerow = function(content) { 837 | return '\n' + content + '\n'; 838 | }; 839 | 840 | Renderer.prototype.tablecell = function(content, flags) { 841 | var type = flags.header ? 'th' : 'td'; 842 | var tag = flags.align 843 | ? '<' + type + ' style="text-align:' + flags.align + '">' 844 | : '<' + type + '>'; 845 | return tag + content + '\n'; 846 | }; 847 | 848 | // span level renderer 849 | Renderer.prototype.strong = function(text) { 850 | return '' + text + ''; 851 | }; 852 | 853 | Renderer.prototype.em = function(text) { 854 | return '' + text + ''; 855 | }; 856 | 857 | Renderer.prototype.codespan = function(text) { 858 | return '' + text + ''; 859 | }; 860 | 861 | Renderer.prototype.br = function() { 862 | return this.options.xhtml ? '
    ' : '
    '; 863 | }; 864 | 865 | Renderer.prototype.del = function(text) { 866 | return '' + text + ''; 867 | }; 868 | 869 | Renderer.prototype.link = function(href, title, text) { 870 | if (this.options.sanitize) { 871 | try { 872 | var prot = decodeURIComponent(unescape(href)) 873 | .replace(/[^\w:]/g, '') 874 | .toLowerCase(); 875 | } catch (e) { 876 | return ''; 877 | } 878 | if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0) { 879 | return ''; 880 | } 881 | } 882 | var out = '
    '; 887 | return out; 888 | }; 889 | 890 | Renderer.prototype.image = function(href, title, text) { 891 | var out = '' + text + '' : '>'; 896 | return out; 897 | }; 898 | 899 | Renderer.prototype.text = function(text) { 900 | return text; 901 | }; 902 | 903 | /** 904 | * Parsing & Compiling 905 | */ 906 | 907 | function Parser(options) { 908 | this.tokens = []; 909 | this.token = null; 910 | this.options = options || marked.defaults; 911 | this.options.renderer = this.options.renderer || new Renderer; 912 | this.renderer = this.options.renderer; 913 | this.renderer.options = this.options; 914 | } 915 | 916 | /** 917 | * Static Parse Method 918 | */ 919 | 920 | Parser.parse = function(src, options, renderer) { 921 | var parser = new Parser(options, renderer); 922 | return parser.parse(src); 923 | }; 924 | 925 | /** 926 | * Parse Loop 927 | */ 928 | 929 | Parser.prototype.parse = function(src) { 930 | this.inline = new InlineLexer(src.links, this.options, this.renderer); 931 | this.tokens = src.reverse(); 932 | 933 | var out = ''; 934 | while (this.next()) { 935 | out += this.tok(); 936 | } 937 | 938 | return out; 939 | }; 940 | 941 | /** 942 | * Next Token 943 | */ 944 | 945 | Parser.prototype.next = function() { 946 | return this.token = this.tokens.pop(); 947 | }; 948 | 949 | /** 950 | * Preview Next Token 951 | */ 952 | 953 | Parser.prototype.peek = function() { 954 | return this.tokens[this.tokens.length - 1] || 0; 955 | }; 956 | 957 | /** 958 | * Parse Text Tokens 959 | */ 960 | 961 | Parser.prototype.parseText = function() { 962 | var body = this.token.text; 963 | 964 | while (this.peek().type === 'text') { 965 | body += '\n' + this.next().text; 966 | } 967 | 968 | return this.inline.output(body); 969 | }; 970 | 971 | /** 972 | * Parse Current Token 973 | */ 974 | 975 | Parser.prototype.tok = function() { 976 | switch (this.token.type) { 977 | case 'space': { 978 | return ''; 979 | } 980 | case 'hr': { 981 | return this.renderer.hr(); 982 | } 983 | case 'heading': { 984 | return this.renderer.heading( 985 | this.inline.output(this.token.text), 986 | this.token.depth, 987 | this.token.text); 988 | } 989 | case 'code': { 990 | return this.renderer.code(this.token.text, 991 | this.token.lang, 992 | this.token.escaped); 993 | } 994 | case 'table': { 995 | var header = '' 996 | , body = '' 997 | , i 998 | , row 999 | , cell 1000 | , flags 1001 | , j; 1002 | 1003 | // header 1004 | cell = ''; 1005 | for (i = 0; i < this.token.header.length; i++) { 1006 | flags = { header: true, align: this.token.align[i] }; 1007 | cell += this.renderer.tablecell( 1008 | this.inline.output(this.token.header[i]), 1009 | { header: true, align: this.token.align[i] } 1010 | ); 1011 | } 1012 | header += this.renderer.tablerow(cell); 1013 | 1014 | for (i = 0; i < this.token.cells.length; i++) { 1015 | row = this.token.cells[i]; 1016 | 1017 | cell = ''; 1018 | for (j = 0; j < row.length; j++) { 1019 | cell += this.renderer.tablecell( 1020 | this.inline.output(row[j]), 1021 | { header: false, align: this.token.align[j] } 1022 | ); 1023 | } 1024 | 1025 | body += this.renderer.tablerow(cell); 1026 | } 1027 | return this.renderer.table(header, body); 1028 | } 1029 | case 'blockquote_start': { 1030 | var body = ''; 1031 | 1032 | while (this.next().type !== 'blockquote_end') { 1033 | body += this.tok(); 1034 | } 1035 | 1036 | return this.renderer.blockquote(body); 1037 | } 1038 | case 'list_start': { 1039 | var body = '' 1040 | , ordered = this.token.ordered; 1041 | 1042 | while (this.next().type !== 'list_end') { 1043 | body += this.tok(); 1044 | } 1045 | 1046 | return this.renderer.list(body, ordered); 1047 | } 1048 | case 'list_item_start': { 1049 | var body = ''; 1050 | 1051 | while (this.next().type !== 'list_item_end') { 1052 | body += this.token.type === 'text' 1053 | ? this.parseText() 1054 | : this.tok(); 1055 | } 1056 | 1057 | return this.renderer.listitem(body); 1058 | } 1059 | case 'loose_item_start': { 1060 | var body = ''; 1061 | 1062 | while (this.next().type !== 'list_item_end') { 1063 | body += this.tok(); 1064 | } 1065 | 1066 | return this.renderer.listitem(body); 1067 | } 1068 | case 'html': { 1069 | var html = !this.token.pre && !this.options.pedantic 1070 | ? this.inline.output(this.token.text) 1071 | : this.token.text; 1072 | return this.renderer.html(html); 1073 | } 1074 | case 'paragraph': { 1075 | return this.renderer.paragraph(this.inline.output(this.token.text)); 1076 | } 1077 | case 'text': { 1078 | return this.renderer.paragraph(this.parseText()); 1079 | } 1080 | } 1081 | }; 1082 | 1083 | /** 1084 | * Helpers 1085 | */ 1086 | 1087 | function escape(html, encode) { 1088 | return html 1089 | .replace(!encode ? /&(?!#?\w+;)/g : /&/g, '&') 1090 | .replace(//g, '>') 1092 | .replace(/"/g, '"') 1093 | .replace(/'/g, '''); 1094 | } 1095 | 1096 | function unescape(html) { 1097 | // explicitly match decimal, hex, and named HTML entities 1098 | return html.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g, function(_, n) { 1099 | n = n.toLowerCase(); 1100 | if (n === 'colon') return ':'; 1101 | if (n.charAt(0) === '#') { 1102 | return n.charAt(1) === 'x' 1103 | ? String.fromCharCode(parseInt(n.substring(2), 16)) 1104 | : String.fromCharCode(+n.substring(1)); 1105 | } 1106 | return ''; 1107 | }); 1108 | } 1109 | 1110 | function replace(regex, opt) { 1111 | regex = regex.source; 1112 | opt = opt || ''; 1113 | return function self(name, val) { 1114 | if (!name) return new RegExp(regex, opt); 1115 | val = val.source || val; 1116 | val = val.replace(/(^|[^\[])\^/g, '$1'); 1117 | regex = regex.replace(name, val); 1118 | return self; 1119 | }; 1120 | } 1121 | 1122 | function noop() {} 1123 | noop.exec = noop; 1124 | 1125 | function merge(obj) { 1126 | var i = 1 1127 | , target 1128 | , key; 1129 | 1130 | for (; i < arguments.length; i++) { 1131 | target = arguments[i]; 1132 | for (key in target) { 1133 | if (Object.prototype.hasOwnProperty.call(target, key)) { 1134 | obj[key] = target[key]; 1135 | } 1136 | } 1137 | } 1138 | 1139 | return obj; 1140 | } 1141 | 1142 | 1143 | /** 1144 | * Marked 1145 | */ 1146 | 1147 | function marked(src, opt, callback) { 1148 | if (callback || typeof opt === 'function') { 1149 | if (!callback) { 1150 | callback = opt; 1151 | opt = null; 1152 | } 1153 | 1154 | opt = merge({}, marked.defaults, opt || {}); 1155 | 1156 | var highlight = opt.highlight 1157 | , tokens 1158 | , pending 1159 | , i = 0; 1160 | 1161 | try { 1162 | tokens = Lexer.lex(src, opt) 1163 | } catch (e) { 1164 | return callback(e); 1165 | } 1166 | 1167 | pending = tokens.length; 1168 | 1169 | var done = function(err) { 1170 | if (err) { 1171 | opt.highlight = highlight; 1172 | return callback(err); 1173 | } 1174 | 1175 | var out; 1176 | 1177 | try { 1178 | out = Parser.parse(tokens, opt); 1179 | } catch (e) { 1180 | err = e; 1181 | } 1182 | 1183 | opt.highlight = highlight; 1184 | 1185 | return err 1186 | ? callback(err) 1187 | : callback(null, out); 1188 | }; 1189 | 1190 | if (!highlight || highlight.length < 3) { 1191 | return done(); 1192 | } 1193 | 1194 | delete opt.highlight; 1195 | 1196 | if (!pending) return done(); 1197 | 1198 | for (; i < tokens.length; i++) { 1199 | (function(token) { 1200 | if (token.type !== 'code') { 1201 | return --pending || done(); 1202 | } 1203 | return highlight(token.text, token.lang, function(err, code) { 1204 | if (err) return done(err); 1205 | if (code == null || code === token.text) { 1206 | return --pending || done(); 1207 | } 1208 | token.text = code; 1209 | token.escaped = true; 1210 | --pending || done(); 1211 | }); 1212 | })(tokens[i]); 1213 | } 1214 | 1215 | return; 1216 | } 1217 | try { 1218 | if (opt) opt = merge({}, marked.defaults, opt); 1219 | return Parser.parse(Lexer.lex(src, opt), opt); 1220 | } catch (e) { 1221 | e.message += '\nPlease report this to https://github.com/chjj/marked.'; 1222 | if ((opt || marked.defaults).silent) { 1223 | return '

    An error occured:

    '
    1224 |         + escape(e.message + '', true)
    1225 |         + '
    '; 1226 | } 1227 | throw e; 1228 | } 1229 | } 1230 | 1231 | /** 1232 | * Options 1233 | */ 1234 | 1235 | marked.options = 1236 | marked.setOptions = function(opt) { 1237 | merge(marked.defaults, opt); 1238 | return marked; 1239 | }; 1240 | 1241 | marked.defaults = { 1242 | gfm: true, 1243 | tables: true, 1244 | breaks: false, 1245 | pedantic: false, 1246 | sanitize: false, 1247 | sanitizer: null, 1248 | mangle: true, 1249 | smartLists: false, 1250 | silent: false, 1251 | highlight: null, 1252 | langPrefix: 'lang-', 1253 | smartypants: false, 1254 | headerPrefix: '', 1255 | renderer: new Renderer, 1256 | xhtml: false 1257 | }; 1258 | 1259 | /** 1260 | * Expose 1261 | */ 1262 | 1263 | marked.Parser = Parser; 1264 | marked.parser = Parser.parse; 1265 | 1266 | marked.Renderer = Renderer; 1267 | 1268 | marked.Lexer = Lexer; 1269 | marked.lexer = Lexer.lex; 1270 | 1271 | marked.InlineLexer = InlineLexer; 1272 | marked.inlineLexer = InlineLexer.output; 1273 | 1274 | marked.parse = marked; 1275 | 1276 | if (typeof module !== 'undefined' && typeof exports === 'object') { 1277 | module.exports = marked; 1278 | } else if (typeof define === 'function' && define.amd) { 1279 | define(function() { return marked; }); 1280 | } else { 1281 | this.marked = marked; 1282 | } 1283 | 1284 | }).call(function() { 1285 | return this || (typeof window !== 'undefined' ? window : global); 1286 | }()); 1287 | -------------------------------------------------------------------------------- /tmpl/assets/jquery-custom.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery v3.0.0 -css,-css/addGetHookIf,-css/adjustCSS,-css/curCSS,-css/hiddenVisibleSelectors,-css/showHide,-effects,-effects/Tween,-effects/animatedSelector,-css/support,-css/var/cssExpand,-css/var/getStyles,-css/var/isHiddenWithinTree,-css/var/rmargin,-css/var/rnumnonpx,-css/var/swap,-dimensions,-offset,-deprecated,-event/alias,-wrap | (c) jQuery Foundation | jquery.org/license */ 2 | !function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.0.0",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:f.call(this)},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:h,sort:c.sort,splice:c.splice},r.extend=r.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||r.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(r.isPlainObject(d)||(e=r.isArray(d)))?(e?(e=!1,f=c&&r.isArray(c)?c:[]):f=c&&r.isPlainObject(c)?c:{},g[b]=r.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},r.extend({expando:"jQuery"+(q+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===r.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=r.type(a);return("number"===b||"string"===b)&&!isNaN(a-parseFloat(a))},isPlainObject:function(a){var b,c;return a&&"[object Object]"===k.call(a)?(b=e(a))?(c=l.call(b,"constructor")&&b.constructor,"function"==typeof c&&m.call(c)===n):!0:!1},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?j[k.call(a)]||"object":typeof a},globalEval:function(a){p(a)},camelCase:function(a){return a.replace(t,"ms-").replace(u,v)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(w(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(s,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(w(Object(a))?r.merge(c,"string"==typeof a?[a]:a):h.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:i.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,f=0,h=[];if(w(a))for(d=a.length;d>f;f++)e=b(a[f],f,c),null!=e&&h.push(e);else for(f in a)e=b(a[f],f,c),null!=e&&h.push(e);return g.apply([],h)},guid:1,proxy:function(a,b){var c,d,e;return"string"==typeof b&&(c=a[b],b=a,a=c),r.isFunction(a)?(d=f.call(arguments,2),e=function(){return a.apply(b||this,d.concat(f.call(arguments)))},e.guid=a.guid=a.guid||r.guid++,e):void 0},now:Date.now,support:o}),"function"==typeof Symbol&&(r.fn[Symbol.iterator]=c[Symbol.iterator]),r.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){j["[object "+b+"]"]=b.toLowerCase()});function w(a){var b=!!a&&"length"in a&&a.length,c=r.type(a);return"function"===c||r.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&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;d>c;c++)if(a[c]===b)return c;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\x00-\\xa0])+",M="\\["+K+"*("+L+")(?:"+K+"*([*^$|!~]?=)"+K+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+K+"*\\]",N=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",O=new RegExp(K+"+","g"),P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+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:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,ca=function(a,b){return b?"\x00"===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},{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"label"in b&&b.disabled===a||"form"in b&&b.disabled===a||"form"in b&&b.disabled===!1&&(b.isDisabled===a||b.isDisabled!==!a&&("label"in b||!ea(b))!==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:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=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.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){return a.getAttribute("id")===b}}):(delete d.find.ID,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.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},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+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,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[0>c?c+b:c]}),even:pa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:pa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:pa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function ta(a,b,c){var d=b.dir,e=b.next,f=e||d,g=c&&"parentNode"===f,h=x++;return b.first?function(b,c,e){while(b=b[d])if(1===b.nodeType||g)return a(b,c,e)}:function(b,c,i){var j,k,l,m=[w,h];if(i){while(b=b[d])if((1===b.nodeType||g)&&a(b,c,i))return!0}else while(b=b[d])if(1===b.nodeType||g)if(l=b[u]||(b[u]={}),k=l[b.uniqueID]||(l[b.uniqueID]={}),e&&e===b.nodeName.toLowerCase())b=b[d]||b;else{if((j=k[f])&&j[0]===w&&j[1]===h)return m[2]=j[2];if(k[f]=m,m[2]=a(b,c,i))return!0}}}function ua(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function wa(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function xa(a,b,c,d,e,f){return d&&!d[u]&&(d=xa(d)),e&&!e[u]&&(e=xa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||va(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:wa(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=wa(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I(f,l):m[k])>-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}];f>i;i++)if(c=d.relative[a[i].type])m=[ta(ua(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return xa(i>1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,e>i&&ya(a.slice(i,e)),f>e&&ya(a=a.slice(e)),f>e&&sa(a))}m.push(c)}return ua(m)}function za(a,b){var c=b.length>0,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,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(_,aa),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=V.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(_,aa),$.test(j[0].type)&&qa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&sa(j),!a)return G.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||$.test(a)&&qa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);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){if(r.isFunction(b))return r.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return r.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(C.test(b))return r.filter(b,a,c);b=r.filter(b,a)}return 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;d>b;b++)if(r.contains(e[b],this))return!0}));for(c=this.pushStack([]),b=0;d>b;b++)r.find(a,e[b],c);return d>1?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;c>a;a++)if(r.contains(this,b[a]))return!0})},closest:function(a,b){var c,d=0,e=this.length,f=[],g="string"!=typeof a&&r(a);if(!A.test(a))for(;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&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=/\S+/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),h>=c&&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(!(f>b)){if(a=d.apply(h,i),a===c.promise())throw new TypeError("Thenable self-resolution");j=a&&("object"==typeof a||"function"==typeof a)&&a.then,r.isFunction(j)?e?j.call(a,g(f,c,M,e),g(f,c,N,e)):(f++,j.call(a,g(f,c,M,e),g(f,c,N,e),g(f,c,M,c.notifyWith))):(d!==M&&(h=void 0,i=[a]),(e||c.resolveWith)(h,i))}},k=e?j:function(){try{j()}catch(a){r.Deferred.exceptionHook&&r.Deferred.exceptionHook(a,k.stackTrace),b+1>=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(1>=b&&(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)};var Q=r.Deferred();r.fn.ready=function(a){return Q.then(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),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){ 3 | return j.call(r(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},T=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function U(){this.expando=r.expando+U.uid++}U.uid=1,U.prototype={cache:function(a){var b=a[this.expando];return b||(b={},T(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[r.camelCase(b)]=c;else for(d in b)e[r.camelCase(d)]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][r.camelCase(b)]},access:function(a,b,c){return void 0===b||b&&"string"==typeof b&&void 0===c?this.get(a,b):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d=a[this.expando];if(void 0!==d){if(void 0!==b){r.isArray(b)?b=b.map(r.camelCase):(b=r.camelCase(b),b=b in d?[b]:b.match(K)||[]),c=b.length;while(c--)delete d[b[c]]}(void 0===b||r.isEmptyObject(d))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!r.isEmptyObject(b)}};var V=new U,W=new U,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Y=/[A-Z]/g;function Z(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Y,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:X.test(c)?JSON.parse(c):c}catch(e){}W.set(a,b,c)}else c=void 0;return c}r.extend({hasData:function(a){return W.hasData(a)||V.hasData(a)},data:function(a,b,c){return W.access(a,b,c)},removeData:function(a,b){W.remove(a,b)},_data:function(a,b,c){return V.access(a,b,c)},_removeData:function(a,b){V.remove(a,b)}}),r.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=W.get(f),1===f.nodeType&&!V.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=r.camelCase(d.slice(5)),Z(f,d,e[d])));V.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){W.set(this,a)}):S(this,function(b){var c;if(f&&void 0===b){if(c=W.get(f,a),void 0!==c)return c;if(c=Z(f,a),void 0!==c)return c}else this.each(function(){W.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){W.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;return a?(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||[]):void 0},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,ca=/^$|\/(?:java|ecma)script/i,da={option:[1,""],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};da.optgroup=da.option,da.tbody=da.tfoot=da.colgroup=da.caption=da.thead,da.th=da.td;function ea(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&r.nodeName(a,b)?r.merge([a],c):c}function fa(a,b){for(var c=0,d=a.length;d>c;c++)V.set(a[c],"globalEval",!b||V.get(b[c],"globalEval"))}var ga=/<|&#?\w+;/;function ha(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],n=0,o=a.length;o>n;n++)if(f=a[n],f||0===f)if("object"===r.type(f))r.merge(m,f.nodeType?[f]:f);else if(ga.test(f)){g=g||l.appendChild(b.createElement("div")),h=(ba.exec(f)||["",""])[1].toLowerCase(),i=da[h]||da._default,g.innerHTML=i[1]+r.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;r.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",n=0;while(f=m[n++])if(d&&r.inArray(f,d)>-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=ea(l.appendChild(f),"script"),j&&fa(g),c){k=0;while(f=g[k++])ca.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 ia=d.documentElement,ja=/^key/,ka=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,la=/^([^.]*)(?:\.(.+)|)/;function ma(){return!0}function na(){return!1}function oa(){try{return d.activeElement}catch(a){}}function pa(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)pa(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=na;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(ia,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=la.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=la.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;cc;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?r(e,this).index(i)>-1:r.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h\x20\t\r\n\f]*)[^>]*)\/>/gi,ra=/\s*$/g;function va(a,b){return r.nodeName(a,"table")&&r.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a:a}function wa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function xa(a){var b=ta.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function ya(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;d>c;c++)r.event.add(b,e,j[e][c])}W.hasData(a)&&(h=W.access(a),i=r.extend({},h),W.set(b,i))}}function za(a,b){var c=b.nodeName.toLowerCase();"input"===c&&aa.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function Aa(a,b,c,d){b=g.apply([],b);var e,f,h,i,j,k,l=0,m=a.length,n=m-1,q=b[0],s=r.isFunction(q);if(s||m>1&&"string"==typeof q&&!o.checkClone&&sa.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Aa(f,b,c,d)});if(m&&(e=ha(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(ea(e,"script"),wa),i=h.length;m>l;l++)j=e,l!==n&&(j=r.clone(j,!0,!0),i&&r.merge(h,ea(j,"script"))),c.call(a[l],j,l);if(i)for(k=h[h.length-1].ownerDocument,r.map(h,xa),l=0;i>l;l++)j=h[l],ca.test(j.type||"")&&!V.access(j,"globalEval")&&r.contains(k,j)&&(j.src?r._evalUrl&&r._evalUrl(j.src):p(j.textContent.replace(ua,""),k))}return a}function Ba(a,b,c){for(var d,e=b?r.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||r.cleanData(ea(d)),d.parentNode&&(c&&r.contains(d.ownerDocument,d)&&fa(ea(d,"script")),d.parentNode.removeChild(d));return a}r.extend({htmlPrefilter:function(a){return a.replace(qa,"<$1>")},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=ea(h),f=ea(a),d=0,e=f.length;e>d;d++)za(f[d],g[d]);if(b)if(c)for(f=f||ea(a),g=g||ea(h),d=0,e=f.length;e>d;d++)ya(f[d],g[d]);else ya(a,h);return g=ea(h,"script"),g.length>0&&fa(g,!i&&ea(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 Ba(this,a,!0)},remove:function(a){return Ba(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 Aa(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=va(this,a);b.appendChild(a)}})},prepend:function(){return Aa(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=va(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Aa(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Aa(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(ea(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1: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&&!ra.test(a)&&!da[(ba.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(r.cleanData(ea(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Aa(this,arguments,function(b){var c=this.parentNode;r.inArray(this,a)<0&&(r.cleanData(ea(this)),c&&c.replaceChild(b,this))},a)}}),r.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){r.fn[a]=function(a){for(var c,d=[],e=r(a),f=e.length-1,g=0;f>=g;g++)c=g===f?this:this.clone(!0),r(e[g])[b](c),h.apply(d,c.get());return this.pushStack(d)}}),r.fn.delay=function(b,c){return b=r.fx?r.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a=d.createElement("input"),b=d.createElement("select"),c=b.appendChild(d.createElement("option"));a.type="checkbox",o.checkOn=""!==a.value,o.optSelected=c.selected,a=d.createElement("input"),a.value="t",a.type="radio",o.radioValue="t"===a.value}();var Ca,Da=r.expr.attrHandle;r.fn.extend({attr:function(a,b){return S(this,r.attr,a,b,arguments.length>1)},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)?Ca:void 0)),void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&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)}}),Ca={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=Da[b]||r.find.attr;Da[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=Da[g],Da[g]=e,e=null!=c(a,b,d)?g:null,Da[g]=f),e}});var Ea=/^(?:input|select|textarea|button)$/i,Fa=/^(?: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):Ea.test(a.nodeName)||Fa.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});var Ga=/[\t\r\n\f]/g;function Ha(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,Ha(this)))});if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=Ha(c),d=1===c.nodeType&&(" "+e+" ").replace(Ga," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=r.trim(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,Ha(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=Ha(c),d=1===c.nodeType&&(" "+e+" ").replace(Ga," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=r.trim(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,Ha(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=Ha(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&&(" "+Ha(c)+" ").replace(Ga," ").indexOf(b)>-1)return!0;return!1}});var Ia=/\r/g,Ja=/[\x20\t\r\n\f]+/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(Ia,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:r.trim(r.text(a)).replace(Ja," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],(c.selected||i===e)&&!c.disabled&&(!c.parentNode.disabled||!r.nodeName(c.parentNode,"optgroup"))){if(b=r(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=r.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=r.inArray(r.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){return r.isArray(b)?a.checked=r.inArray(r(a).val(),b)>-1:void 0}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var Ka=/^(?: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&&!Ka.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,Ka.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];return c?r.event.trigger(a,b,c,!0):void 0}}),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 La=a.location,Ma=r.now(),Na=/\?/;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 Oa=/\[\]$/,Pa=/\r?\n/g,Qa=/^(?:submit|button|image|reset|file)$/i,Ra=/^(?:input|select|textarea|keygen)/i;function Sa(a,b,c,d){var e;if(r.isArray(b))r.each(b,function(b,e){c||Oa.test(a)?d(a,e):Sa(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)Sa(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)Sa(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")&&Ra.test(this.nodeName)&&!Qa.test(a)&&(this.checked||!aa.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(Pa,"\r\n")}}):{name:b.name,value:c.replace(Pa,"\r\n")}}).get()}});var Ta=/%20/g,Ua=/#.*$/,Va=/([?&])_=[^&]*/,Wa=/^(.*?):[ \t]*([^\r\n]*)$/gm,Xa=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ya=/^(?:GET|HEAD)$/,Za=/^\/\//,$a={},_a={},ab="*/".concat("*"),bb=d.createElement("a");bb.href=La.href;function cb(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 db(a,b,c,d){var e={},f=a===_a;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 eb(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 fb(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}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function gb(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:La.href,type:"GET",isLocal:Xa.test(La.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ab,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?eb(eb(a,r.ajaxSettings),b):eb(r.ajaxSettings,a)},ajaxPrefilter:cb($a),ajaxTransport:cb(_a),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=Wa.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||La.href)+"").replace(Za,La.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=bb.protocol+"//"+bb.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)),db($a,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=!Ya.test(o.type),f=o.url.replace(Ua,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(Ta,"+")):(n=o.url.slice(f.length),o.data&&(f+=(Na.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Va,""),n=(Na.test(f)?"&":"?")+"_="+Ma++ +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]?", "+ab+"; 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=db(_a,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&&300>b||304===b,d&&(v=fb(o,y,d)),v=gb(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",0>b&&(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, 4 | 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.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var hb={0:200,1223:204},ib=r.ajaxSettings.xhr();o.cors=!!ib&&"withCredentials"in ib,o.ajax=ib=!!ib,r.ajaxTransport(function(b){var c,d;return o.cors||ib&&!b.crossDomain?{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(hb[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()}}:void 0}),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("