From 7b41f0be7538cd141d452a0095811a88c0191357 Mon Sep 17 00:00:00 2001 From: Tony Air Date: Sun, 31 Jan 2021 18:51:51 +0700 Subject: [PATCH] IMPR: linting updates --- .eslintignore | 2 +- .eslintrc | 262 ------------------------------------------- babel.config.json | 27 +++++ dist/index.html | 2 +- dist/js/app.js | 2 +- dist/records.json | 134 +++++++++++----------- dist/report.html | 4 +- eslint.config.json | 272 +++++++++++++++++++++++++++++++++++++++++++++ package.json | 30 ++--- sass-lint.yml | 173 ++++++++++++++++++++++++++++ src/index.html | 12 +- 11 files changed, 567 insertions(+), 353 deletions(-) delete mode 100755 .eslintrc create mode 100644 babel.config.json create mode 100755 eslint.config.json create mode 100755 sass-lint.yml diff --git a/.eslintignore b/.eslintignore index 2606ccd..60c1214 100755 --- a/.eslintignore +++ b/.eslintignore @@ -1 +1 @@ -/site/client \ No newline at end of file +/src/thirdparty \ No newline at end of file diff --git a/.eslintrc b/.eslintrc deleted file mode 100755 index 3c43d62..0000000 --- a/.eslintrc +++ /dev/null @@ -1,262 +0,0 @@ -{ - // http://eslint.org/docs/rules/ - "extends": "eslint:recommended", - - "settings": { - "react": { - "version": "detect" - } - }, - - "env": { - "browser": true, // browser global variables. - "node": true, // Node.js global variables and Node.js-specific rules. - "amd": true, // defines require() and define() as global variables as per the amd spec. - "mocha": false, // adds all of the Mocha testing global variables. - "jasmine": false, // adds all of the Jasmine testing global variables for version 1.3 and 2.0. - "phantomjs": false, // phantomjs global variables. - "jquery": true, // jquery global variables. - "prototypejs": false, // prototypejs global variables. - "shelljs": false, // shelljs global variables. - "es6": true - }, - - "globals": { - // e.g. "angular": true - }, - - "plugins": [ - "react", - "import", - "jquery" - ], - - "parser": "babel-eslint", - - "parserOptions": { - "ecmaVersion": 6, - "sourceType": "module", - "ecmaFeatures": { - "jsx": true, - "experimentalObjectRestSpread": true - } - }, - - "rules": { - ////////// Possible Errors ////////// - - "no-comma-dangle": 0, // disallow trailing commas in object literals - "no-cond-assign": 0, // disallow assignment in conditional expressions - "no-console": 0, // disallow use of console (off by default in the node environment) - "no-constant-condition": 0, // disallow use of constant expressions in conditions - "no-control-regex": 0, // disallow control characters in regular expressions - "no-debugger": 0, // disallow use of debugger - "no-dupe-keys": 0, // disallow duplicate keys when creating object literals - "no-empty": 0, // disallow empty statements - "no-empty-class": 0, // disallow the use of empty character classes in regular expressions - "no-ex-assign": 0, // disallow assigning to the exception in a catch block - "no-extra-boolean-cast": 0, // disallow double-negation boolean casts in a boolean context - "no-extra-parens": 0, // disallow unnecessary parentheses (off by default) - "no-extra-semi": 0, // disallow unnecessary semicolons - "no-func-assign": 0, // disallow overwriting functions written as function declarations - "no-inner-declarations": 0, // disallow function or variable declarations in nested blocks - "no-invalid-regexp": 0, // disallow invalid regular expression strings in the RegExp constructor - "no-irregular-whitespace": 0, // disallow irregular whitespace outside of strings and comments - "no-negated-in-lhs": 0, // disallow negation of the left operand of an in expression - "no-obj-calls": 0, // disallow the use of object properties of the global object (Math and JSON) as functions - "no-regex-spaces": 0, // disallow multiple spaces in a regular expression literal - "no-reserved-keys": 0, // disallow reserved words being used as object literal keys (off by default) - "no-sparse-arrays": 0, // disallow sparse arrays - "no-unreachable": 0, // disallow unreachable statements after a return, throw, continue, or break statement - "use-isnan": 0, // disallow comparisons with the value NaN - "valid-jsdoc": 0, // Ensure JSDoc comments are valid (off by default) - "valid-typeof": 0, // Ensure that the results of typeof are compared against a valid string - - - ////////// Best Practices ////////// - - "block-scoped-var": 0, // treat var statements as if they were block scoped (off by default) - "complexity": 0, // specify the maximum cyclomatic complexity allowed in a program (off by default) - "consistent-return": 0, // require return statements to either always or never specify values - "curly": 0, // specify curly brace conventions for all control statements - "default-case": 0, // require default case in switch statements (off by default) - "dot-notation": 0, // encourages use of dot notation whenever possible - "eqeqeq": 0, // require the use of === and !== - "guard-for-in": 0, // make sure for-in loops have an if statement (off by default) - "no-alert": 0, // disallow the use of alert, confirm, and prompt - "no-caller": 0, // disallow use of arguments.caller or arguments.callee - "no-div-regex": 0, // disallow division operators explicitly at beginning of regular expression (off by default) - "no-else-return": 0, // disallow else after a return in an if (off by default) - "no-empty-label": 0, // disallow use of labels for anything other then loops and switches - "no-eq-null": 0, // disallow comparisons to null without a type-checking operator (off by default) - "no-eval": 0, // disallow use of eval() - "no-extend-native": 0, // disallow adding to native types - "no-extra-bind": 0, // disallow unnecessary function binding - "no-fallthrough": 0, // disallow fallthrough of case statements - "no-floating-decimal": 0, // disallow the use of leading or trailing decimal points in numeric literals (off by default) - "no-implied-eval": 0, // disallow use of eval()-like methods - "no-iterator": 0, // disallow usage of __iterator__ property - "no-labels": 0, // disallow use of labeled statements - "no-lone-blocks": 0, // disallow unnecessary nested blocks - "no-loop-func": 0, // disallow creation of functions within loops - "no-multi-spaces": 0, // disallow use of multiple spaces - "no-multi-str": 0, // disallow use of multiline strings - "no-native-reassign": 0, // disallow reassignments of native objects - "no-new": 0, // disallow use of new operator when not part of the assignment or comparison - "no-new-func": 0, // disallow use of new operator for Function object - "no-new-wrappers": 0, // disallows creating new instances of String, Number, and Boolean - "no-octal": 0, // disallow use of octal literals - "no-octal-escape": 0, // disallow use of octal escape sequences in string literals, such as var foo = "Copyright \251"; - "no-process-env": 0, // disallow use of process.env (off by default) - "no-proto": 0, // disallow usage of __proto__ property - "no-redeclare": 0, // disallow declaring the same variable more then once - "no-return-assign": 0, // disallow use of assignment in return statement - "no-script-url": 0, // disallow use of javascript: urls. - "no-self-compare": 0, // disallow comparisons where both sides are exactly the same (off by default) - "no-sequences": 0, // disallow use of comma operator - "no-unused-expressions": 0, // disallow usage of expressions in statement position - "no-void": 0, // disallow use of void operator (off by default) - "no-warning-comments": 0, // disallow usage of configurable warning terms in comments, e.g. TODO or FIXME (off by default) - "no-with": 0, // disallow use of the with statement - "radix": 0, // require use of the second argument for parseInt() (off by default) - "vars-on-top": 0, // requires to declare all vars on top of their containing scope (off by default) - "wrap-iife": 0, // require immediate function invocation to be wrapped in parentheses (off by default) - "yoda": 0, // require or disallow Yoda conditions - - - ////////// Strict Mode ////////// - - "global-strict": 0, // (deprecated) require or disallow the "use strict" pragma in the global scope (off by default in the node environment) - "no-extra-strict": 0, // (deprecated) disallow unnecessary use of "use strict"; when already in strict mode - "strict": 0, // controls location of Use Strict Directives - - - ////////// Variables ////////// - - "no-catch-shadow": 0, // disallow the catch clause parameter name being the same as a variable in the outer scope (off by default in the node environment) - "no-delete-var": 0, // disallow deletion of variables - "no-label-var": 0, // disallow labels that share a name with a variable - "no-shadow": 0, // disallow declaration of variables already declared in the outer scope - "no-shadow-restricted-names": 0, // disallow shadowing of names such as arguments - "no-undef": 0, // disallow use of undeclared variables unless mentioned in a /*global */ block - "no-undef-init": 0, // disallow use of undefined when initializing variables - "no-undefined": 0, // disallow use of undefined variable (off by default) - "no-unused-vars": 0, // disallow declaration of variables that are not used in the code - "no-use-before-define": 0, // disallow use of variables before they are defined - - - ////////// Node.js ////////// - - "handle-callback-err": 0, // enforces error handling in callbacks (off by default) (on by default in the node environment) - "no-mixed-requires": 0, // disallow mixing regular variable and require declarations (off by default) (on by default in the node environment) - "no-new-require": 0, // disallow use of new operator with the require function (off by default) (on by default in the node environment) - "no-path-concat": 0, // disallow string concatenation with __dirname and __filename (off by default) (on by default in the node environment) - "no-process-exit": 0, // disallow process.exit() (on by default in the node environment) - "no-restricted-modules": 0, // restrict usage of specified node modules (off by default) - "no-sync": 0, // disallow use of synchronous methods (off by default) - - - ////////// Stylistic Issues ////////// - - "brace-style": 0, // enforce one true brace style (off by default) - "camelcase": 0, // require camel case names - "comma-spacing": 0, // enforce spacing before and after comma - "comma-style": 0, // enforce one true comma style (off by default) - "consistent-this": 0, // enforces consistent naming when capturing the current execution context (off by default) - "eol-last": 0, // enforce newline at the end of file, with no multiple empty lines - "func-names": 0, // require function expressions to have a name (off by default) - "func-style": 0, // enforces use of function declarations or expressions (off by default) - "key-spacing": 0, // enforces spacing between keys and values in object literal properties - "max-nested-callbacks": 0, // specify the maximum depth callbacks can be nested (off by default) - "new-cap": 0, // require a capital letter for constructors - "new-parens": 0, // disallow the omission of parentheses when invoking a constructor with no arguments - "no-array-constructor": 0, // disallow use of the Array constructor - "no-inline-comments": 0, // disallow comments inline after code (off by default) - "no-lonely-if": 0, // disallow if as the only statement in an else block (off by default) - "no-mixed-spaces-and-tabs": 0, // disallow mixed spaces and tabs for indentation - "no-multiple-empty-lines": 0, // disallow multiple empty lines (off by default) - "no-nested-ternary": 0, // disallow nested ternary expressions (off by default) - "no-new-object": 0, // disallow use of the Object constructor - "no-space-before-semi": 0, // disallow space before semicolon - "no-spaced-func": 0, // disallow space between function identifier and application - "no-ternary": 0, // disallow the use of ternary operators (off by default) - "no-trailing-spaces": 0, // disallow trailing whitespace at the end of lines - "no-underscore-dangle": 0, // disallow dangling underscores in identifiers - "no-wrap-func": 0, // disallow wrapping of non-IIFE statements in parens - "one-var": 0, // allow just one var statement per function (off by default) - "operator-assignment": 0, // require assignment operator shorthand where possible or prohibit it entirely (off by default) - "padded-blocks": 0, // enforce padding within blocks (off by default) - "quote-props": 0, // require quotes around object literal property names (off by default) - "quotes": 0, // specify whether double or single quotes should be used - "semi": 0, // require or disallow use of semicolons instead of ASI - "sort-vars": 0, // sort variables within the same declaration block (off by default) - "space-after-function-name": 0, // require a space after function names (off by default) - "space-after-keywords": 0, // require a space after certain keywords (off by default) - "space-before-blocks": 0, // require or disallow space before blocks (off by default) - "space-in-brackets": 0, // require or disallow spaces inside brackets (off by default) - "space-in-parens": 0, // require or disallow spaces inside parentheses (off by default) - "space-infix-ops": 0, // require spaces around operators - "space-return-throw-case": 0, // require a space after return, throw, and case - "space-unary-ops": 0, // Require or disallow spaces before/after unary operators (words on by default, nonwords off by default) - "spaced-line-comment": 0, // require or disallow a space immediately following the // in a line comment (off by default) - "wrap-regex": 0, // require regex literals to be wrapped in parentheses (off by default) - - - ////////// ECMAScript 6 ////////// - - "no-var": 0, // require let or const instead of var (off by default) - "generator-star": 0, // enforce the position of the * in generator functions (off by default) - - - ////////// Legacy ////////// - - "max-depth": 0, // specify the maximum depth that blocks can be nested (off by default) - "max-len": 0, // specify the maximum length of a line in your program (off by default) - "max-params": 0, // limits the number of parameters that can be used in the function declaration. (off by default) - "max-statements": 0, // specify the maximum number of statement allowed in a function (off by default) - "no-bitwise": 0, // disallow use of bitwise operators (off by default) - "no-plusplus": 0, // disallow use of unary operators, ++ and -- (off by default) - - //////// Extra ////////// - "array-bracket-spacing": ["error", "never"], - "array-callback-return": "error", - "arrow-parens": ["error", "always"], - "arrow-spacing": ["error", { "before": true, "after": true }], - "comma-dangle": ["error", "always-multiline"], - "indent": ["error", 2, { "SwitchCase": 1 }], - "no-case-declarations": "error", - "no-confusing-arrow": "error", - "no-duplicate-imports": "error", - "no-param-reassign": "error", - "no-useless-escape": "error", - "object-curly-spacing": ["error", "always"], - "object-shorthand": ["error", "properties"], - "prefer-arrow-callback": "error", - "prefer-const": "error", - "prefer-template": "error", - "react/jsx-closing-bracket-location": "error", - "react/jsx-curly-spacing": ["error", "never", {"allowMultiline": true}], - "react/jsx-filename-extension": ["error", { "extensions": [".react.js", ".js", ".jsx"] }], - "react/jsx-no-duplicate-props": "error", - "react/jsx-no-bind": ["error", { "ignoreRefs": true, "allowArrowFunctions": true, "allowBind": false }], - "react/jsx-no-undef": "error", - "react/jsx-pascal-case": "error", - "react/jsx-tag-spacing": ["error", {"closingSlash": "never", "beforeSelfClosing": "always", "afterOpening": "never"}], - "react/jsx-uses-react": "error", - "react/jsx-uses-vars": "error", - "react/no-danger": "error", - "react/no-deprecated": "error", - "react/no-did-mount-set-state": "error", - "react/no-did-update-set-state": "error", - "react/no-direct-mutation-state": "error", - "react/no-is-mounted": "error", - "react/no-multi-comp": "error", - "react/prefer-es6-class": "error", - "react/prop-types": "error", - "react/require-render-return": "error", - "react/self-closing-comp": "error", - "react/sort-comp": "error", - "import/no-mutable-exports": "error", - "import/imports-first": "warn" - } -} \ No newline at end of file diff --git a/babel.config.json b/babel.config.json new file mode 100644 index 0000000..3b7f619 --- /dev/null +++ b/babel.config.json @@ -0,0 +1,27 @@ +{ + "presets": [ + [ + "@babel/preset-env", + { + "targets": { + "node": "6.10", + "esmodules": true + } + } + ], + [ + "@babel/preset-react", + { + "pragma": "dom", // default pragma is React.createElement (only in classic runtime) + "pragmaFrag": "DomFrag", // default is React.Fragment (only in classic runtime) + "throwIfNamespace": false, // defaults to true + "runtime": "classic" // defaults to classic + // "importSource": "custom-jsx-library" // defaults to react (only in automatic runtime) + } + ] + ], + "plugins": [ + "@babel/plugin-proposal-object-rest-spread", + "@babel/plugin-syntax-jsx" + ] +} diff --git a/dist/index.html b/dist/index.html index 4f51ba6..ece4b96 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1,3 +1,3 @@ Meta-lightbox Demo

Meta-lightbox Demo

NODE_ENV: production

Loading data

Load an Image
Load JSON
Load Partial AJAX HTML
Not Found test

Embeds

Embed Youtube link
Embed Vimeo link
Embed SoundCloud link
Embed Instagram

Other

Use [data-toggle="lightbox"] attribute to attach lightbox action and [href] to specify URL.

Use [data-gallery="YOUR_GALLERY_NAME"] to group ligthboxes with next/prev arrows

Use [data-toggle="lightbox"] + [data-href] attribute to toggle lightbox on regular elements. Click me!

\ No newline at end of file + }

