From e0aaa90055b1d57d5cbb528f00c94b9f39e5ad4f Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Thu, 28 Dec 2023 09:01:17 -0600 Subject: [PATCH] docs: Remove main website / docs content This content now lives in the `website` branch. [skip ci] --- docs/.gitignore | 1 - docs/Dockerfile | 9 - docs/README.md | 4 - docs/app/layouts/default.up | 39 --- docs/app/pages/docs/$doc.up | 6 - docs/app/pages/docs/index.up | 22 -- docs/app/pages/index.up | 103 ------- docs/app/pkg/app.go | 16 -- docs/app/static/adhoc-logo.png | Bin 442 -> 0 bytes docs/app/static/docs/getting-started.md | 114 -------- docs/app/static/docs/guides.md | 24 -- docs/app/static/docs/intro.md | 77 ------ docs/app/static/docs/syntax.md | 349 ------------------------ docs/app/static/favicon.ico | Bin 4286 -> 0 bytes docs/app/static/htmx.min.js | 1 - docs/app/static/logo.png | Bin 1685 -> 0 bytes docs/app/static/style.css | 212 -------------- docs/fly.toml | 42 --- docs/go.mod | 5 - docs/go.sum | 2 - 20 files changed, 1026 deletions(-) delete mode 100644 docs/.gitignore delete mode 100644 docs/Dockerfile delete mode 100644 docs/README.md delete mode 100644 docs/app/layouts/default.up delete mode 100644 docs/app/pages/docs/$doc.up delete mode 100644 docs/app/pages/docs/index.up delete mode 100644 docs/app/pages/index.up delete mode 100644 docs/app/pkg/app.go delete mode 100644 docs/app/static/adhoc-logo.png delete mode 100644 docs/app/static/docs/getting-started.md delete mode 100644 docs/app/static/docs/guides.md delete mode 100644 docs/app/static/docs/intro.md delete mode 100644 docs/app/static/docs/syntax.md delete mode 100644 docs/app/static/favicon.ico delete mode 100644 docs/app/static/htmx.min.js delete mode 100644 docs/app/static/logo.png delete mode 100644 docs/app/static/style.css delete mode 100644 docs/fly.toml delete mode 100644 docs/go.mod delete mode 100644 docs/go.sum diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index 796b96d..0000000 --- a/docs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/docs/Dockerfile b/docs/Dockerfile deleted file mode 100644 index 62cd77a..0000000 --- a/docs/Dockerfile +++ /dev/null @@ -1,9 +0,0 @@ -FROM golang:1.19 AS builder -WORKDIR /app -COPY . . -RUN go mod download -RUN CGO_ENABLED=0 go build -ldflags "-s -w -extldflags '-static'" -o /myproject ./build/cmd/myproject -FROM alpine -COPY --from=builder /myproject / -EXPOSE 8080 -ENTRYPOINT [ "/myproject" ] diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index d6ccf1b..0000000 --- a/docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Pushup main website - -This is the main website for the Pushup project, including documentation. It -is a Pushup app. diff --git a/docs/app/layouts/default.up b/docs/app/layouts/default.up deleted file mode 100644 index d1eb38d..0000000 --- a/docs/app/layouts/default.up +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - ^if sectionDefined("title") { - <text>^outputSection("title")</text> - } ^else { - <text>Pushup - page-oriented web framework for Go</text> - } - - - - - - - -
- ^outputSection("contents") -
- - - diff --git a/docs/app/pages/docs/$doc.up b/docs/app/pages/docs/$doc.up deleted file mode 100644 index 771bf6a..0000000 --- a/docs/app/pages/docs/$doc.up +++ /dev/null @@ -1,6 +0,0 @@ -^handler { - doc := getParam(req, "doc") - rawMarkdown := GetStaticContents("docs/" + doc + ".md") -} - -^convertMarkdown(rawMarkdown) diff --git a/docs/app/pages/docs/index.up b/docs/app/pages/docs/index.up deleted file mode 100644 index 99e0152..0000000 --- a/docs/app/pages/docs/index.up +++ /dev/null @@ -1,22 +0,0 @@ -

Pushup documentation

- -^{ - type doc struct { - name string - url string - } - docs := []doc { - {name: "Introduction to Pushup", url: "intro"}, - {name: "Getting started", url: "getting-started"}, - {name: "Syntax", url: "syntax"}, - {name: "Guides", url: "guides"}, - } -} - - diff --git a/docs/app/pages/index.up b/docs/app/pages/index.up deleted file mode 100644 index 7e25d7b..0000000 --- a/docs/app/pages/index.up +++ /dev/null @@ -1,103 +0,0 @@ -
-

- Pushup logo, a caret surrounded by left and right angle brackets ala HTML element - Pushup web framework -

-
- -
-

A server-side, page-oriented web framework for the Go programming language.

- -

Pushup’s goal is to make it faster to develop and easier to maintain server-side web applications using Go.

- -

Pushup is preview, pre-release software in early-stage development. It is not yet suitable for production use. Expect breaking changes.

-
- - - -
-

Pushup example

-
^^import "time"
-
-^^{
-   title := "Hello, from Pushup!"
-}
-
-<h1>^^title</h1>
-
-<p>The time is now ^^time.Now().String().</p>
-
-^^if time.Now().Weekday() == time.Friday {
-    <p>It's Friday! Enjoy the start to your weekend.</p>
-} ^^else {
-    <p>Have a great day, we're glad you're here.</p>
-}
-
-

File app/pages/hello.up/hello URL path

-
- -
-

Features

- - -
- -
-

Getting started

