├── .formatter.exs
├── .gitignore
├── CONTRIBUTORS.markdown
├── README.md
├── assets
├── .babelrc
├── css
│ ├── app.scss
│ └── phoenix.css
├── js
│ ├── app.js
│ └── socket.js
├── package-lock.json
├── package.json
├── static
│ ├── favicon
│ │ ├── about.txt
│ │ ├── android-chrome-192x192.png
│ │ ├── android-chrome-512x512.png
│ │ ├── apple-touch-icon.png
│ │ ├── favicon-16x16.png
│ │ ├── favicon-32x32.png
│ │ ├── favicon.ico
│ │ └── site.webmanifest
│ ├── images
│ │ └── phoenix.png
│ └── robots.txt
└── webpack.config.js
├── config
├── .dev.exs.swp
├── config.exs
├── dev.exs
├── prod.exs
└── test.exs
├── lib
├── textdb.ex
├── textdb
│ ├── analytic.ex
│ ├── application.ex
│ ├── data.ex
│ └── repo.ex
├── textdb_web.ex
└── textdb_web
│ ├── channels
│ └── user_socket.ex
│ ├── controllers
│ ├── api_controller.ex
│ ├── data_controller.ex
│ └── page_controller.ex
│ ├── endpoint.ex
│ ├── gettext.ex
│ ├── live
│ ├── data_live.ex
│ ├── data_live.html.leex
│ ├── stats_live.ex
│ └── stats_live.html.leex
│ ├── router.ex
│ ├── telemetry.ex
│ ├── templates
│ ├── layout
│ │ ├── app.html.eex
│ │ ├── live.html.leex
│ │ └── root.html.leex
│ └── page
│ │ ├── data.html.eex
│ │ └── index.html.eex
│ └── views
│ ├── error_helpers.ex
│ ├── error_view.ex
│ ├── layout_view.ex
│ └── page_view.ex
├── mix.exs
├── mix.lock
├── priv
├── gettext
│ ├── en
│ │ └── LC_MESSAGES
│ │ │ └── errors.po
│ └── errors.pot
├── repo
│ ├── migrations
│ │ ├── .formatter.exs
│ │ ├── 20200722011054_create_data.exs
│ │ ├── 20200725154909_add_hash.exs
│ │ ├── 20200727202413_create_analytics.exs
│ │ └── 20200803193450_add_alignment_prefs_to_data.exs
│ └── seeds.exs
└── static
│ ├── about-96819df370ab514804724f61194d7a38.txt
│ ├── about-96819df370ab514804724f61194d7a38.txt.gz
│ ├── about.txt
│ ├── about.txt.gz
│ ├── android-chrome-192x192-b61d0a25f9a6ff61e4e8bbaf98541672.png
│ ├── android-chrome-192x192.png
│ ├── android-chrome-512x512-0c273cc0fde2ee06a3123fb9fc0ac682.png
│ ├── android-chrome-512x512.png
│ ├── apple-touch-icon-8ef6ed894613a4d59226f9fb79e8bd46.png
│ ├── apple-touch-icon.png
│ ├── cache_manifest.json
│ ├── css
│ ├── app-d6153f14286c8634caf2e6f598ef84cb.css
│ ├── app-d6153f14286c8634caf2e6f598ef84cb.css.gz
│ ├── app.css
│ ├── app.css-824c53e76c3a227f8b092034d1cedf33.map
│ ├── app.css.gz
│ └── app.css.map
│ ├── data123
│ ├── data123-92b41deeb79babbc3a997162c90a1163
│ ├── favicon-16x16-f2b34e617e934cc72fe35dde9f8f4f7f.png
│ ├── favicon-16x16.png
│ ├── favicon-32x32-3ee0422ab66b5e73a1a23152d74cd777.png
│ ├── favicon-32x32.png
│ ├── favicon-69806a552c9a440e5e643bd711b6799a.ico
│ ├── favicon.ico
│ ├── favicon
│ ├── about-96819df370ab514804724f61194d7a38.txt
│ ├── about-96819df370ab514804724f61194d7a38.txt.gz
│ ├── about.txt
│ ├── about.txt.gz
│ ├── android-chrome-192x192-b61d0a25f9a6ff61e4e8bbaf98541672.png
│ ├── android-chrome-192x192.png
│ ├── android-chrome-512x512-0c273cc0fde2ee06a3123fb9fc0ac682.png
│ ├── android-chrome-512x512.png
│ ├── apple-touch-icon-8ef6ed894613a4d59226f9fb79e8bd46.png
│ ├── apple-touch-icon.png
│ ├── favicon-16x16-f2b34e617e934cc72fe35dde9f8f4f7f.png
│ ├── favicon-16x16.png
│ ├── favicon-32x32-3ee0422ab66b5e73a1a23152d74cd777.png
│ ├── favicon-32x32.png
│ ├── favicon-69806a552c9a440e5e643bd711b6799a.ico
│ ├── favicon.ico
│ ├── site-053100cb84a50d2ae7f5492f7dd7f25e.webmanifest
│ └── site.webmanifest
│ ├── images
│ ├── phoenix-5bd99a0d17dd41bc9d9bf6840abcc089.png
│ └── phoenix.png
│ ├── js
│ ├── app-02bda5b2a3841f526ae6c27ab930d7c4.js
│ ├── app-02bda5b2a3841f526ae6c27ab930d7c4.js.gz
│ ├── app.js
│ ├── app.js-717b35a99f5463453d5b627d22bea47b.map
│ ├── app.js.gz
│ └── app.js.map
│ ├── robots-067185ba27a5d9139b10a759679045bf.txt
│ ├── robots-067185ba27a5d9139b10a759679045bf.txt.gz
│ ├── robots.txt
│ ├── robots.txt.gz
│ ├── site-053100cb84a50d2ae7f5492f7dd7f25e.webmanifest
│ └── site.webmanifest
└── test
├── support
├── channel_case.ex
├── conn_case.ex
└── data_case.ex
├── test_helper.exs
└── textdb_web
├── controllers
└── page_controller_test.exs
└── views
├── error_view_test.exs
├── layout_view_test.exs
└── page_view_test.exs
/.formatter.exs:
--------------------------------------------------------------------------------
1 | [
2 | inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
3 | ]
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /_build
2 | /cover
3 | /deps
4 | /doc
5 | /.fetch
6 | erl_crash.dump
7 | *.ez
8 | *.beam
9 | /config/*.secret.exs
10 | .elixir_ls/
11 | /ansible
12 | node_modules
13 | data
14 |
--------------------------------------------------------------------------------
/CONTRIBUTORS.markdown:
--------------------------------------------------------------------------------
1 | * Zadkiel (@aslafy-z)
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Textdb
2 |
3 | To start your Phoenix server:
4 |
5 | * Install dependencies with `mix deps.get`
6 | * Create and migrate your database with `mix ecto.setup`
7 | * Install Node.js dependencies with `npm install` inside the `assets` directory
8 | * Start Phoenix endpoint with `mix phx.server`
9 |
10 | Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.
11 |
12 | Ready to run in production? Please [check our deployment guides](https://hexdocs.pm/phoenix/deployment.html).
13 |
14 | ## Learn more
15 |
16 | * Official website: https://www.phoenixframework.org/
17 | * Guides: https://hexdocs.pm/phoenix/overview.html
18 | * Docs: https://hexdocs.pm/phoenix
19 | * Forum: https://elixirforum.com/c/phoenix-forum
20 | * Source: https://github.com/phoenixframework/phoenix
21 |
--------------------------------------------------------------------------------
/assets/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "@babel/preset-env"
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/assets/css/app.scss:
--------------------------------------------------------------------------------
1 | /* This file is for your main application css. */
2 | @import "./phoenix.css";
3 |
4 | /* General style */
5 | h1{font-size: 4.0rem; line-height: 1.25}
6 | h2{font-size: 2.8rem; line-height: 1.3}
7 | h3{font-size: 2.2rem; letter-spacing: -.08rem; line-height: 1.35}
8 | h4{font-size: 1.8rem; letter-spacing: -.05rem; line-height: 1.5}
9 | h5{font-size: 1.6rem; letter-spacing: 0; line-height: 1.4}
10 | h6{font-size: 1.4rem; letter-spacing: 0; line-height: 1.2}
11 | p{font-size: 20px;}
12 | pre{padding: 1em;}
13 |
14 | .container{
15 | margin: 0 auto;
16 | max-width: 80.0rem;
17 | padding-top: 10%;
18 | padding-bottom: 10%;
19 | position: relative;
20 | width: 100%;
21 | text-align: center;
22 | font-size: 20px;
23 | }
24 |
25 | .data-container{
26 | margin: 0 auto;
27 | max-width: 95.0rem;
28 | padding-top: 10%;
29 | padding-bottom: 10%;
30 | width: 100%;
31 | text-align: center;
32 | font-size: 20px;
33 | }
34 |
35 | code{
36 | background-color: black;
37 | font-size: 20px;
38 | white-space: break-spaces;
39 | color: #aef77d;
40 | }
41 |
42 | /* #e300ff,#b0ff00,#00ffd2,#fdff00,#ff00f4 */
43 |
44 | .container p {
45 | color: #fffce1;
46 | }
47 |
48 | .container h2 {
49 | margin-top: 55px;
50 | color: #fffce1;
51 | }
52 |
53 | .intro{
54 | text-align: center;
55 | }
56 |
57 | .intro h1{
58 | color: #fa26a0;
59 | }
60 |
61 | .info p{
62 | padding-top: 45px;
63 | }
64 |
65 | .more-info {
66 | text-align: left;
67 | padding-top: 140px;
68 | }
69 |
70 | .data-api p{
71 | padding-top: 45px;
72 | }
73 |
74 | .uuid {
75 | color: #00ffe7;
76 | }
77 |
78 | .textdb {
79 | color: #fa26a0;
80 | }
81 |
82 | a {
83 | border-bottom: 1px solid #fffce1;
84 | }
85 |
86 | select {
87 | width: auto;
88 | }
89 |
90 | button {
91 | border: none;
92 | margin: 0;
93 | padding: 0;
94 | width: auto;
95 | overflow: visible;
96 |
97 | background: transparent;
98 |
99 | /* inherit font & color from ancestor */
100 | color: inherit;
101 | font: inherit;
102 |
103 | /* Normalize `line-height`. Cannot be changed from `normal` in Firefox 4+. */
104 | line-height: normal;
105 |
106 | /* Corrects font smoothing for webkit */
107 | -webkit-font-smoothing: inherit;
108 | -moz-osx-font-smoothing: inherit;
109 |
110 | /* Corrects inability to style clickable `input` types in iOS */
111 | -webkit-appearance: none;
112 |
113 | cursor: pointer;
114 | }
115 |
116 | button.selected {
117 | cursor: pointer;
118 | border-bottom: 1px solid white;
119 | }
120 |
121 | .green {
122 | color: #aef77d;
123 | }
124 |
125 | .green a {
126 | color: #aef77d;
127 | }
128 |
129 | .edit {
130 | margin-top: 15px;
131 | padding: 0 10px;
132 | display: inline-block;
133 | }
134 |
135 | .edit:hover {
136 | cursor: pointer;
137 | }
138 |
139 | .data textarea {
140 | color: #fffce1;
141 | text-align: center;
142 | }
143 |
144 | .data {
145 | font-size: 20px;
146 | margin-top: 25px;
147 | min-width: 50%;
148 | min-height: 600px;
149 | }
150 |
151 | .data textarea.right {
152 | text-align: right;
153 | }
154 |
155 | .data textarea.center {
156 | text-align: center;
157 | }
158 |
159 | .data textarea.left {
160 | text-align: left;
161 | }
162 |
163 | textarea {
164 | font-size: 20px;
165 | min-height: 600px;
166 | }
167 |
168 | textarea[readonly] {
169 | border: 1px solid white;
170 | }
171 |
172 | /* Headers */
173 | header {
174 | width: 100%;
175 | background: #fdfdfd;
176 | border-bottom: 1px solid #eaeaea;
177 | margin-bottom: 2rem;
178 | }
179 |
180 | /* This file is for your main application css. */
181 | /* Alerts and form errors */
182 | .alert {
183 | padding: 15px;
184 | margin-bottom: 20px;
185 | border: 1px solid transparent;
186 | border-radius: 4px; }
187 |
188 | .alert-info {
189 | color: #31708f;
190 | background-color: #d9edf7;
191 | border-color: #bce8f1; }
192 |
193 | .alert-warning {
194 | color: #8a6d3b;
195 | background-color: #fcf8e3;
196 | border-color: #faebcc; }
197 |
198 | .alert-danger {
199 | color: #a94442;
200 | background-color: #f2dede;
201 | border-color: #ebccd1; }
202 |
203 | .alert p {
204 | margin-bottom: 0; }
205 |
206 | .alert:empty {
207 | display: none; }
208 |
209 |
210 | /*# sourceMappingURL=app.css.map*/
211 |
--------------------------------------------------------------------------------
/assets/css/phoenix.css:
--------------------------------------------------------------------------------
1 | /* Includes some default style for the starter application.
2 | * This can be safely deleted to start fresh.
3 | */
4 |
5 | /* Milligram v1.3.0 https://milligram.github.io
6 | * Copyright (c) 2017 CJ Patoilo Licensed under the MIT license
7 | */
8 |
9 | *,*:after,*:before{box-sizing:inherit}html{box-sizing:border-box;font-size:62.5%}body{color:white;background-color:black;font-family:monospace;font-size:1.6em;font-weight:300;line-height:1.6}blockquote{border-left:0.3rem solid #d1d1d1;margin-left:0;margin-right:0;padding:1rem 1.5rem}blockquote *:last-child{margin-bottom:0}{cursor:default;opacity:.5}code{background:#f4f5f6;border-radius:.4rem;font-size:86%;margin:0 .2rem;padding:.2rem .5rem;white-space:nowrap}pre{background:#f4f5f6;border-left:0.3rem solid #0069d9;overflow-y:hidden}pre>code{border-radius:0;display:block;padding:1rem 1.5rem;white-space:pre}hr{border:0;border-top:0.1rem solid #f4f5f6;margin:3.0rem 0}input[type='email'],input[type='number'],input[type='password'],input[type='search'],input[type='tel'],input[type='text'],input[type='url'],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:0.1rem solid #d1d1d1;border-radius:.4rem;box-shadow:none;box-sizing:inherit;height:3.8rem;padding:.6rem 1.0rem;width:100%}input[type='email']:focus,input[type='number']:focus,input[type='password']:focus,input[type='search']:focus,input[type='tel']:focus,input[type='text']:focus,input[type='url']:focus,textarea:focus,select:focus{border-color:#0069d9;outline:0}select{background:url('data:image/svg+xml;utf8,') center right no-repeat;padding-right:3.0rem}select:focus{background-image:url('data:image/svg+xml;utf8,')}textarea{min-height:6.5rem}label,legend{display:block;font-size:1.6rem;font-weight:700;margin-bottom:.5rem}fieldset{border-width:0;padding:0}input[type='checkbox'],input[type='radio']{display:inline}.label-inline{display:inline-block;font-weight:normal;margin-left:.5rem}.row{display:flex;flex-direction:column;padding:0;width:100%}.row.row-no-padding{padding:0}.row.row-no-padding>.column{padding:0}.row.row-wrap{flex-wrap:wrap}.row.row-top{align-items:flex-start}.row.row-bottom{align-items:flex-end}.row.row-center{align-items:center}.row.row-stretch{align-items:stretch}.row.row-baseline{align-items:baseline}.row .column{display:block;flex:1 1 auto;margin-left:0;max-width:100%;width:100%}.row .column.column-offset-10{margin-left:10%}.row .column.column-offset-20{margin-left:20%}.row .column.column-offset-25{margin-left:25%}.row .column.column-offset-33,.row .column.column-offset-34{margin-left:33.3333%}.row .column.column-offset-50{margin-left:50%}.row .column.column-offset-66,.row .column.column-offset-67{margin-left:66.6666%}.row .column.column-offset-75{margin-left:75%}.row .column.column-offset-80{margin-left:80%}.row .column.column-offset-90{margin-left:90%}.row .column.column-10{flex:0 0 10%;max-width:10%}.row .column.column-20{flex:0 0 20%;max-width:20%}.row .column.column-25{flex:0 0 25%;max-width:25%}.row .column.column-33,.row .column.column-34{flex:0 0 33.3333%;max-width:33.3333%}.row .column.column-40{flex:0 0 40%;max-width:40%}.row .column.column-50{flex:0 0 50%;max-width:50%}.row .column.column-60{flex:0 0 60%;max-width:60%}.row .column.column-66,.row .column.column-67{flex:0 0 66.6666%;max-width:66.6666%}.row .column.column-75{flex:0 0 75%;max-width:75%}.row .column.column-80{flex:0 0 80%;max-width:80%}.row .column.column-90{flex:0 0 90%;max-width:90%}.row .column .column-top{align-self:flex-start}.row .column .column-bottom{align-self:flex-end}.row .column .column-center{-ms-grid-row-align:center;align-self:center}@media (min-width: 40rem){.row{flex-direction:row;margin-left:-1.0rem;width:calc(100% + 2.0rem)}.row .column{margin-bottom:inherit;padding:0 1.0rem}}a{color:#0069d9;text-decoration:none}a:focus,a:hover{color:#606c76}dl,ol,ul{list-style:none;margin-top:0;padding-left:0}dl dl,dl ol,dl ul,ol dl,ol ol,ol ul,ul dl,ul ol,ul ul{font-size:90%;margin:1.5rem 0 1.5rem 3.0rem}ol{list-style:decimal inside}ul{list-style:circle inside}.button,button,dd,dt,li{margin-bottom:1.0rem}fieldset,input,select,textarea{margin-bottom:1.5rem}blockquote,dl,figure,form,ol,p,pre,table,ul{margin-bottom:2.5rem}table{border-spacing:0;width:100%}td,th{border-bottom:0.1rem solid #e1e1e1;padding:1.2rem 1.5rem;text-align:left}td:first-child,th:first-child{padding-left:0}td:last-child,th:last-child{padding-right:0}b,strong{font-weight:bold}p{margin-top:0}h1,h2,h3,h4,h5,h6{font-weight:300;letter-spacing:-.1rem;margin-bottom:2.0rem;margin-top:0}h1{font-size:4.6rem;line-height:1.2}h2{font-size:3.6rem;line-height:1.25}h3{font-size:2.8rem;line-height:1.3}h4{font-size:2.2rem;letter-spacing:-.08rem;line-height:1.35}h5{font-size:1.8rem;letter-spacing:-.05rem;line-height:1.5}h6{font-size:1.6rem;letter-spacing:0;line-height:1.4}img{max-width:100%}.clearfix:after{clear:both;content:' ';display:table}.float-left{float:left}.float-right{float:right}
10 |
--------------------------------------------------------------------------------
/assets/js/app.js:
--------------------------------------------------------------------------------
1 | // We need to import the CSS so that webpack will load it.
2 | // The MiniCssExtractPlugin is used to separate it out into
3 | // its own CSS file.
4 | import "../css/app.scss"
5 |
6 | // webpack automatically bundles all modules in your
7 | // entry points. Those entry points can be configured
8 | // in "webpack.config.js".
9 | //
10 | // Import deps with the dep name or local files with a relative path, for example:
11 | //
12 | // import {Socket} from "phoenix"
13 | // import socket from "./socket"
14 | //
15 | import "phoenix_html"
16 |
17 | // assets/js/app.js
18 | import {Socket} from "phoenix"
19 |
20 | import LiveSocket from "phoenix_live_view"
21 |
22 | let csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content")
23 | let liveSocket = new LiveSocket("/live", Socket, {params: {_csrf_token: csrfToken}})
24 |
25 | // Connect if there are any LiveViews on the page
26 | liveSocket.connect()
27 |
28 | // Expose liveSocket on window for web console debug logs and latency simulation:
29 | // >> liveSocket.enableDebug()
30 | // >> liveSocket.enableLatencySim(1000)
31 | // The latency simulator is enabled for the duration of the browser session.
32 | // Call disableLatencySim() to disable:
33 | // >> liveSocket.disableLatencySim()
34 | window.liveSocket = liveSocket
35 |
--------------------------------------------------------------------------------
/assets/js/socket.js:
--------------------------------------------------------------------------------
1 | // NOTE: The contents of this file will only be executed if
2 | // you uncomment its entry in "assets/js/app.js".
3 |
4 | // To use Phoenix channels, the first step is to import Socket,
5 | // and connect at the socket path in "lib/web/endpoint.ex".
6 | //
7 | // Pass the token on params as below. Or remove it
8 | // from the params if you are not using authentication.
9 | import {Socket} from "phoenix"
10 |
11 | let socket = new Socket("/socket", {params: {token: window.userToken}})
12 |
13 | // When you connect, you'll often need to authenticate the client.
14 | // For example, imagine you have an authentication plug, `MyAuth`,
15 | // which authenticates the session and assigns a `:current_user`.
16 | // If the current user exists you can assign the user's token in
17 | // the connection for use in the layout.
18 | //
19 | // In your "lib/web/router.ex":
20 | //
21 | // pipeline :browser do
22 | // ...
23 | // plug MyAuth
24 | // plug :put_user_token
25 | // end
26 | //
27 | // defp put_user_token(conn, _) do
28 | // if current_user = conn.assigns[:current_user] do
29 | // token = Phoenix.Token.sign(conn, "user socket", current_user.id)
30 | // assign(conn, :user_token, token)
31 | // else
32 | // conn
33 | // end
34 | // end
35 | //
36 | // Now you need to pass this token to JavaScript. You can do so
37 | // inside a script tag in "lib/web/templates/layout/app.html.eex":
38 | //
39 | //
40 | //
41 | // You will need to verify the user token in the "connect/3" function
42 | // in "lib/web/channels/user_socket.ex":
43 | //
44 | // def connect(%{"token" => token}, socket, _connect_info) do
45 | // # max_age: 1209600 is equivalent to two weeks in seconds
46 | // case Phoenix.Token.verify(socket, "user socket", token, max_age: 1209600) do
47 | // {:ok, user_id} ->
48 | // {:ok, assign(socket, :user, user_id)}
49 | // {:error, reason} ->
50 | // :error
51 | // end
52 | // end
53 | //
54 | // Finally, connect to the socket:
55 | socket.connect()
56 |
57 | // Now that you are connected, you can join channels with a topic:
58 | let channel = socket.channel("topic:subtopic", {})
59 | channel.join()
60 | .receive("ok", resp => { console.log("Joined successfully", resp) })
61 | .receive("error", resp => { console.log("Unable to join", resp) })
62 |
63 | export default socket
64 |
--------------------------------------------------------------------------------
/assets/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "repository": {},
3 | "description": " ",
4 | "license": "MIT",
5 | "scripts": {
6 | "deploy": "webpack --mode production",
7 | "watch": "webpack --mode development --watch"
8 | },
9 | "dependencies": {
10 | "phoenix": "file:../deps/phoenix",
11 | "phoenix_html": "file:../deps/phoenix_html",
12 | "phoenix_live_view": "file:../deps/phoenix_live_view"
13 | },
14 | "devDependencies": {
15 | "@babel/core": "^7.0.0",
16 | "@babel/preset-env": "^7.0.0",
17 | "babel-loader": "^8.0.0",
18 | "copy-webpack-plugin": "^8.0.0",
19 | "css-loader": "^3.4.2",
20 | "mini-css-extract-plugin": "^0.9.0",
21 | "node-sass": "^4.13.1",
22 | "optimize-css-assets-webpack-plugin": "^5.0.4",
23 | "sass-loader": "^8.0.2",
24 | "terser-webpack-plugin": "^2.3.2",
25 | "webpack": "5.27.1",
26 | "webpack-cli": "^3.3.2"
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/assets/static/favicon/about.txt:
--------------------------------------------------------------------------------
1 | This favicon was generated using the following font:
2 |
3 | - Font Title: IBM Plex Mono
4 | - Font Author: Copyright 2017 IBM Corp. All rights reserved.
5 | - Font Source: http://fonts.gstatic.com/s/ibmplexmono/v6/-F63fjptAgt5VM-kVkqdyU8n5igg1l9kn-s.ttf
6 | - Font License: SIL Open Font License, 1.1 (http://scripts.sil.org/OFL)
7 |
--------------------------------------------------------------------------------
/assets/static/favicon/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/assets/static/favicon/android-chrome-192x192.png
--------------------------------------------------------------------------------
/assets/static/favicon/android-chrome-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/assets/static/favicon/android-chrome-512x512.png
--------------------------------------------------------------------------------
/assets/static/favicon/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/assets/static/favicon/apple-touch-icon.png
--------------------------------------------------------------------------------
/assets/static/favicon/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/assets/static/favicon/favicon-16x16.png
--------------------------------------------------------------------------------
/assets/static/favicon/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/assets/static/favicon/favicon-32x32.png
--------------------------------------------------------------------------------
/assets/static/favicon/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/assets/static/favicon/favicon.ico
--------------------------------------------------------------------------------
/assets/static/favicon/site.webmanifest:
--------------------------------------------------------------------------------
1 | {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
--------------------------------------------------------------------------------
/assets/static/images/phoenix.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/assets/static/images/phoenix.png
--------------------------------------------------------------------------------
/assets/static/robots.txt:
--------------------------------------------------------------------------------
1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
2 | #
3 | # To ban all spiders from the entire site uncomment the next two lines:
4 | # User-agent: *
5 | # Disallow: /
6 |
--------------------------------------------------------------------------------
/assets/webpack.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const glob = require('glob');
3 | const MiniCssExtractPlugin = require('mini-css-extract-plugin');
4 | const TerserPlugin = require('terser-webpack-plugin');
5 | const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
6 | const CopyWebpackPlugin = require('copy-webpack-plugin');
7 |
8 | module.exports = (env, options) => {
9 | const devMode = options.mode !== 'production';
10 |
11 | return {
12 | optimization: {
13 | minimizer: [
14 | new TerserPlugin({ cache: true, parallel: true, sourceMap: devMode }),
15 | new OptimizeCSSAssetsPlugin({})
16 | ]
17 | },
18 | entry: {
19 | 'app': glob.sync('./vendor/**/*.js').concat(['./js/app.js'])
20 | },
21 | output: {
22 | filename: '[name].js',
23 | path: path.resolve(__dirname, '../priv/static/js'),
24 | publicPath: '/js/'
25 | },
26 | devtool: devMode ? 'source-map' : undefined,
27 | module: {
28 | rules: [
29 | {
30 | test: /\.js$/,
31 | exclude: /node_modules/,
32 | use: {
33 | loader: 'babel-loader'
34 | }
35 | },
36 | {
37 | test: /\.[s]?css$/,
38 | use: [
39 | MiniCssExtractPlugin.loader,
40 | 'css-loader',
41 | 'sass-loader',
42 | ],
43 | }
44 | ]
45 | },
46 | plugins: [
47 | new MiniCssExtractPlugin({ filename: '../css/app.css' }),
48 | new CopyWebpackPlugin({
49 | patterns: [{ from: 'static/', to: '../' }]
50 | })
51 | // new CopyWebpackPlugin([{ from: 'static/', to: '../' }])
52 | ]
53 | }
54 | };
55 |
--------------------------------------------------------------------------------
/config/.dev.exs.swp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/config/.dev.exs.swp
--------------------------------------------------------------------------------
/config/config.exs:
--------------------------------------------------------------------------------
1 | # This file is responsible for configuring your application
2 | # and its dependencies with the aid of the Mix.Config module.
3 | #
4 | # This configuration file is loaded before any dependency and
5 | # is restricted to this project.
6 |
7 | # General application configuration
8 | use Mix.Config
9 |
10 | config :textdb,
11 | ecto_repos: [Textdb.Repo]
12 |
13 | # Configures the endpoint
14 | config :textdb, TextdbWeb.Endpoint,
15 | url: [host: "localhost"],
16 | secret_key_base: "i6bRp303wpNnbCK7/vn8kSz/dXVJaO+hheUJqsz9f1prWmz7URIMuBP+2iSAnQfI",
17 | render_errors: [view: TextdbWeb.ErrorView, accepts: ~w(html json), layout: false],
18 | pubsub_server: Textdb.PubSub,
19 | live_view: [signing_salt: "Tx9d3Tzs"]
20 |
21 | # Configures Elixir's Logger
22 | config :logger, :console,
23 | format: "$time $metadata[$level] $message\n",
24 | metadata: [:request_id]
25 |
26 | # Use Jason for JSON parsing in Phoenix
27 | config :phoenix, :json_library, Jason
28 |
29 | # Import environment specific config. This must remain at the bottom
30 | # of this file so it overrides the configuration defined above.
31 | import_config "#{Mix.env()}.exs"
32 |
--------------------------------------------------------------------------------
/config/dev.exs:
--------------------------------------------------------------------------------
1 | use Mix.Config
2 |
3 | # Configure your database
4 | config :textdb, Textdb.Repo,
5 | username: "textdb",
6 | password: "supersecret",
7 | database: "textdb",
8 | hostname: "localhost",
9 | show_sensitive_data_on_connection_error: true,
10 | pool_size: 10
11 |
12 | # For development, we disable any cache and enable
13 | # debugging and code reloading.
14 | #
15 | # The watchers configuration can be used to run external
16 | # watchers to your application. For example, we use it
17 | # with webpack to recompile .js and .css sources.
18 | config :textdb, TextdbWeb.Endpoint,
19 | http: [port: 4000],
20 | debug_errors: true,
21 | code_reloader: true,
22 | check_origin: false,
23 | watchers: [
24 | node: [
25 | "node_modules/webpack/bin/webpack.js",
26 | "--mode",
27 | "development",
28 | "--watch-stdin",
29 | cd: Path.expand("../assets", __DIR__)
30 | ]
31 | ],
32 | hash_secret: "hello"
33 |
34 | # ## SSL Support
35 | #
36 | # In order to use HTTPS in development, a self-signed
37 | # certificate can be generated by running the following
38 | # Mix task:
39 | #
40 | # mix phx.gen.cert
41 | #
42 | # Note that this task requires Erlang/OTP 20 or later.
43 | # Run `mix help phx.gen.cert` for more information.
44 | #
45 | # The `http:` config above can be replaced with:
46 | #
47 | # https: [
48 | # port: 4001,
49 | # cipher_suite: :strong,
50 | # keyfile: "priv/cert/selfsigned_key.pem",
51 | # certfile: "priv/cert/selfsigned.pem"
52 | # ],
53 | #
54 | # If desired, both `http:` and `https:` keys can be
55 | # configured to run both http and https servers on
56 | # different ports.
57 |
58 | # Watch static and templates for browser reloading.
59 | config :textdb, TextdbWeb.Endpoint,
60 | live_reload: [
61 | patterns: [
62 | ~r"priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$",
63 | ~r"priv/gettext/.*(po)$",
64 | ~r"lib/textdb_web/(live|views)/.*(ex)$",
65 | ~r"lib/textdb_web/templates/.*(eex)$"
66 | ]
67 | ]
68 |
69 | # Do not include metadata nor timestamps in development logs
70 | config :logger, :console, format: "[$level] $message\n"
71 |
72 | # Set a higher stacktrace during development. Avoid configuring such
73 | # in production as building large stacktraces may be expensive.
74 | config :phoenix, :stacktrace_depth, 20
75 |
76 | # Initialize plugs at runtime for faster development compilation
77 | config :phoenix, :plug_init_mode, :runtime
78 |
--------------------------------------------------------------------------------
/config/prod.exs:
--------------------------------------------------------------------------------
1 | use Mix.Config
2 |
3 | # For production, don't forget to configure the url host
4 | # to something meaningful, Phoenix uses this information
5 | # when generating URLs.
6 | #
7 | # Note we also include the path to a cache manifest
8 | # containing the digested version of static files. This
9 | # manifest is generated by the `mix phx.digest` task,
10 | # which you should run after static files are built and
11 | # before starting your production server.
12 | config :textdb, TextdbWeb.Endpoint,
13 | url: [host: "localhost"],
14 | http: [port: 4001],
15 | server: true,
16 | check_origin: false,
17 | ssl: false,
18 | cache_static_manifest: "priv/static/cache_manifest.json",
19 | hash_secret: "fakeoutpw"
20 |
21 | # Do not print debug messages in production
22 | config :logger, level: :info
23 |
24 | config :textdb, Textdb.Repo,
25 | username: "ubuntu",
26 | password: "supersecret",
27 | database: "textdb",
28 | hostname: "localhost",
29 | show_sensitive_data_on_connection_error: false,
30 | pool_size: 10
31 |
32 | # ## SSL Support
33 | #
34 | # To get SSL working, you will need to add the `https` key
35 | # to the previous section and set your `:url` port to 443:
36 | #
37 | # config :textdb, TextdbWeb.Endpoint,
38 | # ...
39 | # url: [host: "example.com", port: 443],
40 | # https: [
41 | # port: 443,
42 | # cipher_suite: :strong,
43 | # keyfile: System.get_env("SOME_APP_SSL_KEY_PATH"),
44 | # certfile: System.get_env("SOME_APP_SSL_CERT_PATH"),
45 | # transport_options: [socket_opts: [:inet6]]
46 | # ]
47 | #
48 | # The `cipher_suite` is set to `:strong` to support only the
49 | # latest and more secure SSL ciphers. This means old browsers
50 | # and clients may not be supported. You can set it to
51 | # `:compatible` for wider support.
52 | #
53 | # `:keyfile` and `:certfile` expect an absolute path to the key
54 | # and cert in disk or a relative path inside priv, for example
55 | # "priv/ssl/server.key". For all supported SSL configuration
56 | # options, see https://hexdocs.pm/plug/Plug.SSL.html#configure/1
57 | #
58 | # We also recommend setting `force_ssl` in your endpoint, ensuring
59 | # no data is ever sent via http, always redirecting to https:
60 | #
61 | # config :textdb, TextdbWeb.Endpoint,
62 | # force_ssl: [hsts: true]
63 | #
64 | # Check `Plug.SSL` for all available options in `force_ssl`.
65 |
66 | # Finally import the config/prod.secret.exs which loads secrets
67 | # and configuration from environment variables.
68 | import_config "prod.secret.exs"
69 |
--------------------------------------------------------------------------------
/config/test.exs:
--------------------------------------------------------------------------------
1 | use Mix.Config
2 |
3 | # Configure your database
4 | #
5 | # The MIX_TEST_PARTITION environment variable can be used
6 | # to provide built-in test partitioning in CI environment.
7 | # Run `mix help test` for more information.
8 | config :textdb, Textdb.Repo,
9 | username: "postgres",
10 | password: "postgres",
11 | database: "textdb_test#{System.get_env("MIX_TEST_PARTITION")}",
12 | hostname: "localhost",
13 | pool: Ecto.Adapters.SQL.Sandbox
14 |
15 | # We don't run a server during test. If one is required,
16 | # you can enable the server option below.
17 | config :textdb, TextdbWeb.Endpoint,
18 | http: [port: 4002],
19 | server: false
20 |
21 | # Print only warnings and errors during test
22 | config :logger, level: :warn
23 |
--------------------------------------------------------------------------------
/lib/textdb.ex:
--------------------------------------------------------------------------------
1 | defmodule Textdb do
2 | @moduledoc """
3 | Textdb keeps the contexts that define your domain
4 | and business logic.
5 |
6 | Contexts are also responsible for managing your data, regardless
7 | if it comes from the database, an external API or others.
8 | """
9 | end
10 |
--------------------------------------------------------------------------------
/lib/textdb/analytic.ex:
--------------------------------------------------------------------------------
1 | defmodule Textdb.Analytic do
2 | use Ecto.Schema
3 | import Ecto.Changeset
4 |
5 | schema "analytics" do
6 | field(:count, :integer)
7 | field(:date, :date)
8 | field(:subtopic, :string)
9 | field(:topic, :string)
10 |
11 | timestamps()
12 | end
13 |
14 | @doc false
15 | def changeset(analytic, attrs) do
16 | analytic
17 | |> cast(attrs, [:topic, :subtopic, :count, :date])
18 | |> validate_required([:topic, :count, :date])
19 | end
20 | end
21 |
--------------------------------------------------------------------------------
/lib/textdb/application.ex:
--------------------------------------------------------------------------------
1 | defmodule Textdb.Application do
2 | # See https://hexdocs.pm/elixir/Application.html
3 | # for more information on OTP Applications
4 | @moduledoc false
5 |
6 | use Application
7 |
8 | def start(_type, _args) do
9 | children = [
10 | # Start the Ecto repository
11 | Textdb.Repo,
12 | # Start the Telemetry supervisor
13 | TextdbWeb.Telemetry,
14 | # Start the PubSub system
15 | {Phoenix.PubSub, name: Textdb.PubSub},
16 | # Start the Endpoint (http/https)
17 | TextdbWeb.Endpoint
18 | # Start a worker by calling: Textdb.Worker.start_link(arg)
19 | # {Textdb.Worker, arg}
20 | ]
21 |
22 | # See https://hexdocs.pm/elixir/Supervisor.html
23 | # for other strategies and supported options
24 | opts = [strategy: :one_for_one, name: Textdb.Supervisor]
25 | Supervisor.start_link(children, opts)
26 | end
27 |
28 | # Tell Phoenix to update the endpoint configuration
29 | # whenever the application is updated.
30 | def config_change(changed, _new, removed) do
31 | TextdbWeb.Endpoint.config_change(changed, removed)
32 | :ok
33 | end
34 | end
35 |
--------------------------------------------------------------------------------
/lib/textdb/data.ex:
--------------------------------------------------------------------------------
1 | defmodule Textdb.Data do
2 | use Ecto.Schema
3 | import Ecto.Changeset
4 |
5 | schema "data" do
6 | field(:location, :string)
7 | field(:uuid, :string)
8 | field(:hash, :string)
9 | field(:alignment, :string)
10 |
11 | timestamps()
12 | end
13 |
14 | @doc false
15 | def changeset(data, attrs) do
16 | data
17 | |> cast(attrs, [:uuid, :location, :alignment])
18 | |> validate_required([:uuid, :location])
19 | end
20 | end
21 |
--------------------------------------------------------------------------------
/lib/textdb/repo.ex:
--------------------------------------------------------------------------------
1 | defmodule Textdb.Repo do
2 | use Ecto.Repo,
3 | otp_app: :textdb,
4 | adapter: Ecto.Adapters.Postgres
5 | end
6 |
--------------------------------------------------------------------------------
/lib/textdb_web.ex:
--------------------------------------------------------------------------------
1 | defmodule TextdbWeb do
2 | @moduledoc """
3 | The entrypoint for defining your web interface, such
4 | as controllers, views, channels and so on.
5 |
6 | This can be used in your application as:
7 |
8 | use TextdbWeb, :controller
9 | use TextdbWeb, :view
10 |
11 | The definitions below will be executed for every view,
12 | controller, etc, so keep them short and clean, focused
13 | on imports, uses and aliases.
14 |
15 | Do NOT define functions inside the quoted expressions
16 | below. Instead, define any helper function in modules
17 | and import those modules here.
18 | """
19 |
20 | def controller do
21 | quote do
22 | use Phoenix.Controller, namespace: TextdbWeb
23 |
24 | import Plug.Conn
25 | import TextdbWeb.Gettext
26 | alias TextdbWeb.Router.Helpers, as: Routes
27 | end
28 | end
29 |
30 | def view do
31 | quote do
32 | use Phoenix.View,
33 | root: "lib/textdb_web/templates",
34 | namespace: TextdbWeb
35 |
36 | # Import convenience functions from controllers
37 | import Phoenix.Controller,
38 | only: [get_flash: 1, get_flash: 2, view_module: 1, view_template: 1]
39 |
40 | # Include shared imports and aliases for views
41 | unquote(view_helpers())
42 | end
43 | end
44 |
45 | def router do
46 | quote do
47 | use Phoenix.Router
48 |
49 | import Plug.Conn
50 | import Phoenix.Controller
51 | end
52 | end
53 |
54 | def channel do
55 | quote do
56 | use Phoenix.Channel
57 | import TextdbWeb.Gettext
58 | end
59 | end
60 |
61 | defp view_helpers do
62 | quote do
63 | # Use all HTML functionality (forms, tags, etc)
64 | use Phoenix.HTML
65 |
66 | import Phoenix.LiveView.Helpers
67 |
68 | # Import basic rendering functionality (render, render_layout, etc)
69 | import Phoenix.View
70 |
71 | import TextdbWeb.ErrorHelpers
72 | import TextdbWeb.Gettext
73 | alias TextdbWeb.Router.Helpers, as: Routes
74 | end
75 | end
76 |
77 | @doc """
78 | When used, dispatch to the appropriate controller/view/etc.
79 | """
80 | defmacro __using__(which) when is_atom(which) do
81 | apply(__MODULE__, which, [])
82 | end
83 | end
84 |
--------------------------------------------------------------------------------
/lib/textdb_web/channels/user_socket.ex:
--------------------------------------------------------------------------------
1 | defmodule TextdbWeb.UserSocket do
2 | use Phoenix.Socket
3 |
4 | ## Channels
5 | # channel "room:*", TextdbWeb.RoomChannel
6 |
7 | # Socket params are passed from the client and can
8 | # be used to verify and authenticate a user. After
9 | # verification, you can put default assigns into
10 | # the socket that will be set for all channels, ie
11 | #
12 | # {:ok, assign(socket, :user_id, verified_user_id)}
13 | #
14 | # To deny connection, return `:error`.
15 | #
16 | # See `Phoenix.Token` documentation for examples in
17 | # performing token verification on connect.
18 | @impl true
19 | def connect(_params, socket, _connect_info) do
20 | {:ok, socket}
21 | end
22 |
23 | # Socket id's are topics that allow you to identify all sockets for a given user:
24 | #
25 | # def id(socket), do: "user_socket:#{socket.assigns.user_id}"
26 | #
27 | # Would allow you to broadcast a "disconnect" event and terminate
28 | # all active sockets and channels for a given user:
29 | #
30 | # TextdbWeb.Endpoint.broadcast("user_socket:#{user.id}", "disconnect", %{})
31 | #
32 | # Returning `nil` makes this socket anonymous.
33 | @impl true
34 | def id(_socket), do: nil
35 | end
36 |
--------------------------------------------------------------------------------
/lib/textdb_web/controllers/api_controller.ex:
--------------------------------------------------------------------------------
1 | defmodule TextdbWeb.ApiController do
2 | use TextdbWeb, :controller
3 |
4 | require Logger
5 |
6 | import Ecto
7 |
8 | alias Textdb.Data
9 | alias Textdb.Repo
10 | alias Textdb.Analytic
11 |
12 | def data_requested() do
13 | today = NaiveDateTime.utc_now() |> NaiveDateTime.to_date()
14 |
15 | analytic =
16 | Analytic
17 | |> Repo.get_by(%{
18 | topic: "data_requested",
19 | date: today
20 | })
21 |
22 | case analytic do
23 | nil ->
24 | %Analytic{topic: "data_requested", date: today, count: 0} |> Repo.insert()
25 |
26 | _ ->
27 | analytic
28 | |> Analytic.changeset(%{count: analytic.count + 1})
29 | |> Repo.update()
30 | end
31 | end
32 |
33 | def data_written() do
34 | today = NaiveDateTime.utc_now() |> NaiveDateTime.to_date()
35 |
36 | analytic =
37 | Analytic
38 | |> Repo.get_by(%{
39 | topic: "data_written",
40 | date: today
41 | })
42 |
43 | case analytic do
44 | nil ->
45 | %Analytic{topic: "data_written", date: today, count: 0} |> Repo.insert()
46 |
47 | _ ->
48 | analytic
49 | |> Analytic.changeset(%{count: analytic.count + 1})
50 | |> Repo.update()
51 | end
52 | end
53 |
54 | def write_file(id, data) do
55 | location = "./priv/static/data/" <> id
56 |
57 | data_data = Data |> Repo.get_by(%{:uuid => id})
58 | data_hash = Data |> Repo.get_by(%{:hash => id})
59 | key = Application.get_env(:textdb, TextdbWeb.Endpoint)[:hash_secret]
60 |
61 | Task.start(fn -> data_written() end)
62 |
63 | if data_hash != nil do
64 | "Writing not allowed with this endpoint"
65 | else
66 | File.write!(location, data)
67 |
68 | if data_data == nil do
69 | %Data{
70 | location: location,
71 | uuid: id,
72 | hash: :crypto.hmac(:sha256, key, id) |> Base.encode16()
73 | }
74 | |> Repo.insert!()
75 | else
76 | new_time = NaiveDateTime.truncate(NaiveDateTime.utc_now(), :second)
77 |
78 | data_data
79 | |> Ecto.Changeset.change(updated_at: new_time)
80 | |> Repo.update!()
81 | end
82 |
83 | TextdbWeb.Endpoint.broadcast_from!(
84 | self(),
85 | "updates/" <> id,
86 | "data",
87 | %{}
88 | )
89 |
90 | data
91 | end
92 | end
93 |
94 | def write_data("text/plain", id, conn) do
95 | {:ok, body, _conn} = Plug.Conn.read_body(conn)
96 | new_body = write_file(id, body)
97 |
98 | text(conn, new_body)
99 | end
100 |
101 | def write_data("application/json", id, conn) do
102 | json_string = Jason.encode!(conn.body_params)
103 |
104 | new_body = write_file(id, json_string)
105 |
106 | json(conn, new_body)
107 | end
108 |
109 | def write_data("application/x-www-form-urlencoded", id, conn) do
110 | form_encoded =
111 | conn.body_params
112 | |> Map.to_list()
113 | |> Enum.map(fn {x, y} -> "#{x}=#{y}" end)
114 | |> Enum.join("&")
115 |
116 | new_body = write_file(id, form_encoded)
117 |
118 | text(conn, new_body)
119 | end
120 |
121 | def update_data(conn, params) do
122 | Logger.info(inspect(params))
123 |
124 | content_type = conn |> get_req_header("content-type") |> List.first()
125 | id = params |> Map.get("id")
126 |
127 | write_data(content_type, id, conn)
128 | end
129 |
130 | def fetch_data(conn, %{"id" => id}) do
131 | data = Data |> Repo.get_by(%{:uuid => id})
132 |
133 | data =
134 | case data do
135 | nil -> Data |> Repo.get_by(%{:hash => id})
136 | _ -> data
137 | end
138 |
139 | content_type = conn |> get_req_header("accept") |> List.first()
140 |
141 | Task.start(fn -> data_requested() end)
142 |
143 | case data do
144 | nil ->
145 | write_file(id, "")
146 |
147 | case content_type do
148 | "application/json" -> json(conn, "")
149 | _ -> text(conn, "")
150 | end
151 |
152 | info ->
153 | case content_type do
154 | "application/json" -> json(conn, File.read!(info.location))
155 | _ -> text(conn, File.read!(info.location))
156 | end
157 | end
158 | end
159 | end
160 |
--------------------------------------------------------------------------------
/lib/textdb_web/controllers/data_controller.ex:
--------------------------------------------------------------------------------
1 | defmodule TextdbWeb.DataController do
2 | use TextdbWeb, :controller
3 | use Phoenix.LiveView
4 |
5 | require Logger
6 |
7 | import Ecto
8 | import Ecto.Query
9 | alias Textdb.Data
10 | alias Textdb.Repo
11 |
12 | def read_or_create(id) do
13 | read_data =
14 | Data
15 | |> Repo.get_by(%{:uuid => id})
16 |
17 | case read_data do
18 | nil ->
19 | "Not found"
20 |
21 | info ->
22 | File.read!(info.location)
23 | end
24 | end
25 |
26 | def data(conn, %{"id" => id}) do
27 | Logger.info(id)
28 | data = read_or_create(id)
29 | Logger.info(data)
30 | # if it doesn't exist, create it
31 | # create the file
32 | # return blank
33 |
34 | # find the file
35 | # read the file
36 | # render(conn, "data.html", %{data: data})
37 | end
38 |
39 | def render(assigns) do
40 | # Phoenix.View.render(conn, "data.html", %{})
41 | # ~L"""
42 | # Current temperature:
43 | # """
44 | end
45 |
46 | def mount(_params, %{}, socket) do
47 | {:ok, socket}
48 | end
49 | end
50 |
--------------------------------------------------------------------------------
/lib/textdb_web/controllers/page_controller.ex:
--------------------------------------------------------------------------------
1 | defmodule TextdbWeb.PageController do
2 | use TextdbWeb, :controller
3 |
4 | alias Textdb.Repo
5 | alias Textdb.Analytic
6 |
7 | def page_viewed() do
8 | today = NaiveDateTime.utc_now() |> NaiveDateTime.to_date()
9 |
10 | analytic =
11 | Analytic
12 | |> Repo.get_by(%{
13 | topic: "landing_page",
14 | date: today
15 | })
16 |
17 | case analytic do
18 | nil ->
19 | %Analytic{topic: "landing_page", date: today, count: 0} |> Repo.insert()
20 |
21 | _ ->
22 | analytic
23 | |> Analytic.changeset(%{count: analytic.count + 1})
24 | |> Repo.update()
25 | end
26 | end
27 |
28 | def index(conn, _params) do
29 | Task.start(fn -> page_viewed() end)
30 | render(conn, "index.html", %{uuid: Ecto.UUID.generate()})
31 | end
32 | end
33 |
--------------------------------------------------------------------------------
/lib/textdb_web/endpoint.ex:
--------------------------------------------------------------------------------
1 | defmodule TextdbWeb.Endpoint do
2 | use Phoenix.Endpoint, otp_app: :textdb
3 |
4 | # The session will be stored in the cookie and signed,
5 | # this means its contents can be read but not tampered with.
6 | # Set :encryption_salt if you would also like to encrypt it.
7 | @session_options [
8 | store: :cookie,
9 | key: "_textdb_key",
10 | signing_salt: "dQfZGTpm"
11 | ]
12 |
13 | socket("/socket", TextdbWeb.UserSocket,
14 | websocket: true,
15 | longpoll: false
16 | )
17 |
18 | socket("/live", Phoenix.LiveView.Socket, websocket: [connect_info: [session: @session_options]])
19 |
20 | # Serve at "/" the static files from "priv/static" directory.
21 | #
22 | # You should set gzip to true if you are running phx.digest
23 | # when deploying your static files in production.
24 | plug(Plug.Static,
25 | at: "/",
26 | from: :textdb,
27 | gzip: false,
28 | only: ~w(css fonts images js favicon.ico robots.txt favicon)
29 | )
30 |
31 | # Code reloading can be explicitly enabled under the
32 | # :code_reloader configuration of your endpoint.
33 | if code_reloading? do
34 | socket("/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket)
35 | plug(Phoenix.LiveReloader)
36 | plug(Phoenix.CodeReloader)
37 | plug(Phoenix.Ecto.CheckRepoStatus, otp_app: :textdb)
38 | end
39 |
40 | plug(Phoenix.LiveDashboard.RequestLogger,
41 | param_key: "request_logger",
42 | cookie_key: "request_logger"
43 | )
44 |
45 | plug(Plug.RequestId)
46 | plug(Plug.Telemetry, event_prefix: [:phoenix, :endpoint])
47 |
48 | plug(Plug.Parsers,
49 | parsers: [:urlencoded, :multipart, :json],
50 | pass: ["*/*"],
51 | json_decoder: Phoenix.json_library()
52 | )
53 |
54 | plug(Plug.MethodOverride)
55 | plug(Plug.Head)
56 | plug(Plug.Session, @session_options)
57 | plug(TextdbWeb.Router)
58 | end
59 |
--------------------------------------------------------------------------------
/lib/textdb_web/gettext.ex:
--------------------------------------------------------------------------------
1 | defmodule TextdbWeb.Gettext do
2 | @moduledoc """
3 | A module providing Internationalization with a gettext-based API.
4 |
5 | By using [Gettext](https://hexdocs.pm/gettext),
6 | your module gains a set of macros for translations, for example:
7 |
8 | import TextdbWeb.Gettext
9 |
10 | # Simple translation
11 | gettext("Here is the string to translate")
12 |
13 | # Plural translation
14 | ngettext("Here is the string to translate",
15 | "Here are the strings to translate",
16 | 3)
17 |
18 | # Domain-based translation
19 | dgettext("errors", "Here is the error message to translate")
20 |
21 | See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage.
22 | """
23 | use Gettext, otp_app: :textdb
24 | end
25 |
--------------------------------------------------------------------------------
/lib/textdb_web/live/data_live.ex:
--------------------------------------------------------------------------------
1 | defmodule TextdbWeb.DataLive do
2 | use Phoenix.HTML
3 | use Phoenix.LiveView
4 |
5 | require Logger
6 |
7 | import NaiveDateTime
8 |
9 | alias Textdb.Data
10 | alias Textdb.Repo
11 |
12 | @topic "updates/"
13 |
14 | def mount(%{"id" => id}, %{}, socket) do
15 | Logger.info("Connect " <> inspect(connected?(socket)))
16 |
17 | TextdbWeb.Endpoint.subscribe(@topic <> id)
18 |
19 | data = get_data(id)
20 | data_hash = get_hash_data(id)
21 |
22 | editing_enabled =
23 | if data_hash do
24 | false
25 | else
26 | true
27 | end
28 |
29 | db_data = Data |> Repo.get_by(%{:uuid => id})
30 |
31 | hash =
32 | if db_data != nil do
33 | db_data.hash
34 | else
35 | ""
36 | end
37 |
38 | alignment =
39 | if db_data != nil do
40 | db_data.alignment
41 | else
42 | "center"
43 | end
44 |
45 | probably_data =
46 | if data == "" do
47 | data_hash
48 | else
49 | data
50 | end
51 |
52 | {:ok,
53 | assign(
54 | socket,
55 | %{
56 | :id => id,
57 | :hash => hash,
58 | :data => probably_data,
59 | :alignment => alignment,
60 | :time => NaiveDateTime.utc_now(),
61 | :editing => false,
62 | :editing_enabled => editing_enabled,
63 | :changeset => Data.changeset(%Data{}, %{})
64 | }
65 | )}
66 | end
67 |
68 | def get_hash_data(id) do
69 | data = Data |> Repo.get_by(%{:hash => id})
70 |
71 | if data do
72 | File.read!(data.location)
73 | else
74 | nil
75 | end
76 | end
77 |
78 | def get_data(id) do
79 | data = Data |> Repo.get_by(%{:uuid => id})
80 |
81 | case data do
82 | nil ->
83 | TextdbWeb.ApiController.write_file(id, "")
84 | ""
85 |
86 | _ ->
87 | File.read!(data.location)
88 | end
89 | end
90 |
91 | def get_data_with_time_check(id, time, data) do
92 | check_data = Data |> Repo.get_by(%{:uuid => id})
93 |
94 | Logger.info("updated: " <> inspect(check_data.updated_at))
95 |
96 | should_update = compare(check_data.updated_at, time)
97 |
98 | Logger.info("should_update " <> inspect(should_update))
99 |
100 | case should_update do
101 | :lt -> {data, time}
102 | :eq -> {data, time}
103 | :gt -> {File.read!(check_data.location), NaiveDateTime.utc_now()}
104 | end
105 | end
106 |
107 | def handle_info(%{event: "data", payload: payload}, socket) do
108 | {data, time} =
109 | get_data_with_time_check(
110 | socket.assigns.id,
111 | socket.assigns.time,
112 | socket.assigns.data
113 | )
114 |
115 | {:noreply, assign(socket, %{:data => data, :time => time})}
116 | end
117 |
118 | def save_data(id, new_data) do
119 | TextdbWeb.ApiController.write_file(id, new_data)
120 | new_data
121 | end
122 |
123 | def handle_event("start_edit", _value, socket) do
124 | {:noreply, assign(socket, :editing, true)}
125 | end
126 |
127 | def handle_event("cancel_edit", _value, socket) do
128 | {:noreply, assign(socket, :editing, false)}
129 | end
130 |
131 | def handle_event("save_edit", value, socket) do
132 | if socket.assigns.editing do
133 | %{"data" => %{"data" => new_value}} = value
134 | from_save = save_data(socket.assigns.id, new_value)
135 |
136 | {:noreply, assign(socket, %{:editing => false, :data => from_save})}
137 | else
138 | {:noreply, assign(socket, %{:editing => false, :data => socket.assigns.data})}
139 | end
140 | end
141 |
142 | def handle_event("set_tmp_data", %{"value" => value}, socket) do
143 | {:noreply, assign(socket, %{:data => value})}
144 | end
145 |
146 | def handle_event("update_alignment", %{"value" => value}, socket) do
147 | Task.start(fn -> save_change_alignment(socket.assigns.id, value) end)
148 |
149 | {:noreply, assign(socket, %{:alignment => value})}
150 | end
151 |
152 | def save_change_alignment(id, value) do
153 | data = Data |> Repo.get_by(%{:uuid => id})
154 |
155 | case data do
156 | nil ->
157 | TextdbWeb.ApiController.write_file(id, "")
158 |
159 | _ ->
160 | nil
161 | end
162 |
163 | data = Data |> Repo.get_by(%{:uuid => id})
164 |
165 | data
166 | |> Data.changeset(%{alignment: value})
167 | |> Repo.update()
168 | end
169 | end
170 |
--------------------------------------------------------------------------------
/lib/textdb_web/live/data_live.html.leex:
--------------------------------------------------------------------------------
1 |
2 |
3 | viewing: <%= @id %>
4 |
5 | <%= if @editing_enabled do %>
6 | <%= if @editing do %>
7 | <%= f = form_for @changeset, "#", [phx_submit: :save_edit] %>
8 |
9 |
10 |
11 | <%=
12 | textarea f,
13 | :data,
14 | value: @data,
15 | class: "edit-data #{@alignment}",
16 | phx_blur: :set_tmp_data
17 | %>
18 |
19 |
20 | <% else %>
21 |
22 |
25 | <% end %>
26 | <%= else %>
27 |
30 | <% end %>
31 |
32 | <%= if @editing_enabled == true do %>
33 |
34 |
35 | change text alignment:
36 | <%= if @alignment == "left" do %>
37 |
38 | <% else %>
39 |
40 | <% end %>
41 |
42 | <%= if @alignment == "center" do %>
43 |
44 | <% else %>
45 |
46 | <% end %>
47 |
48 | <%= if @alignment == "right" do %>
49 |
50 | <% else %>
51 |
52 | <% end %>
53 |
54 |
55 |
56 | API
57 | Update your data with
58 | curl -d "hello world" -H "content-type: text/plain" https://textdb.dev/api/data/<%= @id %>
59 |
60 | Access your data with
61 | curl https://textdb.dev/api/data/<%= @id %>
62 |
63 |
70 |
71 | <% end %>
72 |
73 |
--------------------------------------------------------------------------------
/lib/textdb_web/live/stats_live.ex:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/textdb_web/live/stats_live.html.leex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/lib/textdb_web/live/stats_live.html.leex
--------------------------------------------------------------------------------
/lib/textdb_web/router.ex:
--------------------------------------------------------------------------------
1 | defmodule TextdbWeb.Router do
2 | use TextdbWeb, :router
3 |
4 | import Phoenix.LiveView.Router
5 |
6 | pipeline :browser do
7 | plug(:accepts, ["html"])
8 | plug(:fetch_session)
9 | plug(:fetch_live_flash)
10 | plug(:protect_from_forgery)
11 | plug(:put_secure_browser_headers)
12 | plug(:put_root_layout, {TextdbWeb.LayoutView, :root})
13 | end
14 |
15 | pipeline :api do
16 | plug(CORSPlug, origin: "*")
17 | plug(:accepts, ["text/plain", "application/json", "json"])
18 | end
19 |
20 | scope "/", TextdbWeb do
21 | pipe_through(:browser)
22 |
23 | get("/", PageController, :index)
24 | live("/data/:id", DataLive)
25 |
26 | # get "/analytics", AnalyticsController, :index
27 | end
28 |
29 | scope "/api", TextdbWeb do
30 | pipe_through(:api)
31 |
32 | get("/data/:id", ApiController, :fetch_data)
33 | post("/data/:id", ApiController, :update_data)
34 | options("/data/:id", ApiController, :options)
35 | end
36 |
37 | # Other scopes may use custom stacks.
38 | # scope "/api", TextdbWeb do
39 | # pipe_through :api
40 | # end
41 |
42 | # Enables LiveDashboard only for development
43 | #
44 | # If you want to use the LiveDashboard in production, you should put
45 | # it behind authentication and allow only admins to access it.
46 | # If your application does not have an admins-only section yet,
47 | # you can use Plug.BasicAuth to set up some basic authentication
48 | # as long as you are also using SSL (which you should anyway).
49 | if Mix.env() in [:dev, :test] do
50 | import Phoenix.LiveDashboard.Router
51 |
52 | scope "/" do
53 | pipe_through(:browser)
54 | live_dashboard("/dashboard", metrics: TextdbWeb.Telemetry)
55 | end
56 | end
57 | end
58 |
--------------------------------------------------------------------------------
/lib/textdb_web/telemetry.ex:
--------------------------------------------------------------------------------
1 | defmodule TextdbWeb.Telemetry do
2 | use Supervisor
3 | import Telemetry.Metrics
4 |
5 | def start_link(arg) do
6 | Supervisor.start_link(__MODULE__, arg, name: __MODULE__)
7 | end
8 |
9 | @impl true
10 | def init(_arg) do
11 | children = [
12 | # Telemetry poller will execute the given period measurements
13 | # every 10_000ms. Learn more here: https://hexdocs.pm/telemetry_metrics
14 | {:telemetry_poller, measurements: periodic_measurements(), period: 10_000}
15 | # Add reporters as children of your supervision tree.
16 | # {Telemetry.Metrics.ConsoleReporter, metrics: metrics()}
17 | ]
18 |
19 | Supervisor.init(children, strategy: :one_for_one)
20 | end
21 |
22 | def metrics do
23 | [
24 | # Phoenix Metrics
25 | summary("phoenix.endpoint.stop.duration",
26 | unit: {:native, :millisecond}
27 | ),
28 | summary("phoenix.router_dispatch.stop.duration",
29 | tags: [:route],
30 | unit: {:native, :millisecond}
31 | ),
32 |
33 | # Database Metrics
34 | summary("textdb.repo.query.total_time", unit: {:native, :millisecond}),
35 | summary("textdb.repo.query.decode_time", unit: {:native, :millisecond}),
36 | summary("textdb.repo.query.query_time", unit: {:native, :millisecond}),
37 | summary("textdb.repo.query.queue_time", unit: {:native, :millisecond}),
38 | summary("textdb.repo.query.idle_time", unit: {:native, :millisecond}),
39 |
40 | # VM Metrics
41 | summary("vm.memory.total", unit: {:byte, :kilobyte}),
42 | summary("vm.total_run_queue_lengths.total"),
43 | summary("vm.total_run_queue_lengths.cpu"),
44 | summary("vm.total_run_queue_lengths.io")
45 | ]
46 | end
47 |
48 | defp periodic_measurements do
49 | [
50 | # A module, function and arguments to be invoked periodically.
51 | # This function must call :telemetry.execute/3 and a metric must be added above.
52 | # {TextdbWeb, :count_users, []}
53 | ]
54 | end
55 | end
56 |
--------------------------------------------------------------------------------
/lib/textdb_web/templates/layout/app.html.eex:
--------------------------------------------------------------------------------
1 |
2 | <%= get_flash(@conn, :info) %>
3 | <%= get_flash(@conn, :error) %>
4 | <%= @inner_content %>
5 |
6 |
--------------------------------------------------------------------------------
/lib/textdb_web/templates/layout/live.html.leex:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Textdb
8 | "/>
9 | <%= csrf_meta_tag() %>
10 |
11 |
12 |
13 | <%= @inner_content %>
14 |
15 |
16 |
--------------------------------------------------------------------------------
/lib/textdb_web/templates/layout/root.html.leex:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Textdb
8 | ">
9 | ">
10 | ">
11 | ">
12 | "/>
13 | <%= csrf_meta_tag() %>
14 |
15 |
16 |
17 | <%= @inner_content %>
18 |
19 |
20 |
--------------------------------------------------------------------------------
/lib/textdb_web/templates/page/data.html.eex:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/lib/textdb_web/templates/page/index.html.eex:
--------------------------------------------------------------------------------
1 |
2 | TextDB
3 | A simple way to share small amounts of data
4 |
5 |
6 |
7 | Let's name your data <%= @uuid %>
8 |
9 | Update your data with
10 | curl -d "hello world" -H "content-type: text/plain" https://textdb.dev/api/data/<%= @uuid %>
11 |
12 | Access your data with
13 | curl https://textdb.dev/api/data/<%= @uuid %>
14 |
15 | Or view it with live updates at
16 | https://textdb.dev/data/<%= @uuid %>
17 |
18 |
19 |
20 | Additional Information
21 | Textdb should respect your headers, say if you do -H "accept: application/json" it will return json.
22 | Likewise, if you do -H "content-type: application/json" when posting, it will validate the json.
23 | If you have the data open on your browser, it should live update on writes.
24 | Yes, anyone with the link can edit the data. We also just introduced Read Only links, visible in your data link.
25 | The source code is at https://github.com/bontaq/textdb if you'd like to check it out.
26 | If you would like something, or something is broken, please contact me at bontaq@gmail.com
27 |
28 |
--------------------------------------------------------------------------------
/lib/textdb_web/views/error_helpers.ex:
--------------------------------------------------------------------------------
1 | defmodule TextdbWeb.ErrorHelpers do
2 | @moduledoc """
3 | Conveniences for translating and building error messages.
4 | """
5 |
6 | use Phoenix.HTML
7 |
8 | @doc """
9 | Generates tag for inlined form input errors.
10 | """
11 | def error_tag(form, field) do
12 | Enum.map(Keyword.get_values(form.errors, field), fn error ->
13 | content_tag(:span, translate_error(error),
14 | class: "invalid-feedback",
15 | phx_feedback_for: input_id(form, field)
16 | )
17 | end)
18 | end
19 |
20 | @doc """
21 | Translates an error message using gettext.
22 | """
23 | def translate_error({msg, opts}) do
24 | # When using gettext, we typically pass the strings we want
25 | # to translate as a static argument:
26 | #
27 | # # Translate "is invalid" in the "errors" domain
28 | # dgettext("errors", "is invalid")
29 | #
30 | # # Translate the number of files with plural rules
31 | # dngettext("errors", "1 file", "%{count} files", count)
32 | #
33 | # Because the error messages we show in our forms and APIs
34 | # are defined inside Ecto, we need to translate them dynamically.
35 | # This requires us to call the Gettext module passing our gettext
36 | # backend as first argument.
37 | #
38 | # Note we use the "errors" domain, which means translations
39 | # should be written to the errors.po file. The :count option is
40 | # set by Ecto and indicates we should also apply plural rules.
41 | if count = opts[:count] do
42 | Gettext.dngettext(TextdbWeb.Gettext, "errors", msg, msg, count, opts)
43 | else
44 | Gettext.dgettext(TextdbWeb.Gettext, "errors", msg, opts)
45 | end
46 | end
47 | end
48 |
--------------------------------------------------------------------------------
/lib/textdb_web/views/error_view.ex:
--------------------------------------------------------------------------------
1 | defmodule TextdbWeb.ErrorView do
2 | use TextdbWeb, :view
3 |
4 | # If you want to customize a particular status code
5 | # for a certain format, you may uncomment below.
6 | # def render("500.html", _assigns) do
7 | # "Internal Server Error"
8 | # end
9 |
10 | # By default, Phoenix returns the status message from
11 | # the template name. For example, "404.html" becomes
12 | # "Not Found".
13 | def template_not_found(template, _assigns) do
14 | Phoenix.Controller.status_message_from_template(template)
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/lib/textdb_web/views/layout_view.ex:
--------------------------------------------------------------------------------
1 | defmodule TextdbWeb.LayoutView do
2 | use TextdbWeb, :view
3 | end
4 |
--------------------------------------------------------------------------------
/lib/textdb_web/views/page_view.ex:
--------------------------------------------------------------------------------
1 | defmodule TextdbWeb.PageView do
2 | use TextdbWeb, :view
3 | end
4 |
--------------------------------------------------------------------------------
/mix.exs:
--------------------------------------------------------------------------------
1 | defmodule Textdb.MixProject do
2 | use Mix.Project
3 |
4 | def project do
5 | [
6 | app: :textdb,
7 | version: "0.1.0",
8 | elixir: "~> 1.7",
9 | elixirc_paths: elixirc_paths(Mix.env()),
10 | compilers: [:phoenix, :gettext] ++ Mix.compilers(),
11 | start_permanent: Mix.env() == :prod,
12 | aliases: aliases(),
13 | deps: deps()
14 | ]
15 | end
16 |
17 | # Configuration for the OTP application.
18 | #
19 | # Type `mix help compile.app` for more information.
20 | def application do
21 | [
22 | mod: {Textdb.Application, []},
23 | extra_applications: [:logger, :runtime_tools]
24 | ]
25 | end
26 |
27 | # Specifies which paths to compile per environment.
28 | defp elixirc_paths(:test), do: ["lib", "test/support"]
29 | defp elixirc_paths(_), do: ["lib"]
30 |
31 | # Specifies your project dependencies.
32 | #
33 | # Type `mix help deps` for examples and options.
34 | defp deps do
35 | [
36 | {:phoenix, "~> 1.5.3"},
37 | {:phoenix_ecto, "~> 4.1"},
38 | {:ecto_sql, "~> 3.4"},
39 | {:postgrex, ">= 0.0.0"},
40 | {:phoenix_html, "~> 2.11"},
41 | {:phoenix_live_reload, "~> 1.2", only: :dev},
42 | {:phoenix_live_dashboard, "~> 0.2.0"},
43 | {:telemetry_metrics, "~> 0.4"},
44 | {:telemetry_poller, "~> 0.4"},
45 | {:gettext, "~> 0.11"},
46 | {:jason, "~> 1.0"},
47 | {:plug_cowboy, "~> 2.0"},
48 | {:cors_plug, "~> 2.0"}
49 | ]
50 | end
51 |
52 | # Aliases are shortcuts or tasks specific to the current project.
53 | # For example, to install project dependencies and perform other setup tasks, run:
54 | #
55 | # $ mix setup
56 | #
57 | # See the documentation for `Mix` for more info on aliases.
58 | defp aliases do
59 | [
60 | setup: ["deps.get", "ecto.setup", "cmd npm install --prefix assets"],
61 | "ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
62 | "ecto.reset": ["ecto.drop", "ecto.setup"],
63 | test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"]
64 | ]
65 | end
66 | end
67 |
--------------------------------------------------------------------------------
/mix.lock:
--------------------------------------------------------------------------------
1 | %{
2 | "connection": {:hex, :connection, "1.0.4", "a1cae72211f0eef17705aaededacac3eb30e6625b04a6117c1b2db6ace7d5976", [:mix], [], "hexpm", "4a0850c9be22a43af9920a71ab17c051f5f7d45c209e40269a1938832510e4d9"},
3 | "cors_plug": {:hex, :cors_plug, "2.0.2", "2b46083af45e4bc79632bd951550509395935d3e7973275b2b743bd63cc942ce", [:mix], [{:plug, "~> 1.8", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "f0d0e13f71c51fd4ef8b2c7e051388e4dfb267522a83a22392c856de7e46465f"},
4 | "cowboy": {:hex, :cowboy, "2.8.0", "f3dc62e35797ecd9ac1b50db74611193c29815401e53bac9a5c0577bd7bc667d", [:rebar3], [{:cowlib, "~> 2.9.1", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "~> 1.7.1", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "4643e4fba74ac96d4d152c75803de6fad0b3fa5df354c71afdd6cbeeb15fac8a"},
5 | "cowlib": {:hex, :cowlib, "2.9.1", "61a6c7c50cf07fdd24b2f45b89500bb93b6686579b069a89f88cb211e1125c78", [:rebar3], [], "hexpm", "e4175dc240a70d996156160891e1c62238ede1729e45740bdd38064dad476170"},
6 | "db_connection": {:hex, :db_connection, "2.2.2", "3bbca41b199e1598245b716248964926303b5d4609ff065125ce98bcd368939e", [:mix], [{:connection, "~> 1.0.2", [hex: :connection, repo: "hexpm", optional: false]}], "hexpm", "642af240d8a8affb93b4ba5a6fcd2bbcbdc327e1a524b825d383711536f8070c"},
7 | "decimal": {:hex, :decimal, "1.8.1", "a4ef3f5f3428bdbc0d35374029ffcf4ede8533536fa79896dd450168d9acdf3c", [:mix], [], "hexpm", "3cb154b00225ac687f6cbd4acc4b7960027c757a5152b369923ead9ddbca7aec"},
8 | "ecto": {:hex, :ecto, "3.4.5", "2bcd262f57b2c888b0bd7f7a28c8a48aa11dc1a2c6a858e45dd8f8426d504265", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "8c6d1d4d524559e9b7a062f0498e2c206122552d63eacff0a6567ffe7a8e8691"},
9 | "ecto_sql": {:hex, :ecto_sql, "3.4.5", "30161f81b167d561a9a2df4329c10ae05ff36eca7ccc84628f2c8b9fa1e43323", [:mix], [{:db_connection, "~> 2.2", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.4.3", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.3.0 or ~> 0.4.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.15.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.0", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "31990c6a3579b36a3c0841d34a94c275e727de8b84f58509da5f1b2032c98ac2"},
10 | "file_system": {:hex, :file_system, "0.2.8", "f632bd287927a1eed2b718f22af727c5aeaccc9a98d8c2bd7bff709e851dc986", [:mix], [], "hexpm", "97a3b6f8d63ef53bd0113070102db2ce05352ecf0d25390eb8d747c2bde98bca"},
11 | "gettext": {:hex, :gettext, "0.18.0", "406d6b9e0e3278162c2ae1de0a60270452c553536772167e2d701f028116f870", [:mix], [], "hexpm", "c3f850be6367ebe1a08616c2158affe4a23231c70391050bf359d5f92f66a571"},
12 | "jason": {:hex, :jason, "1.2.1", "12b22825e22f468c02eb3e4b9985f3d0cb8dc40b9bd704730efa11abd2708c44", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "b659b8571deedf60f79c5a608e15414085fa141344e2716fbd6988a084b5f993"},
13 | "mime": {:hex, :mime, "1.3.1", "30ce04ab3175b6ad0bdce0035cba77bba68b813d523d1aac73d9781b4d193cf8", [:mix], [], "hexpm", "6cbe761d6a0ca5a31a0931bf4c63204bceb64538e664a8ecf784a9a6f3b875f1"},
14 | "phoenix": {:hex, :phoenix, "1.5.4", "0fca9ce7e960f9498d6315e41fcd0c80bfa6fbeb5fa3255b830c67fdfb7e703f", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_html, "~> 2.13", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:plug, "~> 1.10", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 1.0 or ~> 2.2", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.1.2 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "4e516d131fde87b568abd62e1b14aa07ba7d5edfd230bab4e25cc9dedbb39135"},
15 | "phoenix_ecto": {:hex, :phoenix_ecto, "4.1.0", "a044d0756d0464c5a541b4a0bf4bcaf89bffcaf92468862408290682c73ae50d", [:mix], [{:ecto, "~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.9", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "c5e666a341ff104d0399d8f0e4ff094559b2fde13a5985d4cb5023b2c2ac558b"},
16 | "phoenix_html": {:hex, :phoenix_html, "2.14.2", "b8a3899a72050f3f48a36430da507dd99caf0ac2d06c77529b1646964f3d563e", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "58061c8dfd25da5df1ea0ca47c972f161beb6c875cd293917045b92ffe1bf617"},
17 | "phoenix_live_dashboard": {:hex, :phoenix_live_dashboard, "0.2.7", "21564144897109ac486518651fecd09403a4d9df4d8432e7dcdf156df6a6a31a", [:mix], [{:phoenix_html, "~> 2.14.1 or ~> 2.15", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 0.14.0", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}, {:telemetry_metrics, "~> 0.4.0 or ~> 0.5.0", [hex: :telemetry_metrics, repo: "hexpm", optional: false]}], "hexpm", "2204c2c6755da7b39a21e312253b93d977cc846c85df8a6c0d9f9505cd8bf15b"},
18 | "phoenix_live_reload": {:hex, :phoenix_live_reload, "1.2.4", "940c0344b1d66a2e46eef02af3a70e0c5bb45a4db0bf47917add271b76cd3914", [:mix], [{:file_system, "~> 0.2.1 or ~> 0.3", [hex: :file_system, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm", "38f9308357dea4cc77f247e216da99fcb0224e05ada1469167520bed4cb8cccd"},
19 | "phoenix_live_view": {:hex, :phoenix_live_view, "0.14.2", "97b62d3fc73208a37b0c3cf625c45ece8483f3cd6b58c18fe274ab6007b9454b", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.5.3", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 0.5", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "0183bf13739a5a582a6c33dc46edbf9f271068ea3ad3f0e49b062017edc1e9af"},
20 | "phoenix_pubsub": {:hex, :phoenix_pubsub, "2.0.0", "a1ae76717bb168cdeb10ec9d92d1480fec99e3080f011402c0a2d68d47395ffb", [:mix], [], "hexpm", "c52d948c4f261577b9c6fa804be91884b381a7f8f18450c5045975435350f771"},
21 | "plug": {:hex, :plug, "1.10.3", "c9cebe917637d8db0e759039cc106adca069874e1a9034fd6e3fdd427fd3c283", [:mix], [{:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "01f9037a2a1de1d633b5a881101e6a444bcabb1d386ca1e00bb273a1f1d9d939"},
22 | "plug_cowboy": {:hex, :plug_cowboy, "2.3.0", "149a50e05cb73c12aad6506a371cd75750c0b19a32f81866e1a323dda9e0e99d", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "bc595a1870cef13f9c1e03df56d96804db7f702175e4ccacdb8fc75c02a7b97e"},
23 | "plug_crypto": {:hex, :plug_crypto, "1.1.2", "bdd187572cc26dbd95b87136290425f2b580a116d3fb1f564216918c9730d227", [:mix], [], "hexpm", "6b8b608f895b6ffcfad49c37c7883e8df98ae19c6a28113b02aa1e9c5b22d6b5"},
24 | "postgrex": {:hex, :postgrex, "0.15.5", "aec40306a622d459b01bff890fa42f1430dac61593b122754144ad9033a2152f", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "ed90c81e1525f65a2ba2279dbcebf030d6d13328daa2f8088b9661eb9143af7f"},
25 | "ranch": {:hex, :ranch, "1.7.1", "6b1fab51b49196860b733a49c07604465a47bdb78aa10c1c16a3d199f7f8c881", [:rebar3], [], "hexpm", "451d8527787df716d99dc36162fca05934915db0b6141bbdac2ea8d3c7afc7d7"},
26 | "telemetry": {:hex, :telemetry, "0.4.2", "2808c992455e08d6177322f14d3bdb6b625fbcfd233a73505870d8738a2f4599", [:rebar3], [], "hexpm", "2d1419bd9dda6a206d7b5852179511722e2b18812310d304620c7bd92a13fcef"},
27 | "telemetry_metrics": {:hex, :telemetry_metrics, "0.5.0", "1b796e74add83abf844e808564275dfb342bcc930b04c7577ab780e262b0d998", [:mix], [{:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "31225e6ce7a37a421a0a96ec55244386aec1c190b22578bd245188a4a33298fd"},
28 | "telemetry_poller": {:hex, :telemetry_poller, "0.5.1", "21071cc2e536810bac5628b935521ff3e28f0303e770951158c73eaaa01e962a", [:rebar3], [{:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "4cab72069210bc6e7a080cec9afffad1b33370149ed5d379b81c7c5f0c663fd4"},
29 | }
30 |
--------------------------------------------------------------------------------
/priv/gettext/en/LC_MESSAGES/errors.po:
--------------------------------------------------------------------------------
1 | ## `msgid`s in this file come from POT (.pot) files.
2 | ##
3 | ## Do not add, change, or remove `msgid`s manually here as
4 | ## they're tied to the ones in the corresponding POT file
5 | ## (with the same domain).
6 | ##
7 | ## Use `mix gettext.extract --merge` or `mix gettext.merge`
8 | ## to merge POT files into PO files.
9 | msgid ""
10 | msgstr ""
11 | "Language: en\n"
12 |
13 | ## From Ecto.Changeset.cast/4
14 | msgid "can't be blank"
15 | msgstr ""
16 |
17 | ## From Ecto.Changeset.unique_constraint/3
18 | msgid "has already been taken"
19 | msgstr ""
20 |
21 | ## From Ecto.Changeset.put_change/3
22 | msgid "is invalid"
23 | msgstr ""
24 |
25 | ## From Ecto.Changeset.validate_acceptance/3
26 | msgid "must be accepted"
27 | msgstr ""
28 |
29 | ## From Ecto.Changeset.validate_format/3
30 | msgid "has invalid format"
31 | msgstr ""
32 |
33 | ## From Ecto.Changeset.validate_subset/3
34 | msgid "has an invalid entry"
35 | msgstr ""
36 |
37 | ## From Ecto.Changeset.validate_exclusion/3
38 | msgid "is reserved"
39 | msgstr ""
40 |
41 | ## From Ecto.Changeset.validate_confirmation/3
42 | msgid "does not match confirmation"
43 | msgstr ""
44 |
45 | ## From Ecto.Changeset.no_assoc_constraint/3
46 | msgid "is still associated with this entry"
47 | msgstr ""
48 |
49 | msgid "are still associated with this entry"
50 | msgstr ""
51 |
52 | ## From Ecto.Changeset.validate_length/3
53 | msgid "should be %{count} character(s)"
54 | msgid_plural "should be %{count} character(s)"
55 | msgstr[0] ""
56 | msgstr[1] ""
57 |
58 | msgid "should have %{count} item(s)"
59 | msgid_plural "should have %{count} item(s)"
60 | msgstr[0] ""
61 | msgstr[1] ""
62 |
63 | msgid "should be at least %{count} character(s)"
64 | msgid_plural "should be at least %{count} character(s)"
65 | msgstr[0] ""
66 | msgstr[1] ""
67 |
68 | msgid "should have at least %{count} item(s)"
69 | msgid_plural "should have at least %{count} item(s)"
70 | msgstr[0] ""
71 | msgstr[1] ""
72 |
73 | msgid "should be at most %{count} character(s)"
74 | msgid_plural "should be at most %{count} character(s)"
75 | msgstr[0] ""
76 | msgstr[1] ""
77 |
78 | msgid "should have at most %{count} item(s)"
79 | msgid_plural "should have at most %{count} item(s)"
80 | msgstr[0] ""
81 | msgstr[1] ""
82 |
83 | ## From Ecto.Changeset.validate_number/3
84 | msgid "must be less than %{number}"
85 | msgstr ""
86 |
87 | msgid "must be greater than %{number}"
88 | msgstr ""
89 |
90 | msgid "must be less than or equal to %{number}"
91 | msgstr ""
92 |
93 | msgid "must be greater than or equal to %{number}"
94 | msgstr ""
95 |
96 | msgid "must be equal to %{number}"
97 | msgstr ""
98 |
--------------------------------------------------------------------------------
/priv/gettext/errors.pot:
--------------------------------------------------------------------------------
1 | ## This is a PO Template file.
2 | ##
3 | ## `msgid`s here are often extracted from source code.
4 | ## Add new translations manually only if they're dynamic
5 | ## translations that can't be statically extracted.
6 | ##
7 | ## Run `mix gettext.extract` to bring this file up to
8 | ## date. Leave `msgstr`s empty as changing them here has no
9 | ## effect: edit them in PO (`.po`) files instead.
10 |
11 | ## From Ecto.Changeset.cast/4
12 | msgid "can't be blank"
13 | msgstr ""
14 |
15 | ## From Ecto.Changeset.unique_constraint/3
16 | msgid "has already been taken"
17 | msgstr ""
18 |
19 | ## From Ecto.Changeset.put_change/3
20 | msgid "is invalid"
21 | msgstr ""
22 |
23 | ## From Ecto.Changeset.validate_acceptance/3
24 | msgid "must be accepted"
25 | msgstr ""
26 |
27 | ## From Ecto.Changeset.validate_format/3
28 | msgid "has invalid format"
29 | msgstr ""
30 |
31 | ## From Ecto.Changeset.validate_subset/3
32 | msgid "has an invalid entry"
33 | msgstr ""
34 |
35 | ## From Ecto.Changeset.validate_exclusion/3
36 | msgid "is reserved"
37 | msgstr ""
38 |
39 | ## From Ecto.Changeset.validate_confirmation/3
40 | msgid "does not match confirmation"
41 | msgstr ""
42 |
43 | ## From Ecto.Changeset.no_assoc_constraint/3
44 | msgid "is still associated with this entry"
45 | msgstr ""
46 |
47 | msgid "are still associated with this entry"
48 | msgstr ""
49 |
50 | ## From Ecto.Changeset.validate_length/3
51 | msgid "should be %{count} character(s)"
52 | msgid_plural "should be %{count} character(s)"
53 | msgstr[0] ""
54 | msgstr[1] ""
55 |
56 | msgid "should have %{count} item(s)"
57 | msgid_plural "should have %{count} item(s)"
58 | msgstr[0] ""
59 | msgstr[1] ""
60 |
61 | msgid "should be at least %{count} character(s)"
62 | msgid_plural "should be at least %{count} character(s)"
63 | msgstr[0] ""
64 | msgstr[1] ""
65 |
66 | msgid "should have at least %{count} item(s)"
67 | msgid_plural "should have at least %{count} item(s)"
68 | msgstr[0] ""
69 | msgstr[1] ""
70 |
71 | msgid "should be at most %{count} character(s)"
72 | msgid_plural "should be at most %{count} character(s)"
73 | msgstr[0] ""
74 | msgstr[1] ""
75 |
76 | msgid "should have at most %{count} item(s)"
77 | msgid_plural "should have at most %{count} item(s)"
78 | msgstr[0] ""
79 | msgstr[1] ""
80 |
81 | ## From Ecto.Changeset.validate_number/3
82 | msgid "must be less than %{number}"
83 | msgstr ""
84 |
85 | msgid "must be greater than %{number}"
86 | msgstr ""
87 |
88 | msgid "must be less than or equal to %{number}"
89 | msgstr ""
90 |
91 | msgid "must be greater than or equal to %{number}"
92 | msgstr ""
93 |
94 | msgid "must be equal to %{number}"
95 | msgstr ""
96 |
--------------------------------------------------------------------------------
/priv/repo/migrations/.formatter.exs:
--------------------------------------------------------------------------------
1 | [
2 | import_deps: [:ecto_sql],
3 | inputs: ["*.exs"]
4 | ]
5 |
--------------------------------------------------------------------------------
/priv/repo/migrations/20200722011054_create_data.exs:
--------------------------------------------------------------------------------
1 | defmodule Textdb.Repo.Migrations.CreateData do
2 | use Ecto.Migration
3 |
4 | def up do
5 | create table(:data) do
6 | add :uuid, :string
7 | add :location, :string
8 |
9 | timestamps()
10 | end
11 |
12 | create index(:data, [:uuid])
13 | end
14 |
15 | def down do
16 | drop index(:data, [:uuid])
17 | drop table(:data)
18 | end
19 | end
20 |
--------------------------------------------------------------------------------
/priv/repo/migrations/20200725154909_add_hash.exs:
--------------------------------------------------------------------------------
1 | defmodule Textdb.Repo.Migrations.AddHash do
2 | use Ecto.Migration
3 |
4 | def up do
5 | alter table(:data) do
6 | add :hash, :string
7 | end
8 |
9 | create index(:data, [:hash])
10 | end
11 |
12 | def down do
13 | drop index(:data, [:hash])
14 |
15 | alter table(:data) do
16 | remove :hash
17 | end
18 | end
19 | end
20 |
--------------------------------------------------------------------------------
/priv/repo/migrations/20200727202413_create_analytics.exs:
--------------------------------------------------------------------------------
1 | defmodule Textdb.Repo.Migrations.CreateAnalytics do
2 | use Ecto.Migration
3 |
4 | def up do
5 | create table(:analytics) do
6 | add :topic, :string
7 | add :subtopic, :string
8 | add :count, :integer
9 | add :date, :date
10 |
11 | timestamps()
12 | end
13 |
14 | create index(:analytics, [:date])
15 | create index(:analytics, [:topic])
16 | end
17 |
18 | def down do
19 | drop index(:analytics, [:date])
20 | drop index(:analytics, [:topic])
21 | drop table(:analytics)
22 | end
23 | end
24 |
--------------------------------------------------------------------------------
/priv/repo/migrations/20200803193450_add_alignment_prefs_to_data.exs:
--------------------------------------------------------------------------------
1 | defmodule Textdb.Repo.Migrations.AddAlignmentPrefsToData do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:data) do
6 | add :alignment, :string, size: 10, default: "center"
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/priv/repo/seeds.exs:
--------------------------------------------------------------------------------
1 | # Script for populating the database. You can run it as:
2 | #
3 | # mix run priv/repo/seeds.exs
4 | #
5 | # Inside the script, you can read and write to any of your
6 | # repositories directly:
7 | #
8 | # Textdb.Repo.insert!(%Textdb.SomeSchema{})
9 | #
10 | # We recommend using the bang functions (`insert!`, `update!`
11 | # and so on) as they will fail if something goes wrong.
12 |
--------------------------------------------------------------------------------
/priv/static/about-96819df370ab514804724f61194d7a38.txt:
--------------------------------------------------------------------------------
1 | This favicon was generated using the following font:
2 |
3 | - Font Title: IBM Plex Mono
4 | - Font Author: Copyright 2017 IBM Corp. All rights reserved.
5 | - Font Source: http://fonts.gstatic.com/s/ibmplexmono/v6/-F63fjptAgt5VM-kVkqdyU8n5igg1l9kn-s.ttf
6 | - Font License: SIL Open Font License, 1.1 (http://scripts.sil.org/OFL)
7 |
--------------------------------------------------------------------------------
/priv/static/about-96819df370ab514804724f61194d7a38.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/about-96819df370ab514804724f61194d7a38.txt.gz
--------------------------------------------------------------------------------
/priv/static/about.txt:
--------------------------------------------------------------------------------
1 | This favicon was generated using the following font:
2 |
3 | - Font Title: IBM Plex Mono
4 | - Font Author: Copyright 2017 IBM Corp. All rights reserved.
5 | - Font Source: http://fonts.gstatic.com/s/ibmplexmono/v6/-F63fjptAgt5VM-kVkqdyU8n5igg1l9kn-s.ttf
6 | - Font License: SIL Open Font License, 1.1 (http://scripts.sil.org/OFL)
7 |
--------------------------------------------------------------------------------
/priv/static/about.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/about.txt.gz
--------------------------------------------------------------------------------
/priv/static/android-chrome-192x192-b61d0a25f9a6ff61e4e8bbaf98541672.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/android-chrome-192x192-b61d0a25f9a6ff61e4e8bbaf98541672.png
--------------------------------------------------------------------------------
/priv/static/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/android-chrome-192x192.png
--------------------------------------------------------------------------------
/priv/static/android-chrome-512x512-0c273cc0fde2ee06a3123fb9fc0ac682.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/android-chrome-512x512-0c273cc0fde2ee06a3123fb9fc0ac682.png
--------------------------------------------------------------------------------
/priv/static/android-chrome-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/android-chrome-512x512.png
--------------------------------------------------------------------------------
/priv/static/apple-touch-icon-8ef6ed894613a4d59226f9fb79e8bd46.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/apple-touch-icon-8ef6ed894613a4d59226f9fb79e8bd46.png
--------------------------------------------------------------------------------
/priv/static/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/apple-touch-icon.png
--------------------------------------------------------------------------------
/priv/static/cache_manifest.json:
--------------------------------------------------------------------------------
1 | {"digests":{"about-96819df370ab514804724f61194d7a38.txt":{"digest":"96819df370ab514804724f61194d7a38","logical_path":"about.txt","mtime":63783895838,"sha512":"61QgMHtSaU2wqBnp3DAgFunjwbLVgDHFdz9oow+g+hibMybHHvqrpUMVllUJ/Mj9mEynJyJ7P8fV9BBMl1debA==","size":312},"android-chrome-192x192-b61d0a25f9a6ff61e4e8bbaf98541672.png":{"digest":"b61d0a25f9a6ff61e4e8bbaf98541672","logical_path":"android-chrome-192x192.png","mtime":63783895838,"sha512":"p8RC9NxjnZo+i1R6X8c+QyTrNT1gosEsTconpixerzyhZNSk+0T+1EqvCXEuz33DSRdPsckI0w1NRd5g24E/zA==","size":1630},"android-chrome-512x512-0c273cc0fde2ee06a3123fb9fc0ac682.png":{"digest":"0c273cc0fde2ee06a3123fb9fc0ac682","logical_path":"android-chrome-512x512.png","mtime":63783895838,"sha512":"0vFQW8+hhcfI/qLHrdedBjpT3T9Gw99ctACRerpHsuMJPAggNu2hMJhGSjtOleIHw+l4ddWxPXQ2rX/FzYa1HQ==","size":4566},"apple-touch-icon-8ef6ed894613a4d59226f9fb79e8bd46.png":{"digest":"8ef6ed894613a4d59226f9fb79e8bd46","logical_path":"apple-touch-icon.png","mtime":63783895838,"sha512":"fJJrOkuZTykosA669+AWM5mWBBWmNbkfNhbmZjd5tGt19wbfgi0m+R6i1K4rPo0HYcasEXJZLgix2Hfw3OJphw==","size":1500},"css/app-d6153f14286c8634caf2e6f598ef84cb.css":{"digest":"d6153f14286c8634caf2e6f598ef84cb","logical_path":"css/app.css","mtime":63783895838,"sha512":"QljJcsZ3zO8v9pxYBV5ic8vHaP+EGVo2Z9DkYA4M5OjZ96Tk4trEL76Rr0/wr/ZeY4U5n2VZuyBmZdg7AFwcuQ==","size":6983},"css/app.css-824c53e76c3a227f8b092034d1cedf33.map":{"digest":"824c53e76c3a227f8b092034d1cedf33","logical_path":"css/app.css.map","mtime":63783895838,"sha512":"eTss1GdQlvGA5SP3lybYBWcrPP5lOZT1nyC+ey0zCzFXEE27i7nrXdOfCS9bxsfM8etC5DvlXOSS0Q7oezhFLA==","size":11616},"data/b4d32d9a-4378-4f8a-b562-e3dbdd77d569-202cb962ac59075b964b07152d234b70":{"digest":"202cb962ac59075b964b07152d234b70","logical_path":"data/b4d32d9a-4378-4f8a-b562-e3dbdd77d569","mtime":63783895838,"sha512":"PJkJr+wlNU1VHa4hWQuybjjVPyFzuNPcPu5MBH56scHri4UQPjvnumE7MbtcnDYhTcnxSkL9ei/bhIVrylxEwg==","size":3},"data/b4d32d9a-4378-4f8a-b562-e3dbdd77d569-d41d8cd98f00b204e9800998ecf8427e":{"digest":"d41d8cd98f00b204e9800998ecf8427e","logical_path":"data/b4d32d9a-4378-4f8a-b562-e3dbdd77d569","mtime":63783817609,"sha512":"z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==","size":0},"data/d3634229-8475-4d0f-b07e-481cba3b1445-202cb962ac59075b964b07152d234b70":{"digest":"202cb962ac59075b964b07152d234b70","logical_path":"data/d3634229-8475-4d0f-b07e-481cba3b1445","mtime":63783895838,"sha512":"PJkJr+wlNU1VHa4hWQuybjjVPyFzuNPcPu5MBH56scHri4UQPjvnumE7MbtcnDYhTcnxSkL9ei/bhIVrylxEwg==","size":3},"data123-92b41deeb79babbc3a997162c90a1163":{"digest":"92b41deeb79babbc3a997162c90a1163","logical_path":"data123","mtime":63783895838,"sha512":"GNdeO9OWwwW6BUxHZGO7txnLyQn2lPsTW1xJkPj1SQ+WmNuAojQSqwDTBOmW0z34lbG6tkUyKX3rb4Fi4r5fqA==","size":9},"favicon-16x16-f2b34e617e934cc72fe35dde9f8f4f7f.png":{"digest":"f2b34e617e934cc72fe35dde9f8f4f7f","logical_path":"favicon-16x16.png","mtime":63783895838,"sha512":"ALbDF2H3lgDSPvaem/ga3sDmVCbMWwPie2dt0OPWcu/o9iRrNeOyT6zb3EbMbkF8ZXDA+Y5bx1beh3ievmEqlg==","size":181},"favicon-32x32-3ee0422ab66b5e73a1a23152d74cd777.png":{"digest":"3ee0422ab66b5e73a1a23152d74cd777","logical_path":"favicon-32x32.png","mtime":63783895838,"sha512":"xrfUvE428D9GUU9uR/dMcmeKKDByQ7g53o+FaR/XirCLaMmLScfpGDov0TYcEkkB75x4ZFBfBMrPVq/FEmI54Q==","size":273},"favicon-69806a552c9a440e5e643bd711b6799a.ico":{"digest":"69806a552c9a440e5e643bd711b6799a","logical_path":"favicon.ico","mtime":63783895838,"sha512":"b886NAdB+Ml7y7sIwQ7iTHqzxZrYcvAV4Sa+Ou+aMUKYQ/jJUJvEubDVcWqnPifZCcx0Lqsk6sNzovAVUEj7gw==","size":15406},"favicon/about-96819df370ab514804724f61194d7a38.txt":{"digest":"96819df370ab514804724f61194d7a38","logical_path":"favicon/about.txt","mtime":63783895838,"sha512":"61QgMHtSaU2wqBnp3DAgFunjwbLVgDHFdz9oow+g+hibMybHHvqrpUMVllUJ/Mj9mEynJyJ7P8fV9BBMl1debA==","size":312},"favicon/android-chrome-192x192-b61d0a25f9a6ff61e4e8bbaf98541672.png":{"digest":"b61d0a25f9a6ff61e4e8bbaf98541672","logical_path":"favicon/android-chrome-192x192.png","mtime":63783895838,"sha512":"p8RC9NxjnZo+i1R6X8c+QyTrNT1gosEsTconpixerzyhZNSk+0T+1EqvCXEuz33DSRdPsckI0w1NRd5g24E/zA==","size":1630},"favicon/android-chrome-512x512-0c273cc0fde2ee06a3123fb9fc0ac682.png":{"digest":"0c273cc0fde2ee06a3123fb9fc0ac682","logical_path":"favicon/android-chrome-512x512.png","mtime":63783895838,"sha512":"0vFQW8+hhcfI/qLHrdedBjpT3T9Gw99ctACRerpHsuMJPAggNu2hMJhGSjtOleIHw+l4ddWxPXQ2rX/FzYa1HQ==","size":4566},"favicon/apple-touch-icon-8ef6ed894613a4d59226f9fb79e8bd46.png":{"digest":"8ef6ed894613a4d59226f9fb79e8bd46","logical_path":"favicon/apple-touch-icon.png","mtime":63783895838,"sha512":"fJJrOkuZTykosA669+AWM5mWBBWmNbkfNhbmZjd5tGt19wbfgi0m+R6i1K4rPo0HYcasEXJZLgix2Hfw3OJphw==","size":1500},"favicon/favicon-16x16-f2b34e617e934cc72fe35dde9f8f4f7f.png":{"digest":"f2b34e617e934cc72fe35dde9f8f4f7f","logical_path":"favicon/favicon-16x16.png","mtime":63783895838,"sha512":"ALbDF2H3lgDSPvaem/ga3sDmVCbMWwPie2dt0OPWcu/o9iRrNeOyT6zb3EbMbkF8ZXDA+Y5bx1beh3ievmEqlg==","size":181},"favicon/favicon-32x32-3ee0422ab66b5e73a1a23152d74cd777.png":{"digest":"3ee0422ab66b5e73a1a23152d74cd777","logical_path":"favicon/favicon-32x32.png","mtime":63783895838,"sha512":"xrfUvE428D9GUU9uR/dMcmeKKDByQ7g53o+FaR/XirCLaMmLScfpGDov0TYcEkkB75x4ZFBfBMrPVq/FEmI54Q==","size":273},"favicon/favicon-69806a552c9a440e5e643bd711b6799a.ico":{"digest":"69806a552c9a440e5e643bd711b6799a","logical_path":"favicon/favicon.ico","mtime":63783895838,"sha512":"b886NAdB+Ml7y7sIwQ7iTHqzxZrYcvAV4Sa+Ou+aMUKYQ/jJUJvEubDVcWqnPifZCcx0Lqsk6sNzovAVUEj7gw==","size":15406},"favicon/site-053100cb84a50d2ae7f5492f7dd7f25e.webmanifest":{"digest":"053100cb84a50d2ae7f5492f7dd7f25e","logical_path":"favicon/site.webmanifest","mtime":63783895838,"sha512":"Kl+r11H/VjrDMQXAqxvISRNKXrPJ0zl+/+2zGUn3ia+uENQp676+PQrWqcmOy3m7/RByx71DA03OeqksLz0/4w==","size":263},"images/phoenix-5bd99a0d17dd41bc9d9bf6840abcc089.png":{"digest":"5bd99a0d17dd41bc9d9bf6840abcc089","logical_path":"images/phoenix.png","mtime":63783895838,"sha512":"93pY5dBa8nHHi0Zfj75O/vXCBXb+UvEVCyU7Yd3pzOJ7o1wkYBWbvs3pVXhBChEmo8MDANT11vsggo2+bnYqoQ==","size":13900},"js/app-02bda5b2a3841f526ae6c27ab930d7c4.js":{"digest":"02bda5b2a3841f526ae6c27ab930d7c4","logical_path":"js/app.js","mtime":63783895838,"sha512":"3Qs5tI/1keUn4HlDl045b1m9+J4JYSBWZFGEiCDIeP6Vcq4cUXO4wi5MTLTHGwQdV4pUB5wm5afl5CKqVD0NXg==","size":84319},"js/app.js-717b35a99f5463453d5b627d22bea47b.map":{"digest":"717b35a99f5463453d5b627d22bea47b","logical_path":"js/app.js.map","mtime":63783895838,"sha512":"TyVsy6FoKrsWpzcB0Q0wMNaEq9DsQZgQx/ygjr0oIgmV2zFZRJcxxlaReLdpRs0rXhtxlEMrikiNZReKk99+wg==","size":276624},"robots-067185ba27a5d9139b10a759679045bf.txt":{"digest":"067185ba27a5d9139b10a759679045bf","logical_path":"robots.txt","mtime":63783895838,"sha512":"8FA6TZeCo3hFYcQ+9knbh3TrhkqGzYJx/uD5yRvggwM7gwfBPrPGqqrbVTZjnnnvlsw1zs1WJTPYez1zr/U4ug==","size":202},"site-053100cb84a50d2ae7f5492f7dd7f25e.webmanifest":{"digest":"053100cb84a50d2ae7f5492f7dd7f25e","logical_path":"site.webmanifest","mtime":63783895838,"sha512":"Kl+r11H/VjrDMQXAqxvISRNKXrPJ0zl+/+2zGUn3ia+uENQp676+PQrWqcmOy3m7/RByx71DA03OeqksLz0/4w==","size":263}},"latest":{"about.txt":"about-96819df370ab514804724f61194d7a38.txt","android-chrome-192x192.png":"android-chrome-192x192-b61d0a25f9a6ff61e4e8bbaf98541672.png","android-chrome-512x512.png":"android-chrome-512x512-0c273cc0fde2ee06a3123fb9fc0ac682.png","apple-touch-icon.png":"apple-touch-icon-8ef6ed894613a4d59226f9fb79e8bd46.png","css/app.css":"css/app-d6153f14286c8634caf2e6f598ef84cb.css","css/app.css.map":"css/app.css-824c53e76c3a227f8b092034d1cedf33.map","data/b4d32d9a-4378-4f8a-b562-e3dbdd77d569":"data/b4d32d9a-4378-4f8a-b562-e3dbdd77d569-202cb962ac59075b964b07152d234b70","data/d3634229-8475-4d0f-b07e-481cba3b1445":"data/d3634229-8475-4d0f-b07e-481cba3b1445-202cb962ac59075b964b07152d234b70","data123":"data123-92b41deeb79babbc3a997162c90a1163","favicon-16x16.png":"favicon-16x16-f2b34e617e934cc72fe35dde9f8f4f7f.png","favicon-32x32.png":"favicon-32x32-3ee0422ab66b5e73a1a23152d74cd777.png","favicon.ico":"favicon-69806a552c9a440e5e643bd711b6799a.ico","favicon/about.txt":"favicon/about-96819df370ab514804724f61194d7a38.txt","favicon/android-chrome-192x192.png":"favicon/android-chrome-192x192-b61d0a25f9a6ff61e4e8bbaf98541672.png","favicon/android-chrome-512x512.png":"favicon/android-chrome-512x512-0c273cc0fde2ee06a3123fb9fc0ac682.png","favicon/apple-touch-icon.png":"favicon/apple-touch-icon-8ef6ed894613a4d59226f9fb79e8bd46.png","favicon/favicon-16x16.png":"favicon/favicon-16x16-f2b34e617e934cc72fe35dde9f8f4f7f.png","favicon/favicon-32x32.png":"favicon/favicon-32x32-3ee0422ab66b5e73a1a23152d74cd777.png","favicon/favicon.ico":"favicon/favicon-69806a552c9a440e5e643bd711b6799a.ico","favicon/site.webmanifest":"favicon/site-053100cb84a50d2ae7f5492f7dd7f25e.webmanifest","images/phoenix.png":"images/phoenix-5bd99a0d17dd41bc9d9bf6840abcc089.png","js/app.js":"js/app-02bda5b2a3841f526ae6c27ab930d7c4.js","js/app.js.map":"js/app.js-717b35a99f5463453d5b627d22bea47b.map","robots.txt":"robots-067185ba27a5d9139b10a759679045bf.txt","site.webmanifest":"site-053100cb84a50d2ae7f5492f7dd7f25e.webmanifest"},"version":1}
--------------------------------------------------------------------------------
/priv/static/css/app-d6153f14286c8634caf2e6f598ef84cb.css:
--------------------------------------------------------------------------------
1 | *,:after,:before{box-sizing:inherit}html{box-sizing:border-box;font-size:62.5%}body{color:#fff;background-color:#000;font-family:monospace;font-size:1.6em;font-weight:300;line-height:1.6}blockquote{border-left:.3rem solid #d1d1d1;margin-left:0;margin-right:0;padding:1rem 1.5rem}blockquote :last-child{margin-bottom:0}code{border-radius:.4rem;font-size:86%;margin:0 .2rem;padding:.2rem .5rem;white-space:nowrap}code,pre{background:#f4f5f6}pre{border-left:.3rem solid #0069d9;overflow-y:hidden}pre>code{border-radius:0;display:block;padding:1rem 1.5rem;white-space:pre}hr{border:0;border-top:.1rem solid #f4f5f6;margin:3rem 0}input[type=email],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=url],select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:.1rem solid #d1d1d1;border-radius:.4rem;box-shadow:none;box-sizing:inherit;height:3.8rem;padding:.6rem 1rem;width:100%}input[type=email]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=url]:focus,select:focus,textarea:focus{border-color:#0069d9;outline:0}select{background:url('data:image/svg+xml;utf8,') 100% no-repeat;padding-right:3rem}select:focus{background-image:url('data:image/svg+xml;utf8,')}textarea{min-height:6.5rem}label,legend{display:block;font-size:1.6rem;font-weight:700;margin-bottom:.5rem}fieldset{border-width:0;padding:0}input[type=checkbox],input[type=radio]{display:inline}.label-inline{display:inline-block;font-weight:400;margin-left:.5rem}.row{display:flex;flex-direction:column;width:100%}.row,.row.row-no-padding,.row.row-no-padding>.column{padding:0}.row.row-wrap{flex-wrap:wrap}.row.row-top{align-items:flex-start}.row.row-bottom{align-items:flex-end}.row.row-center{align-items:center}.row.row-stretch{align-items:stretch}.row.row-baseline{align-items:baseline}.row .column{display:block;flex:1 1 auto;margin-left:0;max-width:100%;width:100%}.row .column.column-offset-10{margin-left:10%}.row .column.column-offset-20{margin-left:20%}.row .column.column-offset-25{margin-left:25%}.row .column.column-offset-33,.row .column.column-offset-34{margin-left:33.3333%}.row .column.column-offset-50{margin-left:50%}.row .column.column-offset-66,.row .column.column-offset-67{margin-left:66.6666%}.row .column.column-offset-75{margin-left:75%}.row .column.column-offset-80{margin-left:80%}.row .column.column-offset-90{margin-left:90%}.row .column.column-10{flex:0 0 10%;max-width:10%}.row .column.column-20{flex:0 0 20%;max-width:20%}.row .column.column-25{flex:0 0 25%;max-width:25%}.row .column.column-33,.row .column.column-34{flex:0 0 33.3333%;max-width:33.3333%}.row .column.column-40{flex:0 0 40%;max-width:40%}.row .column.column-50{flex:0 0 50%;max-width:50%}.row .column.column-60{flex:0 0 60%;max-width:60%}.row .column.column-66,.row .column.column-67{flex:0 0 66.6666%;max-width:66.6666%}.row .column.column-75{flex:0 0 75%;max-width:75%}.row .column.column-80{flex:0 0 80%;max-width:80%}.row .column.column-90{flex:0 0 90%;max-width:90%}.row .column .column-top{align-self:flex-start}.row .column .column-bottom{align-self:flex-end}.row .column .column-center{-ms-grid-row-align:center;align-self:center}@media (min-width:40rem){.row{flex-direction:row;margin-left:-1rem;width:calc(100% + 2rem)}.row .column{margin-bottom:inherit;padding:0 1rem}}a{color:#0069d9;text-decoration:none}a:focus,a:hover{color:#606c76}dl,ol,ul{list-style:none;margin-top:0;padding-left:0}dl dl,dl ol,dl ul,ol dl,ol ol,ol ul,ul dl,ul ol,ul ul{font-size:90%;margin:1.5rem 0 1.5rem 3rem}ol{list-style:decimal inside}ul{list-style:circle inside}.button,button,dd,dt,li{margin-bottom:1rem}fieldset,input,select,textarea{margin-bottom:1.5rem}blockquote,dl,figure,form,ol,p,pre,table,ul{margin-bottom:2.5rem}table{border-spacing:0;width:100%}td,th{border-bottom:.1rem solid #e1e1e1;padding:1.2rem 1.5rem;text-align:left}td:first-child,th:first-child{padding-left:0}td:last-child,th:last-child{padding-right:0}b,strong{font-weight:700}p{margin-top:0}h1,h2,h3,h4,h5,h6{font-weight:300;letter-spacing:-.1rem;margin-bottom:2rem;margin-top:0}h1{font-size:4.6rem;line-height:1.2}h2{font-size:3.6rem;line-height:1.25}h3{font-size:2.8rem;line-height:1.3}h4{font-size:2.2rem;letter-spacing:-.08rem;line-height:1.35}h5{font-size:1.8rem;letter-spacing:-.05rem;line-height:1.5}h6{font-size:1.6rem;line-height:1.4}img{max-width:100%}.clearfix:after{clear:both;content:" ";display:table}.float-left{float:left}.float-right{float:right}h1{font-size:4rem;line-height:1.25}h2{font-size:2.8rem;line-height:1.3}h3{font-size:2.2rem;letter-spacing:-.08rem;line-height:1.35}h4{font-size:1.8rem;letter-spacing:-.05rem;line-height:1.5}h5{font-size:1.6rem;line-height:1.4}h5,h6{letter-spacing:0}h6{font-size:1.4rem;line-height:1.2}p{font-size:20px}pre{padding:1em}.container{max-width:80rem;position:relative}.container,.data-container{margin:0 auto;padding-top:10%;padding-bottom:10%;width:100%;text-align:center;font-size:20px}.data-container{max-width:95rem}code{background-color:#000;font-size:20px;white-space:break-spaces;color:#aef77d}.container p{color:#fffce1}.container h2{margin-top:55px;color:#fffce1}.intro{text-align:center}.intro h1{color:#fa26a0}.info p{padding-top:45px}.more-info{text-align:left;padding-top:140px}.data-api p{padding-top:45px}.uuid{color:#00ffe7}.textdb{color:#fa26a0}a{border-bottom:1px solid #fffce1}button,select{width:auto}button{border:none;margin:0;padding:0;overflow:visible;background:transparent;color:inherit;font:inherit;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;cursor:pointer}button.selected{cursor:pointer;border-bottom:1px solid #fff}.green,.green a{color:#aef77d}.edit{margin-top:15px;padding:0 10px;display:inline-block}.edit:hover{cursor:pointer}.data textarea{color:#fffce1;text-align:center}.data{font-size:20px;margin-top:25px;min-width:50%;min-height:600px}.data textarea.right{text-align:right}.data textarea.center{text-align:center}.data textarea.left{text-align:left}textarea{font-size:20px;min-height:600px}textarea[readonly]{border:1px solid #fff}header{width:100%;background:#fdfdfd;border-bottom:1px solid #eaeaea;margin-bottom:2rem}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert p{margin-bottom:0}.alert:empty{display:none}
--------------------------------------------------------------------------------
/priv/static/css/app-d6153f14286c8634caf2e6f598ef84cb.css.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/css/app-d6153f14286c8634caf2e6f598ef84cb.css.gz
--------------------------------------------------------------------------------
/priv/static/css/app.css:
--------------------------------------------------------------------------------
1 | *,:after,:before{box-sizing:inherit}html{box-sizing:border-box;font-size:62.5%}body{color:#fff;background-color:#000;font-family:monospace;font-size:1.6em;font-weight:300;line-height:1.6}blockquote{border-left:.3rem solid #d1d1d1;margin-left:0;margin-right:0;padding:1rem 1.5rem}blockquote :last-child{margin-bottom:0}code{border-radius:.4rem;font-size:86%;margin:0 .2rem;padding:.2rem .5rem;white-space:nowrap}code,pre{background:#f4f5f6}pre{border-left:.3rem solid #0069d9;overflow-y:hidden}pre>code{border-radius:0;display:block;padding:1rem 1.5rem;white-space:pre}hr{border:0;border-top:.1rem solid #f4f5f6;margin:3rem 0}input[type=email],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=url],select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:.1rem solid #d1d1d1;border-radius:.4rem;box-shadow:none;box-sizing:inherit;height:3.8rem;padding:.6rem 1rem;width:100%}input[type=email]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=url]:focus,select:focus,textarea:focus{border-color:#0069d9;outline:0}select{background:url('data:image/svg+xml;utf8,') 100% no-repeat;padding-right:3rem}select:focus{background-image:url('data:image/svg+xml;utf8,')}textarea{min-height:6.5rem}label,legend{display:block;font-size:1.6rem;font-weight:700;margin-bottom:.5rem}fieldset{border-width:0;padding:0}input[type=checkbox],input[type=radio]{display:inline}.label-inline{display:inline-block;font-weight:400;margin-left:.5rem}.row{display:flex;flex-direction:column;width:100%}.row,.row.row-no-padding,.row.row-no-padding>.column{padding:0}.row.row-wrap{flex-wrap:wrap}.row.row-top{align-items:flex-start}.row.row-bottom{align-items:flex-end}.row.row-center{align-items:center}.row.row-stretch{align-items:stretch}.row.row-baseline{align-items:baseline}.row .column{display:block;flex:1 1 auto;margin-left:0;max-width:100%;width:100%}.row .column.column-offset-10{margin-left:10%}.row .column.column-offset-20{margin-left:20%}.row .column.column-offset-25{margin-left:25%}.row .column.column-offset-33,.row .column.column-offset-34{margin-left:33.3333%}.row .column.column-offset-50{margin-left:50%}.row .column.column-offset-66,.row .column.column-offset-67{margin-left:66.6666%}.row .column.column-offset-75{margin-left:75%}.row .column.column-offset-80{margin-left:80%}.row .column.column-offset-90{margin-left:90%}.row .column.column-10{flex:0 0 10%;max-width:10%}.row .column.column-20{flex:0 0 20%;max-width:20%}.row .column.column-25{flex:0 0 25%;max-width:25%}.row .column.column-33,.row .column.column-34{flex:0 0 33.3333%;max-width:33.3333%}.row .column.column-40{flex:0 0 40%;max-width:40%}.row .column.column-50{flex:0 0 50%;max-width:50%}.row .column.column-60{flex:0 0 60%;max-width:60%}.row .column.column-66,.row .column.column-67{flex:0 0 66.6666%;max-width:66.6666%}.row .column.column-75{flex:0 0 75%;max-width:75%}.row .column.column-80{flex:0 0 80%;max-width:80%}.row .column.column-90{flex:0 0 90%;max-width:90%}.row .column .column-top{align-self:flex-start}.row .column .column-bottom{align-self:flex-end}.row .column .column-center{-ms-grid-row-align:center;align-self:center}@media (min-width:40rem){.row{flex-direction:row;margin-left:-1rem;width:calc(100% + 2rem)}.row .column{margin-bottom:inherit;padding:0 1rem}}a{color:#0069d9;text-decoration:none}a:focus,a:hover{color:#606c76}dl,ol,ul{list-style:none;margin-top:0;padding-left:0}dl dl,dl ol,dl ul,ol dl,ol ol,ol ul,ul dl,ul ol,ul ul{font-size:90%;margin:1.5rem 0 1.5rem 3rem}ol{list-style:decimal inside}ul{list-style:circle inside}.button,button,dd,dt,li{margin-bottom:1rem}fieldset,input,select,textarea{margin-bottom:1.5rem}blockquote,dl,figure,form,ol,p,pre,table,ul{margin-bottom:2.5rem}table{border-spacing:0;width:100%}td,th{border-bottom:.1rem solid #e1e1e1;padding:1.2rem 1.5rem;text-align:left}td:first-child,th:first-child{padding-left:0}td:last-child,th:last-child{padding-right:0}b,strong{font-weight:700}p{margin-top:0}h1,h2,h3,h4,h5,h6{font-weight:300;letter-spacing:-.1rem;margin-bottom:2rem;margin-top:0}h1{font-size:4.6rem;line-height:1.2}h2{font-size:3.6rem;line-height:1.25}h3{font-size:2.8rem;line-height:1.3}h4{font-size:2.2rem;letter-spacing:-.08rem;line-height:1.35}h5{font-size:1.8rem;letter-spacing:-.05rem;line-height:1.5}h6{font-size:1.6rem;line-height:1.4}img{max-width:100%}.clearfix:after{clear:both;content:" ";display:table}.float-left{float:left}.float-right{float:right}h1{font-size:4rem;line-height:1.25}h2{font-size:2.8rem;line-height:1.3}h3{font-size:2.2rem;letter-spacing:-.08rem;line-height:1.35}h4{font-size:1.8rem;letter-spacing:-.05rem;line-height:1.5}h5{font-size:1.6rem;line-height:1.4}h5,h6{letter-spacing:0}h6{font-size:1.4rem;line-height:1.2}p{font-size:20px}pre{padding:1em}.container{max-width:80rem;position:relative}.container,.data-container{margin:0 auto;padding-top:10%;padding-bottom:10%;width:100%;text-align:center;font-size:20px}.data-container{max-width:95rem}code{background-color:#000;font-size:20px;white-space:break-spaces;color:#aef77d}.container p{color:#fffce1}.container h2{margin-top:55px;color:#fffce1}.intro{text-align:center}.intro h1{color:#fa26a0}.info p{padding-top:45px}.more-info{text-align:left;padding-top:140px}.data-api p{padding-top:45px}.uuid{color:#00ffe7}.textdb{color:#fa26a0}a{border-bottom:1px solid #fffce1}button,select{width:auto}button{border:none;margin:0;padding:0;overflow:visible;background:transparent;color:inherit;font:inherit;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;cursor:pointer}button.selected{cursor:pointer;border-bottom:1px solid #fff}.green,.green a{color:#aef77d}.edit{margin-top:15px;padding:0 10px;display:inline-block}.edit:hover{cursor:pointer}.data textarea{color:#fffce1;text-align:center}.data{font-size:20px;margin-top:25px;min-width:50%;min-height:600px}.data textarea.right{text-align:right}.data textarea.center{text-align:center}.data textarea.left{text-align:left}textarea{font-size:20px;min-height:600px}textarea[readonly]{border:1px solid #fff}header{width:100%;background:#fdfdfd;border-bottom:1px solid #eaeaea;margin-bottom:2rem}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert p{margin-bottom:0}.alert:empty{display:none}
--------------------------------------------------------------------------------
/priv/static/css/app.css-824c53e76c3a227f8b092034d1cedf33.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["webpack:///./css/phoenix.css","webpack:///./css/app.scss"],"names":[],"mappings":"AAAA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mBAAmB,mBAAmB,KAAK,sBAAsB,gBAAgB,KAAK,YAAY,uBAAuB,sBAAsB,gBAAgB,gBAAgB,gBAAgB,WAAW,iCAAiC,cAAc,eAAe,oBAAoB,wBAAwB,iBAAiB,eAAe,WAAW,KAAK,mBAAmB,oBAAoB,cAAc,eAAe,oBAAoB,mBAAmB,IAAI,mBAAmB,iCAAiC,kBAAkB,SAAS,gBAAgB,cAAc,oBAAoB,gBAAgB,GAAG,SAAS,gCAAgC,gBAAgB,4JAA4J,wBAAwB,qBAAqB,gBAAgB,6BAA6B,4BAA4B,oBAAoB,gBAAgB,mBAAmB,cAAc,qBAAqB,WAAW,kNAAkN,qBAAqB,UAAU,OAAO,mCAAmC,kMAAkM,qBAAqB,aAAa,yCAAyC,2KAA2K,SAAS,kBAAkB,aAAa,cAAc,iBAAiB,gBAAgB,oBAAoB,SAAS,eAAe,UAAU,2CAA2C,eAAe,cAAc,qBAAqB,mBAAmB,kBAAkB,KAAK,aAAa,sBAAsB,UAAU,WAAW,oBAAoB,UAAU,4BAA4B,UAAU,cAAc,eAAe,aAAa,uBAAuB,gBAAgB,qBAAqB,gBAAgB,mBAAmB,iBAAiB,oBAAoB,kBAAkB,qBAAqB,aAAa,cAAc,cAAc,cAAc,eAAe,WAAW,8BAA8B,gBAAgB,8BAA8B,gBAAgB,8BAA8B,gBAAgB,4DAA4D,qBAAqB,8BAA8B,gBAAgB,4DAA4D,qBAAqB,8BAA8B,gBAAgB,8BAA8B,gBAAgB,8BAA8B,gBAAgB,uBAAuB,aAAa,cAAc,uBAAuB,aAAa,cAAc,uBAAuB,aAAa,cAAc,8CAA8C,kBAAkB,mBAAmB,uBAAuB,aAAa,cAAc,uBAAuB,aAAa,cAAc,uBAAuB,aAAa,cAAc,8CAA8C,kBAAkB,mBAAmB,uBAAuB,aAAa,cAAc,uBAAuB,aAAa,cAAc,uBAAuB,aAAa,cAAc,yBAAyB,sBAAsB,4BAA4B,oBAAoB,4BAA4B,0BAA0B,kBAAkB,0BAA0B,KAAK,mBAAmB,oBAAoB,0BAA0B,aAAa,sBAAsB,kBAAkB,EAAE,cAAc,qBAAqB,gBAAgB,cAAc,SAAS,gBAAgB,aAAa,eAAe,sDAAsD,cAAc,8BAA8B,GAAG,0BAA0B,GAAG,yBAAyB,wBAAwB,qBAAqB,+BAA+B,qBAAqB,4CAA4C,qBAAqB,MAAM,iBAAiB,WAAW,MAAM,mCAAmC,sBAAsB,gBAAgB,8BAA8B,eAAe,4BAA4B,gBAAgB,SAAS,iBAAiB,EAAE,aAAa,kBAAkB,gBAAgB,sBAAsB,qBAAqB,aAAa,GAAG,iBAAiB,gBAAgB,GAAG,iBAAiB,iBAAiB,GAAG,iBAAiB,gBAAgB,GAAG,iBAAiB,uBAAuB,iBAAiB,GAAG,iBAAiB,uBAAuB,gBAAgB,GAAG,iBAAiB,iBAAiB,gBAAgB,IAAI,eAAe,gBAAgB,WAAW,YAAY,cAAc,YAAY,WAAW,aAAa;;ACR/6J;AACA;AACA;AACA;AACA,oBAAoB;;AAEpB;AACA;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA,oBAAoB;;AAEpB;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA,kBAAkB;;AAElB;AACA,eAAe;;AAEf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA,iBAAiB;;AAEjB;AACA,qBAAqB;;AAErB;AACA,iBAAiB;;AAEjB;AACA,oBAAoB;;AAEpB;AACA;AACA,qBAAqB;;AAErB;AACA,oBAAoB;;AAEpB;AACA,iBAAiB;;AAEjB;AACA,iBAAiB;;AAEjB;AACA,mCAAmC;;AAEnC;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA,iCAAiC;;AAEjC;AACA,iBAAiB;;AAEjB;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA,wBAAwB;;AAExB;AACA,kBAAkB;;AAElB;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA;AACA,oBAAoB;;AAEpB;AACA,oBAAoB;;AAEpB;AACA,qBAAqB;;AAErB;AACA,mBAAmB;;AAEnB;AACA;AACA,oBAAoB;;AAEpB;AACA,0BAA0B;;AAE1B;AACA;AACA;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA,wBAAwB;;AAExB;AACA;AACA;AACA,wBAAwB;;AAExB;AACA;AACA;AACA,wBAAwB;;AAExB;AACA,mBAAmB;;AAEnB;AACA,gBAAgB","file":"../css/app-d6153f14286c8634caf2e6f598ef84cb.css","sourcesContent":["/* Includes some default style for the starter application.\n * This can be safely deleted to start fresh.\n */\n\n/* Milligram v1.3.0 https://milligram.github.io\n * Copyright (c) 2017 CJ Patoilo Licensed under the MIT license\n */\n\n*,*:after,*:before{box-sizing:inherit}html{box-sizing:border-box;font-size:62.5%}body{color:white;background-color:black;font-family:monospace;font-size:1.6em;font-weight:300;line-height:1.6}blockquote{border-left:0.3rem solid #d1d1d1;margin-left:0;margin-right:0;padding:1rem 1.5rem}blockquote *:last-child{margin-bottom:0}{cursor:default;opacity:.5}code{background:#f4f5f6;border-radius:.4rem;font-size:86%;margin:0 .2rem;padding:.2rem .5rem;white-space:nowrap}pre{background:#f4f5f6;border-left:0.3rem solid #0069d9;overflow-y:hidden}pre>code{border-radius:0;display:block;padding:1rem 1.5rem;white-space:pre}hr{border:0;border-top:0.1rem solid #f4f5f6;margin:3.0rem 0}input[type='email'],input[type='number'],input[type='password'],input[type='search'],input[type='tel'],input[type='text'],input[type='url'],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:0.1rem solid #d1d1d1;border-radius:.4rem;box-shadow:none;box-sizing:inherit;height:3.8rem;padding:.6rem 1.0rem;width:100%}input[type='email']:focus,input[type='number']:focus,input[type='password']:focus,input[type='search']:focus,input[type='tel']:focus,input[type='text']:focus,input[type='url']:focus,textarea:focus,select:focus{border-color:#0069d9;outline:0}select{background:url('data:image/svg+xml;utf8,') center right no-repeat;padding-right:3.0rem}select:focus{background-image:url('data:image/svg+xml;utf8,')}textarea{min-height:6.5rem}label,legend{display:block;font-size:1.6rem;font-weight:700;margin-bottom:.5rem}fieldset{border-width:0;padding:0}input[type='checkbox'],input[type='radio']{display:inline}.label-inline{display:inline-block;font-weight:normal;margin-left:.5rem}.row{display:flex;flex-direction:column;padding:0;width:100%}.row.row-no-padding{padding:0}.row.row-no-padding>.column{padding:0}.row.row-wrap{flex-wrap:wrap}.row.row-top{align-items:flex-start}.row.row-bottom{align-items:flex-end}.row.row-center{align-items:center}.row.row-stretch{align-items:stretch}.row.row-baseline{align-items:baseline}.row .column{display:block;flex:1 1 auto;margin-left:0;max-width:100%;width:100%}.row .column.column-offset-10{margin-left:10%}.row .column.column-offset-20{margin-left:20%}.row .column.column-offset-25{margin-left:25%}.row .column.column-offset-33,.row .column.column-offset-34{margin-left:33.3333%}.row .column.column-offset-50{margin-left:50%}.row .column.column-offset-66,.row .column.column-offset-67{margin-left:66.6666%}.row .column.column-offset-75{margin-left:75%}.row .column.column-offset-80{margin-left:80%}.row .column.column-offset-90{margin-left:90%}.row .column.column-10{flex:0 0 10%;max-width:10%}.row .column.column-20{flex:0 0 20%;max-width:20%}.row .column.column-25{flex:0 0 25%;max-width:25%}.row .column.column-33,.row .column.column-34{flex:0 0 33.3333%;max-width:33.3333%}.row .column.column-40{flex:0 0 40%;max-width:40%}.row .column.column-50{flex:0 0 50%;max-width:50%}.row .column.column-60{flex:0 0 60%;max-width:60%}.row .column.column-66,.row .column.column-67{flex:0 0 66.6666%;max-width:66.6666%}.row .column.column-75{flex:0 0 75%;max-width:75%}.row .column.column-80{flex:0 0 80%;max-width:80%}.row .column.column-90{flex:0 0 90%;max-width:90%}.row .column .column-top{align-self:flex-start}.row .column .column-bottom{align-self:flex-end}.row .column .column-center{-ms-grid-row-align:center;align-self:center}@media (min-width: 40rem){.row{flex-direction:row;margin-left:-1.0rem;width:calc(100% + 2.0rem)}.row .column{margin-bottom:inherit;padding:0 1.0rem}}a{color:#0069d9;text-decoration:none}a:focus,a:hover{color:#606c76}dl,ol,ul{list-style:none;margin-top:0;padding-left:0}dl dl,dl ol,dl ul,ol dl,ol ol,ol ul,ul dl,ul ol,ul ul{font-size:90%;margin:1.5rem 0 1.5rem 3.0rem}ol{list-style:decimal inside}ul{list-style:circle inside}.button,button,dd,dt,li{margin-bottom:1.0rem}fieldset,input,select,textarea{margin-bottom:1.5rem}blockquote,dl,figure,form,ol,p,pre,table,ul{margin-bottom:2.5rem}table{border-spacing:0;width:100%}td,th{border-bottom:0.1rem solid #e1e1e1;padding:1.2rem 1.5rem;text-align:left}td:first-child,th:first-child{padding-left:0}td:last-child,th:last-child{padding-right:0}b,strong{font-weight:bold}p{margin-top:0}h1,h2,h3,h4,h5,h6{font-weight:300;letter-spacing:-.1rem;margin-bottom:2.0rem;margin-top:0}h1{font-size:4.6rem;line-height:1.2}h2{font-size:3.6rem;line-height:1.25}h3{font-size:2.8rem;line-height:1.3}h4{font-size:2.2rem;letter-spacing:-.08rem;line-height:1.35}h5{font-size:1.8rem;letter-spacing:-.05rem;line-height:1.5}h6{font-size:1.6rem;letter-spacing:0;line-height:1.4}img{max-width:100%}.clearfix:after{clear:both;content:' ';display:table}.float-left{float:left}.float-right{float:right}\n","/* This file is for your main application css. */\n/* General style */\nh1 {\n font-size: 4.0rem;\n line-height: 1.25; }\n\nh2 {\n font-size: 2.8rem;\n line-height: 1.3; }\n\nh3 {\n font-size: 2.2rem;\n letter-spacing: -.08rem;\n line-height: 1.35; }\n\nh4 {\n font-size: 1.8rem;\n letter-spacing: -.05rem;\n line-height: 1.5; }\n\nh5 {\n font-size: 1.6rem;\n letter-spacing: 0;\n line-height: 1.4; }\n\nh6 {\n font-size: 1.4rem;\n letter-spacing: 0;\n line-height: 1.2; }\n\np {\n font-size: 20px; }\n\npre {\n padding: 1em; }\n\n.container {\n margin: 0 auto;\n max-width: 80.0rem;\n padding-top: 10%;\n padding-bottom: 10%;\n position: relative;\n width: 100%;\n text-align: center;\n font-size: 20px; }\n\n.data-container {\n margin: 0 auto;\n max-width: 95.0rem;\n padding-top: 10%;\n padding-bottom: 10%;\n width: 100%;\n text-align: center;\n font-size: 20px; }\n\ncode {\n background-color: black;\n font-size: 20px;\n white-space: break-spaces;\n color: #aef77d; }\n\n/* #e300ff,#b0ff00,#00ffd2,#fdff00,#ff00f4 */\n.container p {\n color: #fffce1; }\n\n.container h2 {\n margin-top: 55px;\n color: #fffce1; }\n\n.intro {\n text-align: center; }\n\n.intro h1 {\n color: #fa26a0; }\n\n.info p {\n padding-top: 45px; }\n\n.more-info {\n text-align: left;\n padding-top: 140px; }\n\n.data-api p {\n padding-top: 45px; }\n\n.uuid {\n color: #00ffe7; }\n\n.textdb {\n color: #fa26a0; }\n\na {\n border-bottom: 1px solid #fffce1; }\n\nselect {\n width: auto; }\n\nbutton {\n border: none;\n margin: 0;\n padding: 0;\n width: auto;\n overflow: visible;\n background: transparent;\n /* inherit font & color from ancestor */\n color: inherit;\n font: inherit;\n /* Normalize `line-height`. Cannot be changed from `normal` in Firefox 4+. */\n line-height: normal;\n /* Corrects font smoothing for webkit */\n -webkit-font-smoothing: inherit;\n -moz-osx-font-smoothing: inherit;\n /* Corrects inability to style clickable `input` types in iOS */\n -webkit-appearance: none;\n cursor: pointer; }\n\nbutton.selected {\n cursor: pointer;\n border-bottom: 1px solid white; }\n\n.green {\n color: #aef77d; }\n\n.green a {\n color: #aef77d; }\n\n.edit {\n margin-top: 15px;\n padding: 0 10px;\n display: inline-block; }\n\n.edit:hover {\n cursor: pointer; }\n\n.data textarea {\n color: #fffce1;\n text-align: center; }\n\n.data {\n font-size: 20px;\n margin-top: 25px;\n min-width: 50%;\n min-height: 600px; }\n\n.data textarea.right {\n text-align: right; }\n\n.data textarea.center {\n text-align: center; }\n\n.data textarea.left {\n text-align: left; }\n\ntextarea {\n font-size: 20px;\n min-height: 600px; }\n\ntextarea[readonly] {\n border: 1px solid white; }\n\n/* Headers */\nheader {\n width: 100%;\n background: #fdfdfd;\n border-bottom: 1px solid #eaeaea;\n margin-bottom: 2rem; }\n\n/* This file is for your main application css. */\n/* Alerts and form errors */\n.alert {\n padding: 15px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n border-radius: 4px; }\n\n.alert-info {\n color: #31708f;\n background-color: #d9edf7;\n border-color: #bce8f1; }\n\n.alert-warning {\n color: #8a6d3b;\n background-color: #fcf8e3;\n border-color: #faebcc; }\n\n.alert-danger {\n color: #a94442;\n background-color: #f2dede;\n border-color: #ebccd1; }\n\n.alert p {\n margin-bottom: 0; }\n\n.alert:empty {\n display: none; }\n"],"sourceRoot":""}
--------------------------------------------------------------------------------
/priv/static/css/app.css.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/css/app.css.gz
--------------------------------------------------------------------------------
/priv/static/css/app.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["webpack:///./css/phoenix.css","webpack:///./css/app.scss"],"names":[],"mappings":"AAAA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mBAAmB,mBAAmB,KAAK,sBAAsB,gBAAgB,KAAK,YAAY,uBAAuB,sBAAsB,gBAAgB,gBAAgB,gBAAgB,WAAW,iCAAiC,cAAc,eAAe,oBAAoB,wBAAwB,iBAAiB,eAAe,WAAW,KAAK,mBAAmB,oBAAoB,cAAc,eAAe,oBAAoB,mBAAmB,IAAI,mBAAmB,iCAAiC,kBAAkB,SAAS,gBAAgB,cAAc,oBAAoB,gBAAgB,GAAG,SAAS,gCAAgC,gBAAgB,4JAA4J,wBAAwB,qBAAqB,gBAAgB,6BAA6B,4BAA4B,oBAAoB,gBAAgB,mBAAmB,cAAc,qBAAqB,WAAW,kNAAkN,qBAAqB,UAAU,OAAO,mCAAmC,kMAAkM,qBAAqB,aAAa,yCAAyC,2KAA2K,SAAS,kBAAkB,aAAa,cAAc,iBAAiB,gBAAgB,oBAAoB,SAAS,eAAe,UAAU,2CAA2C,eAAe,cAAc,qBAAqB,mBAAmB,kBAAkB,KAAK,aAAa,sBAAsB,UAAU,WAAW,oBAAoB,UAAU,4BAA4B,UAAU,cAAc,eAAe,aAAa,uBAAuB,gBAAgB,qBAAqB,gBAAgB,mBAAmB,iBAAiB,oBAAoB,kBAAkB,qBAAqB,aAAa,cAAc,cAAc,cAAc,eAAe,WAAW,8BAA8B,gBAAgB,8BAA8B,gBAAgB,8BAA8B,gBAAgB,4DAA4D,qBAAqB,8BAA8B,gBAAgB,4DAA4D,qBAAqB,8BAA8B,gBAAgB,8BAA8B,gBAAgB,8BAA8B,gBAAgB,uBAAuB,aAAa,cAAc,uBAAuB,aAAa,cAAc,uBAAuB,aAAa,cAAc,8CAA8C,kBAAkB,mBAAmB,uBAAuB,aAAa,cAAc,uBAAuB,aAAa,cAAc,uBAAuB,aAAa,cAAc,8CAA8C,kBAAkB,mBAAmB,uBAAuB,aAAa,cAAc,uBAAuB,aAAa,cAAc,uBAAuB,aAAa,cAAc,yBAAyB,sBAAsB,4BAA4B,oBAAoB,4BAA4B,0BAA0B,kBAAkB,0BAA0B,KAAK,mBAAmB,oBAAoB,0BAA0B,aAAa,sBAAsB,kBAAkB,EAAE,cAAc,qBAAqB,gBAAgB,cAAc,SAAS,gBAAgB,aAAa,eAAe,sDAAsD,cAAc,8BAA8B,GAAG,0BAA0B,GAAG,yBAAyB,wBAAwB,qBAAqB,+BAA+B,qBAAqB,4CAA4C,qBAAqB,MAAM,iBAAiB,WAAW,MAAM,mCAAmC,sBAAsB,gBAAgB,8BAA8B,eAAe,4BAA4B,gBAAgB,SAAS,iBAAiB,EAAE,aAAa,kBAAkB,gBAAgB,sBAAsB,qBAAqB,aAAa,GAAG,iBAAiB,gBAAgB,GAAG,iBAAiB,iBAAiB,GAAG,iBAAiB,gBAAgB,GAAG,iBAAiB,uBAAuB,iBAAiB,GAAG,iBAAiB,uBAAuB,gBAAgB,GAAG,iBAAiB,iBAAiB,gBAAgB,IAAI,eAAe,gBAAgB,WAAW,YAAY,cAAc,YAAY,WAAW,aAAa;;ACR/6J;AACA;AACA;AACA;AACA,oBAAoB;;AAEpB;AACA;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA,oBAAoB;;AAEpB;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA,kBAAkB;;AAElB;AACA,eAAe;;AAEf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA,iBAAiB;;AAEjB;AACA,qBAAqB;;AAErB;AACA,iBAAiB;;AAEjB;AACA,oBAAoB;;AAEpB;AACA;AACA,qBAAqB;;AAErB;AACA,oBAAoB;;AAEpB;AACA,iBAAiB;;AAEjB;AACA,iBAAiB;;AAEjB;AACA,mCAAmC;;AAEnC;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA,iCAAiC;;AAEjC;AACA,iBAAiB;;AAEjB;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA,wBAAwB;;AAExB;AACA,kBAAkB;;AAElB;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA;AACA,oBAAoB;;AAEpB;AACA,oBAAoB;;AAEpB;AACA,qBAAqB;;AAErB;AACA,mBAAmB;;AAEnB;AACA;AACA,oBAAoB;;AAEpB;AACA,0BAA0B;;AAE1B;AACA;AACA;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA,wBAAwB;;AAExB;AACA;AACA;AACA,wBAAwB;;AAExB;AACA;AACA;AACA,wBAAwB;;AAExB;AACA,mBAAmB;;AAEnB;AACA,gBAAgB","file":"../css/app.css","sourcesContent":["/* Includes some default style for the starter application.\n * This can be safely deleted to start fresh.\n */\n\n/* Milligram v1.3.0 https://milligram.github.io\n * Copyright (c) 2017 CJ Patoilo Licensed under the MIT license\n */\n\n*,*:after,*:before{box-sizing:inherit}html{box-sizing:border-box;font-size:62.5%}body{color:white;background-color:black;font-family:monospace;font-size:1.6em;font-weight:300;line-height:1.6}blockquote{border-left:0.3rem solid #d1d1d1;margin-left:0;margin-right:0;padding:1rem 1.5rem}blockquote *:last-child{margin-bottom:0}{cursor:default;opacity:.5}code{background:#f4f5f6;border-radius:.4rem;font-size:86%;margin:0 .2rem;padding:.2rem .5rem;white-space:nowrap}pre{background:#f4f5f6;border-left:0.3rem solid #0069d9;overflow-y:hidden}pre>code{border-radius:0;display:block;padding:1rem 1.5rem;white-space:pre}hr{border:0;border-top:0.1rem solid #f4f5f6;margin:3.0rem 0}input[type='email'],input[type='number'],input[type='password'],input[type='search'],input[type='tel'],input[type='text'],input[type='url'],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:0.1rem solid #d1d1d1;border-radius:.4rem;box-shadow:none;box-sizing:inherit;height:3.8rem;padding:.6rem 1.0rem;width:100%}input[type='email']:focus,input[type='number']:focus,input[type='password']:focus,input[type='search']:focus,input[type='tel']:focus,input[type='text']:focus,input[type='url']:focus,textarea:focus,select:focus{border-color:#0069d9;outline:0}select{background:url('data:image/svg+xml;utf8,') center right no-repeat;padding-right:3.0rem}select:focus{background-image:url('data:image/svg+xml;utf8,')}textarea{min-height:6.5rem}label,legend{display:block;font-size:1.6rem;font-weight:700;margin-bottom:.5rem}fieldset{border-width:0;padding:0}input[type='checkbox'],input[type='radio']{display:inline}.label-inline{display:inline-block;font-weight:normal;margin-left:.5rem}.row{display:flex;flex-direction:column;padding:0;width:100%}.row.row-no-padding{padding:0}.row.row-no-padding>.column{padding:0}.row.row-wrap{flex-wrap:wrap}.row.row-top{align-items:flex-start}.row.row-bottom{align-items:flex-end}.row.row-center{align-items:center}.row.row-stretch{align-items:stretch}.row.row-baseline{align-items:baseline}.row .column{display:block;flex:1 1 auto;margin-left:0;max-width:100%;width:100%}.row .column.column-offset-10{margin-left:10%}.row .column.column-offset-20{margin-left:20%}.row .column.column-offset-25{margin-left:25%}.row .column.column-offset-33,.row .column.column-offset-34{margin-left:33.3333%}.row .column.column-offset-50{margin-left:50%}.row .column.column-offset-66,.row .column.column-offset-67{margin-left:66.6666%}.row .column.column-offset-75{margin-left:75%}.row .column.column-offset-80{margin-left:80%}.row .column.column-offset-90{margin-left:90%}.row .column.column-10{flex:0 0 10%;max-width:10%}.row .column.column-20{flex:0 0 20%;max-width:20%}.row .column.column-25{flex:0 0 25%;max-width:25%}.row .column.column-33,.row .column.column-34{flex:0 0 33.3333%;max-width:33.3333%}.row .column.column-40{flex:0 0 40%;max-width:40%}.row .column.column-50{flex:0 0 50%;max-width:50%}.row .column.column-60{flex:0 0 60%;max-width:60%}.row .column.column-66,.row .column.column-67{flex:0 0 66.6666%;max-width:66.6666%}.row .column.column-75{flex:0 0 75%;max-width:75%}.row .column.column-80{flex:0 0 80%;max-width:80%}.row .column.column-90{flex:0 0 90%;max-width:90%}.row .column .column-top{align-self:flex-start}.row .column .column-bottom{align-self:flex-end}.row .column .column-center{-ms-grid-row-align:center;align-self:center}@media (min-width: 40rem){.row{flex-direction:row;margin-left:-1.0rem;width:calc(100% + 2.0rem)}.row .column{margin-bottom:inherit;padding:0 1.0rem}}a{color:#0069d9;text-decoration:none}a:focus,a:hover{color:#606c76}dl,ol,ul{list-style:none;margin-top:0;padding-left:0}dl dl,dl ol,dl ul,ol dl,ol ol,ol ul,ul dl,ul ol,ul ul{font-size:90%;margin:1.5rem 0 1.5rem 3.0rem}ol{list-style:decimal inside}ul{list-style:circle inside}.button,button,dd,dt,li{margin-bottom:1.0rem}fieldset,input,select,textarea{margin-bottom:1.5rem}blockquote,dl,figure,form,ol,p,pre,table,ul{margin-bottom:2.5rem}table{border-spacing:0;width:100%}td,th{border-bottom:0.1rem solid #e1e1e1;padding:1.2rem 1.5rem;text-align:left}td:first-child,th:first-child{padding-left:0}td:last-child,th:last-child{padding-right:0}b,strong{font-weight:bold}p{margin-top:0}h1,h2,h3,h4,h5,h6{font-weight:300;letter-spacing:-.1rem;margin-bottom:2.0rem;margin-top:0}h1{font-size:4.6rem;line-height:1.2}h2{font-size:3.6rem;line-height:1.25}h3{font-size:2.8rem;line-height:1.3}h4{font-size:2.2rem;letter-spacing:-.08rem;line-height:1.35}h5{font-size:1.8rem;letter-spacing:-.05rem;line-height:1.5}h6{font-size:1.6rem;letter-spacing:0;line-height:1.4}img{max-width:100%}.clearfix:after{clear:both;content:' ';display:table}.float-left{float:left}.float-right{float:right}\n","/* This file is for your main application css. */\n/* General style */\nh1 {\n font-size: 4.0rem;\n line-height: 1.25; }\n\nh2 {\n font-size: 2.8rem;\n line-height: 1.3; }\n\nh3 {\n font-size: 2.2rem;\n letter-spacing: -.08rem;\n line-height: 1.35; }\n\nh4 {\n font-size: 1.8rem;\n letter-spacing: -.05rem;\n line-height: 1.5; }\n\nh5 {\n font-size: 1.6rem;\n letter-spacing: 0;\n line-height: 1.4; }\n\nh6 {\n font-size: 1.4rem;\n letter-spacing: 0;\n line-height: 1.2; }\n\np {\n font-size: 20px; }\n\npre {\n padding: 1em; }\n\n.container {\n margin: 0 auto;\n max-width: 80.0rem;\n padding-top: 10%;\n padding-bottom: 10%;\n position: relative;\n width: 100%;\n text-align: center;\n font-size: 20px; }\n\n.data-container {\n margin: 0 auto;\n max-width: 95.0rem;\n padding-top: 10%;\n padding-bottom: 10%;\n width: 100%;\n text-align: center;\n font-size: 20px; }\n\ncode {\n background-color: black;\n font-size: 20px;\n white-space: break-spaces;\n color: #aef77d; }\n\n/* #e300ff,#b0ff00,#00ffd2,#fdff00,#ff00f4 */\n.container p {\n color: #fffce1; }\n\n.container h2 {\n margin-top: 55px;\n color: #fffce1; }\n\n.intro {\n text-align: center; }\n\n.intro h1 {\n color: #fa26a0; }\n\n.info p {\n padding-top: 45px; }\n\n.more-info {\n text-align: left;\n padding-top: 140px; }\n\n.data-api p {\n padding-top: 45px; }\n\n.uuid {\n color: #00ffe7; }\n\n.textdb {\n color: #fa26a0; }\n\na {\n border-bottom: 1px solid #fffce1; }\n\nselect {\n width: auto; }\n\nbutton {\n border: none;\n margin: 0;\n padding: 0;\n width: auto;\n overflow: visible;\n background: transparent;\n /* inherit font & color from ancestor */\n color: inherit;\n font: inherit;\n /* Normalize `line-height`. Cannot be changed from `normal` in Firefox 4+. */\n line-height: normal;\n /* Corrects font smoothing for webkit */\n -webkit-font-smoothing: inherit;\n -moz-osx-font-smoothing: inherit;\n /* Corrects inability to style clickable `input` types in iOS */\n -webkit-appearance: none;\n cursor: pointer; }\n\nbutton.selected {\n cursor: pointer;\n border-bottom: 1px solid white; }\n\n.green {\n color: #aef77d; }\n\n.green a {\n color: #aef77d; }\n\n.edit {\n margin-top: 15px;\n padding: 0 10px;\n display: inline-block; }\n\n.edit:hover {\n cursor: pointer; }\n\n.data textarea {\n color: #fffce1;\n text-align: center; }\n\n.data {\n font-size: 20px;\n margin-top: 25px;\n min-width: 50%;\n min-height: 600px; }\n\n.data textarea.right {\n text-align: right; }\n\n.data textarea.center {\n text-align: center; }\n\n.data textarea.left {\n text-align: left; }\n\ntextarea {\n font-size: 20px;\n min-height: 600px; }\n\ntextarea[readonly] {\n border: 1px solid white; }\n\n/* Headers */\nheader {\n width: 100%;\n background: #fdfdfd;\n border-bottom: 1px solid #eaeaea;\n margin-bottom: 2rem; }\n\n/* This file is for your main application css. */\n/* Alerts and form errors */\n.alert {\n padding: 15px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n border-radius: 4px; }\n\n.alert-info {\n color: #31708f;\n background-color: #d9edf7;\n border-color: #bce8f1; }\n\n.alert-warning {\n color: #8a6d3b;\n background-color: #fcf8e3;\n border-color: #faebcc; }\n\n.alert-danger {\n color: #a94442;\n background-color: #f2dede;\n border-color: #ebccd1; }\n\n.alert p {\n margin-bottom: 0; }\n\n.alert:empty {\n display: none; }\n"],"sourceRoot":""}
--------------------------------------------------------------------------------
/priv/static/data123:
--------------------------------------------------------------------------------
1 | hello me=
--------------------------------------------------------------------------------
/priv/static/data123-92b41deeb79babbc3a997162c90a1163:
--------------------------------------------------------------------------------
1 | hello me=
--------------------------------------------------------------------------------
/priv/static/favicon-16x16-f2b34e617e934cc72fe35dde9f8f4f7f.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/favicon-16x16-f2b34e617e934cc72fe35dde9f8f4f7f.png
--------------------------------------------------------------------------------
/priv/static/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/favicon-16x16.png
--------------------------------------------------------------------------------
/priv/static/favicon-32x32-3ee0422ab66b5e73a1a23152d74cd777.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/favicon-32x32-3ee0422ab66b5e73a1a23152d74cd777.png
--------------------------------------------------------------------------------
/priv/static/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/favicon-32x32.png
--------------------------------------------------------------------------------
/priv/static/favicon-69806a552c9a440e5e643bd711b6799a.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/favicon-69806a552c9a440e5e643bd711b6799a.ico
--------------------------------------------------------------------------------
/priv/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/favicon.ico
--------------------------------------------------------------------------------
/priv/static/favicon/about-96819df370ab514804724f61194d7a38.txt:
--------------------------------------------------------------------------------
1 | This favicon was generated using the following font:
2 |
3 | - Font Title: IBM Plex Mono
4 | - Font Author: Copyright 2017 IBM Corp. All rights reserved.
5 | - Font Source: http://fonts.gstatic.com/s/ibmplexmono/v6/-F63fjptAgt5VM-kVkqdyU8n5igg1l9kn-s.ttf
6 | - Font License: SIL Open Font License, 1.1 (http://scripts.sil.org/OFL)
7 |
--------------------------------------------------------------------------------
/priv/static/favicon/about-96819df370ab514804724f61194d7a38.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/favicon/about-96819df370ab514804724f61194d7a38.txt.gz
--------------------------------------------------------------------------------
/priv/static/favicon/about.txt:
--------------------------------------------------------------------------------
1 | This favicon was generated using the following font:
2 |
3 | - Font Title: IBM Plex Mono
4 | - Font Author: Copyright 2017 IBM Corp. All rights reserved.
5 | - Font Source: http://fonts.gstatic.com/s/ibmplexmono/v6/-F63fjptAgt5VM-kVkqdyU8n5igg1l9kn-s.ttf
6 | - Font License: SIL Open Font License, 1.1 (http://scripts.sil.org/OFL)
7 |
--------------------------------------------------------------------------------
/priv/static/favicon/about.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/favicon/about.txt.gz
--------------------------------------------------------------------------------
/priv/static/favicon/android-chrome-192x192-b61d0a25f9a6ff61e4e8bbaf98541672.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/favicon/android-chrome-192x192-b61d0a25f9a6ff61e4e8bbaf98541672.png
--------------------------------------------------------------------------------
/priv/static/favicon/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/favicon/android-chrome-192x192.png
--------------------------------------------------------------------------------
/priv/static/favicon/android-chrome-512x512-0c273cc0fde2ee06a3123fb9fc0ac682.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/favicon/android-chrome-512x512-0c273cc0fde2ee06a3123fb9fc0ac682.png
--------------------------------------------------------------------------------
/priv/static/favicon/android-chrome-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/favicon/android-chrome-512x512.png
--------------------------------------------------------------------------------
/priv/static/favicon/apple-touch-icon-8ef6ed894613a4d59226f9fb79e8bd46.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/favicon/apple-touch-icon-8ef6ed894613a4d59226f9fb79e8bd46.png
--------------------------------------------------------------------------------
/priv/static/favicon/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/favicon/apple-touch-icon.png
--------------------------------------------------------------------------------
/priv/static/favicon/favicon-16x16-f2b34e617e934cc72fe35dde9f8f4f7f.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/favicon/favicon-16x16-f2b34e617e934cc72fe35dde9f8f4f7f.png
--------------------------------------------------------------------------------
/priv/static/favicon/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/favicon/favicon-16x16.png
--------------------------------------------------------------------------------
/priv/static/favicon/favicon-32x32-3ee0422ab66b5e73a1a23152d74cd777.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/favicon/favicon-32x32-3ee0422ab66b5e73a1a23152d74cd777.png
--------------------------------------------------------------------------------
/priv/static/favicon/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/favicon/favicon-32x32.png
--------------------------------------------------------------------------------
/priv/static/favicon/favicon-69806a552c9a440e5e643bd711b6799a.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/favicon/favicon-69806a552c9a440e5e643bd711b6799a.ico
--------------------------------------------------------------------------------
/priv/static/favicon/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/favicon/favicon.ico
--------------------------------------------------------------------------------
/priv/static/favicon/site-053100cb84a50d2ae7f5492f7dd7f25e.webmanifest:
--------------------------------------------------------------------------------
1 | {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
--------------------------------------------------------------------------------
/priv/static/favicon/site.webmanifest:
--------------------------------------------------------------------------------
1 | {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
--------------------------------------------------------------------------------
/priv/static/images/phoenix-5bd99a0d17dd41bc9d9bf6840abcc089.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/images/phoenix-5bd99a0d17dd41bc9d9bf6840abcc089.png
--------------------------------------------------------------------------------
/priv/static/images/phoenix.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/images/phoenix.png
--------------------------------------------------------------------------------
/priv/static/js/app-02bda5b2a3841f526ae6c27ab930d7c4.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/js/app-02bda5b2a3841f526ae6c27ab930d7c4.js.gz
--------------------------------------------------------------------------------
/priv/static/js/app.js:
--------------------------------------------------------------------------------
1 | (()=>{var e={902:function(e){e.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){(function(t){e.exports=t.Phoenix=n(2)}).call(this,n(1))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";function i(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);i=!0);}catch(e){r=!0,o=e}finally{try{i||null==s.return||s.return()}finally{if(r)throw o}}return n}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:this.timeout;if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}},{key:"onClose",value:function(e){this.on(k,e)}},{key:"onError",value:function(e){return this.on(b,(function(t){return e(t)}))}},{key:"on",value:function(e,t){var n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}},{key:"off",value:function(e,t){this.bindings=this.bindings.filter((function(n){return!(n.event===e&&(void 0===t||t===n.ref))}))}},{key:"canPush",value:function(){return this.socket.isConnected()&&this.isJoined()}},{key:"push",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.timeout;if(!this.joinedOnce)throw new Error("tried to push '".concat(e,"' to '").concat(this.topic,"' before joining. Use channel.join() before pushing events"));var i=new P(this,e,(function(){return t}),n);return this.canPush()?i.send():(i.startTimeout(),this.pushBuffer.push(i)),i}},{key:"leave",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=y;var n=function(){e.socket.hasLogger()&&e.socket.log("channel","leave ".concat(e.topic)),e.trigger(k,"leave")},i=new P(this,C,A({}),t);return i.receive("ok",(function(){return n()})).receive("timeout",(function(){return n()})),i.send(),this.canPush()||i.trigger("ok",{}),i}},{key:"onMessage",value:function(e,t,n){return t}},{key:"isLifecycleEvent",value:function(e){return S.indexOf(e)>=0}},{key:"isMember",value:function(e,t,n,i){return!(this.topic!==e||i&&i!==this.joinRef()&&this.isLifecycleEvent(t)&&(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:n,joinRef:i}),1))}},{key:"joinRef",value:function(){return this.joinPush.ref}},{key:"rejoin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=g,this.joinPush.resend(e))}},{key:"trigger",value:function(e,t,n,i){var r=this.onMessage(e,t,n,i);if(t&&!r)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");for(var o=this.bindings.filter((function(t){return t.event===e})),a=0;a1&&void 0!==arguments[1]?arguments[1]:{};u(this,e),this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=i.timeout||1e4,this.transport=i.transport||f.WebSocket||j,this.defaultEncoder=L.encode,this.defaultDecoder=L.decode,this.closeWasClean=!1,this.unloaded=!1,this.binaryType=i.binaryType||"arraybuffer",this.transport!==j?(this.encode=i.encode||this.defaultEncoder,this.decode=i.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder),d&&d.addEventListener&&d.addEventListener("unload",(function(e){n.conn&&(n.unloaded=!0,n.abnormalClose("unloaded"))})),this.heartbeatIntervalMs=i.heartbeatIntervalMs||3e4,this.rejoinAfterMs=function(e){return i.rejoinAfterMs?i.rejoinAfterMs(e):[1e3,2e3,5e3][e-1]||1e4},this.reconnectAfterMs=function(e){return n.unloaded?100:i.reconnectAfterMs?i.reconnectAfterMs(e):[10,50,100,150,200,250,500,1e3,2e3][e-1]||5e3},this.logger=i.logger||null,this.longpollerTimeout=i.longpollerTimeout||2e4,this.params=A(i.params||{}),this.endPoint="".concat(t,"/").concat(x),this.vsn=i.vsn||"2.0.0",this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new O((function(){n.teardown((function(){return n.connect()}))}),this.reconnectAfterMs)}return l(e,[{key:"protocol",value:function(){return location.protocol.match(/^https/)?"wss":"ws"}},{key:"endPointURL",value:function(){var e=I.appendParams(I.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return"/"!==e.charAt(0)?e:"/"===e.charAt(1)?"".concat(this.protocol(),":").concat(e):"".concat(this.protocol(),"://").concat(location.host).concat(e)}},{key:"disconnect",value:function(e,t,n){this.closeWasClean=!0,this.reconnectTimer.reset(),this.teardown(e,t,n)}},{key:"connect",value:function(e){var t=this;e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=A(e)),this.conn||(this.closeWasClean=!1,this.conn=new this.transport(this.endPointURL()),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=function(){return t.onConnOpen()},this.conn.onerror=function(e){return t.onConnError(e)},this.conn.onmessage=function(e){return t.onConnMessage(e)},this.conn.onclose=function(e){return t.onConnClose(e)})}},{key:"log",value:function(e,t,n){this.logger(e,t,n)}},{key:"hasLogger",value:function(){return null!==this.logger}},{key:"onOpen",value:function(e){var t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}},{key:"onClose",value:function(e){var t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}},{key:"onError",value:function(e){var t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}},{key:"onMessage",value:function(e){var t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}},{key:"onConnOpen",value:function(){this.hasLogger()&&this.log("transport","connected to ".concat(this.endPointURL())),this.unloaded=!1,this.closeWasClean=!1,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),this.stateChangeCallbacks.open.forEach((function(e){return(0,o(e,2)[1])()}))}},{key:"resetHeartbeat",value:function(){var e=this;this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval((function(){return e.sendHeartbeat()}),this.heartbeatIntervalMs))}},{key:"teardown",value:function(e,t,n){var i=this;if(!this.conn)return e&&e();this.waitForBufferDone((function(){i.conn&&(t?i.conn.close(t,n||""):i.conn.close()),i.waitForSocketClosed((function(){i.conn&&(i.conn.onclose=function(){},i.conn=null),e&&e()}))}))}},{key:"waitForBufferDone",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;5!==n&&this.conn&&this.conn.bufferedAmount?setTimeout((function(){t.waitForBufferDone(e,n+1)}),150*n):e()}},{key:"waitForSocketClosed",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;5!==n&&this.conn&&3!==this.conn.readyState?setTimeout((function(){t.waitForSocketClosed(e,n+1)}),150*n):e()}},{key:"onConnClose",value:function(e){this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(),clearInterval(this.heartbeatTimer),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach((function(t){return(0,o(t,2)[1])(e)}))}},{key:"onConnError",value:function(e){this.hasLogger()&&this.log("transport",e),this.triggerChanError(),this.stateChangeCallbacks.error.forEach((function(t){return(0,o(t,2)[1])(e)}))}},{key:"triggerChanError",value:function(){this.channels.forEach((function(e){e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(b)}))}},{key:"connectionState",value:function(){switch(this.conn&&this.conn.readyState){case 0:return"connecting";case 1:return"open";case 2:return"closing";default:return"closed"}}},{key:"isConnected",value:function(){return"open"===this.connectionState()}},{key:"remove",value:function(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter((function(t){return t.joinRef()!==e.joinRef()}))}},{key:"off",value:function(e){for(var t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter((function(t){var n=o(t,1)[0];return-1===e.indexOf(n)}))}},{key:"channel",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new T(e,t,this);return this.channels.push(n),n}},{key:"push",value:function(e){var t=this;if(this.hasLogger()){var n=e.topic,i=e.event,r=e.payload,o=e.ref,a=e.join_ref;this.log("push","".concat(n," ").concat(i," (").concat(a,", ").concat(o,")"),r)}this.isConnected()?this.encode(e,(function(e){return t.conn.send(e)})):this.sendBuffer.push((function(){return t.encode(e,(function(e){return t.conn.send(e)}))}))}},{key:"makeRef",value:function(){var e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}},{key:"sendHeartbeat",value:function(){if(this.isConnected()){if(this.pendingHeartbeatRef)return this.pendingHeartbeatRef=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection"),void this.abnormalClose("heartbeat timeout");this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef})}}},{key:"abnormalClose",value:function(e){this.closeWasClean=!1,this.conn.close(1e3,e)}},{key:"flushSendBuffer",value:function(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach((function(e){return e()})),this.sendBuffer=[])}},{key:"onConnMessage",value:function(e){var t=this;this.decode(e.data,(function(e){var n=e.topic,i=e.event,r=e.payload,a=e.ref,s=e.join_ref;a&&a===t.pendingHeartbeatRef&&(t.pendingHeartbeatRef=null),t.hasLogger()&&t.log("receive","".concat(r.status||""," ").concat(n," ").concat(i," ").concat(a&&"("+a+")"||""),r);for(var u=0;u1&&void 0!==arguments[1]?arguments[1]:{};u(this,e);var r=i.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(r.state,(function(t){var i=n.caller,r=i.onJoin,o=i.onLeave,a=i.onSync;n.joinRef=n.channel.joinRef(),n.state=e.syncState(n.state,t,r,o),n.pendingDiffs.forEach((function(t){n.state=e.syncDiff(n.state,t,r,o)})),n.pendingDiffs=[],a()})),this.channel.on(r.diff,(function(t){var i=n.caller,r=i.onJoin,o=i.onLeave,a=i.onSync;n.inPendingSyncState()?n.pendingDiffs.push(t):(n.state=e.syncDiff(n.state,t,r,o),a())}))}return l(e,[{key:"onJoin",value:function(e){this.caller.onJoin=e}},{key:"onLeave",value:function(e){this.caller.onLeave=e}},{key:"onSync",value:function(e){this.caller.onSync=e}},{key:"list",value:function(t){return e.list(this.state,t)}},{key:"inPendingSyncState",value:function(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}}],[{key:"syncState",value:function(e,t,n,i){var r=this,o=this.clone(e),a={},s={};return this.map(o,(function(e,n){t[e]||(s[e]=n)})),this.map(t,(function(e,t){var n=o[e];if(n){var i=t.metas.map((function(e){return e.phx_ref})),u=n.metas.map((function(e){return e.phx_ref})),c=t.metas.filter((function(e){return u.indexOf(e.phx_ref)<0})),l=n.metas.filter((function(e){return i.indexOf(e.phx_ref)<0}));c.length>0&&(a[e]=t,a[e].metas=c),l.length>0&&(s[e]=r.clone(n),s[e].metas=l)}else a[e]=t})),this.syncDiff(o,{joins:a,leaves:s},n,i)}},{key:"syncDiff",value:function(e,t,n,r){var o=t.joins,a=t.leaves,s=this.clone(e);return n||(n=function(){}),r||(r=function(){}),this.map(o,(function(e,t){var r=s[e];if(s[e]=t,r){var o,a=s[e].metas.map((function(e){return e.phx_ref})),u=r.metas.filter((function(e){return a.indexOf(e.phx_ref)<0}));(o=s[e].metas).unshift.apply(o,i(u))}n(e,r,t)})),this.map(a,(function(e,t){var n=s[e];if(n){var i=t.metas.map((function(e){return e.phx_ref}));n.metas=n.metas.filter((function(e){return i.indexOf(e.phx_ref)<0})),r(e,n,t),0===n.metas.length&&delete s[e]}})),s}},{key:"list",value:function(e,t){return t||(t=function(e,t){return t}),this.map(e,(function(e,n){return t(e,n)}))}},{key:"map",value:function(e,t){return Object.getOwnPropertyNames(e).map((function(n){return t(n,e[n])}))}},{key:"clone",value:function(e){return JSON.parse(JSON.stringify(e))}}]),e}(),O=function(){function e(t,n){u(this,e),this.callback=t,this.timerCalc=n,this.timer=null,this.tries=0}return l(e,[{key:"reset",value:function(){this.tries=0,clearTimeout(this.timer)}},{key:"scheduleTimeout",value:function(){var e=this;clearTimeout(this.timer),this.timer=setTimeout((function(){e.tries=e.tries+1,e.callback()}),this.timerCalc(this.tries+1))}}]),e}()}])},458:()=>{"use strict";!function(){var e=function(){if("function"==typeof window.CustomEvent)return window.CustomEvent;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}return e.prototype=window.Event.prototype,e}();function t(e,t){var n=document.createElement("input");return n.type="hidden",n.name=e,n.value=t,n}function n(e){var n=e.getAttribute("data-to"),i=t("_method",e.getAttribute("data-method")),r=t("_csrf_token",e.getAttribute("data-csrf")),o=document.createElement("form"),a=e.getAttribute("target");o.method="get"===e.getAttribute("data-method")?"get":"post",o.action=n,o.style.display="hidden",a&&(o.target=a),o.appendChild(r),o.appendChild(i),document.body.appendChild(o),o.submit()}window.addEventListener("click",(function(t){for(var i=t.target;i&&i.getAttribute;){var r=new e("phoenix.link.click",{bubbles:!0,cancelable:!0});if(!i.dispatchEvent(r))return t.preventDefault(),t.stopImmediatePropagation(),!1;if(i.getAttribute("data-method"))return n(i),t.preventDefault(),!1;i=i.parentNode}}),!1),window.addEventListener("phoenix.link.click",(function(e){var t=e.target.getAttribute("data-confirm");t&&!window.confirm(t)&&e.preventDefault()}),!1)}()},789:function(e){e.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){"use strict";n.r(t);var i,r="undefined"==typeof document?void 0:document,o=!!r&&"content"in r.createElement("template"),a=!!r&&r.createRange&&"createContextualFragment"in r.createRange();function s(e){return e=e.trim(),o?function(e){var t=r.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}(e):a?function(e){return i||(i=r.createRange()).selectNode(r.body),i.createContextualFragment(e).childNodes[0]}(e):function(e){var t=r.createElement("body");return t.innerHTML=e,t.childNodes[0]}(e)}function u(e,t){var n,i,r=e.nodeName,o=t.nodeName;return r===o||(n=r.charCodeAt(0),i=o.charCodeAt(0),n<=90&&i>=97?r===o.toUpperCase():i<=90&&n>=97&&o===r.toUpperCase())}function c(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n))}var l={OPTION:function(e,t){var n=e.parentNode;if(n){var i=n.nodeName.toUpperCase();"OPTGROUP"===i&&(i=(n=n.parentNode)&&n.nodeName.toUpperCase()),"SELECT"!==i||n.hasAttribute("multiple")||(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),n.selectedIndex=-1)}c(e,t,"selected")},INPUT:function(e,t){c(e,t,"checked"),c(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var n=t.value;e.value!==n&&(e.value=n);var i=e.firstChild;if(i){var r=i.nodeValue;if(r==n||!n&&r==e.placeholder)return;i.nodeValue=n}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var n,i,r=-1,o=0,a=e.firstChild;a;)if("OPTGROUP"===(i=a.nodeName&&a.nodeName.toUpperCase()))a=(n=a).firstChild;else{if("OPTION"===i){if(a.hasAttribute("selected")){r=o;break}o++}!(a=a.nextSibling)&&n&&(a=n.nextSibling,n=null)}e.selectedIndex=r}}};function h(){}function d(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}var f=function(e){return function(t,n,i){if(i||(i={}),"string"==typeof n)if("#document"===t.nodeName||"HTML"===t.nodeName||"BODY"===t.nodeName){var o=n;(n=r.createElement("html")).innerHTML=o}else n=s(n);var a=i.getNodeKey||d,c=i.onBeforeNodeAdded||h,f=i.onNodeAdded||h,v=i.onBeforeElUpdated||h,p=i.onElUpdated||h,m=i.onBeforeNodeDiscarded||h,g=i.onNodeDiscarded||h,y=i.onBeforeElChildrenUpdated||h,k=!0===i.childrenOnly,b=Object.create(null),w=[];function E(e){w.push(e)}function C(e,t,n){!1!==m(e)&&(t&&t.removeChild(e),g(e),function e(t,n){if(1===t.nodeType)for(var i=t.firstChild;i;){var r=void 0;n&&(r=a(i))?E(r):(g(i),i.firstChild&&e(i,n)),i=i.nextSibling}}(e,n))}function S(e){f(e);for(var t=e.firstChild;t;){var n=t.nextSibling,i=a(t);if(i){var r=b[i];r&&u(t,r)?(t.parentNode.replaceChild(r,t),x(r,t)):S(t)}else S(t);t=n}}function x(t,n,i){var o=a(n);if(o&&delete b[o],!i){if(!1===v(t,n))return;if(e(t,n),p(t),!1===y(t,n))return}"TEXTAREA"!==t.nodeName?function(e,t){var n,i,o,s,h,d=t.firstChild,f=e.firstChild;e:for(;d;){for(s=d.nextSibling,n=a(d);f;){if(o=f.nextSibling,d.isSameNode&&d.isSameNode(f)){d=s,f=o;continue e}i=a(f);var v=f.nodeType,p=void 0;if(v===d.nodeType&&(1===v?(n?n!==i&&((h=b[n])?o===h?p=!1:(e.insertBefore(h,f),i?E(i):C(f,e,!0),f=h):p=!1):i&&(p=!1),(p=!1!==p&&u(f,d))&&x(f,d)):3!==v&&8!=v||(p=!0,f.nodeValue!==d.nodeValue&&(f.nodeValue=d.nodeValue))),p){d=s,f=o;continue e}i?E(i):C(f,e,!0),f=o}if(n&&(h=b[n])&&u(h,d))e.appendChild(h),x(h,d);else{var m=c(d);!1!==m&&(m&&(d=m),d.actualize&&(d=d.actualize(e.ownerDocument||r)),e.appendChild(d),S(d))}d=s,f=o}!function(e,t,n){for(;t;){var i=t.nextSibling;(n=a(t))?E(n):C(t,e,!0),t=i}}(e,f,i);var g=l[e.nodeName];g&&g(e,t)}(t,n):l.TEXTAREA(t,n)}!function e(t){if(1===t.nodeType||11===t.nodeType)for(var n=t.firstChild;n;){var i=a(n);i&&(b[i]=n),e(n),n=n.nextSibling}}(t);var A=t,P=A.nodeType,T=n.nodeType;if(!k)if(1===P)1===T?u(t,n)||(g(t),A=function(e,t){for(var n=e.firstChild;n;){var i=n.nextSibling;t.appendChild(n),n=i}return t}(t,function(e,t){return t&&"http://www.w3.org/1999/xhtml"!==t?r.createElementNS(t,e):r.createElement(e)}(n.nodeName,n.namespaceURI))):A=n;else if(3===P||8===P){if(T===P)return A.nodeValue!==n.nodeValue&&(A.nodeValue=n.nodeValue),A;A=n}if(A===n)g(t);else{if(n.isSameNode&&n.isSameNode(A))return;if(x(A,n,k),w)for(var L=0,R=w.length;L=0;s--)i=(n=a[s]).name,r=n.namespaceURI,o=n.value,r?(i=n.localName||i,e.getAttributeNS(r,i)!==o&&("xmlns"===n.prefix&&(i=n.name),e.setAttributeNS(r,i,o))):e.getAttribute(i)!==o&&e.setAttribute(i,o);for(var u=e.attributes,c=u.length-1;c>=0;c--)i=(n=u[c]).name,(r=n.namespaceURI)?(i=n.localName||i,t.hasAttributeNS(r,i)||e.removeAttributeNS(r,i)):t.hasAttribute(i)||e.removeAttribute(i)}}));function v(e){return C(e)||g(e)||S(e)||E()}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,i=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{},i=new FormData(e),r=new URLSearchParams,o=function(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=S(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,r,o=!0,a=!1;return{s:function(){i=e[Symbol.iterator]()},n:function(){var e=i.next();return o=e.done,e},e:function(e){a=!0,r=e},f:function(){try{o||null==i.return||i.return()}finally{if(a)throw r}}}}(i.entries());try{for(o.s();!(t=o.n()).done;){var a=w(t.value,2),s=a[0],u=a[1];r.append(s,u)}}catch(e){o.e(e)}finally{o.f()}for(var c in n)r.append(c,n[c]);return r.toString()},K=function(){function e(t,n){y(this,e),this.viewId=t,this.rendered={},this.mergeDiff(n)}return b(e,null,[{key:"extract",value:function(e){var t=e.r,n=e.e,i=e.t;return delete e.r,delete e.e,delete e.t,{diff:e,title:i,reply:t||null,events:n||[]}}}]),b(e,[{key:"parentViewId",value:function(){return this.viewId}},{key:"toString",value:function(e){return this.recursiveToString(this.rendered,this.rendered.c,e)}},{key:"recursiveToString",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.c,n=arguments.length>2?arguments[2]:void 0,i={buffer:"",components:t,onlyCids:n=n?new Set(n):null};return this.toOutputBuffer(e,i),i.buffer}},{key:"componentCIDs",value:function(e){return Object.keys(e.c||{}).map((function(e){return parseInt(e)}))}},{key:"isComponentOnlyDiff",value:function(e){return!!e.c&&1===Object.keys(e).length}},{key:"getComponent",value:function(e,t){return e.c[t]}},{key:"mergeDiff",value:function(e){var t=e.c;if(delete e.c,this.rendered=this.recursiveMerge(this.rendered,e),this.rendered.c=this.rendered.c||{},t){var n=this.rendered.c;for(var i in t){var r=t[i],o=r,a=o.s;if("number"==typeof a){for(;"number"==typeof a;)a=(o=a>0?t[a]:n[-a]).s;o=U(o),this.doRecursiveMerge(o,r),o.s=a}else o=n[i]||{},o=this.recursiveMerge(o,r);t[i]=o}for(var s in t)n[s]=t[s];e.c=t}}},{key:"recursiveMerge",value:function(e,t){return void 0!==t.s?t:(this.doRecursiveMerge(e,t),e)}},{key:"doRecursiveMerge",value:function(e,t){for(var n in t){var i=t[n],r=e[n];q(i)&&void 0===i.s&&q(r)?this.doRecursiveMerge(r,i):e[n]=i}}},{key:"componentToString",value:function(e){return this.recursiveCIDToString(this.rendered.c,e)}},{key:"pruneCIDs",value:function(e){var t=this;e.forEach((function(e){return delete t.rendered.c[e]}))}},{key:"get",value:function(){return this.rendered}},{key:"isNewFingerprint",value:function(){return!!(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).s}},{key:"toOutputBuffer",value:function(e,t){if(e.d)return this.comprehensionToBuffer(e,t);var n=e.s;t.buffer+=n[0];for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:{};if(y(this,e),this.unloaded=!1,!n||"Object"===n.constructor.name)throw new Error('\n a phoenix Socket must be provided as the second argument to the LiveSocket constructor. For example:\n\n import {Socket} from "phoenix"\n import {LiveSocket} from "phoenix_live_view"\n let liveSocket = new LiveSocket("/live", Socket, {...})\n ');this.socket=new n(t,r),this.bindingPrefix=r.bindingPrefix||N,this.opts=r,this.params=J(r.params||{}),this.viewLogger=r.viewLogger,this.metadataCallbacks=r.metadata||{},this.defaults=Object.assign(U(H),r.defaults||{}),this.activeElement=null,this.prevActive=null,this.silenced=!1,this.main=null,this.linkRef=0,this.roots={},this.href=window.location.href,this.pendingLink=null,this.currentLocation=U(window.location),this.hooks=r.hooks||{},this.loaderTimeout=r.loaderTimeout||1,this.boundTopLevelEvents=!1,this.domCallbacks=r.dom||{onBeforeElUpdated:J()},window.addEventListener("unload",(function(e){i.unloaded=!0})),this.socket.onOpen((function(){i.isUnloaded()&&window.location.reload()}))}return b(e,[{key:"isProfileEnabled",value:function(){return"true"===sessionStorage.getItem("phx:live-socket:profiling")}},{key:"isDebugEnabled",value:function(){return"true"===sessionStorage.getItem("phx:live-socket:debug")}},{key:"enableDebug",value:function(){sessionStorage.setItem("phx:live-socket:debug","true")}},{key:"enableProfiling",value:function(){sessionStorage.setItem("phx:live-socket:profiling","true")}},{key:"disableDebug",value:function(){sessionStorage.removeItem("phx:live-socket:debug")}},{key:"disableProfiling",value:function(){sessionStorage.removeItem("phx:live-socket:profiling")}},{key:"enableLatencySim",value:function(e){this.enableDebug(),console.log("latency simulator enabled for the duration of this browser session. Call disableLatencySim() to disable"),sessionStorage.setItem("phx:live-socket:latency-sim",e)}},{key:"disableLatencySim",value:function(){sessionStorage.removeItem("phx:live-socket:latency-sim")}},{key:"getLatencySim",value:function(){var e=sessionStorage.getItem("phx:live-socket:latency-sim");return e?parseInt(e):null}},{key:"getSocket",value:function(){return this.socket}},{key:"connect",value:function(){var e=this,t=function(){e.joinRootViews()&&(e.bindTopLevelEvents(),e.socket.connect())};["complete","loaded","interactive"].indexOf(document.readyState)>=0?t():document.addEventListener("DOMContentLoaded",(function(){return t()}))}},{key:"disconnect",value:function(e){this.socket.disconnect(e)}},{key:"triggerDOM",value:function(e,t){var n;(n=this.domCallbacks)[e].apply(n,function(e){return function(e){if(Array.isArray(e))return x(e)}(e)||g(e)||S(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t))}},{key:"time",value:function(e,t){if(!this.isProfileEnabled()||!console.time)return t();console.time(e);var n=t();return console.timeEnd(e),n}},{key:"log",value:function(e,t,n){if(this.viewLogger){var i=w(n(),2),r=i[0],o=i[1];this.viewLogger(e,t,r,o)}else if(this.isDebugEnabled()){var a=w(n(),2),s=a[0],u=a[1];B(e,t,s,u)}}},{key:"onChannel",value:function(e,t,n){var i=this;e.on(t,(function(e){var t=i.getLatencySim();t?(console.log("simulating ".concat(t,"ms of latency from server to client")),setTimeout((function(){return n(e)}),t)):n(e)}))}},{key:"wrapPush",value:function(e){var t=this.getLatencySim();if(!t)return e();console.log("simulating ".concat(t,"ms of latency from client to server"));var n={receives:[],receive:function(e,t){this.receives.push([e,t])}};return setTimeout((function(){n.receives.reduce((function(e,t){var n=w(t,2),i=n[0],r=n[1];return e.receive(i,r)}),e())}),t),n}},{key:"reloadWithJitter",value:function(e){var t=this;e.destroy(),this.disconnect();var n=P[0],i=P[1],r=Math.floor(Math.random()*(i-n+1))+n,o=$.updateLocal(e.name(),"consecutive-reloads",0,(function(e){return e+1}));this.log(e,"join",(function(){return["encountered ".concat(o," consecutive reloads")]})),o>10&&(this.log(e,"join",(function(){return["exceeded ".concat(10," consecutive reloads. Entering failsafe mode")]})),r=3e4),setTimeout((function(){t.hasPendingLink()?window.location=t.pendingLink:window.location.reload()}),r)}},{key:"getHookCallbacks",value:function(e){return this.hooks[e]}},{key:"isUnloaded",value:function(){return this.unloaded}},{key:"isConnected",value:function(){return this.socket.isConnected()}},{key:"getBindingPrefix",value:function(){return this.bindingPrefix}},{key:"binding",value:function(e){return"".concat(this.getBindingPrefix()).concat(e)}},{key:"channel",value:function(e,t){return this.socket.channel(e,t)}},{key:"joinRootViews",value:function(){var e=this,t=!1;return G.all(document,"".concat(I,":not([").concat("data-phx-parent-id","])"),(function(n){if(!e.getRootById(n.id)){var i=e.joinRootView(n,e.getHref());e.root=e.root||i,n.getAttribute("data-phx-main")&&(e.main=i)}t=!0})),t}},{key:"redirect",value:function(e,t){this.disconnect(),$.redirect(e,t)}},{key:"replaceMain",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.setPendingLink(e),o=this.main.el;this.main.showLoader(this.loaderTimeout),this.main.destroy(),$.fetchPage(e,(function(a,s){if(200!==a)return n.redirect(e);var u=document.createElement("template");u.innerHTML=s;var c=u.content.childNodes[0];if(!c||!n.isPhxView(c))return n.redirect(e);n.joinRootView(c,e,t,(function(e,t){1===t&&(n.commitPendingLink(r)?(o.replaceWith(e.el),n.main=e,i&&i()):e.destroy())}))}))}},{key:"isPhxView",value:function(e){return e.getAttribute&&null!==e.getAttribute(T)}},{key:"joinRootView",value:function(e,t,n,i){var r=new Z(e,this,null,t,n);return this.roots[r.id]=r,r.join(i),r}},{key:"owner",value:function(e,t){var n=this,i=W(e.closest(I),(function(e){return n.getViewByEl(e)}));i&&t(i)}},{key:"withinOwners",value:function(e,t){var n=this;this.owner(e,(function(i){var r=e.getAttribute(n.binding("target"));null===r?t(i,e):i.withinTargets(r,t)}))}},{key:"getViewByEl",value:function(e){var t=e.getAttribute("data-phx-root-id");return W(this.getRootById(t),(function(t){return t.getDescendentByEl(e)}))}},{key:"getRootById",value:function(e){return this.roots[e]}},{key:"destroyAllViews",value:function(){for(var e in this.roots)this.roots[e].destroy(),delete this.roots[e]}},{key:"destroyViewByEl",value:function(e){var t=this.getRootById(e.getAttribute("data-phx-root-id"));t&&t.destroyDescendent(e.id)}},{key:"setActiveElement",value:function(e){var t=this;if(this.activeElement!==e){this.activeElement=e;var n=function(){e===t.activeElement&&(t.activeElement=null),e.removeEventListener("mouseup",t),e.removeEventListener("touchend",t)};e.addEventListener("mouseup",n),e.addEventListener("touchend",n)}}},{key:"getActiveElement",value:function(){return document.activeElement===document.body?this.activeElement||document.activeElement:document.activeElement||document.body}},{key:"dropActiveElement",value:function(e){this.prevActive&&e.ownsElement(this.prevActive)&&(this.prevActive=null)}},{key:"restorePreviouslyActiveFocus",value:function(){this.prevActive&&this.prevActive!==document.body&&this.prevActive.focus()}},{key:"blurActiveElement",value:function(){this.prevActive=this.getActiveElement(),this.prevActive!==document.body&&this.prevActive.blur()}},{key:"bindTopLevelEvents",value:function(){var e=this;this.boundTopLevelEvents||(this.boundTopLevelEvents=!0,window.addEventListener("pageshow",(function(t){t.persisted&&(e.withPageLoading({to:window.location.href,kind:"redirect"}),window.location.reload())})),this.bindClicks(),this.bindNav(),this.bindForms(),this.bind({keyup:"keyup",keydown:"keydown"},(function(t,n,i,r,o,a,s){var u=r.getAttribute(e.binding("key")),c=t.key&&t.key.toLowerCase();u&&u.toLowerCase()!==c||i.pushKey(r,o,n,a,function(e){for(var t=1;t=0},findPhxChildren:function(e,t){return this.all(e,"".concat(I,"[").concat("data-phx-parent-id",'="').concat(t,'"]'))},findParentCIDs:function(e,t){var n=this,i=new Set(t);return t.reduce((function(t,i){var r="[".concat(R,'="').concat(i,'"] [').concat(R,"]");return n.all(e,r).map((function(e){return parseInt(e.getAttribute(R))})).forEach((function(e){return t.delete(e)})),t}),i)},private:function(e,t){return e.phxPrivate&&e.phxPrivate[t]},deletePrivate:function(e,t){e.phxPrivate&&delete e.phxPrivate[t]},putPrivate:function(e,t,n){e.phxPrivate||(e.phxPrivate={}),e.phxPrivate[t]=n},copyPrivates:function(e,t){t.phxPrivate&&(e.phxPrivate=U(t.phxPrivate))},putTitle:function(e){var t=document.querySelector("title").dataset,n=t.prefix,i=t.suffix;document.title="".concat(n||"").concat(e).concat(i||"")},debounce:function(e,t,n,i,r,o,a){var s=this,u=e.getAttribute(n),c=e.getAttribute(r);""===u&&(u=i),""===c&&(c=o);var l=u||c;switch(l){case null:return a();case"blur":return void(this.once(e,"debounce-blur")&&e.addEventListener("blur",(function(){return a()})));default:var h=parseInt(l),d=this.incCycle(e,"debounce-trigger",(function(){return c?s.deletePrivate(e,"throttled"):a()}));if(isNaN(h))return M("invalid throttle/debounce value: ".concat(l));if(c){var f=!1;if("keydown"===t.type){var v=this.private(e,"debounce-prev-key");this.putPrivate(e,"debounce-prev-key",t.key),f=v!==t.key}if(!f&&this.private(e,"throttled"))return!1;a(),this.putPrivate(e,"throttled",!0),setTimeout((function(){return s.triggerCycle(e,"debounce-trigger")}),h)}else setTimeout((function(){return s.triggerCycle(e,"debounce-trigger",d)}),h);e.form&&this.once(e.form,"bind-debounce")&&e.form.addEventListener("submit",(function(t){Array.from(new FormData(e.form).entries(),(function(t){var n=w(t,2),i=n[0],r=(n[1],e.form.querySelector('[name="'.concat(i,'"]')));s.incCycle(r,"debounce-trigger"),s.deletePrivate(r,"throttled")}))})),this.once(e,"bind-debounce")&&e.addEventListener("blur",(function(t){return s.triggerCycle(e,"debounce-trigger")}))}},triggerCycle:function(e,t,n){var i=w(this.private(e,t),2),r=i[0],o=i[1];n||(n=r),n===r&&(this.incCycle(e,t),o())},once:function(e,t){return!0!==this.private(e,t)&&(this.putPrivate(e,t,!0),!0)},incCycle:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},i=w(this.private(e,t)||[0,n],2),r=i[0];return i[1],r++,this.putPrivate(e,t,[r,n]),r},discardError:function(e,t,n){var i=t.getAttribute&&t.getAttribute(n),r=i&&e.querySelector("#".concat(i));r&&(this.private(r,"phx-has-focused")||this.private(r.form,"phx-has-submitted")||t.classList.add("phx-no-feedback"))},isPhxChild:function(e){return e.getAttribute&&e.getAttribute("data-phx-parent-id")},dispatchEvent:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e.dispatchEvent(i)},cloneNode:function(e,t){if(void 0===t)return e.cloneNode(!0);var n=e.cloneNode(!1);return n.innerHTML=t,n},mergeAttrs:function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=t.attributes,r=i.length-1;r>=0;r--){var o=i[r].name;n.indexOf(o)<0&&e.setAttribute(o,t.getAttribute(o))}for(var a=e.attributes,s=a.length-1;s>=0;s--){var u=a[s].name;t.hasAttribute(u)||e.removeAttribute(u)}},mergeFocusedInput:function(e,t){e instanceof HTMLSelectElement||G.mergeAttrs(e,t,["value"]),t.readOnly?e.setAttribute("readonly",!0):e.removeAttribute("readonly")},restoreFocus:function(e,t,n){if(G.isTextualInput(e)){var i=e.matches(":focus");e.readOnly&&e.blur(),i||e.focus(),(e.setSelectionRange&&"text"===e.type||"textarea"===e.type)&&e.setSelectionRange(t,n)}},isFormInput:function(e){return/^(?:input|select|textarea)$/i.test(e.tagName)&&"button"!==e.type},syncAttrsToProps:function(e){e instanceof HTMLInputElement&&O.indexOf(e.type.toLocaleLowerCase())>=0&&(e.checked=null!==e.getAttribute("checked"))},isTextualInput:function(e){return _.indexOf(e.type)>=0},isNowTriggerFormExternal:function(e,t){return e.getAttribute&&null!==e.getAttribute(t)},syncPendingRef:function(e,t,n){var i=e.getAttribute(j);return null===i||(G.isFormInput(e)||null!==e.getAttribute(n)?(G.putPrivate(e,j,t),!1):(L.forEach((function(n){e.classList.contains(n)&&t.classList.add(n)})),t.setAttribute(j,i),!0))},cleanChildNodes:function(e,t){if(G.isPhxUpdate(e,t,["append","prepend"])){var n=[];e.childNodes.forEach((function(e){e.id||(e.nodeType===Node.TEXT_NODE&&""===e.nodeValue.trim()||M("only HTML element tags with an id are allowed inside containers with phx-update.\n\n"+'removing illegal node: "'.concat((e.outerHTML||e.nodeValue).trim(),'"\n\n')),n.push(e))})),n.forEach((function(e){return e.remove()}))}}},Y=function(){function e(t,n,i){y(this,e);var r=Array.from(n.children).map((function(e){return e.id})),o=[],a=[];t.childNodes.forEach((function(e){e.id&&(o.push(e.id),r.indexOf(e.id)>=0&&a.push([e.id,e.previousElementSibling&&e.previousElementSibling.id]))})),this.containerID=n.id,this.updateType=i,this.modifiedIds=a,this.newIds=r.filter((function(e){return o.indexOf(e)<0}))}return b(e,[{key:"perform",value:function(){var e=G.byId(this.containerID);this.modifiedIds.forEach((function(t){var n=w(t,2),i=n[0],r=n[1];r?W(document.getElementById(r),(function(e){W(document.getElementById(i),(function(t){t.previousElementSibling&&t.previousElementSibling.id==e.id||e.insertAdjacentElement("afterend",t)}))})):W(document.getElementById(i),(function(t){null==t.previousElementSibling||e.insertAdjacentElement("afterbegin",t)}))})),"prepend"==this.updateType&&this.newIds.reverse().forEach((function(t){W(document.getElementById(t),(function(t){return e.insertAdjacentElement("afterbegin",t)}))}))}}]),e}(),Q=function(){function e(t,n,i,r,o){y(this,e),this.view=t,this.liveSocket=t.liveSocket,this.container=n,this.id=i,this.rootID=t.root.id,this.html=r,this.targetCID=o,this.cidPatch="number"==typeof this.targetCID,this.callbacks={beforeadded:[],beforeupdated:[],beforediscarded:[],beforephxChildAdded:[],afteradded:[],afterupdated:[],afterdiscarded:[],afterphxChildAdded:[]}}return b(e,null,[{key:"patchEl",value:function(e,t){f(e,t,{childrenOnly:!1})}}]),b(e,[{key:"before",value:function(e,t){this.callbacks["before".concat(e)].push(t)}},{key:"after",value:function(e,t){this.callbacks["after".concat(e)].push(t)}},{key:"trackBefore",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i1?t-1:0),i=1;i *, [phx-update=prepend] > *",(function(e){e.setAttribute("data-phx-remove","")}))}},{key:"perform",value:function(){var e=this,t=this.view,n=this.liveSocket,i=this.container,r=this.html,o=this.isCIDPatch()?this.targetCIDContainer():i;if(!this.isCIDPatch()||o){var a=n.getActiveElement(),s=a&&G.isTextualInput(a)?a:{},u=s.selectionStart,c=s.selectionEnd,l=n.binding("update"),h=n.binding("feedback-for"),d=n.binding("disable-with"),v=n.binding("trigger-action"),p=[],m=[],g=[],y=n.time("premorph container prep",(function(){return e.buildDiffHTML(i,r,l,o)}));return this.trackBefore("added",i),this.trackBefore("updated",i,i),n.time("morphdom",(function(){f(o,y,{childrenOnly:null===o.getAttribute(R),onBeforeNodeAdded:function(t){return G.discardError(o,t,h),e.trackBefore("added",t),t},onNodeAdded:function(n){G.isNowTriggerFormExternal(n,v)&&n.submit(),G.isPhxChild(n)&&t.ownsElement(n)&&e.trackAfter("phxChildAdded",n),p.push(n)},onNodeDiscarded:function(t){G.isPhxChild(t)&&n.destroyViewByEl(t),e.trackAfter("discarded",t)},onBeforeNodeDiscarded:function(t){return!((!t.getAttribute||null===t.getAttribute("data-phx-remove"))&&(null!==t.parentNode&&G.isPhxUpdate(t.parentNode,l,["append","prepend"])&&t.id||e.skipCIDSibling(t)||(e.trackBefore("discarded",t),0)))},onElUpdated:function(e){G.isNowTriggerFormExternal(e,v)&&e.submit(),m.push(e)},onBeforeElUpdated:function(t,n){if(G.cleanChildNodes(n,l),e.skipCIDSibling(n))return!1;if("ignore"===t.getAttribute(l))return e.trackBefore("updated",t,n),G.mergeAttrs(t,n),m.push(t),!1;if("number"===t.type&&t.validity&&t.validity.badInput)return!1;if(!G.syncPendingRef(t,n,d))return!1;if(G.isPhxChild(n)){var i=t.getAttribute(D);return G.mergeAttrs(t,n),t.setAttribute(D,i),t.setAttribute("data-phx-root-id",e.rootID),!1}return G.copyPrivates(n,t),G.discardError(o,n,h),a&&t.isSameNode(a)&&G.isFormInput(t)&&!e.forceFocusedSelectUpdate(t,n)?(e.trackBefore("updated",t,n),G.mergeFocusedInput(t,n),G.syncAttrsToProps(t),m.push(t),!1):(G.isPhxUpdate(n,l,["append","prepend"])&&g.push(new Y(t,n,n.getAttribute(l))),G.syncAttrsToProps(n),e.trackBefore("updated",t,n),!0)}})})),n.isDebugEnabled()&&function(){for(var e=new Set,t=document.querySelectorAll("*[id]"),n=0,i=t.length;n0&&n.time("post-morph append/prepend restoration",(function(){g.forEach((function(e){return e.perform()}))})),n.silenceEvents((function(){return G.restoreFocus(a,u,c)})),G.dispatchEvent(document,"phx:update"),p.forEach((function(t){return e.trackAfter("added",t)})),m.forEach((function(t){return e.trackAfter("updated",t)})),!0}}},{key:"forceFocusedSelectUpdate",value:function(e,t){return!0===e.multiple||e.innerHTML!=t.innerHTML}},{key:"isCIDPatch",value:function(){return this.cidPatch}},{key:"skipCIDSibling",value:function(e){return e.nodeType===Node.ELEMENT_NODE&&null!==e.getAttribute("data-phx-skip")}},{key:"targetCIDContainer",value:function(){if(this.isCIDPatch()){var e=v(G.findComponentNodeList(this.container,this.targetCID)),t=e[0];return 0===e.slice(1).length?t:t&&t.parentNode}}},{key:"buildDiffHTML",value:function(e,t,n,i){var r=this,o=this.isCIDPatch(),a=o&&i.getAttribute(R)===this.targetCID.toString();if(!o||a)return t;var s=null,u=document.createElement("template");s=G.cloneNode(i);var c=v(G.findComponentNodeList(s,this.targetCID)),l=c[0],h=c.slice(1);return u.innerHTML=t,h.forEach((function(e){return e.remove()})),Array.from(s.childNodes).forEach((function(e){e.id&&e.nodeType===Node.ELEMENT_NODE&&e.getAttribute(R)!==r.targetCID.toString()&&(e.setAttribute("data-phx-skip",""),e.innerHTML="")})),Array.from(u.content.childNodes).forEach((function(e){return s.insertBefore(e,l)})),l.remove(),s.outerHTML}}]),e}(),Z=function(){function e(t,n,i,r,o){var a=this;y(this,e),this.liveSocket=n,this.flash=o,this.parent=i,this.root=i?i.root:this,this.el=t,this.id=this.el.id,this.view=this.el.getAttribute(T),this.ref=0,this.childJoins=0,this.loaderTimer=null,this.pendingDiffs=[],this.href=r,this.joinCount=this.parent?this.parent.joinCount-1:0,this.joinPending=!0,this.destroyed=!1,this.joinCallback=function(){},this.stopCallback=function(){},this.pendingJoinOps=this.parent?null:[],this.viewHooks={},this.children=this.parent?null:{},this.root.children[this.id]={},this.channel=this.liveSocket.channel("lv:".concat(this.id),(function(){return{url:a.href,params:a.connectParams(),session:a.getSession(),static:a.getStatic(),flash:a.flash}})),this.showLoader(this.liveSocket.loaderTimeout),this.bindChannel()}return b(e,[{key:"isMain",value:function(){return this.liveSocket.main===this}},{key:"connectParams",value:function(){var e=this.liveSocket.params(this.view),t=G.all(document,"[".concat(this.binding("track-static"),"]")).map((function(e){return e.src||e.href})).filter((function(e){return"string"==typeof e}));return t.length>0&&(e._track_static=t),e._mounts=this.joinCount,e}},{key:"name",value:function(){return this.view}},{key:"isConnected",value:function(){return this.channel.canPush()}},{key:"getSession",value:function(){return this.el.getAttribute("data-phx-session")}},{key:"getStatic",value:function(){var e=this.el.getAttribute(D);return""===e?null:e}},{key:"destroy",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};this.destroyAllChildren(),this.destroyed=!0,delete this.root.children[this.id],this.parent&&delete this.root.children[this.parent.id][this.id],clearTimeout(this.loaderTimer);var n=function(){for(var n in t(),e.viewHooks)e.viewHooks[n].__trigger__("beforeDestroy"),e.destroyHook(e.viewHooks[n])};this.log("destroyed",(function(){return["the child has been removed from the parent"]})),this.channel.leave().receive("ok",n).receive("error",n).receive("timeout",n)}},{key:"setContainerClasses",value:function(){var e;this.el.classList.remove("phx-connected","phx-disconnected","phx-error"),(e=this.el.classList).add.apply(e,arguments)}},{key:"isLoading",value:function(){return this.el.classList.contains("phx-disconnected")}},{key:"showLoader",value:function(e){var t=this;if(clearTimeout(this.loaderTimer),e)this.loaderTimer=setTimeout((function(){return t.showLoader()}),e);else{for(var n in this.viewHooks)this.viewHooks[n].__trigger__("disconnected");this.setContainerClasses("phx-disconnected")}}},{key:"hideLoader",value:function(){clearTimeout(this.loaderTimer),this.setContainerClasses("phx-connected")}},{key:"triggerReconnected",value:function(){for(var e in this.viewHooks)this.viewHooks[e].__trigger__("reconnected")}},{key:"log",value:function(e,t){this.liveSocket.log(this,e,t)}},{key:"withinTargets",value:function(e,t){var n=this;if(/^(0|[1-9]\d*)$/.test(e)){var i=G.findComponentNodeList(this.el,e);0===i.length?M("no component found matching phx-target of ".concat(e)):t(this,i[0])}else{var r=Array.from(document.querySelectorAll(e));0===r.length&&M('nothing found matching the phx-target selector "'.concat(e,'"')),r.forEach((function(e){return n.liveSocket.owner(e,(function(n){return t(n,e)}))}))}}},{key:"applyDiff",value:function(e,t,n){this.log(e,(function(){return["",U(t)]}));var i=K.extract(t),r=i.diff,o=i.reply,a=i.events,s=i.title;return s&&G.putTitle(s),n({diff:r,reply:o,events:a}),o}},{key:"onJoin",value:function(e){var t=this,n=e.rendered;this.joinCount++,this.childJoins=0,this.joinPending=!0,this.flash=null,$.dropLocal(this.name(),"consecutive-reloads"),this.applyDiff("mount",n,(function(n){var i=n.diff,r=n.events;t.rendered=new K(t.id,i);var o=t.renderContainer(null,"join");t.dropPendingRefs();var a=t.formsForRecovery(o);t.joinCount>1&&a.length>0?a.forEach((function(e,n){t.pushFormRecovery(e,(function(e){n===a.length-1&&t.onJoinComplete(e,o,r)}))})):t.onJoinComplete(e,o,r)}))}},{key:"dropPendingRefs",value:function(){G.all(this.el,"[".concat(j,"]"),(function(e){return e.removeAttribute(j)}))}},{key:"onJoinComplete",value:function(e,t,n){var i=this,r=e.live_patch;if(this.joinCount>1||this.parent&&!this.parent.isJoinPending())return this.applyJoinPatch(r,t,n);0===G.findPhxChildrenInFragment(t,this.id).filter((function(e){var t=e.id&&i.el.querySelector("#".concat(e.id)),n=t&&t.getAttribute(D);return n&&e.setAttribute(D,n),i.joinChild(e)})).length?this.parent?(this.root.pendingJoinOps.push([this,function(){return i.applyJoinPatch(r,t,n)}]),this.parent.ackJoin(this)):(this.onAllChildJoinsComplete(),this.applyJoinPatch(r,t,n)):this.root.pendingJoinOps.push([this,function(){return i.applyJoinPatch(r,t,n)}])}},{key:"attachTrueDocEl",value:function(){this.el=G.byId(this.id),this.el.setAttribute("data-phx-root-id",this.root.id)}},{key:"dispatchEvents",value:function(e){e.forEach((function(e){var t=w(e,2),n=t[0],i=t[1];window.dispatchEvent(new CustomEvent("phx:hook:".concat(n),{detail:i}))}))}},{key:"applyJoinPatch",value:function(e,t,n){var i=this;this.attachTrueDocEl();var r=new Q(this,this.el,this.id,t,null);if(r.markPrunableContentForRemoval(),this.performPatch(r,!1),this.joinNewChildren(),G.all(this.el,"[".concat(this.binding("hook"),"]"),(function(e){var t=i.addHook(e);t&&t.__trigger__("mounted")})),this.joinPending=!1,this.dispatchEvents(n),this.applyPendingUpdates(),e){var o=e.kind,a=e.to;this.liveSocket.historyPatch(a,o)}this.hideLoader(),this.joinCount>1&&this.triggerReconnected(),this.stopCallback()}},{key:"triggerBeforeUpdateHook",value:function(e,t){this.liveSocket.triggerDOM("onBeforeElUpdated",[e,t]);var n=this.getHook(e),i=n&&"ignore"===e.getAttribute(this.binding("update"));if(n&&!e.isEqualNode(t)&&(!i||!function(e,t){return JSON.stringify(e)===JSON.stringify(t)}(e.dataset,t.dataset)))return n.__trigger__("beforeUpdate"),n}},{key:"triggerUpdatedHook",value:function(e){e.__trigger__("updated")}},{key:"performPatch",value:function(e,t){var n=this,i=[],r=!1,o=new Set;return e.after("added",(function(e){var t=n.addHook(e);t&&t.__trigger__("mounted")})),e.after("phxChildAdded",(function(e){return r=!0})),e.before("updated",(function(e,t){n.triggerBeforeUpdateHook(e,t)&&o.add(e.id)})),e.after("updated",(function(e){o.has(e.id)&&n.triggerUpdatedHook(n.getHook(e))})),e.before("discarded",(function(e){var t=n.getHook(e);t&&t.__trigger__("beforeDestroy")})),e.after("discarded",(function(e){var t=n.componentID(e);"number"==typeof t&&-1===i.indexOf(t)&&i.push(t);var r=n.getHook(e);r&&n.destroyHook(r)})),e.perform(),t&&this.maybePushComponentsDestroyed(i),r}},{key:"joinNewChildren",value:function(){var e=this;G.findPhxChildren(this.el,this.id).forEach((function(t){return e.joinChild(t)}))}},{key:"getChildById",value:function(e){return this.root.children[this.id][e]}},{key:"getDescendentByEl",value:function(e){return e.id===this.id?this:this.children[e.getAttribute("data-phx-parent-id")][e.id]}},{key:"destroyDescendent",value:function(e){for(var t in this.root.children)for(var n in this.root.children[t])if(n===e)return this.root.children[t][n].destroy()}},{key:"joinChild",value:function(t){if(!this.getChildById(t.id)){var n=new e(t,this.liveSocket,this);return this.root.children[this.id][n.id]=n,n.join(),this.childJoins++,!0}}},{key:"isJoinPending",value:function(){return this.joinPending}},{key:"ackJoin",value:function(e){this.childJoins--,0===this.childJoins&&(this.parent?this.parent.ackJoin(this):this.onAllChildJoinsComplete())}},{key:"onAllChildJoinsComplete",value:function(){this.joinCallback(),this.pendingJoinOps.forEach((function(e){var t=w(e,2),n=t[0],i=t[1];n.isDestroyed()||i()})),this.pendingJoinOps=[]}},{key:"update",value:function(e,t){var n=this;if(this.isJoinPending()||this.liveSocket.hasPendingLink())return this.pendingDiffs.push({diff:e,events:t});this.rendered.mergeDiff(e);var i=!1;this.rendered.isComponentOnlyDiff(e)?this.liveSocket.time("component patch complete",(function(){G.findParentCIDs(n.el,n.rendered.componentCIDs(e)).forEach((function(t){n.componentPatch(n.rendered.getComponent(e,t),t)&&(i=!0)}))})):V(e)||this.liveSocket.time("full patch complete",(function(){var t=n.renderContainer(e,"update"),r=new Q(n,n.el,n.id,t,null);i=n.performPatch(r,!0)})),this.dispatchEvents(t),i&&this.joinNewChildren()}},{key:"renderContainer",value:function(e,t){var n=this;return this.liveSocket.time("toString diff (".concat(t,")"),(function(){var t=n.el.tagName,i=e?n.rendered.componentCIDs(e):null,r=n.rendered.toString(i);return"<".concat(t,">").concat(r,"").concat(t,">")}))}},{key:"componentPatch",value:function(e,t){if(V(e))return!1;var n=this.rendered.componentToString(t),i=new Q(this,this.el,this.id,n,t);return this.performPatch(i,!0)}},{key:"getHook",value:function(e){return this.viewHooks[te.elementID(e)]}},{key:"addHook",value:function(e){if(!te.elementID(e)&&e.getAttribute){var t=e.getAttribute(this.binding("hook"));if(!t||this.ownsElement(e)){var n=this.liveSocket.getHookCallbacks(t);if(n){e.id||M('no DOM ID for hook "'.concat(t,'". Hooks require a unique ID on each element.'),e);var i=new te(this,e,n);return this.viewHooks[te.elementID(i.el)]=i,i}null!==t&&M('unknown hook found for "'.concat(t,'"'),e)}}}},{key:"destroyHook",value:function(e){e.__trigger__("destroyed"),e.__cleanup__(),delete this.viewHooks[te.elementID(e.el)]}},{key:"applyPendingUpdates",value:function(){var e=this;this.pendingDiffs.forEach((function(t){var n=t.diff,i=t.events;return e.update(n,i)})),this.pendingDiffs=[]}},{key:"onChannel",value:function(e,t){var n=this;this.liveSocket.onChannel(this.channel,e,(function(e){n.isJoinPending()?n.root.pendingJoinOps.push([n,function(){return t(e)}]):t(e)}))}},{key:"bindChannel",value:function(){var e=this;this.liveSocket.onChannel(this.channel,"diff",(function(t){e.applyDiff("update",t,(function(t){var n=t.diff,i=t.events;return e.update(n,i)}))})),this.onChannel("redirect",(function(t){var n=t.to,i=t.flash;return e.onRedirect({to:n,flash:i})})),this.onChannel("live_patch",(function(t){return e.onLivePatch(t)})),this.onChannel("live_redirect",(function(t){return e.onLiveRedirect(t)})),this.channel.onError((function(t){return e.onError(t)})),this.channel.onClose((function(){return e.onClose()}))}},{key:"destroyAllChildren",value:function(){for(var e in this.root.children[this.id])this.getChildById(e).destroy()}},{key:"onLiveRedirect",value:function(e){var t=e.to,n=e.kind,i=e.flash,r=this.expandURL(t);this.liveSocket.historyRedirect(r,n,i)}},{key:"onLivePatch",value:function(e){var t=e.to,n=e.kind;this.href=this.expandURL(t),this.liveSocket.historyPatch(t,n)}},{key:"expandURL",value:function(e){return e.startsWith("/")?"".concat(window.location.protocol,"//").concat(window.location.host).concat(e):e}},{key:"onRedirect",value:function(e){var t=e.to,n=e.flash;this.liveSocket.redirect(t,n)}},{key:"isDestroyed",value:function(){return this.destroyed}},{key:"join",value:function(e){var t=this;this.parent||(this.stopCallback=this.liveSocket.withPageLoading({to:this.href,kind:"initial"})),this.joinCallback=function(){return e&&e(t,t.joinCount)},this.liveSocket.wrapPush((function(){return t.channel.join().receive("ok",(function(e){return t.onJoin(e)})).receive("error",(function(e){return t.onJoinError(e)})).receive("timeout",(function(){return t.onJoinError({reason:"timeout"})}))}))}},{key:"onJoinError",value:function(e){return(e.redirect||e.live_redirect)&&(this.joinPending=!1,this.channel.leave()),e.redirect?this.onRedirect(e.redirect):e.live_redirect?this.onLiveRedirect(e.live_redirect):(this.log("error",(function(){return["unable to join",e]})),this.liveSocket.reloadWithJitter(this))}},{key:"onClose",value:function(){if(!this.isDestroyed()){if(this.isJoinPending()||this.liveSocket.hasPendingLink())return this.liveSocket.reloadWithJitter(this);this.destroyAllChildren(),this.liveSocket.dropActiveElement(this),document.activeElement&&document.activeElement.blur(),this.liveSocket.isUnloaded()&&this.showLoader(200)}}},{key:"onError",value:function(e){this.onClose(),this.log("error",(function(){return["view crashed",e]})),this.liveSocket.isUnloaded()||this.displayError()}},{key:"displayError",value:function(){this.isMain()&&G.dispatchEvent(window,"phx:page-loading-start",{to:this.href,kind:"error"}),this.showLoader(),this.setContainerClasses("phx-disconnected","phx-error")}},{key:"pushWithReply",value:function(e,t,n){var i=this,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},o=w(e?e():[null,[]],2),a=o[0],s=w(o[1],1)[0],u=function(){};return s&&null!==s.getAttribute(this.binding("page-loading"))&&(u=this.liveSocket.withPageLoading({kind:"element",target:s})),"number"!=typeof n.cid&&delete n.cid,this.liveSocket.wrapPush((function(){return i.channel.push(t,n,3e4).receive("ok",(function(e){var t=null;null!==a&&i.undoRefs(a),e.diff&&(t=i.applyDiff("update",e.diff,(function(e){var t=e.diff,n=e.events;i.update(t,n)}))),e.redirect&&i.onRedirect(e.redirect),e.live_patch&&i.onLivePatch(e.live_patch),e.live_redirect&&i.onLiveRedirect(e.live_redirect),u(),r(e,t)}))}))}},{key:"undoRefs",value:function(e){var t=this;G.all(this.el,"[".concat(j,'="').concat(e,'"]'),(function(e){e.removeAttribute(j),null!==e.getAttribute("data-phx-readonly")&&(e.readOnly=!1,e.removeAttribute("data-phx-readonly")),null!==e.getAttribute("data-phx-disabled")&&(e.disabled=!1,e.removeAttribute("data-phx-disabled")),L.forEach((function(t){return G.removeClass(e,t)}));var n=e.getAttribute("data-phx-disable-with-restore");null!==n&&(e.innerText=n,e.removeAttribute("data-phx-disable-with-restore"));var i=G.private(e,j);if(i){var r=t.triggerBeforeUpdateHook(e,i);Q.patchEl(e,i),r&&t.triggerUpdatedHook(r),G.deletePrivate(e,j)}}))}},{key:"putRef",value:function(e,t){var n=this.ref++,i=this.binding("disable-with");return e.forEach((function(e){e.classList.add("phx-".concat(t,"-loading")),e.setAttribute(j,n);var r=e.getAttribute(i);null!==r&&(e.getAttribute("data-phx-disable-with-restore")||e.setAttribute("data-phx-disable-with-restore",e.innerText),e.innerText=r)})),[n,e]}},{key:"componentID",value:function(e){var t=e.getAttribute&&e.getAttribute(R);return t?parseInt(t):null}},{key:"targetComponentID",value:function(e,t){return e.getAttribute(this.binding("target"))?this.closestComponentID(t):null}},{key:"closestComponentID",value:function(e){var t=this;return e?W(e.closest("[".concat(R,"]")),(function(e){return t.ownsElement(e)&&t.componentID(e)})):null}},{key:"pushHookEvent",value:function(e,t,n,i){var r=w(this.putRef([],"hook"),2),o=r[0],a=r[1];return this.pushWithReply((function(){return[o,a]}),"event",{type:"hook",event:t,value:n,cid:this.closestComponentID(e)},(function(e,t){return i(t,o)})),o}},{key:"extractMeta",value:function(e,t){for(var n=this.binding("value-"),i=0;i=0&&!e.checked&&delete t.value),t}},{key:"pushEvent",value:function(e,t,n,i,r){var o=this;this.pushWithReply((function(){return o.putRef([t],e)}),"event",{type:e,event:i,value:this.extractMeta(t,r),cid:this.targetComponentID(t,n)})}},{key:"pushKey",value:function(e,t,n,i,r){var o=this;this.pushWithReply((function(){return o.putRef([e],n)}),"event",{type:n,event:i,value:this.extractMeta(e,r),cid:this.targetComponentID(e,t)})}},{key:"pushInput",value:function(e,t,n,i,r){var o=this;this.pushWithReply((function(){return o.putRef([e,e.form],"change")}),"event",{type:"form",event:n,value:z(e.form,{_target:i.name}),cid:this.targetComponentID(e.form,t)},r)}},{key:"pushFormSubmit",value:function(e,t,n,i){var r=this,o=function(e){return!F(e,"".concat(r.binding("update"),"=ignore"),e.form)};this.pushWithReply((function(){var t=G.all(e,"[".concat(r.binding("disable-with"),"]")),n=G.all(e,"button").filter(o),i=G.all(e,"input,textarea,select").filter(o);return n.forEach((function(e){e.setAttribute("data-phx-disabled",e.disabled),e.disabled=!0})),i.forEach((function(e){e.setAttribute("data-phx-readonly",e.readOnly),e.readOnly=!0})),e.setAttribute(r.binding("page-loading"),""),r.putRef([e].concat(t).concat(n).concat(i),"submit")}),"event",{type:"form",event:n,value:z(e),cid:this.targetComponentID(e,t)},i)}},{key:"pushFormRecovery",value:function(e,t){var n=this;this.liveSocket.withinOwners(e,(function(i,r){var o=e.elements[0],a=e.getAttribute(n.binding("auto-recover"))||e.getAttribute(n.binding("change"));i.pushInput(o,r,a,o,t)}))}},{key:"pushLinkPatch",value:function(e,t,n){var i=this,r=this.liveSocket.setPendingLink(e),o=t?function(){return i.putRef([t],"click")}:null;this.pushWithReply(o,"link",{url:e},(function(t){t.link_redirect?i.liveSocket.replaceMain(e,null,n,r):i.liveSocket.commitPendingLink(r)&&(i.href=e,i.applyPendingUpdates(),n&&n())})).receive("timeout",(function(){return i.liveSocket.redirect(window.location.href)}))}},{key:"formsForRecovery",value:function(e){var t=this,n=this.binding("change"),i=document.createElement("template");return i.innerHTML=e,G.all(this.el,"form[".concat(n,"]")).filter((function(e){return t.ownsElement(e)})).filter((function(e){return"ignore"!==e.getAttribute(t.binding("auto-recover"))})).filter((function(e){return i.content.querySelector("form[".concat(n,'="').concat(e.getAttribute(n),'"]'))}))}},{key:"maybePushComponentsDestroyed",value:function(e){var t=this,n=e.filter((function(e){return 0===G.findComponentNodeList(t.el,e).length}));n.length>0&&this.pushWithReply(null,"cids_destroyed",{cids:n},(function(){t.rendered.pruneCIDs(n)}))}},{key:"ownsElement",value:function(e){return e.getAttribute("data-phx-parent-id")===this.id||W(e.closest(I),(function(e){return e.id}))===this.id}},{key:"submitForm",value:function(e,t,n){var i=this;G.putPrivate(e,"phx-has-submitted",!0),this.liveSocket.blurActiveElement(this),this.pushFormSubmit(e,t,n,(function(){i.liveSocket.restorePreviouslyActiveFocus()}))}},{key:"binding",value:function(e){return this.liveSocket.binding(e)}}]),e}(),ee=1,te=function(){function e(t,n,i){for(var r in y(this,e),this.__view=t,this.__liveSocket=t.liveSocket,this.__callbacks=i,this.__listeners=new Set,this.el=n,this.viewName=t.name(),this.el.phxHookId=this.constructor.makeID(),this.__callbacks)this[r]=this.__callbacks[r]}return b(e,null,[{key:"makeID",value:function(){return ee++}},{key:"elementID",value:function(e){return e.phxHookId}}]),b(e,[{key:"pushEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};return this.__view.pushHookEvent(null,e,t,n)}},{key:"pushEventTo",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){};return this.__view.withinTargets(e,(function(e,r){return e.pushHookEvent(r,t,n,i)}))}},{key:"handleEvent",value:function(e,t){var n=function(n,i){return i?e:t(n.detail)};return window.addEventListener("phx:hook:".concat(e),n),this.__listeners.add(n),n}},{key:"removeHandleEvent",value:function(e){var t=e(null,!0);window.removeEventListener("phx:hook:".concat(t),e),this.__listeners.delete(e)}},{key:"__cleanup__",value:function(){var e=this;this.__listeners.forEach((function(t){return e.removeHandleEvent(t)}))}},{key:"__trigger__",value:function(e){var t=this.__callbacks[e];t&&t.call(this)}}]),e}();t.default=X},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){(function(t){t.Phoenix||(t.Phoenix={}),e.exports=t.Phoenix.LiveView=n(0)}).call(this,n(1))}])},80:()=>{}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";n(80),n(458);var e=n(902),t=n(789),i=n.n(t),r=document.querySelector("meta[name='csrf-token']").getAttribute("content"),o=new(i())("/live",e.Socket,{params:{_csrf_token:r}});o.connect(),window.liveSocket=o})()})();
--------------------------------------------------------------------------------
/priv/static/js/app.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/js/app.js.gz
--------------------------------------------------------------------------------
/priv/static/robots-067185ba27a5d9139b10a759679045bf.txt:
--------------------------------------------------------------------------------
1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
2 | #
3 | # To ban all spiders from the entire site uncomment the next two lines:
4 | # User-agent: *
5 | # Disallow: /
6 |
--------------------------------------------------------------------------------
/priv/static/robots-067185ba27a5d9139b10a759679045bf.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/robots-067185ba27a5d9139b10a759679045bf.txt.gz
--------------------------------------------------------------------------------
/priv/static/robots.txt:
--------------------------------------------------------------------------------
1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
2 | #
3 | # To ban all spiders from the entire site uncomment the next two lines:
4 | # User-agent: *
5 | # Disallow: /
6 |
--------------------------------------------------------------------------------
/priv/static/robots.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bontaq/textdb/33cc48a04db1393bc93b32ff5015c3a4e0892511/priv/static/robots.txt.gz
--------------------------------------------------------------------------------
/priv/static/site-053100cb84a50d2ae7f5492f7dd7f25e.webmanifest:
--------------------------------------------------------------------------------
1 | {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
--------------------------------------------------------------------------------
/priv/static/site.webmanifest:
--------------------------------------------------------------------------------
1 | {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
--------------------------------------------------------------------------------
/test/support/channel_case.ex:
--------------------------------------------------------------------------------
1 | defmodule TextdbWeb.ChannelCase do
2 | @moduledoc """
3 | This module defines the test case to be used by
4 | channel tests.
5 |
6 | Such tests rely on `Phoenix.ChannelTest` and also
7 | import other functionality to make it easier
8 | to build common data structures and query the data layer.
9 |
10 | Finally, if the test case interacts with the database,
11 | we enable the SQL sandbox, so changes done to the database
12 | are reverted at the end of every test. If you are using
13 | PostgreSQL, you can even run database tests asynchronously
14 | by setting `use TextdbWeb.ChannelCase, async: true`, although
15 | this option is not recommended for other databases.
16 | """
17 |
18 | use ExUnit.CaseTemplate
19 |
20 | using do
21 | quote do
22 | # Import conveniences for testing with channels
23 | import Phoenix.ChannelTest
24 | import TextdbWeb.ChannelCase
25 |
26 | # The default endpoint for testing
27 | @endpoint TextdbWeb.Endpoint
28 | end
29 | end
30 |
31 | setup tags do
32 | :ok = Ecto.Adapters.SQL.Sandbox.checkout(Textdb.Repo)
33 |
34 | unless tags[:async] do
35 | Ecto.Adapters.SQL.Sandbox.mode(Textdb.Repo, {:shared, self()})
36 | end
37 |
38 | :ok
39 | end
40 | end
41 |
--------------------------------------------------------------------------------
/test/support/conn_case.ex:
--------------------------------------------------------------------------------
1 | defmodule TextdbWeb.ConnCase do
2 | @moduledoc """
3 | This module defines the test case to be used by
4 | tests that require setting up a connection.
5 |
6 | Such tests rely on `Phoenix.ConnTest` and also
7 | import other functionality to make it easier
8 | to build common data structures and query the data layer.
9 |
10 | Finally, if the test case interacts with the database,
11 | we enable the SQL sandbox, so changes done to the database
12 | are reverted at the end of every test. If you are using
13 | PostgreSQL, you can even run database tests asynchronously
14 | by setting `use TextdbWeb.ConnCase, async: true`, although
15 | this option is not recommended for other databases.
16 | """
17 |
18 | use ExUnit.CaseTemplate
19 |
20 | using do
21 | quote do
22 | # Import conveniences for testing with connections
23 | import Plug.Conn
24 | import Phoenix.ConnTest
25 | import TextdbWeb.ConnCase
26 |
27 | alias TextdbWeb.Router.Helpers, as: Routes
28 |
29 | # The default endpoint for testing
30 | @endpoint TextdbWeb.Endpoint
31 | end
32 | end
33 |
34 | setup tags do
35 | :ok = Ecto.Adapters.SQL.Sandbox.checkout(Textdb.Repo)
36 |
37 | unless tags[:async] do
38 | Ecto.Adapters.SQL.Sandbox.mode(Textdb.Repo, {:shared, self()})
39 | end
40 |
41 | {:ok, conn: Phoenix.ConnTest.build_conn()}
42 | end
43 | end
44 |
--------------------------------------------------------------------------------
/test/support/data_case.ex:
--------------------------------------------------------------------------------
1 | defmodule Textdb.DataCase do
2 | @moduledoc """
3 | This module defines the setup for tests requiring
4 | access to the application's data layer.
5 |
6 | You may define functions here to be used as helpers in
7 | your tests.
8 |
9 | Finally, if the test case interacts with the database,
10 | we enable the SQL sandbox, so changes done to the database
11 | are reverted at the end of every test. If you are using
12 | PostgreSQL, you can even run database tests asynchronously
13 | by setting `use Textdb.DataCase, async: true`, although
14 | this option is not recommended for other databases.
15 | """
16 |
17 | use ExUnit.CaseTemplate
18 |
19 | using do
20 | quote do
21 | alias Textdb.Repo
22 |
23 | import Ecto
24 | import Ecto.Changeset
25 | import Ecto.Query
26 | import Textdb.DataCase
27 | end
28 | end
29 |
30 | setup tags do
31 | :ok = Ecto.Adapters.SQL.Sandbox.checkout(Textdb.Repo)
32 |
33 | unless tags[:async] do
34 | Ecto.Adapters.SQL.Sandbox.mode(Textdb.Repo, {:shared, self()})
35 | end
36 |
37 | :ok
38 | end
39 |
40 | @doc """
41 | A helper that transforms changeset errors into a map of messages.
42 |
43 | assert {:error, changeset} = Accounts.create_user(%{password: "short"})
44 | assert "password is too short" in errors_on(changeset).password
45 | assert %{password: ["password is too short"]} = errors_on(changeset)
46 |
47 | """
48 | def errors_on(changeset) do
49 | Ecto.Changeset.traverse_errors(changeset, fn {message, opts} ->
50 | Regex.replace(~r"%{(\w+)}", message, fn _, key ->
51 | opts |> Keyword.get(String.to_existing_atom(key), key) |> to_string()
52 | end)
53 | end)
54 | end
55 | end
56 |
--------------------------------------------------------------------------------
/test/test_helper.exs:
--------------------------------------------------------------------------------
1 | ExUnit.start()
2 | Ecto.Adapters.SQL.Sandbox.mode(Textdb.Repo, :manual)
3 |
--------------------------------------------------------------------------------
/test/textdb_web/controllers/page_controller_test.exs:
--------------------------------------------------------------------------------
1 | defmodule TextdbWeb.PageControllerTest do
2 | use TextdbWeb.ConnCase
3 |
4 | test "GET /", %{conn: conn} do
5 | conn = get(conn, "/")
6 | assert html_response(conn, 200) =~ "Welcome to Phoenix!"
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/test/textdb_web/views/error_view_test.exs:
--------------------------------------------------------------------------------
1 | defmodule TextdbWeb.ErrorViewTest do
2 | use TextdbWeb.ConnCase, async: true
3 |
4 | # Bring render/3 and render_to_string/3 for testing custom views
5 | import Phoenix.View
6 |
7 | test "renders 404.html" do
8 | assert render_to_string(TextdbWeb.ErrorView, "404.html", []) == "Not Found"
9 | end
10 |
11 | test "renders 500.html" do
12 | assert render_to_string(TextdbWeb.ErrorView, "500.html", []) == "Internal Server Error"
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/test/textdb_web/views/layout_view_test.exs:
--------------------------------------------------------------------------------
1 | defmodule TextdbWeb.LayoutViewTest do
2 | use TextdbWeb.ConnCase, async: true
3 |
4 | # When testing helpers, you may want to import Phoenix.HTML and
5 | # use functions such as safe_to_string() to convert the helper
6 | # result into an HTML string.
7 | # import Phoenix.HTML
8 | end
9 |
--------------------------------------------------------------------------------
/test/textdb_web/views/page_view_test.exs:
--------------------------------------------------------------------------------
1 | defmodule TextdbWeb.PageViewTest do
2 | use TextdbWeb.ConnCase, async: true
3 | end
4 |
--------------------------------------------------------------------------------