2021-06-08 16:22:14 +03:00
|
|
|
|
// Code generated by rice embed-go; DO NOT EDIT.
|
2020-03-21 02:55:06 +03:00
|
|
|
|
package app
|
|
|
|
|
|
|
|
|
|
import (
|
2020-10-16 01:21:49 +03:00
|
|
|
|
"time"
|
2021-06-08 16:22:14 +03:00
|
|
|
|
|
|
|
|
|
"github.com/GeertJohan/go.rice/embedded"
|
2020-03-21 02:55:06 +03:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
|
|
|
|
|
// define files
|
|
|
|
|
file2 := &embedded.EmbeddedFile{
|
2021-06-08 16:22:14 +03:00
|
|
|
|
Filename: "base.html",
|
|
|
|
|
FileModTime: time.Unix(1623157014, 0),
|
|
|
|
|
|
2021-07-13 01:34:56 +03:00
|
|
|
|
Content: string("{{define \"base\"}}\r\n{{ $playing := .Playing }}\r\n{{ $config := .Config }}\r\n<!DOCTYPE html>\r\n<html lang=\"en\" prefix=\"og: https://ogp.me/ns#\">\r\n <head>\r\n <meta charset=\"utf-8\">\r\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\r\n <link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/static/favicon.ico\">\r\n <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css\">\r\n <link rel=\"stylesheet\" type=\"text/css\" href=\"/static/theme.css\">\r\n <link rel=\"stylesheet\" type=\"text/css\" href=\"/static/upload.css\">\r\n <link rel=\"stylesheet\" type=\"text/css\" href=\"/static/import.css\">\r\n\r\n {{if $playing.ID}}\r\n <meta property=\"og:title\" content=\"{{$playing.Title}}\"/>\r\n <meta property=\"og:type\" content=\"video.other\"/>\r\n <meta property=\"og:image\" content=\"/t/{{ $playing.ID}}\"/>\r\n <meta property=\"og:video\" content=\"/v/{{ $playing.ID }}.mp4\">\r\n <meta property=\"og:video:url\" content=\"/v/{{ $playing.ID }}.mp4\">\r\n <meta property=\"og:video:secure_url\" content=\"/v/{{ $playing.ID }}.mp4\">\r\n <meta property=\"og:description\" content=\"{{$playing.Description}}\"/>\r\n <meta property=\"og:site_name\" content=\"Tube\"/>\r\n <meta property=\"og:url\" content=\"/v/{{ $playing.ID }}\"/>\r\n {{end}}\r\n\r\n {{ template \"stylesheets\" . }}\r\n {{ template \"css\" . }}\r\n <title>Tube</title>\r\n </head>\r\n<body>\r\n <nav>\r\n <a href=\"/\">Tube</a>\r\n <a class=\"centered\" style=\"text-indent: 0;\" href=\"/upload\">Upload</a>\r\n </nav>\r\n <main>\r\n {{template \"content\" .}}\r\n </main>\r\n <footer>\r\n <p><a href=\"https://git.mills.io/prologic/tube\">Tube</a> is CopyRight © 2020 <a href=\"https://git.mills.io/prologic\">James Mills / prologic</a>. All Rights Reserved.</p>\r\n {{if .Config.Copyright.Content}}<p>{{ $config.Copyright.Content }}</p>{{end}}\r\n </footer>\r\n</body>\r\n{{ template \"scripts\" . }}\r\n</html>\r\n{{end}}\r\n{{ define \"css\" }}{{ end }}\r\n{{ define \"scripts\" }}{{ end }}\r\n{{ define \"stylesheets\" }}{{ end }}\r\n"),
|
2020-03-28 10:19:22 +03:00
|
|
|
|
}
|
|
|
|
|
file3 := &embedded.EmbeddedFile{
|
2021-06-08 16:22:14 +03:00
|
|
|
|
Filename: "import.html",
|
|
|
|
|
FileModTime: time.Unix(1585462766, 0),
|
|
|
|
|
|
|
|
|
|
Content: string("{{define \"content\"}}\n <div style=\"text-align: center;\">\n <label class=\"import-container\" onclick=\"labelClicked(event)\">\n <div class=\"import-wrapper\">\n <form id=\"import-form\" class=\"import-form\" enctype=\"multipart/form-data\" method=\"POST\" action=\"/import\">\n <input id=\"import-input\" type=\"text\" name=\"url\" placeholder=\"Enter a valid URL or ID\" required onchange=\"urlSelected()\" />\n <div class=\"import-details\">\n <span id=\"import-message\" class=\"import-message\">No URL entered</span>\n <div id=\"import-button-wrapper\" class=\"import-button-wrapper\">\n <button id=\"import-button\" class=\"import-button\" onclick=\"startImporting()\" type=\"button\">\n <span id=\"import-stopped\">Import</span>\n <span id=\"import-started\" class=\"loader\" style=\"display: none;\"></span>\n </button>\n </div>\n <div id=\"import-progress-container\" class=\"import-progress-container\">\n <div id=\"import-progress\" class=\"import-progress\">\n <span id=\"import-progress-label\" class=\"import-progress-label\"></span>\n </div>\n <div style=\"flex-grow: 1;\"></div>\n </div>\n </div>\n </form>\n </div>\n </label>\n <p>ID is of the form provider:video_id</p>\n <p>Examples:<br />youtube:Hks6Nq7g6P4<br />vimeo:374624356</p>\n </div>\n{{end}}\n{{define \"scripts\"}}\n <script type=\"application/javascript\" src=\"/static/import.js\"></script>\n{{end}}\n"),
|
2020-03-28 10:19:22 +03:00
|
|
|
|
}
|
|
|
|
|
file4 := &embedded.EmbeddedFile{
|
2021-06-08 16:22:14 +03:00
|
|
|
|
Filename: "index.html",
|
|
|
|
|
FileModTime: time.Unix(1585438501, 0),
|
|
|
|
|
|
|
|
|
|
Content: string("{{ define \"content\" }}\r\n{{ $playing := .Playing }}\r\n<div id=\"player\">\r\n <div class=\"topnav\" id=\"myTopnav\">\r\n <a href=\"javascript:void(0);\" class=\"icon\" onclick=\"myFunction()\">\r\n <i class=\"fa fa-cogs\"></i>\r\n </a>\r\n <a {{ if eq $.Quality \"\" }}class=\"active\"{{ end }} href=\"/v/{{ $playing.ID }}\">fullHD</a>\r\n <a {{ if eq $.Quality \"720p\" }}class=\"active\"{{ end }} href=\"/v/{{ $playing.ID }}?quality=720p\">720p</a>\r\n <a {{ if eq $.Quality \"480p\" }}class=\"active\"{{ end }} href=\"/v/{{ $playing.ID }}?quality=480p\">480p</a>\r\n <a {{ if eq $.Quality \"360p\" }}class=\"active\"{{ end }} href=\"/v/{{ $playing.ID }}?quality=360p\">360p</a>\r\n <a {{ if eq $.Quality \"240p\" }}class=\"active\"{{ end }} href=\"/v/{{ $playing.ID }}?quality=240p\">240p</a>\r\n </div>\r\n\r\n {{ if $playing.ID }}\r\n <video id=\"video\" controls preload=\"metadata\" poster=\"/t/{{ $playing.ID}}\">\r\n <source src=\"/v/{{ $playing.ID }}.mp4?quality={{ $.Quality }}\" type=\"video/mp4\" />\r\n </video>\r\n <h1>{{ $playing.Title }}</h1>\r\n <h2>{{ $playing.Views }} views • {{ $playing.Modified }} • {{ $playing.Size | bytes }}</h2>\r\n <p>{{ $playing.Description }}</p>\r\n {{ else }}\r\n <video id=\"video\" controls></video>\r\n {{ end }}\r\n</div>\r\n<div id=\"playlist\">\r\n <div class=\"nav\">\r\n <ul>\r\n <li><a {{ if or (eq $.Sort \"timestamp\") (eq $.Sort \"\") }}class=\"active\"{{ end }} href=\"?sort=timestamp\">Recent</a></li>\r\n <li><a {{ if eq $.Sort \"views\" }}class=\"active\"{{ end }} href=\"?sort=views\">Views</a></li>\r\n </ul>\r\n </div>\r\n {{ range $m := .Playlist }}\r\n {{ if eq $m.ID $playing.ID }}\r\n <a href=\"/v/{{ $m.ID }}?sort={{ $.Sort }}\" class=\"playing\">\r\n {{ else }}\r\n <a href=\"/v/{{ $m.ID }}?sort={{ $.Sort }}\">\r\n {{ end }}\r\n <img src=\"/t/{{ $m.ID }}\">\r\n <div>\r\n <h1>{{ $m.Title }}</h1>\r\n <h2>{{ $m.Views }} views • {{ $m.Modified }}</h2>\r\n </div>\r\n </a>\r\n {{ end }}\r\n</div>\r\n{{end}}\r\n{{ define \"scripts\" }}\r\n<script type=\"application/javascript\">\r\n/* Toggle between adding and removing the \"responsive\" class to topnav when the user clicks on the icon */\r\nfunction myFunction() {\r\n var x = document.getElementById(\"myTopnav\");\r\n if (x.className === \"topnav\") {\r\n x.className += \" responsive\";\r\n } else {\r\n x.className = \"topnav\";\r\n }\r\n}\r\n</script>\r\n{{ end }}\r\n"),
|
2020-03-28 10:19:22 +03:00
|
|
|
|
}
|
|
|
|
|
file5 := &embedded.EmbeddedFile{
|
2021-06-08 16:22:14 +03:00
|
|
|
|
Filename: "upload.html",
|
|
|
|
|
FileModTime: time.Unix(1623158017, 0),
|
|
|
|
|
|
|
|
|
|
Content: string("{{define \"content\"}}\n <div style=\"text-align: center;\">\n <label class=\"upload-container\" onclick=\"labelClicked(event)\">\n <div class=\"upload-wrapper\">\n <form id=\"upload-form\" class=\"upload-form\" enctype=\"multipart/form-data\" method=\"POST\" action=\"/upload\">\n <input id=\"video-input\" type=\"file\" accept=\"video/*\" onchange=\"fileSelected()\" style=\"display: none;\"/>\n <div class=\"upload-box\">\n <img width=\"100\" src=\"/static/upload-icon.png\"/>\n <span>Click to browse or drop file here</span>\n </div>\n <div class=\"upload-details\">\n <input id=\"video-title\" type=\"text\" placeholder=\"Optional title\" />\n <textarea id=\"video-description\" rows=\"2\" placeholder=\"Optional description\"></textarea>\n <div id=\"upload-file\" class=\"upload-file\">\n <span id=\"upload-filename\"></span>\n <img width=\"20\" src=\"/static/close-icon.png\" onclick=\"removeFile(event)\"/>\n </div>\n <span id=\"upload-message\" class=\"upload-message\">No file selected</span>\n <div id=\"upload-button-wrapper\" class=\"upload-button-wrapper\">\n <button id=\"upload-button\" class=\"upload-button\" onclick=\"startUploading()\" type=\"button\">\n <span id=\"upload-stopped\">Upload</span>\n <span id=\"upload-started\" class=\"loader\" style=\"display: none;\"></span>\n </button>\n </div>\n <div id=\"upload-progress-container\" class=\"upload-progress-container\">\n <div id=\"upload-progress\" class=\"upload-progress\">\n <span id=\"upload-progress-label\" class=\"upload-progress-label\"></span>\n </div>\n <div style=\"flex-grow: 1;\"></div>\n </div>\n </div>\n </form>\n </div>\n </label>\n <p><a href=\"/import\">Importing a video? Click here</a></p>\n </div>\n{{end}}\n{{define \"scripts\"}}\n <script>window['MAX_UPLOAD_SIZE'] = '{{.Config.Server.MaxUploadSize}}';</script>\n <script type=\"application/javascript\" src=\"/static/upload.js\"></script>\n{{end}}\n"),
|
2020-03-28 10:19:22 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// define dirs
|
|
|
|
|
dir1 := &embedded.EmbeddedDir{
|
2021-06-08 16:22:14 +03:00
|
|
|
|
Filename: "",
|
|
|
|
|
DirModTime: time.Unix(1623158017, 0),
|
2020-03-28 10:19:22 +03:00
|
|
|
|
ChildFiles: []*embedded.EmbeddedFile{
|
2021-06-08 16:22:14 +03:00
|
|
|
|
file2, // "base.html"
|
|
|
|
|
file3, // "import.html"
|
|
|
|
|
file4, // "index.html"
|
|
|
|
|
file5, // "upload.html"
|
2020-03-28 10:19:22 +03:00
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// link ChildDirs
|
|
|
|
|
dir1.ChildDirs = []*embedded.EmbeddedDir{}
|
|
|
|
|
|
|
|
|
|
// register embeddedBox
|
2020-10-16 01:21:49 +03:00
|
|
|
|
embedded.RegisterEmbeddedBox(`../templates`, &embedded.EmbeddedBox{
|
|
|
|
|
Name: `../templates`,
|
2021-06-08 16:22:14 +03:00
|
|
|
|
Time: time.Unix(1623158017, 0),
|
2020-03-28 10:19:22 +03:00
|
|
|
|
Dirs: map[string]*embedded.EmbeddedDir{
|
|
|
|
|
"": dir1,
|
|
|
|
|
},
|
|
|
|
|
Files: map[string]*embedded.EmbeddedFile{
|
2020-10-16 01:21:49 +03:00
|
|
|
|
"base.html": file2,
|
|
|
|
|
"import.html": file3,
|
|
|
|
|
"index.html": file4,
|
|
|
|
|
"upload.html": file5,
|
2020-03-28 10:19:22 +03:00
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
|
|
|
|
|
// define files
|
2020-10-16 01:21:49 +03:00
|
|
|
|
file7 := &embedded.EmbeddedFile{
|
2021-06-08 16:22:14 +03:00
|
|
|
|
Filename: "close-icon.png",
|
|
|
|
|
FileModTime: time.Unix(1585092572, 0),
|
|
|
|
|
|
|
|
|
|
Content: string("\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x000\x00\x00\x000\b\x06\x00\x00\x00W\x02\xf9\x87\x00\x00\x01\x1eIDAThC\xedYI\x0e\xc3 \fL~U\xb5\xefo\xd5_\xb5\xe2P\t!\f^\x18\x13\xab\xce5^f<86\xcay\x04\u007f\xce\xe0\xf8\x8f$\xb0[\xc1T\xe0\xd2\n<߯\xcfn\x80%\xff\xe3v'O\n\xf9\xe2*\xe0\u007f\x05\xa4H$\x01\xaf#\x96\nxU\x9aʓ\n\xa4\x02\xc6\n\xc0\x8eP\t\xac\x9d\x19\x12_\b\x81:\xa8\x94\x84\xd4\x17B\xa0\x1d\xf3\\\x12R\xf0\xa3ub\xc9$\x96\x00\x92\xd8\xd6m\x03S\xa0\xb7\xabPJh\xc1\xc3\x15\xe0\x90\xb0\x80w#@\xf5\x84\x15\xbc+\x81Q2n\x93\xf7F\x06\xbc\aڤmB\vxw\x05z\tC\x11\xa0䶐p;B\xbd\x86\r\xd3\xc4#\xa0V\x12p\x058\x0096[.4\x12`\x12[\x97UB\x03\xc8\xeaS\x133-s\x1a \x9c\xb5\xc3u\x90I.%\xbda\xc7\xfd\xb4\u009b\xd8xc\x9c\xba'\x81i\x89\xc0\x06\xa9\x00\xb8\xc0\xd3\xf0\xa9\xc0\xb4D`\x83\xffS\xa0\x14\x94;d\xc0\xc5\xd7\xfdbB\x83Z\x15?\u007f\xb3\xae\xaa\xa46N*\xa0\xad\xdc*\xbf\xf0\n|\x01\xc9\x14\x10@7\x1e\xc3!\x00\x00\x00\x00IEND\xaeB`\x82"),
|
2020-10-16 01:21:49 +03:00
|
|
|
|
}
|
|
|
|
|
file8 := &embedded.EmbeddedFile{
|
2021-06-08 16:22:14 +03:00
|
|
|
|
Filename: "defaulticon.jpg",
|
|
|
|
|
FileModTime: time.Unix(1584741897, 0),
|
|
|
|
|
|
|
|
|
|
Content: string("\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x02\x05\xe7\x05\xe7\x00\x00\xff\xe1\x1e\xeeExif\x00\x00II*\x00\b\x00\x00\x00\x05\x00\x1a\x01\x05\x00\x01\x00\x00\x00J\x00\x00\x00\x1b\x01\x05\x00\x01\x00\x00\x00R\x00\x00\x00(\x01\x03\x00\x01\x00\x00\x00\x03\x00\x00\x001\x01\x02\x00\f\x00\x00\x00Z\x00\x00\x002\x01\x02\x00\x14\x00\x00\x00f\x00\x00\x00z\x00\x00\x00\xe7\x05\x00\x00\x01\x00\x00\x00\xe7\x05\x00\x00\x01\x00\x00\x00GIMP 2.10.8\x002019:06:26 12:59:35\x00\b\x00\x00\x01\x04\x00\x01\x00\x00\x00\x00\x01\x00\x00\x01\x01\x04\x00\x01\x00\x00\x00\x00\x01\x00\x00\x02\x01\x03\x00\x03\x00\x00\x00\xe0\x00\x00\x00\x03\x01\x03\x00\x01\x00\x00\x00\x06\x00\x00\x00\x06\x01\x03\x00\x01\x00\x00\x00\x06\x00\x00\x00\x15\x01\x03\x00\x01\x00\x00\x00\x03\x00\x00\x00\x01\x02\x04\x00\x01\x00\x00\x00\xe6\x00\x00\x00\x02\x02\x04\x00\x01\x00\x00\x00\xff\x1d\x00\x00\x00\x00\x00\x00\b\x00\b\x00\b\x00\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x00\x00\x01\x00\x01\x00\x00\xff\xdb\x00C\x00\b\x06\x06\a\x06\x05\b\a\a\a\t\t\b\n\f\x14\r\f\v\v\f\x19\x12\x13\x0f\x14\x1d\x1a\x1f\x1e\x1d\x1a\x1c\x1c $.' \",#\x1c\x1c(7),01444\x1f'9=82<.342\xff\xdb\x00C\x01\t\t\t\f\v\f\x18\r\r\x182!\x1c!22222222222222222222222222222222222222222222222222\xff\xc0\x00\x11\b\x01\x00\x01\x00\x03\x01\"\x00\x02\x11\x01\x03\x11\x01\xff\xc4\x00\x1f\x00\x00\x01\x05\x01\x01\x01\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\a\b\t\n\v\xff\xc4\x00\xb5\x10\x00\x02\x01\x03\x03\x02\x04\x03\x05\x05\x04\x04\x00\x00\x01}\x01\x02\x03\x00\x04\x11\x05\x12!1A\x06\x13Qa\a\"q\x142\x81\x91\xa1\b#B\xb1\xc1\x15R\xd1\xf0$3br\x82\t\n\x16\x17\x18\x19\x1a%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz\x83\x84\x85\x86\x87\x88\x89\x8a\x92\x93\x94\x95\x96\x97\x98\x99\x9a\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xff\xc4\x00\x1f\x01\x00\x03\x01\x01\x01\x01\x01\x01\x01\x01\x01\x00\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\a\b\t\n\v\xff\xc4\x00\xb5\x11\x00\x02\x01\x02\x04\x04\x03\x04\a\x05\x04\x04\x00\x01\x02w\x00\x01\x02\x03\x11\x04\x05!1\x06\x12AQ\aaq\x13\"2\x81\b\x14B\x91\xa1\xb1\xc1\t#3R\xf0\x15br\xd1\n\x16$4\xe1%\xf1\x17\x18\x19\x1a&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x92\x93\x94\x95\x96\x97\x98\x99\x9a\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xff\xda\x00\f\x03\x01\x00\x02\x11\x03\x11\x00?\x00\xf7\xfa(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n(\xa2\x80\n)\x1d\xd64.\xec\x15G$\x93\x80+\x9e\xd4<i\xa4X\x92\xb1\xca\xd7R\x0eЌ\x8f\xfb\xeb\xa7\xe5\x9a\x00訯9\xba\xf1\xee\xa7t\xc5,mc\x84\x11\x81\xc1\x91\xf3\xfc\xbfJ\xa6\xdf\xf0\x94\xea\x9c\xc95\xd0S\xea\xfeX\xfc\x86)\\\x0fN\x96\xe2\b\x06e\x9a8\xc7\xfbl\x05R\x93^\xd2\"8mJ\xd7>\x82P\u007f\x95y\xeaxB\xfaC\xbai\xe2Rz\xf2Xդ\xf0Z\xe3\xe7\xbd9\xff\x00f?\xfe\xbd\x17\x03\xb2>)\xd1\a\xfc\xc4a\xfc3\xfe\x14\xab\xe2}\x11\x8f\x1a\x94\x1f\x89\"\xb9\x01\xe0\xc8?\xe7\xeeO\xfb\xe4P|\x19\ak\xb9?\xef\x91E\xc4v\xf1\xeb:\\\xdf\xea\xf5\x1bV>\x82e\xcf\xf3\xab\x89\"H2\x8e\xac=T\xe6\xbc\xdeO\x06q\xfb\xab\xce\u007f\xdaJ\xac|+\xa9[\x1d\xf6\xf7\b_\xfd\x86*\u007f:.3\xd4\xe8\xaf/[\x9f\x15\xe9\x9fv{\x96Q\xcf\xcc|\xc1\xfa\xe6\xaf\xda\xfc@\xbd\x85\xb6\xdf\xd8\xc7 \xf5L\xa1\xfds\x9fҋ\x81\xe84V\x16\x9f\xe2\xfd\x1fP!EǑ!\xfe\t\xc6\xdfק\xeb[\x80\x86\x00\x82\b=\b\xa6\x02\xd1E\x14\x00QE\x14\x00QE\x14\x00QE\x14\x00QE\x14\x00QE\x14\x00QE\x14\x00QER\xd4\xf5[M\"\xd4\xdc]ɵz*\x8eY\x8f\xa0\x14\x01q\x98*\x96b\x02\x81\x92Oj䵟\x1dZY\x96\x87OQs0\xe3\xc
|
2020-10-16 01:21:49 +03:00
|
|
|
|
}
|
|
|
|
|
file9 := &embedded.EmbeddedFile{
|
2021-06-08 16:22:14 +03:00
|
|
|
|
Filename: "favicon.ico",
|
|
|
|
|
FileModTime: time.Unix(1584741897, 0),
|
|
|
|
|
|
|
|
|
|
Content: string("\x00\x00\x01\x00\x04\x00@@\x00\x00\x01\x00 \x00(B\x00\x00F\x00\x00\x0000\x00\x00\x01\x00 \x00\xa8%\x00\x00nB\x00\x00 \x00\x00\x01\x00 \x00\xa8\x10\x00\x00\x16h\x00\x00\x10\x10\x00\x00\x01\x00 \x00h\x04\x00\x00\xbex\x00\x00(\x00\x00\x00@\x00\x00\x00\x80\x00\x00\x00\x01\x00 \x00\x00\x00\x00\x00\x00@\x00\x00\x12\v\x00\x00\x12\v\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x02\x01\x06\x05\a\x02\v\b\r\x03\x13\x0e\x16\x06\x19\x13\x1e\t\x1d\x16#\f!\x18'\x0f$\x1b+\x11&\x1c.\x13&\x1d.\x13%\x1b,\x11!\x19(\x0e\x1e\x16$\v\x1a\x13\x1f\b\x13\x0e\x17\x05\f\t\x0e\x03\a\x05\b\x01\x01\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\b\x06\n\x03\x11\r\x15\a\x1e\x16$\x0e2%;\x1b@/M(Q;`8^EpHgK{VmP\x82arT\x89iuV\x8cnuV\x8cmsT\x89inP\x83`hL|U_FqGR<a7B1O'3&=\x19\x1f\x17%\r\x12\x0e\x16\x06\t\x06\n\x03\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x03\x04\x02\x13\x0e\x17\a'\x1d.\x10C1O#XAi:lO\x80W\x81^\x9az\x8fh\xac\x96\x9dr\xbc\xaf\xa7y\xc9¯\u007f\xd3е\x82\xdaڸ\x84\xde\u0e85\xe0⺆\xe0⸅\xdeߵ\x82\xdaٰ\u007f\xd3Шy\xc9\xc1\x9dr\xbd\xad\x90i\xad\x94\x82_\x9cxnP\x83TZBl7E3R )\x1e0\x0f\x14\x0f\x18\x06\x04\x03\x05\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x06\x04\a\a\x1e\x16$\x15F3S0iM}U\x89d\xa4\x83\x9es\xbd\xaa\xae~\xd2˼\x87\xe3\xe4ċ\xed\xf1ȍ\xf2\xf8ɍ\xf5\xfbʍ\xf6\xfdʌ\xf7\xfeʌ\xf7\xfeʋ\xf7\xfeʋ\xf7\xfeʌ\xf7\xfeʌ\xf7\xfeʍ\xf6\xfdɍ\xf5\xfbȍ\xf2\xf8ċ\xed\xf1\xbc\x87\xe3\xe3\xaf~\xd2ɟt\xbe\xa7\x8be\xa6\u007fkO\x80QH5V-\x1f\x17%\x13\x06\x05\a\x06\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
|
2020-10-16 01:21:49 +03:00
|
|
|
|
}
|
|
|
|
|
filea := &embedded.EmbeddedFile{
|
2021-06-08 16:22:14 +03:00
|
|
|
|
Filename: "import.css",
|
|
|
|
|
FileModTime: time.Unix(1585392123, 0),
|
|
|
|
|
|
|
|
|
|
Content: string(".import-container {\r\n display: inline-block;\r\n max-width: 100%;\r\n margin-top: 10px;\r\n}\r\n\r\n.import-wrapper {\r\n padding: 20px;\r\n background-color: #282a2e;\r\n border: 1px solid #1e1e1e;\r\n border-radius: 20px;\r\n font-family: 'Trebuchet MS', Arial, sans-serif;\r\n}\r\n\r\n.import-form {\r\n padding: 20px;\r\n border: 5px dashed #676867;\r\n border-radius: 10px;\r\n cursor: pointer;\r\n}\r\n\r\n.import-details {\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: center;\r\n padding: 0 0 20px 0;\r\n}\r\n\r\n.import-details > * {\r\n margin-top: 20px;\r\n}\r\n\r\n.import-details span {\r\n color: #c5c8c6;\r\n font-weight: bold;\r\n}\r\n\r\n.import-message {\r\n white-space: normal;\r\n padding: 0 20px;\r\n word-wrap: break-word;\r\n max-width: 300px;\r\n}\r\n\r\n.import-message.error {\r\n color: #e82e57;\r\n}\r\n\r\n.import-button-wrapper {\r\n display: none;\r\n width: 100%;\r\n padding: 0 20px;\r\n}\r\n\r\n.import-button {\r\n border: 0;\r\n box-shadow: none;\r\n border-radius: 0px;\r\n\r\n width: 100%;\r\n padding: 15px;\r\n background: #191919 !important;\r\n font-family: 'Trebuchet MS', Arial, sans-serif;\r\n color: #c5c8c6;\r\n border-radius: 10px;\r\n cursor: pointer;\r\n}\r\n\r\n.import-button.transparent {\r\n background: transparent !important;\r\n padding: 10px;\r\n}\r\n\r\n.import-progress-container {\r\n display: none;\r\n width: 100%;\r\n padding: 0 20px;\r\n}\r\n\r\n.import-progress {\r\n height: 30px;\r\n background: linear-gradient(45deg, #c7c7c7, #ae81ff);\r\n border-radius: 5px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n\r\n.import-progress-label {\r\n color: #282a2e !important;\r\n}\r\n\r\n/* SPINNER */\r\n\r\n.loader,\r\n.loader:after {\r\n border-radius: 50%;\r\n width: 3em;\r\n height: 3em;\r\n}\r\n.loader {\r\n font-size: 10px;\r\n position: relative;\r\n text-indent: -9999em;\r\n border-top: 0.5em solid rgba(255, 255, 255, 0.2);\r\n border-right: 0.5em solid rgba(255, 255, 255, 0.2);\r\n border-bottom: 0.5em solid rgba(255, 255, 255, 0.2);\r\n border-left: 0.5em solid #ffffff;\r\n -webkit-transform: translateZ(0);\r\n -ms-transform: translateZ(0);\r\n transform: translateZ(0);\r\n -webkit-animation: load8 1.1s infinite linear;\r\n animation: load8 1.1s infinite linear;\r\n}\r\n@-webkit-keyframes load8 {\r\n 0% {\r\n -webkit-transform: rotate(0deg);\r\n transform: rotate(0deg);\r\n }\r\n 100% {\r\n -webkit-transform: rotate(360deg);\r\n transform: rotate(360deg);\r\n }\r\n}\r\n@keyframes load8 {\r\n 0% {\r\n -webkit-transform: rotate(0deg);\r\n transform: rotate(0deg);\r\n }\r\n 100% {\r\n -webkit-transform: rotate(360deg);\r\n transform: rotate(360deg);\r\n }\r\n}\r\n"),
|
2020-10-16 01:21:49 +03:00
|
|
|
|
}
|
|
|
|
|
fileb := &embedded.EmbeddedFile{
|
2021-06-08 16:22:14 +03:00
|
|
|
|
Filename: "import.js",
|
|
|
|
|
FileModTime: time.Unix(1585651354, 0),
|
|
|
|
|
|
|
|
|
|
Content: string("// common variables\nlet iBytesImported = 0\nlet iBytesTotal = 0\nlet iPreviousBytesLoaded = 0\nlet iMaxFilesize = 104857600 // 100MB\nlet timer = 0\nlet importInProgress = 'n/a'\nlet isProcessing = false\nlet url = null\n\n/* CACHED ELEMENTS */\n\nconst importForm = document.getElementById('import-form')\nconst importInput = document.getElementById('import-input')\nconst importMessageLabel = document.getElementById('import-message')\nconst importButtonWrapper = document.getElementById('import-button-wrapper')\nconst importButton = document.getElementById('import-button')\nconst importProgressContainer = document.getElementById('import-progress-container')\nconst importProgressBar = document.getElementById('import-progress')\nconst importProgressLabel = document.getElementById('import-progress-label')\nconst importStopped = document.getElementById('import-stopped')\nconst importStarted = document.getElementById('import-started')\n\n/* HELPERS */\n\nconst setProgress = (_progress) => {\n importProgressContainer.style.display = _progress > 0 ? 'flex' : 'none'\n importProgressBar.style.width = `${_progress}%`\n importProgressLabel.innerText = _progress >= 15 ? `${_progress}%` : ''\n}\n\nconst setMessage = (_message, isError) => {\n importMessageLabel.style.display = _message ? 'block' : 'none'\n importMessageLabel.innerHTML = _message\n if (isError) {\n importMessageLabel.classList.add('error')\n } else {\n importMessageLabel.classList.remove('error')\n }\n}\n\nconst setImportState = (_importInProgress) => {\n importInProgress = _importInProgress\n\n importStarted.style.display = _importInProgress ? 'inline-block' : 'none'\n importStopped.style.display = _importInProgress ? 'none' : 'block'\n\n if (_importInProgress) {\n importButton.classList.add('transparent')\n timer = setInterval(doInnerUpdates, 300)\n } else {\n importButton.classList.remove('transparent')\n clearInterval(timer)\n }\n}\n\nconst secondsToTime = (secs) => {\n let hr = Math.floor(secs / 3600)\n let min = Math.floor((secs - (hr * 3600)) / 60)\n let sec = Math.floor(secs - (hr * 3600) - (min * 60))\n if (hr < 10) hr = `0${hr}`\n if (min < 10) min = `0${min}`\n if (sec < 10) sec = `0${sec}`\n if (hr) hr = '00'\n return `${hr}:${min}:${sec}`\n}\n\nconst bytesToSize = (bytes) => {\n const sizes = ['Bytes', 'KB', 'MB']\n if (bytes == 0) return 'n/a'\n const i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)))\n return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i]\n}\n\n/* MAIN */\n\ndocument.addEventListener('DOMContentLoaded', () => {\n importInput.addEventListener(\"keypress\", (e) => {\n if (e.keyCode == 9) {\n urlSelected();\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n if (e.keyCode === 13 || e.keyCode == 10) {\n e.preventDefault();\n e.stopPropagation();\n urlSelected();\n importButton.click();\n return;\n }\n });\n}, false)\n\nconst labelClicked = (e) => {\n if (importInProgress === true) {\n e.preventDefault()\n return false\n }\n}\n\nconst urlSelected = (_url) => {\n url = _url || importInput.value\n\n setMessage('')\n setProgress(0)\n \n importButtonWrapper.style.display = 'block'\n setImportState(false)\n}\n\nconst startImporting = () => {\n if (importInProgress === true) return\n if (!url) return\n\n isProcessing = false\n iPreviousBytesLoaded = 0\n setMessage('')\n setProgress(0)\n setImportState(true)\n\n const formData = new FormData()\n formData.append('url', url)\n const xhr = new XMLHttpRequest()\n\n xhr.upload.addEventListener('progress', importProgress, false)\n xhr.addEventListener('load', importFinish, false)\n xhr.addEventListener('error', importError, false)\n xhr.addEventListener('abort', importAbort, false)\n\n xhr.open('POST', '/import')\n xhr.send(formData)\n\n timer = setInterval(doInnerUpdates, 300)\n}\n\nconst doIn
|
2020-10-16 01:21:49 +03:00
|
|
|
|
}
|
2020-03-28 10:19:22 +03:00
|
|
|
|
filec := &embedded.EmbeddedFile{
|
2021-06-08 16:22:14 +03:00
|
|
|
|
Filename: "theme.css",
|
|
|
|
|
FileModTime: time.Unix(1623157073, 0),
|
|
|
|
|
|
|
|
|
|
Content: string(":root {\n --main-title-color: #ae81ff;\n --link-hover-color: #ae81ff;\n}\n\n/* normalize */\n* {\n font-weight: inherit;\n font-size: inherit;\n border: none;\n outline: none;\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\na {\n color: inherit;\n text-decoration: none;\n}\n\nbody {\n font-family: Arial, sans-serif;\n font-size: 16px;\n font-weight: 400;\n color: #c5c8c6;\n background: #1e1e1e;\n padding-bottom: 10px;\n}\n\nnav {\n z-index: 100;\n color: var(--main-title-color);\n text-shadow: -2px 2px 3px rgba(0, 0, 0, 0.7);\n font-weight: 700;\n font-size: 20px;\n text-indent: 20px;\n line-height: 50px;\n width: 100%;\n height: 50px;\n background: #171717;\n border-bottom: 1px solid #272727;\n position: relative;\n overflow: hidden;\n}\n\nnav a.centered {\n float: none;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\nmain {\n width: 1156px;\n margin:0 auto;\n margin-top: 15px;\n white-space: nowrap;\n}\n\n#player {\n width: 854px;\n display: inline-block;\n vertical-align: top;\n}\n\n/* 480p */\n#video {\n width: 100%;\n height: 480px;\n background: #000;\n box-shadow: 0 3px 7px 0 rgba(0, 0, 0, 0.2);\n}\n\n#player > h1 {\n margin-top: 10px;\n}\n\n#player > h2 {\n margin-top: 5px;\n color: #676867;\n font-size: 90%;\n}\n\n#player > p {\n margin-top: 10px;\n font-size: 80%;\n width: 100%;\n white-space: normal;\n}\n\n#playlist {\n font-size: 13px;\n display: inline-block;\n margin-left: 10px;\n width: 290px;\n height: 607px;;\n background: #282a2e;\n box-shadow: 0 3px 7px 0 rgba(0, 0, 0, 0.2);\n overflow-x: hidden;\n overflow-y: auto;\n}\n\n#playlist > a {\n display: block;\n padding: 10px;\n position: relative;\n min-height: 54px;\n}\n\n#playlist > a:hover {\n color: var(--link-hover-color);\n}\n\n#playlist > a.playing {\n background: #383a3e;\n}\n\n#playlist > a + a {\n border-top: 1px solid #1e1e1e;\n}\n\n#playlist > a > img {\n width: 70px;\n}\n\n#playlist > a > div {\n position: absolute;\n top: 10px;\n right: 10px;\n bottom: 10px;\n left: 90px;\n}\n\n#playlist > a > div > h1 {\n white-space: normal;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n}\n\n#playlist > a > div > h2 {\n margin-top: 5px;\n color: #676867;\n font-size: 90%;\n}\n\n/* 360p */\n@media only screen and (max-width: 1180px) {\n main {\n width: 940px;\n }\n #player {\n width: 640px;\n }\n #video {\n height: 360px;\n }\n}\n\n/* 240p */\n@media only screen and (max-width: 965px) {\n main {\n width: 726px;\n }\n #player {\n width: 426px;\n }\n #video {\n height: 240px;\n }\n}\n\n/* 240p with shifted playlist */\n@media only screen and (max-width: 750px) {\n main {\n width: 426px;\n }\n #player {\n width: 426px;\n }\n #video {\n height: 240px;\n }\n #playlist {\n width: 426px;\n margin-top: 10px;\n margin-left: 0;\n display: block;\n }\n}\n\n/* responsive width with shifted playlist */\n@media only screen and (max-width: 440px) {\n main {\n width: 100%;\n }\n #player {\n width: 100%;\n }\n #video {\n height: auto;\n }\n #playlist {\n width: 100%;\n margin-top: 10px;\n margin-left: 0;\n display: block;\n }\n}\n\n/* Upload */\n.upload_form_cont {\n background: -moz-linear-gradient(#ffffff, #f2f2f2);\n background: -ms-linear-gradient(#ffffff, #f2f2f2);\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #f2f2f2));\n background: -webkit-linear-gradient(#ffffff, #f2f2f2);\n background: -o-linear-gradient(#ffffff, #f2f2f2);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='
|
2020-03-25 09:22:41 +03:00
|
|
|
|
}
|
2020-03-28 10:19:22 +03:00
|
|
|
|
filed := &embedded.EmbeddedFile{
|
2021-06-08 16:22:14 +03:00
|
|
|
|
Filename: "upload-icon.png",
|
|
|
|
|
FileModTime: time.Unix(1585092572, 0),
|
|
|
|
|
|
|
|
|
|
Content: string("\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\xc0\x00\x00\x00\xc0\b\x06\x00\x00\x00R\xdcl\a\x00\x00\fzIDATx^\xed\x9d\xeb\xaf%E\x15\xc5\xd7f\x86!\x1a\x19F\x19\x89(`\xe4\x03\xa0\xc6\xc4G\x84D\x14\x89f\x1c\x11\x81)E\x83\x19\x14\x8c\x80\x1fD\x8d\xff@\x19\xeb/0~P3\xc4\a\"1\xf8\xa0@@\f\x8a\x8f\x88\n\x9a@4\xd1\x04\x1f\xf8\xc6\a\x01\xc5G\"\bn\xd37\xe7\\\xcf}\x9c{\xfa\x9c\xea\xeeꪽ\xe6#tծ\xbd\xd6\xfau\xf7\xed\xd3\x0f\x01\xffQ\x01\xc3\n\x88\xe1\xde\xd9:\x15\x00\x01`\bL+@\x00L\xdb\xcf\xe6\t\x003`Z\x01\x02`\xda~6O\x00\x98\x01\xd3\n\x10\x00\xd3\xf6\xb3y\x02\xc0\f\x98V\x80\x00\x98\xb6\x9f\xcd\x13\x00f\xc0\xb4\x02\x04\xc0\xb4\xfdl\x9e\x000\x03\xa6\x15 \x00\xa6\xedg\xf3\x04\x80\x190\xad\x00\x010m?\x9b'\x00̀i\x05\b\x80i\xfb\xd9<\x01`\x06L+@\x00L\xdb\xcf\xe6\t\x003`Z\x01\x02`\xda~6O\x00\x98\x01\xd3\n\x10\x00\xd3\xf6\xb3y\x02\xc0\f\x98V\x80\x00\x98\xb6\x9f\xcd\x13\x00f\xc0\xb4\x02\x04\xc0\xb4\xfdl\x9e\x000\x03\xa6\x15 \x00\xa6\xedg\xf3\x04\x80\x190\xad\x00\x010m?\x9b'\x00=d@U\xf7\x02x\x11\x80\x17Ā#)%\x9c\xc7\xdb\x00<\x00\xe0\x17\"\xf2H\xca\\\x1c\xbbU\x01\x02\x90\x98\nU\xdd\x05\xe0%1\xe0\x87\x89S\xb5\x1e\xee<\xae\x06\xf0=\x00?\x16\x91'[\x0f\xe4\x86[\x14 \x00+\x84BU\x8f\apQ\f\xf8\xc4\n\xc3;\x1f\xe2<\x0e\x03\xb8UD\xfe\xde\xf9\xe4\x95OH\x00Z\x1a\xac\xaa\xc7\x02\xb8$\xf5\x94\xa6e\xb9\x957s\x1eW\x00\xb8AD\xfe\xb9\xf2$\x86\x06\x12\x80\x05f\xabjszso\x89\x99p\x1e/\x14\x91\x9f\x96\xb8\xf6\xa1\xd6L\x00\xe6(\xad\xaao\x88\x01\xb7\reD\x9fu\x9c\xc7!\x11\xb9\xb9\xcf\x1a\xa5\xceM\x00f\x9cS\xd5F\x8f\xe6\xdc>\x96j\xe8N\xebv\x1e\aE\xe4\x8e\x1a{[\xb5'\x020QNUό\x01\xf7\xac*dI\xe3\x9c\xc7\xd9\"\xd2\\E2\xff\xcf<\x00\xaa\xfa\xec\x18\xf0\a\x8bIp\x1e'\x88\xc8C\x16{\x9f\xf6l\x1a\x00U\xbdr\xecWu\xfa\x0e\xa7\xf3\xb8\\D\xae\xed\xbb\xceX\xe77\t\x80\xaa\x9e\x12\x03~3VSr\xac\xcby\x9c*\"\xbf\xcaQ;gMs\x00\xa8\xea[b\xc0\xe7s\x8a>\xd6\xda\xceÉ\xc8Mc]_\x1f\xeb2\x03\x80\xaa\x1e\x1d\x03\x1e\xefC\xc4\xda\xe6t\x1eG\x8b\xc8\x13\xb5\xf5\xb5]?&\x00P\xd5\x13c\xc0\x83\x16\f\xed\xaaG\xe7q\x92\x88T\u007fq\xa0z\x00T\xb5\xb9#\xf3']\x05\xc3\xd2<\x16~I\xae\x1a\x00U=7\x06|\xd3Rh\xbb\xee\xd5y\xbcBD\xbe\xdf\xf5\xbcc\x99\xafZ\x00T\xf5P\xad\xbf\xe8\x0e\x1d\x1e\xe7q\x81\x88\xdc:t\xdd!\xeaU\t\x80\xaa^\x18\x03x\xefK\x87\tr\x1e\x17\x8bȗ:\x9cr\x14SU\a\x80\xaa^\x10\x03\xbe<\nu+[D\x8d\xf7\x12U\x05\x00\xcf\xf9\xfb'\xae\xb6\xfb\x88\xaa\x01\x80W{\xfa\x0f\xff\xb4\x82\xf3x\xb1\x88\xfch\xb8\x8a\xfdU\xaa\x02\x00U}V\f\xf8c\u007f2q\xe6\xcd\n\xd4r#]\xf1\x00\xa8\xea\x9e\x18\xf0\x18#:\xbc\x02\xcecw\xe9\x0f\xe5\x17\x0f\xc0\x8d\x1fR\x1d\xdezV\x9c*\xf0\xa6\x0fJ\xd1\x19*z\xf1\xaazq\f\xf8\x02\xe3\x98O\x01\xe7q\x89\x88ܐo\x05i\x95\x8b\x05@U\x9f\x1b\x03~\x9d\xd6>Gw\xa1@\xc9\xf7\r\x15\v\x00O}\xba\x88nws\x94z*T$\x00\xaazE\f\xb8\xa6;\xfb8S\xaa\x02\xce\xe3\x1d\"r]\xea<C\x8f/\x0e\x00\xcb\xcf\xf0\x0e\x1d\x8ee\xeb9\x8f\x13E\xe4Oˎ˹}q\x00\xf0\xd4'g\\\x16\xd7.\xedT\xa8(\x00T\xf5\xe51\xe0\a\x8bm\xe0\x16\xb9\x14p\x1e/\x15\x91\xfbr\xd5_\xb6nQ\x00p↓\xbdy\xb6/\xe9(0Z\x00Tu\x1f\x80\xe7\x038#\x06|2\x8f\x95\xac\xba\x8a\x02%\xdd5:\x1a\x00&\xaf\x1c\u007fu\f\xa8\xee\x9e\xf3y!\x9a\xee)k<\xb2\x95r\x14\xc8\n\xc0$\xf4\xcdkJ>\xb6ʞ\xa6\xe41\x9b\x03R\x1b\x04\xce〈|}\xec\x1e\r\x0e\xc0\xe4\x05\xb4\xe7ǀ[\xc6.N_뛷w\xac\r\x82\x12\x8e\x02\x83\x01м\x97\a\xc0\xe1\x18𩾂U¼\x8bBQ\x13\x04\xce\xe3t\x11\xf9٘}\xe9\x1d\x00U=\n\xc0\xbb\xac\xbf\x83\xb3\t\xc1\xa2\xf0O\x83R\x13\x04m{\xce\x05I\xaf\x00\xa8j\xf3G\xed\xb7r57\xa6\xba\xcb\x06\xa1\x16\b\x9c\xc7\xd3D\xe4_c\xf2bv-\xbd\x00\xa0\xaa'Ā?\x8f\xb5\xe9\xa1\u05f5l\xf8k:\x12\x8c\xfdv\xe9\xce\x01\xe0[\x196\xe2\xb5j\xf8k\x82 U\x83>wX\x9d\x01\xa0\xaaO\x8d\x01\xa3=\xd4\xf5)\xe2\xa2\xeb\xfc\xa9\xb5K?\x1dr\x1e{E\xe4\x1f\xa9:\xf41\xbe\x13\x00T\xf5\xe4\x18\xf0\xdb>\x16X\xea\x9c]\xef\xf5J\x86\xc0y\\*\"\u05cf\xd1\xcbd\x00x\x83\xdaV[\xbb\x0e\u007f\r\xa7C}i\x92\nU\x12\x00\xaa\xfa\xe6\x18\xf0\xc5\xd4E\xd44\xbeo\xa3K=\x12\xf4\xad˪\x19Z\x19\x00Um\xbe\x9a\xfe\xb9U\v\xd78n(\x93K\x84\xc0y\x9c!\"\xf7\x8f\xcd\xf7\x95\x00\xe0g\x86\x86;\xed\x99\x17\x98\xd2 p\x1eW\x89\xc8\xe8\x1ec]\x1a\x00Uu1\xe0Ʊ\x91\x9cs=C\xed\xf97\xf7X\x1a\x04\xb9t\xda)\x1bK\x01\xa0\xaagŀ\xbbs\x86ml\xb5s\x9bZ\x1a\x04\x8d\u007f\xc
|
2020-03-21 02:55:06 +03:00
|
|
|
|
}
|
2020-03-28 10:19:22 +03:00
|
|
|
|
filee := &embedded.EmbeddedFile{
|
2021-06-08 16:22:14 +03:00
|
|
|
|
Filename: "upload.css",
|
|
|
|
|
FileModTime: time.Unix(1585392096, 0),
|
|
|
|
|
|
|
|
|
|
Content: string(".upload-container {\r\n display: inline-block;\r\n max-width: 100%;\r\n margin-top: 10px;\r\n}\r\n\r\n.upload-wrapper {\r\n padding: 20px;\r\n background-color: #282a2e;\r\n border: 1px solid #1e1e1e;\r\n border-radius: 20px;\r\n font-family: 'Trebuchet MS', Arial, sans-serif;\r\n}\r\n\r\n.upload-form {\r\n border: 5px dashed #676867;\r\n border-radius: 10px;\r\n cursor: pointer;\r\n}\r\n\r\n.upload-box {\r\n display: flex;\r\n flex-direction: column;\r\n height: 100%;\r\n width: 100%;\r\n justify-content: center;\r\n align-items: center;\r\n min-width: 300px;\r\n min-height: 150px;\r\n}\r\n\r\n.upload-box span {\r\n color: #c5c8c6;\r\n font-weight: bold;\r\n}\r\n\r\n.upload-details {\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: center;\r\n padding: 0 0 20px 0;\r\n}\r\n\r\n.upload-details > * {\r\n margin-top: 20px;\r\n}\r\n\r\n.upload-details span {\r\n color: #c5c8c6;\r\n font-weight: bold;\r\n}\r\n\r\n.upload-file {\r\n display: none;\r\n width: 100%;\r\n padding: 0 20px;\r\n justify-content: space-between;\r\n align-items: center;\r\n}\r\n\r\n.upload-message {\r\n white-space: normal;\r\n padding: 0 20px;\r\n word-wrap: break-word;\r\n max-width: 300px;\r\n}\r\n\r\n.upload-message.error {\r\n color: #e82e57;\r\n}\r\n\r\n.upload-button-wrapper {\r\n display: none;\r\n width: 100%;\r\n padding: 0 20px;\r\n}\r\n\r\n.upload-button {\r\n border: 0;\r\n box-shadow: none;\r\n border-radius: 0px;\r\n\r\n width: 100%;\r\n padding: 15px;\r\n background: #191919 !important;\r\n font-family: 'Trebuchet MS', Arial, sans-serif;\r\n color: #c5c8c6;\r\n border-radius: 10px;\r\n cursor: pointer;\r\n}\r\n\r\n.upload-button.transparent {\r\n background: transparent !important;\r\n padding: 10px;\r\n}\r\n\r\n.upload-progress-container {\r\n display: none;\r\n width: 100%;\r\n padding: 0 20px;\r\n}\r\n\r\n.upload-progress {\r\n height: 30px;\r\n background: linear-gradient(45deg, #c7c7c7, #ae81ff);\r\n border-radius: 5px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n\r\n.upload-progress-label {\r\n color: #282a2e !important;\r\n}\r\n\r\n/* SPINNER */\r\n\r\n.loader,\r\n.loader:after {\r\n border-radius: 50%;\r\n width: 3em;\r\n height: 3em;\r\n}\r\n.loader {\r\n font-size: 10px;\r\n position: relative;\r\n text-indent: -9999em;\r\n border-top: 0.5em solid rgba(255, 255, 255, 0.2);\r\n border-right: 0.5em solid rgba(255, 255, 255, 0.2);\r\n border-bottom: 0.5em solid rgba(255, 255, 255, 0.2);\r\n border-left: 0.5em solid #ffffff;\r\n -webkit-transform: translateZ(0);\r\n -ms-transform: translateZ(0);\r\n transform: translateZ(0);\r\n -webkit-animation: load8 1.1s infinite linear;\r\n animation: load8 1.1s infinite linear;\r\n}\r\n@-webkit-keyframes load8 {\r\n 0% {\r\n -webkit-transform: rotate(0deg);\r\n transform: rotate(0deg);\r\n }\r\n 100% {\r\n -webkit-transform: rotate(360deg);\r\n transform: rotate(360deg);\r\n }\r\n}\r\n@keyframes load8 {\r\n 0% {\r\n -webkit-transform: rotate(0deg);\r\n transform: rotate(0deg);\r\n }\r\n 100% {\r\n -webkit-transform: rotate(360deg);\r\n transform: rotate(360deg);\r\n }\r\n}\r\n"),
|
2020-03-21 13:34:37 +03:00
|
|
|
|
}
|
2020-03-28 10:19:22 +03:00
|
|
|
|
filef := &embedded.EmbeddedFile{
|
2021-06-08 16:22:14 +03:00
|
|
|
|
Filename: "upload.js",
|
|
|
|
|
FileModTime: time.Unix(1623155878, 0),
|
|
|
|
|
|
|
|
|
|
Content: string("// common variables\nlet configMaxUploadSize = window['MAX_UPLOAD_SIZE'];\nlet iBytesUploaded = 0\nlet iBytesTotal = 0\nlet iPreviousBytesLoaded = 0\nlet iMaxFilesize = configMaxUploadSize ? (+configMaxUploadSize) : (100 * 1024 * 1024); // 100MB\nlet timer = 0\nlet uploadInProgress = 'n/a'\nlet isProcessing = false\nlet file = null\n\n/* CACHED ELEMENTS */\n\nconst uploadForm = document.getElementById('upload-form')\nconst videoInput = document.getElementById('video-input')\nconst videoTitle = document.getElementById('video-title')\nconst videoDescription = document.getElementById('video-description')\nconst uploadMessageLabel = document.getElementById('upload-message')\nconst uploadFileContainer = document.getElementById('upload-file')\nconst uploadFilenameLabel = document.getElementById('upload-filename')\nconst uploadButtonWrapper = document.getElementById('upload-button-wrapper')\nconst uploadButton = document.getElementById('upload-button')\nconst uploadProgressContainer = document.getElementById('upload-progress-container')\nconst uploadProgressBar = document.getElementById('upload-progress')\nconst uploadProgressLabel = document.getElementById('upload-progress-label')\nconst uploadStopped = document.getElementById('upload-stopped')\nconst uploadStarted = document.getElementById('upload-started')\n\n/* HELPERS */\n\nconst setProgress = (_progress) => {\n uploadProgressContainer.style.display = _progress > 0 ? 'flex' : 'none'\n uploadProgressBar.style.width = `${_progress}%`\n uploadProgressLabel.innerText = _progress >= 15 ? `${_progress}%` : ''\n}\n\nconst setMessage = (_message, isError) => {\n uploadMessageLabel.style.display = _message ? 'block' : 'none'\n uploadMessageLabel.innerHTML = _message\n if (isError) {\n uploadMessageLabel.classList.add('error')\n } else {\n uploadMessageLabel.classList.remove('error')\n }\n}\n\nconst setUploadState = (_uploadInProgress) => {\n uploadInProgress = _uploadInProgress\n\n uploadStarted.style.display = _uploadInProgress ? 'inline-block' : 'none'\n uploadStopped.style.display = _uploadInProgress ? 'none' : 'block'\n\n if (_uploadInProgress) {\n uploadButton.classList.add('transparent')\n timer = setInterval(doInnerUpdates, 300)\n } else {\n uploadButton.classList.remove('transparent')\n clearInterval(timer)\n }\n}\n\nconst secondsToTime = (secs) => {\n let hr = Math.floor(secs / 3600)\n let min = Math.floor((secs - (hr * 3600)) / 60)\n let sec = Math.floor(secs - (hr * 3600) - (min * 60))\n if (hr < 10) hr = `0${hr}`\n if (min < 10) min = `0${min}`\n if (sec < 10) sec = `0${sec}`\n if (hr) hr = '00'\n return `${hr}:${min}:${sec}`\n}\n\nconst bytesToSize = (bytes) => {\n const sizes = ['Bytes', 'KB', 'MB']\n if (bytes == 0) return 'n/a'\n const i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)))\n return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i]\n}\n\nconst determineDragAndDropCapable = () => {\n const div = document.createElement('div')\n return (('draggable' in div)\n || ('ondragstart' in div && 'ondrop' in div))\n && 'FormData' in window\n && 'FileReader' in window\n}\n\n/* MAIN */\n\ndocument.addEventListener('DOMContentLoaded', () => {\n ['drag', 'dragstart', 'dragend', 'dragover', 'dragenter', 'dragleave']\n .forEach((evt) => {\n uploadForm.addEventListener(evt, (e) => {\n e.preventDefault()\n e.stopPropagation()\n })\n })\n\n uploadForm.addEventListener('drop', (e) => {\n console.log(111)\n e.preventDefault()\n e.stopPropagation()\n\n const _file = e.dataTransfer.files[0]\n if (!_file) return false\n fileSelected(_file)\n\n return false\n })\n}, false)\n\nconst labelClicked = (e) => {\n if (uploadInProgress === true || file != null) {\n e.preventDefault()\n return false\n }\n}\n\nconst fileSelected = (_file) => {\n const fileObj = _file |
|
2020-03-21 02:55:06 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// define dirs
|
2020-10-16 01:21:49 +03:00
|
|
|
|
dir6 := &embedded.EmbeddedDir{
|
2021-06-08 16:22:14 +03:00
|
|
|
|
Filename: "",
|
|
|
|
|
DirModTime: time.Unix(1623157074, 0),
|
2020-03-21 02:55:06 +03:00
|
|
|
|
ChildFiles: []*embedded.EmbeddedFile{
|
2021-06-08 16:22:14 +03:00
|
|
|
|
file7, // "close-icon.png"
|
|
|
|
|
file8, // "defaulticon.jpg"
|
|
|
|
|
file9, // "favicon.ico"
|
|
|
|
|
filea, // "import.css"
|
|
|
|
|
fileb, // "import.js"
|
|
|
|
|
filec, // "theme.css"
|
|
|
|
|
filed, // "upload-icon.png"
|
|
|
|
|
filee, // "upload.css"
|
|
|
|
|
filef, // "upload.js"
|
2020-03-21 02:55:06 +03:00
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// link ChildDirs
|
2020-10-16 01:21:49 +03:00
|
|
|
|
dir6.ChildDirs = []*embedded.EmbeddedDir{}
|
2020-03-21 02:55:06 +03:00
|
|
|
|
|
|
|
|
|
// register embeddedBox
|
2020-10-16 01:21:49 +03:00
|
|
|
|
embedded.RegisterEmbeddedBox(`../static`, &embedded.EmbeddedBox{
|
|
|
|
|
Name: `../static`,
|
2021-06-08 16:22:14 +03:00
|
|
|
|
Time: time.Unix(1623157074, 0),
|
2020-03-21 02:55:06 +03:00
|
|
|
|
Dirs: map[string]*embedded.EmbeddedDir{
|
2020-10-16 01:21:49 +03:00
|
|
|
|
"": dir6,
|
2020-03-21 02:55:06 +03:00
|
|
|
|
},
|
|
|
|
|
Files: map[string]*embedded.EmbeddedFile{
|
2020-10-16 01:21:49 +03:00
|
|
|
|
"close-icon.png": file7,
|
|
|
|
|
"defaulticon.jpg": file8,
|
|
|
|
|
"favicon.ico": file9,
|
|
|
|
|
"import.css": filea,
|
|
|
|
|
"import.js": fileb,
|
|
|
|
|
"theme.css": filec,
|
|
|
|
|
"upload-icon.png": filed,
|
|
|
|
|
"upload.css": filee,
|
|
|
|
|
"upload.js": filef,
|
2020-03-21 02:55:06 +03:00
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
}
|