Meta-lightbox Demo

NODE_ENV: production

Loading data

Load an Image
Load JSON
Load Partial AJAX HTML
Not Found test

Embeds

Embed Youtube link
Embed Vimeo link
Embed SoundCloud link
Embed Instagram

Other

Use [data-toggle="lightbox"] attribute to attach lightbox action and [href] to specify URL.

Use [data-gallery="YOUR_GALLERY_NAME"] to group ligthboxes with next/prev arrows

Use [data-toggle="lightbox"] + [data-href] attribute to toggle lightbox on regular elements. Click me!

\ No newline at end of file diff --git a/dist/js/app.js b/dist/js/app.js index 7ff43f8..2c5747b 100644 --- a/dist/js/app.js +++ b/dist/js/app.js @@ -1 +1 @@ -!function(){var e={940:function(e,t,r){e.exports=r(412)},355:function(e,t,r){"use strict";var n=r(854),i=r(706),h=r(575),d=r(778),g=r(205),y=r(17),b=r(426),v=r(348);e.exports=function xhrAdapter(e){return new Promise((function dispatchXhrRequest(t,r){var w=e.data,_=e.headers;n.isFormData(w)&&delete _["Content-Type"];var x=new XMLHttpRequest;if(e.auth){var E=e.auth.username||"",S=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";_.Authorization="Basic "+btoa(E+":"+S)}var C=g(e.baseURL,e.url);if(x.open(e.method.toUpperCase(),d(C,e.params,e.paramsSerializer),!0),x.timeout=e.timeout,x.onreadystatechange=function handleLoad(){if(x&&4===x.readyState&&(0!==x.status||x.responseURL&&0===x.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in x?y(x.getAllResponseHeaders()):null,h={data:e.responseType&&"text"!==e.responseType?x.response:x.responseText,status:x.status,statusText:x.statusText,headers:n,config:e,request:x};i(t,r,h),x=null}},x.onabort=function handleAbort(){x&&(r(v("Request aborted",e,"ECONNABORTED",x)),x=null)},x.onerror=function handleError(){r(v("Network Error",e,null,x)),x=null},x.ontimeout=function handleTimeout(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(v(t,e,"ECONNABORTED",x)),x=null},n.isStandardBrowserEnv()){var A=(e.withCredentials||b(C))&&e.xsrfCookieName?h.read(e.xsrfCookieName):void 0;A&&(_[e.xsrfHeaderName]=A)}if("setRequestHeader"in x&&n.forEach(_,(function setRequestHeader(e,t){"undefined"===typeof w&&"content-type"===t.toLowerCase()?delete _[t]:x.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(x.withCredentials=!!e.withCredentials),e.responseType)try{x.responseType=e.responseType}catch(R){if("json"!==e.responseType)throw R}"function"===typeof e.onDownloadProgress&&x.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&x.upload&&x.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function onCanceled(e){x&&(x.abort(),r(e),x=null)})),w||(w=null),x.send(w)}))}},412:function(e,t,r){"use strict";var n=r(854),i=r(810),h=r(769),d=r(624);function createInstance(e){var t=new h(e),r=i(h.prototype.request,t);return n.extend(r,h.prototype,t),n.extend(r,t),r}var g=createInstance(r(339));g.Axios=h,g.create=function create(e){return createInstance(d(g.defaults,e))},g.Cancel=r(499),g.CancelToken=r(294),g.isCancel=r(949),g.all=function all(e){return Promise.all(e)},g.spread=r(656),g.isAxiosError=r(606),e.exports=g,e.exports.default=g},499:function(e){"use strict";function Cancel(e){this.message=e}Cancel.prototype.toString=function toString(){return"Cancel"+(this.message?": "+this.message:"")},Cancel.prototype.__CANCEL__=!0,e.exports=Cancel},294:function(e,t,r){"use strict";var n=r(499);function CancelToken(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function promiseExecutor(e){t=e}));var r=this;e((function cancel(e){r.reason||(r.reason=new n(e),t(r.reason))}))}CancelToken.prototype.throwIfRequested=function throwIfRequested(){if(this.reason)throw this.reason},CancelToken.source=function source(){var e;return{token:new CancelToken((function executor(t){e=t})),cancel:e}},e.exports=CancelToken},949:function(e){"use strict";e.exports=function isCancel(e){return!(!e||!e.__CANCEL__)}},769:function(e,t,r){"use strict";var n=r(854),i=r(778),h=r(637),d=r(736),g=r(624);function Axios(e){this.defaults=e,this.interceptors={request:new h,response:new h}}Axios.prototype.request=function request(e){"string"===typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=g(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[d,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach((function unshiftRequestInterceptors(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function pushResponseInterceptors(e){t.push(e.fulfilled,e.rejected)}));t.length;)r=r.then(t.shift(),t.shift());return r},Axios.prototype.getUri=function getUri(e){return e=g(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function forEachMethodNoData(e){Axios.prototype[e]=function(t,r){return this.request(g(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function forEachMethodWithData(e){Axios.prototype[e]=function(t,r,n){return this.request(g(n||{},{method:e,url:t,data:r}))}})),e.exports=Axios},637:function(e,t,r){"use strict";var n=r(854);function InterceptorManager(){this.handlers=[]}InterceptorManager.prototype.use=function use(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},InterceptorManager.prototype.eject=function eject(e){this.handlers[e]&&(this.handlers[e]=null)},InterceptorManager.prototype.forEach=function forEach(e){n.forEach(this.handlers,(function forEachHandler(t){null!==t&&e(t)}))},e.exports=InterceptorManager},205:function(e,t,r){"use strict";var n=r(797),i=r(75);e.exports=function buildFullPath(e,t){return e&&!n(t)?i(e,t):t}},348:function(e,t,r){"use strict";var n=r(177);e.exports=function createError(e,t,r,i,h){var d=new Error(e);return n(d,t,r,i,h)}},736:function(e,t,r){"use strict";var n=r(854),i=r(92),h=r(949),d=r(339);function throwIfCancellationRequested(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function dispatchRequest(e){return throwIfCancellationRequested(e),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function cleanHeaderConfig(t){delete e.headers[t]})),(e.adapter||d.adapter)(e).then((function onAdapterResolution(t){return throwIfCancellationRequested(e),t.data=i(t.data,t.headers,e.transformResponse),t}),(function onAdapterRejection(t){return h(t)||(throwIfCancellationRequested(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},177:function(e){"use strict";e.exports=function enhanceError(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e.isAxiosError=!0,e.toJSON=function toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},624:function(e,t,r){"use strict";var n=r(854);e.exports=function mergeConfig(e,t){t=t||{};var r={},i=["url","method","data"],h=["headers","auth","proxy","params"],d=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],g=["validateStatus"];function getMergedValue(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function mergeDeepProperties(i){n.isUndefined(t[i])?n.isUndefined(e[i])||(r[i]=getMergedValue(void 0,e[i])):r[i]=getMergedValue(e[i],t[i])}n.forEach(i,(function valueFromConfig2(e){n.isUndefined(t[e])||(r[e]=getMergedValue(void 0,t[e]))})),n.forEach(h,mergeDeepProperties),n.forEach(d,(function defaultToConfig2(i){n.isUndefined(t[i])?n.isUndefined(e[i])||(r[i]=getMergedValue(void 0,e[i])):r[i]=getMergedValue(void 0,t[i])})),n.forEach(g,(function merge(n){n in t?r[n]=getMergedValue(e[n],t[n]):n in e&&(r[n]=getMergedValue(void 0,e[n]))}));var y=i.concat(h).concat(d).concat(g),b=Object.keys(e).concat(Object.keys(t)).filter((function filterAxiosKeys(e){return-1===y.indexOf(e)}));return n.forEach(b,mergeDeepProperties),r}},706:function(e,t,r){"use strict";var n=r(348);e.exports=function settle(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},92:function(e,t,r){"use strict";var n=r(854);e.exports=function transformData(e,t,r){return n.forEach(r,(function transform(r){e=r(e,t)})),e}},339:function(e,t,r){"use strict";var n=r(854),i=r(852),h={"Content-Type":"application/x-www-form-urlencoded"};function setContentTypeIfUnset(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var d={adapter:function getDefaultAdapter(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(e=r(355)),e}(),transformRequest:[function transformRequest(e,t){return i(t,"Accept"),i(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(setContentTypeIfUnset(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(setContentTypeIfUnset(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function transformResponse(e){if("string"===typeof e)try{e=JSON.parse(e)}catch(t){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function validateStatus(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function forEachMethodNoData(e){d.headers[e]={}})),n.forEach(["post","put","patch"],(function forEachMethodWithData(e){d.headers[e]=n.merge(h)})),e.exports=d},810:function(e){"use strict";e.exports=function bind(e,t){return function wrap(){for(var r=new Array(arguments.length),n=0;n=0)return;d[t]="set-cookie"===t?(d[t]?d[t]:[]).concat([r]):d[t]?d[t]+", "+r:r}})),d):d}},656:function(e){"use strict";e.exports=function spread(e){return function wrap(t){return e.apply(null,t)}}},854:function(e,t,r){"use strict";function _typeof(e){return(_typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var n=r(810),i=Object.prototype.toString;function isArray(e){return"[object Array]"===i.call(e)}function isUndefined(e){return"undefined"===typeof e}function isObject(e){return null!==e&&"object"===_typeof(e)}function isPlainObject(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function isFunction(e){return"[object Function]"===i.call(e)}function forEach(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==_typeof(e)&&(e=[e]),isArray(e))for(var r=0,n=e.length;r=0&&b>0){for(n=[],h=r.length;v>=0&&!g;)v==y?(n.push(v),y=r.indexOf(e,v+1)):1==n.length?g=[n.pop(),b]:((i=n.pop())=0?y:b;n.length&&(g=[h,d])}return g}e.exports=balanced,balanced.range=range},281:function(e,t,r){var n=r(524);e.exports=function expandTop(e){if(!e)return[];"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return expand(function escapeBraces(e){return e.split("\\\\").join(i).split("\\{").join(h).split("\\}").join(d).split("\\,").join(g).split("\\.").join(y)}(e),!0).map(unescapeBraces)};var i="\0SLASH"+Math.random()+"\0",h="\0OPEN"+Math.random()+"\0",d="\0CLOSE"+Math.random()+"\0",g="\0COMMA"+Math.random()+"\0",y="\0PERIOD"+Math.random()+"\0";function numeric(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function unescapeBraces(e){return e.split(i).join("\\").split(h).join("{").split(d).join("}").split(g).join(",").split(y).join(".")}function parseCommaParts(e){if(!e)return[""];var t=[],r=n("{","}",e);if(!r)return e.split(",");var i=r.pre,h=r.body,d=r.post,g=i.split(",");g[g.length-1]+="{"+h+"}";var y=parseCommaParts(d);return d.length&&(g[g.length-1]+=y.shift(),g.push.apply(g,y)),t.push.apply(t,g),t}function embrace(e){return"{"+e+"}"}function isPadded(e){return/^-?0\d/.test(e)}function lte(e,t){return e<=t}function gte(e,t){return e>=t}function expand(e,t){var r=[],i=n("{","}",e);if(!i||/\$$/.test(i.pre))return[e];var h,g=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),y=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),b=g||y,v=i.body.indexOf(",")>=0;if(!b&&!v)return i.post.match(/,.*\}/)?expand(e=i.pre+"{"+i.body+d+i.post):[e];if(b)h=i.body.split(/\.\./);else if(1===(h=parseCommaParts(i.body)).length&&1===(h=expand(h[0],!1).map(embrace)).length)return(x=i.post.length?expand(i.post,!1):[""]).map((function(e){return i.pre+h[0]+e}));var w,_=i.pre,x=i.post.length?expand(i.post,!1):[""];if(b){var E=numeric(h[0]),S=numeric(h[1]),C=Math.max(h[0].length,h[1].length),A=3==h.length?Math.abs(numeric(h[2])):1,R=lte;S0){var P=new Array(k+1).join("0");T=O<0?"-"+P+T.slice(1):P+T}}w.push(T)}}else{w=[];for(var I=0;I65536)throw new TypeError("pattern is too long");var r=this.options;if(!r.noglobstar&&"**"===e)return i;if(""===e)return"";var n,h="",v=!!r.nocase,x=!1,E=[],S=[],C=!1,A=-1,R=-1,j="."===e.charAt(0)?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",O=this;function clearStateChar(){if(n){switch(n){case"*":h+=y,v=!0;break;case"?":h+=g,v=!0;break;default:h+="\\"+n}O.debug("clearStateChar %j %j",n,h),n=!1}}for(var T,k=0,P=e.length;k-1;B--){var z=S[B],D=h.slice(0,z.reStart),F=h.slice(z.reStart,z.reEnd-8),H=h.slice(z.reEnd-8,z.reEnd),V=h.slice(z.reEnd);H+=V;var W=D.split("(").length-1,G=V;for(k=0;k=0&&!(i=e[h]);h--);for(h=0;h>> no match, partial?",e,_,t,x),_!==g))}if("string"===typeof v?(b=n.nocase?w.toLowerCase()===v.toLowerCase():w===v,this.debug("string match",v,w,b)):(b=w.match(v),this.debug("pattern match",v,w,b)),!b)return!1}if(h===g&&d===y)return!0;if(h===g)return r;if(d===y)return h===g-1&&""===e[h];throw new Error("wtf?")}},668:function(e,t,r){var n,i,h,d;function _typeof(e){return(_typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}d=function(e,t,r,n){"use strict";function o(e){return e&&"object"==_typeof(e)&&"default"in e?e:{default:e}}var i=o(t),h=o(r),d=o(n),g=function a(){return(g=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])||6!==h[0]&&2!==h[0])){d=0;continue}if(3===h[0]&&(!i||h[1]>i[0]&&h[1]e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?n--:n=e.state.collections[t].length-1,e.state.collections[t][n].click()})),_defineProperty(_assertThisInitialized(r),"reset",(function(){_assertThisInitialized(r).setState({content:"",type:[],shown:!1,loading:!1,error:!1,embed:!1})})),_defineProperty(_assertThisInitialized(r),"embed",(function(e){var t=_assertThisInitialized(r);console.log("".concat(t.name,": embed")),t.reset(),t.setState({embed:e,loading:!1,type:["embed","video"]}),t.show()})),_defineProperty(_assertThisInitialized(r),"load",(function(e){var t=_assertThisInitialized(r),n=t.axios;t.reset(),t.setState({loading:!0}),t.show(),n.get(e,{responseType:"arraybuffer"}).then((function(e){switch(console.log("".concat(t.name,": response content-type: ").concat(e.headers["content-type"])),e.headers["content-type"]){case"image/jpeg":case"image/png":case"image/svg+xml":case"image/bmp":case"image/gif":case"image/tiff":case"image/webp":case"image/jpg":case"image/svg":t.setContent(''),"image");break;case"application/json":case"application/ld+json":case"application/json; charset=UTF-8":var r=JSON.parse(t._abToString(e.data));t.setContent("".concat(r.Content),"text html json");break;case"text/html":case"application/xhtml+xml":case"text/plain":case"text/html; charset=UTF-8":case"application/xhtml+xml; charset=UTF-8":case"text/plain; charset=UTF-8":t.setContent(t._abToString(e.data),"text html pajax");break;default:console.warn("".concat(t.name,": Unknown response content-type!"))}})).catch((function(e){console.error(e);var r="";if(e.response)switch(e.response.status){case 404:r="Not Found.";break;case 500:r="Server issue, please try again latter.";break;default:r="Something went wrong."}else e.request?r="No response received":console.warn("Error",e.message);t.setState({error:r})})).then((function(){t.setState({loading:!1})}))})),_defineProperty(_assertThisInitialized(r),"_abToString",(function(e){return String.fromCharCode.apply(null,new Uint8Array(e))})),_defineProperty(_assertThisInitialized(r),"_imageEncode",(function(e){new Uint8Array(e);return btoa([].reduce.call(new Uint8Array(e),(function(e,t){return e+String.fromCharCode(t)}),""))})),_defineProperty(_assertThisInitialized(r),"setContent",(function(e,t){var n=_assertThisInitialized(r);console.log("".concat(n.name,": setContent"));var i=t||["html","text"];Array.isArray(i)||(i=t.split(" ")),n.setState({content:e,type:i})})),_defineProperty(_assertThisInitialized(r),"show",(function(){var e=_assertThisInitialized(r);console.log("".concat(e.name,": show")),e.setState({shown:!0})})),_defineProperty(_assertThisInitialized(r),"hide",(function(){var e=_assertThisInitialized(r);console.log("".concat(e.name,": hide")),e.setState({shown:!1})})),_defineProperty(_assertThisInitialized(r),"getHtml",(function(){return{__html:_assertThisInitialized(r).state.content}}));var n=_assertThisInitialized(r);return n.name=n.constructor.name,console.log("".concat(n.name,": init")),n.axios=g,document.querySelectorAll('[data-toggle="lightbox"]').forEach((function(e){var t=e.getAttribute("data-gallery");t&&(n.state.collections[t]=[],document.querySelectorAll('[data-toggle="lightbox"][data-gallery="'.concat(t,'"]')).forEach((function(e){n.state.collections[t].push(e)}))),e.addEventListener("click",(function(e){e.preventDefault();var t=e.currentTarget,r=t.getAttribute("href")||t.getAttribute("data-href"),i=t.getAttribute("data-embed");n.state.current=t,i?n.embed(r):n.load(r)}))})),r}return function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}(MetaWindow,[{key:"render",value:function render(){var e=this,t=e.name,r=null,n=e.state.current;if(n){var g=n.getAttribute("data-gallery");g&&e.state.collections[g].length>1&&(r=React.createElement("nav",{className:"meta-navs"},React.createElement("button",{className:"meta-nav meta-nav-arrow meta-nav-arrow__prev a",onClick:e.prev},React.createElement("i",{className:"fa fas fa-chevron-left"}),React.createElement("span",{className:"sr-only"},"Previous")),React.createElement("button",{className:"meta-nav meta-nav-arrow meta-nav-arrow__next a",onClick:e.next},React.createElement("i",{className:"fa fas fa-chevron-right"}),React.createElement("span",{className:"sr-only"},"Next"))))}var y=e.state.embed?React.createElement("section",{className:"meta-wrap typography"},React.createElement(h(),{url:e.state.embed,providers:[].concat(_toConsumableArray(i.defaultProviders),[d]),LoadingFallbackElement:React.createElement("div",{className:"meta-spinner_embed"},"... Loading ...")})):React.createElement("section",{className:"meta-wrap typography",dangerouslySetInnerHTML:e.getHtml()}),b="meta-".concat(t," meta-").concat(t,"__").concat(e.state.type.join(" meta-".concat(t,"__"))),v="meta-".concat(t,"-overlay").concat(e.state.shown?" meta-".concat(t,"-overlay__open"):"").concat(e.state.loading?" meta-".concat(t,"-overlay__loading"):"").concat(e.state.error?" meta-".concat(t,"-overlay__error"):"");return React.createElement("div",{className:b},React.createElement("div",{className:v},React.createElement("article",{className:"meta-content"},r,React.createElement("button",{className:"meta-nav meta-close a",onClick:e.hide},React.createElement("i",{className:"fa fas fa-times"}),React.createElement("span",{className:"sr-only"},"Close")),React.createElement("div",{className:"meta-spinner"},"... Loading ..."),React.createElement("div",{className:"meta-error alert alert-danger"},e.state.error),y)))}}]),MetaWindow}(e.Component);n().render(t().createElement(y,null),document.getElementById("App"));n().render(t().createElement(y,null),document.getElementById("App"))}()}(); \ No newline at end of file +!function(){var e={313:function(e,t,r){e.exports=r(906)},161:function(e,t,r){"use strict";var n=r(572),i=r(969),h=r(352),d=r(67),g=r(66),y=r(109),b=r(954),v=r(536);e.exports=function xhrAdapter(e){return new Promise((function dispatchXhrRequest(t,r){var w=e.data,_=e.headers;n.isFormData(w)&&delete _["Content-Type"];var x=new XMLHttpRequest;if(e.auth){var E=e.auth.username||"",S=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";_.Authorization="Basic "+btoa(E+":"+S)}var C=g(e.baseURL,e.url);if(x.open(e.method.toUpperCase(),d(C,e.params,e.paramsSerializer),!0),x.timeout=e.timeout,x.onreadystatechange=function handleLoad(){if(x&&4===x.readyState&&(0!==x.status||x.responseURL&&0===x.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in x?y(x.getAllResponseHeaders()):null,h={data:e.responseType&&"text"!==e.responseType?x.response:x.responseText,status:x.status,statusText:x.statusText,headers:n,config:e,request:x};i(t,r,h),x=null}},x.onabort=function handleAbort(){x&&(r(v("Request aborted",e,"ECONNABORTED",x)),x=null)},x.onerror=function handleError(){r(v("Network Error",e,null,x)),x=null},x.ontimeout=function handleTimeout(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(v(t,e,"ECONNABORTED",x)),x=null},n.isStandardBrowserEnv()){var A=(e.withCredentials||b(C))&&e.xsrfCookieName?h.read(e.xsrfCookieName):void 0;A&&(_[e.xsrfHeaderName]=A)}if("setRequestHeader"in x&&n.forEach(_,(function setRequestHeader(e,t){"undefined"===typeof w&&"content-type"===t.toLowerCase()?delete _[t]:x.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(x.withCredentials=!!e.withCredentials),e.responseType)try{x.responseType=e.responseType}catch(R){if("json"!==e.responseType)throw R}"function"===typeof e.onDownloadProgress&&x.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&x.upload&&x.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function onCanceled(e){x&&(x.abort(),r(e),x=null)})),w||(w=null),x.send(w)}))}},906:function(e,t,r){"use strict";var n=r(572),i=r(202),h=r(160),d=r(32);function createInstance(e){var t=new h(e),r=i(h.prototype.request,t);return n.extend(r,h.prototype,t),n.extend(r,t),r}var g=createInstance(r(178));g.Axios=h,g.create=function create(e){return createInstance(d(g.defaults,e))},g.Cancel=r(619),g.CancelToken=r(801),g.isCancel=r(327),g.all=function all(e){return Promise.all(e)},g.spread=r(428),g.isAxiosError=r(513),e.exports=g,e.exports.default=g},619:function(e){"use strict";function Cancel(e){this.message=e}Cancel.prototype.toString=function toString(){return"Cancel"+(this.message?": "+this.message:"")},Cancel.prototype.__CANCEL__=!0,e.exports=Cancel},801:function(e,t,r){"use strict";var n=r(619);function CancelToken(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function promiseExecutor(e){t=e}));var r=this;e((function cancel(e){r.reason||(r.reason=new n(e),t(r.reason))}))}CancelToken.prototype.throwIfRequested=function throwIfRequested(){if(this.reason)throw this.reason},CancelToken.source=function source(){var e;return{token:new CancelToken((function executor(t){e=t})),cancel:e}},e.exports=CancelToken},327:function(e){"use strict";e.exports=function isCancel(e){return!(!e||!e.__CANCEL__)}},160:function(e,t,r){"use strict";var n=r(572),i=r(67),h=r(664),d=r(457),g=r(32);function Axios(e){this.defaults=e,this.interceptors={request:new h,response:new h}}Axios.prototype.request=function request(e){"string"===typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=g(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[d,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach((function unshiftRequestInterceptors(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function pushResponseInterceptors(e){t.push(e.fulfilled,e.rejected)}));t.length;)r=r.then(t.shift(),t.shift());return r},Axios.prototype.getUri=function getUri(e){return e=g(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function forEachMethodNoData(e){Axios.prototype[e]=function(t,r){return this.request(g(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function forEachMethodWithData(e){Axios.prototype[e]=function(t,r,n){return this.request(g(n||{},{method:e,url:t,data:r}))}})),e.exports=Axios},664:function(e,t,r){"use strict";var n=r(572);function InterceptorManager(){this.handlers=[]}InterceptorManager.prototype.use=function use(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},InterceptorManager.prototype.eject=function eject(e){this.handlers[e]&&(this.handlers[e]=null)},InterceptorManager.prototype.forEach=function forEach(e){n.forEach(this.handlers,(function forEachHandler(t){null!==t&&e(t)}))},e.exports=InterceptorManager},66:function(e,t,r){"use strict";var n=r(96),i=r(431);e.exports=function buildFullPath(e,t){return e&&!n(t)?i(e,t):t}},536:function(e,t,r){"use strict";var n=r(706);e.exports=function createError(e,t,r,i,h){var d=new Error(e);return n(d,t,r,i,h)}},457:function(e,t,r){"use strict";var n=r(572),i=r(427),h=r(327),d=r(178);function throwIfCancellationRequested(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function dispatchRequest(e){return throwIfCancellationRequested(e),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function cleanHeaderConfig(t){delete e.headers[t]})),(e.adapter||d.adapter)(e).then((function onAdapterResolution(t){return throwIfCancellationRequested(e),t.data=i(t.data,t.headers,e.transformResponse),t}),(function onAdapterRejection(t){return h(t)||(throwIfCancellationRequested(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},706:function(e){"use strict";e.exports=function enhanceError(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e.isAxiosError=!0,e.toJSON=function toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},32:function(e,t,r){"use strict";var n=r(572);e.exports=function mergeConfig(e,t){t=t||{};var r={},i=["url","method","data"],h=["headers","auth","proxy","params"],d=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],g=["validateStatus"];function getMergedValue(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function mergeDeepProperties(i){n.isUndefined(t[i])?n.isUndefined(e[i])||(r[i]=getMergedValue(void 0,e[i])):r[i]=getMergedValue(e[i],t[i])}n.forEach(i,(function valueFromConfig2(e){n.isUndefined(t[e])||(r[e]=getMergedValue(void 0,t[e]))})),n.forEach(h,mergeDeepProperties),n.forEach(d,(function defaultToConfig2(i){n.isUndefined(t[i])?n.isUndefined(e[i])||(r[i]=getMergedValue(void 0,e[i])):r[i]=getMergedValue(void 0,t[i])})),n.forEach(g,(function merge(n){n in t?r[n]=getMergedValue(e[n],t[n]):n in e&&(r[n]=getMergedValue(void 0,e[n]))}));var y=i.concat(h).concat(d).concat(g),b=Object.keys(e).concat(Object.keys(t)).filter((function filterAxiosKeys(e){return-1===y.indexOf(e)}));return n.forEach(b,mergeDeepProperties),r}},969:function(e,t,r){"use strict";var n=r(536);e.exports=function settle(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},427:function(e,t,r){"use strict";var n=r(572);e.exports=function transformData(e,t,r){return n.forEach(r,(function transform(r){e=r(e,t)})),e}},178:function(e,t,r){"use strict";var n=r(572),i=r(418),h={"Content-Type":"application/x-www-form-urlencoded"};function setContentTypeIfUnset(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var d={adapter:function getDefaultAdapter(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(e=r(161)),e}(),transformRequest:[function transformRequest(e,t){return i(t,"Accept"),i(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(setContentTypeIfUnset(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(setContentTypeIfUnset(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function transformResponse(e){if("string"===typeof e)try{e=JSON.parse(e)}catch(t){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function validateStatus(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function forEachMethodNoData(e){d.headers[e]={}})),n.forEach(["post","put","patch"],(function forEachMethodWithData(e){d.headers[e]=n.merge(h)})),e.exports=d},202:function(e){"use strict";e.exports=function bind(e,t){return function wrap(){for(var r=new Array(arguments.length),n=0;n=0)return;d[t]="set-cookie"===t?(d[t]?d[t]:[]).concat([r]):d[t]?d[t]+", "+r:r}})),d):d}},428:function(e){"use strict";e.exports=function spread(e){return function wrap(t){return e.apply(null,t)}}},572:function(e,t,r){"use strict";function _typeof(e){return(_typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var n=r(202),i=Object.prototype.toString;function isArray(e){return"[object Array]"===i.call(e)}function isUndefined(e){return"undefined"===typeof e}function isObject(e){return null!==e&&"object"===_typeof(e)}function isPlainObject(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function isFunction(e){return"[object Function]"===i.call(e)}function forEach(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==_typeof(e)&&(e=[e]),isArray(e))for(var r=0,n=e.length;r=0&&b>0){for(n=[],h=r.length;v>=0&&!g;)v==y?(n.push(v),y=r.indexOf(e,v+1)):1==n.length?g=[n.pop(),b]:((i=n.pop())=0?y:b;n.length&&(g=[h,d])}return g}e.exports=balanced,balanced.range=range},708:function(e,t,r){var n=r(417);e.exports=function expandTop(e){if(!e)return[];"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return expand(function escapeBraces(e){return e.split("\\\\").join(i).split("\\{").join(h).split("\\}").join(d).split("\\,").join(g).split("\\.").join(y)}(e),!0).map(unescapeBraces)};var i="\0SLASH"+Math.random()+"\0",h="\0OPEN"+Math.random()+"\0",d="\0CLOSE"+Math.random()+"\0",g="\0COMMA"+Math.random()+"\0",y="\0PERIOD"+Math.random()+"\0";function numeric(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function unescapeBraces(e){return e.split(i).join("\\").split(h).join("{").split(d).join("}").split(g).join(",").split(y).join(".")}function parseCommaParts(e){if(!e)return[""];var t=[],r=n("{","}",e);if(!r)return e.split(",");var i=r.pre,h=r.body,d=r.post,g=i.split(",");g[g.length-1]+="{"+h+"}";var y=parseCommaParts(d);return d.length&&(g[g.length-1]+=y.shift(),g.push.apply(g,y)),t.push.apply(t,g),t}function embrace(e){return"{"+e+"}"}function isPadded(e){return/^-?0\d/.test(e)}function lte(e,t){return e<=t}function gte(e,t){return e>=t}function expand(e,t){var r=[],i=n("{","}",e);if(!i||/\$$/.test(i.pre))return[e];var h,g=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),y=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),b=g||y,v=i.body.indexOf(",")>=0;if(!b&&!v)return i.post.match(/,.*\}/)?expand(e=i.pre+"{"+i.body+d+i.post):[e];if(b)h=i.body.split(/\.\./);else if(1===(h=parseCommaParts(i.body)).length&&1===(h=expand(h[0],!1).map(embrace)).length)return(x=i.post.length?expand(i.post,!1):[""]).map((function(e){return i.pre+h[0]+e}));var w,_=i.pre,x=i.post.length?expand(i.post,!1):[""];if(b){var E=numeric(h[0]),S=numeric(h[1]),C=Math.max(h[0].length,h[1].length),A=3==h.length?Math.abs(numeric(h[2])):1,R=lte;S0){var P=new Array(k+1).join("0");T=O<0?"-"+P+T.slice(1):P+T}}w.push(T)}}else{w=[];for(var I=0;I65536)throw new TypeError("pattern is too long");var r=this.options;if(!r.noglobstar&&"**"===e)return i;if(""===e)return"";var n,h="",v=!!r.nocase,x=!1,E=[],S=[],C=!1,A=-1,R=-1,j="."===e.charAt(0)?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",O=this;function clearStateChar(){if(n){switch(n){case"*":h+=y,v=!0;break;case"?":h+=g,v=!0;break;default:h+="\\"+n}O.debug("clearStateChar %j %j",n,h),n=!1}}for(var T,k=0,P=e.length;k-1;B--){var z=S[B],D=h.slice(0,z.reStart),F=h.slice(z.reStart,z.reEnd-8),H=h.slice(z.reEnd-8,z.reEnd),V=h.slice(z.reEnd);H+=V;var W=D.split("(").length-1,G=V;for(k=0;k=0&&!(i=e[h]);h--);for(h=0;h>> no match, partial?",e,_,t,x),_!==g))}if("string"===typeof v?(b=n.nocase?w.toLowerCase()===v.toLowerCase():w===v,this.debug("string match",v,w,b)):(b=w.match(v),this.debug("pattern match",v,w,b)),!b)return!1}if(h===g&&d===y)return!0;if(h===g)return r;if(d===y)return h===g-1&&""===e[h];throw new Error("wtf?")}},555:function(e,t,r){var n,i,h,d;function _typeof(e){return(_typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}d=function(e,t,r,n){"use strict";function o(e){return e&&"object"==_typeof(e)&&"default"in e?e:{default:e}}var i=o(t),h=o(r),d=o(n),g=function a(){return(g=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])||6!==h[0]&&2!==h[0])){d=0;continue}if(3===h[0]&&(!i||h[1]>i[0]&&h[1]e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?n--:n=e.state.collections[t].length-1,e.state.collections[t][n].click()})),_defineProperty(_assertThisInitialized(r),"reset",(function(){_assertThisInitialized(r).setState({content:"",type:[],shown:!1,loading:!1,error:!1,embed:!1})})),_defineProperty(_assertThisInitialized(r),"embed",(function(e){var t=_assertThisInitialized(r);console.log("".concat(t.name,": embed")),t.reset(),t.setState({embed:e,loading:!1,type:["embed","video"]}),t.show()})),_defineProperty(_assertThisInitialized(r),"load",(function(e){var t=_assertThisInitialized(r),n=t.axios;t.reset(),t.setState({loading:!0}),t.show(),n.get(e,{responseType:"arraybuffer"}).then((function(e){switch(console.log("".concat(t.name,": response content-type: ").concat(e.headers["content-type"])),e.headers["content-type"]){case"image/jpeg":case"image/png":case"image/svg+xml":case"image/bmp":case"image/gif":case"image/tiff":case"image/webp":case"image/jpg":case"image/svg":t.setContent(''),"image");break;case"application/json":case"application/ld+json":case"application/json; charset=UTF-8":var r=JSON.parse(t._abToString(e.data));t.setContent("".concat(r.Content),"text html json");break;case"text/html":case"application/xhtml+xml":case"text/plain":case"text/html; charset=UTF-8":case"application/xhtml+xml; charset=UTF-8":case"text/plain; charset=UTF-8":t.setContent(t._abToString(e.data),"text html pajax");break;default:console.warn("".concat(t.name,": Unknown response content-type!"))}})).catch((function(e){console.error(e);var r="";if(e.response)switch(e.response.status){case 404:r="Not Found.";break;case 500:r="Server issue, please try again latter.";break;default:r="Something went wrong."}else e.request?r="No response received":console.warn("Error",e.message);t.setState({error:r})})).then((function(){t.setState({loading:!1})}))})),_defineProperty(_assertThisInitialized(r),"_abToString",(function(e){return String.fromCharCode.apply(null,new Uint8Array(e))})),_defineProperty(_assertThisInitialized(r),"_imageEncode",(function(e){new Uint8Array(e);return btoa([].reduce.call(new Uint8Array(e),(function(e,t){return e+String.fromCharCode(t)}),""))})),_defineProperty(_assertThisInitialized(r),"setContent",(function(e,t){var n=_assertThisInitialized(r);console.log("".concat(n.name,": setContent"));var i=t||["html","text"];Array.isArray(i)||(i=t.split(" ")),n.setState({content:e,type:i})})),_defineProperty(_assertThisInitialized(r),"show",(function(){var e=_assertThisInitialized(r);console.log("".concat(e.name,": show")),e.setState({shown:!0})})),_defineProperty(_assertThisInitialized(r),"hide",(function(){var e=_assertThisInitialized(r);console.log("".concat(e.name,": hide")),e.setState({shown:!1})})),_defineProperty(_assertThisInitialized(r),"getHtml",(function(){return{__html:_assertThisInitialized(r).state.content}}));var n=_assertThisInitialized(r);return n.name=n.constructor.name,console.log("".concat(n.name,": init")),n.axios=g,document.querySelectorAll('[data-toggle="lightbox"]').forEach((function(e){var t=e.getAttribute("data-gallery");t&&(n.state.collections[t]=[],document.querySelectorAll('[data-toggle="lightbox"][data-gallery="'.concat(t,'"]')).forEach((function(e){n.state.collections[t].push(e)}))),e.addEventListener("click",(function(e){e.preventDefault();var t=e.currentTarget,r=t.getAttribute("href")||t.getAttribute("data-href"),i=t.getAttribute("data-embed");n.state.current=t,i?n.embed(r):n.load(r)}))})),r}return function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}(MetaWindow,[{key:"render",value:function render(){var e=this,t=e.name,r=null,n=e.state.current;if(n){var g=n.getAttribute("data-gallery");g&&e.state.collections[g].length>1&&(r=React.createElement("nav",{className:"meta-navs"},React.createElement("button",{className:"meta-nav meta-nav-arrow meta-nav-arrow__prev a",onClick:e.prev},React.createElement("i",{className:"fa fas fa-chevron-left"}),React.createElement("span",{className:"sr-only"},"Previous")),React.createElement("button",{className:"meta-nav meta-nav-arrow meta-nav-arrow__next a",onClick:e.next},React.createElement("i",{className:"fa fas fa-chevron-right"}),React.createElement("span",{className:"sr-only"},"Next"))))}var y=e.state.embed?React.createElement("section",{className:"meta-wrap typography"},React.createElement(h(),{url:e.state.embed,providers:[].concat(_toConsumableArray(i.defaultProviders),[d]),LoadingFallbackElement:React.createElement("div",{className:"meta-spinner_embed"},"... Loading ...")})):React.createElement("section",{className:"meta-wrap typography",dangerouslySetInnerHTML:e.getHtml()}),b="meta-".concat(t," meta-").concat(t,"__").concat(e.state.type.join(" meta-".concat(t,"__"))),v="meta-".concat(t,"-overlay").concat(e.state.shown?" meta-".concat(t,"-overlay__open"):"").concat(e.state.loading?" meta-".concat(t,"-overlay__loading"):"").concat(e.state.error?" meta-".concat(t,"-overlay__error"):"");return React.createElement("div",{className:b},React.createElement("div",{className:v},React.createElement("article",{className:"meta-content"},r,React.createElement("button",{className:"meta-nav meta-close a",onClick:e.hide},React.createElement("i",{className:"fa fas fa-times"}),React.createElement("span",{className:"sr-only"},"Close")),React.createElement("div",{className:"meta-spinner"},"... Loading ..."),React.createElement("div",{className:"meta-error alert alert-danger"},e.state.error),y)))}}]),MetaWindow}(e.Component);n().render(t().createElement(y,null),document.getElementById("App"));n().render(t().createElement(y,null),document.getElementById("App"))}()}(); \ No newline at end of file diff --git a/dist/records.json b/dist/records.json index 70d9d7c..b4ceac0 100644 --- a/dist/records.json +++ b/dist/records.json @@ -14,12 +14,12 @@ }, "modules": { "byIdentifier": { - "./node_modules/.pnpm/html-loader@1.3.2_webpack@5.17.0/node_modules/html-loader/dist/cjs.js!./src/html/meta-lightbox.html": 226, - "./node_modules/.pnpm/html-webpack-plugin@4.5.1_webpack@5.17.0/node_modules/html-webpack-plugin/lib/loader.js!./src/index.html": 861 + "./node_modules/.pnpm/html-loader@1.3.2_webpack@5.19.0/node_modules/html-loader/dist/cjs.js!./src/html/meta-lightbox.html": 280, + "./node_modules/.pnpm/html-webpack-plugin@4.5.1_webpack@5.19.0/node_modules/html-webpack-plugin/lib/loader.js!./src/index.html": 79 }, "usedIds": [ - 226, - 861 + 79, + 280 ] } } @@ -37,76 +37,76 @@ }, "modules": { "byIdentifier": { - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/index.js": 940, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/adapters/xhr.js": 355, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/axios.js": 412, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/cancel/Cancel.js": 499, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/cancel/CancelToken.js": 294, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/cancel/isCancel.js": 949, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/core/Axios.js": 769, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/core/InterceptorManager.js": 637, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/core/buildFullPath.js": 205, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/core/createError.js": 348, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/core/dispatchRequest.js": 736, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/core/enhanceError.js": 177, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/core/mergeConfig.js": 624, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/core/settle.js": 706, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/core/transformData.js": 92, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/defaults.js": 339, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/helpers/bind.js": 810, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/helpers/buildURL.js": 778, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/helpers/combineURLs.js": 75, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/helpers/cookies.js": 575, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/helpers/isAbsoluteURL.js": 797, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/helpers/isAxiosError.js": 606, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/helpers/isURLSameOrigin.js": 426, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/helpers/normalizeHeaderName.js": 852, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/helpers/parseHeaders.js": 17, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/helpers/spread.js": 656, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/utils.js": 854, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/balanced-match@1.0.0/node_modules/balanced-match/index.js": 524, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/brace-expansion@2.0.0/node_modules/brace-expansion/index.js": 281, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/minimatch@3.0.4/node_modules/minimatch/minimatch.js": 519, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/react-tiny-oembed@1.0.1_react-dom@17.0.1+react@17.0.1/node_modules/react-tiny-oembed/lib/index.js": 668, - "./node_modules/.pnpm/babel-loader@8.2.2_baabc0d578894a2be8d781502c3441b6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./src/js/app.js|71bea69f6ec5ff1f7eb0324e8786afb4": 629, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/index.js": 313, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/adapters/xhr.js": 161, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/axios.js": 906, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/cancel/Cancel.js": 619, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/cancel/CancelToken.js": 801, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/cancel/isCancel.js": 327, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/core/Axios.js": 160, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/core/InterceptorManager.js": 664, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/core/buildFullPath.js": 66, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/core/createError.js": 536, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/core/dispatchRequest.js": 457, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/core/enhanceError.js": 706, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/core/mergeConfig.js": 32, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/core/settle.js": 969, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/core/transformData.js": 427, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/defaults.js": 178, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/helpers/bind.js": 202, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/helpers/buildURL.js": 67, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/helpers/combineURLs.js": 431, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/helpers/cookies.js": 352, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/helpers/isAbsoluteURL.js": 96, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/helpers/isAxiosError.js": 513, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/helpers/isURLSameOrigin.js": 954, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/helpers/normalizeHeaderName.js": 418, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/helpers/parseHeaders.js": 109, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/helpers/spread.js": 428, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/utils.js": 572, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/balanced-match@1.0.0/node_modules/balanced-match/index.js": 417, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/brace-expansion@2.0.0/node_modules/brace-expansion/index.js": 708, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/minimatch@3.0.4/node_modules/minimatch/minimatch.js": 158, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/react-tiny-oembed@1.0.1_react-dom@17.0.1+react@17.0.1/node_modules/react-tiny-oembed/lib/index.js": 555, + "./node_modules/.pnpm/babel-loader@8.2.2_cfa6fea171df94783407619dd74e11fe/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./src/js/app.js|13e97a4e07d84c458f75bd03e53eb349": 994, "external \"React\"": 804, "ignored|path": 386 }, "usedIds": [ - 17, - 75, - 92, - 177, - 205, - 281, - 294, - 339, - 348, - 355, + 32, + 66, + 67, + 96, + 109, + 158, + 160, + 161, + 178, + 202, + 313, + 327, + 352, 386, - 412, - 426, - 499, - 519, - 524, - 575, - 606, - 624, - 629, - 637, - 656, - 668, + 417, + 418, + 427, + 428, + 431, + 457, + 513, + 536, + 555, + 572, + 619, + 664, 706, - 736, - 769, - 778, - 797, + 708, + 801, 804, - 810, - 852, - 854, - 940, - 949 + 906, + 954, + 969, + 994 ] } } \ No newline at end of file diff --git a/dist/report.html b/dist/report.html index 83cfc6b..ceee89a 100644 --- a/dist/report.html +++ b/dist/report.html @@ -3,7 +3,7 @@ - @a2nt/meta-lightbox-react [31 Jan 2021 at 16:30] + @a2nt/meta-lightbox-react [31 Jan 2021 at 18:49] diff --git a/eslint.config.json b/eslint.config.json new file mode 100755 index 0000000..76361fd --- /dev/null +++ b/eslint.config.json @@ -0,0 +1,272 @@ +{ + // http://eslint.org/docs/rules/ + "extends": "eslint:recommended", + + "settings": { + "react": { + "version": "detect" + } + }, + + "env": { + "browser": true, // browser global variables. + "node": true, // Node.js global variables and Node.js-specific rules. + "amd": true, // defines require() and define() as global variables as per the amd spec. + "mocha": false, // adds all of the Mocha testing global variables. + "jasmine": false, // adds all of the Jasmine testing global variables for version 1.3 and 2.0. + "phantomjs": false, // phantomjs global variables. + "jquery": true, // jquery global variables. + "prototypejs": false, // prototypejs global variables. + "shelljs": false, // shelljs global variables. + "es6": true + }, + + "globals": { + // e.g. "angular": true + }, + + "plugins": ["react", "import", "jquery"], + + "parser": "@babel/eslint-parser", + + "parserOptions": { + "ecmaVersion": 6, + "sourceType": "module", + "ecmaFeatures": { + "jsx": true, + "experimentalObjectRestSpread": true + } + }, + + "rules": { + ////////// Possible Errors ////////// + + "no-comma-dangle": 0, // disallow trailing commas in object literals + "no-cond-assign": 0, // disallow assignment in conditional expressions + "no-console": 0, // disallow use of console (off by default in the node environment) + "no-constant-condition": 0, // disallow use of constant expressions in conditions + "no-control-regex": 0, // disallow control characters in regular expressions + "no-debugger": 0, // disallow use of debugger + "no-dupe-keys": 0, // disallow duplicate keys when creating object literals + "no-empty": 0, // disallow empty statements + "no-empty-class": 0, // disallow the use of empty character classes in regular expressions + "no-ex-assign": 0, // disallow assigning to the exception in a catch block + "no-extra-boolean-cast": 0, // disallow double-negation boolean casts in a boolean context + "no-extra-parens": 0, // disallow unnecessary parentheses (off by default) + "no-extra-semi": 0, // disallow unnecessary semicolons + "no-func-assign": 0, // disallow overwriting functions written as function declarations + "no-inner-declarations": 0, // disallow function or variable declarations in nested blocks + "no-invalid-regexp": 0, // disallow invalid regular expression strings in the RegExp constructor + "no-irregular-whitespace": 0, // disallow irregular whitespace outside of strings and comments + "no-negated-in-lhs": 0, // disallow negation of the left operand of an in expression + "no-obj-calls": 0, // disallow the use of object properties of the global object (Math and JSON) as functions + "no-regex-spaces": 0, // disallow multiple spaces in a regular expression literal + "no-reserved-keys": 0, // disallow reserved words being used as object literal keys (off by default) + "no-sparse-arrays": 0, // disallow sparse arrays + "no-unreachable": 0, // disallow unreachable statements after a return, throw, continue, or break statement + "use-isnan": 0, // disallow comparisons with the value NaN + "valid-jsdoc": 0, // Ensure JSDoc comments are valid (off by default) + "valid-typeof": 0, // Ensure that the results of typeof are compared against a valid string + + ////////// Best Practices ////////// + + "block-scoped-var": 0, // treat var statements as if they were block scoped (off by default) + "complexity": 0, // specify the maximum cyclomatic complexity allowed in a program (off by default) + "consistent-return": 0, // require return statements to either always or never specify values + "curly": 0, // specify curly brace conventions for all control statements + "default-case": 0, // require default case in switch statements (off by default) + "dot-notation": 0, // encourages use of dot notation whenever possible + "eqeqeq": 0, // require the use of === and !== + "guard-for-in": 0, // make sure for-in loops have an if statement (off by default) + "no-alert": 0, // disallow the use of alert, confirm, and prompt + "no-caller": 0, // disallow use of arguments.caller or arguments.callee + "no-div-regex": 0, // disallow division operators explicitly at beginning of regular expression (off by default) + "no-else-return": 0, // disallow else after a return in an if (off by default) + "no-empty-label": 0, // disallow use of labels for anything other then loops and switches + "no-eq-null": 0, // disallow comparisons to null without a type-checking operator (off by default) + "no-eval": 0, // disallow use of eval() + "no-extend-native": 0, // disallow adding to native types + "no-extra-bind": 0, // disallow unnecessary function binding + "no-fallthrough": 0, // disallow fallthrough of case statements + "no-floating-decimal": 0, // disallow the use of leading or trailing decimal points in numeric literals (off by default) + "no-implied-eval": 0, // disallow use of eval()-like methods + "no-iterator": 0, // disallow usage of __iterator__ property + "no-labels": 0, // disallow use of labeled statements + "no-lone-blocks": 0, // disallow unnecessary nested blocks + "no-loop-func": 0, // disallow creation of functions within loops + "no-multi-spaces": 0, // disallow use of multiple spaces + "no-multi-str": 0, // disallow use of multiline strings + "no-native-reassign": 0, // disallow reassignments of native objects + "no-new": 0, // disallow use of new operator when not part of the assignment or comparison + "no-new-func": 0, // disallow use of new operator for Function object + "no-new-wrappers": 0, // disallows creating new instances of String, Number, and Boolean + "no-octal": 0, // disallow use of octal literals + "no-octal-escape": 0, // disallow use of octal escape sequences in string literals, such as var foo = "Copyright \251"; + "no-process-env": 0, // disallow use of process.env (off by default) + "no-proto": 0, // disallow usage of __proto__ property + "no-redeclare": 0, // disallow declaring the same variable more then once + "no-return-assign": 0, // disallow use of assignment in return statement + "no-script-url": 0, // disallow use of javascript: urls. + "no-self-compare": 0, // disallow comparisons where both sides are exactly the same (off by default) + "no-sequences": 0, // disallow use of comma operator + "no-unused-expressions": 0, // disallow usage of expressions in statement position + "no-void": 0, // disallow use of void operator (off by default) + "no-warning-comments": 0, // disallow usage of configurable warning terms in comments, e.g. TODO or FIXME (off by default) + "no-with": 0, // disallow use of the with statement + "radix": 0, // require use of the second argument for parseInt() (off by default) + "vars-on-top": 0, // requires to declare all vars on top of their containing scope (off by default) + "wrap-iife": 0, // require immediate function invocation to be wrapped in parentheses (off by default) + "yoda": 0, // require or disallow Yoda conditions + + ////////// Strict Mode ////////// + + "global-strict": 0, // (deprecated) require or disallow the "use strict" pragma in the global scope (off by default in the node environment) + "no-extra-strict": 0, // (deprecated) disallow unnecessary use of "use strict"; when already in strict mode + "strict": 0, // controls location of Use Strict Directives + + ////////// Variables ////////// + + "no-catch-shadow": 0, // disallow the catch clause parameter name being the same as a variable in the outer scope (off by default in the node environment) + "no-delete-var": 0, // disallow deletion of variables + "no-label-var": 0, // disallow labels that share a name with a variable + "no-shadow": 0, // disallow declaration of variables already declared in the outer scope + "no-shadow-restricted-names": 0, // disallow shadowing of names such as arguments + "no-undef": 0, // disallow use of undeclared variables unless mentioned in a /*global */ block + "no-undef-init": 0, // disallow use of undefined when initializing variables + "no-undefined": 0, // disallow use of undefined variable (off by default) + "no-unused-vars": 0, // disallow declaration of variables that are not used in the code + "no-use-before-define": 0, // disallow use of variables before they are defined + + ////////// Node.js ////////// + + "handle-callback-err": 0, // enforces error handling in callbacks (off by default) (on by default in the node environment) + "no-mixed-requires": 0, // disallow mixing regular variable and require declarations (off by default) (on by default in the node environment) + "no-new-require": 0, // disallow use of new operator with the require function (off by default) (on by default in the node environment) + "no-path-concat": 0, // disallow string concatenation with __dirname and __filename (off by default) (on by default in the node environment) + "no-process-exit": 0, // disallow process.exit() (on by default in the node environment) + "no-restricted-modules": 0, // restrict usage of specified node modules (off by default) + "no-sync": 0, // disallow use of synchronous methods (off by default) + + ////////// Stylistic Issues ////////// + + "brace-style": 0, // enforce one true brace style (off by default) + "camelcase": 0, // require camel case names + "comma-spacing": 0, // enforce spacing before and after comma + "comma-style": 0, // enforce one true comma style (off by default) + "consistent-this": 0, // enforces consistent naming when capturing the current execution context (off by default) + "eol-last": 0, // enforce newline at the end of file, with no multiple empty lines + "func-names": 0, // require function expressions to have a name (off by default) + "func-style": 0, // enforces use of function declarations or expressions (off by default) + "key-spacing": 0, // enforces spacing between keys and values in object literal properties + "max-nested-callbacks": 0, // specify the maximum depth callbacks can be nested (off by default) + "new-cap": 0, // require a capital letter for constructors + "new-parens": 0, // disallow the omission of parentheses when invoking a constructor with no arguments + "no-array-constructor": 0, // disallow use of the Array constructor + "no-inline-comments": 0, // disallow comments inline after code (off by default) + "no-lonely-if": 0, // disallow if as the only statement in an else block (off by default) + "no-mixed-spaces-and-tabs": 0, // disallow mixed spaces and tabs for indentation + "no-multiple-empty-lines": 0, // disallow multiple empty lines (off by default) + "no-nested-ternary": 0, // disallow nested ternary expressions (off by default) + "no-new-object": 0, // disallow use of the Object constructor + "no-space-before-semi": 0, // disallow space before semicolon + "no-spaced-func": 0, // disallow space between function identifier and application + "no-ternary": 0, // disallow the use of ternary operators (off by default) + "no-trailing-spaces": 0, // disallow trailing whitespace at the end of lines + "no-underscore-dangle": 0, // disallow dangling underscores in identifiers + "no-wrap-func": 0, // disallow wrapping of non-IIFE statements in parens + "one-var": 0, // allow just one var statement per function (off by default) + "operator-assignment": 0, // require assignment operator shorthand where possible or prohibit it entirely (off by default) + "padded-blocks": 0, // enforce padding within blocks (off by default) + "quote-props": 0, // require quotes around object literal property names (off by default) + "quotes": 0, // specify whether double or single quotes should be used + "semi": 0, // require or disallow use of semicolons instead of ASI + "sort-vars": 0, // sort variables within the same declaration block (off by default) + "space-after-function-name": 0, // require a space after function names (off by default) + "space-after-keywords": 0, // require a space after certain keywords (off by default) + "space-before-blocks": 0, // require or disallow space before blocks (off by default) + "space-in-brackets": 0, // require or disallow spaces inside brackets (off by default) + "space-in-parens": 0, // require or disallow spaces inside parentheses (off by default) + "space-infix-ops": 0, // require spaces around operators + "space-return-throw-case": 0, // require a space after return, throw, and case + "space-unary-ops": 0, // Require or disallow spaces before/after unary operators (words on by default, nonwords off by default) + "spaced-line-comment": 0, // require or disallow a space immediately following the // in a line comment (off by default) + "wrap-regex": 0, // require regex literals to be wrapped in parentheses (off by default) + + ////////// ECMAScript 6 ////////// + + "no-var": 0, // require let or const instead of var (off by default) + "generator-star": 0, // enforce the position of the * in generator functions (off by default) + + ////////// Legacy ////////// + + "max-depth": 0, // specify the maximum depth that blocks can be nested (off by default) + "max-len": 0, // specify the maximum length of a line in your program (off by default) + "max-params": 0, // limits the number of parameters that can be used in the function declaration. (off by default) + "max-statements": 0, // specify the maximum number of statement allowed in a function (off by default) + "no-bitwise": 0, // disallow use of bitwise operators (off by default) + "no-plusplus": 0, // disallow use of unary operators, ++ and -- (off by default) + + //////// Extra ////////// + "array-bracket-spacing": ["error", "never"], + "array-callback-return": "error", + "arrow-parens": ["error", "always"], + "arrow-spacing": ["error", { "before": true, "after": true }], + "comma-dangle": ["error", "always-multiline"], + "indent": ["error", 2, { "SwitchCase": 1 }], + "no-case-declarations": "error", + "no-confusing-arrow": "error", + "no-duplicate-imports": "error", + "no-param-reassign": "error", + "no-useless-escape": "error", + "object-curly-spacing": ["error", "always"], + "object-shorthand": ["error", "properties"], + "prefer-arrow-callback": "error", + "prefer-const": "error", + "prefer-template": "error", + "react/jsx-closing-bracket-location": "error", + "react/jsx-curly-spacing": [ + "error", + "never", + { "allowMultiline": true } + ], + "react/jsx-filename-extension": [ + "error", + { "extensions": [".react.js", ".js", ".jsx"] } + ], + "react/jsx-no-duplicate-props": "error", + "react/jsx-no-bind": [ + "error", + { + "ignoreRefs": true, + "allowArrowFunctions": true, + "allowBind": false + } + ], + "react/jsx-no-undef": "error", + "react/jsx-pascal-case": "error", + "react/jsx-tag-spacing": [ + "error", + { + "closingSlash": "never", + "beforeSelfClosing": "always", + "afterOpening": "never" + } + ], + "react/jsx-uses-react": "error", + "react/jsx-uses-vars": "error", + "react/no-danger": "error", + "react/no-deprecated": "error", + "react/no-did-mount-set-state": "error", + "react/no-did-update-set-state": "error", + "react/no-direct-mutation-state": "error", + "react/no-is-mounted": "error", + "react/no-multi-comp": "error", + "react/prefer-es6-class": "error", + "react/prop-types": "error", + "react/require-render-return": "error", + "react/self-closing-comp": "error", + "react/sort-comp": "error", + "import/no-mutable-exports": "error", + "import/imports-first": "warn" + } +} diff --git a/package.json b/package.json index 1630528..f05a097 100644 --- a/package.json +++ b/package.json @@ -17,10 +17,10 @@ "start": "cross-env NODE_ENV=development webpack-dev-server --https --config webpack.config.serve.js", "dash": "cross-env NODE_ENV=development webpack-dashboard -- webpack-dev-server --config webpack.config.serve.js", "build": "cross-env NODE_ENV=production webpack --progress --stats-all", - "lint:check": "eslint ./src --config .eslintrc && sass-lint ./src --config .sasslintrc -v -q", - "lint:fix": "eslint ./src --config .eslintrc --fix && sass-lint ./src --config .sasslintrc -v -q --fix", - "lint:js": "eslint ./src --config .eslintrc", - "lint:sass": "sass-lint ./src --config .sasslintrc -v -q", + "lint:check": "eslint ./src --config eslint.config.json && sass-lint ./src --config sass-lint.yml -v -q", + "lint:fix": "eslint ./src --config eslint.config.json --fix && sass-lint ./src --config sass-lint.yml -v -q --fix", + "lint:js": "eslint ./src --config eslint.config.json", + "lint:sass": "sass-lint ./src --config sass-lint.yml -v -q", "prebuild": "yarn lint:fix && rimraf dist", "prepare": "yarn lint:fix && yarn build", "prunecaches": "rimraf ./node_modules/.cache/", @@ -48,8 +48,6 @@ "ie>=11" ], "dependencies": { - "react": "^17.0.1", - "react-dom": "^17.0.1", "axios": "^0.21.1", "balanced-match": "^1.0.0", "bootstrap": "^4.6.0", @@ -57,29 +55,34 @@ "font-awesome": "^4.7.0", "material-design-color": "^2.3.2", "minimatch": "^3.0.4", - "oembed-github-gist": "^1.0.0", + "react": "^17.0.1", + "react-dom": "^17.0.1", "react-tiny-oembed": "^1.0.1", "setimmediate": "^1.0.5" }, "devDependencies": { "@a2nt/image-sprite-webpack-plugin": "^0.2.5", "@babel/core": "^7.12.10", + "@babel/eslint-parser": "^7.12.1", "@babel/plugin-proposal-class-properties": "^7.12.1", "@babel/plugin-proposal-object-rest-spread": "^7.12.1", + "@babel/plugin-syntax-jsx": "^7.12.1", "@babel/plugin-transform-react-jsx": "^7.12.12", "@babel/preset-env": "^7.12.11", + "@babel/preset-react": "^7.12.10", + "@babel/runtime": "^7.12.5", "@googlemaps/markerclustererplus": "*", "animate.css": "^4.1.1", "ansi-html": "^0.0.7", "ansi-regex": "^5.0.0", - "autoprefixer": "^10.2.3", - "babel-eslint": "^10.1.0", + "autoprefixer": "^10.2.4", "babel-loader": "^8.2.2", + "classnames": "^2.2.6", "copy-webpack-plugin": "^7.0.0", "croppie": "^2.6.5", "cross-env": "^7.0.3", "css-loader": "^5.0.1", - "eslint": "^7.18.0", + "eslint": "^7.19.0", "eslint-plugin-import": "^2.22.1", "eslint-plugin-jquery": "^1.5.1", "eslint-plugin-react": "^7.22.0", @@ -94,13 +97,13 @@ "html-dom-parser": "^1.0.0", "html-entities": "^1.4.0", "html-loader": "^1.3.2", - "html-react-parser": "^1.2.1", + "html-react-parser": "^1.2.3", "html-webpack-plugin": "^4.5.1", "image-minimizer-webpack-plugin": "^2.2.0", "imagemin-jpegtran": "^7.0.0", "img-optimize-loader": "^1.0.7", "loglevel": "^1.7.1", - "mini-css-extract-plugin": "^1.3.4", + "mini-css-extract-plugin": "^1.3.5", "node-sass": "^5.0.0", "object-assign": "^4.1.1", "optimize-css-assets-webpack-plugin": "^5.0.4", @@ -118,7 +121,6 @@ "sass-lint-fix": "^1.12.1", "sass-loader": "^10.1.1", "scheduler": "^0.20.1", - "script-ext-html-webpack-plugin": "^2.1.5", "shallowequal": "^1.1.0", "strip-ansi": "^6.0.0", "style-loader": "^2.0.0", @@ -126,7 +128,7 @@ "terser-webpack-plugin": "^5.1.1", "url": "^0.11.0", "url-loader": "^4.1.1", - "webpack": "^5.17.0", + "webpack": "^5.19.0", "webpack-bundle-analyzer": "^4.4.0", "webpack-cli": "^4.4.0", "webpack-dev-server": "^4.0.0-beta.0", diff --git a/sass-lint.yml b/sass-lint.yml new file mode 100755 index 0000000..a0d1933 --- /dev/null +++ b/sass-lint.yml @@ -0,0 +1,173 @@ +# sass-lint config to match the AirBNB style guide +files: + include: 'app/client/src/**/*.scss' + ignore: + - 'app/client/src/thirdparty/*' +options: + formatter: stylish + merge-default-rules: false +rules: + # Warnings + # Things that require actual refactoring are marked as warnings + class-name-format: + - 1 + - convention: hyphenatedbem + placeholder-name-format: + - 1 + - convention: hyphenatedlowercase + nesting-depth: + - 1 + - max-depth: 3 + no-ids: 1 + no-important: 1 + no-misspelled-properties: + - 1 + - extra-properties: + - '-moz-border-radius-topleft' + - '-moz-border-radius-topright' + - '-moz-border-radius-bottomleft' + - '-moz-border-radius-bottomright' + variable-name-format: + - 1 + - allow-leading-underscore: true + convention: hyphenatedlowercase + no-extends: 1 + + # Warnings: these things are preferential rather than mandatory + no-css-comments: 1 + + # Errors + # Things that can be easily fixed are marked as errors + indentation: + - 2 + - size: 2 + final-newline: + - 2 + - include: true + no-trailing-whitespace: 2 + border-zero: + - 2 + - convention: '0' + brace-style: + - 2 + - allow-single-line: true + clean-import-paths: + - 2 + - filename-extension: false + leading-underscore: false + no-debug: 2 + no-empty-rulesets: 2 + no-invalid-hex: 2 + no-mergeable-selectors: 2 + # no-qualifying-elements: + # - 1 + # - allow-element-with-attribute: false + # allow-element-with-class: false + # allow-element-with-id: false + no-trailing-zero: 2 + no-url-protocols: 2 + quotes: + - 2 + - style: double + space-after-bang: + - 2 + - include: false + space-after-colon: + - 2 + - include: true + space-after-comma: + - 2 + - include: true + space-before-bang: + - 2 + - include: true + space-before-brace: + - 2 + - include: true + space-before-colon: 2 + space-between-parens: + - 2 + - include: false + trailing-semicolon: 2 + url-quotes: 2 + zero-unit: 2 + single-line-per-selector: 2 + one-declaration-per-line: 2 + empty-line-between-blocks: + - 2 + - ignore-single-line-rulesets: true + # Missing rules + # There are no sass-lint rules for the following AirBNB style items, but thess + # - Put comments on their own line + # - Put property delcarations before mixins + # Disabled rules + # These are other rules that we may wish to consider using in the future + # They are not part of the AirBNB CSS standard but they would introduce some strictness + # bem-depth: 0 + # variable-for-property: 0 + # no-transition-all: 0 + # hex-length: + # - 1 + # - style: short + # hex-notation: + # - 1 + # - style: lowercase + # property-units: + # - 1 + # - global: + # - ch + # - em + # - ex + # - rem + # - cm + # - in + # - mm + # - pc + # - pt + # - px + # - q + # - vh + # - vw + # - vmin + # - vmax + # - deg + # - grad + # - rad + # - turn + # - ms + # - s + # - Hz + # - kHz + # - dpi + # - dpcm + # - dppx + # - '%' + # per-property: {} + # force-attribute-nesting: 1 + # force-element-nesting: 1 + # force-pseudo-nesting: 1 + # function-name-format: + # - 1 + # - allow-leading-underscore: true + # convention: hyphenatedlowercase + # no-color-literals: 1 + # no-duplicate-properties: 1 + # mixin-name-format: + # - 1 + # - allow-leading-underscore: true + # convention: hyphenatedlowercase + # shorthand-values: + # - 1 + # - allowed-shorthands: + # - 1 + # - 2 + # - 3 + # leading-zero: + # - 1 + # - include: false + # no-vendor-prefixes: + # - 1 + # - additional-identifiers: [] + # excluded-identifiers: [] + # placeholder-in-extend: 1 + # no-color-keywords: 2 diff --git a/src/index.html b/src/index.html index 5da2c2c..3e8e1a2 100755 --- a/src/index.html +++ b/src/index.html @@ -23,7 +23,14 @@
+ + <%= REACT_SCRIPTS %> + + + + + - - <%= REACT_SCRIPTS %> - - -