- - -
diff --git a/docs/app/pkg/app.go b/docs/app/pkg/app.go deleted file mode 100644 index edd09bf..0000000 --- a/docs/app/pkg/app.go +++ /dev/null @@ -1,16 +0,0 @@ -package build - -import ( - "bytes" - "html/template" - - "github.com/yuin/goldmark" -) - -func convertMarkdown(text []byte) template.HTML { - var buf bytes.Buffer - if err := goldmark.Convert(text, &buf); err != nil { - panic(err) - } - return template.HTML(buf.String()) -} diff --git a/docs/app/static/adhoc-logo.png b/docs/app/static/adhoc-logo.png deleted file mode 100644 index a093aabc94bcd2d265ac07e55caa1082b3cbb901..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 442 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD3?#3*wSy#B(j9#r85lP9bN@+X1@aY=J%W50 z7^>757#dm_7=8hT8eT9klo~KFyh>nTu$sZZAYL$MSD+10A~V1z#1%*zZmTxjT5Yhk z(r87v};kQz{Aa3kK3q5Z2peV$tnAKRzRUMXI`1 zX6}+$mBj4iMV4z)*8-I+@^ov9)PQ}~ zwrj8ZPQP4w>3Vh=+n0sC{dNot2aYv9410BV`u*~&onI%isUKgj308f;sv+@>eQz)K q18=C485rtW<^?CN)f8e7w0y%mCAc@1<;B@9kgTVxpUXO@geCwyM4{~f diff --git a/docs/app/static/docs/getting-started.md b/docs/app/static/docs/getting-started.md deleted file mode 100644 index 57091e7..0000000 --- a/docs/app/static/docs/getting-started.md +++ /dev/null @@ -1,114 +0,0 @@ -# Getting started - -To make a new Pushup app, first install the main Pushup executable. - -### Installing Pushup - -#### Prerequisites - -- go 1.18 or later - -Make sure the directory where the go tool installs executables is in your -`$PATH`. It is `$(go env GOPATH)/bin`. You can check if this is the case with: - -```shell -echo $PATH | grep $(go env GOPATH)/bin > /dev/null && echo yes || echo no -``` - -#### Install via official release - -Binary executables for multiple platforms are available for download on the -[project releases page](https://github.com/adhocteam/pushup/releases). - -#### Install via git - -```shell -git clone https://github.com/adhocteam/pushup -cd pushup -make -``` - -#### Install via `go install` - -Make sure you have Go installed (at least version 1.18), and type: - -```shell -go install github.com/adhocteam/pushup@latest -``` - -#### Install via `homebrew` - -Coming soon. - -#### Install via Linux package managers - -Coming soon. - -### Creating a new Pushup project - -To create a new Pushup project, use the `pushup new` command. - -```shell -pushup new -``` - -Without any additional arguments, it will attempt to create a scaffolded new -project in the current directory. However, the directory must be completely -empty, or the command will abort. To simulataneously make a new directory -and generate a scaffolded project, pass a relative path as argument: - -```shell -pushup new myproject -``` - -The scaffolded new project directory consists of a directory structure for -.up files and auxiliary project Go code, and a go.mod file. - -Change to the new project directory if necessary, then do a `pushup run`, -which compiles the Pushup project to Go code, builds the app, and starts up -the server. - -```shell -pushup run -``` - -If all goes well, you should see a message on the terminal that the Pushup app -is running and listening on a port: - -``` -↑↑ Pushup ready and listening on 0.0.0.0:8080 ↑↑ -``` - -By default it listens on port 8080, but with the `-port` or `-unix-socket` -flags you can pick your own listener. - -Open [http://localhost:8080/](http://localhost:8080/) in your browser to see -the default layout and a welcome index page. - -### Listing routes - -You can print a list of all the routes in your Pushup project with the command -`pushup routes`. - -The lefthand column is the URL route, where any dynamic path segments are -denoted with a leading `:` colon. The righthand column is the corresponding -Pushup page. - -For example: - -```shell -$ pushup routes -/about about.up -/album/:id album/$id.up -/album/delete/:id album/delete/$id.up -/album/edit/:id album/edit/$id.up -/album/new album/new.up -/album/ album/index.up -/dyn/:name dyn/$name.up -/htmx/active-search htmx/active-search.up -/htmx/click-to-load htmx/click-to-load.up -/htmx/ htmx/index.up -/htmx/value-select htmx/value-select.up -/ index.up -/projects/:pid/users/:uid projects/$pid/users/$uid.up -``` diff --git a/docs/app/static/docs/guides.md b/docs/app/static/docs/guides.md deleted file mode 100644 index f712994..0000000 --- a/docs/app/static/docs/guides.md +++ /dev/null @@ -1,24 +0,0 @@ -# Guides - -_Coming soon_ - -## Enhanced hypermedia - -- How to use htmx with Pushup - -## Deployment - -- How to deploy a Pushup app using fly.io -- How to deploy a Pushup app using Netlify -- How to deploy a Pushup app using Render -- How to deploy a Pushup app using AWS - -## Databases - -- How to make Pushup app with SQLite -- How to make Pushup app with PostgreSQL - -## App types - -- How to make a CRUD app with Pushup -- How to make a static site with Pushup diff --git a/docs/app/static/docs/intro.md b/docs/app/static/docs/intro.md deleted file mode 100644 index 0da98ad..0000000 --- a/docs/app/static/docs/intro.md +++ /dev/null @@ -1,77 +0,0 @@ -# Introduction to Pushup - -Pushup is an experimental new project that is exploring the viability of a new -approach to web frameworks in Go. - -Pushup seeks to make building page-oriented, server-side web apps using Go -easy. It embraces the server, while acknowledging the reality of modern web -apps and their improvements to UI interactivity over previous generations. - -## What is Pushup? - -Pushup is a program that compiles projects developed with the Pushup markup -language into standalone web app servers. - -There are three main aspects to Pushup: - -1. A **file format (.up files)** with an opinionated app directory structure that enables **file-based routing**, -1. A **lightweight markup** alternative to traditional web framework templates - that combines Go code for control flow and imperative, view-controller-like - code with HTML markup, and -1. A **compiler** that parses that markup and generates pure Go code, - building standalone web apps on top of the Go stdlib `net/http` package. - -### Example Pushup app directory structure - -``` -/path/to/mypushupapp -├── layouts -│   └── default.up -├── pages -│   └── index.up -├── pkg -│   └── app.go -└── static - ├── app.css - └── htmx.min.js -``` - -### Pages in Pushup - -The core object in Pushup is the "page": a file with the `.up` extension that -is a mix of HTML, Go code, and a lightweight markup language that glues them -together. Pushup pages participate in URL routing by virtue of their path in -the filesystem. Pushup pages are compiled into pure Go which is then built -along with a thin runtime into a standalone web app server (which is all -`net/http` under the hood). - -The main proposition motivating Pushup is that the page is the right level of -abstraction for most kinds of server-side web apps. - -The syntax of the Pushup markup language looks like this: - -```pushup - -^import "time" - -^{ - title := "Hello, from Pushup!" -} - -

^title

- -

The time is now ^time.Now().String().

- -^if time.Now().Weekday() == time.Friday { -

It's Friday! Enjoy the start to your weekend.

-} ^else { -

Have a great day, we're glad you're here.

-} - -``` - -You would then place this code in a file somewhere in your `app/pages` -directory, like `hello.up`. The `.up` extension is important and tells -the compiler that it is a Pushup page. Once you build and run your Pushup app, -that page is automatically mapped to the URL path `/hello`. - diff --git a/docs/app/static/docs/syntax.md b/docs/app/static/docs/syntax.md deleted file mode 100644 index 2fa5f6b..0000000 --- a/docs/app/static/docs/syntax.md +++ /dev/null @@ -1,349 +0,0 @@ -# Syntax - -Pushup is a mix of a new syntax consisting of Pushup directives and keywords, -Go code, and HTML markup. - -### How it works - -Parsing a `.up` file always starts out in HTML mode, so you can just put -plain HTML in a file and that's a valid Pushup page. - -When the parser encounters a '^' character (caret, ASCII 0x5e) while in -HTML mode, it switches to parsing Pushup syntax, which consists of simple -directives, control flow statements, block delimiters, and Go expressions. It -then switches to the Go code parser. Once it detects the end of the directive, -statement, or expression, it switches back to HTML mode, and parsing continues -in a similar fashion. - -Pushup uses the tokenizers from the [go/scanner][scannerpkg] and -[golang.org/x/net/html][htmlpkg] packages, so it should be able to handle -any valid syntax from either language. - -[scannerpkg]: https://pkg.go.dev/go/scanner#Scanner -[htmlpkg]: https://pkg.go.dev/golang.org/x/net/html#Tokenizer - -### Directives - -#### `^import` - -Use `^import` to import a Go package into the current Pushup page. The syntax -for `^import` is the same as a regular [Go import declaration](https://go.dev/ref/spec#Import_declarations) - -Example: - -```pushup -^import "strings" -^import "strconv" -``` - -```pushup -^import . "strings" -``` - -#### `^layout` - -Layouts are HTML templates that enclose the contents of a Pushup page. - -The `^layout` directive instructs Pushup what layout to apply the contents of -the current page. - -The name of the layout following the directive is the filename in the -`layouts` directory minus the `.up` extension. For example, `^layout main` -would try to apply the layout located at `app/layouts/main.up`. - -`^layout` is optional - if it is not specified, pages automatically get the -"default" layout (`app/layouts/default.up`). - -Example: - -```pushup -^layout homepage -``` - -##### `^layout !` - no layout - -A page may choose to have no layout applied - that is, the contents of the page -itself are sent directly to the client with no enclosing template. In this case, -use the `!` name: - -```pushup -^layout ! -``` - -### Go code blocks - -#### `^{` - -To include statements of Go in a Pushup page, type `^{` followed by your -Go code, terminating with a closing `}`. - -The scope of a `^{ ... }` in the compiled Go code is equal to its surrounding -markup, so you can define a variable and immediately use it: - -```pushup -^{ - name := "world" -} -

Hello, ^name!

-``` - -Because the Pushup parser is only looking for a balanced closing `}`, blocks -can be one-liners: - -```pushup -^{ name := "world"; greeting := "Hello" } -

^greeting, ^name!

