package dist import ( "bytes" "net/http" "os" "strings" "time" ) type fileSystem struct { files map[string]file } func (fs *fileSystem) Open(name string) (http.File, error) { name = strings.Replace(name, "//", "/", -1) f, ok := fs.files[name] if ok { return newHTTPFile(f, false), nil } index := strings.Replace(name+"/index.html", "//", "/", -1) f, ok = fs.files[index] if !ok { return nil, os.ErrNotExist } return newHTTPFile(f, true), nil } type file struct { os.FileInfo data []byte } type fileInfo struct { name string size int64 mode os.FileMode modTime time.Time isDir bool files []os.FileInfo } func (f *fileInfo) Name() string { return f.name } func (f *fileInfo) Size() int64 { return f.size } func (f *fileInfo) Mode() os.FileMode { return f.mode } func (f *fileInfo) ModTime() time.Time { return f.modTime } func (f *fileInfo) IsDir() bool { return f.isDir } func (f *fileInfo) Readdir(count int) ([]os.FileInfo, error) { return make([]os.FileInfo, 0), nil } func (f *fileInfo) Sys() interface{} { return nil } func newHTTPFile(file file, isDir bool) *httpFile { return &httpFile{ file: file, reader: bytes.NewReader(file.data), isDir: isDir, } } type httpFile struct { file reader *bytes.Reader isDir bool } func (f *httpFile) Read(p []byte) (n int, err error) { return f.reader.Read(p) } func (f *httpFile) Seek(offset int64, whence int) (ret int64, err error) { return f.reader.Seek(offset, whence) } func (f *httpFile) Stat() (os.FileInfo, error) { return f, nil } func (f *httpFile) IsDir() bool { return f.isDir } func (f *httpFile) Readdir(count int) ([]os.FileInfo, error) { return make([]os.FileInfo, 0), nil } func (f *httpFile) Close() error { return nil } // New returns an embedded http.FileSystem func New() http.FileSystem { return &fileSystem{ files: files, } } // Lookup returns the file at the specified path func Lookup(path string) ([]byte, error) { f, ok := files[path] if !ok { return nil, os.ErrNotExist } return f.data, nil } // MustLookup returns the file at the specified path // and panics if the file is not found. func MustLookup(path string) []byte { d, err := Lookup(path) if err != nil { panic(err) } return d } // Index of all files var files = map[string]file{ "/static/bundle.808a5c44050d60e33a59.js": { data: file0, FileInfo: &fileInfo{ name: "bundle.808a5c44050d60e33a59.js", size: 374585, modTime: time.Unix(1573591236, 0), }, }, "/static/vendor.7f216335d46eed670011.js": { data: file1, FileInfo: &fileInfo{ name: "vendor.7f216335d46eed670011.js", size: 272277, modTime: time.Unix(1573591236, 0), }, }, "/favicon.png": { data: file2, FileInfo: &fileInfo{ name: "favicon.png", size: 1374, modTime: time.Unix(1573591236, 0), }, }, "/index.html": { data: file3, FileInfo: &fileInfo{ name: "index.html", size: 388, modTime: time.Unix(1573591236, 0), }, }, } // // embedded files. // // /static/bundle.808a5c44050d60e33a59.js var file0 = []byte(`webpackJsonp([0],[ /* 0 */, /* 1 */, /* 2 */, /* 3 */ /***/ (function(module, exports) { /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ // css base code, injected by the css-loader module.exports = function(useSourceMap) { var list = []; // return the list of modules as css string list.toString = function toString() { return this.map(function (item) { var content = cssWithMappingToString(item, useSourceMap); if(item[2]) { return "@media " + item[2] + "{" + content + "}"; } else { return content; } }).join(""); }; // import a list of modules into the list list.i = function(modules, mediaQuery) { if(typeof modules === "string") modules = [[null, modules, ""]]; var alreadyImportedModules = {}; for(var i = 0; i < this.length; i++) { var id = this[i][0]; if(typeof id === "number") alreadyImportedModules[id] = true; } for(i = 0; i < modules.length; i++) { var item = modules[i]; // skip already imported module // this implementation is not 100% perfect for weird media query combinations // when a module is imported multiple times with different media queries. // I hope this will never occur (Hey this way we have smaller bundles) if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { if(mediaQuery && !item[2]) { item[2] = mediaQuery; } else if(mediaQuery) { item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; } list.push(item); } } }; return list; }; function cssWithMappingToString(item, useSourceMap) { var content = item[1] || ''; var cssMapping = item[3]; if (!cssMapping) { return content; } if (useSourceMap && typeof btoa === 'function') { var sourceMapping = toComment(cssMapping); var sourceURLs = cssMapping.sources.map(function (source) { return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */' }); return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); } return [content].join('\n'); } // Adapted from convert-source-map (MIT) function toComment(sourceMap) { // eslint-disable-next-line no-undef var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; return '/*# ' + data + ' */'; } /***/ }), /* 4 */ /***/ (function(module, exports, __webpack_require__) { /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ var stylesInDom = {}; var memoize = function (fn) { var memo; return function () { if (typeof memo === "undefined") memo = fn.apply(this, arguments); return memo; }; }; var isOldIE = memoize(function () { // Test for IE <= 9 as proposed by Browserhacks // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 // Tests for existence of standard globals is to allow style-loader // to operate correctly into non-standard environments // @see https://github.com/webpack-contrib/style-loader/issues/177 return window && document && document.all && !window.atob; }); var getElement = (function (fn) { var memo = {}; return function(selector) { if (typeof memo[selector] === "undefined") { memo[selector] = fn.call(this, selector); } return memo[selector] }; })(function (target) { return document.querySelector(target) }); var singleton = null; var singletonCounter = 0; var stylesInsertedAtTop = []; var fixUrls = __webpack_require__(415); module.exports = function(list, options) { if (typeof DEBUG !== "undefined" && DEBUG) { if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment"); } options = options || {}; options.attrs = typeof options.attrs === "object" ? options.attrs : {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of