-``` - -A Pushup page can have zero or many `^{ ... }` blocks. - -#### `^handler` - -A handler is similar to `^{ ... }`. The difference is that there may be at most -one handler per page, and it is run prior to any other code or markup on the -page. - -A handler is the appropriate place to do "controller"-like (in the MVC sense) -actions, such as HTTP redirects and errors. In other words, any control flow -based on the nature of the request, for example, redirecting after a successful -POST to create a new object in a CRUD operation. - -Example: - -```pushup -^handler { - if req.Method == "POST" && formValid(req) { - if err := createObjectFromForm(req.Form); err == nil { - return http.Redirect(w, req, "/success/", http.StatusSeeOther) - return nil - } else { - // error handling - ... - } - ... -} -... -``` - -Note that handlers (and all Pushup code) run in a method on a receiver that -implements Pushup's `Responder` interface, which is - -```go -interface Responder { - Respond(http.ResponseWriter, *http.Request) error -} -``` - -To exit from a page early in a handler (i.e., prior to any normal content being -rendered), return from the method with a nil (for success) or an error (which -will in general respond with HTTP 500 to the client). - -### Control flow statements - -#### `^if` - -`^if` takes a boolean Go expression and a block to conditionally render. - -Example: - -```pushup -^if query := req.FormValue("query"); query != "" { -

Query: ^query

-} -``` - -#### `^for` - -`^for` takes a Go "for" statement condition, clause, or range, and a block, -and repeatedly executes the block. - -Example: - -```pushup -^for i := 0; i < 10; i++ { -

Number ^i

-} -``` - -### Expressions - -#### Simple expressions - -Simple Go expressions can be written with just `^` followed by the expression. -"Simple" means: - -- variable names (eg., `^x`) -- dotted field name access of structs (eg., `^account.name`) -- function and method calls (eg., `^strings.Repeat("x", 3)`) -- index expressions (eg., `a[x]`) - -Example: - -```pushup -^{ name := "Paul" } -

Hello, ^name!

-``` - -Outputs: - -```html -

Hello, Paul!

-``` - -Notice that the parser stops on the "!" because it knows it is not part of a -Go variable name. - -Example: - -```pushup -

The URL path: ^req.URL.Path

-``` - -Outputs: - -```html -

The URL path: /foo/bar

-``` - -Example: - -```pushup -^import "strings" -

^strings.Repeat("Hello", 3)

-``` - -Outputs: - -```html -

HelloHelloHello

-``` - -#### Explicit expressions - -Explicit expressions are written with `^` and followed by any valid Go -expression grouped by parentheses. - -Example: - -```pushup -^{ numPeople := 4 } -

With ^numPeople people there are ^(numPeople * 2) hands

-``` - -Outputs: - -```html -

With 4 people there are 8 hands

-``` - -### Layout and templates - -#### `^section` - -Pushup layouts can have sections within the HTML document that Pushup pages -can define with their own content to be rendered into those locations. - -For example, a layout could have a sidebar section, and each page can set -its own sidebar content. - -In a Pushup page, sections are defined with the keyword like so: - -```pushup -^section sidebar { -
-

This is my sidebar content

-

More to come

-
-} -``` - -Layouts can output sections with the `outputSection` function. - -```pushup - -``` - -Layouts can also make sections optional, by first checking if a page has set a -section with `sectionDefined()`, which returns a boolean. - -```pushup -^if sectionDefined("sidebar") { - -} -``` - -Checking for if a section was set by a page lets a layout designer provide -default markup that can be overridden by a page. - -```pushup -^if sectionDefined("title") { - - ^outputSection("title") - -} ^else { - Welcome to our site -} -``` - -#### `^partial` - -Pushup pages can declare and define inline partials with the `^partial` -keyword. - -```pushup -... -
-

Elements

- ^partial list { -
    -
  • Ag
  • -
  • Na
  • -
  • C
  • -
- } -
-... -``` - -A request to the page containing the initial partial will render normally, -as if the block where not wrapped in `^partial list {` ... `}`. - -A request to the page with the name of the partial appended to the URL path -will respond with just the content scoped by the partial block. - -For example, if the page above had the route `/elements/`, then a request to -`/elements/list` would output: - -```html -
    -
  • Ag
  • -
  • Na
  • -
  • C
  • -
-``` - -Inline partials can nest arbitrarily deep. - -```pushup -... -^partial leagues { -

Leagues

- ^partial teams { -

Teams

- ^partial players { -

Players

- } - } -} -... -``` - -To request a nested partial, make sure the URL path is preceded by -each containing partial's name and a forward slash, for example, -`/sports/leagues/teams/players`. - - diff --git a/docs/app/static/favicon.ico b/docs/app/static/favicon.ico deleted file mode 100644 index 3541e643c05bdd36efa23b3612f0ed9a6f94fb7a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4286 zcmeH}OHUI~7>1{Esli1-jUh$@8$kbnVhh4XBM{Nb#mmmbgn!_| zsNl+UTG}ZWJJUppZV42@q!B`WzIKj1lu|1@lMZ>AIp6u-%bYVaU>F{LT3ZeIZA>>B z#wo)v&H+kBFOYifV6J*pSD?BA|Hlg0me~as!BZz5K2~XJ+ln*@2P}c^N_l!8ybHD! ziX^O17W`y<*N#R!dQYiq>5*RH2$$ueJAm)0b5!zxrl8DY#;6Eq+BXGA0 zd^1L^^B_OHE`7i%a6_An9{{i3SMJ)5n_l|I(fCo&G2_(yWqC#3aC6>{6|OJGD>dg> zW_^ha^9N<1ehI`?Udb+e`w-qLPa>b;9$Fhp7fs0!P(5;H?3a3>C+B^i+CSg7uAA2m z*P$cNqn=@bT9@m6MfWE2y7cqD)fHT6^AEqD!@^f@%I z0sUS#7(cS3xwRQ(-T!2uzHGmJ1O;4it3hV&UUj&zxKG*Hw1CTkvCpaB4k8U5|FU?!l z+PssnB72@M$BIaX+w^J~LMg_BqJ!RXbYB9MVTtQ*&;dRI!TlktcX4VUy5jvUGS zUfhDWrg6W+&FuyH@*X?~DueQt^=}sqdi%jQjlaftIBA8-dJ9($_jwqCzv^npcX%{E zn_CCT@C^I{;{Oh`sd?#zx9M_M84ro3ny=){_gnUY@2|--V2*(Xorj<7#T)P$6Ua$#+T~Z@y<-_)&#Rzk0+ZA s)=0)){return"unset"}else{return n}}function z(t,r){var n=null;h(t,function(e){return n=a(t,e,r)});if(n!=="unset"){return n}}function d(e,t){var r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector;return r&&r.call(e,t)}function s(e){var t=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i;var r=t.exec(e);if(r){return r[1].toLowerCase()}else{return""}}function l(e,t){var r=new DOMParser;var n=r.parseFromString(e,"text/html");var i=n.body;while(t>0){t--;i=i.firstChild}if(i==null){i=_().createDocumentFragment()}return i}function g(e){if(U.config.useTemplateFragments){var t=l("",0);return t.querySelector("template").content}else{var r=s(e);switch(r){case"thead":case"tbody":case"tfoot":case"colgroup":case"caption":return l(""+e+"
",1);case"col":return l(""+e+"
",2);case"tr":return l(""+e+"
",2);case"td":case"th":return l(""+e+"
",3);case"script":return l("
"+e+"
",1);default:return l(e,0)}}}function Z(e){if(e){e()}}function p(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function m(e){return p(e,"Function")}function x(e){return p(e,"Object")}function W(e){var t="htmx-internal-data";var r=e[t];if(!r){r=e[t]={}}return r}function y(e){var t=[];if(e){for(var r=0;r=0}function K(e){if(e.getRootNode()instanceof ShadowRoot){return _().body.contains(e.getRootNode().host)}else{return _().body.contains(e)}}function w(e){return e.trim().split(/\s+/)}function Y(e,t){for(var r in t){if(t.hasOwnProperty(r)){e[r]=t[r]}}return e}function S(e){try{return JSON.parse(e)}catch(e){yt(e);return null}}function E(){var e="htmx:localStorageTest";try{localStorage.setItem(e,e);localStorage.removeItem(e);return true}catch(e){return false}}function e(e){return Zt(_().body,function(){return eval(e)})}function t(t){var e=U.on("htmx:load",function(e){t(e.detail.elt)});return e}function C(){U.logger=function(e,t,r){if(console){console.log(t,e,r)}}}function R(e,t){if(t){return e.querySelector(t)}else{return R(_(),e)}}function O(e,t){if(t){return e.querySelectorAll(t)}else{return O(_(),e)}}function q(e,t){e=D(e);if(t){setTimeout(function(){q(e)},t)}else{e.parentElement.removeChild(e)}}function L(e,t,r){e=D(e);if(r){setTimeout(function(){L(e,t)},r)}else{e.classList&&e.classList.add(t)}}function T(e,t,r){e=D(e);if(r){setTimeout(function(){T(e,t)},r)}else{if(e.classList){e.classList.remove(t);if(e.classList.length===0){e.removeAttribute("class")}}}}function A(e,t){e=D(e);e.classList.toggle(t)}function H(e,t){e=D(e);G(e.parentElement.children,function(e){T(e,t)});L(e,t)}function N(e,t){e=D(e);if(e.closest){return e.closest(t)}else{do{if(e==null||d(e,t)){return e}}while(e=e&&u(e))}}function I(e,t){if(t.indexOf("closest ")===0){return[N(e,t.substr(8))]}else if(t.indexOf("find ")===0){return[R(e,t.substr(5))]}else if(t.indexOf("next ")===0){return[k(e,t.substr(5))]}else if(t.indexOf("previous ")===0){return[M(e,t.substr(9))]}else if(t==="document"){return[document]}else if(t==="window"){return[window]}else{return _().querySelectorAll(t)}}var k=function(e,t){var r=_().querySelectorAll(t);for(var n=0;n=0;n--){var i=r[n];if(i.compareDocumentPosition(e)===Node.DOCUMENT_POSITION_FOLLOWING){return i}}};function Q(e,t){if(t){return I(e,t)[0]}else{return I(_().body,e)[0]}}function D(e){if(p(e,"String")){return R(e)}else{return e}}function P(e,t,r){if(m(t)){return{target:_().body,event:e,listener:t}}else{return{target:D(e),event:t,listener:r}}}function X(t,r,n){dr(function(){var e=P(t,r,n);e.target.addEventListener(e.event,e.listener)});var e=m(r);return e?r:n}function F(t,r,n){dr(function(){var e=P(t,r,n);e.target.removeEventListener(e.event,e.listener)});return m(r)?r:n}var ee=_().createElement("output");function j(e,t){var r=z(e,t);if(r){if(r==="this"){return[te(e,t)]}else{var n=I(e,r);if(n.length===0){yt('The selector "'+r+'" on '+t+" returned no matches!");return[ee]}else{return n}}}}function te(e,t){return h(e,function(e){return V(e,t)!=null})}function re(e){var t=z(e,"hx-target");if(t){if(t==="this"){return te(e,"hx-target")}else{return Q(e,t)}}else{var r=W(e);if(r.boosted){return _().body}else{return e}}}function B(e){var t=U.config.attributesToSettle;for(var r=0;r0){o=e.substr(0,e.indexOf(":"));t=e.substr(e.indexOf(":")+1,e.length)}else{o=e}var r=_().querySelectorAll(t);if(r){G(r,function(e){var t;var r=i.cloneNode(true);t=_().createDocumentFragment();t.appendChild(r);if(!ie(o,e)){t=r}var n={shouldSwap:true,target:e,fragment:t};if(!$(e,"htmx:oobBeforeSwap",n))return;e=n.target;if(n["shouldSwap"]){we(o,e,e,t,a)}G(a.elts,function(e){$(e,"htmx:oobAfterSwap",n)})});i.parentNode.removeChild(i)}else{i.parentNode.removeChild(i);J(_().body,"htmx:oobErrorNoTarget",{content:i})}return e}function oe(e,t,r){var n=z(e,"hx-select-oob");if(n){var i=n.split(",");for(let e=0;e0){var t=n.querySelector(e.tagName+"[id='"+e.id+"']");if(t&&t!==n){var r=e.cloneNode();ne(e,t);i.tasks.push(function(){ne(e,r)})}}})}function ue(e){return function(){T(e,U.config.addedClass);vt(e);ut(e);fe(e);$(e,"htmx:load")}}function fe(e){var t="[autofocus]";var r=d(e,t)?e:e.querySelector(t);if(r!=null){r.focus()}}function ce(e,t,r,n){le(e,r,n);while(r.childNodes.length>0){var i=r.firstChild;L(i,U.config.addedClass);e.insertBefore(i,t);if(i.nodeType!==Node.TEXT_NODE&&i.nodeType!==Node.COMMENT_NODE){n.tasks.push(ue(i))}}}function he(t){var e=W(t);if(e.webSocket){e.webSocket.close()}if(e.sseEventSource){e.sseEventSource.close()}$(t,"htmx:beforeCleanupElement");if(e.listenerInfos){G(e.listenerInfos,function(e){if(t!==e.on){e.on.removeEventListener(e.trigger,e.listener)}})}if(t.children){G(t.children,function(e){he(e)})}}function de(e,t,r){if(e.tagName==="BODY"){return ye(e,t,r)}else{var n;var i=e.previousSibling;ce(u(e),e,t,r);if(i==null){n=u(e).firstChild}else{n=i.nextSibling}W(e).replacedWith=n;r.elts=[];while(n&&n!==e){if(n.nodeType===Node.ELEMENT_NODE){r.elts.push(n)}n=n.nextElementSibling}he(e);u(e).removeChild(e)}}function ve(e,t,r){return ce(e,e.firstChild,t,r)}function ge(e,t,r){return ce(u(e),e,t,r)}function pe(e,t,r){return ce(e,null,t,r)}function me(e,t,r){return ce(u(e),e.nextSibling,t,r)}function xe(e,t,r){he(e);return u(e).removeChild(e)}function ye(e,t,r){var n=e.firstChild;ce(e,n,t,r);if(n){while(n.nextSibling){he(n.nextSibling);e.removeChild(n.nextSibling)}he(n);e.removeChild(n)}}function be(e,t){var r=z(e,"hx-select");if(r){var n=_().createDocumentFragment();G(t.querySelectorAll(r),function(e){n.appendChild(e)});t=n}return t}function we(e,t,r,n,i){switch(e){case"none":return;case"outerHTML":de(r,n,i);return;case"afterbegin":ve(r,n,i);return;case"beforebegin":ge(r,n,i);return;case"beforeend":pe(r,n,i);return;case"afterend":me(r,n,i);return;case"delete":xe(r,n,i);return;default:var a=hr(t);for(var o=0;o-1){var t=e.replace(/]*>|>)([\s\S]*?)<\/svg>/gim,"");var r=t.match(/]*>|>)([\s\S]*?)<\/title>/im);if(r){return r[2]}}}function Ee(e,t,r,n,i){i.title=Se(n);var a=g(n);if(a){oe(r,a,i);a=be(r,a);se(a);return we(e,r,t,a,i)}}function Ce(e,t,r){var n=e.getResponseHeader(t);if(n.indexOf("{")===0){var i=S(n);for(var a in i){if(i.hasOwnProperty(a)){var o=i[a];if(!x(o)){o={value:o}}$(r,a,o)}}}else{$(r,n,[])}}var Re=/\s/;var Oe=/[\s,]/;var qe=/[_$a-zA-Z]/;var Le=/[_$a-zA-Z0-9]/;var Te=['"',"'","/"];var Ae=/[^\s]/;function He(e){var t=[];var r=0;while(r0){var o=t[0];if(o==="]"){n--;if(n===0){if(a===null){i=i+"true"}t.shift();i+=")})";try{var s=Zt(e,function(){return Function(i)()},function(){return true});s.source=i;return s}catch(e){J(_().body,"htmx:syntax:error",{error:e,source:i});return null}}}else if(o==="["){n++}if(Ne(o,a,r)){i+="(("+r+"."+o+") ? ("+r+"."+o+") : (window."+o+"))"}else{i=i+o}a=t.shift()}}}function c(e,t){var r="";while(e.length>0&&!e[0].match(t)){r+=e.shift()}return r}var ke="input, textarea, select";function Me(e){var t=V(e,"hx-trigger");var r=[];if(t){var n=He(t);do{c(n,Ae);var f=n.length;var i=c(n,/[,\[\s]/);if(i!==""){if(i==="every"){var a={trigger:"every"};c(n,Ae);a.pollInterval=v(c(n,/[,\[\s]/));c(n,Ae);var o=Ie(e,n,"event");if(o){a.eventFilter=o}r.push(a)}else if(i.indexOf("sse:")===0){r.push({trigger:"sse",sseEvent:i.substr(4)})}else{var s={trigger:i};var o=Ie(e,n,"event");if(o){s.eventFilter=o}while(n.length>0&&n[0]!==","){c(n,Ae);var l=n.shift();if(l==="changed"){s.changed=true}else if(l==="once"){s.once=true}else if(l==="consume"){s.consume=true}else if(l==="delay"&&n[0]===":"){n.shift();s.delay=v(c(n,Oe))}else if(l==="from"&&n[0]===":"){n.shift();var u=c(n,Oe);if(u==="closest"||u==="find"||u==="next"||u==="previous"){n.shift();u+=" "+c(n,Oe)}s.from=u}else if(l==="target"&&n[0]===":"){n.shift();s.target=c(n,Oe)}else if(l==="throttle"&&n[0]===":"){n.shift();s.throttle=v(c(n,Oe))}else if(l==="queue"&&n[0]===":"){n.shift();s.queue=c(n,Oe)}else if((l==="root"||l==="threshold")&&n[0]===":"){n.shift();s[l]=c(n,Oe)}else{J(e,"htmx:syntax:error",{token:n.shift()})}}r.push(s)}}if(n.length===f){J(e,"htmx:syntax:error",{token:n.shift()})}c(n,Ae)}while(n[0]===","&&n.shift())}if(r.length>0){return r}else if(d(e,"form")){return[{trigger:"submit"}]}else if(d(e,'input[type="button"]')){return[{trigger:"click"}]}else if(d(e,ke)){return[{trigger:"change"}]}else{return[{trigger:"click"}]}}function De(e){W(e).cancelled=true}function Pe(e,t,r){var n=W(e);n.timeout=setTimeout(function(){if(K(e)&&n.cancelled!==true){if(!Ue(r,pt("hx:poll:trigger",{triggerSpec:r,target:e}))){t(e)}Pe(e,t,r)}},r.pollInterval)}function Xe(e){return location.hostname===e.hostname&&f(e,"href")&&f(e,"href").indexOf("#")!==0}function Fe(t,r,e){if(t.tagName==="A"&&Xe(t)&&(t.target===""||t.target==="_self")||t.tagName==="FORM"){r.boosted=true;var n,i;if(t.tagName==="A"){n="get";i=f(t,"href")}else{var a=f(t,"method");n=a?a.toLowerCase():"get";if(n==="get"){}i=f(t,"action")}e.forEach(function(e){Ve(t,function(e){ar(n,i,t,e)},r,e,true)})}}function je(e,t){if(e.type==="submit"||e.type==="click"){if(t.tagName==="FORM"){return true}if(d(t,'input[type="submit"], button')&&N(t,"form")!==null){return true}if(t.tagName==="A"&&t.href&&(t.getAttribute("href")==="#"||t.getAttribute("href").indexOf("#")!==0)){return true}}return false}function Be(e,t){return W(e).boosted&&e.tagName==="A"&&t.type==="click"&&(t.ctrlKey||t.metaKey)}function Ue(e,t){var r=e.eventFilter;if(r){try{return r(t)!==true}catch(e){J(_().body,"htmx:eventFilter:error",{error:e,source:r.source});return true}}return false}function Ve(a,o,e,s,l){var t;if(s.from){t=I(a,s.from)}else{t=[a]}G(t,function(n){var i=function(e){if(!K(a)){n.removeEventListener(s.trigger,i);return}if(Be(a,e)){return}if(l||je(e,a)){e.preventDefault()}if(Ue(s,e)){return}var t=W(e);t.triggerSpec=s;if(t.handledFor==null){t.handledFor=[]}var r=W(a);if(t.handledFor.indexOf(a)<0){t.handledFor.push(a);if(s.consume){e.stopPropagation()}if(s.target&&e.target){if(!d(e.target,s.target)){return}}if(s.once){if(r.triggeredOnce){return}else{r.triggeredOnce=true}}if(s.changed){if(r.lastValue===a.value){return}else{r.lastValue=a.value}}if(r.delayed){clearTimeout(r.delayed)}if(r.throttle){return}if(s.throttle){if(!r.throttle){o(a,e);r.throttle=setTimeout(function(){r.throttle=null},s.throttle)}}else if(s.delay){r.delayed=setTimeout(function(){o(a,e)},s.delay)}else{o(a,e)}}};if(e.listenerInfos==null){e.listenerInfos=[]}e.listenerInfos.push({trigger:s.trigger,listener:i,on:n});n.addEventListener(s.trigger,i)})}var _e=false;var ze=null;function We(){if(!ze){ze=function(){_e=true};window.addEventListener("scroll",ze);setInterval(function(){if(_e){_e=false;G(_().querySelectorAll("[hx-trigger='revealed'],[data-hx-trigger='revealed']"),function(e){Ge(e)})}},200)}}function Ge(t){if(!o(t,"data-hx-revealed")&&b(t)){t.setAttribute("data-hx-revealed","true");var e=W(t);if(e.initialized){$(t,"revealed")}else{t.addEventListener("htmx:afterProcessNode",function(e){$(t,"revealed")},{once:true})}}}function Je(e,t,r){var n=w(r);for(var i=0;i=0){var t=Ye(n);setTimeout(function(){$e(s,r,n+1)},t)}};t.onopen=function(e){n=0};W(s).webSocket=t;t.addEventListener("message",function(e){if(Ze(s)){return}var t=e.data;xt(s,function(e){t=e.transformResponse(t,null,s)});var r=Gt(s);var n=g(t);var i=y(n.children);for(var a=0;a0){$(u,"htmx:validation:halted",i);return}t.send(JSON.stringify(l));if(je(e,u)){e.preventDefault()}})}else{J(u,"htmx:noWebSocketSourceError")}}function Ye(e){var t=U.config.wsReconnectDelay;if(typeof t==="function"){return t(e)}if(t==="full-jitter"){var r=Math.min(e,6);var n=1e3*Math.pow(2,r);return n*Math.random()}yt('htmx.config.wsReconnectDelay must either be a function or the string "full-jitter"')}function Qe(e,t,r){var n=w(r);for(var i=0;iU.config.historyCacheSize){i.shift()}while(i.length>0){try{localStorage.setItem("htmx-history-cache",JSON.stringify(i));break}catch(e){J(_().body,"htmx:historyCacheError",{cause:e,cache:i});i.shift()}}}function Et(e){if(!E()){return null}var t=S(localStorage.getItem("htmx-history-cache"))||[];for(var r=0;r=200&&this.status<400){$(_().body,"htmx:historyCacheMissLoad",i);var e=g(this.response);e=e.querySelector("[hx-history-elt],[data-hx-history-elt]")||e;var t=wt();var r=Gt(t);ye(t,e,r);Lt(r.tasks);bt=n;$(_().body,"htmx:historyRestore",{path:n})}else{J(_().body,"htmx:historyCacheMissLoadError",i)}};e.send()}function At(e){Rt();e=e||location.pathname+location.search;var t=Et(e);if(t){var r=g(t.content);var n=wt();var i=Gt(n);ye(n,r,i);Lt(i.tasks);document.title=t.title;window.scrollTo(0,t.scroll);bt=e;$(_().body,"htmx:historyRestore",{path:e})}else{if(U.config.refreshOnHistoryMiss){window.location.reload(true)}else{Tt(e)}}}function Ht(e){var t=j(e,"hx-indicator");if(t==null){t=[e]}G(t,function(e){e.classList["add"].call(e.classList,U.config.requestClass)});return t}function Nt(e){G(e,function(e){e.classList["remove"].call(e.classList,U.config.requestClass)})}function It(e,t){for(var r=0;r=0}function _t(e,t){var r=t?t:z(e,"hx-swap");var n={swapStyle:W(e).boosted?"innerHTML":U.config.defaultSwapStyle,swapDelay:U.config.defaultSwapDelay,settleDelay:U.config.defaultSettleDelay};if(W(e).boosted&&!Vt(e)){n["show"]="top"}if(r){var i=w(r);if(i.length>0){n["swapStyle"]=i[0];for(var a=1;a0?l.join(":"):null;n["scroll"]=f;n["scrollTarget"]=u}if(o.indexOf("show:")===0){var c=o.substr(5);var l=c.split(":");var h=l.pop();var u=l.length>0?l.join(":"):null;n["show"]=h;n["showTarget"]=u}if(o.indexOf("focus-scroll:")===0){var d=o.substr("focus-scroll:".length);n["focusScroll"]=d=="true"}}}}return n}function zt(e){return z(e,"hx-encoding")==="multipart/form-data"||d(e,"form")&&f(e,"enctype")==="multipart/form-data"}function Wt(t,r,n){var i=null;xt(r,function(e){if(i==null){i=e.encodeParameters(t,n,r)}});if(i!=null){return i}else{if(zt(r)){return jt(n)}else{return Ft(n)}}}function Gt(e){return{tasks:[],elts:[e]}}function Jt(e,t){var r=e[0];var n=e[e.length-1];if(t.scroll){var i=null;if(t.scrollTarget){i=Q(r,t.scrollTarget)}if(t.scroll==="top"&&(r||i)){i=i||r;i.scrollTop=0}if(t.scroll==="bottom"&&(n||i)){i=i||n;i.scrollTop=i.scrollHeight}}if(t.show){var i=null;if(t.showTarget){var a=t.showTarget;if(t.showTarget==="window"){a="body"}i=Q(r,a)}if(t.show==="top"&&(r||i)){i=i||r;i.scrollIntoView({block:"start",behavior:U.config.scrollBehavior})}if(t.show==="bottom"&&(n||i)){i=i||n;i.scrollIntoView({block:"end",behavior:U.config.scrollBehavior})}}}function $t(e,t,r,n){if(n==null){n={}}if(e==null){return n}var i=V(e,t);if(i){var a=i.trim();var o=r;if(a.indexOf("javascript:")===0){a=a.substr(11);o=true}else if(a.indexOf("js:")===0){a=a.substr(3);o=true}if(a.indexOf("{")!==0){a="{"+a+"}"}var s;if(o){s=Zt(e,function(){return Function("return ("+a+")")()},{})}else{s=S(a)}for(var l in s){if(s.hasOwnProperty(l)){if(n[l]==null){n[l]=s[l]}}}}return $t(u(e),t,r,n)}function Zt(e,t,r){if(U.config.allowEval){return t()}else{J(e,"htmx:evalDisallowedError");return r}}function Kt(e,t){return $t(e,"hx-vars",true,t)}function Yt(e,t){return $t(e,"hx-vals",false,t)}function Qt(e){return Y(Kt(e),Yt(e))}function er(t,r,n){if(n!==null){try{t.setRequestHeader(r,n)}catch(e){t.setRequestHeader(r,encodeURIComponent(n));t.setRequestHeader(r+"-URI-AutoEncoded","true")}}}function tr(t){if(t.responseURL&&typeof URL!=="undefined"){try{var e=new URL(t.responseURL);return e.pathname+e.search}catch(e){J(_().body,"htmx:badResponseUrl",{url:t.responseURL})}}}function rr(e,t){return e.getAllResponseHeaders().match(t)}function nr(e,t,r){e=e.toLowerCase();if(r){if(r instanceof Element||p(r,"String")){return ar(e,t,null,null,{targetOverride:D(r),returnPromise:true})}else{return ar(e,t,D(r.source),r.event,{handler:r.handler,headers:r.headers,values:r.values,targetOverride:D(r.target),swapOverride:r.swap,returnPromise:true})}}else{return ar(e,t,null,null,{returnPromise:true})}}function ir(e){var t=[];while(e){t.push(e);e=e.parentElement}return t}function ar(e,t,n,f,r){var c=null;var h=null;r=r!=null?r:{};if(r.returnPromise&&typeof Promise!=="undefined"){var d=new Promise(function(e,t){c=e;h=t})}if(n==null){n=_().body}var v=r.handler||sr;if(!K(n)){return}var g=r.targetOverride||re(n);if(g==null||g==ee){J(n,"htmx:targetError",{target:V(n,"hx-target")});return}var p=n;var i=W(n);var a=z(n,"hx-sync");var m=null;var x=false;if(a){var y=a.split(":");var b=y[0].trim();if(b==="this"){p=te(n,"hx-sync")}else{p=Q(n,b)}a=(y[1]||"drop").trim();i=W(p);if(a==="drop"&&i.xhr&&i.abortable!==true){return}else if(a==="abort"){if(i.xhr){return}else{x=true}}else if(a==="replace"){$(p,"htmx:abort")}else if(a.indexOf("queue")===0){var w=a.split(" ");m=(w[1]||"last").trim()}}if(i.xhr){if(i.abortable){$(p,"htmx:abort")}else{if(m==null){if(f){var S=W(f);if(S&&S.triggerSpec&&S.triggerSpec.queue){m=S.triggerSpec.queue}}if(m==null){m="last"}}if(i.queuedRequests==null){i.queuedRequests=[]}if(m==="first"&&i.queuedRequests.length===0){i.queuedRequests.push(function(){ar(e,t,n,f,r)})}else if(m==="all"){i.queuedRequests.push(function(){ar(e,t,n,f,r)})}else if(m==="last"){i.queuedRequests=[];i.queuedRequests.push(function(){ar(e,t,n,f,r)})}return}}var o=new XMLHttpRequest;i.xhr=o;i.abortable=x;var s=function(){i.xhr=null;i.abortable=false;if(i.queuedRequests!=null&&i.queuedRequests.length>0){var e=i.queuedRequests.shift();e()}};var E=z(n,"hx-prompt");if(E){var C=prompt(E);if(C===null||!$(n,"htmx:prompt",{prompt:C,target:g})){Z(c);s();return d}}var R=z(n,"hx-confirm");if(R){if(!confirm(R)){Z(c);s();return d}}var O=Bt(n,g,C);if(r.headers){O=Y(O,r.headers)}var q=Pt(n,e);var L=q.errors;var T=q.values;if(r.values){T=Y(T,r.values)}var A=Qt(n);var H=Y(T,A);var N=Ut(H,n);if(e!=="get"&&!zt(n)){O["Content-Type"]="application/x-www-form-urlencoded"}if(t==null||t===""){t=_().location.href}var I=$t(n,"hx-request");var l={parameters:N,unfilteredParameters:H,headers:O,target:g,verb:e,errors:L,withCredentials:r.credentials||I.credentials||U.config.withCredentials,timeout:r.timeout||I.timeout||U.config.timeout,path:t,triggeringEvent:f};if(!$(n,"htmx:configRequest",l)){Z(c);s();return d}t=l.path;e=l.verb;O=l.headers;N=l.parameters;L=l.errors;if(L&&L.length>0){$(n,"htmx:validation:halted",l);Z(c);s();return d}var k=t.split("#");var M=k[0];var D=k[1];var P=null;if(e==="get"){P=M;var X=Object.keys(N).length!==0;if(X){if(P.indexOf("?")<0){P+="?"}else{P+="&"}P+=Ft(N);if(D){P+="#"+D}}o.open("GET",P,true)}else{o.open(e.toUpperCase(),t,true)}o.overrideMimeType("text/html");o.withCredentials=l.withCredentials;o.timeout=l.timeout;if(I.noHeaders){}else{for(var F in O){if(O.hasOwnProperty(F)){var j=O[F];er(o,F,j)}}}var u={xhr:o,target:g,requestConfig:l,etc:r,pathInfo:{requestPath:t,finalRequestPath:P||t,anchor:D}};o.onload=function(){try{var e=ir(n);u.pathInfo.responsePath=tr(o);v(n,u);Nt(B);$(n,"htmx:afterRequest",u);$(n,"htmx:afterOnLoad",u);if(!K(n)){var t=null;while(e.length>0&&t==null){var r=e.shift();if(K(r)){t=r}}if(t){$(t,"htmx:afterRequest",u);$(t,"htmx:afterOnLoad",u)}}Z(c);s()}catch(e){J(n,"htmx:onLoadError",Y({error:e},u));throw e}};o.onerror=function(){Nt(B);J(n,"htmx:afterRequest",u);J(n,"htmx:sendError",u);Z(h);s()};o.onabort=function(){Nt(B);J(n,"htmx:afterRequest",u);J(n,"htmx:sendAbort",u);Z(h);s()};o.ontimeout=function(){Nt(B);J(n,"htmx:afterRequest",u);J(n,"htmx:timeout",u);Z(h);s()};if(!$(n,"htmx:beforeRequest",u)){Z(c);s();return d}var B=Ht(n);G(["loadstart","loadend","progress","abort"],function(t){G([o,o.upload],function(e){e.addEventListener(t,function(e){$(n,"htmx:xhr:"+t,{lengthComputable:e.lengthComputable,loaded:e.loaded,total:e.total})})})});$(n,"htmx:beforeSend",u);o.send(e==="get"?null:Wt(o,n,N));return d}function or(e,t){var r=t.xhr;var n=null;var i=null;if(rr(r,/HX-Push:/i)){n=r.getResponseHeader("HX-Push");i="push"}else if(rr(r,/HX-Push-Url:/i)){n=r.getResponseHeader("HX-Push-Url");i="push"}else if(rr(r,/HX-Replace-Url:/i)){n=r.getResponseHeader("HX-Replace-Url");i="replace"}if(n){if(n==="false"){return{}}else{return{type:i,path:n}}}var a=t.pathInfo.finalRequestPath;var o=t.pathInfo.responsePath;var s=z(e,"hx-push-url");var f=z(e,"hx-replace-url");var c=W(e).boosted;var l=null;var u=null;if(s){l="push";u=s}else if(f){l="replace";u=f}else if(c){l="push";u=o||a}if(u){if(u==="false"){return{}}if(u==="true"){u=o||a}if(t.pathInfo.anchor&&u.indexOf("#")===-1){u=u+"#"+t.pathInfo.anchor}return{type:l,path:u}}else{return{}}}function sr(s,l){var u=l.xhr;var f=l.target;var n=l.etc;if(!$(s,"htmx:beforeOnLoad",l))return;if(rr(u,/HX-Trigger:/i)){Ce(u,"HX-Trigger",s)}if(rr(u,/HX-Location:/i)){Rt();var e=u.getResponseHeader("HX-Location");var c;if(e.indexOf("{")===0){c=S(e);e=c["path"];delete c["path"]}nr("GET",e,c).then(()=>{Ot(e)});return}if(rr(u,/HX-Redirect:/i)){location.href=u.getResponseHeader("HX-Redirect");return}if(rr(u,/HX-Refresh:/i)){if("true"===u.getResponseHeader("HX-Refresh")){location.reload();return}}if(rr(u,/HX-Retarget:/i)){l.target=_().querySelector(u.getResponseHeader("HX-Retarget"))}var h=or(s,l);var i=u.status>=200&&u.status<400&&u.status!==204;var d=u.response;var t=u.status>=400;var r=Y({shouldSwap:i,serverResponse:d,isError:t},l);if(!$(f,"htmx:beforeSwap",r))return;f=r.target;d=r.serverResponse;t=r.isError;l.failed=t;l.successful=!t;if(r.shouldSwap){if(u.status===286){De(s)}xt(s,function(e){d=e.transformResponse(d,u,s)});if(h.type){Rt()}var a=n.swapOverride;if(rr(u,/HX-Reswap:/i)){a=u.getResponseHeader("HX-Reswap")}var c=_t(s,a);f.classList.add(U.config.swappingClass);var o=function(){try{var e=document.activeElement;var t={};try{t={elt:e,start:e?e.selectionStart:null,end:e?e.selectionEnd:null}}catch(e){}var n=Gt(f);Ee(c.swapStyle,f,s,d,n);if(t.elt&&!K(t.elt)&&t.elt.id){var r=document.getElementById(t.elt.id);var i={preventScroll:c.focusScroll!==undefined?!c.focusScroll:!U.config.defaultFocusScroll};if(r){if(t.start&&r.setSelectionRange){r.setSelectionRange(t.start,t.end)}r.focus(i)}}f.classList.remove(U.config.swappingClass);G(n.elts,function(e){if(e.classList){e.classList.add(U.config.settlingClass)}$(e,"htmx:afterSwap",l)});if(rr(u,/HX-Trigger-After-Swap:/i)){var a=s;if(!K(s)){a=_().body}Ce(u,"HX-Trigger-After-Swap",a)}var o=function(){G(n.tasks,function(e){e.call()});G(n.elts,function(e){if(e.classList){e.classList.remove(U.config.settlingClass)}$(e,"htmx:afterSettle",l)});if(h.type){if(h.type==="push"){Ot(h.path);$(_().body,"htmx:pushedIntoHistory",{path:h.path})}else{qt(h.path);$(_().body,"htmx:replacedInHistory",{path:h.path})}}if(l.pathInfo.anchor){var e=R("#"+l.pathInfo.anchor);if(e){e.scrollIntoView({block:"start",behavior:"auto"})}}if(n.title){var t=R("title");if(t){t.innerHTML=n.title}else{window.document.title=n.title}}Jt(n.elts,c);if(rr(u,/HX-Trigger-After-Settle:/i)){var r=s;if(!K(s)){r=_().body}Ce(u,"HX-Trigger-After-Settle",r)}};if(c.settleDelay>0){setTimeout(o,c.settleDelay)}else{o()}}catch(e){J(s,"htmx:swapError",l);throw e}};if(c.swapDelay>0){setTimeout(o,c.swapDelay)}else{o()}}if(t){J(s,"htmx:responseError",Y({error:"Response Status Error Code "+u.status+" from "+l.pathInfo.path},l))}}var lr={};function ur(){return{init:function(e){return null},onEvent:function(e,t){return true},transformResponse:function(e,t,r){return e},isInlineSwap:function(e){return false},handleSwap:function(e,t,r,n){return false},encodeParameters:function(e,t,r){return null}}}function fr(e,t){if(t.init){t.init(r)}lr[e]=Y(ur(),t)}function cr(e){delete lr[e]}function hr(e,r,n){if(e==undefined){return r}if(r==undefined){r=[]}if(n==undefined){n=[]}var t=V(e,"hx-ext");if(t){G(t.split(","),function(e){e=e.replace(/ /g,"");if(e.slice(0,7)=="ignore:"){n.push(e.slice(7));return}if(n.indexOf(e)<0){var t=lr[e];if(t&&r.indexOf(t)<0){r.push(t)}}})}return hr(u(e),r,n)}function dr(e){if(_().readyState!=="loading"){e()}else{_().addEventListener("DOMContentLoaded",e)}}function vr(){if(U.config.includeIndicatorStyles!==false){_().head.insertAdjacentHTML("beforeend","")}}function gr(){var e=_().querySelector('meta[name="htmx-config"]');if(e){return S(e.content)}else{return null}}function pr(){var e=gr();if(e){U.config=Y(U.config,e)}}dr(function(){pr();vr();var e=_().body;vt(e);var t=_().querySelectorAll("[hx-trigger='restored'],[data-hx-trigger='restored']");e.addEventListener("htmx:abort",function(e){var t=e.target;var r=W(t);if(r&&r.xhr){r.xhr.abort()}});window.onpopstate=function(e){if(e.state&&e.state.htmx){At();G(t,function(e){$(e,"htmx:restored",{document:_(),triggerEvent:$})})}};setTimeout(function(){$(e,"htmx:load",{})},0)});return U}()}); \ No newline at end of file diff --git a/docs/app/static/logo.png b/docs/app/static/logo.png deleted file mode 100644 index 18f7c07e0760d684c100dd4ba5c6f71b092102ee..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1685 zcmV;G25R|pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H11|msB zK~#9!?VMR}97Pbvod-fV1O#}o1cW1j2R|D5Ud!PM4g^SooC9JcAPJFxaEhBJz5^cu zA?|Pl62XIsXU5){vDWUM4H#?_AqDXeaN@NSFV(X%yW{oFOw~-!Ugn_`MfP-8|F-sD z-CZ?q$>;MeN!X}vJ*=AijB0SEm{z~6aeI1t_V)Jno`rwM`uh6rlrg68PxuM;r)scA zl46p`psL9p1;=w>dB>I%gTDnoTNh_sfO`NyUj)lL_D6qz|CShIt`mL<|2)3tg#Qfz zTSSHnS}~Yys%`c{j%gadF=9kNSq9p*x$f@n&D8OPAHp9Oa>-W*cmfeFbuh)q?kERc zwg_Rf%EVL;Wn2I{1h!NGv~3XavlQTBe&I*KPhVeiVm);U+tz3w&?R$$vw2OMY(+}P zexHb51stOPj_`<{Y!&l6e)#(80vGG5E7)4vdI%g_2nM}UQbs4(-3ZY8FrYm)69!z& z8wR=z_<~qpUBHGN$962}Qe^Xw!;&R{+Y=-m0roq5NVf+iMb)rAD%a`|e;33$YYKZz zpV|hFTp)t}Dx1w-9!H}wz+snio4=H3m#I4c1Pfe|q~Xz}L(e|of(~=olN^s#0kmts zVSy{5{xd1SV}nNO9tt$*?QVdyC;>D|QZkv$dhqL0oQCt*Nt3S86W0BB=_tbfS|VtX zFb{)`Ac0TA*qefZTc1&ZM@gDdK%d8a^}L`@PET(Lk&azh(Bc#+p6TrDyaxXNvkVQ7 z2%Nl2sX1tXw-X8a68!G4_u1M3kG3tOT-5wa(P+i6zClFvcCZBuXt1X$jnUrTel7g$ z6gFvgb#>hu44i$A+ocrOdR{fH`=r1gGkB^1n&Fe7$-b2cdKn`6P|#Sifx|cV3o3AU z=H6Ja9nk-%#qEzY(1TdeA{k<$MgWHoWmGnBykxTZFyPWbkBrP-5u(vMV6i!*Mn6qS zKm!8<*THit5_lFg|0cN+&gRDqb`J@*rt>~BXq|r-2HJ_}98#m7iFoI|5uVkMz>f!w zCAO<@O#f0A@T!4!U}un^pN&~$*eEJFh`BOhV?_n7>1=BtY&Fe#;g`>0KzsI^KN^N{ z74lyChcJx>NC#!yu)+QI^)TLe$b3VXu|y!jI*;S7Cj5a{0F6Hx0`Q-(poPIc_hwk& z>A1-dYaJaOH^7)_pZPwdjO76TJ`Qj)Xw?H6lE~Fm01oh9Du8}2iMpQ;a2=BA26`#& z%#|*1{8a@MD$-K}HtZ;%!A^*YV`%Cvu;5=k(s3lIina&1D=B}2-4*$^vjF@A@uYc9 zl;T=6gHMwlG_8|yKzlV6pdW>Wr;-HiT3cJ&dYE%tDwS%DU6~TVfkR<)fXi)yvw%Gp zws}`q>d*((fK%@#IJiNo;$Y9A@1|Any@$@Xs1;xW%tWUNfzC*MxK!)@wxRSXHmAFerPF3LHN1cbXYA zTw%OQ1zo9q&F546A2=O!c%NWU^UWZx`G$L;zujb@Um=4I=ztCDb{eF1J2|bvjh_rn z{xT8tVpywjBJE|34!i^!eH>rZO#YaZf-ePlXY1+E}8&2eg3GprZuI-+&!Z~-*> ziWxv#`>N7d2@~yZ7T|C}bf_AjW3>!Bz?TRIpJh$AUZ^YSF!@0$Xt9z!zH-G-cuJZFo~?}WM_h;tnRC*&Jmn#h50Wf zx$8*$)jW|j3Xb8vmg0h^mKRIN!&&5HnEXqpplP2DNuO)`=00000NkvXXu0mjf6Wk}+ diff --git a/docs/app/static/style.css b/docs/app/static/style.css deleted file mode 100644 index 1833760..0000000 --- a/docs/app/static/style.css +++ /dev/null @@ -1,212 +0,0 @@ -@import url('https://fonts.googleapis.com/css2?family=Inconsolata&display=swap'); - -:root { - --header-text-color: #1a1a29; - --body-text-color: #2a2a36; - --body-bg-color: rgba(0, 0, 63, 0.03); -} - -/* @link https://utopia.fyi/type/calculator?c=320,16,1.2,1500,18,1.25,5,2,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l */ - -:root { - --step--2: clamp(0.69rem, calc(0.69rem + 0.03vw), 0.72rem); - --step--1: clamp(0.83rem, calc(0.81rem + 0.09vw), 0.90rem); - --step-0: clamp(1.00rem, calc(0.97rem + 0.17vw), 1.13rem); - --step-1: clamp(1.20rem, calc(1.14rem + 0.28vw), 1.41rem); - --step-2: clamp(1.44rem, calc(1.35rem + 0.43vw), 1.76rem); - --step-3: clamp(1.73rem, calc(1.60rem + 0.64vw), 2.20rem); - --step-4: clamp(2.07rem, calc(1.89rem + 0.91vw), 2.75rem); - --step-5: clamp(2.49rem, calc(2.23rem + 1.28vw), 3.43rem); -} - -/* @link https://utopia.fyi/space/calculator?c=320,14,1.2,1500,18,1.25,5,2,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l */ - -:root { - --space-3xs: clamp(0.25rem, calc(0.23rem + 0.08vw), 0.31rem); - --space-2xs: clamp(0.44rem, calc(0.40rem + 0.17vw), 0.56rem); - --space-xs: clamp(0.69rem, calc(0.64rem + 0.25vw), 0.88rem); - --space-s: clamp(0.88rem, calc(0.81rem + 0.34vw), 1.13rem); - --space-m: clamp(1.31rem, calc(1.21rem + 0.51vw), 1.69rem); - --space-l: clamp(1.75rem, calc(1.61rem + 0.68vw), 2.25rem); - --space-xl: clamp(2.63rem, calc(2.42rem + 1.02vw), 3.38rem); - --space-2xl: clamp(3.50rem, calc(3.23rem + 1.36vw), 4.50rem); - --space-3xl: clamp(5.25rem, calc(4.84rem + 2.03vw), 6.75rem); - - /* One-up pairs */ - --space-3xs-2xs: clamp(0.25rem, calc(0.17rem + 0.42vw), 0.56rem); - --space-2xs-xs: clamp(0.44rem, calc(0.32rem + 0.59vw), 0.88rem); - --space-xs-s: clamp(0.69rem, calc(0.57rem + 0.59vw), 1.13rem); - --space-s-m: clamp(0.88rem, calc(0.65rem + 1.10vw), 1.69rem); - --space-m-l: clamp(1.31rem, calc(1.06rem + 1.27vw), 2.25rem); - --space-l-xl: clamp(1.75rem, calc(1.31rem + 2.20vw), 3.38rem); - --space-xl-2xl: clamp(2.63rem, calc(2.12rem + 2.54vw), 4.50rem); - --space-2xl-3xl: clamp(3.50rem, calc(2.62rem + 4.41vw), 6.75rem); - - /* Custom pairs */ - --space-s-l: clamp(0.88rem, calc(0.50rem + 1.86vw), 2.25rem); -} - -html { - box-sizing: border-box; -} - -*, *:before, *:after { - box-sizing: inherit; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - font-family: system-ui, sans-serif; - color: var(--header-text-color); -} - -h1 { - font-size: var(--step-2); - margin-top: var(--space-2xl-3xl); -} - -h2 { - font-size: var(--step-1); - margin-top: var(--space-xl-2xl); -} - -h3, h4, h5, h6 { - font-size: var(--step-0); - margin-top: var(--space-s-l); -} - -body { - font-size: var(--step-0); - line-height: 1.3; - font-family: system-ui, sans-serif; - color: var(--body-text-color); - background: var(--body-bg-color); - margin: 0; - -moz-osx-font-smoothing: grayscale; - -webkit-font-smoothing: antialiased; - -webkit-text-size-adjust: 100%; -} - -body { - display: grid; - grid-template-columns: 1fr min(70ch, calc(100% - var(--space-2xs-xs) * 2)) 1fr; - grid-column-gap: var(--space-2xs-xs); -} - -body > * { - grid-column: 2; -} - -::selection { - color: #f3f3f9; - background: #060639; -} - -body > nav { - margin-top: var(--space-s-m); -} - -body > nav ul { - list-style: none; - display: flex; - justify-content: center; - gap: var(--space-xs); - margin: 0; - padding: 0; -} - -body > nav ul li a { - padding: var(--space-xs); - border: 1px dotted grey; -} - -body > nav ul li a:hover { - border-style: solid; -} - -#feature-list { - display: flex; - gap: var(--space-xs); - flex-wrap: wrap; - list-style: none; - margin: 0; - padding: 0; -} - -#feature-list li { - border: 1px dotted #ccc; - border-radius: 10px; - background: #fff; - box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.05); - padding: var(--space-xs); - flex: 1 1 220px; - display: flex; - flex-direction: column; -} - -#feature-list li strong { - display: block; - text-align: center; - height: var(--space-l); -} - -#feature-list li p { - font-size: var(--step--1); -} - -#code-example code { color: #666; } -.keyword { color: darkgreen; } -.simple-expr { color: darkgreen; } -.go { color: indigo; } -.html { font-weight: 700; color: black; } - -pre { - background: #fff; - margin: 0; - padding: var(--space-xs) var(--space-xs); - font-size: var(--step-0); - overflow-x: scroll; -} - -pre, code { - font-family: 'Inconsolata', monospace; -} - -footer { - margin-top: var(--space-m-l); - padding-top: var(--space-m-l); - border-top: 1px solid #ccc; - margin-bottom: 5rem; - font-size: var(--step--1); -} - -.adhoc img { - max-height: 0.85em; - width: auto; -} - -aside { - margin: var(--space-xl); -} - -header h1 { - display: flex; - align-items: center; - gap: var(--space-2xs); -} - -header h1 img { - max-height: 0.8em; - width: auto; -} - -iframe[title="YouTube video player"] { - display: block; - margin-top: var(--space-l-xl); - margin-left: auto; - margin-right: auto; -} diff --git a/docs/fly.toml b/docs/fly.toml deleted file mode 100644 index 540016a..0000000 --- a/docs/fly.toml +++ /dev/null @@ -1,42 +0,0 @@ -# fly.toml file generated for pushup on 2022-10-20T07:58:55-05:00 - -app = "pushup" -kill_signal = "SIGINT" -kill_timeout = 5 -processes = [] - -[build] - dockerfile = "Dockerfile" - -[env] - PORT = "8080" - -[experimental] - allowed_public_ports = [] - auto_rollback = true - -[[services]] - http_checks = [] - internal_port = 8080 - processes = ["app"] - protocol = "tcp" - script_checks = [] - [services.concurrency] - hard_limit = 25 - soft_limit = 20 - type = "connections" - - [[services.ports]] - force_https = true - handlers = ["http"] - port = 80 - - [[services.ports]] - handlers = ["tls", "http"] - port = 443 - - [[services.tcp_checks]] - grace_period = "1s" - interval = "15s" - restart_limit = 0 - timeout = "2s" diff --git a/docs/go.mod b/docs/go.mod deleted file mode 100644 index 9963d40..0000000 --- a/docs/go.mod +++ /dev/null @@ -1,5 +0,0 @@ -module example/myproject - -go 1.18 - -require github.com/yuin/goldmark v1.5.2 // indirect diff --git a/docs/go.sum b/docs/go.sum deleted file mode 100644 index ca59fd4..0000000 --- a/docs/go.sum +++ /dev/null @@ -1,2 +0,0 @@ -github.com/yuin/goldmark v1.5.2 h1:ALmeCk/px5FSm1MAcFBAsVKZjDuMVj8Tm7FFIlMJnqU= -github.com/yuin/goldmark v1.5.2/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=